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