@streamlayer/react 1.21.4 → 1.22.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/app/masters.d.ts +2 -5
- package/lib/app/pause-ad.d.ts +1 -10
- package/lib/app/useStreamLayerApp.d.ts +1 -23
- package/lib/cjs/Question.js +1 -0
- package/lib/cjs/advertisement.js +40 -40
- package/lib/cjs/analytics.js +1 -0
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/hooks-B0Qttldg.js +1 -0
- package/lib/cjs/index-DSi8Qgfs.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -0
- package/lib/cjs/index11.js +4 -0
- package/lib/cjs/index12.js +1 -0
- package/lib/cjs/index13.js +1 -0
- package/lib/cjs/index14.js +1 -0
- package/lib/cjs/index15.js +1 -0
- package/lib/cjs/index16.js +5 -0
- package/lib/cjs/index2.js +1 -5
- package/lib/cjs/index3.js +1 -0
- package/lib/cjs/index4.js +5 -0
- package/lib/cjs/index5.js +1 -0
- package/lib/cjs/index6.js +1 -0
- package/lib/cjs/index7.js +5 -0
- package/lib/cjs/index8.js +1 -0
- package/lib/cjs/index9.js +1 -0
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +6 -6
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/sl-types.js +15 -0
- package/lib/cjs/storage.js +1 -0
- package/lib/cjs/theme.js +17 -0
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +9 -9
- package/lib/cjs/utils.js +47 -0
- package/lib/cjs/vast-client.min.js +1 -0
- package/lib/classic/app/masters.d.ts +2 -5
- package/lib/classic/app/pause-ad.d.ts +1 -10
- package/lib/classic/app/useStreamLayerApp.d.ts +1 -23
- package/lib/classic/cjs/Question.js +1 -0
- package/lib/classic/cjs/advertisement.js +40 -40
- package/lib/classic/cjs/analytics.js +1 -0
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +4 -4
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +1 -0
- package/lib/classic/cjs/index-DSi8Qgfs.js +1 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -0
- package/lib/classic/cjs/index11.js +1 -0
- package/lib/classic/cjs/index12.js +1 -0
- package/lib/classic/cjs/index13.js +4 -0
- package/lib/classic/cjs/index2.js +5 -0
- package/lib/classic/cjs/index3.js +1 -0
- package/lib/classic/cjs/index4.js +1 -0
- package/lib/classic/cjs/index5.js +1 -0
- package/lib/classic/cjs/index6.js +5 -0
- package/lib/classic/cjs/index7.js +1 -0
- package/lib/classic/cjs/index8.js +1 -0
- package/lib/classic/cjs/index9.js +1 -0
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -0
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/sl-types.js +15 -0
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
- package/lib/classic/cjs/utils.js +47 -0
- package/lib/classic/cjs/vast-client.min.js +1 -0
- package/lib/classic/es/Question.js +392 -0
- package/lib/classic/es/advertisement.js +10375 -10374
- package/lib/classic/es/analytics.js +28 -0
- package/lib/classic/es/auth.js +4 -4
- package/lib/classic/es/bet-pack.js +56 -51
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/hooks-B0Qttldg.js +98 -0
- package/lib/classic/es/index-DSi8Qgfs.js +65 -0
- package/lib/classic/es/index.js +14 -15
- package/lib/classic/es/index10.js +87 -0
- package/lib/classic/es/index11.js +2355 -0
- package/lib/classic/es/index12.js +183 -0
- package/lib/classic/es/index13.js +835 -0
- package/lib/classic/es/index2.js +2621 -0
- package/lib/classic/es/index3.js +64 -0
- package/lib/classic/es/index4.js +19 -0
- package/lib/classic/es/index5.js +285 -0
- package/lib/classic/es/{index-l-eyvmpL.js → index6.js} +937 -937
- package/lib/classic/es/index7.js +7 -0
- package/lib/classic/es/index8.js +11 -0
- package/lib/classic/es/index9.js +319 -0
- package/lib/classic/es/insight.js +31 -32
- package/lib/classic/es/notification.js +7 -1006
- package/lib/classic/es/notification2.js +1117 -0
- package/lib/classic/es/pause-ad.js +139 -138
- package/lib/classic/es/points.js +39 -38
- package/lib/classic/es/sl-types.js +258 -0
- package/lib/classic/es/useStreamLayerApp.js +1 -2
- package/lib/classic/es/useStreamLayerApp2.js +2400 -2283
- package/lib/classic/es/utils.js +76 -0
- package/lib/{es/vast-client.min-B0NUra1B.js → classic/es/vast-client.min.js} +338 -338
- package/lib/classic/index.d.ts +5 -13
- package/lib/classic/masters.d.ts +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +30 -30
- package/lib/dist/es/index.js +2 -2
- package/lib/dist/es/masters.js +5813 -6063
- package/lib/dist/index.d.ts +1332 -0
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +136 -0
- package/lib/es/advertisement.js +10375 -10374
- package/lib/es/analytics.js +28 -0
- package/lib/es/auth.js +4 -4
- package/lib/es/bet-pack.js +7 -6
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/hooks-B0Qttldg.js +98 -0
- package/lib/es/index-DSi8Qgfs.js +65 -0
- package/lib/es/index.js +13 -14
- package/lib/es/index10.js +267 -0
- package/lib/es/index11.js +835 -0
- package/lib/es/index12.js +183 -0
- package/lib/es/index13.js +319 -0
- package/lib/es/index14.js +87 -0
- package/lib/es/index15.js +2355 -0
- package/lib/es/index16.js +1254 -0
- package/lib/es/index2.js +1349 -3363
- package/lib/es/index3.js +64 -0
- package/lib/es/index4.js +3418 -0
- package/lib/es/index5.js +19 -0
- package/lib/es/index6.js +285 -0
- package/lib/es/{index-l-eyvmpL.js → index7.js} +937 -937
- package/lib/es/index8.js +7 -0
- package/lib/es/index9.js +11 -0
- package/lib/es/insight.js +31 -32
- package/lib/es/masters.js +6 -5
- package/lib/es/masters2.js +189 -176
- package/lib/es/notification.js +124 -119
- package/lib/es/pause-ad.js +140 -139
- package/lib/es/points.js +40 -38
- package/lib/es/sl-types.js +277 -0
- package/lib/es/storage.js +113 -0
- package/lib/es/theme.js +47 -0
- package/lib/es/useStreamLayerApp.js +1 -2
- package/lib/es/useStreamLayerApp2.js +2399 -2282
- package/lib/es/utils.js +76 -0
- package/lib/{classic/es/vast-client.min-B0NUra1B.js → es/vast-client.min.js} +338 -338
- package/lib/index.d.ts +5 -13
- package/lib/masters.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -48
- package/lib/app/event.d.ts +0 -6
- package/lib/app/provider.d.ts +0 -49
- package/lib/cjs/index-l-eyvmpL.js +0 -5
- package/lib/cjs/provider.js +0 -84
- package/lib/cjs/vast-client.min-B0NUra1B.js +0 -1
- package/lib/classic/app/event.d.ts +0 -6
- package/lib/classic/app/provider.d.ts +0 -49
- package/lib/classic/cjs/index-l-eyvmpL.js +0 -5
- package/lib/classic/cjs/provider.js +0 -68
- package/lib/classic/cjs/vast-client.min-B0NUra1B.js +0 -1
- package/lib/classic/es/provider.js +0 -7617
- package/lib/dist/cjs/gamification-feature2.js +0 -1
- package/lib/dist/es/gamification-feature2.js +0 -285
- package/lib/es/provider.js +0 -7693
|
@@ -0,0 +1,835 @@
|
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useRef as ee, useEffect as H, useCallback as j, useLayoutEffect as Ue, useMemo as _ } from "react";
|
|
3
|
+
import { s as n, c as ue } from "./sl-types.js";
|
|
4
|
+
import { i as le } from "./index8.js";
|
|
5
|
+
import { B as w } from "./index5.js";
|
|
6
|
+
import { Q as i, a as J, c as se, b as Ke } from "./useStreamLayerApp2.js";
|
|
7
|
+
import { O as _e, L as He } from "./index10.js";
|
|
8
|
+
import { d as Ee } from "./index4.js";
|
|
9
|
+
const Qn = /* @__PURE__ */ n("div")({
|
|
10
|
+
name: "SDKContainer",
|
|
11
|
+
class: "sopqfe6",
|
|
12
|
+
propsAsIs: !1
|
|
13
|
+
}), Ge = /* @__PURE__ */ n("div")({
|
|
14
|
+
name: "SDKScrollContainer",
|
|
15
|
+
class: "s102vcph",
|
|
16
|
+
propsAsIs: !1
|
|
17
|
+
}), be = /* @__PURE__ */ n("div")({
|
|
18
|
+
name: "SDKContentContainer",
|
|
19
|
+
class: "s1meqjjv",
|
|
20
|
+
propsAsIs: !1
|
|
21
|
+
}), Je = () => be, we = /* @__PURE__ */ n(Je())({
|
|
22
|
+
name: "SDKWhiteContainer",
|
|
23
|
+
class: "s1burm22",
|
|
24
|
+
propsAsIs: !0
|
|
25
|
+
}), Xe = () => we, Fn = /* @__PURE__ */ n(Xe())({
|
|
26
|
+
name: "SDKSummaryContainer",
|
|
27
|
+
class: "sm5r3j5",
|
|
28
|
+
propsAsIs: !0
|
|
29
|
+
}), Wn = /* @__PURE__ */ n("div")({
|
|
30
|
+
name: "TabsContainer",
|
|
31
|
+
class: "tysxwr6",
|
|
32
|
+
propsAsIs: !1
|
|
33
|
+
}), Ze = () => be, Bn = /* @__PURE__ */ n(Ze())({
|
|
34
|
+
name: "LeaderboardContainer",
|
|
35
|
+
class: "l9er3b1",
|
|
36
|
+
propsAsIs: !0
|
|
37
|
+
}), es = () => we, Yn = /* @__PURE__ */ n(es())({
|
|
38
|
+
name: "TabsNavContainer",
|
|
39
|
+
class: "t19dtrb3",
|
|
40
|
+
propsAsIs: !0
|
|
41
|
+
}), zn = /* @__PURE__ */ n("div")({
|
|
42
|
+
name: "UserSummaryContainer",
|
|
43
|
+
class: "u1552n3j",
|
|
44
|
+
propsAsIs: !1
|
|
45
|
+
});
|
|
46
|
+
var ss = Object.defineProperty, ns = (s, t, r) => t in s ? ss(s, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[t] = r, ts = (s, t, r) => ns(s, t + "", r);
|
|
47
|
+
let is = class {
|
|
48
|
+
constructor() {
|
|
49
|
+
ts(this, "observers", /* @__PURE__ */ new Set());
|
|
50
|
+
}
|
|
51
|
+
subscribe(t) {
|
|
52
|
+
this.observers.add(t);
|
|
53
|
+
}
|
|
54
|
+
unsubscribe(t) {
|
|
55
|
+
this.observers.delete(t);
|
|
56
|
+
}
|
|
57
|
+
notify(t) {
|
|
58
|
+
this.observers.forEach((r) => r(t));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const X = new is(), rs = { hiding: !1, finished: !1 }, os = () => {
|
|
62
|
+
const [s, t] = b(rs), r = ee(null);
|
|
63
|
+
H(() => {
|
|
64
|
+
const p = (h) => {
|
|
65
|
+
t(h);
|
|
66
|
+
};
|
|
67
|
+
return X.subscribe(p), () => {
|
|
68
|
+
X.unsubscribe(p);
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
const l = j((p) => {
|
|
72
|
+
const h = { hiding: !0, finished: !1 };
|
|
73
|
+
r.current && clearTimeout(r.current), p != null && p.delay ? r.current = setTimeout(() => {
|
|
74
|
+
X.notify(h);
|
|
75
|
+
}, p == null ? void 0 : p.delay) : X.notify(h);
|
|
76
|
+
}, []), o = j(() => {
|
|
77
|
+
s.hiding && (r.current = null, X.notify({ hiding: !1, finished: !0 }));
|
|
78
|
+
}, [s.hiding]);
|
|
79
|
+
return {
|
|
80
|
+
...s,
|
|
81
|
+
runAnimation: l,
|
|
82
|
+
onAnimationEnd: o
|
|
83
|
+
};
|
|
84
|
+
}, as = /* @__PURE__ */ n("div")({
|
|
85
|
+
name: "Container",
|
|
86
|
+
class: "c1pgyo67",
|
|
87
|
+
propsAsIs: !1
|
|
88
|
+
}), cs = "sx17qu6", ds = "h1692c5m", ge = ({
|
|
89
|
+
children: s,
|
|
90
|
+
style: t,
|
|
91
|
+
className: r,
|
|
92
|
+
enabled: l = !0,
|
|
93
|
+
hiding: o,
|
|
94
|
+
onAnimationEnd: p
|
|
95
|
+
}) => /* @__PURE__ */ e(as, {
|
|
96
|
+
style: t,
|
|
97
|
+
className: ue(r, l && cs, l && o && ds),
|
|
98
|
+
onAnimationEnd: p,
|
|
99
|
+
children: s
|
|
100
|
+
}), ls = () => ge, ps = /* @__PURE__ */ n(ls())({
|
|
101
|
+
name: "GrowingContainer",
|
|
102
|
+
class: "gck55ev",
|
|
103
|
+
propsAsIs: !0
|
|
104
|
+
}), Pe = ({
|
|
105
|
+
children: s,
|
|
106
|
+
style: t,
|
|
107
|
+
enabled: r,
|
|
108
|
+
animate: l,
|
|
109
|
+
...o
|
|
110
|
+
}) => {
|
|
111
|
+
const p = ee(null);
|
|
112
|
+
return /* @__PURE__ */ e(ps, {
|
|
113
|
+
...o,
|
|
114
|
+
enabled: r && l,
|
|
115
|
+
style: {
|
|
116
|
+
...t,
|
|
117
|
+
...(() => {
|
|
118
|
+
const h = p == null ? void 0 : p.current, f = h && window.getComputedStyle(h), P = f == null ? void 0 : f.getPropertyValue("height");
|
|
119
|
+
return r ? {
|
|
120
|
+
height: l ? P : 0
|
|
121
|
+
} : {};
|
|
122
|
+
})()
|
|
123
|
+
},
|
|
124
|
+
children: /* @__PURE__ */ e("div", {
|
|
125
|
+
ref: p,
|
|
126
|
+
children: s
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
}, us = /* @__PURE__ */ n("div")({
|
|
130
|
+
name: "Container",
|
|
131
|
+
class: "c1gcvmcj",
|
|
132
|
+
propsAsIs: !1
|
|
133
|
+
}), ms = /* @__PURE__ */ n("div")({
|
|
134
|
+
name: "Title",
|
|
135
|
+
class: "tnr592a",
|
|
136
|
+
propsAsIs: !1
|
|
137
|
+
}), hs = /* @__PURE__ */ n("div")({
|
|
138
|
+
name: "Description",
|
|
139
|
+
class: "d1e8jqpv",
|
|
140
|
+
propsAsIs: !1
|
|
141
|
+
}), Is = () => w, vs = /* @__PURE__ */ n(Is())({
|
|
142
|
+
name: "Icon",
|
|
143
|
+
class: "i1vs651k",
|
|
144
|
+
propsAsIs: !0
|
|
145
|
+
}), As = ({ icon: s, title: t, description: r }) => /* @__PURE__ */ d(us, { children: [
|
|
146
|
+
/* @__PURE__ */ e(vs, { name: s }),
|
|
147
|
+
/* @__PURE__ */ e(ms, { children: t }),
|
|
148
|
+
/* @__PURE__ */ e(hs, { children: r })
|
|
149
|
+
] }), ys = () => Pe, fs = /* @__PURE__ */ n(ys())({
|
|
150
|
+
name: "ShowInContainer",
|
|
151
|
+
class: "s16sbdnm",
|
|
152
|
+
propsAsIs: !0
|
|
153
|
+
}), B = /* @__PURE__ */ n("div")({
|
|
154
|
+
name: "FeedbackContainer",
|
|
155
|
+
class: "fbhorgl",
|
|
156
|
+
propsAsIs: !1
|
|
157
|
+
}), ye = "s1g20ja7", Cs = /* @__PURE__ */ n("div")({
|
|
158
|
+
name: "Container",
|
|
159
|
+
class: "c455ozj",
|
|
160
|
+
propsAsIs: !1
|
|
161
|
+
}), Ts = () => w, fe = /* @__PURE__ */ n(Ts())({
|
|
162
|
+
name: "IconPrediction",
|
|
163
|
+
class: "i1913njx",
|
|
164
|
+
propsAsIs: !0
|
|
165
|
+
}), Z = /* @__PURE__ */ n("div")({
|
|
166
|
+
name: "FeedbackIconWrap",
|
|
167
|
+
class: "fzfk69z",
|
|
168
|
+
propsAsIs: !1
|
|
169
|
+
}), ie = /* @__PURE__ */ n("div")({
|
|
170
|
+
name: "FeedbackHeader",
|
|
171
|
+
class: "fx87qaj",
|
|
172
|
+
propsAsIs: !1
|
|
173
|
+
}), $s = /* @__PURE__ */ n("span")({
|
|
174
|
+
name: "FeedbackTitle",
|
|
175
|
+
class: "fvek9ew",
|
|
176
|
+
propsAsIs: !1
|
|
177
|
+
}), Y = /* @__PURE__ */ n("span")({
|
|
178
|
+
name: "FeedbackDescription",
|
|
179
|
+
class: "f1kbtp09",
|
|
180
|
+
propsAsIs: !1
|
|
181
|
+
}), Es = /* @__PURE__ */ n("div")({
|
|
182
|
+
name: "FeedbackTitleWrap",
|
|
183
|
+
class: "f4i8rro",
|
|
184
|
+
propsAsIs: !1
|
|
185
|
+
}), bs = /* @__PURE__ */ n("div")({
|
|
186
|
+
name: "FeedbackResultDescriptionWrap",
|
|
187
|
+
class: "fqyssr",
|
|
188
|
+
propsAsIs: !1
|
|
189
|
+
}), ws = () => Y, gs = /* @__PURE__ */ n(ws())({
|
|
190
|
+
name: "FeedbackDynamicDescription",
|
|
191
|
+
class: "fyv794i",
|
|
192
|
+
propsAsIs: !0
|
|
193
|
+
}), Ps = () => Y, Rs = /* @__PURE__ */ n(Ps())({
|
|
194
|
+
name: "FeedbackResultDescription",
|
|
195
|
+
class: "f1jkj9vx",
|
|
196
|
+
propsAsIs: !0
|
|
197
|
+
}), pe = /* @__PURE__ */ n("div")({
|
|
198
|
+
name: "FeedbackText",
|
|
199
|
+
class: "f1pxh3a6",
|
|
200
|
+
propsAsIs: !1
|
|
201
|
+
}), Ds = /* @__PURE__ */ n("span")({
|
|
202
|
+
name: "DynamicWrap",
|
|
203
|
+
class: "d1afvufn",
|
|
204
|
+
propsAsIs: !1
|
|
205
|
+
}), qs = /* @__PURE__ */ n("div")({
|
|
206
|
+
name: "EarlyFeedbackDescription",
|
|
207
|
+
class: "eq8u24d",
|
|
208
|
+
propsAsIs: !1
|
|
209
|
+
}), Ce = ({
|
|
210
|
+
feedbackMessages: s,
|
|
211
|
+
questionVotedCorrectly: t,
|
|
212
|
+
questionVoted: r,
|
|
213
|
+
questionType: l,
|
|
214
|
+
hasCorrectAnswer: o,
|
|
215
|
+
showExpiredNotification: p,
|
|
216
|
+
showClosedNotificationTrivia: h,
|
|
217
|
+
votedInCurrentRender: f,
|
|
218
|
+
votedAfterQuestionClosed: P,
|
|
219
|
+
voteErrorMessage: I,
|
|
220
|
+
enteredAnActiveQuestion: a,
|
|
221
|
+
marketClosed: R,
|
|
222
|
+
percentsAnimated: E,
|
|
223
|
+
votedAnswer: y,
|
|
224
|
+
isEarlyPrediction: m,
|
|
225
|
+
correctAnswer: q,
|
|
226
|
+
onAnimationEnd: x
|
|
227
|
+
}) => {
|
|
228
|
+
const g = r && (l === i.TRIVIA || l === i.PREDICTION), T = l === i.PREDICTION && !o, N = R && l === i.PREDICTION && !r || l === i.PREDICTION && P && f && a, k = g && T, S = g && o, D = l === i.PREDICTION && r && f && o, O = r && l === i.POLL && f, v = t ? "correct" : "incorrect", V = t ? s == null ? void 0 : s.correctFeedback : s == null ? void 0 : s.incorrectFeedback;
|
|
229
|
+
return p || h || k || S || N || O || D || I ? /* @__PURE__ */ e(
|
|
230
|
+
fs,
|
|
231
|
+
{
|
|
232
|
+
enabled: f,
|
|
233
|
+
animate: !I && p ? !0 : E,
|
|
234
|
+
onAnimationEnd: x,
|
|
235
|
+
children: /* @__PURE__ */ d(Cs, { "data-prediction": T, children: [
|
|
236
|
+
I && !N && /* @__PURE__ */ d(B, { children: [
|
|
237
|
+
!m && /* @__PURE__ */ e(fe, { name: "questionExpired" }),
|
|
238
|
+
/* @__PURE__ */ e(Y, { children: I })
|
|
239
|
+
] }),
|
|
240
|
+
!I && p && /* @__PURE__ */ d(B, { children: [
|
|
241
|
+
!m && /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(w, { name: "questionExpired" }) }),
|
|
242
|
+
/* @__PURE__ */ d("div", { children: [
|
|
243
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Y, { children: "Question Expired" }) }),
|
|
244
|
+
/* @__PURE__ */ e(pe, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
245
|
+
] })
|
|
246
|
+
] }),
|
|
247
|
+
!I && h && /* @__PURE__ */ d(B, { className: ue(ye), children: [
|
|
248
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(w, { name: "questionExpired" }) }),
|
|
249
|
+
/* @__PURE__ */ d("div", { children: [
|
|
250
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Y, { children: "Question Closed" }) }),
|
|
251
|
+
/* @__PURE__ */ e(pe, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
252
|
+
] })
|
|
253
|
+
] }),
|
|
254
|
+
N && /* @__PURE__ */ d(B, { children: [
|
|
255
|
+
!m && /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(w, { name: "questionExpired" }) }),
|
|
256
|
+
/* @__PURE__ */ d("div", { children: [
|
|
257
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(Y, { children: m ? o ? "The results are already in!" : "Question is Closed" : "Question Closed" }) }),
|
|
258
|
+
/* @__PURE__ */ e(pe, { children: m ? /* @__PURE__ */ e(qs, { children: o ? `Correct: ${q == null ? void 0 : q.text}` : "Event affecting the outcome has occurred." }) : "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
259
|
+
] })
|
|
260
|
+
] }),
|
|
261
|
+
!I && k && /* @__PURE__ */ d(B, { children: [
|
|
262
|
+
!m && /* @__PURE__ */ e(fe, { name: "icon-prediction" }),
|
|
263
|
+
/* @__PURE__ */ d(gs, { children: [
|
|
264
|
+
"Your pick has been recorded. ",
|
|
265
|
+
/* @__PURE__ */ e(Ds, { children: "We’ll notify you of the result." })
|
|
266
|
+
] })
|
|
267
|
+
] }),
|
|
268
|
+
!I && O && /* @__PURE__ */ d(B, { children: [
|
|
269
|
+
!m && /* @__PURE__ */ e(Z, { "data-feedback-type": "correct", children: /* @__PURE__ */ e(w, { name: "correct" }) }),
|
|
270
|
+
/* @__PURE__ */ e(Y, { children: "Thanks for answering. Please stay tuned for the next question." })
|
|
271
|
+
] }),
|
|
272
|
+
!I && (S || D) && /* @__PURE__ */ d(B, { className: ue(h && ye), children: [
|
|
273
|
+
!m && /* @__PURE__ */ e(Z, { "data-feedback-type": v, children: /* @__PURE__ */ e(w, { name: v }) }),
|
|
274
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ d(ie, { children: [
|
|
275
|
+
m ? /* @__PURE__ */ e(Es, { children: v === "incorrect" ? /* @__PURE__ */ d(z, { children: [
|
|
276
|
+
/* @__PURE__ */ e("div", { children: "So close!" }),
|
|
277
|
+
/* @__PURE__ */ e("div", { children: "Better luck next time" })
|
|
278
|
+
] }) : /* @__PURE__ */ d(z, { children: [
|
|
279
|
+
/* @__PURE__ */ e("div", { children: "That’s correct!" }),
|
|
280
|
+
/* @__PURE__ */ e("div", { children: "You chose wisely." })
|
|
281
|
+
] }) }) : /* @__PURE__ */ e($s, { "data-feedback-type": v, children: V == null ? void 0 : V.title }),
|
|
282
|
+
m ? /* @__PURE__ */ d(bs, { children: [
|
|
283
|
+
/* @__PURE__ */ d("div", { children: [
|
|
284
|
+
"Your pick: ",
|
|
285
|
+
y == null ? void 0 : y.text
|
|
286
|
+
] }),
|
|
287
|
+
/* @__PURE__ */ e("div", { children: v === "incorrect" ? `Correct: ${q == null ? void 0 : q.text}` : "" })
|
|
288
|
+
] }) : /* @__PURE__ */ e(Rs, { children: V == null ? void 0 : V.description })
|
|
289
|
+
] }) })
|
|
290
|
+
] })
|
|
291
|
+
] })
|
|
292
|
+
}
|
|
293
|
+
) : null;
|
|
294
|
+
}, xs = /* @__PURE__ */ n("div")({
|
|
295
|
+
name: "Container",
|
|
296
|
+
class: "c1hygj0s",
|
|
297
|
+
propsAsIs: !1
|
|
298
|
+
}), ks = /* @__PURE__ */ n("div")({
|
|
299
|
+
name: "Title",
|
|
300
|
+
class: "t1r84tez",
|
|
301
|
+
propsAsIs: !1
|
|
302
|
+
}), Os = /* @__PURE__ */ n("div")({
|
|
303
|
+
name: "Description",
|
|
304
|
+
class: "d1aj1a7k",
|
|
305
|
+
propsAsIs: !1
|
|
306
|
+
}), Ns = /* @__PURE__ */ n("div")({
|
|
307
|
+
name: "AdditionalDescription",
|
|
308
|
+
class: "ax09ezs",
|
|
309
|
+
propsAsIs: !1
|
|
310
|
+
}), Ss = () => w, Vs = /* @__PURE__ */ n(Ss())({
|
|
311
|
+
name: "Icon",
|
|
312
|
+
class: "inkrac",
|
|
313
|
+
propsAsIs: !0
|
|
314
|
+
}), js = ({ icon: s, title: t, description: r, additionalDescription: l }) => /* @__PURE__ */ d(xs, { children: [
|
|
315
|
+
s && /* @__PURE__ */ e(Vs, { name: s }),
|
|
316
|
+
/* @__PURE__ */ e(ks, { children: t }),
|
|
317
|
+
/* @__PURE__ */ e(Os, { children: r }),
|
|
318
|
+
l && /* @__PURE__ */ e(Ns, { children: l })
|
|
319
|
+
] }), Re = /* @__PURE__ */ n("div")({
|
|
320
|
+
name: "Container",
|
|
321
|
+
class: "c14ielyq",
|
|
322
|
+
propsAsIs: !1
|
|
323
|
+
}), Ls = () => Ge, Qs = /* @__PURE__ */ n(Ls())({
|
|
324
|
+
name: "QuestionScrollContainer",
|
|
325
|
+
class: "q1tlqx57",
|
|
326
|
+
propsAsIs: !0
|
|
327
|
+
}), Fs = /* @__PURE__ */ n("div")({
|
|
328
|
+
name: "TopShadow",
|
|
329
|
+
class: "t1hq58md",
|
|
330
|
+
propsAsIs: !1
|
|
331
|
+
}), Ws = /* @__PURE__ */ n("div")({
|
|
332
|
+
name: "BottomShadow",
|
|
333
|
+
class: "b1c8nxcx",
|
|
334
|
+
propsAsIs: !1
|
|
335
|
+
}), Bs = /* @__PURE__ */ n("div")({
|
|
336
|
+
name: "SponsorLogo",
|
|
337
|
+
class: "siozuc3",
|
|
338
|
+
propsAsIs: !1
|
|
339
|
+
}), De = /* @__PURE__ */ n("div")({
|
|
340
|
+
name: "Content",
|
|
341
|
+
class: "cpnc44r",
|
|
342
|
+
propsAsIs: !1
|
|
343
|
+
}), Ys = /* @__PURE__ */ n("div")({
|
|
344
|
+
name: "Title",
|
|
345
|
+
class: "tq7p3w0",
|
|
346
|
+
propsAsIs: !1
|
|
347
|
+
}), zs = /* @__PURE__ */ n("div")({
|
|
348
|
+
name: "OptionsWrap",
|
|
349
|
+
class: "o1jlfj9g",
|
|
350
|
+
propsAsIs: !1
|
|
351
|
+
}), qe = /* @__PURE__ */ n("div")({
|
|
352
|
+
name: "Options",
|
|
353
|
+
class: "o84pmnd",
|
|
354
|
+
propsAsIs: !1
|
|
355
|
+
}), Ms = () => ge, Te = /* @__PURE__ */ n(Ms())({
|
|
356
|
+
name: "AlertContainer",
|
|
357
|
+
class: "a1dybjw9",
|
|
358
|
+
propsAsIs: !0
|
|
359
|
+
}), Us = /* @__PURE__ */ n("div")({
|
|
360
|
+
name: "EarlyPrediction",
|
|
361
|
+
class: "e1l05ict",
|
|
362
|
+
propsAsIs: !1
|
|
363
|
+
}), Ks = () => w, _s = /* @__PURE__ */ n(Ks())({
|
|
364
|
+
name: "EarlyPredictionIcon",
|
|
365
|
+
class: "ez9juex",
|
|
366
|
+
propsAsIs: !0
|
|
367
|
+
}), Hs = () => w, Gs = /* @__PURE__ */ n(Hs())({
|
|
368
|
+
name: "SponsorIcon",
|
|
369
|
+
class: "s8p4aob",
|
|
370
|
+
propsAsIs: !0
|
|
371
|
+
}), Js = /* @__PURE__ */ n("button")({
|
|
372
|
+
name: "ButtonContainer",
|
|
373
|
+
class: "b1b6dl8t",
|
|
374
|
+
propsAsIs: !1
|
|
375
|
+
}), Xs = /* @__PURE__ */ n("div")({
|
|
376
|
+
name: "ButtonPctWrap",
|
|
377
|
+
class: "b4iik8i",
|
|
378
|
+
propsAsIs: !1
|
|
379
|
+
}), Zs = /* @__PURE__ */ n("div")({
|
|
380
|
+
name: "ButtonPct",
|
|
381
|
+
class: "b1gq1lnf",
|
|
382
|
+
propsAsIs: !1
|
|
383
|
+
}), en = /* @__PURE__ */ n("span")({
|
|
384
|
+
name: "ButtonBody",
|
|
385
|
+
class: "b1j65z51",
|
|
386
|
+
propsAsIs: !1
|
|
387
|
+
}), sn = /* @__PURE__ */ n("div")({
|
|
388
|
+
name: "IconContainer",
|
|
389
|
+
class: "i19tpfua",
|
|
390
|
+
propsAsIs: !1
|
|
391
|
+
}), nn = /* @__PURE__ */ n("div")({
|
|
392
|
+
name: "IconWrap",
|
|
393
|
+
class: "i1tubmma",
|
|
394
|
+
propsAsIs: !1
|
|
395
|
+
}), xe = /* @__PURE__ */ n("img")({
|
|
396
|
+
name: "Icon",
|
|
397
|
+
class: "i1grrgwj",
|
|
398
|
+
propsAsIs: !1
|
|
399
|
+
}), tn = () => xe, rn = /* @__PURE__ */ n(tn())({
|
|
400
|
+
name: "IconDefault",
|
|
401
|
+
class: "ibemyq8",
|
|
402
|
+
propsAsIs: !0
|
|
403
|
+
}), on = () => xe, an = /* @__PURE__ */ n(on())({
|
|
404
|
+
name: "IconCircle",
|
|
405
|
+
class: "i1dceht",
|
|
406
|
+
propsAsIs: !0
|
|
407
|
+
}), cn = /* @__PURE__ */ n("span")({
|
|
408
|
+
name: "Title",
|
|
409
|
+
class: "t116q4vq",
|
|
410
|
+
propsAsIs: !1
|
|
411
|
+
}), dn = /* @__PURE__ */ n("span")({
|
|
412
|
+
name: "Indicators",
|
|
413
|
+
class: "i17ajcu2",
|
|
414
|
+
propsAsIs: !1
|
|
415
|
+
}), ln = /* @__PURE__ */ n("div")({
|
|
416
|
+
name: "PtsWrap",
|
|
417
|
+
class: "pu9kmlb",
|
|
418
|
+
propsAsIs: !1
|
|
419
|
+
}), pn = /* @__PURE__ */ n("span")({
|
|
420
|
+
name: "Pts",
|
|
421
|
+
class: "p1j2j0s0",
|
|
422
|
+
propsAsIs: !1
|
|
423
|
+
}), un = /* @__PURE__ */ n("span")({
|
|
424
|
+
name: "Percentage",
|
|
425
|
+
class: "p1mzj1sj",
|
|
426
|
+
propsAsIs: !1
|
|
427
|
+
}), mn = () => w, hn = /* @__PURE__ */ n(mn())({
|
|
428
|
+
name: "CheckIcon",
|
|
429
|
+
class: "cichgz8",
|
|
430
|
+
propsAsIs: !0
|
|
431
|
+
}), $e = {
|
|
432
|
+
[J.CENTERED]: (s) => /* @__PURE__ */ e(rn, { "data-testid": "vote-icon", alt: "option-icon", src: s }),
|
|
433
|
+
[J.TRANSPARENT]: (s) => /* @__PURE__ */ e(sn, { "data-testid": "vote-icon", children: /* @__PURE__ */ e(nn, { style: { backgroundImage: `url(${s})` } }) }),
|
|
434
|
+
[J.ROUNDED]: (s) => /* @__PURE__ */ e(an, { "data-testid": "vote-icon", alt: "option-icon", src: s }),
|
|
435
|
+
[J.NONE]: () => null,
|
|
436
|
+
[J.UNSET]: () => null
|
|
437
|
+
}, In = ({ questionType: s, hasCorrectAnswer: t, correct: r, youVoted: l, questionVoted: o }) => {
|
|
438
|
+
if (s === i.POLL && l)
|
|
439
|
+
return "voted";
|
|
440
|
+
if (s === i.PREDICTION) {
|
|
441
|
+
if (!t && o)
|
|
442
|
+
return l ? "voted" : "unset";
|
|
443
|
+
if (t && o)
|
|
444
|
+
return l ? r ? "correct" : "incorrect" : "unset";
|
|
445
|
+
if (l)
|
|
446
|
+
return "correct";
|
|
447
|
+
}
|
|
448
|
+
return s === i.TRIVIA && o && l ? r ? "correct" : "incorrect" : "unset";
|
|
449
|
+
}, vn = ({
|
|
450
|
+
questionType: s,
|
|
451
|
+
questionVoted: t,
|
|
452
|
+
correct: r,
|
|
453
|
+
hasCorrectAnswer: l,
|
|
454
|
+
questionStatus: o
|
|
455
|
+
}) => s === i.TRIVIA ? t && r : s === i.PREDICTION ? t && r && l || o === se.RESOLVED && r : !1, An = _e(Js), yn = (s) => {
|
|
456
|
+
var t;
|
|
457
|
+
const {
|
|
458
|
+
// option props
|
|
459
|
+
id: r,
|
|
460
|
+
icon: l,
|
|
461
|
+
text: o,
|
|
462
|
+
percentageDecimal: p,
|
|
463
|
+
points: h,
|
|
464
|
+
// extra props
|
|
465
|
+
onVote: f,
|
|
466
|
+
markThatVoted: P,
|
|
467
|
+
firstOption: I,
|
|
468
|
+
onPercentsAnimated: a,
|
|
469
|
+
youSelected: R,
|
|
470
|
+
youVoted: E,
|
|
471
|
+
questionVoted: y,
|
|
472
|
+
imageMode: m,
|
|
473
|
+
answerTimeExpired: q,
|
|
474
|
+
questionStatus: x,
|
|
475
|
+
isLoading: g,
|
|
476
|
+
questionType: T,
|
|
477
|
+
correct: N,
|
|
478
|
+
hasCorrectAnswer: k,
|
|
479
|
+
marketClosed: S,
|
|
480
|
+
isEarlyPrediction: D,
|
|
481
|
+
isAd: O,
|
|
482
|
+
webos: v
|
|
483
|
+
} = s, [V, M] = b(0), G = In(s), ne = vn({ questionType: T, questionVoted: y, correct: N, hasCorrectAnswer: k, questionStatus: x }), L = S && T === i.PREDICTION, Q = y || L, re = T === i.PREDICTION && !y && !S && !O, F = y && !R && G !== "incorrect" && !E;
|
|
484
|
+
return Ue(() => {
|
|
485
|
+
M(0), requestAnimationFrame(() => {
|
|
486
|
+
M(p);
|
|
487
|
+
});
|
|
488
|
+
}, [p]), /* @__PURE__ */ d(
|
|
489
|
+
An,
|
|
490
|
+
{
|
|
491
|
+
value: r,
|
|
492
|
+
webos: v,
|
|
493
|
+
autoFocus: I,
|
|
494
|
+
"data-selected": R,
|
|
495
|
+
"data-answer-state": G,
|
|
496
|
+
disabled: y || g || q || L,
|
|
497
|
+
"data-is-not-checked": F,
|
|
498
|
+
"data-a": "intr",
|
|
499
|
+
onClick: (te) => {
|
|
500
|
+
P(
|
|
501
|
+
T === i.PREDICTION ? S : x === se.RESOLVED
|
|
502
|
+
), f(te);
|
|
503
|
+
},
|
|
504
|
+
"data-is-ad": O,
|
|
505
|
+
children: [
|
|
506
|
+
/* @__PURE__ */ e(Xs, { children: /* @__PURE__ */ e(
|
|
507
|
+
Zs,
|
|
508
|
+
{
|
|
509
|
+
"data-answer-state": G,
|
|
510
|
+
"data-is-not-checked": F,
|
|
511
|
+
style: { width: `${Q ? V : 0}%` },
|
|
512
|
+
onTransitionEnd: () => {
|
|
513
|
+
L || a == null || a();
|
|
514
|
+
},
|
|
515
|
+
"data-is-ad": O
|
|
516
|
+
}
|
|
517
|
+
) }),
|
|
518
|
+
/* @__PURE__ */ d(en, { "data-a": "intr", children: [
|
|
519
|
+
l && m && ((t = $e[m]) == null ? void 0 : t.call($e, l)),
|
|
520
|
+
/* @__PURE__ */ e(cn, { "data-a": "intr", children: o }),
|
|
521
|
+
re && /* @__PURE__ */ d(ln, { children: [
|
|
522
|
+
h,
|
|
523
|
+
/* @__PURE__ */ e(pn, { children: "pts" })
|
|
524
|
+
] }),
|
|
525
|
+
Q && /* @__PURE__ */ d(dn, { children: [
|
|
526
|
+
ne && /* @__PURE__ */ e(hn, { name: D ? "selectedBetPack" : "selected" }),
|
|
527
|
+
/* @__PURE__ */ e(un, { children: /* @__PURE__ */ e(Ee, { value: p, suffix: "%" }) })
|
|
528
|
+
] })
|
|
529
|
+
] })
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
);
|
|
533
|
+
}, fn = () => Pe, Cn = /* @__PURE__ */ n(fn())({
|
|
534
|
+
name: "ShowInContainer",
|
|
535
|
+
class: "sie6cqo",
|
|
536
|
+
propsAsIs: !0
|
|
537
|
+
}), Tn = /* @__PURE__ */ n("div")({
|
|
538
|
+
name: "WinBarContainer",
|
|
539
|
+
class: "wgizw4u",
|
|
540
|
+
propsAsIs: !1
|
|
541
|
+
}), $n = /* @__PURE__ */ n("div")({
|
|
542
|
+
name: "Content",
|
|
543
|
+
class: "c1l3ucjp",
|
|
544
|
+
propsAsIs: !1
|
|
545
|
+
}), En = /* @__PURE__ */ n("div")({
|
|
546
|
+
name: "Title",
|
|
547
|
+
class: "tx7j799",
|
|
548
|
+
propsAsIs: !1
|
|
549
|
+
}), bn = () => w, wn = /* @__PURE__ */ n(bn())({
|
|
550
|
+
name: "WinIcon",
|
|
551
|
+
class: "w4lwuj0",
|
|
552
|
+
propsAsIs: !0
|
|
553
|
+
}), gn = /* @__PURE__ */ n("div")({
|
|
554
|
+
name: "Points",
|
|
555
|
+
class: "po9i64o",
|
|
556
|
+
propsAsIs: !1
|
|
557
|
+
}), Pn = /* @__PURE__ */ n("span")({
|
|
558
|
+
name: "PointsCount",
|
|
559
|
+
class: "pe5g05h",
|
|
560
|
+
propsAsIs: !1
|
|
561
|
+
}), Rn = /* @__PURE__ */ n("span")({
|
|
562
|
+
name: "PointsUnits",
|
|
563
|
+
class: "p1hdtpmb",
|
|
564
|
+
propsAsIs: !1
|
|
565
|
+
}), Dn = ({
|
|
566
|
+
title: s,
|
|
567
|
+
points: t,
|
|
568
|
+
isPlayingTimer: r,
|
|
569
|
+
isTimer: l,
|
|
570
|
+
animatePoints: o,
|
|
571
|
+
questionType: p,
|
|
572
|
+
timerDuration: h,
|
|
573
|
+
votedInCurrentRender: f,
|
|
574
|
+
percentsAnimated: P,
|
|
575
|
+
onTimerExpired: I
|
|
576
|
+
}) => /* @__PURE__ */ e(
|
|
577
|
+
Cn,
|
|
578
|
+
{
|
|
579
|
+
enabled: p === i.PREDICTION && f,
|
|
580
|
+
animate: P,
|
|
581
|
+
children: /* @__PURE__ */ d(
|
|
582
|
+
Tn,
|
|
583
|
+
{
|
|
584
|
+
style: {
|
|
585
|
+
justifyContent: p === i.PREDICTION ? "center" : "space-between"
|
|
586
|
+
},
|
|
587
|
+
children: [
|
|
588
|
+
/* @__PURE__ */ d($n, { children: [
|
|
589
|
+
s && /* @__PURE__ */ e(En, { children: s }),
|
|
590
|
+
t !== void 0 && p !== i.POLL && /* @__PURE__ */ d(z, { children: [
|
|
591
|
+
/* @__PURE__ */ e(wn, { name: "icon-trophy" }),
|
|
592
|
+
/* @__PURE__ */ d(gn, { children: [
|
|
593
|
+
/* @__PURE__ */ e(Pn, { children: o ? /* @__PURE__ */ e(Ee, { value: t, delay: 0.3 }) : t }),
|
|
594
|
+
/* @__PURE__ */ e(Rn, { children: "PTS" })
|
|
595
|
+
] })
|
|
596
|
+
] })
|
|
597
|
+
] }),
|
|
598
|
+
l && p !== i.PREDICTION && /* @__PURE__ */ e(He, { isPlaying: r, onTimerExpired: I, duration: h })
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
)
|
|
602
|
+
}
|
|
603
|
+
), qn = (s, t) => {
|
|
604
|
+
switch (s) {
|
|
605
|
+
case "already_voted":
|
|
606
|
+
return t === i.POLL ? "You’ve already answered this question on another device." : "You’ve already answered this question on another device. So the points for this answer won't tally.";
|
|
607
|
+
default:
|
|
608
|
+
return "Something went wrong, please try again";
|
|
609
|
+
}
|
|
610
|
+
}, Un = () => /* @__PURE__ */ e(Re, { children: /* @__PURE__ */ d(De, { children: [
|
|
611
|
+
/* @__PURE__ */ e(le, { loading: !0, style: { height: "40px", borderRadius: "100px" } }),
|
|
612
|
+
/* @__PURE__ */ e(le, { loading: !0, style: { height: "24px", margin: "16px 0" } }),
|
|
613
|
+
/* @__PURE__ */ e(qe, { children: Array.from({ length: 5 }).map((s, t) => /* @__PURE__ */ e(le, { loading: !0, style: { height: "44px" } }, t)) })
|
|
614
|
+
] }) }), Kn = ({
|
|
615
|
+
openedQuestion: s,
|
|
616
|
+
isLoading: t,
|
|
617
|
+
vote: r,
|
|
618
|
+
close: l,
|
|
619
|
+
isEarlyPrediction: o,
|
|
620
|
+
mastersApp: p,
|
|
621
|
+
webos: h
|
|
622
|
+
}) => {
|
|
623
|
+
var f, P;
|
|
624
|
+
const I = s.subject, a = s.type, R = s.status, E = (f = s.options) == null ? void 0 : f.options, y = s.marketClosed, m = s.id, q = ee(), x = ee(), g = p ? !1 : (s == null ? void 0 : s.adUnit) === Ke.STANDART, [T, N] = b(!1), [k, S] = b(!1), [D, O] = b(!0), [v, V] = b(!1), [M, G] = b(!1), [ne, L] = b(""), [Q, re] = b(""), [F, te] = b(!1), [ke, Oe] = b(!1), [me, Ne] = b(!1), { runAnimation: U, finished: he } = os();
|
|
625
|
+
H(() => {
|
|
626
|
+
he && l(m);
|
|
627
|
+
}, [l, he]), H(() => {
|
|
628
|
+
a === i.PREDICTION ? y && O(!1) : R === se.RESOLVED && O(!1);
|
|
629
|
+
}, []);
|
|
630
|
+
const Se = j((u) => {
|
|
631
|
+
S(u), N(!0);
|
|
632
|
+
}, []), Ve = j(() => {
|
|
633
|
+
o && N(!1);
|
|
634
|
+
}, [o]), oe = ee(!1), Ie = j(() => {
|
|
635
|
+
x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
636
|
+
Ne(!0), U({ delay: 5500 });
|
|
637
|
+
}, 4e3);
|
|
638
|
+
}, [U]), ve = j(
|
|
639
|
+
async (u) => {
|
|
640
|
+
if (!oe.current && (oe.current = !0, m)) {
|
|
641
|
+
const $ = u.currentTarget.value;
|
|
642
|
+
L($);
|
|
643
|
+
try {
|
|
644
|
+
await r(m, $), g && Ie();
|
|
645
|
+
} catch (K) {
|
|
646
|
+
re(qn(K.message, a)), L(""), console.error("Error while voting", K), oe.current = !1;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
[a, m, L, r, g, Ie]
|
|
651
|
+
), je = j(() => {
|
|
652
|
+
V(!0), U({ delay: 3500 });
|
|
653
|
+
}, [U]), Le = j(() => {
|
|
654
|
+
G(!0), U({ delay: 3500 });
|
|
655
|
+
}, [U]), c = s == null ? void 0 : s.answers.find((u) => u.youVoted === !0), C = _(
|
|
656
|
+
() => !!(s != null && s.answers.find((u) => u.correct === !0)),
|
|
657
|
+
[s]
|
|
658
|
+
), A = _(
|
|
659
|
+
() => s == null ? void 0 : s.answers.find((u) => u.correct === !0),
|
|
660
|
+
[s]
|
|
661
|
+
);
|
|
662
|
+
H(() => {
|
|
663
|
+
c && T && !ke && (q.current = setTimeout(Le, 1e4), Oe(!0));
|
|
664
|
+
}, [c]), H(() => () => {
|
|
665
|
+
clearTimeout(q.current), clearTimeout(x.current);
|
|
666
|
+
}, []);
|
|
667
|
+
const ae = _(() => s ? s.answers.map((u) => {
|
|
668
|
+
var $;
|
|
669
|
+
return {
|
|
670
|
+
...u,
|
|
671
|
+
questionVoted: !!c,
|
|
672
|
+
youSelected: ne === u.id,
|
|
673
|
+
isLoading: t,
|
|
674
|
+
hasCorrectAnswer: C,
|
|
675
|
+
questionType: s.type,
|
|
676
|
+
answerTimeExpired: v,
|
|
677
|
+
questionStatus: R,
|
|
678
|
+
imageMode: ($ = s.appearance) == null ? void 0 : $.images,
|
|
679
|
+
onVote: ve
|
|
680
|
+
};
|
|
681
|
+
}) : [], [
|
|
682
|
+
C,
|
|
683
|
+
v,
|
|
684
|
+
t,
|
|
685
|
+
s,
|
|
686
|
+
c,
|
|
687
|
+
R,
|
|
688
|
+
ve,
|
|
689
|
+
ne
|
|
690
|
+
]);
|
|
691
|
+
H(() => {
|
|
692
|
+
const u = ae.some(({ percentageDecimal: K }) => K !== 0), $ = c && a === i.PREDICTION;
|
|
693
|
+
Q && (o || !u || y && $) && te(!0);
|
|
694
|
+
}, [ae, Q, o, y, a, c]);
|
|
695
|
+
const Ae = E && (E.case === "trivia" || E.case === "prediction") ? E.value : void 0, W = R === se.RESOLVED && a === i.TRIVIA && !c && !D, ce = a === i.TRIVIA && k, de = _(() => g ? !1 : a === i.PREDICTION ? o ? !1 : !!(c && !C || c && C && A != null && A.youVoted) : !0, [a, c, C, A, o, g]), Qe = _(() => {
|
|
696
|
+
if (a === i.PREDICTION && c && (!C || C && A != null && A.youVoted))
|
|
697
|
+
return c.points;
|
|
698
|
+
if (!(W || v))
|
|
699
|
+
return c ? c.correct ? c.pointsEarned : 0 : A == null ? void 0 : A.points;
|
|
700
|
+
}, [v, c, A, W, a, C]), Fe = _(() => a === i.PREDICTION && c ? C ? C && A != null && A.youVoted ? "You won" : "" : "To win" : W || v ? "Time expired" : a === i.POLL ? "Time remaining" : c ? "You won" : "To win", [v, a, c, W, C, A]), We = !de || de && a === i.PREDICTION && T && !F, Be = (a === i.TRIVIA || a === i.PREDICTION) && c && C && (A == null ? void 0 : A.youVoted), Ye = c || W || ce || a === i.TRIVIA && R === se.RESOLVED && D, ze = !o && (v || M) || me, Me = () => {
|
|
701
|
+
const u = () => a === i.TRIVIA ? c != null && c.correct ? `That's correct!
|
|
702
|
+
You chose wisely.` : `So close!
|
|
703
|
+
Better luck next time.` : a === i.POLL ? `Thanks for answering.
|
|
704
|
+
Please stay tuned for the next question.` : a === i.PREDICTION ? "Stay tuned to see if your prediction was correct." : "", $ = () => a === i.TRIVIA ? `Your Pick: ${A == null ? void 0 : A.text}` : a === i.POLL || a === i.PREDICTION ? `Your Pick: ${c == null ? void 0 : c.text}` : "", K = () => a === i.TRIVIA && (E == null ? void 0 : E.case) === "trivia" ? E == null ? void 0 : E.value.explanation : a === i.PREDICTION ? I : "";
|
|
705
|
+
return me ? /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(
|
|
706
|
+
js,
|
|
707
|
+
{
|
|
708
|
+
title: u(),
|
|
709
|
+
description: $(),
|
|
710
|
+
...c != null && c.correct || a === i.POLL || a === i.PREDICTION ? { icon: "icon-correct" } : {},
|
|
711
|
+
...a === i.TRIVIA || a === i.PREDICTION ? { additionalDescription: K() } : {}
|
|
712
|
+
}
|
|
713
|
+
) }) : !o && (v || M) ? /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(
|
|
714
|
+
As,
|
|
715
|
+
{
|
|
716
|
+
icon: "icon-check-circle",
|
|
717
|
+
title: "More to come...",
|
|
718
|
+
description: M ? /* @__PURE__ */ d(z, { children: [
|
|
719
|
+
"Stay tuned for more questions ",
|
|
720
|
+
/* @__PURE__ */ e("br", {}),
|
|
721
|
+
" and insights."
|
|
722
|
+
] }) : /* @__PURE__ */ d(z, { children: [
|
|
723
|
+
"Watch for additional enhanced stream ",
|
|
724
|
+
/* @__PURE__ */ e("br", {}),
|
|
725
|
+
" interactive experience."
|
|
726
|
+
] })
|
|
727
|
+
}
|
|
728
|
+
) }) : null;
|
|
729
|
+
};
|
|
730
|
+
return /* @__PURE__ */ d(Qs, { children: [
|
|
731
|
+
o && /* @__PURE__ */ e(Fs, {}),
|
|
732
|
+
/* @__PURE__ */ e(Re, { style: o ? { marginTop: "-40px" } : {}, children: /* @__PURE__ */ d(De, { children: [
|
|
733
|
+
!o && !g && /* @__PURE__ */ e(
|
|
734
|
+
Ce,
|
|
735
|
+
{
|
|
736
|
+
feedbackMessages: Ae,
|
|
737
|
+
questionVoted: !!c,
|
|
738
|
+
questionVotedCorrectly: c == null ? void 0 : c.correct,
|
|
739
|
+
questionType: a,
|
|
740
|
+
hasCorrectAnswer: C,
|
|
741
|
+
showExpiredNotification: W,
|
|
742
|
+
showClosedNotificationTrivia: ce,
|
|
743
|
+
votedInCurrentRender: T,
|
|
744
|
+
votedAfterQuestionClosed: k,
|
|
745
|
+
enteredAnActiveQuestion: D,
|
|
746
|
+
marketClosed: y,
|
|
747
|
+
percentsAnimated: F,
|
|
748
|
+
voteErrorMessage: Q,
|
|
749
|
+
votedAnswer: c
|
|
750
|
+
}
|
|
751
|
+
),
|
|
752
|
+
de && /* @__PURE__ */ e(
|
|
753
|
+
Dn,
|
|
754
|
+
{
|
|
755
|
+
title: Fe,
|
|
756
|
+
points: Qe,
|
|
757
|
+
onTimerExpired: je,
|
|
758
|
+
questionType: s.type,
|
|
759
|
+
isTimer: !t,
|
|
760
|
+
isPlayingTimer: !c,
|
|
761
|
+
animatePoints: Be,
|
|
762
|
+
timerDuration: Ye ? 0 : Number(((P = s == null ? void 0 : s.appearance) == null ? void 0 : P.autoHideInterval) || "30"),
|
|
763
|
+
votedInCurrentRender: T,
|
|
764
|
+
percentsAnimated: F
|
|
765
|
+
}
|
|
766
|
+
),
|
|
767
|
+
ze ? Me() : /* @__PURE__ */ d(z, { children: [
|
|
768
|
+
o && /* @__PURE__ */ d(Us, { children: [
|
|
769
|
+
/* @__PURE__ */ e(_s, { name: "iconEarlyPrediction" }),
|
|
770
|
+
"EARLY PREDICTION"
|
|
771
|
+
] }),
|
|
772
|
+
/* @__PURE__ */ e(Ys, { style: We ? { marginTop: 0 } : {}, children: I }),
|
|
773
|
+
o && /* @__PURE__ */ e(
|
|
774
|
+
Ce,
|
|
775
|
+
{
|
|
776
|
+
feedbackMessages: Ae,
|
|
777
|
+
questionVoted: !!c,
|
|
778
|
+
questionVotedCorrectly: c == null ? void 0 : c.correct,
|
|
779
|
+
questionType: a,
|
|
780
|
+
hasCorrectAnswer: C,
|
|
781
|
+
showExpiredNotification: W,
|
|
782
|
+
showClosedNotificationTrivia: ce,
|
|
783
|
+
votedInCurrentRender: T,
|
|
784
|
+
votedAfterQuestionClosed: k,
|
|
785
|
+
enteredAnActiveQuestion: D,
|
|
786
|
+
marketClosed: y,
|
|
787
|
+
percentsAnimated: F,
|
|
788
|
+
voteErrorMessage: Q,
|
|
789
|
+
isEarlyPrediction: o,
|
|
790
|
+
correctAnswer: A,
|
|
791
|
+
votedAnswer: c,
|
|
792
|
+
onAnimationEnd: Ve
|
|
793
|
+
}
|
|
794
|
+
),
|
|
795
|
+
/* @__PURE__ */ d(zs, { children: [
|
|
796
|
+
/* @__PURE__ */ e(qe, { children: ae.sort((u, $) => u.id > $.id ? 1 : -1).map((u, $) => /* @__PURE__ */ e(
|
|
797
|
+
yn,
|
|
798
|
+
{
|
|
799
|
+
...u,
|
|
800
|
+
firstOption: $ === 0,
|
|
801
|
+
markThatVoted: Se,
|
|
802
|
+
onPercentsAnimated: () => te(!0),
|
|
803
|
+
votedAfterQuestionClosed: k,
|
|
804
|
+
enteredAnActiveQuestion: D,
|
|
805
|
+
marketClosed: y,
|
|
806
|
+
isEarlyPrediction: o,
|
|
807
|
+
isAd: g,
|
|
808
|
+
webos: h
|
|
809
|
+
},
|
|
810
|
+
u.id
|
|
811
|
+
)) }),
|
|
812
|
+
o && /* @__PURE__ */ d(z, { children: [
|
|
813
|
+
/* @__PURE__ */ e(Ws, {}),
|
|
814
|
+
/* @__PURE__ */ e(Bs, { children: /* @__PURE__ */ e(Gs, { name: "mastersLogoWhite" }) })
|
|
815
|
+
] })
|
|
816
|
+
] })
|
|
817
|
+
] })
|
|
818
|
+
] }) })
|
|
819
|
+
] });
|
|
820
|
+
};
|
|
821
|
+
export {
|
|
822
|
+
Bn as C,
|
|
823
|
+
Yn as S,
|
|
824
|
+
os as a,
|
|
825
|
+
we as b,
|
|
826
|
+
Ge as c,
|
|
827
|
+
zn as d,
|
|
828
|
+
Kn as e,
|
|
829
|
+
ge as f,
|
|
830
|
+
Wn as l,
|
|
831
|
+
Fn as m,
|
|
832
|
+
be as n,
|
|
833
|
+
Qn as p,
|
|
834
|
+
Un as t
|
|
835
|
+
};
|