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