@streamlayer/react 0.35.0 → 0.37.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,843 +1,846 @@
1
- import { jsxs as a, jsx as s, Fragment as z } from "react/jsx-runtime";
2
- import { s as t, c as A } from "./index4.js";
3
- import { useStore as Q } from "@nanostores/react";
4
- import { o as Me, i as Ee, w as ve, j as Ie, O as Oe, c as Le, p as Ce, C as ke, n as pe, e as Se, l as fe, P as oe, x as we } from "./masters2.js";
5
- import { QuestionType as M, QuestionStatus as C, QuestionImages as q, PickHistoryStatus as W } from "@streamlayer/sdk-web-types";
6
- import { useState as L, useCallback as V, useEffect as K, useMemo as v, PureComponent as Qe, useTransition as be } from "react";
1
+ import { jsxs as a, jsx as s, Fragment as E } from "react/jsx-runtime";
2
+ import { s as o, c as $ } from "./useSdkFeature.js";
3
+ import { useStore as L } from "@nanostores/react";
4
+ import { useState as N, useCallback as B, useEffect as G, useMemo as q, PureComponent as Te, useTransition as ke, useRef as Se } from "react";
5
+ import { o as ue, c as xe, w as qe, j as me, E as Ee, K as Ne, a as Le, p as De, C as Ve, n as he, b as Pe, l as Oe, Y as ie, d as Me } from "./masters2.js";
6
+ import { QuestionType as h, QuestionStatus as D, QuestionImages as U, PickHistoryStatus as F } from "@streamlayer/sdk-web-types";
7
7
  import { d as X } from "./index3.js";
8
8
  import "react-countup";
9
- import { CountdownCircleTimer as $e } from "react-countdown-circle-timer";
10
- import { E as w } from "./index2.js";
11
- import Ye from "react-infinite-scroller";
9
+ import { CountdownCircleTimer as Qe } from "react-countdown-circle-timer";
10
+ import { E as P } from "./index2.js";
11
+ import _e from "react-infinite-scroller";
12
12
  import "@streamlayer/sdk-web-interfaces";
13
13
  import "@streamlayer/sdk-web-notifications";
14
14
  import "lodash.throttle";
15
15
  import "./useStreamLayerApp.js";
16
16
  import "@streamlayer/sdk-web";
17
- const Ue = /* @__PURE__ */ t("div")({
17
+ const Ue = /* @__PURE__ */ o("div")({
18
18
  name: "Container",
19
19
  class: "c1vwopgc",
20
20
  propsAsIs: !1
21
- }), Re = /* @__PURE__ */ t("div")({
21
+ }), je = /* @__PURE__ */ o("div")({
22
22
  name: "QuestionTypeWrap",
23
23
  class: "qyktpt0",
24
24
  propsAsIs: !1
25
- }), qe = () => A, Pe = /* @__PURE__ */ t(qe())({
25
+ }), Be = () => $, ze = /* @__PURE__ */ o(Be())({
26
26
  name: "QuestionTypeIcon",
27
27
  class: "q951jdx",
28
28
  propsAsIs: !0
29
- }), Ve = /* @__PURE__ */ t("span")({
29
+ }), Fe = /* @__PURE__ */ o("span")({
30
30
  name: "QuestionTypeTitle",
31
31
  class: "qss5f0e",
32
32
  propsAsIs: !1
33
- }), _e = /* @__PURE__ */ t("button")({
33
+ }), He = /* @__PURE__ */ o("button")({
34
34
  name: "CloseButton",
35
35
  class: "c1ao1jtv",
36
36
  propsAsIs: !1
37
- }), We = () => A, Be = /* @__PURE__ */ t(We())({
37
+ }), We = () => $, Ye = /* @__PURE__ */ o(We())({
38
38
  name: "CloseIcon",
39
39
  class: "cvsl7l3",
40
40
  propsAsIs: !0
41
- }), Ne = ({ type: e, close: n, label: i }) => {
42
- const r = e ? Me[e] : { label: i, iconName: void 0 };
41
+ }), Ie = ({ type: e, close: n, label: t }) => {
42
+ const i = e ? ue[e] : { label: t, iconName: void 0 };
43
43
  return /* @__PURE__ */ a(Ue, { children: [
44
- /* @__PURE__ */ a(Re, { children: [
45
- (r == null ? void 0 : r.iconName) && /* @__PURE__ */ s(
46
- Pe,
44
+ /* @__PURE__ */ a(je, { children: [
45
+ (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
46
+ ze,
47
47
  {
48
- "data-type-trivia": e === M.TRIVIA,
49
- "data-type-poll": e === M.POLL,
50
- name: r.iconName
48
+ "data-type-trivia": e === h.TRIVIA,
49
+ "data-type-poll": e === h.POLL,
50
+ name: i.iconName
51
51
  }
52
52
  ),
53
- (r == null ? void 0 : r.label) && /* @__PURE__ */ s(Ve, { children: r.label })
53
+ (i == null ? void 0 : i.label) && /* @__PURE__ */ s(Fe, { children: i.label })
54
54
  ] }),
55
- /* @__PURE__ */ s(_e, { onClick: n, children: /* @__PURE__ */ s(Be, { name: "icon-cross" }) })
55
+ /* @__PURE__ */ s(He, { onClick: n, children: /* @__PURE__ */ s(Ye, { name: "icon-cross" }) })
56
56
  ] });
57
- }, De = (e) => e.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), Te = (e) => e ? e.toLocaleString("en-US") : "0", ee = (e) => e.toLocaleDateString("en-US", {
57
+ }, ve = (e) => e.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), Ce = (e) => e ? e.toLocaleString("en-US") : "0", ee = (e) => e.toLocaleDateString("en-US", {
58
58
  weekday: "short",
59
59
  month: "short",
60
60
  day: "numeric"
61
61
  }), se = (e) => e.toLocaleTimeString("en-US", {
62
62
  hour: "2-digit",
63
63
  minute: "2-digit"
64
- }), ne = (e) => !isNaN(e.getTime()), Ze = /* @__PURE__ */ t("div")({
64
+ }), ne = (e) => !isNaN(e.getTime()), Ze = /* @__PURE__ */ o("div")({
65
65
  name: "Container",
66
66
  class: "c1zy8a",
67
67
  propsAsIs: !1
68
- }), Fe = /* @__PURE__ */ t("div")({
68
+ }), Ge = /* @__PURE__ */ o("div")({
69
69
  name: "Title",
70
70
  class: "t1vih9p5",
71
71
  propsAsIs: !1
72
- }), Ge = /* @__PURE__ */ t("div")({
72
+ }), Ke = /* @__PURE__ */ o("div")({
73
73
  name: "Indicator",
74
74
  class: "i1fbnvpb",
75
75
  propsAsIs: !1
76
76
  }), re = ({ indicator: e, title: n }) => /* @__PURE__ */ a(Ze, { children: [
77
- /* @__PURE__ */ s(Fe, { children: n }),
78
- /* @__PURE__ */ s(Ge, { children: e })
79
- ] }), He = /* @__PURE__ */ t("div")({
77
+ /* @__PURE__ */ s(Ge, { children: n }),
78
+ /* @__PURE__ */ s(Ke, { children: e })
79
+ ] }), Je = /* @__PURE__ */ o("div")({
80
80
  name: "Container",
81
81
  class: "ctmhwyc",
82
82
  propsAsIs: !1
83
- }), Je = /* @__PURE__ */ t("div")({
83
+ }), Xe = /* @__PURE__ */ o("div")({
84
84
  name: "Indicator",
85
85
  class: "i1jri200",
86
86
  propsAsIs: !1
87
- }), Xe = /* @__PURE__ */ t("div")({
87
+ }), es = /* @__PURE__ */ o("div")({
88
88
  name: "Title",
89
89
  class: "t8s05oq",
90
90
  propsAsIs: !1
91
- }), B = ({ indicator: e, title: n }) => /* @__PURE__ */ a(He, { children: [
92
- /* @__PURE__ */ s(Je, { children: e }),
93
- /* @__PURE__ */ s(Xe, { children: n })
94
- ] }), Ke = /* @__PURE__ */ t("div")({
91
+ }), H = ({ indicator: e, title: n }) => /* @__PURE__ */ a(Je, { children: [
92
+ /* @__PURE__ */ s(Xe, { children: e }),
93
+ /* @__PURE__ */ s(es, { children: n })
94
+ ] }), ss = /* @__PURE__ */ o("div")({
95
95
  name: "Container",
96
96
  class: "c1yrpn9o",
97
97
  propsAsIs: !1
98
- }), es = /* @__PURE__ */ t("div")({
98
+ }), ns = /* @__PURE__ */ o("div")({
99
99
  name: "TopInfo",
100
100
  class: "t17fwahh",
101
101
  propsAsIs: !1
102
- }), ss = /* @__PURE__ */ t("div")({
102
+ }), ts = /* @__PURE__ */ o("div")({
103
103
  name: "BottomInfo",
104
104
  class: "by6w7e9",
105
105
  propsAsIs: !1
106
- }), ns = /* @__PURE__ */ t("div")({
106
+ }), os = /* @__PURE__ */ o("div")({
107
107
  name: "User",
108
108
  class: "u1g7arbm",
109
109
  propsAsIs: !1
110
- }), ts = /* @__PURE__ */ t("img")({
110
+ }), is = /* @__PURE__ */ o("img")({
111
111
  name: "Avatar",
112
112
  class: "a1ldeata",
113
113
  propsAsIs: !1
114
- }), is = /* @__PURE__ */ t("div")({
114
+ }), rs = /* @__PURE__ */ o("div")({
115
115
  name: "UserInfo",
116
116
  class: "u10d4koz",
117
117
  propsAsIs: !1
118
- }), os = /* @__PURE__ */ t("div")({
118
+ }), as = /* @__PURE__ */ o("div")({
119
119
  name: "UserName",
120
120
  class: "u1q6roj0",
121
121
  propsAsIs: !1
122
- }), rs = /* @__PURE__ */ t("div")({
122
+ }), ls = /* @__PURE__ */ o("div")({
123
123
  name: "UserRating",
124
124
  class: "ui0m425",
125
125
  propsAsIs: !1
126
- }), as = /* @__PURE__ */ t("img")({
126
+ }), cs = /* @__PURE__ */ o("img")({
127
127
  name: "TrophyIcon",
128
128
  class: "t1el3mrn",
129
129
  propsAsIs: !1
130
- }), cs = /* @__PURE__ */ t("div")({
130
+ }), ds = /* @__PURE__ */ o("div")({
131
131
  name: "Rts",
132
132
  class: "r2vgnxv",
133
133
  propsAsIs: !1
134
- }), ls = /* @__PURE__ */ t("div")({
134
+ }), ps = /* @__PURE__ */ o("div")({
135
135
  name: "RtsIndicator",
136
136
  class: "roqn06j",
137
137
  propsAsIs: !1
138
- }), ds = /* @__PURE__ */ t("div")({
138
+ }), us = /* @__PURE__ */ o("div")({
139
139
  name: "RtsLabel",
140
140
  class: "r15adx7c",
141
141
  propsAsIs: !1
142
- }), us = /* @__PURE__ */ t("div")({
142
+ }), ms = /* @__PURE__ */ o("div")({
143
143
  name: "Divider",
144
144
  class: "dv59lta",
145
145
  propsAsIs: !1
146
- }), Ms = /* @__PURE__ */ t("div")({
146
+ }), hs = /* @__PURE__ */ o("div")({
147
147
  name: "Ranks",
148
148
  class: "r55lotb",
149
149
  propsAsIs: !1
150
- }), Is = /* @__PURE__ */ t("div")({
150
+ }), Is = /* @__PURE__ */ o("div")({
151
151
  name: "Statistics",
152
152
  class: "s1knfgqt",
153
153
  propsAsIs: !1
154
- }), ps = /* @__PURE__ */ t("div")({
154
+ }), vs = /* @__PURE__ */ o("div")({
155
155
  name: "AvatarPlaceholder",
156
156
  class: "a1mqo824",
157
157
  propsAsIs: !1
158
- }), Ns = /* @__PURE__ */ t("button")({
158
+ }), Cs = /* @__PURE__ */ o("button")({
159
159
  name: "UserAccountBtn",
160
160
  class: "uxareh6",
161
161
  propsAsIs: !1
162
- }), Ds = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Ae = ({
162
+ }), fs = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", fe = ({
163
163
  avatar: e,
164
164
  name: n,
165
- points: i,
166
- friendsRank: r,
167
- rank: o,
168
- streak: d,
169
- correct: c,
170
- incorrect: l,
171
- inTop: u,
172
- successRate: I
173
- }) => /* @__PURE__ */ a(Ke, { children: [
174
- /* @__PURE__ */ s(es, { children: /* @__PURE__ */ a(ns, { children: [
175
- /* @__PURE__ */ a(Ns, { children: [
176
- e && /* @__PURE__ */ s(ts, { alt: "avatar", src: e }),
177
- !e && /* @__PURE__ */ s(ps, { children: De(n || "") })
165
+ points: t,
166
+ friendsRank: i,
167
+ rank: r,
168
+ streak: p,
169
+ correct: l,
170
+ incorrect: d,
171
+ inTop: c,
172
+ successRate: u
173
+ }) => /* @__PURE__ */ a(ss, { children: [
174
+ /* @__PURE__ */ s(ns, { children: /* @__PURE__ */ a(os, { children: [
175
+ /* @__PURE__ */ a(Cs, { children: [
176
+ e && /* @__PURE__ */ s(is, { alt: "avatar", src: e }),
177
+ !e && /* @__PURE__ */ s(vs, { children: ve(n || "") })
178
178
  ] }),
179
- /* @__PURE__ */ a(is, { children: [
180
- /* @__PURE__ */ s(os, { children: n }),
181
- /* @__PURE__ */ a(rs, { children: [
182
- /* @__PURE__ */ a(cs, { children: [
183
- /* @__PURE__ */ s(as, { alt: "rank-icon", src: Ds }),
184
- /* @__PURE__ */ a(ls, { children: [
185
- Te(i),
186
- /* @__PURE__ */ s(ds, { children: "PTS" })
179
+ /* @__PURE__ */ a(rs, { children: [
180
+ /* @__PURE__ */ s(as, { children: n }),
181
+ /* @__PURE__ */ a(ls, { children: [
182
+ /* @__PURE__ */ a(ds, { children: [
183
+ /* @__PURE__ */ s(cs, { alt: "rank-icon", src: fs }),
184
+ /* @__PURE__ */ a(ps, { children: [
185
+ Ce(t),
186
+ /* @__PURE__ */ s(us, { children: "PTS" })
187
187
  ] })
188
188
  ] }),
189
- /* @__PURE__ */ s(us, {}),
189
+ /* @__PURE__ */ s(ms, {}),
190
190
  /* @__PURE__ */ a("div", { children: [
191
191
  "TOP ",
192
- u || 0,
192
+ c || 0,
193
193
  "%"
194
194
  ] })
195
195
  ] })
196
196
  ] })
197
197
  ] }) }),
198
- /* @__PURE__ */ a(ss, { children: [
199
- /* @__PURE__ */ a(Ms, { children: [
200
- /* @__PURE__ */ s(re, { indicator: r || 0, title: "Friends rank" }),
201
- /* @__PURE__ */ s(re, { indicator: o || 0, title: "Global rank" })
198
+ /* @__PURE__ */ a(ts, { children: [
199
+ /* @__PURE__ */ a(hs, { children: [
200
+ /* @__PURE__ */ s(re, { indicator: i || 0, title: "Friends rank" }),
201
+ /* @__PURE__ */ s(re, { indicator: r || 0, title: "Global rank" })
202
202
  ] }),
203
203
  /* @__PURE__ */ a(Is, { children: [
204
- /* @__PURE__ */ s(B, { indicator: d || 0, title: "Win streak" }),
205
- /* @__PURE__ */ s(B, { indicator: c || 0, title: "Correct" }),
206
- /* @__PURE__ */ s(B, { indicator: l || 0, title: "Incorrect" }),
207
- /* @__PURE__ */ s(B, { indicator: `${I || 0}%`, title: "Succ. rate" })
204
+ /* @__PURE__ */ s(H, { indicator: p || 0, title: "Win streak" }),
205
+ /* @__PURE__ */ s(H, { indicator: l || 0, title: "Correct" }),
206
+ /* @__PURE__ */ s(H, { indicator: d || 0, title: "Incorrect" }),
207
+ /* @__PURE__ */ s(H, { indicator: `${u || 0}%`, title: "Succ. rate" })
208
208
  ] })
209
209
  ] })
210
- ] }), Ts = /* @__PURE__ */ t("div")({
210
+ ] }), As = /* @__PURE__ */ o("div")({
211
211
  name: "SponsorLogoWrap",
212
212
  class: "s8p5v5z",
213
213
  propsAsIs: !1
214
- }), As = () => A, ms = /* @__PURE__ */ t(As())({
214
+ }), gs = () => $, $s = /* @__PURE__ */ o(gs())({
215
215
  name: "SponsorLogo",
216
216
  class: "s755yti",
217
217
  propsAsIs: !0
218
- }), gs = () => /* @__PURE__ */ s(Ts, {
219
- children: /* @__PURE__ */ s(ms, {
218
+ }), bs = () => /* @__PURE__ */ s(As, {
219
+ children: /* @__PURE__ */ s($s, {
220
220
  name: "mastersLogo"
221
221
  })
222
- }), js = /* @__PURE__ */ t("div")({
222
+ }), ys = /* @__PURE__ */ o("div")({
223
223
  name: "Container",
224
224
  class: "c38csyt",
225
225
  propsAsIs: !1
226
- }), ys = /* @__PURE__ */ t("div")({
226
+ }), ws = /* @__PURE__ */ o("div")({
227
227
  name: "Title",
228
228
  class: "ty221rx",
229
229
  propsAsIs: !1
230
- }), hs = /* @__PURE__ */ t("div")({
230
+ }), Rs = /* @__PURE__ */ o("div")({
231
231
  name: "Description",
232
232
  class: "dlaj9xp",
233
233
  propsAsIs: !1
234
- }), xs = ({ title: e, description: n }) => /* @__PURE__ */ a(js, { children: [
235
- /* @__PURE__ */ s(A, { name: "icon-check-circle" }),
236
- /* @__PURE__ */ s(ys, { children: e }),
237
- /* @__PURE__ */ s(hs, { children: n })
238
- ] }), zs = /* @__PURE__ */ t("div")({
234
+ }), Ts = ({ title: e, description: n }) => /* @__PURE__ */ a(ys, { children: [
235
+ /* @__PURE__ */ s($, { name: "icon-check-circle" }),
236
+ /* @__PURE__ */ s(ws, { children: e }),
237
+ /* @__PURE__ */ s(Rs, { children: n })
238
+ ] }), ks = /* @__PURE__ */ o("div")({
239
239
  name: "Container",
240
240
  class: "c16sbdnm",
241
241
  propsAsIs: !1
242
- }), Es = () => A, vs = /* @__PURE__ */ t(Es())({
242
+ }), Ss = () => $, xs = /* @__PURE__ */ o(Ss())({
243
243
  name: "IconPrediction",
244
244
  class: "ibhorgl",
245
245
  propsAsIs: !0
246
- }), P = /* @__PURE__ */ t("div")({
246
+ }), j = /* @__PURE__ */ o("div")({
247
247
  name: "FeedbackIconWrap",
248
248
  class: "f1g20ja7",
249
249
  propsAsIs: !1
250
- }), Z = /* @__PURE__ */ t("div")({
250
+ }), W = /* @__PURE__ */ o("div")({
251
251
  name: "FeedbackHeader",
252
252
  class: "f455ozj",
253
253
  propsAsIs: !1
254
- }), Os = /* @__PURE__ */ t("span")({
254
+ }), qs = /* @__PURE__ */ o("span")({
255
255
  name: "FeedbackTitle",
256
256
  class: "f1913njx",
257
257
  propsAsIs: !1
258
- }), U = /* @__PURE__ */ t("span")({
258
+ }), Q = /* @__PURE__ */ o("span")({
259
259
  name: "FeedbackDescription",
260
260
  class: "fzfk69z",
261
261
  propsAsIs: !1
262
- }), J = /* @__PURE__ */ t("div")({
262
+ }), J = /* @__PURE__ */ o("div")({
263
263
  name: "FeedbackText",
264
264
  class: "fx87qaj",
265
265
  propsAsIs: !1
266
- }), Ls = ({
266
+ }), Es = ({
267
267
  feedbackMessages: e,
268
268
  questionVotedCorrectly: n,
269
- questionVoted: i,
270
- questionType: r,
271
- hasCorrectAnswer: o,
272
- questionStatus: d,
273
- showExpiredNotification: c,
274
- showClosedNotificationTrivia: l,
275
- votedInCurrentRender: u,
276
- votedAfterQuestionClosed: I,
277
- enteredAnActiveQuestion: p,
278
- marketClosed: N
269
+ questionVoted: t,
270
+ questionType: i,
271
+ hasCorrectAnswer: r,
272
+ questionStatus: p,
273
+ showExpiredNotification: l,
274
+ showClosedNotificationTrivia: d,
275
+ votedInCurrentRender: c,
276
+ votedAfterQuestionClosed: u,
277
+ enteredAnActiveQuestion: m,
278
+ marketClosed: v
279
279
  }) => {
280
- const T = i && (r === M.TRIVIA || r === M.PREDICTION) && u && d !== C.RESOLVED, m = r === M.PREDICTION && !o, k = N && r === M.PREDICTION && !i && !p || r === M.PREDICTION && I && u && p, y = T && m, S = T && o, h = r === M.PREDICTION && i && u && o, b = i && r === M.POLL && u;
281
- if (!c && !l && !y && !S && !k && !b && !h)
280
+ const I = t && (i === h.TRIVIA || i === h.PREDICTION) && c && p !== D.RESOLVED, f = i === h.PREDICTION && !r, w = v && i === h.PREDICTION && !t && !m || i === h.PREDICTION && u && c && m, A = I && f, T = I && r, b = i === h.PREDICTION && t && c && r, g = t && i === h.POLL && c;
281
+ if (!l && !d && !A && !T && !w && !g && !b)
282
282
  return null;
283
- const O = n ? "correct" : "incorrect", E = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
284
- return /* @__PURE__ */ a(zs, { "data-isPrediction": m, children: [
285
- c && /* @__PURE__ */ a(z, { children: [
286
- /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
283
+ const k = n ? "correct" : "incorrect", S = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
284
+ return /* @__PURE__ */ a(ks, { "data-isPrediction": f, children: [
285
+ l && /* @__PURE__ */ a(E, { children: [
286
+ /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s($, { name: "questionExpired" }) }),
287
287
  /* @__PURE__ */ a("div", { children: [
288
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(U, { children: "Question Expired" }) }),
288
+ /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(Q, { children: "Question Expired" }) }),
289
289
  /* @__PURE__ */ s(J, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
290
290
  ] })
291
291
  ] }),
292
- l && /* @__PURE__ */ a(z, { children: [
293
- /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
292
+ d && /* @__PURE__ */ a(E, { children: [
293
+ /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s($, { name: "questionExpired" }) }),
294
294
  /* @__PURE__ */ a("div", { children: [
295
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(U, { children: "Question Closed" }) }),
295
+ /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
296
296
  /* @__PURE__ */ s(J, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
297
297
  ] })
298
298
  ] }),
299
- k && /* @__PURE__ */ a(z, { children: [
300
- /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
299
+ w && /* @__PURE__ */ a(E, { children: [
300
+ /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s($, { name: "questionExpired" }) }),
301
301
  /* @__PURE__ */ a("div", { children: [
302
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(U, { children: "Question Closed" }) }),
302
+ /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
303
303
  /* @__PURE__ */ s(J, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
304
304
  ] })
305
305
  ] }),
306
- y && /* @__PURE__ */ a(z, { children: [
307
- /* @__PURE__ */ s(vs, { name: "icon-prediction" }),
308
- /* @__PURE__ */ s(U, { children: "Stay tuned to see if your prediction was correct." })
306
+ A && /* @__PURE__ */ a(E, { children: [
307
+ /* @__PURE__ */ s(xs, { name: "icon-prediction" }),
308
+ /* @__PURE__ */ s(Q, { children: "Stay tuned to see if your prediction was correct." })
309
309
  ] }),
310
- b && /* @__PURE__ */ a(z, { children: [
311
- /* @__PURE__ */ s(P, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(A, { name: "correct" }) }),
312
- /* @__PURE__ */ s(U, { children: "That's for answering. Please stay tuned for the next question." })
310
+ g && /* @__PURE__ */ a(E, { children: [
311
+ /* @__PURE__ */ s(j, { "data-feedback-type": "correct", children: /* @__PURE__ */ s($, { name: "correct" }) }),
312
+ /* @__PURE__ */ s(Q, { children: "That's for answering. Please stay tuned for the next question." })
313
313
  ] }),
314
- (S || h) && /* @__PURE__ */ a(z, { children: [
315
- /* @__PURE__ */ s(P, { "data-feedbackType": O, children: /* @__PURE__ */ s(A, { name: O }) }),
316
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ a(Z, { children: [
317
- /* @__PURE__ */ s(Os, { "data-feedbackType": O, children: E == null ? void 0 : E.title }),
318
- /* @__PURE__ */ s(U, { children: E == null ? void 0 : E.description })
314
+ (T || b) && /* @__PURE__ */ a(E, { children: [
315
+ /* @__PURE__ */ s(j, { "data-feedback-type": k, children: /* @__PURE__ */ s($, { name: k }) }),
316
+ /* @__PURE__ */ s("div", { children: /* @__PURE__ */ a(W, { children: [
317
+ /* @__PURE__ */ s(qs, { "data-feedback-type": k, children: S == null ? void 0 : S.title }),
318
+ /* @__PURE__ */ s(Q, { children: S == null ? void 0 : S.description })
319
319
  ] }) })
320
320
  ] })
321
321
  ] });
322
- }, Cs = /* @__PURE__ */ t("div")({
322
+ }, Ns = /* @__PURE__ */ o("div")({
323
323
  name: "Container",
324
324
  class: "c14ielyq",
325
325
  propsAsIs: !1
326
- }), ks = /* @__PURE__ */ t("div")({
326
+ }), Ls = () => xe, Ds = /* @__PURE__ */ o(Ls())({
327
+ name: "QuestionScrollContainer",
328
+ class: "q1tlqx57",
329
+ propsAsIs: !0
330
+ }), Vs = /* @__PURE__ */ o("div")({
327
331
  name: "Content",
328
- class: "c1tlqx57",
332
+ class: "c1hq58md",
329
333
  propsAsIs: !1
330
- }), Ss = /* @__PURE__ */ t("div")({
334
+ }), Ps = /* @__PURE__ */ o("div")({
331
335
  name: "Title",
332
- class: "t1hq58md",
336
+ class: "t1c8nxcx",
333
337
  propsAsIs: !1
334
- }), fs = /* @__PURE__ */ t("div")({
338
+ }), Os = /* @__PURE__ */ o("div")({
335
339
  name: "Options",
336
- class: "o1c8nxcx",
340
+ class: "oiozuc3",
337
341
  propsAsIs: !1
338
- }), ws = /* @__PURE__ */ t("button")({
342
+ }), Ms = /* @__PURE__ */ o("button")({
339
343
  name: "ButtonContainer",
340
344
  class: "b1b6dl8t",
341
345
  propsAsIs: !1
342
- }), Qs = /* @__PURE__ */ t("div")({
346
+ }), Qs = /* @__PURE__ */ o("div")({
343
347
  name: "ButtonPct",
344
348
  class: "b4iik8i",
345
349
  propsAsIs: !1
346
- }), bs = /* @__PURE__ */ t("span")({
350
+ }), _s = /* @__PURE__ */ o("span")({
347
351
  name: "ButtonBody",
348
352
  class: "b1gq1lnf",
349
353
  propsAsIs: !1
350
- }), $s = /* @__PURE__ */ t("div")({
354
+ }), Us = /* @__PURE__ */ o("div")({
351
355
  name: "IconContainer",
352
356
  class: "i1j65z51",
353
357
  propsAsIs: !1
354
- }), Ys = /* @__PURE__ */ t("div")({
358
+ }), js = /* @__PURE__ */ o("div")({
355
359
  name: "IconWrap",
356
360
  class: "i19tpfua",
357
361
  propsAsIs: !1
358
- }), me = /* @__PURE__ */ t("img")({
362
+ }), Ae = /* @__PURE__ */ o("img")({
359
363
  name: "Icon",
360
364
  class: "i1tubmma",
361
365
  propsAsIs: !1
362
- }), Us = () => me, Rs = /* @__PURE__ */ t(Us())({
366
+ }), Bs = () => Ae, zs = /* @__PURE__ */ o(Bs())({
363
367
  name: "IconDefault",
364
368
  class: "i1grrgwj",
365
369
  propsAsIs: !0
366
- }), qs = () => me, Ps = /* @__PURE__ */ t(qs())({
370
+ }), Fs = () => Ae, Hs = /* @__PURE__ */ o(Fs())({
367
371
  name: "IconCircle",
368
372
  class: "ibemyq8",
369
373
  propsAsIs: !0
370
- }), Vs = /* @__PURE__ */ t("span")({
374
+ }), Ws = /* @__PURE__ */ o("span")({
371
375
  name: "Title",
372
376
  class: "t1dceht",
373
377
  propsAsIs: !1
374
- }), _s = /* @__PURE__ */ t("span")({
378
+ }), Ys = /* @__PURE__ */ o("span")({
375
379
  name: "Indicators",
376
380
  class: "i116q4vq",
377
381
  propsAsIs: !1
378
- }), Ws = /* @__PURE__ */ t("span")({
382
+ }), Zs = /* @__PURE__ */ o("span")({
379
383
  name: "Pts",
380
384
  class: "p17ajcu2",
381
385
  propsAsIs: !1
382
- }), Bs = /* @__PURE__ */ t("span")({
386
+ }), Gs = /* @__PURE__ */ o("span")({
383
387
  name: "Percentage",
384
388
  class: "pu9kmlb",
385
389
  propsAsIs: !1
386
- }), Zs = () => A, Fs = /* @__PURE__ */ t(Zs())({
390
+ }), Ks = () => $, Js = /* @__PURE__ */ o(Ks())({
387
391
  name: "CheckIcon",
388
392
  class: "c1j2j0s0",
389
393
  propsAsIs: !0
390
394
  }), ae = {
391
- [q.CENTERED]: (e) => /* @__PURE__ */ s(Rs, { alt: "option-icon", src: e }),
392
- [q.TRANSPARENT]: (e) => /* @__PURE__ */ s($s, { children: /* @__PURE__ */ s(Ys, { style: { backgroundImage: `url(${e})` } }) }),
393
- [q.ROUNDED]: (e) => /* @__PURE__ */ s(Ps, { alt: "option-icon", src: e }),
394
- [q.NONE]: () => null,
395
- [q.UNSET]: () => null
396
- }, Gs = ({ questionType: e, hasCorrectAnswer: n, correct: i, youVoted: r, questionVoted: o }) => {
397
- if (e === M.POLL && r)
395
+ [U.CENTERED]: (e) => /* @__PURE__ */ s(zs, { alt: "option-icon", src: e }),
396
+ [U.TRANSPARENT]: (e) => /* @__PURE__ */ s(Us, { children: /* @__PURE__ */ s(js, { style: { backgroundImage: `url(${e})` } }) }),
397
+ [U.ROUNDED]: (e) => /* @__PURE__ */ s(Hs, { alt: "option-icon", src: e }),
398
+ [U.NONE]: () => null,
399
+ [U.UNSET]: () => null
400
+ }, Xs = ({ questionType: e, hasCorrectAnswer: n, correct: t, youVoted: i, questionVoted: r }) => {
401
+ if (e === h.POLL && i)
398
402
  return "correct";
399
- if (e === M.PREDICTION) {
400
- if (n && o)
401
- return r ? i ? "correct" : "incorrect" : "unset";
402
- if (r)
403
+ if (e === h.PREDICTION) {
404
+ if (n && r)
405
+ return i ? t ? "correct" : "incorrect" : "unset";
406
+ if (i)
403
407
  return "correct";
404
408
  }
405
- return e === M.TRIVIA && o && r ? i ? "correct" : "incorrect" : "unset";
406
- }, Hs = ({
409
+ return e === h.TRIVIA && r && i ? t ? "correct" : "incorrect" : "unset";
410
+ }, en = ({
407
411
  questionType: e,
408
412
  questionVoted: n,
409
- correct: i,
410
- hasCorrectAnswer: r,
411
- questionStatus: o
412
- }) => e === M.TRIVIA ? n && i : e === M.PREDICTION ? n && i && r || o === C.RESOLVED && i : !1, Js = (e) => {
413
+ correct: t,
414
+ hasCorrectAnswer: i,
415
+ questionStatus: r
416
+ }) => e === h.TRIVIA ? n && t : e === h.PREDICTION ? n && t && i || r === D.RESOLVED && t : !1, sn = (e) => {
413
417
  var n;
414
418
  const {
415
419
  // option props
416
- id: i,
417
- icon: r,
418
- text: o,
419
- percentageDecimal: d,
420
- points: c,
420
+ id: t,
421
+ icon: i,
422
+ text: r,
423
+ percentageDecimal: p,
424
+ points: l,
421
425
  // extra props
422
- onVote: l,
423
- markThatVoted: u,
424
- youSelected: I,
425
- questionVoted: p,
426
- imageMode: N,
427
- answerTimeExpired: T,
428
- questionStatus: m,
429
- isLoading: k,
430
- questionType: y,
431
- correct: S,
432
- hasCorrectAnswer: h,
433
- votedAfterQuestionClosed: b,
434
- enteredAnActiveQuestion: O,
435
- marketClosed: E
436
- } = e, f = Gs(e), H = Hs({ questionType: y, questionVoted: p, correct: S, hasCorrectAnswer: h, questionStatus: m }), $ = E && y === M.PREDICTION, _ = p || $, D = y === M.PREDICTION && !p && m !== C.RESOLVED;
426
+ onVote: d,
427
+ markThatVoted: c,
428
+ youSelected: u,
429
+ questionVoted: m,
430
+ imageMode: v,
431
+ answerTimeExpired: I,
432
+ questionStatus: f,
433
+ isLoading: w,
434
+ questionType: A,
435
+ correct: T,
436
+ hasCorrectAnswer: b,
437
+ votedAfterQuestionClosed: g,
438
+ enteredAnActiveQuestion: k,
439
+ marketClosed: S
440
+ } = e, V = Xs(e), K = en({ questionType: A, questionVoted: m, correct: T, hasCorrectAnswer: b, questionStatus: f }), O = S && A === h.PREDICTION, z = m || O, C = A === h.PREDICTION && !m && !S;
437
441
  return /* @__PURE__ */ a(
438
- ws,
442
+ Ms,
439
443
  {
440
- value: i,
441
- "data-selected": I,
442
- "data-answer-state": f,
443
- disabled: p || k || T || $ && !O || $ && O && b,
444
- "data-is-not-checked": p && !I && f !== "incorrect",
445
- onClick: (j) => {
446
- u(
447
- y === M.PREDICTION ? E : m === C.RESOLVED
448
- ), l(j);
444
+ value: t,
445
+ "data-selected": u,
446
+ "data-answer-state": V,
447
+ disabled: m || w || I || O && !k || O && k && g,
448
+ "data-is-not-checked": m && !u && V !== "incorrect",
449
+ onClick: (R) => {
450
+ c(
451
+ A === h.PREDICTION ? S : f === D.RESOLVED
452
+ ), d(R);
449
453
  },
450
454
  children: [
451
- /* @__PURE__ */ s(Qs, { "data-answer-state": f, style: { width: `${_ ? d : 0}%` } }),
452
- /* @__PURE__ */ a(bs, { children: [
453
- r && N && ((n = ae[N]) == null ? void 0 : n.call(ae, r)),
454
- /* @__PURE__ */ s(Vs, { children: o }),
455
- D && /* @__PURE__ */ a("div", { children: [
456
- /* @__PURE__ */ s(X, { value: c }),
457
- /* @__PURE__ */ s(Ws, { children: "pts" })
455
+ /* @__PURE__ */ s(Qs, { "data-answer-state": V, style: { width: `${z ? p : 0}%` } }),
456
+ /* @__PURE__ */ a(_s, { children: [
457
+ i && v && ((n = ae[v]) == null ? void 0 : n.call(ae, i)),
458
+ /* @__PURE__ */ s(Ws, { children: r }),
459
+ C && /* @__PURE__ */ a("div", { children: [
460
+ /* @__PURE__ */ s(X, { value: l }),
461
+ /* @__PURE__ */ s(Zs, { children: "pts" })
458
462
  ] }),
459
- _ && /* @__PURE__ */ a(_s, { children: [
460
- H && /* @__PURE__ */ s(Fs, { name: "selected" }),
461
- /* @__PURE__ */ s(Bs, { children: /* @__PURE__ */ s(X, { value: d, suffix: "%" }) })
463
+ z && /* @__PURE__ */ a(Ys, { children: [
464
+ K && /* @__PURE__ */ s(Js, { name: "selected" }),
465
+ /* @__PURE__ */ s(Gs, { children: /* @__PURE__ */ s(X, { value: p, suffix: "%" }) })
462
466
  ] })
463
467
  ] })
464
468
  ]
465
469
  }
466
470
  );
467
- }, Xs = [w.PRIMARY_GREEN1, w.SECONDARY_RED1, w.SECONDARY_RED1, w.NEUTRALS_GRAY3], Ks = [10, 10, 1, 0], en = /* @__PURE__ */ t("div")({
471
+ }, nn = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRAY3], tn = [10, 10, 1, 0], on = /* @__PURE__ */ o("div")({
468
472
  name: "RemainingTime",
469
473
  class: "r165427",
470
474
  propsAsIs: !1
471
- }), sn = w.SECONDARY_GREEN6, ce = w.SECONDARY_RED3, nn = w.NEUTRALS_GRAY3, tn = ({
475
+ }), rn = P.SECONDARY_GREEN6, le = P.SECONDARY_RED3, an = P.NEUTRALS_GRAY3, ln = ({
472
476
  isPlaying: e = !0,
473
477
  duration: n = 30,
474
- onTimerExpired: i
478
+ onTimerExpired: t
475
479
  }) => {
476
- const [r, o] = L(n > 10 ? sn : ce), d = ({
477
- remainingTime: u
478
- }) => /* @__PURE__ */ s(en, {
479
- children: u
480
- }), c = V(() => {
481
- i == null || i(), o(nn);
482
- }, [i, o]), l = V((u) => {
483
- u === 10 && o(ce);
484
- }, [o]);
485
- return /* @__PURE__ */ s($e, {
480
+ const [i, r] = N(n > 10 ? rn : le), p = ({
481
+ remainingTime: c
482
+ }) => /* @__PURE__ */ s(on, {
483
+ children: c
484
+ }), l = B(() => {
485
+ t == null || t(), r(an);
486
+ }, [t, r]), d = B((c) => {
487
+ c === 10 && r(le);
488
+ }, [r]);
489
+ return /* @__PURE__ */ s(Qe, {
486
490
  isPlaying: e,
487
491
  duration: n,
488
- colors: Xs,
489
- colorsTime: Ks,
492
+ colors: nn,
493
+ colorsTime: tn,
490
494
  size: 32,
491
495
  strokeWidth: 2,
492
496
  trailStrokeWidth: 2,
493
- trailColor: r,
494
- onComplete: c,
495
- onUpdate: l,
496
- children: d
497
+ trailColor: i,
498
+ onComplete: l,
499
+ onUpdate: d,
500
+ children: p
497
501
  });
498
- }, on = /* @__PURE__ */ t("div")({
502
+ }, cn = /* @__PURE__ */ o("div")({
499
503
  name: "WinBarContainer",
500
504
  class: "wie6cqo",
501
505
  propsAsIs: !1
502
- }), rn = /* @__PURE__ */ t("div")({
506
+ }), dn = /* @__PURE__ */ o("div")({
503
507
  name: "Content",
504
508
  class: "cgizw4u",
505
509
  propsAsIs: !1
506
- }), an = /* @__PURE__ */ t("div")({
510
+ }), pn = /* @__PURE__ */ o("div")({
507
511
  name: "Title",
508
512
  class: "t1l3ucjp",
509
513
  propsAsIs: !1
510
- }), cn = () => A, ln = /* @__PURE__ */ t(cn())({
514
+ }), un = () => $, mn = /* @__PURE__ */ o(un())({
511
515
  name: "WinIcon",
512
516
  class: "wx7j799",
513
517
  propsAsIs: !0
514
- }), dn = /* @__PURE__ */ t("div")({
518
+ }), hn = /* @__PURE__ */ o("div")({
515
519
  name: "Points",
516
520
  class: "p4lwuj0",
517
521
  propsAsIs: !1
518
- }), un = /* @__PURE__ */ t("span")({
522
+ }), In = /* @__PURE__ */ o("span")({
519
523
  name: "PointsCount",
520
524
  class: "po9i64o",
521
525
  propsAsIs: !1
522
- }), Mn = /* @__PURE__ */ t("span")({
526
+ }), vn = /* @__PURE__ */ o("span")({
523
527
  name: "PointsUnits",
524
528
  class: "pe5g05h",
525
529
  propsAsIs: !1
526
- }), In = ({
530
+ }), Cn = ({
527
531
  title: e,
528
532
  points: n,
529
- isPlayingTimer: i,
530
- isTimer: r,
531
- questionType: o,
532
- timerDuration: d,
533
- onTimerExpired: c
534
- }) => /* @__PURE__ */ a(on, { style: { justifyContent: o === M.PREDICTION ? "center" : "space-between" }, children: [
535
- /* @__PURE__ */ a(rn, { children: [
536
- e && /* @__PURE__ */ s(an, { children: e }),
537
- n !== void 0 && o !== M.POLL && /* @__PURE__ */ a(z, { children: [
538
- /* @__PURE__ */ s(ln, { name: "icon-trophy" }),
539
- /* @__PURE__ */ a(dn, { children: [
540
- /* @__PURE__ */ s(un, { children: /* @__PURE__ */ s(X, { value: n }) }),
541
- /* @__PURE__ */ s(Mn, { children: "PTS" })
533
+ isPlayingTimer: t,
534
+ isTimer: i,
535
+ questionType: r,
536
+ timerDuration: p,
537
+ onTimerExpired: l
538
+ }) => /* @__PURE__ */ a(cn, { style: { justifyContent: r === h.PREDICTION ? "center" : "space-between" }, children: [
539
+ /* @__PURE__ */ a(dn, { children: [
540
+ e && /* @__PURE__ */ s(pn, { children: e }),
541
+ n !== void 0 && r !== h.POLL && /* @__PURE__ */ a(E, { children: [
542
+ /* @__PURE__ */ s(mn, { name: "icon-trophy" }),
543
+ /* @__PURE__ */ a(hn, { children: [
544
+ /* @__PURE__ */ s(In, { children: /* @__PURE__ */ s(X, { value: n }) }),
545
+ /* @__PURE__ */ s(vn, { children: "PTS" })
542
546
  ] })
543
547
  ] })
544
548
  ] }),
545
- r && o !== M.PREDICTION && /* @__PURE__ */ s(tn, { isPlaying: i, onTimerExpired: c, duration: d })
546
- ] }), pn = ({ openedQuestion: e, isLoading: n, vote: i, close: r }) => {
547
- var o, d;
548
- const c = e.subject, l = e.type, u = e.status, I = (o = e.options) == null ? void 0 : o.options, p = e.marketClosed, [N, T] = L(!1), [m, k] = L(!1), [y, S] = L(!0), [h, b] = L(!1), [O, E] = L(""), f = e == null ? void 0 : e.id;
549
- K(() => {
550
- l === M.PREDICTION ? p && S(!1) : u === C.RESOLVED && S(!1);
549
+ i && r !== h.PREDICTION && /* @__PURE__ */ s(ln, { isPlaying: t, onTimerExpired: l, duration: p })
550
+ ] }), fn = ({ openedQuestion: e, isLoading: n, vote: t, close: i }) => {
551
+ var r, p;
552
+ const l = e.subject, d = e.type, c = e.status, u = (r = e.options) == null ? void 0 : r.options, m = e.marketClosed, [v, I] = N(!1), [f, w] = N(!1), [A, T] = N(!0), [b, g] = N(!1), [k, S] = N(""), V = e == null ? void 0 : e.id;
553
+ G(() => {
554
+ d === h.PREDICTION ? m && T(!1) : c === D.RESOLVED && T(!1);
551
555
  }, []);
552
- const H = V((g) => {
553
- k(g), T(!0);
554
- }, []), $ = V(
555
- async (g) => {
556
- if (f) {
557
- const R = g.currentTarget.value;
558
- E(R), await i(f, R);
556
+ const K = B((y) => {
557
+ w(y), I(!0);
558
+ }, []), O = B(
559
+ async (y) => {
560
+ if (V) {
561
+ const _ = y.currentTarget.value;
562
+ S(_), await t(V, _);
559
563
  }
560
564
  },
561
- [f, E, i]
562
- ), _ = V(() => {
563
- b(!0), setTimeout(r, 3e3);
564
- }, [r]), D = v(
565
- () => e == null ? void 0 : e.answers.find((g) => g.youVoted === !0),
565
+ [V, S, t]
566
+ ), z = B(() => {
567
+ g(!0), setTimeout(i, 3e3);
568
+ }, [i]), C = q(
569
+ () => e == null ? void 0 : e.answers.find((y) => y.youVoted === !0),
566
570
  [e]
567
- ), j = v(
568
- () => !!(e != null && e.answers.find((g) => g.correct === !0)),
571
+ ), R = q(
572
+ () => !!(e != null && e.answers.find((y) => y.correct === !0)),
569
573
  [e]
570
- ), x = v(
571
- () => e == null ? void 0 : e.answers.find((g) => g.correct === !0),
574
+ ), x = q(
575
+ () => e == null ? void 0 : e.answers.find((y) => y.correct === !0),
572
576
  [e]
573
- ), je = v(() => e ? e.answers.map((g) => {
574
- var R;
577
+ ), $e = q(() => e ? e.answers.map((y) => {
578
+ var _;
575
579
  return {
576
- ...g,
577
- questionVoted: !!D,
578
- youSelected: O === g.id,
580
+ ...y,
581
+ questionVoted: !!C,
582
+ youSelected: k === y.id,
579
583
  isLoading: n,
580
- hasCorrectAnswer: j,
584
+ hasCorrectAnswer: R,
581
585
  questionType: e.type,
582
- answerTimeExpired: h,
583
- questionStatus: u,
584
- imageMode: (R = e.appearance) == null ? void 0 : R.images,
585
- onVote: $
586
+ answerTimeExpired: b,
587
+ questionStatus: c,
588
+ imageMode: (_ = e.appearance) == null ? void 0 : _.images,
589
+ onVote: O
586
590
  };
587
591
  }) : [], [
588
- j,
589
- h,
592
+ R,
593
+ b,
590
594
  n,
591
595
  e,
592
- D,
593
- u,
594
- $,
595
- O
596
- ]), ye = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, Y = u === C.RESOLVED && l === M.TRIVIA && !D && !y, te = l === M.TRIVIA && m && N && y, ie = v(() => l === M.PREDICTION ? !!(D && !j || D && j && x != null && x.youVoted) : !0, [l, D, j, x]), he = v(() => {
597
- if (l === M.PREDICTION && D && (!j || j && x != null && x.youVoted))
598
- return D.points;
599
- if (!(Y || h))
600
- return u === C.RESOLVED ? 0 : D ? D.correct ? D.points : 0 : x == null ? void 0 : x.points;
596
+ C,
597
+ c,
598
+ O,
599
+ k
600
+ ]), be = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, M = c === D.RESOLVED && d === h.TRIVIA && !C && !A, te = d === h.TRIVIA && f && v && A, oe = q(() => d === h.PREDICTION ? !!(C && !R || C && R && x != null && x.youVoted) : !0, [d, C, R, x]), ye = q(() => {
601
+ if (d === h.PREDICTION && C && (!R || R && x != null && x.youVoted))
602
+ return C.points;
603
+ if (!(M || b))
604
+ return c === D.RESOLVED ? 0 : C ? C.correct ? C.points : 0 : x == null ? void 0 : x.points;
601
605
  }, [
602
- h,
603
- D,
606
+ b,
607
+ C,
604
608
  x,
605
- u,
606
- Y,
607
- l,
608
- j
609
- ]), xe = v(() => l === M.PREDICTION && D ? j ? j && x != null && x.youVoted ? "You won" : "" : "To win" : Y || h ? "Time expired" : l === M.POLL ? "Time remaining" : D ? "You won" : "To win", [h, l, D, Y, j, x]), ze = D || Y || te || l === M.TRIVIA && u === C.RESOLVED && y;
610
- return /* @__PURE__ */ s(Ee, { "data-question-header": "true", children: /* @__PURE__ */ s(Cs, { children: /* @__PURE__ */ a(ks, { children: [
609
+ c,
610
+ M,
611
+ d,
612
+ R
613
+ ]), we = q(() => d === h.PREDICTION && C ? R ? R && x != null && x.youVoted ? "You won" : "" : "To win" : M || b ? "Time expired" : d === h.POLL ? "Time remaining" : C ? "You won" : "To win", [b, d, C, M, R, x]), Re = C || M || te || d === h.TRIVIA && c === D.RESOLVED && A;
614
+ return /* @__PURE__ */ s(Ds, { children: /* @__PURE__ */ s(Ns, { children: /* @__PURE__ */ a(Vs, { children: [
611
615
  /* @__PURE__ */ s(
612
- Ls,
616
+ Es,
613
617
  {
614
- feedbackMessages: ye,
615
- questionVoted: !!D,
616
- questionVotedCorrectly: D == null ? void 0 : D.correct,
617
- questionType: l,
618
- hasCorrectAnswer: j,
619
- questionStatus: u,
620
- showExpiredNotification: Y,
618
+ feedbackMessages: be,
619
+ questionVoted: !!C,
620
+ questionVotedCorrectly: C == null ? void 0 : C.correct,
621
+ questionType: d,
622
+ hasCorrectAnswer: R,
623
+ questionStatus: c,
624
+ showExpiredNotification: M,
621
625
  showClosedNotificationTrivia: te,
622
- votedInCurrentRender: N,
623
- votedAfterQuestionClosed: m,
624
- enteredAnActiveQuestion: y,
625
- marketClosed: p
626
+ votedInCurrentRender: v,
627
+ votedAfterQuestionClosed: f,
628
+ enteredAnActiveQuestion: A,
629
+ marketClosed: m
626
630
  }
627
631
  ),
628
- ie && /* @__PURE__ */ s(
629
- In,
632
+ oe && /* @__PURE__ */ s(
633
+ Cn,
630
634
  {
631
- title: xe,
632
- points: he,
633
- onTimerExpired: _,
635
+ title: we,
636
+ points: ye,
637
+ onTimerExpired: z,
634
638
  questionType: e.type,
635
639
  isTimer: !n,
636
- isPlayingTimer: !D,
637
- timerDuration: ze ? 0 : Number(((d = e == null ? void 0 : e.appearance) == null ? void 0 : d.autoHideInterval) || "30")
640
+ isPlayingTimer: !C,
641
+ timerDuration: Re ? 0 : Number(((p = e == null ? void 0 : e.appearance) == null ? void 0 : p.autoHideInterval) || "30")
638
642
  }
639
643
  ),
640
- h ? /* @__PURE__ */ s(
641
- xs,
644
+ b ? /* @__PURE__ */ s(
645
+ Ts,
642
646
  {
643
647
  title: "More to come...",
644
648
  description: "Watch for additional enhanced stream interactive experience."
645
649
  }
646
- ) : /* @__PURE__ */ a(z, { children: [
647
- /* @__PURE__ */ s(Ss, { style: ie ? {} : { marginTop: 0 }, children: c }),
648
- /* @__PURE__ */ s(fs, { children: je.map((g) => /* @__PURE__ */ s(
649
- Js,
650
+ ) : /* @__PURE__ */ a(E, { children: [
651
+ /* @__PURE__ */ s(Ps, { style: oe ? {} : { marginTop: 0 }, children: l }),
652
+ /* @__PURE__ */ s(Os, { children: $e.map((y) => /* @__PURE__ */ s(
653
+ sn,
650
654
  {
651
- ...g,
652
- markThatVoted: H,
653
- votedAfterQuestionClosed: m,
654
- enteredAnActiveQuestion: y,
655
- marketClosed: p
655
+ ...y,
656
+ markThatVoted: K,
657
+ votedAfterQuestionClosed: f,
658
+ enteredAnActiveQuestion: A,
659
+ marketClosed: m
656
660
  },
657
- g.id
661
+ y.id
658
662
  )) })
659
663
  ] })
660
664
  ] }) }) });
661
- }, Nn = /* @__PURE__ */ t("div")({
665
+ }, An = /* @__PURE__ */ o("div")({
662
666
  name: "Container",
663
667
  class: "cgn5uen",
664
668
  propsAsIs: !1
665
- }), Dn = /* @__PURE__ */ t("div")({
669
+ }), gn = /* @__PURE__ */ o("div")({
666
670
  name: "Content",
667
671
  class: "c1px8nt6",
668
672
  propsAsIs: !1
669
- }), Tn = /* @__PURE__ */ t("h3")({
673
+ }), $n = /* @__PURE__ */ o("h3")({
670
674
  name: "Title",
671
675
  class: "t5et2jt",
672
676
  propsAsIs: !1
673
- }), An = /* @__PURE__ */ t("div")({
677
+ }), bn = /* @__PURE__ */ o("div")({
674
678
  name: "Description",
675
679
  class: "d1i2kpk2",
676
680
  propsAsIs: !1
677
- }), mn = /* @__PURE__ */ t("div")({
681
+ }), yn = /* @__PURE__ */ o("div")({
678
682
  name: "DateWrap",
679
683
  class: "dd3lh3p",
680
684
  propsAsIs: !1
681
- }), gn = /* @__PURE__ */ t("img")({
685
+ }), wn = /* @__PURE__ */ o("img")({
682
686
  name: "Image",
683
687
  class: "i1gfjeu5",
684
688
  propsAsIs: !1
685
689
  }), ge = ({
686
690
  created: e,
687
- image: n,
688
- title: i,
689
- isPickHistory: r,
690
- instantView: o,
691
- notification: d
691
+ title: n,
692
+ isPickHistory: t,
693
+ instantView: i,
694
+ notification: r
692
695
  }) => {
693
- const c = v(() => {
696
+ const p = q(() => {
694
697
  if (e) {
695
- const u = new Date(e);
696
- if (ne(u))
698
+ const l = new Date(e);
699
+ if (ne(l))
697
700
  return {
698
- date: ee(u),
699
- time: se(u)
701
+ date: ee(l),
702
+ time: se(l)
700
703
  };
701
704
  }
702
705
  return null;
703
- }, [e]), l = (o == null ? void 0 : o.image) || n;
704
- return /* @__PURE__ */ a(Nn, { children: [
705
- c && /* @__PURE__ */ a(mn, { children: [
706
- c.date,
706
+ }, [e]);
707
+ return /* @__PURE__ */ a(An, { children: [
708
+ p && /* @__PURE__ */ a(yn, { children: [
709
+ p.date,
707
710
  " · ",
708
- c.time
711
+ p.time
709
712
  ] }),
710
- (o == null ? void 0 : o.video) && /* @__PURE__ */ s(ve, { source: o.video.url, poster: o.video.thumbnailUrl }),
711
- l && !(o != null && o.video) && /* @__PURE__ */ s(gn, { src: l }),
712
- /* @__PURE__ */ a(Dn, { children: [
713
- /* @__PURE__ */ s(Tn, { children: r ? i : o == null ? void 0 : o.heading }),
714
- /* @__PURE__ */ s(An, { children: r ? d == null ? void 0 : d.body : o == null ? void 0 : o.body })
713
+ (i == null ? void 0 : i.video) && /* @__PURE__ */ s(qe, { source: i.video.url, poster: i.video.thumbnailUrl }),
714
+ (i == null ? void 0 : i.image) && !(i != null && i.video) && /* @__PURE__ */ s(wn, { src: i == null ? void 0 : i.image }),
715
+ /* @__PURE__ */ a(gn, { children: [
716
+ /* @__PURE__ */ s($n, { children: t ? n : i == null ? void 0 : i.heading }),
717
+ /* @__PURE__ */ s(bn, { children: t ? r == null ? void 0 : r.body : i == null ? void 0 : i.body })
715
718
  ] })
716
719
  ] });
717
- }, jn = /* @__PURE__ */ t("div")({
720
+ }, Rn = /* @__PURE__ */ o("div")({
718
721
  name: "Container",
719
722
  class: "c1euiow",
720
723
  propsAsIs: !1
721
- }), yn = /* @__PURE__ */ t("a")({
724
+ }), Tn = /* @__PURE__ */ o("a")({
722
725
  name: "WebLinkBtn",
723
726
  class: "w19zie3h",
724
727
  propsAsIs: !1
725
- }), hn = ({ instantView: e, ...n }) => /* @__PURE__ */ a(jn, { children: [
728
+ }), kn = ({ instantView: e, ...n }) => /* @__PURE__ */ a(Rn, { children: [
726
729
  /* @__PURE__ */ s(ge, { instantView: e, ...n }),
727
- (e == null ? void 0 : e.webLink) && /* @__PURE__ */ a(yn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
730
+ (e == null ? void 0 : e.webLink) && /* @__PURE__ */ a(Tn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
728
731
  e == null ? void 0 : e.webLink.label,
729
- /* @__PURE__ */ s(A, { name: "icon-external-link" })
732
+ /* @__PURE__ */ s($, { name: "icon-external-link" })
730
733
  ] })
731
- ] }), xn = /* @__PURE__ */ t("div")({
734
+ ] }), Sn = /* @__PURE__ */ o("div")({
732
735
  name: "Container",
733
736
  class: "c1dcxmvf",
734
737
  propsAsIs: !1
735
- }), zn = /* @__PURE__ */ t("div")({
738
+ }), xn = /* @__PURE__ */ o("div")({
736
739
  name: "DateTime",
737
740
  class: "db4q22c",
738
741
  propsAsIs: !1
739
- }), En = /* @__PURE__ */ t("blockquote")({
742
+ }), qn = /* @__PURE__ */ o("blockquote")({
740
743
  name: "Quote",
741
744
  class: "q111mmic",
742
745
  propsAsIs: !1
743
- }), vn = ({ created: e, ...n }) => {
744
- const i = v(() => {
746
+ }), En = ({ created: e, ...n }) => {
747
+ const t = q(() => {
745
748
  if (e) {
746
- const r = new Date(e);
747
- if (ne(r))
749
+ const i = new Date(e);
750
+ if (ne(i))
748
751
  return {
749
- date: ee(r),
750
- time: se(r)
752
+ date: ee(i),
753
+ time: se(i)
751
754
  };
752
755
  }
753
756
  return null;
754
757
  }, [e]);
755
- return /* @__PURE__ */ a(xn, { children: [
756
- i && /* @__PURE__ */ a(zn, { children: [
757
- i.date,
758
+ return /* @__PURE__ */ a(Sn, { children: [
759
+ t && /* @__PURE__ */ a(xn, { children: [
760
+ t.date,
758
761
  " · ",
759
- i.time
762
+ t.time
760
763
  ] }),
761
- n.title && /* @__PURE__ */ s(En, { children: n.title }),
762
- /* @__PURE__ */ s(Ie, { ...n })
764
+ n.title && /* @__PURE__ */ s(qn, { children: n.title }),
765
+ /* @__PURE__ */ s(me, { ...n })
763
766
  ] });
764
- }, On = /* @__PURE__ */ t("div")({
767
+ }, Nn = /* @__PURE__ */ o("div")({
765
768
  name: "QuestionContainer",
766
769
  class: "qdri6g3",
767
770
  propsAsIs: !1
768
771
  }), Ln = ({
769
772
  openedQuestion: e
770
773
  }) => {
771
- var n, i;
772
- return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(hn, {
774
+ var n, t;
775
+ return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(kn, {
773
776
  created: e.attributes.created,
774
777
  ...e.attributes.attributes.value
775
- }) : ((i = e == null ? void 0 : e.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ s(vn, {
778
+ }) : ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "tweet" ? /* @__PURE__ */ s(En, {
776
779
  created: e.attributes.created,
777
780
  ...e.attributes.attributes.value
778
781
  }) : null;
779
- }, Cn = ({
782
+ }, Dn = ({
780
783
  extendedQuestion: e,
781
784
  vote: n,
782
- close: i
785
+ close: t
783
786
  }) => {
784
787
  const {
785
- loading: r,
786
- data: o
788
+ loading: i,
789
+ data: r
787
790
  } = e;
788
- return o ? /* @__PURE__ */ s(pn, {
791
+ return r ? /* @__PURE__ */ s(fn, {
789
792
  vote: n,
790
- close: i,
791
- openedQuestion: o,
792
- isLoading: !!r
793
+ close: t,
794
+ openedQuestion: r,
795
+ isLoading: !!i
793
796
  }) : null;
794
- }, kn = ({
797
+ }, Vn = ({
795
798
  gamification: e
796
799
  }) => {
797
800
  var n;
798
- const i = Q(e.openedQuestion.$store), r = Q(e.openedQuestion.$extendedStore);
799
- if (!i)
801
+ const t = L(e.openedQuestion.$store), i = L(e.openedQuestion.$extendedStore);
802
+ if (!t)
800
803
  return null;
801
- const o = i.type;
802
- return /* @__PURE__ */ a(On, {
803
- children: [/* @__PURE__ */ s(Ne, {
804
+ const r = t.type;
805
+ return /* @__PURE__ */ a(Nn, {
806
+ children: [/* @__PURE__ */ s(Ie, {
804
807
  close: e.closeQuestion,
805
- type: ((n = i.attributes) == null ? void 0 : n.type) || M.UNSET
806
- }), o === "question" && /* @__PURE__ */ s(Cn, {
808
+ type: ((n = t.attributes) == null ? void 0 : n.type) || h.UNSET
809
+ }), r === "question" && /* @__PURE__ */ s(Dn, {
807
810
  vote: e.submitAnswer,
808
811
  close: e.closeQuestion,
809
- extendedQuestion: r
810
- }), o !== "question" && /* @__PURE__ */ s(Ln, {
811
- openedQuestion: i
812
- }), /* @__PURE__ */ s(gs, {
812
+ extendedQuestion: i
813
+ }), r !== "question" && /* @__PURE__ */ s(Ln, {
814
+ openedQuestion: t
815
+ }), /* @__PURE__ */ s(bs, {
813
816
  sponsorLogo: ""
814
817
  })]
815
818
  });
816
- }, Sn = /* @__PURE__ */ t("div")({
819
+ }, Pn = /* @__PURE__ */ o("div")({
817
820
  name: "Container",
818
821
  class: "c115qtkr",
819
822
  propsAsIs: !1
820
- }), fn = /* @__PURE__ */ t("div")({
823
+ }), On = /* @__PURE__ */ o("div")({
821
824
  name: "STabs",
822
825
  class: "sxnslc8",
823
826
  propsAsIs: !1
824
- }), wn = /* @__PURE__ */ t("button")({
827
+ }), Mn = /* @__PURE__ */ o("button")({
825
828
  name: "Button",
826
829
  class: "b1umzux0",
827
830
  propsAsIs: !1
828
- }), Qn = /* @__PURE__ */ t("span")({
831
+ }), Qn = /* @__PURE__ */ o("span")({
829
832
  name: "Title",
830
833
  class: "tspsaas",
831
834
  propsAsIs: !1
832
835
  });
833
- var G = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(G || {});
834
- const le = ({ title: e, active: n, onClick: i }) => /* @__PURE__ */ s(wn, { onClick: i, "data-selected": n, children: /* @__PURE__ */ s(Qn, { children: e }) }), bn = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(Sn, { children: /* @__PURE__ */ a(fn, { "data-position": e === "home" ? "left" : "right", children: [
835
- /* @__PURE__ */ s(le, { title: "Home", active: e === "home", onClick: () => n(
836
+ var Z = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(Z || {});
837
+ const ce = ({ title: e, active: n, onClick: t }) => /* @__PURE__ */ s(Mn, { onClick: t, "data-selected": n, children: /* @__PURE__ */ s(Qn, { children: e }) }), _n = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(Pn, { children: /* @__PURE__ */ a(On, { "data-position": e === "home" ? "left" : "right", children: [
838
+ /* @__PURE__ */ s(ce, { title: "Home", active: e === "home", onClick: () => n(
836
839
  "home"
837
840
  /* HOME */
838
841
  ) }),
839
842
  /* @__PURE__ */ s(
840
- le,
843
+ ce,
841
844
  {
842
845
  title: "Friends",
843
846
  active: e === "leaderboard",
@@ -847,76 +850,76 @@ const le = ({ title: e, active: n, onClick: i }) => /* @__PURE__ */ s(wn, { onCl
847
850
  )
848
851
  }
849
852
  )
850
- ] }) }), $n = /* @__PURE__ */ t("div")({
853
+ ] }) }), Un = /* @__PURE__ */ o("div")({
851
854
  name: "Container",
852
855
  class: "c1ux29ft",
853
856
  propsAsIs: !1
854
- }), Yn = /* @__PURE__ */ t("img")({
857
+ }), jn = /* @__PURE__ */ o("img")({
855
858
  name: "FriendsIcon",
856
859
  class: "f10ncfg2",
857
860
  propsAsIs: !1
858
- }), Un = /* @__PURE__ */ t("div")({
861
+ }), Bn = /* @__PURE__ */ o("div")({
859
862
  name: "Content",
860
863
  class: "c1yc07bd",
861
864
  propsAsIs: !1
862
- }), Rn = /* @__PURE__ */ t("div")({
865
+ }), zn = /* @__PURE__ */ o("div")({
863
866
  name: "Title",
864
867
  class: "tj6cq7w",
865
868
  propsAsIs: !1
866
- }), qn = /* @__PURE__ */ t("div")({
869
+ }), Fn = /* @__PURE__ */ o("div")({
867
870
  name: "Description",
868
871
  class: "d1ag78xo",
869
872
  propsAsIs: !1
870
- }), Pn = () => A, Vn = /* @__PURE__ */ t(Pn())({
873
+ }), Hn = () => $, Wn = /* @__PURE__ */ o(Hn())({
871
874
  name: "ArrowInviteIcon",
872
875
  class: "awohrz6",
873
876
  propsAsIs: !0
874
- }), _n = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiByeD0iMTYiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMC40NjE1IDEyLjY4NzVDOS40NDIzMSAxMi42ODc1IDguNjE1MzggMTMuNDY2NSA4LjYxNTM4IDE0LjQyNjZDOC42MTUzOCAxNS4zODY4IDkuNDQyMzEgMTYuMTY1OCAxMC40NjE1IDE2LjE2NThDMTEuNDgwOCAxNi4xNjU4IDEyLjMwNzcgMTUuMzg2OCAxMi4zMDc3IDE0LjQyNjZDMTIuMzA3NyAxMy40NjY1IDExLjQ4MDggMTIuNjg3NSAxMC40NjE1IDEyLjY4NzVaTTEwLjQ2MTUgMTYuMTY1OEM5LjEwODE3IDE2LjE2NTggOCAxNy4yMDk3IDggMTguNDg0NlYxOS43NTI3QzggMTkuNzUyNyA4LjYxNTM4IDIwLjIyMzcgMTAuNDYxNSAyMC4yMjM3QzEyLjMwNzcgMjAuMjIzNyAxMi45MjMxIDE5Ljc1MjcgMTIuOTIzMSAxOS43NTI3VjE4LjQ4NDZDMTIuOTIzMSAxNy4yMDk3IDExLjgxNDkgMTYuMTY1OCAxMC40NjE1IDE2LjE2NThaTTIxLjUzODUgMTIuNjg3NUMyMC41MTkyIDEyLjY4NzUgMTkuNjkyMyAxMy40NjY1IDE5LjY5MjMgMTQuNDI2NkMxOS42OTIzIDE1LjM4NjggMjAuNTE5MiAxNi4xNjU4IDIxLjUzODUgMTYuMTY1OEMyMi41NTc3IDE2LjE2NTggMjMuMzg0NiAxNS4zODY4IDIzLjM4NDYgMTQuNDI2NkMyMy4zODQ2IDEzLjQ2NjUgMjIuNTU3NyAxMi42ODc1IDIxLjUzODUgMTIuNjg3NVpNMjEuNTM4NSAxNi4xNjU4QzIwLjE4NTEgMTYuMTY1OCAxOS4wNzY5IDE3LjIwOTcgMTkuMDc2OSAxOC40ODQ2VjE5Ljc1MjdDMTkuMDc2OSAxOS43NTI3IDE5LjY5MjMgMjAuMjIzNyAyMS41Mzg1IDIwLjIyMzdDMjMuMzg0NiAyMC4yMjM3IDI0IDE5Ljc1MjcgMjQgMTkuNzUyN1YxOC40ODQ2QzI0IDE3LjIwOTcgMjIuODkxOCAxNi4xNjU4IDIxLjUzODUgMTYuMTY1OFpNMTYgMTUuMDA2M0MxNC45ODA4IDE1LjAwNjMgMTQuMTUzOCAxNS43ODUzIDE0LjE1MzggMTYuNzQ1NUMxNC4xNTM4IDE3LjcwNTYgMTQuOTgwOCAxOC40ODQ2IDE2IDE4LjQ4NDZDMTcuMDE5MiAxOC40ODQ2IDE3Ljg0NjIgMTcuNzA1NiAxNy44NDYyIDE2Ljc0NTVDMTcuODQ2MiAxNS43ODUzIDE3LjAxOTIgMTUuMDA2MyAxNiAxNS4wMDYzWk0xNiAxOC40ODQ2QzE0LjY0NjYgMTguNDg0NiAxMy41Mzg1IDE5LjUyODUgMTMuNTM4NSAyMC44MDM0VjIyLjA3MTVDMTMuNTM4NSAyMi4wNzE1IDE0LjE1MzggMjIuNTQyNSAxNiAyMi41NDI1QzE3Ljg0NjIgMjIuNTQyNSAxOC40NjE1IDIyLjA3MTUgMTguNDYxNSAyMi4wNzE1VjIwLjgwMzRDMTguNDYxNSAxOS41Mjg1IDE3LjM1MzQgMTguNDg0NiAxNiAxOC40ODQ2WiIgZmlsbD0iIzEwN0Q1NyIvPgo8cGF0aCBvcGFjaXR5PSIwLjUiIGQ9Ik0xMy4zOTA4IDlDMTIuMzEwMyA5IDExLjQzMzYgOS44MjU4NCAxMS40MzM2IDEwLjg0MzdDMTEuNDMzNiAxMS44NjE2IDEyLjMxMDMgMTIuNjg3NSAxMy4zOTA4IDEyLjY4NzVDMTQuNDcxMyAxMi42ODc1IDE1LjM0OCAxMS44NjE2IDE1LjM0OCAxMC44NDM3QzE1LjM0OCA5LjgyNTg0IDE0LjQ3MTMgOSAxMy4zOTA4IDlaTTEzLjM5MDggMTIuNjg3NUMxMy4xOTQ2IDEyLjY4NzUgMTIuOTk1OCAxMi42ODI3IDEyLjc5OTYgMTIuNzQ1MUMxMy4xOTIgMTMuMjM3MiAxMy4zOTA4IDEzLjg1NDIgMTMuMzkwOCAxNC41MzEyQzEzLjM5MDggMTQuNzc2MSAxMy4zMjk2IDE1LjAxNjEgMTMuMzI5NiAxNS4yNjFDMTMuODUyMSAxNC41MjQgMTQuNjk1NiAxNC4wMzkxIDE1LjY3NDIgMTMuOTE2NkMxNS4yMTggMTMuMTc5NiAxNC4zNjk0IDEyLjY4NzUgMTMuMzkwOCAxMi42ODc1Wk0xOC42MSA5QzE3LjUyOTUgOSAxNi42NTI4IDkuODI1ODQgMTYuNjUyOCAxMC44NDM3QzE2LjY1MjggMTEuODYxNiAxNy41Mjk1IDEyLjY4NzUgMTguNjEgMTIuNjg3NUMxOS42OTA1IDEyLjY4NzUgMjAuNTY3MiAxMS44NjE2IDIwLjU2NzIgMTAuODQzN0MyMC41NjcyIDkuODI1ODQgMTkuNjkwNSA5IDE4LjYxIDlaTTE4LjYxIDEyLjY4NzVDMTcuNjMxNCAxMi42ODc1IDE2Ljc4MjggMTMuMTc5NiAxNi4zMjY2IDEzLjkxNjZDMTcuMzA1MiAxNC4wMzkxIDE4LjE0ODcgMTQuNTI0IDE4LjY3MTIgMTUuMjYxQzE4LjY3MTIgMTUuMDE2MSAxOC42MSAxNC43NzYxIDE4LjYxIDE0LjUzMTJDMTguNjEgMTMuODU0MiAxOC44MDg4IDEzLjIzNzIgMTkuMjAxMiAxMi43NDUxQzE5LjAwNSAxMi42ODI3IDE4LjgwNjIgMTIuNjg3NSAxOC42MSAxMi42ODc1WiIgZmlsbD0iIzEwN0Q1NyIvPgo8L3N2Zz4K", Wn = ({ title: e, description: n, onClick: i, className: r }) => /* @__PURE__ */ a($n, { onClick: i, className: r, children: [
875
- /* @__PURE__ */ s(Yn, { alt: "friends-icon", src: _n }),
876
- /* @__PURE__ */ a(Un, { children: [
877
- /* @__PURE__ */ s(Rn, { children: e }),
878
- /* @__PURE__ */ s(qn, { children: n })
877
+ }), Yn = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", Zn = ({ title: e, description: n, onClick: t, className: i }) => /* @__PURE__ */ a(Un, { onClick: t, className: i, children: [
878
+ /* @__PURE__ */ s(jn, { alt: "friends-icon", src: Yn }),
879
+ /* @__PURE__ */ a(Bn, { children: [
880
+ /* @__PURE__ */ s(zn, { children: e }),
881
+ /* @__PURE__ */ s(Fn, { children: n })
879
882
  ] }),
880
- /* @__PURE__ */ s(Vn, { name: "icon-copy" })
883
+ /* @__PURE__ */ s(Wn, { name: "icon-copy" })
881
884
  ] });
882
- function Bn(e) {
883
- var n = e.lastRenderedStartIndex, i = e.lastRenderedStopIndex, r = e.startIndex, o = e.stopIndex;
884
- return !(r > i || o < n);
885
+ function Gn(e) {
886
+ var n = e.lastRenderedStartIndex, t = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
887
+ return !(i > t || r < n);
885
888
  }
886
- function Zn(e) {
887
- for (var n = e.isItemLoaded, i = e.itemCount, r = e.minimumBatchSize, o = e.startIndex, d = e.stopIndex, c = [], l = null, u = null, I = o; I <= d; I++) {
888
- var p = n(I);
889
- p ? u !== null && (c.push(l, u), l = u = null) : (u = I, l === null && (l = I));
889
+ function Kn(e) {
890
+ for (var n = e.isItemLoaded, t = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, p = e.stopIndex, l = [], d = null, c = null, u = r; u <= p; u++) {
891
+ var m = n(u);
892
+ m ? c !== null && (l.push(d, c), d = c = null) : (c = u, d === null && (d = u));
890
893
  }
891
- if (u !== null) {
892
- for (var N = Math.min(Math.max(u, l + r - 1), i - 1), T = u + 1; T <= N && !n(T); T++)
893
- u = T;
894
- c.push(l, u);
894
+ if (c !== null) {
895
+ for (var v = Math.min(Math.max(c, d + i - 1), t - 1), I = c + 1; I <= v && !n(I); I++)
896
+ c = I;
897
+ l.push(d, c);
895
898
  }
896
- if (c.length)
897
- for (; c[1] - c[0] + 1 < r && c[0] > 0; ) {
898
- var m = c[0] - 1;
899
- if (!n(m))
900
- c[0] = m;
899
+ if (l.length)
900
+ for (; l[1] - l[0] + 1 < i && l[0] > 0; ) {
901
+ var f = l[0] - 1;
902
+ if (!n(f))
903
+ l[0] = f;
901
904
  else
902
905
  break;
903
906
  }
904
- return c;
907
+ return l;
905
908
  }
906
- var Fn = function(e, n) {
909
+ var Jn = function(e, n) {
907
910
  if (!(e instanceof n))
908
911
  throw new TypeError("Cannot call a class as a function");
909
- }, Gn = function() {
910
- function e(n, i) {
911
- for (var r = 0; r < i.length; r++) {
912
- var o = i[r];
913
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(n, o.key, o);
912
+ }, Xn = /* @__PURE__ */ function() {
913
+ function e(n, t) {
914
+ for (var i = 0; i < t.length; i++) {
915
+ var r = t[i];
916
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, r.key, r);
914
917
  }
915
918
  }
916
- return function(n, i, r) {
917
- return i && e(n.prototype, i), r && e(n, r), n;
919
+ return function(n, t, i) {
920
+ return t && e(n.prototype, t), i && e(n, i), n;
918
921
  };
919
- }(), Hn = function(e, n) {
922
+ }(), et = function(e, n) {
920
923
  if (typeof n != "function" && n !== null)
921
924
  throw new TypeError("Super expression must either be null or a function, not " + typeof n);
922
925
  e.prototype = Object.create(n && n.prototype, {
@@ -933,24 +936,24 @@ var Fn = function(e, n) {
933
936
  return n && (typeof n == "object" || typeof n == "function") ? n : e;
934
937
  };
935
938
  (function(e) {
936
- Hn(n, e);
939
+ et(n, e);
937
940
  function n() {
938
- var i, r, o, d;
939
- Fn(this, n);
940
- for (var c = arguments.length, l = Array(c), u = 0; u < c; u++)
941
- l[u] = arguments[u];
942
- return d = (r = (o = de(this, (i = n.__proto__ || Object.getPrototypeOf(n)).call.apply(i, [this].concat(l))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(I) {
943
- var p = I.visibleStartIndex, N = I.visibleStopIndex;
944
- o._lastRenderedStartIndex = p, o._lastRenderedStopIndex = N, o._ensureRowsLoaded(p, N);
945
- }, o._setRef = function(I) {
946
- o._listRef = I;
947
- }, r), de(o, d);
941
+ var t, i, r, p;
942
+ Jn(this, n);
943
+ for (var l = arguments.length, d = Array(l), c = 0; c < l; c++)
944
+ d[c] = arguments[c];
945
+ return p = (i = (r = de(this, (t = n.__proto__ || Object.getPrototypeOf(n)).call.apply(t, [this].concat(d))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(u) {
946
+ var m = u.visibleStartIndex, v = u.visibleStopIndex;
947
+ r._lastRenderedStartIndex = m, r._lastRenderedStopIndex = v, r._ensureRowsLoaded(m, v);
948
+ }, r._setRef = function(u) {
949
+ r._listRef = u;
950
+ }, i), de(r, p);
948
951
  }
949
- return Gn(n, [{
952
+ return Xn(n, [{
950
953
  key: "resetloadMoreItemsCache",
951
954
  value: function() {
952
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
953
- this._memoizedUnloadedRanges = [], r && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
955
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
956
+ this._memoizedUnloadedRanges = [], i && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
954
957
  }
955
958
  }, {
956
959
  key: "componentDidMount",
@@ -959,126 +962,127 @@ var Fn = function(e, n) {
959
962
  }, {
960
963
  key: "render",
961
964
  value: function() {
962
- var r = this.props.children;
963
- return r({
965
+ var i = this.props.children;
966
+ return i({
964
967
  onItemsRendered: this._onItemsRendered,
965
968
  ref: this._setRef
966
969
  });
967
970
  }
968
971
  }, {
969
972
  key: "_ensureRowsLoaded",
970
- value: function(r, o) {
971
- var d = this.props, c = d.isItemLoaded, l = d.itemCount, u = d.minimumBatchSize, I = u === void 0 ? 10 : u, p = d.threshold, N = p === void 0 ? 15 : p, T = Zn({
972
- isItemLoaded: c,
973
- itemCount: l,
974
- minimumBatchSize: I,
975
- startIndex: Math.max(0, r - N),
976
- stopIndex: Math.min(l - 1, o + N)
973
+ value: function(i, r) {
974
+ var p = this.props, l = p.isItemLoaded, d = p.itemCount, c = p.minimumBatchSize, u = c === void 0 ? 10 : c, m = p.threshold, v = m === void 0 ? 15 : m, I = Kn({
975
+ isItemLoaded: l,
976
+ itemCount: d,
977
+ minimumBatchSize: u,
978
+ startIndex: Math.max(0, i - v),
979
+ stopIndex: Math.min(d - 1, r + v)
977
980
  });
978
- (this._memoizedUnloadedRanges.length !== T.length || this._memoizedUnloadedRanges.some(function(m, k) {
979
- return T[k] !== m;
980
- })) && (this._memoizedUnloadedRanges = T, this._loadUnloadedRanges(T));
981
+ (this._memoizedUnloadedRanges.length !== I.length || this._memoizedUnloadedRanges.some(function(f, w) {
982
+ return I[w] !== f;
983
+ })) && (this._memoizedUnloadedRanges = I, this._loadUnloadedRanges(I));
981
984
  }
982
985
  }, {
983
986
  key: "_loadUnloadedRanges",
984
- value: function(r) {
985
- for (var o = this, d = this.props.loadMoreItems || this.props.loadMoreRows, c = function(I) {
986
- var p = r[I], N = r[I + 1], T = d(p, N);
987
- T != null && T.then(function() {
988
- if (Bn({
989
- lastRenderedStartIndex: o._lastRenderedStartIndex,
990
- lastRenderedStopIndex: o._lastRenderedStopIndex,
991
- startIndex: p,
992
- stopIndex: N
987
+ value: function(i) {
988
+ for (var r = this, p = this.props.loadMoreItems || this.props.loadMoreRows, l = function(u) {
989
+ var m = i[u], v = i[u + 1], I = p(m, v);
990
+ I != null && I.then(function() {
991
+ if (Gn({
992
+ lastRenderedStartIndex: r._lastRenderedStartIndex,
993
+ lastRenderedStopIndex: r._lastRenderedStopIndex,
994
+ startIndex: m,
995
+ stopIndex: v
993
996
  })) {
994
- if (o._listRef == null)
997
+ if (r._listRef == null)
995
998
  return;
996
- typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(p, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
999
+ typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(m, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
997
1000
  }
998
1001
  });
999
- }, l = 0; l < r.length; l += 2)
1000
- c(l);
1002
+ }, d = 0; d < i.length; d += 2)
1003
+ l(d);
1001
1004
  }
1002
1005
  }]), n;
1003
- })(Qe);
1004
- const Jn = /* @__PURE__ */ t("div")({
1006
+ })(Te);
1007
+ const st = /* @__PURE__ */ o("div")({
1005
1008
  name: "Container",
1006
1009
  class: "culdu4a",
1007
1010
  propsAsIs: !1
1008
- }), Xn = /* @__PURE__ */ t("div")({
1011
+ }), nt = /* @__PURE__ */ o("div")({
1009
1012
  name: "Position",
1010
1013
  class: "pwf8e69",
1011
1014
  propsAsIs: !1
1012
- }), Kn = /* @__PURE__ */ t("img")({
1015
+ }), tt = /* @__PURE__ */ o("img")({
1013
1016
  name: "Avatar",
1014
1017
  class: "atf4yh4",
1015
1018
  propsAsIs: !1
1016
- }), et = /* @__PURE__ */ t("div")({
1019
+ }), ot = /* @__PURE__ */ o("div")({
1017
1020
  name: "AvatarPlaceholder",
1018
1021
  class: "a1dg29ja",
1019
1022
  propsAsIs: !1
1020
- }), st = /* @__PURE__ */ t("div")({
1023
+ }), it = /* @__PURE__ */ o("div")({
1021
1024
  name: "Content",
1022
1025
  class: "c10a68rc",
1023
1026
  propsAsIs: !1
1024
- }), nt = /* @__PURE__ */ t("div")({
1027
+ }), rt = /* @__PURE__ */ o("div")({
1025
1028
  name: "NameContainer",
1026
1029
  class: "nc4kck5",
1027
1030
  propsAsIs: !1
1028
- }), tt = /* @__PURE__ */ t("span")({
1031
+ }), at = /* @__PURE__ */ o("span")({
1029
1032
  name: "Name",
1030
1033
  class: "njsrqgr",
1031
1034
  propsAsIs: !1
1032
- }), it = () => A, ot = /* @__PURE__ */ t(it())({
1035
+ }), lt = () => $, ct = /* @__PURE__ */ o(lt())({
1033
1036
  name: "CurrentUserBadge",
1034
1037
  class: "c17uc4zr",
1035
1038
  propsAsIs: !0
1036
- }), rt = ({
1039
+ }), dt = ({
1037
1040
  rank: e,
1038
1041
  avatar: n,
1039
- name: i,
1040
- points: r,
1041
- isCurrentUser: o,
1042
- openItemDetail: d,
1043
- style: c
1044
- }) => /* @__PURE__ */ a(Jn, { onClick: d, style: c, children: [
1045
- /* @__PURE__ */ s(Xn, { children: e || 0 }),
1046
- /* @__PURE__ */ a(st, { children: [
1047
- n ? /* @__PURE__ */ s(Kn, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(et, { children: De(i || "") }),
1048
- /* @__PURE__ */ a(nt, { children: [
1049
- /* @__PURE__ */ s(tt, { children: i || "" }),
1050
- o && /* @__PURE__ */ s(ot, { name: "icon-star" })
1042
+ name: t,
1043
+ points: i,
1044
+ isCurrentUser: r,
1045
+ openItemDetail: p,
1046
+ style: l
1047
+ }) => /* @__PURE__ */ a(st, { onClick: p, style: l, children: [
1048
+ /* @__PURE__ */ s(nt, { children: e || 0 }),
1049
+ /* @__PURE__ */ a(it, { children: [
1050
+ n ? /* @__PURE__ */ s(tt, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(ot, { children: ve(t || "") }),
1051
+ /* @__PURE__ */ a(rt, { children: [
1052
+ /* @__PURE__ */ s(at, { children: t || "" }),
1053
+ r && /* @__PURE__ */ s(ct, { name: "icon-star" })
1051
1054
  ] })
1052
1055
  ] }),
1053
- /* @__PURE__ */ s("div", { children: Te(r) })
1054
- ] }), at = /* @__PURE__ */ t("div")({
1056
+ /* @__PURE__ */ s("div", { children: Ce(i) })
1057
+ ] }), pt = /* @__PURE__ */ o("div")({
1055
1058
  name: "Container",
1056
1059
  class: "c16btbfp",
1057
1060
  propsAsIs: !1
1058
- }), ct = ({
1061
+ }), ut = ({
1059
1062
  items: e,
1060
1063
  currentUserId: n,
1061
- openItemDetail: i,
1062
- fetchMore: r,
1063
- scrollNode: o,
1064
- hasMore: d
1065
- }) => /* @__PURE__ */ s(Ye, {
1066
- loadMore: r,
1064
+ openItemDetail: t,
1065
+ fetchMore: i,
1066
+ scrollNode: r,
1067
+ hasMore: p
1068
+ }) => /* @__PURE__ */ s(_e, {
1069
+ loadMore: i,
1067
1070
  initialLoad: !1,
1068
- hasMore: d,
1071
+ hasMore: p,
1069
1072
  useWindow: !1,
1070
- getScrollParent: () => o.current,
1071
- children: /* @__PURE__ */ s(at, {
1072
- children: e.map((c) => /* @__PURE__ */ s(rt, {
1073
- ...c,
1074
- openItemDetail: () => i(c.userId),
1075
- isCurrentUser: !!n && n === c.userId
1076
- }, c.userId))
1073
+ getScrollParent: () => r.current,
1074
+ children: /* @__PURE__ */ s(pt, {
1075
+ children: e.map((l) => /* @__PURE__ */ s(dt, {
1076
+ ...l,
1077
+ openItemDetail: () => t(l.userId),
1078
+ isCurrentUser: !!n && n === l.userId
1079
+ }, l.userId))
1077
1080
  })
1078
- }), lt = ({ deepLink: e }) => /* @__PURE__ */ s(
1079
- Oe,
1081
+ }), mt = ({ renderClipBoardNode: e, deepLink: n }) => /* @__PURE__ */ s(
1082
+ Ee,
1080
1083
  {
1081
- inviteLink: e,
1084
+ renderToNode: e,
1085
+ inviteLink: n,
1082
1086
  socialLinks: [
1083
1087
  {
1084
1088
  icon: "icon-facebook",
@@ -1094,288 +1098,335 @@ const Jn = /* @__PURE__ */ t("div")({
1094
1098
  inviteCardTitle: "It’s More Fun With Friends",
1095
1099
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1096
1100
  }
1097
- ), dt = /* @__PURE__ */ t("div")({
1101
+ ), ht = /* @__PURE__ */ o("div")({
1098
1102
  name: "InviteLinkContainer",
1099
1103
  class: "i1chxfpe",
1100
1104
  propsAsIs: !1
1101
- }), ut = ({
1105
+ }), It = ({
1102
1106
  gamification: e,
1103
1107
  scrollNode: n,
1104
- scrollStore: i
1108
+ scrollStore: t,
1109
+ renderClipBoardNode: i
1105
1110
  }) => {
1106
1111
  const {
1107
1112
  data: r,
1108
- hasMore: o
1109
- } = Q(e.leaderboardList.$store), {
1110
- data: d
1111
- } = Q(e.deepLink.$store);
1112
- if (!(r != null && r.length))
1113
- return /* @__PURE__ */ s(lt, {
1114
- deepLink: d
1115
- });
1116
- const c = async () => {
1117
- if (d)
1118
- try {
1119
- await navigator.clipboard.writeText(d);
1120
- } catch (l) {
1121
- console.error("Unable to copy to clipboard", l);
1122
- }
1123
- };
1124
- return /* @__PURE__ */ a(z, {
1125
- children: [/* @__PURE__ */ s(ct, {
1113
+ hasMore: p,
1114
+ loading: l,
1115
+ key: d
1116
+ } = L(e.leaderboardList.$store), {
1117
+ data: c
1118
+ } = L(e.deepLink.$store), [u, m] = Ne(i);
1119
+ return !r.length && !l ? /* @__PURE__ */ s(mt, {
1120
+ renderClipBoardNode: i,
1121
+ deepLink: c
1122
+ }) : /* @__PURE__ */ a(E, {
1123
+ children: [/* @__PURE__ */ s(ut, {
1126
1124
  items: r,
1127
1125
  scrollNode: n,
1128
- scrollStore: i,
1126
+ scrollStore: t,
1129
1127
  fetchMore: e.leaderboardList.fetchMore,
1130
- hasMore: o,
1128
+ hasMore: p,
1131
1129
  openItemDetail: e.openUser,
1132
1130
  currentUserId: e.currentUserId.get()
1133
- }), d && /* @__PURE__ */ s(dt, {
1134
- children: /* @__PURE__ */ s(Wn, {
1135
- onClick: c,
1131
+ }, d), c && /* @__PURE__ */ s(ht, {
1132
+ children: /* @__PURE__ */ s(Zn, {
1133
+ onClick: () => u(c),
1136
1134
  title: "Invite Friends",
1137
1135
  description: "Challenge them now!"
1138
1136
  })
1139
- })]
1137
+ }), m]
1140
1138
  });
1141
- }, Mt = /* @__PURE__ */ t("div")({
1139
+ }, vt = /* @__PURE__ */ o("div")({
1142
1140
  name: "QuestionItem",
1143
1141
  class: "q1w97g3p",
1144
1142
  propsAsIs: !1
1145
- }), It = /* @__PURE__ */ t("div")({
1143
+ }), Ct = /* @__PURE__ */ o("div")({
1146
1144
  name: "QuestionCaption",
1147
1145
  class: "q2sl39u",
1148
1146
  propsAsIs: !1
1149
- }), pt = /* @__PURE__ */ t("div")({
1147
+ }), ft = /* @__PURE__ */ o("div")({
1150
1148
  name: "QuestionBody",
1151
1149
  class: "qd5h0uc",
1152
1150
  propsAsIs: !1
1153
- }), Nt = /* @__PURE__ */ t("div")({
1151
+ }), At = /* @__PURE__ */ o("div")({
1154
1152
  name: "QuestionAction",
1155
1153
  class: "q105uluy",
1156
1154
  propsAsIs: !1
1157
- }), Dt = () => A, F = /* @__PURE__ */ t(Dt())({
1155
+ }), gt = () => $, Y = /* @__PURE__ */ o(gt())({
1158
1156
  name: "QuestionActionIcon",
1159
1157
  class: "q1fa0b9h",
1160
1158
  propsAsIs: !0
1161
- }), Tt = () => A, At = /* @__PURE__ */ t(Tt())({
1159
+ }), $t = () => $, bt = /* @__PURE__ */ o($t())({
1162
1160
  name: "QuestionTypeIcon",
1163
1161
  class: "qxlt78s",
1164
1162
  propsAsIs: !0
1165
- }), mt = /* @__PURE__ */ t("div")({
1163
+ }), yt = /* @__PURE__ */ o("div")({
1166
1164
  name: "QuestionTypeLabel",
1167
1165
  class: "qmg0vkx",
1168
1166
  propsAsIs: !1
1169
- }), gt = /* @__PURE__ */ t("div")({
1167
+ }), wt = /* @__PURE__ */ o("div")({
1170
1168
  name: "QuestionContent",
1171
1169
  class: "q1uz5j1g",
1172
1170
  propsAsIs: !1
1173
- }), jt = /* @__PURE__ */ t("button")({
1171
+ }), Rt = /* @__PURE__ */ o("button")({
1174
1172
  name: "PlayButton",
1175
1173
  class: "p1pba9p1",
1176
1174
  propsAsIs: !1
1177
- }), yt = {
1178
- [W.LOST]: /* @__PURE__ */ s(F, { name: "incorrectVoted" }),
1179
- [W.WON]: /* @__PURE__ */ s(F, { name: "icon-check" }),
1180
- [W.UNSET]: /* @__PURE__ */ s(F, { name: "icon-arrow" }),
1181
- [W.DNP]: /* @__PURE__ */ s(F, { name: "icon-arrow" })
1182
- }, ht = ({
1175
+ }), Tt = {
1176
+ [F.LOST]: /* @__PURE__ */ s(Y, { name: "incorrectVoted" }),
1177
+ [F.WON]: /* @__PURE__ */ s(Y, { name: "icon-check" }),
1178
+ [F.UNSET]: /* @__PURE__ */ s(Y, { name: "icon-arrow" }),
1179
+ [F.DNP]: /* @__PURE__ */ s(Y, { name: "icon-arrow" })
1180
+ }, kt = ({
1183
1181
  questionId: e,
1184
1182
  questionType: n,
1185
- questionStatus: i,
1186
- subject: r,
1187
- openForVoting: o,
1188
- openQuestion: d,
1189
- status: c
1183
+ questionStatus: t,
1184
+ subject: i,
1185
+ openForVoting: r,
1186
+ openQuestion: p,
1187
+ status: l
1190
1188
  }) => {
1191
- const l = Me[n], u = yt[c];
1192
- return l ? /* @__PURE__ */ a(Mt, { onClick: () => d == null ? void 0 : d(e), children: [
1193
- /* @__PURE__ */ a(gt, { children: [
1194
- /* @__PURE__ */ a(It, { children: [
1189
+ const d = ue[n], c = Tt[l];
1190
+ return d ? /* @__PURE__ */ a(vt, { onClick: () => p == null ? void 0 : p(e), children: [
1191
+ /* @__PURE__ */ a(wt, { children: [
1192
+ /* @__PURE__ */ a(Ct, { children: [
1195
1193
  /* @__PURE__ */ s(
1196
- At,
1194
+ bt,
1197
1195
  {
1198
- "data-type-trivia": n === M.TRIVIA,
1199
- "data-type-poll": n === M.POLL,
1200
- name: l.iconName
1196
+ "data-type-trivia": n === h.TRIVIA,
1197
+ "data-type-poll": n === h.POLL,
1198
+ name: d.iconName
1201
1199
  }
1202
1200
  ),
1203
- /* @__PURE__ */ a(mt, { children: [
1204
- l.label,
1205
- n === M.TRIVIA && i === C.RESOLVED && " • Expired"
1201
+ /* @__PURE__ */ a(yt, { children: [
1202
+ d.label,
1203
+ n === h.TRIVIA && t === D.RESOLVED && " • Expired"
1206
1204
  ] })
1207
1205
  ] }),
1208
- /* @__PURE__ */ s(pt, { children: r || "" })
1206
+ /* @__PURE__ */ s(ft, { children: i || "" })
1209
1207
  ] }),
1210
- /* @__PURE__ */ s(Nt, { children: o ? /* @__PURE__ */ s(jt, { children: "Play" }) : u })
1208
+ /* @__PURE__ */ s(At, { children: r ? /* @__PURE__ */ s(Rt, { children: "Play" }) : c })
1211
1209
  ] }) : null;
1212
- }, xt = /* @__PURE__ */ t("div")({
1210
+ }, St = /* @__PURE__ */ o("div")({
1213
1211
  name: "Container",
1214
1212
  class: "cll3md7",
1215
1213
  propsAsIs: !1
1216
- }), zt = /* @__PURE__ */ t("button")({
1214
+ }), xt = /* @__PURE__ */ o("button")({
1217
1215
  name: "ActionBtn",
1218
1216
  class: "a10g1iik",
1219
1217
  propsAsIs: !1
1220
- }), Et = ({
1218
+ }), qt = ({
1221
1219
  openInsight: e,
1222
1220
  questionId: n,
1223
- ...i
1224
- }) => /* @__PURE__ */ a(xt, { children: [
1225
- /* @__PURE__ */ s(ge, { questionId: n, ...i, isPickHistory: !0 }),
1226
- e && /* @__PURE__ */ s(zt, { onClick: () => e(n), children: "View Insight" })
1227
- ] }), vt = /* @__PURE__ */ t("div")({
1221
+ ...t
1222
+ }) => /* @__PURE__ */ a(St, { children: [
1223
+ /* @__PURE__ */ s(ge, { questionId: n, ...t, isPickHistory: !0 }),
1224
+ e && /* @__PURE__ */ s(xt, { onClick: () => e(n), children: "View Insight" })
1225
+ ] }), Et = /* @__PURE__ */ o("div")({
1228
1226
  name: "Container",
1229
1227
  class: "cl56x6b",
1230
1228
  propsAsIs: !1
1231
- }), Ot = () => Le, Lt = /* @__PURE__ */ t(Ot())({
1229
+ }), Nt = () => Le, Lt = /* @__PURE__ */ o(Nt())({
1232
1230
  name: "ActionButton",
1233
1231
  class: "a11pzf92",
1234
1232
  propsAsIs: !0
1235
- }), Ct = /* @__PURE__ */ t("div")({
1233
+ }), Dt = /* @__PURE__ */ o("div")({
1236
1234
  name: "DateTime",
1237
1235
  class: "d1hbaleq",
1238
1236
  propsAsIs: !1
1239
- }), kt = /* @__PURE__ */ t("blockquote")({
1237
+ }), Vt = /* @__PURE__ */ o("blockquote")({
1240
1238
  name: "Quote",
1241
1239
  class: "qvvgqjm",
1242
1240
  propsAsIs: !1
1243
- }), St = ({
1241
+ }), Pt = ({
1244
1242
  openTweet: e,
1245
1243
  created: n,
1246
- ...i
1244
+ ...t
1247
1245
  }) => {
1248
- const r = v(() => {
1246
+ const i = q(() => {
1249
1247
  if (n) {
1250
- const o = new Date(n);
1251
- if (ne(o))
1248
+ const r = new Date(n);
1249
+ if (ne(r))
1252
1250
  return {
1253
- date: ee(o),
1254
- time: se(o)
1251
+ date: ee(r),
1252
+ time: se(r)
1255
1253
  };
1256
1254
  }
1257
1255
  return null;
1258
1256
  }, [n]);
1259
- return /* @__PURE__ */ a(vt, { children: [
1260
- r && /* @__PURE__ */ a(Ct, { children: [
1261
- r.date,
1257
+ return /* @__PURE__ */ a(Et, { children: [
1258
+ i && /* @__PURE__ */ a(Dt, { children: [
1259
+ i.date,
1262
1260
  " · ",
1263
- r.time
1261
+ i.time
1264
1262
  ] }),
1265
- i.title && /* @__PURE__ */ s(kt, { children: i.title }),
1266
- /* @__PURE__ */ s(Ie, { ...i }),
1267
- e && /* @__PURE__ */ s(Lt, { onClick: () => e(i.tweetId), children: "View Insight" })
1263
+ t.title && /* @__PURE__ */ s(Vt, { children: t.title }),
1264
+ /* @__PURE__ */ s(me, { ...t }),
1265
+ e && /* @__PURE__ */ s(Lt, { onClick: () => e(t.tweetId), children: "View Insight" })
1268
1266
  ] });
1269
- }, ft = /* @__PURE__ */ t("div")({
1267
+ }, Ot = /* @__PURE__ */ o("div")({
1270
1268
  name: "QuestionsContainer",
1271
1269
  class: "qvghv3l",
1272
1270
  propsAsIs: !1
1273
- }), wt = ({ questions: e, openQuestion: n }) => /* @__PURE__ */ s(ft, { children: e == null ? void 0 : e.map((i) => {
1274
- var r, o, d;
1275
- if (i.type === "question" && ((r = i.attributes) == null ? void 0 : r.attributes.case) === "question") {
1276
- const c = i.attributes.attributes.value;
1277
- return /* @__PURE__ */ s(ht, { openQuestion: n, ...c }, c.questionId);
1271
+ }), Mt = ({ questions: e, openQuestion: n }) => /* @__PURE__ */ s(Ot, { children: e == null ? void 0 : e.map((t) => {
1272
+ var i, r, p;
1273
+ if (t.type === "question" && ((i = t.attributes) == null ? void 0 : i.attributes.case) === "question") {
1274
+ const l = t.attributes.attributes.value;
1275
+ return /* @__PURE__ */ s(kt, { openQuestion: n, ...l }, l.questionId);
1278
1276
  }
1279
- if (i.type === "insight" && ((o = i.attributes) == null ? void 0 : o.attributes.case) === "insight") {
1280
- const c = i.attributes.attributes.value, l = i.attributes.created;
1281
- return /* @__PURE__ */ s(Et, { openInsight: n, ...c, created: l }, c.questionId);
1277
+ if (t.type === "insight" && ((r = t.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1278
+ const l = t.attributes.attributes.value, d = t.attributes.created;
1279
+ return /* @__PURE__ */ s(qt, { openInsight: n, ...l, created: d }, l.questionId);
1282
1280
  }
1283
- if (i.type === "tweet" && ((d = i.attributes) == null ? void 0 : d.attributes.case) === "tweet") {
1284
- const c = i.attributes.attributes.value, l = i.attributes.id, u = i.attributes.created;
1285
- return /* @__PURE__ */ s(St, { openTweet: n, ...c, tweetId: l, created: u }, l);
1281
+ if (t.type === "tweet" && ((p = t.attributes) == null ? void 0 : p.attributes.case) === "tweet") {
1282
+ const l = t.attributes.attributes.value, d = t.attributes.id, c = t.attributes.created;
1283
+ return /* @__PURE__ */ s(Pt, { openTweet: n, ...l, tweetId: d, created: c }, d);
1286
1284
  }
1287
1285
  return null;
1288
1286
  }) }), Qt = ({ store: e, openQuestion: n }) => {
1289
- const i = Q(e);
1290
- return i != null && i.data ? /* @__PURE__ */ s(wt, { openQuestion: n, questions: i.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1291
- }, bt = ({ userSummary: e }) => {
1287
+ const t = L(e);
1288
+ return t != null && t.data ? /* @__PURE__ */ s(Mt, { openQuestion: n, questions: t.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1289
+ }, _t = ({ userSummary: e }) => {
1292
1290
  var n;
1293
- const [i, r] = L(void 0);
1294
- return K(() => {
1295
- const o = e.subscribe((d) => {
1296
- d != null && d.data && r(d.data);
1291
+ const [t, i] = N(void 0);
1292
+ return G(() => {
1293
+ const r = e.subscribe((p) => {
1294
+ p != null && p.data && i(p.data);
1297
1295
  });
1298
1296
  return () => {
1299
- o();
1297
+ r();
1300
1298
  };
1301
- }, [e]), i != null && i.summary ? /* @__PURE__ */ s(Ae, { ...i.summary, successRate: (n = i.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1302
- }, $t = ({ gamification: e, className: n, scrollStore: i, scrollNode: r }) => {
1303
- const [o, d] = L(!1), [c, l] = L(G.HOME), [, u] = be(), I = (N) => {
1304
- u(() => l(N));
1305
- }, p = (N) => {
1306
- u(() => d(N));
1299
+ }, [e]), t != null && t.summary ? /* @__PURE__ */ s(fe, { ...t.summary, successRate: (n = t.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1300
+ }, Ut = ({ gamification: e, className: n, scrollStore: t, scrollNode: i, appNode: r, style: p, responsiveStore: l, headerNode: d }) => {
1301
+ const [c, u] = N(!1), [m, v] = N(Z.HOME), [, I] = ke(), { sdkInScrollView: f } = L(l, { keys: ["sdkInScrollView"] }), w = (g) => {
1302
+ I(() => {
1303
+ var k;
1304
+ v(g), f === !1 && ((k = r.current) == null || k.scrollIntoView({ behavior: "instant" }));
1305
+ });
1306
+ }, A = (g) => {
1307
+ I(() => u(g));
1307
1308
  };
1308
- return K(() => i.listen((N) => {
1309
- if (N.scrollPosition === 0) {
1310
- p(!1), i.setKey("tabsShown", !1);
1309
+ G(() => t.listen((g) => {
1310
+ if (g.scrollPosition === 0) {
1311
+ A(!1), t.setKey("tabsShown", !1);
1311
1312
  return;
1312
1313
  }
1313
- p(N.scrollDirection === "forward"), i.setKey("tabsShown", N.scrollDirection !== "forward");
1314
- }), [i]), /* @__PURE__ */ a(Ce, { className: n, children: [
1314
+ A(g.scrollDirection === "forward"), t.setKey("tabsShown", g.scrollDirection !== "forward");
1315
+ }), [t]);
1316
+ let T = "0px";
1317
+ f ? T = c ? "-60px" : "0px" : T = c ? "0px" : "68px";
1318
+ const b = f ? r : d;
1319
+ return /* @__PURE__ */ a(De, { className: n, style: p, children: [
1315
1320
  /* @__PURE__ */ s(
1316
- ke,
1321
+ Ve,
1317
1322
  {
1318
1323
  style: {
1319
- top: o ? "-60px" : "0px"
1324
+ top: T
1320
1325
  },
1321
- children: /* @__PURE__ */ s(bn, { activePage: c, toggleActivePage: I })
1326
+ children: /* @__PURE__ */ s(_n, { activePage: m, toggleActivePage: w })
1322
1327
  }
1323
1328
  ),
1324
- c === G.HOME && /* @__PURE__ */ a(z, { children: [
1325
- /* @__PURE__ */ s(pe, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(bt, { userSummary: e.userSummary }) }),
1326
- /* @__PURE__ */ s(Se, { style: { flex: 1 }, children: /* @__PURE__ */ s(Qt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1329
+ m === Z.HOME && /* @__PURE__ */ a(E, { children: [
1330
+ /* @__PURE__ */ s(he, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(_t, { userSummary: e.userSummary }) }),
1331
+ /* @__PURE__ */ s(Pe, { style: { flex: 1 }, children: /* @__PURE__ */ s(Qt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1327
1332
  ] }),
1328
- c === G.LEADERBOARD && /* @__PURE__ */ s(fe, { children: /* @__PURE__ */ s(ut, { scrollStore: i, scrollNode: r, gamification: e }) })
1333
+ m === Z.LEADERBOARD && /* @__PURE__ */ s(Oe, { children: /* @__PURE__ */ s(
1334
+ It,
1335
+ {
1336
+ renderClipBoardNode: b,
1337
+ scrollStore: t,
1338
+ scrollNode: i,
1339
+ gamification: e
1340
+ }
1341
+ ) })
1329
1342
  ] });
1330
- }, Yt = () => we, ue = /* @__PURE__ */ t(Yt())({
1343
+ }, jt = () => Me, pe = /* @__PURE__ */ o(jt())({
1331
1344
  name: "OpenedContainer",
1332
1345
  class: "oar61gl",
1333
1346
  propsAsIs: !0
1334
- }), Ut = /* @__PURE__ */ t("div")({
1347
+ }), Bt = /* @__PURE__ */ o("div")({
1335
1348
  name: "UserContainer",
1336
1349
  class: "u14zaal4",
1337
1350
  propsAsIs: !1
1338
- }), Rt = ({
1351
+ }), zt = ({
1339
1352
  correct: e,
1340
1353
  incorrect: n
1341
1354
  }) => {
1342
- const i = e + n;
1343
- return i === 0 ? 0 : Math.round(e / i * 100);
1344
- }, ti = ({
1355
+ const t = e + n;
1356
+ return t === 0 ? 0 : Math.round(e / t * 100);
1357
+ }, Ft = `
1358
+ body {
1359
+ overflow: hidden
1360
+ }
1361
+ `, lo = ({
1345
1362
  gamification: e,
1346
1363
  scrollStore: n,
1347
- className: i,
1348
- appNode: r,
1349
- scrollNode: o
1364
+ className: t,
1365
+ appNode: i,
1366
+ scrollNode: r,
1367
+ headerNode: p,
1368
+ responsiveStore: l
1350
1369
  }) => {
1351
- const d = Q(e.openedQuestion.$store), c = Q(e.openedUser);
1352
- return /* @__PURE__ */ a(z, {
1353
- children: [d && r.current && oe.createPortal(/* @__PURE__ */ s(ue, {
1354
- className: i,
1355
- children: /* @__PURE__ */ s(kn, {
1356
- gamification: e
1357
- })
1358
- }), r.current), c && r.current && oe.createPortal(/* @__PURE__ */ s(ue, {
1359
- className: i,
1360
- children: /* @__PURE__ */ a(Ut, {
1361
- children: [/* @__PURE__ */ s(Ne, {
1362
- label: "Friend's Rank",
1363
- close: e.closeUser
1364
- }), /* @__PURE__ */ s(pe, {
1365
- children: /* @__PURE__ */ s(Ae, {
1366
- ...c,
1367
- successRate: Rt(c)
1368
- })
1369
- })]
1370
- })
1371
- }), r.current), /* @__PURE__ */ s($t, {
1370
+ const d = L(e.openedQuestion.$store), c = L(e.openedUser), {
1371
+ sdkInScrollView: u
1372
+ } = L(l, {
1373
+ keys: ["sdkInScrollView"]
1374
+ }), m = Se(0), [v, I] = q(() => {
1375
+ var f;
1376
+ const w = u ? i : p, A = (((f = i.current) == null ? void 0 : f.getBoundingClientRect().y) || 0) < 0;
1377
+ if ((d || c) && w.current) {
1378
+ A && (m.current = window.scrollY);
1379
+ const T = () => (G(() => {
1380
+ const b = setTimeout(() => {
1381
+ var g;
1382
+ (g = i.current) == null || g.scrollIntoView();
1383
+ }, 1e3);
1384
+ return () => {
1385
+ clearTimeout(b), m.current !== 0 && (window.scroll({
1386
+ top: m.current
1387
+ }), m.current = 0);
1388
+ };
1389
+ }, []), /* @__PURE__ */ s("style", {
1390
+ children: Ft
1391
+ }));
1392
+ return [A, d ? ie.createPortal(/* @__PURE__ */ a(pe, {
1393
+ className: t,
1394
+ children: [/* @__PURE__ */ s(Vn, {
1395
+ gamification: e
1396
+ }), A && !u && /* @__PURE__ */ s(T, {})]
1397
+ }), w.current) : c ? ie.createPortal(/* @__PURE__ */ s(pe, {
1398
+ className: t,
1399
+ children: /* @__PURE__ */ a(Bt, {
1400
+ children: [/* @__PURE__ */ s(Ie, {
1401
+ label: "Friend's Rank",
1402
+ close: e.closeUser
1403
+ }), /* @__PURE__ */ s(he, {
1404
+ children: /* @__PURE__ */ s(fe, {
1405
+ ...c,
1406
+ successRate: zt(c)
1407
+ })
1408
+ })]
1409
+ })
1410
+ }), w.current) : null];
1411
+ }
1412
+ return [A, null];
1413
+ }, [i, t, e, p, d, c, u]);
1414
+ return /* @__PURE__ */ a(E, {
1415
+ children: [I, /* @__PURE__ */ s(Ut, {
1416
+ appNode: i,
1417
+ headerNode: p,
1372
1418
  scrollStore: n,
1373
- scrollNode: o,
1374
- className: i,
1375
- gamification: e
1419
+ scrollNode: r,
1420
+ className: t,
1421
+ gamification: e,
1422
+ responsiveStore: l,
1423
+ style: !u && !v && I !== null ? {
1424
+ height: "0",
1425
+ overflow: "hidden"
1426
+ } : {}
1376
1427
  })]
1377
1428
  });
1378
1429
  };
1379
1430
  export {
1380
- ti as default
1431
+ lo as default
1381
1432
  };