@streamlayer/react 0.29.10 → 0.29.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/index-56687fbe.cjs +1 -0
- package/lib/dist/{index-b48a730f.js → index-b7b397b9.js} +620 -590
- package/lib/dist/{masters-187c9707.js → masters-791400ce.js} +1042 -1028
- package/lib/dist/{masters-9e88aaec.cjs → masters-8c3bc143.cjs} +6 -6
- package/lib/dist/style.css +8 -5
- package/lib/es/masters.js +2 -2
- package/lib/es/points.js +9 -9
- package/lib/index-60fabb42.cjs +6 -0
- package/lib/{index-616b0bcd.js → index-81810ce0.js} +100 -86
- package/lib/index-9a1075fa.cjs +1 -0
- package/lib/{index-66ccd267.js → index-d3a5d095.js} +668 -638
- package/lib/{masters-5752c805.js → masters-a0c5967c.js} +45 -45
- package/lib/{masters-1b02c80d.cjs → masters-b0b09591.cjs} +1 -1
- package/lib/style.css +1 -1
- package/package.json +4 -4
- package/lib/dist/index-5d2b7e7a.cjs +0 -1
- package/lib/index-3f5c6152.cjs +0 -6
- package/lib/index-b0206045.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { s as o,
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as I, jsx as r, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { s as o, i as x, o as Oe, a as Ee, b as je, Q as D, c as Y, d as L, E as C, r as Le, e as Je, f as Ke, n as Xe, w as et, u as O, g as tt, P as V, h as ne, j as st, k as nt } from "./masters-791400ce.js";
|
|
3
|
+
import Q, { useRef as E, useState as R, useCallback as P, useEffect as it, useLayoutEffect as rt, useMemo as B, Component as at, createElement as G, PureComponent as $e } from "react";
|
|
4
4
|
const ot = () => x, lt = () => x, ct = /* @__PURE__ */ o("div")({
|
|
5
5
|
name: "a",
|
|
6
6
|
class: "acysrl1",
|
|
@@ -25,14 +25,14 @@ const ot = () => x, lt = () => x, ct = /* @__PURE__ */ o("div")({
|
|
|
25
25
|
name: "g",
|
|
26
26
|
class: "g1m0xfmw",
|
|
27
27
|
propsAsIs: !0
|
|
28
|
-
}),
|
|
28
|
+
}), Ce = ({ type: t, close: e, label: s }) => {
|
|
29
29
|
const n = t ? Oe[t] : { label: s, iconName: void 0 };
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
(n == null ? void 0 : n.iconName) && /* @__PURE__ */
|
|
33
|
-
(n == null ? void 0 : n.label) && /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ I(ct, { children: [
|
|
31
|
+
/* @__PURE__ */ I(dt, { children: [
|
|
32
|
+
(n == null ? void 0 : n.iconName) && /* @__PURE__ */ r(ut, { name: n.iconName }),
|
|
33
|
+
(n == null ? void 0 : n.label) && /* @__PURE__ */ r(pt, { children: n.label })
|
|
34
34
|
] }),
|
|
35
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ r(ht, { onClick: e, children: /* @__PURE__ */ r(mt, { name: "icon-cross" }) })
|
|
36
36
|
] });
|
|
37
37
|
};
|
|
38
38
|
const ft = /* @__PURE__ */ o("div")({
|
|
@@ -47,9 +47,9 @@ const ft = /* @__PURE__ */ o("div")({
|
|
|
47
47
|
name: "i",
|
|
48
48
|
class: "i1whkbqh",
|
|
49
49
|
propsAsIs: !1
|
|
50
|
-
}), pe = ({ indicator: t, title: e }) => /* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
50
|
+
}), pe = ({ indicator: t, title: e }) => /* @__PURE__ */ I(ft, { children: [
|
|
51
|
+
/* @__PURE__ */ r(gt, { children: e }),
|
|
52
|
+
/* @__PURE__ */ r(It, { children: t })
|
|
53
53
|
] });
|
|
54
54
|
const vt = /* @__PURE__ */ o("div")({
|
|
55
55
|
name: "i",
|
|
@@ -63,9 +63,9 @@ const vt = /* @__PURE__ */ o("div")({
|
|
|
63
63
|
name: "n",
|
|
64
64
|
class: "nwzed99",
|
|
65
65
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
66
|
+
}), H = ({ indicator: t, title: e }) => /* @__PURE__ */ I(vt, { children: [
|
|
67
|
+
/* @__PURE__ */ r(Mt, { children: t }),
|
|
68
|
+
/* @__PURE__ */ r(yt, { children: e })
|
|
69
69
|
] });
|
|
70
70
|
const zt = /* @__PURE__ */ o("div")({
|
|
71
71
|
name: "o",
|
|
@@ -103,11 +103,11 @@ const zt = /* @__PURE__ */ o("div")({
|
|
|
103
103
|
name: "l",
|
|
104
104
|
class: "lboqgs5",
|
|
105
105
|
propsAsIs: !1
|
|
106
|
-
}),
|
|
106
|
+
}), bt = /* @__PURE__ */ o("div")({
|
|
107
107
|
name: "d",
|
|
108
108
|
class: "d1oaal4",
|
|
109
109
|
propsAsIs: !1
|
|
110
|
-
}),
|
|
110
|
+
}), kt = /* @__PURE__ */ o("div")({
|
|
111
111
|
name: "x",
|
|
112
112
|
class: "x1yzgo0u",
|
|
113
113
|
propsAsIs: !1
|
|
@@ -127,11 +127,11 @@ const zt = /* @__PURE__ */ o("div")({
|
|
|
127
127
|
name: "u",
|
|
128
128
|
class: "u1gsbhq4",
|
|
129
129
|
propsAsIs: !1
|
|
130
|
-
}),
|
|
130
|
+
}), $t = /* @__PURE__ */ o("div")({
|
|
131
131
|
name: "m",
|
|
132
132
|
class: "mvj8oco",
|
|
133
133
|
propsAsIs: !1
|
|
134
|
-
}),
|
|
134
|
+
}), Ct = /* @__PURE__ */ o("button")({
|
|
135
135
|
name: "v",
|
|
136
136
|
class: "viqiaf2",
|
|
137
137
|
propsAsIs: !1
|
|
@@ -143,27 +143,27 @@ const zt = /* @__PURE__ */ o("div")({
|
|
|
143
143
|
rank: i,
|
|
144
144
|
streak: p,
|
|
145
145
|
correct: d,
|
|
146
|
-
incorrect:
|
|
146
|
+
incorrect: m,
|
|
147
147
|
inTop: h,
|
|
148
148
|
successRate: g
|
|
149
|
-
}) => /* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
t && /* @__PURE__ */
|
|
153
|
-
!t && /* @__PURE__ */
|
|
149
|
+
}) => /* @__PURE__ */ I(zt, { children: [
|
|
150
|
+
/* @__PURE__ */ r(Nt, { children: /* @__PURE__ */ I(_t, { children: [
|
|
151
|
+
/* @__PURE__ */ I(Ct, { children: [
|
|
152
|
+
t && /* @__PURE__ */ r(Tt, { alt: "avatar", src: t }),
|
|
153
|
+
!t && /* @__PURE__ */ r($t, { children: Ee(e || "") })
|
|
154
154
|
] }),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ I(St, { children: [
|
|
156
|
+
/* @__PURE__ */ r(xt, { children: e }),
|
|
157
|
+
/* @__PURE__ */ I(Dt, { children: [
|
|
158
|
+
/* @__PURE__ */ I(bt, { children: [
|
|
159
|
+
/* @__PURE__ */ r(wt, { alt: "rank-icon", src: Rt }),
|
|
160
|
+
/* @__PURE__ */ I(kt, { children: [
|
|
161
161
|
je(s),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ r(Ot, { children: "PTS" })
|
|
163
163
|
] })
|
|
164
164
|
] }),
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ r(Et, {}),
|
|
166
|
+
/* @__PURE__ */ I("div", { children: [
|
|
167
167
|
"TOP ",
|
|
168
168
|
h || 0,
|
|
169
169
|
"%"
|
|
@@ -171,24 +171,41 @@ const zt = /* @__PURE__ */ o("div")({
|
|
|
171
171
|
] })
|
|
172
172
|
] })
|
|
173
173
|
] }) }),
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ I(At, { children: [
|
|
175
|
+
/* @__PURE__ */ I(jt, { children: [
|
|
176
|
+
/* @__PURE__ */ r(pe, { indicator: n || 0, title: "Friends rank" }),
|
|
177
|
+
/* @__PURE__ */ r(pe, { indicator: i || 0, title: "Global rank" })
|
|
178
178
|
] }),
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ I(Lt, { children: [
|
|
180
|
+
/* @__PURE__ */ r(H, { indicator: p || 0, title: "Win streak" }),
|
|
181
|
+
/* @__PURE__ */ r(H, { indicator: d || 0, title: "Correct" }),
|
|
182
|
+
/* @__PURE__ */ r(H, { indicator: m || 0, title: "Incorrect" }),
|
|
183
|
+
/* @__PURE__ */ r(H, { indicator: `${g || 0}%`, title: "Succ. rate" })
|
|
184
184
|
] })
|
|
185
185
|
] })
|
|
186
186
|
] });
|
|
187
|
-
const Ut =
|
|
187
|
+
const Ut = /* @__PURE__ */ o("div")({
|
|
188
|
+
name: "i",
|
|
189
|
+
class: "i1mbhc7z",
|
|
190
|
+
propsAsIs: !1
|
|
191
|
+
}), Qt = /* @__PURE__ */ o("div")({
|
|
192
|
+
name: "n",
|
|
193
|
+
class: "n1f9yefw",
|
|
194
|
+
propsAsIs: !1
|
|
195
|
+
}), qt = /* @__PURE__ */ o("div")({
|
|
196
|
+
name: "o",
|
|
197
|
+
class: "o1n7beii",
|
|
198
|
+
propsAsIs: !1
|
|
199
|
+
}), Yt = ({ title: t, description: e }) => /* @__PURE__ */ I(Ut, { children: [
|
|
200
|
+
/* @__PURE__ */ r(x, { name: "icon-check-circle" }),
|
|
201
|
+
/* @__PURE__ */ r(Qt, { children: t }),
|
|
202
|
+
/* @__PURE__ */ r(qt, { children: e })
|
|
203
|
+
] });
|
|
204
|
+
const Pt = () => x, Wt = /* @__PURE__ */ o("div")({
|
|
188
205
|
name: "c",
|
|
189
206
|
class: "ciyeb68",
|
|
190
207
|
propsAsIs: !1
|
|
191
|
-
}),
|
|
208
|
+
}), Ft = /* @__PURE__ */ o(Pt())({
|
|
192
209
|
name: "n",
|
|
193
210
|
class: "nfic4xc",
|
|
194
211
|
propsAsIs: !0
|
|
@@ -200,7 +217,7 @@ const Ut = () => x, Qt = /* @__PURE__ */ o("div")({
|
|
|
200
217
|
name: "p",
|
|
201
218
|
class: "p132yxcv",
|
|
202
219
|
propsAsIs: !1
|
|
203
|
-
}),
|
|
220
|
+
}), Vt = /* @__PURE__ */ o("span")({
|
|
204
221
|
name: "l",
|
|
205
222
|
class: "l4a8aw",
|
|
206
223
|
propsAsIs: !1
|
|
@@ -208,11 +225,11 @@ const Ut = () => x, Qt = /* @__PURE__ */ o("div")({
|
|
|
208
225
|
name: "g",
|
|
209
226
|
class: "gzdx7pk",
|
|
210
227
|
propsAsIs: !1
|
|
211
|
-
}),
|
|
228
|
+
}), Ht = /* @__PURE__ */ o("div")({
|
|
212
229
|
name: "s",
|
|
213
230
|
class: "smnc4zm",
|
|
214
231
|
propsAsIs: !1
|
|
215
|
-
}),
|
|
232
|
+
}), Bt = ({
|
|
216
233
|
feedbackMessages: t,
|
|
217
234
|
questionVotedCorrectly: e,
|
|
218
235
|
questionVoted: s,
|
|
@@ -223,62 +240,62 @@ const Ut = () => x, Qt = /* @__PURE__ */ o("div")({
|
|
|
223
240
|
const d = s && (n === D.TRIVIA || n === D.PREDICTION);
|
|
224
241
|
if (!d && p !== Y.RESOLVED)
|
|
225
242
|
return null;
|
|
226
|
-
const
|
|
227
|
-
return /* @__PURE__ */
|
|
228
|
-
p === Y.RESOLVED && n === D.TRIVIA && !s && /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
243
|
+
const m = n === D.PREDICTION && !i, h = e ? "correct" : "incorrect", g = e ? t.correctFeedback : t.incorrectFeedback;
|
|
244
|
+
return /* @__PURE__ */ I(Wt, { "data-isPrediction": m, children: [
|
|
245
|
+
p === Y.RESOLVED && n === D.TRIVIA && !s && /* @__PURE__ */ I($, { children: [
|
|
246
|
+
/* @__PURE__ */ r(he, { children: /* @__PURE__ */ r(x, { name: "questionExpired" }) }),
|
|
247
|
+
/* @__PURE__ */ I("div", { children: [
|
|
248
|
+
/* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(J, { children: "Question Expired" }) }),
|
|
249
|
+
/* @__PURE__ */ r(Ht, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
233
250
|
] })
|
|
234
251
|
] }),
|
|
235
|
-
d &&
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
252
|
+
d && m && /* @__PURE__ */ I($, { children: [
|
|
253
|
+
/* @__PURE__ */ r(Ft, { name: "icon-prediction" }),
|
|
254
|
+
/* @__PURE__ */ r(J, { children: "Stay tuned to see if your prediction was correct." })
|
|
238
255
|
] }),
|
|
239
|
-
d && i && /* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
256
|
+
d && i && /* @__PURE__ */ I($, { children: [
|
|
257
|
+
/* @__PURE__ */ r(he, { "data-feedbackType": h, children: /* @__PURE__ */ r(x, { name: h }) }),
|
|
258
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ I(me, { children: [
|
|
259
|
+
/* @__PURE__ */ r(Vt, { "data-feedbackType": h, children: g == null ? void 0 : g.title }),
|
|
260
|
+
/* @__PURE__ */ r(J, { children: g == null ? void 0 : g.description })
|
|
244
261
|
] }) })
|
|
245
262
|
] })
|
|
246
263
|
] });
|
|
247
264
|
};
|
|
248
|
-
const
|
|
265
|
+
const Gt = /* @__PURE__ */ o("div")({
|
|
249
266
|
name: "o",
|
|
250
267
|
class: "olc1eph",
|
|
251
268
|
propsAsIs: !1
|
|
252
|
-
}),
|
|
269
|
+
}), Zt = /* @__PURE__ */ o("div")({
|
|
253
270
|
name: "n",
|
|
254
271
|
class: "n1yoh29a",
|
|
255
272
|
propsAsIs: !1
|
|
256
|
-
}),
|
|
257
|
-
name: "
|
|
258
|
-
class: "
|
|
273
|
+
}), Jt = /* @__PURE__ */ o("div")({
|
|
274
|
+
name: "e",
|
|
275
|
+
class: "ejkr5mb",
|
|
259
276
|
propsAsIs: !1
|
|
260
|
-
}),
|
|
261
|
-
name: "
|
|
262
|
-
class: "
|
|
277
|
+
}), Kt = /* @__PURE__ */ o("div")({
|
|
278
|
+
name: "p",
|
|
279
|
+
class: "p82wnnx",
|
|
263
280
|
propsAsIs: !1
|
|
264
281
|
});
|
|
265
|
-
const
|
|
282
|
+
const Xt = () => Ue, es = () => Ue, ts = () => x, ss = /* @__PURE__ */ o("button")({
|
|
266
283
|
name: "c",
|
|
267
284
|
class: "cpm4u8k",
|
|
268
285
|
propsAsIs: !1
|
|
269
|
-
}),
|
|
286
|
+
}), ns = /* @__PURE__ */ o("div")({
|
|
270
287
|
name: "l",
|
|
271
288
|
class: "lwfomc3",
|
|
272
289
|
propsAsIs: !1
|
|
273
|
-
}),
|
|
290
|
+
}), is = /* @__PURE__ */ o("span")({
|
|
274
291
|
name: "d",
|
|
275
292
|
class: "dmltvg2",
|
|
276
293
|
propsAsIs: !1
|
|
277
|
-
}),
|
|
294
|
+
}), rs = /* @__PURE__ */ o("div")({
|
|
278
295
|
name: "s",
|
|
279
296
|
class: "stfjpqz",
|
|
280
297
|
propsAsIs: !1
|
|
281
|
-
}),
|
|
298
|
+
}), as = /* @__PURE__ */ o("div")({
|
|
282
299
|
name: "p",
|
|
283
300
|
class: "p198m24r",
|
|
284
301
|
propsAsIs: !1
|
|
@@ -286,37 +303,37 @@ const Gt = () => Ue, Zt = () => Ue, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
286
303
|
name: "r",
|
|
287
304
|
class: "rbq5eu7",
|
|
288
305
|
propsAsIs: !1
|
|
289
|
-
}),
|
|
306
|
+
}), os = /* @__PURE__ */ o(Xt())({
|
|
290
307
|
name: "g",
|
|
291
308
|
class: "g1iv6oeb",
|
|
292
309
|
propsAsIs: !0
|
|
293
|
-
}),
|
|
310
|
+
}), ls = /* @__PURE__ */ o(es())({
|
|
294
311
|
name: "h",
|
|
295
312
|
class: "h1qtxlqc",
|
|
296
313
|
propsAsIs: !0
|
|
297
|
-
}),
|
|
314
|
+
}), cs = /* @__PURE__ */ o("span")({
|
|
298
315
|
name: "u",
|
|
299
316
|
class: "udm736q",
|
|
300
317
|
propsAsIs: !1
|
|
301
|
-
}),
|
|
318
|
+
}), ds = /* @__PURE__ */ o("span")({
|
|
302
319
|
name: "b",
|
|
303
320
|
class: "b1da34tx",
|
|
304
321
|
propsAsIs: !1
|
|
305
|
-
}),
|
|
322
|
+
}), us = /* @__PURE__ */ o("span")({
|
|
306
323
|
name: "x",
|
|
307
324
|
class: "x1dqwq83",
|
|
308
325
|
propsAsIs: !1
|
|
309
|
-
}),
|
|
326
|
+
}), ps = /* @__PURE__ */ o(ts())({
|
|
310
327
|
name: "v",
|
|
311
328
|
class: "v10s9my2",
|
|
312
329
|
propsAsIs: !0
|
|
313
330
|
}), fe = {
|
|
314
|
-
[L.CENTERED]: (t) => /* @__PURE__ */
|
|
315
|
-
[L.TRANSPARENT]: (t) => /* @__PURE__ */
|
|
316
|
-
[L.ROUNDED]: (t) => /* @__PURE__ */
|
|
331
|
+
[L.CENTERED]: (t) => /* @__PURE__ */ r(os, { alt: "option-icon", src: t }),
|
|
332
|
+
[L.TRANSPARENT]: (t) => /* @__PURE__ */ r(rs, { children: /* @__PURE__ */ r(as, { style: { backgroundImage: `url(${t})` } }) }),
|
|
333
|
+
[L.ROUNDED]: (t) => /* @__PURE__ */ r(ls, { alt: "option-icon", src: t }),
|
|
317
334
|
[L.NONE]: () => null,
|
|
318
335
|
[L.UNSET]: () => null
|
|
319
|
-
},
|
|
336
|
+
}, hs = ({ questionType: t, hasCorrectAnswer: e, correct: s, youVoted: n, questionVoted: i }) => {
|
|
320
337
|
if (t === D.POLL && n)
|
|
321
338
|
return "correct";
|
|
322
339
|
if (t === D.PREDICTION) {
|
|
@@ -326,13 +343,13 @@ const Gt = () => Ue, Zt = () => Ue, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
326
343
|
return "correct";
|
|
327
344
|
}
|
|
328
345
|
return t === D.TRIVIA && i ? n ? s ? "correct" : "incorrect" : s ? "correct" : "unset" : "unset";
|
|
329
|
-
},
|
|
346
|
+
}, ms = ({
|
|
330
347
|
questionType: t,
|
|
331
348
|
questionVoted: e,
|
|
332
349
|
correct: s,
|
|
333
350
|
hasCorrectAnswer: n,
|
|
334
351
|
questionStatus: i
|
|
335
|
-
}) => t === D.TRIVIA ? e && s : t === D.PREDICTION ? e && s && n || i === Y.RESOLVED && s : !1,
|
|
352
|
+
}) => t === D.TRIVIA ? e && s : t === D.PREDICTION ? e && s && n || i === Y.RESOLVED && s : !1, fs = (t) => {
|
|
336
353
|
var e;
|
|
337
354
|
const {
|
|
338
355
|
// option props
|
|
@@ -342,33 +359,33 @@ const Gt = () => Ue, Zt = () => Ue, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
342
359
|
percentageDecimal: p,
|
|
343
360
|
// extra props
|
|
344
361
|
onVote: d,
|
|
345
|
-
youSelected:
|
|
362
|
+
youSelected: m,
|
|
346
363
|
questionVoted: h,
|
|
347
364
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
348
365
|
imageMode: g = L.ROUNDED,
|
|
349
|
-
answerTimeExpired:
|
|
366
|
+
answerTimeExpired: _,
|
|
350
367
|
questionStatus: z,
|
|
351
368
|
isLoading: l,
|
|
352
|
-
questionType:
|
|
353
|
-
correct:
|
|
354
|
-
hasCorrectAnswer:
|
|
355
|
-
} = t,
|
|
356
|
-
return /* @__PURE__ */
|
|
357
|
-
|
|
369
|
+
questionType: M,
|
|
370
|
+
correct: y,
|
|
371
|
+
hasCorrectAnswer: a
|
|
372
|
+
} = t, u = hs(t), c = ms({ questionType: M, questionVoted: h, correct: y, hasCorrectAnswer: a, questionStatus: z }), f = h || z === Y.RESOLVED && M === D.PREDICTION;
|
|
373
|
+
return /* @__PURE__ */ I(
|
|
374
|
+
ss,
|
|
358
375
|
{
|
|
359
376
|
value: s,
|
|
360
|
-
"data-selected":
|
|
361
|
-
"data-answerState":
|
|
362
|
-
disabled: h || l ||
|
|
377
|
+
"data-selected": m,
|
|
378
|
+
"data-answerState": u,
|
|
379
|
+
disabled: h || l || _,
|
|
363
380
|
onClick: d,
|
|
364
381
|
children: [
|
|
365
|
-
|
|
366
|
-
/* @__PURE__ */
|
|
382
|
+
f && /* @__PURE__ */ r(ns, { "data-answerState": u, style: { width: `${p}%` } }),
|
|
383
|
+
/* @__PURE__ */ I(is, { children: [
|
|
367
384
|
n && ((e = fe[g]) == null ? void 0 : e.call(fe, n)),
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
|
|
370
|
-
c && /* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ r(cs, { children: i }),
|
|
386
|
+
f && /* @__PURE__ */ I(ds, { children: [
|
|
387
|
+
c && /* @__PURE__ */ r(ps, { name: "selected" }),
|
|
388
|
+
/* @__PURE__ */ I(us, { children: [
|
|
372
389
|
p,
|
|
373
390
|
"%"
|
|
374
391
|
] })
|
|
@@ -378,35 +395,35 @@ const Gt = () => Ue, Zt = () => Ue, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
378
395
|
}
|
|
379
396
|
);
|
|
380
397
|
};
|
|
381
|
-
var ge = typeof window > "u" ? it : rt,
|
|
382
|
-
let [d,
|
|
383
|
-
let
|
|
398
|
+
var ge = typeof window > "u" ? it : rt, gs = ({ isPlaying: t, duration: e, startAt: s = 0, updateInterval: n = 0, onComplete: i, onUpdate: p }) => {
|
|
399
|
+
let [d, m] = R(s), h = E(0), g = E(s), _ = E(s * -1e3), z = E(null), l = E(null), M = E(null), y = (c) => {
|
|
400
|
+
let f = c / 1e3;
|
|
384
401
|
if (l.current === null) {
|
|
385
|
-
l.current =
|
|
402
|
+
l.current = f, z.current = requestAnimationFrame(y);
|
|
386
403
|
return;
|
|
387
404
|
}
|
|
388
|
-
let
|
|
389
|
-
l.current =
|
|
390
|
-
let A = g.current + (n === 0 ?
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
-
z.current && cancelAnimationFrame(z.current),
|
|
394
|
-
},
|
|
395
|
-
|
|
396
|
-
let
|
|
397
|
-
g.current =
|
|
405
|
+
let v = f - l.current, N = h.current + v;
|
|
406
|
+
l.current = f, h.current = N;
|
|
407
|
+
let A = g.current + (n === 0 ? N : (N / n | 0) * n), T = g.current + N, S = typeof e == "number" && T >= e;
|
|
408
|
+
m(S ? e : A), S || (z.current = requestAnimationFrame(y));
|
|
409
|
+
}, a = () => {
|
|
410
|
+
z.current && cancelAnimationFrame(z.current), M.current && clearTimeout(M.current), l.current = null;
|
|
411
|
+
}, u = P((c) => {
|
|
412
|
+
a(), h.current = 0;
|
|
413
|
+
let f = typeof c == "number" ? c : s;
|
|
414
|
+
g.current = f, m(f), t && (z.current = requestAnimationFrame(y));
|
|
398
415
|
}, [t, s]);
|
|
399
416
|
return ge(() => {
|
|
400
417
|
if (p == null || p(d), e && d >= e) {
|
|
401
|
-
|
|
402
|
-
let { shouldRepeat: c = !1, delay:
|
|
403
|
-
c && (
|
|
418
|
+
_.current += e * 1e3;
|
|
419
|
+
let { shouldRepeat: c = !1, delay: f = 0, newStartAt: v } = (i == null ? void 0 : i(_.current / 1e3)) || {};
|
|
420
|
+
c && (M.current = setTimeout(() => u(v), f * 1e3));
|
|
404
421
|
}
|
|
405
|
-
}, [d, e]), ge(() => (t && (z.current = requestAnimationFrame(
|
|
406
|
-
},
|
|
407
|
-
let n = t / 2, i = e / 2, p = n - i, d = 2 * p,
|
|
408
|
-
return { path: `m ${n},${i} a ${p},${p} 0 ${
|
|
409
|
-
}, Ie = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0,
|
|
422
|
+
}, [d, e]), ge(() => (t && (z.current = requestAnimationFrame(y)), a), [t, e, n]), { elapsedTime: d, reset: u };
|
|
423
|
+
}, Is = (t, e, s) => {
|
|
424
|
+
let n = t / 2, i = e / 2, p = n - i, d = 2 * p, m = s === "clockwise" ? "1,0" : "0,1", h = 2 * Math.PI * p;
|
|
425
|
+
return { path: `m ${n},${i} a ${p},${p} 0 ${m} 0,${d} a ${p},${p} 0 ${m} 0,-${d}`, pathLength: h };
|
|
426
|
+
}, Ie = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, vs = (t) => ({ position: "relative", width: t, height: t }), Ms = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Qe = (t, e, s, n, i) => {
|
|
410
427
|
if (n === 0)
|
|
411
428
|
return e;
|
|
412
429
|
let p = (i ? n - t : t) / n;
|
|
@@ -414,181 +431,191 @@ var ge = typeof window > "u" ? it : rt, ps = ({ isPlaying: t, duration: e, start
|
|
|
414
431
|
}, ve = (t) => {
|
|
415
432
|
var e, s;
|
|
416
433
|
return (s = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, i, p, d) => `#${i}${i}${p}${p}${d}${d}`).substring(1).match(/.{2}/g)) == null ? void 0 : e.map((n) => parseInt(n, 16))) != null ? s : [];
|
|
417
|
-
},
|
|
434
|
+
}, ys = (t, e) => {
|
|
418
435
|
var s;
|
|
419
436
|
let { colors: n, colorsTime: i, isSmoothColorTransition: p = !0 } = t;
|
|
420
437
|
if (typeof n == "string")
|
|
421
438
|
return n;
|
|
422
|
-
let d = (s = i == null ? void 0 : i.findIndex((l,
|
|
439
|
+
let d = (s = i == null ? void 0 : i.findIndex((l, M) => l >= e && e >= i[M + 1])) != null ? s : -1;
|
|
423
440
|
if (!i || d === -1)
|
|
424
441
|
return n[0];
|
|
425
442
|
if (!p)
|
|
426
443
|
return n[d];
|
|
427
|
-
let
|
|
428
|
-
return `rgb(${g.map((l,
|
|
429
|
-
},
|
|
430
|
-
let { duration: e, initialRemainingTime: s, updateInterval: n, size: i = 180, strokeWidth: p = 12, trailStrokeWidth: d, isPlaying:
|
|
431
|
-
let
|
|
432
|
-
|
|
433
|
-
} : void 0, onComplete: typeof
|
|
434
|
-
var
|
|
435
|
-
let { shouldRepeat:
|
|
436
|
-
if (
|
|
437
|
-
return { shouldRepeat:
|
|
438
|
-
} : void 0 }), c = e -
|
|
439
|
-
return { elapsedTime:
|
|
444
|
+
let m = i[d] - e, h = i[d] - i[d + 1], g = ve(n[d]), _ = ve(n[d + 1]), z = !!t.isGrowing;
|
|
445
|
+
return `rgb(${g.map((l, M) => Qe(m, l, _[M] - l, h, z) | 0).join(",")})`;
|
|
446
|
+
}, zs = (t) => {
|
|
447
|
+
let { duration: e, initialRemainingTime: s, updateInterval: n, size: i = 180, strokeWidth: p = 12, trailStrokeWidth: d, isPlaying: m = !1, isGrowing: h = !1, rotation: g = "clockwise", onComplete: _, onUpdate: z } = t, l = E(), M = Math.max(p, d ?? 0), { path: y, pathLength: a } = Is(i, M, g), { elapsedTime: u } = gs({ isPlaying: m, duration: e, startAt: Ie(e, s), updateInterval: n, onUpdate: typeof z == "function" ? (f) => {
|
|
448
|
+
let v = Math.ceil(e - f);
|
|
449
|
+
v !== l.current && (l.current = v, z(v));
|
|
450
|
+
} : void 0, onComplete: typeof _ == "function" ? (f) => {
|
|
451
|
+
var v;
|
|
452
|
+
let { shouldRepeat: N, delay: A, newInitialRemainingTime: T } = (v = _(f)) != null ? v : {};
|
|
453
|
+
if (N)
|
|
454
|
+
return { shouldRepeat: N, delay: A, newStartAt: Ie(e, T) };
|
|
455
|
+
} : void 0 }), c = e - u;
|
|
456
|
+
return { elapsedTime: u, path: y, pathLength: a, remainingTime: Math.ceil(c), rotation: g, size: i, stroke: ys(t, c), strokeDashoffset: Qe(u, 0, a, e, h), strokeWidth: p };
|
|
440
457
|
}, qe = (t) => {
|
|
441
|
-
let { children: e, strokeLinecap: s, trailColor: n, trailStrokeWidth: i } = t, { path: p, pathLength: d, stroke:
|
|
442
|
-
return
|
|
458
|
+
let { children: e, strokeLinecap: s, trailColor: n, trailStrokeWidth: i } = t, { path: p, pathLength: d, stroke: m, strokeDashoffset: h, remainingTime: g, elapsedTime: _, size: z, strokeWidth: l } = zs(t);
|
|
459
|
+
return Q.createElement("div", { style: vs(z) }, Q.createElement("svg", { viewBox: `0 0 ${z} ${z}`, width: z, height: z, xmlns: "http://www.w3.org/2000/svg" }, Q.createElement("path", { d: p, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: i ?? l }), Q.createElement("path", { d: p, fill: "none", stroke: m, strokeLinecap: s ?? "round", strokeWidth: l, strokeDasharray: d, strokeDashoffset: h })), typeof e == "function" && Q.createElement("div", { style: Ms }, e({ remainingTime: g, elapsedTime: _, color: m })));
|
|
443
460
|
};
|
|
444
461
|
qe.displayName = "CountdownCircleTimer";
|
|
445
|
-
const
|
|
462
|
+
const Ns = [C.PRIMARY_GREEN1, C.SECONDARY_RED1, C.SECONDARY_RED1], As = [10, 10, 0], _s = /* @__PURE__ */ o("div")({
|
|
446
463
|
name: "A",
|
|
447
464
|
class: "a1f928zy",
|
|
448
465
|
propsAsIs: !1
|
|
449
|
-
}),
|
|
466
|
+
}), Ts = C.SECONDARY_GREEN6, Me = C.SECONDARY_RED3, Ss = C.NEUTRALS_GRAY3, xs = ({
|
|
450
467
|
isPlaying: t = !0,
|
|
451
468
|
duration: e = 30,
|
|
452
469
|
onTimerExpired: s
|
|
453
470
|
}) => {
|
|
454
|
-
const [n, i] =
|
|
471
|
+
const [n, i] = R(e > 10 ? Ts : Me), p = ({
|
|
455
472
|
remainingTime: h
|
|
456
|
-
}) => /* @__PURE__ */
|
|
473
|
+
}) => /* @__PURE__ */ r(_s, {
|
|
457
474
|
children: h
|
|
458
|
-
}), d =
|
|
459
|
-
s == null || s(), i(
|
|
460
|
-
}, [s, i]),
|
|
475
|
+
}), d = P(() => {
|
|
476
|
+
s == null || s(), i(Ss);
|
|
477
|
+
}, [s, i]), m = P((h) => {
|
|
461
478
|
h === 10 && i(Me);
|
|
462
479
|
}, [i]);
|
|
463
|
-
return /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ r(qe, {
|
|
464
481
|
isPlaying: t,
|
|
465
482
|
duration: e,
|
|
466
|
-
colors:
|
|
467
|
-
colorsTime:
|
|
483
|
+
colors: Ns,
|
|
484
|
+
colorsTime: As,
|
|
468
485
|
size: 32,
|
|
469
486
|
strokeWidth: 2,
|
|
470
487
|
trailStrokeWidth: 2,
|
|
471
488
|
trailColor: n,
|
|
472
489
|
onComplete: d,
|
|
473
|
-
onUpdate:
|
|
490
|
+
onUpdate: m,
|
|
474
491
|
children: p
|
|
475
492
|
});
|
|
476
493
|
};
|
|
477
|
-
const
|
|
494
|
+
const Ds = () => x, ws = /* @__PURE__ */ o("div")({
|
|
478
495
|
name: "a",
|
|
479
496
|
class: "a1r7f3z4",
|
|
480
497
|
propsAsIs: !1
|
|
481
|
-
}),
|
|
498
|
+
}), bs = /* @__PURE__ */ o("div")({
|
|
482
499
|
name: "s",
|
|
483
500
|
class: "sblndl",
|
|
484
501
|
propsAsIs: !1
|
|
485
|
-
}),
|
|
502
|
+
}), ks = /* @__PURE__ */ o("div")({
|
|
486
503
|
name: "l",
|
|
487
504
|
class: "l7ka1tv",
|
|
488
505
|
propsAsIs: !1
|
|
489
|
-
}),
|
|
506
|
+
}), Os = /* @__PURE__ */ o(Ds())({
|
|
490
507
|
name: "p",
|
|
491
508
|
class: "p1edlxt3",
|
|
492
509
|
propsAsIs: !0
|
|
493
|
-
}),
|
|
510
|
+
}), Es = /* @__PURE__ */ o("div")({
|
|
494
511
|
name: "g",
|
|
495
512
|
class: "ghm08u2",
|
|
496
513
|
propsAsIs: !1
|
|
497
|
-
}),
|
|
514
|
+
}), js = /* @__PURE__ */ o("span")({
|
|
498
515
|
name: "c",
|
|
499
516
|
class: "c12nsh46",
|
|
500
517
|
propsAsIs: !1
|
|
501
|
-
}),
|
|
518
|
+
}), Ls = /* @__PURE__ */ o("span")({
|
|
502
519
|
name: "d",
|
|
503
520
|
class: "dlr9eoc",
|
|
504
521
|
propsAsIs: !1
|
|
505
|
-
}),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
t && /* @__PURE__ */
|
|
508
|
-
e !== void 0 && /* @__PURE__ */
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
/* @__PURE__ */
|
|
522
|
+
}), $s = ({ title: t, points: e, isPlayingTimer: s, isTimer: n, onTimerExpired: i }) => /* @__PURE__ */ I(ws, { children: [
|
|
523
|
+
/* @__PURE__ */ I(bs, { children: [
|
|
524
|
+
t && /* @__PURE__ */ r(ks, { children: t }),
|
|
525
|
+
e !== void 0 && /* @__PURE__ */ I($, { children: [
|
|
526
|
+
/* @__PURE__ */ r(Os, { name: "icon-trophy" }),
|
|
527
|
+
/* @__PURE__ */ I(Es, { children: [
|
|
528
|
+
/* @__PURE__ */ r(js, { children: e }),
|
|
529
|
+
/* @__PURE__ */ r(Ls, { children: "PTS" })
|
|
513
530
|
] })
|
|
514
531
|
] })
|
|
515
532
|
] }),
|
|
516
|
-
n && /* @__PURE__ */
|
|
517
|
-
] }),
|
|
518
|
-
var
|
|
519
|
-
const
|
|
520
|
-
async (
|
|
521
|
-
if (
|
|
522
|
-
const
|
|
523
|
-
|
|
533
|
+
n && /* @__PURE__ */ r(xs, { isPlaying: s, onTimerExpired: i })
|
|
534
|
+
] }), Cs = ({ openedQuestion: t, vote: e, close: s }) => {
|
|
535
|
+
var n;
|
|
536
|
+
const i = t.subject, p = t.type, d = (n = t.options) == null ? void 0 : n.options, [m, h] = R(!1), [g, _] = R(!1), [z, l] = R(""), M = t == null ? void 0 : t.id, y = P(
|
|
537
|
+
async (N) => {
|
|
538
|
+
if (M) {
|
|
539
|
+
const A = N.currentTarget.value;
|
|
540
|
+
l(A), _(!0), await e(M, A), _(!1);
|
|
524
541
|
}
|
|
525
542
|
},
|
|
526
|
-
[
|
|
527
|
-
),
|
|
528
|
-
()
|
|
543
|
+
[M, l, e]
|
|
544
|
+
), a = P(() => {
|
|
545
|
+
h(!0), setTimeout(s, 3e3);
|
|
546
|
+
}, [s]), u = B(
|
|
547
|
+
() => t == null ? void 0 : t.answers.find((N) => N.youVoted === !0),
|
|
529
548
|
[t]
|
|
530
|
-
),
|
|
531
|
-
() => !!(t != null && t.answers.find((
|
|
549
|
+
), c = B(
|
|
550
|
+
() => !!(t != null && t.answers.find((N) => N.correct === !0)),
|
|
532
551
|
[t]
|
|
533
|
-
),
|
|
534
|
-
...
|
|
535
|
-
questionVoted: !!
|
|
536
|
-
youSelected:
|
|
537
|
-
isLoading:
|
|
538
|
-
hasCorrectAnswer:
|
|
552
|
+
), f = B(() => t ? t.answers.map((N) => ({
|
|
553
|
+
...N,
|
|
554
|
+
questionVoted: !!u,
|
|
555
|
+
youSelected: z === N.id,
|
|
556
|
+
isLoading: g,
|
|
557
|
+
hasCorrectAnswer: c,
|
|
539
558
|
questionType: t.type,
|
|
540
|
-
answerTimeExpired:
|
|
559
|
+
answerTimeExpired: m,
|
|
541
560
|
questionStatus: t.status,
|
|
542
561
|
// ToDo: Figure out why imageMode is not in the response
|
|
543
562
|
onVote: y
|
|
544
|
-
})) : [], [
|
|
545
|
-
return /* @__PURE__ */
|
|
546
|
-
|
|
547
|
-
|
|
563
|
+
})) : [], [c, m, g, t, u, y, z]), v = d && (d.case === "trivia" || d.case === "prediction") ? d.value : void 0;
|
|
564
|
+
return /* @__PURE__ */ r(Le, { "data-question-header": "true", children: /* @__PURE__ */ r(Gt, { children: /* @__PURE__ */ I(Zt, { children: [
|
|
565
|
+
v && /* @__PURE__ */ r(
|
|
566
|
+
Bt,
|
|
548
567
|
{
|
|
549
|
-
feedbackMessages:
|
|
550
|
-
questionVoted: !!
|
|
551
|
-
questionVotedCorrectly:
|
|
552
|
-
questionType:
|
|
553
|
-
hasCorrectAnswer:
|
|
568
|
+
feedbackMessages: v,
|
|
569
|
+
questionVoted: !!u,
|
|
570
|
+
questionVotedCorrectly: u == null ? void 0 : u.correct,
|
|
571
|
+
questionType: p,
|
|
572
|
+
hasCorrectAnswer: c,
|
|
554
573
|
questionStatus: t.status
|
|
555
574
|
}
|
|
556
575
|
),
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
|
|
576
|
+
/* @__PURE__ */ r(
|
|
577
|
+
$s,
|
|
559
578
|
{
|
|
560
|
-
title:
|
|
561
|
-
points:
|
|
562
|
-
onTimerExpired:
|
|
579
|
+
title: m ? "Time expired" : "To win",
|
|
580
|
+
points: m ? void 0 : 100,
|
|
581
|
+
onTimerExpired: a,
|
|
563
582
|
isTimer: !0
|
|
564
583
|
}
|
|
565
584
|
),
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
-
|
|
585
|
+
m ? /* @__PURE__ */ r(
|
|
586
|
+
Yt,
|
|
587
|
+
{
|
|
588
|
+
title: "More to come...",
|
|
589
|
+
description: "Watch for additional enhanced stream interactive experience."
|
|
590
|
+
}
|
|
591
|
+
) : /* @__PURE__ */ I($, { children: [
|
|
592
|
+
/* @__PURE__ */ r(Jt, { children: i }),
|
|
593
|
+
/* @__PURE__ */ r(Kt, { children: f.map((N) => /* @__PURE__ */ r(fs, { ...N }, N.id)) })
|
|
594
|
+
] })
|
|
568
595
|
] }) }) });
|
|
569
596
|
};
|
|
570
|
-
const
|
|
597
|
+
const Rs = /* @__PURE__ */ o("div")({
|
|
571
598
|
name: "e",
|
|
572
599
|
class: "e1eio0mt",
|
|
573
600
|
propsAsIs: !1
|
|
574
|
-
}),
|
|
601
|
+
}), Us = /* @__PURE__ */ o("div")({
|
|
575
602
|
name: "i",
|
|
576
603
|
class: "iigl87b",
|
|
577
604
|
propsAsIs: !1
|
|
578
|
-
}),
|
|
605
|
+
}), Qs = /* @__PURE__ */ o("h3")({
|
|
579
606
|
name: "n",
|
|
580
607
|
class: "n1o2cwub",
|
|
581
608
|
propsAsIs: !1
|
|
582
|
-
}),
|
|
609
|
+
}), qs = /* @__PURE__ */ o("div")({
|
|
583
610
|
name: "r",
|
|
584
611
|
class: "r3uxe45",
|
|
585
612
|
propsAsIs: !1
|
|
586
|
-
}),
|
|
613
|
+
}), Ys = /* @__PURE__ */ o("div")({
|
|
587
614
|
name: "l",
|
|
588
615
|
class: "lrqius",
|
|
589
616
|
propsAsIs: !1
|
|
590
617
|
}), Ye = ({ created: t, title: e, instantView: s }) => {
|
|
591
|
-
const n =
|
|
618
|
+
const n = B(() => {
|
|
592
619
|
if (t) {
|
|
593
620
|
const i = new Date(t);
|
|
594
621
|
if (Je(i))
|
|
@@ -599,59 +626,61 @@ const js = /* @__PURE__ */ o("div")({
|
|
|
599
626
|
}
|
|
600
627
|
return null;
|
|
601
628
|
}, [t]);
|
|
602
|
-
return /* @__PURE__ */
|
|
603
|
-
n && /* @__PURE__ */
|
|
629
|
+
return /* @__PURE__ */ I(Rs, { children: [
|
|
630
|
+
n && /* @__PURE__ */ I(Ys, { children: [
|
|
604
631
|
n.date,
|
|
605
632
|
" · ",
|
|
606
633
|
n.time
|
|
607
634
|
] }),
|
|
608
|
-
(s == null ? void 0 : s.video) && /* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
635
|
+
(s == null ? void 0 : s.video) && /* @__PURE__ */ r(et, { source: s.video.url, poster: s.video.thumbnailUrl }),
|
|
636
|
+
/* @__PURE__ */ I(Us, { children: [
|
|
637
|
+
/* @__PURE__ */ r(Qs, { children: (s == null ? void 0 : s.heading) || e }),
|
|
638
|
+
/* @__PURE__ */ r(qs, { children: s == null ? void 0 : s.body })
|
|
612
639
|
] })
|
|
613
640
|
] });
|
|
614
641
|
};
|
|
615
|
-
const
|
|
642
|
+
const Ps = /* @__PURE__ */ o("div")({
|
|
616
643
|
name: "o",
|
|
617
644
|
class: "o18unvw4",
|
|
618
645
|
propsAsIs: !1
|
|
619
|
-
}),
|
|
646
|
+
}), Ws = /* @__PURE__ */ o("a")({
|
|
620
647
|
name: "n",
|
|
621
648
|
class: "ns0uvk8",
|
|
622
649
|
propsAsIs: !1
|
|
623
|
-
}),
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
(t == null ? void 0 : t.webLink) && /* @__PURE__ */
|
|
650
|
+
}), Fs = ({ instantView: t, ...e }) => /* @__PURE__ */ I(Ps, { children: [
|
|
651
|
+
/* @__PURE__ */ r(Ye, { instantView: t, ...e }),
|
|
652
|
+
(t == null ? void 0 : t.webLink) && /* @__PURE__ */ I(Ws, { href: t == null ? void 0 : t.webLink.url, target: "_blank", children: [
|
|
626
653
|
"Explore more of the Masters History",
|
|
627
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ r(x, { name: "icon-external-link" })
|
|
628
655
|
] })
|
|
629
656
|
] });
|
|
630
|
-
const
|
|
657
|
+
const Vs = /* @__PURE__ */ o("div")({
|
|
631
658
|
name: "d",
|
|
632
659
|
class: "dk8r1eq",
|
|
633
660
|
propsAsIs: !1
|
|
634
|
-
}),
|
|
661
|
+
}), Hs = ({
|
|
635
662
|
openedQuestion: t
|
|
636
663
|
}) => {
|
|
637
664
|
var e;
|
|
638
|
-
return ((e = t == null ? void 0 : t.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */
|
|
665
|
+
return ((e = t == null ? void 0 : t.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */ r(Fs, {
|
|
639
666
|
created: t.attributes.created,
|
|
640
667
|
...t.attributes.attributes.value
|
|
641
668
|
}) : null;
|
|
642
|
-
},
|
|
669
|
+
}, Bs = ({
|
|
643
670
|
extendedQuestion: t,
|
|
644
|
-
vote: e
|
|
671
|
+
vote: e,
|
|
672
|
+
close: s
|
|
645
673
|
}) => {
|
|
646
674
|
const {
|
|
647
|
-
loading:
|
|
648
|
-
data:
|
|
675
|
+
loading: n,
|
|
676
|
+
data: i
|
|
649
677
|
} = t;
|
|
650
|
-
return !
|
|
678
|
+
return !n && i ? /* @__PURE__ */ r(Cs, {
|
|
651
679
|
vote: e,
|
|
652
|
-
|
|
680
|
+
close: s,
|
|
681
|
+
openedQuestion: i
|
|
653
682
|
}) : null;
|
|
654
|
-
},
|
|
683
|
+
}, Gs = ({
|
|
655
684
|
gamification: t
|
|
656
685
|
}) => {
|
|
657
686
|
var e;
|
|
@@ -659,42 +688,43 @@ const Ys = /* @__PURE__ */ o("div")({
|
|
|
659
688
|
if (!s)
|
|
660
689
|
return null;
|
|
661
690
|
const i = s.type;
|
|
662
|
-
return /* @__PURE__ */
|
|
663
|
-
children: [/* @__PURE__ */
|
|
691
|
+
return /* @__PURE__ */ I(Vs, {
|
|
692
|
+
children: [/* @__PURE__ */ r(Ce, {
|
|
664
693
|
close: t.closeQuestion,
|
|
665
694
|
type: ((e = s.attributes) == null ? void 0 : e.type) || D.UNSET
|
|
666
|
-
}), i === "question" && /* @__PURE__ */
|
|
695
|
+
}), i === "question" && /* @__PURE__ */ r(Bs, {
|
|
667
696
|
vote: t.submitAnswer,
|
|
697
|
+
close: t.closeQuestion,
|
|
668
698
|
extendedQuestion: n
|
|
669
|
-
}), i !== "question" && /* @__PURE__ */
|
|
699
|
+
}), i !== "question" && /* @__PURE__ */ r(Hs, {
|
|
670
700
|
openedQuestion: s
|
|
671
701
|
})]
|
|
672
702
|
});
|
|
673
703
|
};
|
|
674
|
-
const
|
|
704
|
+
const Zs = /* @__PURE__ */ o("div")({
|
|
675
705
|
name: "t",
|
|
676
706
|
class: "tcim9sm",
|
|
677
707
|
propsAsIs: !1
|
|
678
|
-
}),
|
|
708
|
+
}), Js = /* @__PURE__ */ o("div")({
|
|
679
709
|
name: "e",
|
|
680
710
|
class: "e8wco6o",
|
|
681
711
|
propsAsIs: !1
|
|
682
|
-
}),
|
|
712
|
+
}), Ks = /* @__PURE__ */ o("button")({
|
|
683
713
|
name: "n",
|
|
684
714
|
class: "n1ardwzl",
|
|
685
715
|
propsAsIs: !1
|
|
686
|
-
}),
|
|
716
|
+
}), Xs = /* @__PURE__ */ o("span")({
|
|
687
717
|
name: "i",
|
|
688
718
|
class: "i1vk8ojx",
|
|
689
719
|
propsAsIs: !1
|
|
690
720
|
});
|
|
691
|
-
var
|
|
692
|
-
const ye = ({ title: t, active: e, onClick: s }) => /* @__PURE__ */
|
|
693
|
-
/* @__PURE__ */
|
|
721
|
+
var q = /* @__PURE__ */ ((t) => (t.HOME = "home", t.LEADERBOARD = "leaderboard", t))(q || {});
|
|
722
|
+
const ye = ({ title: t, active: e, onClick: s }) => /* @__PURE__ */ r(Ks, { onClick: s, "data-selected": e, children: /* @__PURE__ */ r(Xs, { children: t }) }), en = ({ activePage: t = "home", toggleActivePage: e }) => /* @__PURE__ */ r(Zs, { children: /* @__PURE__ */ I(Js, { "data-position": t === "home" ? "left" : "right", children: [
|
|
723
|
+
/* @__PURE__ */ r(ye, { title: "Home", active: t === "home", onClick: () => e(
|
|
694
724
|
"home"
|
|
695
725
|
/* HOME */
|
|
696
726
|
) }),
|
|
697
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ r(
|
|
698
728
|
ye,
|
|
699
729
|
{
|
|
700
730
|
title: "Leader Board",
|
|
@@ -722,70 +752,70 @@ X == null || Ae == null ? (ie = K, re = function(e) {
|
|
|
722
752
|
}, ze);
|
|
723
753
|
return [s, n];
|
|
724
754
|
});
|
|
725
|
-
function
|
|
726
|
-
let e, s, n, i, p, d,
|
|
755
|
+
function tn(t) {
|
|
756
|
+
let e, s, n, i, p, d, m;
|
|
727
757
|
const h = typeof document < "u" && document.attachEvent;
|
|
728
758
|
if (!h) {
|
|
729
759
|
d = function(c) {
|
|
730
|
-
const
|
|
731
|
-
|
|
760
|
+
const f = c.__resizeTriggers__, v = f.firstElementChild, N = f.lastElementChild, A = v.firstElementChild;
|
|
761
|
+
N.scrollLeft = N.scrollWidth, N.scrollTop = N.scrollHeight, A.style.width = v.offsetWidth + 1 + "px", A.style.height = v.offsetHeight + 1 + "px", v.scrollLeft = v.scrollWidth, v.scrollTop = v.scrollHeight;
|
|
732
762
|
}, p = function(c) {
|
|
733
763
|
return c.offsetWidth !== c.__resizeLast__.width || c.offsetHeight !== c.__resizeLast__.height;
|
|
734
|
-
},
|
|
764
|
+
}, m = function(c) {
|
|
735
765
|
if (c.target.className && typeof c.target.className.indexOf == "function" && c.target.className.indexOf("contract-trigger") < 0 && c.target.className.indexOf("expand-trigger") < 0)
|
|
736
766
|
return;
|
|
737
|
-
const
|
|
767
|
+
const f = this;
|
|
738
768
|
d(this), this.__resizeRAF__ && ie(this.__resizeRAF__), this.__resizeRAF__ = re(function() {
|
|
739
|
-
p(
|
|
740
|
-
A.call(
|
|
769
|
+
p(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(A) {
|
|
770
|
+
A.call(f, c);
|
|
741
771
|
}));
|
|
742
772
|
});
|
|
743
773
|
};
|
|
744
|
-
let l = !1,
|
|
774
|
+
let l = !1, M = "";
|
|
745
775
|
n = "animationstart";
|
|
746
|
-
const
|
|
747
|
-
let
|
|
776
|
+
const y = "Webkit Moz O ms".split(" ");
|
|
777
|
+
let a = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), u = "";
|
|
748
778
|
{
|
|
749
779
|
const c = document.createElement("fakeelement");
|
|
750
780
|
if (c.style.animationName !== void 0 && (l = !0), l === !1) {
|
|
751
|
-
for (let
|
|
752
|
-
if (c.style[
|
|
753
|
-
|
|
781
|
+
for (let f = 0; f < y.length; f++)
|
|
782
|
+
if (c.style[y[f] + "AnimationName"] !== void 0) {
|
|
783
|
+
u = y[f], M = "-" + u.toLowerCase() + "-", n = a[f], l = !0;
|
|
754
784
|
break;
|
|
755
785
|
}
|
|
756
786
|
}
|
|
757
787
|
}
|
|
758
|
-
s = "resizeanim", e = "@" +
|
|
788
|
+
s = "resizeanim", e = "@" + M + "keyframes " + s + " { from { opacity: 0; } to { opacity: 0; } } ", i = M + "animation: 1ms " + s + "; ";
|
|
759
789
|
}
|
|
760
790
|
const g = function(l) {
|
|
761
791
|
if (!l.getElementById("detectElementResize")) {
|
|
762
|
-
const
|
|
763
|
-
|
|
792
|
+
const M = (e || "") + ".resize-triggers { " + (i || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', y = l.head || l.getElementsByTagName("head")[0], a = l.createElement("style");
|
|
793
|
+
a.id = "detectElementResize", a.type = "text/css", t != null && a.setAttribute("nonce", t), a.styleSheet ? a.styleSheet.cssText = M : a.appendChild(l.createTextNode(M)), y.appendChild(a);
|
|
764
794
|
}
|
|
765
795
|
};
|
|
766
796
|
return {
|
|
767
|
-
addResizeListener: function(l,
|
|
797
|
+
addResizeListener: function(l, M) {
|
|
768
798
|
if (h)
|
|
769
|
-
l.attachEvent("onresize",
|
|
799
|
+
l.attachEvent("onresize", M);
|
|
770
800
|
else {
|
|
771
801
|
if (!l.__resizeTriggers__) {
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
const c =
|
|
777
|
-
c.className = "contract-trigger", l.__resizeTriggers__.appendChild(
|
|
778
|
-
|
|
802
|
+
const y = l.ownerDocument, a = w.getComputedStyle(l);
|
|
803
|
+
a && a.position === "static" && (l.style.position = "relative"), g(y), l.__resizeLast__ = {}, l.__resizeListeners__ = [], (l.__resizeTriggers__ = y.createElement("div")).className = "resize-triggers";
|
|
804
|
+
const u = y.createElement("div");
|
|
805
|
+
u.className = "expand-trigger", u.appendChild(y.createElement("div"));
|
|
806
|
+
const c = y.createElement("div");
|
|
807
|
+
c.className = "contract-trigger", l.__resizeTriggers__.appendChild(u), l.__resizeTriggers__.appendChild(c), l.appendChild(l.__resizeTriggers__), d(l), l.addEventListener("scroll", m, !0), n && (l.__resizeTriggers__.__animationListener__ = function(v) {
|
|
808
|
+
v.animationName === s && d(l);
|
|
779
809
|
}, l.__resizeTriggers__.addEventListener(n, l.__resizeTriggers__.__animationListener__));
|
|
780
810
|
}
|
|
781
|
-
l.__resizeListeners__.push(
|
|
811
|
+
l.__resizeListeners__.push(M);
|
|
782
812
|
}
|
|
783
813
|
},
|
|
784
|
-
removeResizeListener: function(l,
|
|
814
|
+
removeResizeListener: function(l, M) {
|
|
785
815
|
if (h)
|
|
786
|
-
l.detachEvent("onresize",
|
|
787
|
-
else if (l.__resizeListeners__.splice(l.__resizeListeners__.indexOf(
|
|
788
|
-
l.removeEventListener("scroll",
|
|
816
|
+
l.detachEvent("onresize", M);
|
|
817
|
+
else if (l.__resizeListeners__.splice(l.__resizeListeners__.indexOf(M), 1), !l.__resizeListeners__.length) {
|
|
818
|
+
l.removeEventListener("scroll", m, !0), l.__resizeTriggers__.__animationListener__ && (l.__resizeTriggers__.removeEventListener(n, l.__resizeTriggers__.__animationListener__), l.__resizeTriggers__.__animationListener__ = null);
|
|
789
819
|
try {
|
|
790
820
|
l.__resizeTriggers__ = !l.removeChild(l.__resizeTriggers__);
|
|
791
821
|
} catch {
|
|
@@ -794,7 +824,7 @@ function Js(t) {
|
|
|
794
824
|
}
|
|
795
825
|
};
|
|
796
826
|
}
|
|
797
|
-
class
|
|
827
|
+
class sn extends at {
|
|
798
828
|
constructor(...e) {
|
|
799
829
|
super(...e), this.state = {
|
|
800
830
|
height: this.props.defaultHeight || 0,
|
|
@@ -809,18 +839,18 @@ class Ks extends at {
|
|
|
809
839
|
onResize: i
|
|
810
840
|
} = this.props;
|
|
811
841
|
if (this._parentNode) {
|
|
812
|
-
var p, d,
|
|
813
|
-
const g = window.getComputedStyle(this._parentNode) || {},
|
|
814
|
-
(!s && (this.state.height !== c || this.state.scaledHeight !==
|
|
842
|
+
var p, d, m, h;
|
|
843
|
+
const g = window.getComputedStyle(this._parentNode) || {}, _ = parseFloat((p = g.paddingLeft) !== null && p !== void 0 ? p : "0"), z = parseFloat((d = g.paddingRight) !== null && d !== void 0 ? d : "0"), l = parseFloat((m = g.paddingTop) !== null && m !== void 0 ? m : "0"), M = parseFloat((h = g.paddingBottom) !== null && h !== void 0 ? h : "0"), y = this._parentNode.getBoundingClientRect(), a = y.height - l - M, u = y.width - _ - z, c = this._parentNode.offsetHeight - l - M, f = this._parentNode.offsetWidth - _ - z;
|
|
844
|
+
(!s && (this.state.height !== c || this.state.scaledHeight !== a) || !n && (this.state.width !== f || this.state.scaledWidth !== u)) && (this.setState({
|
|
815
845
|
height: c,
|
|
816
|
-
width:
|
|
817
|
-
scaledHeight:
|
|
818
|
-
scaledWidth:
|
|
846
|
+
width: f,
|
|
847
|
+
scaledHeight: a,
|
|
848
|
+
scaledWidth: u
|
|
819
849
|
}), typeof i == "function" && i({
|
|
820
850
|
height: c,
|
|
821
|
-
scaledHeight:
|
|
822
|
-
scaledWidth:
|
|
823
|
-
width:
|
|
851
|
+
scaledHeight: a,
|
|
852
|
+
scaledWidth: u,
|
|
853
|
+
width: f
|
|
824
854
|
}));
|
|
825
855
|
}
|
|
826
856
|
}, this._setRef = (s) => {
|
|
@@ -833,7 +863,7 @@ class Ks extends at {
|
|
|
833
863
|
} = this.props;
|
|
834
864
|
this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._parentNode != null && (typeof ResizeObserver < "u" ? (this._resizeObserver = new ResizeObserver(() => {
|
|
835
865
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
836
|
-
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize =
|
|
866
|
+
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize = tn(e), this._detectElementResize.addResizeListener(this._parentNode, this._onResize)), this._onResize()));
|
|
837
867
|
}
|
|
838
868
|
componentWillUnmount() {
|
|
839
869
|
this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && (this._resizeObserver.observe(this._parentNode), this._resizeObserver.disconnect()));
|
|
@@ -846,27 +876,27 @@ class Ks extends at {
|
|
|
846
876
|
disableHeight: i = !1,
|
|
847
877
|
disableWidth: p = !1,
|
|
848
878
|
nonce: d,
|
|
849
|
-
onResize:
|
|
879
|
+
onResize: m,
|
|
850
880
|
style: h = {},
|
|
851
881
|
tagName: g = "div",
|
|
852
|
-
...
|
|
882
|
+
..._
|
|
853
883
|
} = this.props, {
|
|
854
884
|
height: z,
|
|
855
885
|
scaledHeight: l,
|
|
856
|
-
scaledWidth:
|
|
857
|
-
width:
|
|
858
|
-
} = this.state,
|
|
886
|
+
scaledWidth: M,
|
|
887
|
+
width: y
|
|
888
|
+
} = this.state, a = {
|
|
859
889
|
overflow: "visible"
|
|
860
|
-
},
|
|
890
|
+
}, u = {};
|
|
861
891
|
let c = !1;
|
|
862
|
-
return i || (z === 0 && (c = !0),
|
|
892
|
+
return i || (z === 0 && (c = !0), a.height = 0, u.height = z, u.scaledHeight = l), p || (y === 0 && (c = !0), a.width = 0, u.width = y, u.scaledWidth = M), G(g, {
|
|
863
893
|
ref: this._setRef,
|
|
864
894
|
style: {
|
|
865
|
-
...
|
|
895
|
+
...a,
|
|
866
896
|
...h
|
|
867
897
|
},
|
|
868
|
-
...
|
|
869
|
-
}, !c && e(
|
|
898
|
+
..._
|
|
899
|
+
}, !c && e(u));
|
|
870
900
|
}
|
|
871
901
|
}
|
|
872
902
|
function ae() {
|
|
@@ -889,34 +919,34 @@ function oe(t, e) {
|
|
|
889
919
|
return n.__proto__ = i, n;
|
|
890
920
|
}, oe(t, e);
|
|
891
921
|
}
|
|
892
|
-
function
|
|
922
|
+
function nn(t, e) {
|
|
893
923
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, oe(t, e);
|
|
894
924
|
}
|
|
895
925
|
var Te = Number.isNaN || function(e) {
|
|
896
926
|
return typeof e == "number" && e !== e;
|
|
897
927
|
};
|
|
898
|
-
function
|
|
928
|
+
function rn(t, e) {
|
|
899
929
|
return !!(t === e || Te(t) && Te(e));
|
|
900
930
|
}
|
|
901
|
-
function
|
|
931
|
+
function an(t, e) {
|
|
902
932
|
if (t.length !== e.length)
|
|
903
933
|
return !1;
|
|
904
934
|
for (var s = 0; s < t.length; s++)
|
|
905
|
-
if (!
|
|
935
|
+
if (!rn(t[s], e[s]))
|
|
906
936
|
return !1;
|
|
907
937
|
return !0;
|
|
908
938
|
}
|
|
909
939
|
function ee(t, e) {
|
|
910
|
-
e === void 0 && (e =
|
|
940
|
+
e === void 0 && (e = an);
|
|
911
941
|
var s, n = [], i, p = !1;
|
|
912
942
|
function d() {
|
|
913
|
-
for (var
|
|
914
|
-
|
|
915
|
-
return p && s === this && e(
|
|
943
|
+
for (var m = [], h = 0; h < arguments.length; h++)
|
|
944
|
+
m[h] = arguments[h];
|
|
945
|
+
return p && s === this && e(m, n) || (i = t.apply(this, m), p = !0, s = this, n = m), i;
|
|
916
946
|
}
|
|
917
947
|
return d;
|
|
918
948
|
}
|
|
919
|
-
var
|
|
949
|
+
var on = typeof performance == "object" && typeof performance.now == "function", Se = on ? function() {
|
|
920
950
|
return performance.now();
|
|
921
951
|
} : function() {
|
|
922
952
|
return Date.now();
|
|
@@ -924,7 +954,7 @@ var sn = typeof performance == "object" && typeof performance.now == "function",
|
|
|
924
954
|
function xe(t) {
|
|
925
955
|
cancelAnimationFrame(t.id);
|
|
926
956
|
}
|
|
927
|
-
function
|
|
957
|
+
function ln(t, e) {
|
|
928
958
|
var s = Se();
|
|
929
959
|
function n() {
|
|
930
960
|
Se() - s >= e ? t.call(null) : i.id = requestAnimationFrame(n);
|
|
@@ -952,209 +982,209 @@ function we(t) {
|
|
|
952
982
|
}
|
|
953
983
|
return j;
|
|
954
984
|
}
|
|
955
|
-
var
|
|
985
|
+
var cn = 150, dn = function(e, s) {
|
|
956
986
|
return e;
|
|
957
987
|
};
|
|
958
|
-
function
|
|
959
|
-
var e, s = t.getItemOffset, n = t.getEstimatedTotalSize, i = t.getItemSize, p = t.getOffsetForIndexAndAlignment, d = t.getStartIndexForOffset,
|
|
988
|
+
function un(t) {
|
|
989
|
+
var e, s = t.getItemOffset, n = t.getEstimatedTotalSize, i = t.getItemSize, p = t.getOffsetForIndexAndAlignment, d = t.getStartIndexForOffset, m = t.getStopIndexForStartIndex, h = t.initInstanceProps, g = t.shouldResetStyleCacheOnItemSizeChange, _ = t.validateProps;
|
|
960
990
|
return e = /* @__PURE__ */ function(z) {
|
|
961
|
-
|
|
962
|
-
function l(
|
|
963
|
-
var
|
|
964
|
-
return
|
|
965
|
-
instance: _e(
|
|
991
|
+
nn(l, z);
|
|
992
|
+
function l(y) {
|
|
993
|
+
var a;
|
|
994
|
+
return a = z.call(this, y) || this, a._instanceProps = h(a.props, _e(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
|
|
995
|
+
instance: _e(a),
|
|
966
996
|
isScrolling: !1,
|
|
967
997
|
scrollDirection: "forward",
|
|
968
|
-
scrollOffset: typeof
|
|
998
|
+
scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
|
|
969
999
|
scrollUpdateWasRequested: !1
|
|
970
|
-
},
|
|
971
|
-
return
|
|
972
|
-
overscanStartIndex:
|
|
1000
|
+
}, a._callOnItemsRendered = void 0, a._callOnItemsRendered = ee(function(u, c, f, v) {
|
|
1001
|
+
return a.props.onItemsRendered({
|
|
1002
|
+
overscanStartIndex: u,
|
|
973
1003
|
overscanStopIndex: c,
|
|
974
|
-
visibleStartIndex:
|
|
975
|
-
visibleStopIndex:
|
|
1004
|
+
visibleStartIndex: f,
|
|
1005
|
+
visibleStopIndex: v
|
|
976
1006
|
});
|
|
977
|
-
}),
|
|
978
|
-
return
|
|
979
|
-
scrollDirection:
|
|
1007
|
+
}), a._callOnScroll = void 0, a._callOnScroll = ee(function(u, c, f) {
|
|
1008
|
+
return a.props.onScroll({
|
|
1009
|
+
scrollDirection: u,
|
|
980
1010
|
scrollOffset: c,
|
|
981
|
-
scrollUpdateWasRequested:
|
|
1011
|
+
scrollUpdateWasRequested: f
|
|
982
1012
|
});
|
|
983
|
-
}),
|
|
984
|
-
var c =
|
|
985
|
-
if (A.hasOwnProperty(
|
|
986
|
-
T = A[
|
|
1013
|
+
}), a._getItemStyle = void 0, a._getItemStyle = function(u) {
|
|
1014
|
+
var c = a.props, f = c.direction, v = c.itemSize, N = c.layout, A = a._getItemStyleCache(g && v, g && N, g && f), T;
|
|
1015
|
+
if (A.hasOwnProperty(u))
|
|
1016
|
+
T = A[u];
|
|
987
1017
|
else {
|
|
988
|
-
var S = s(
|
|
989
|
-
A[
|
|
1018
|
+
var S = s(a.props, u, a._instanceProps), b = i(a.props, u, a._instanceProps), k = f === "horizontal" || N === "horizontal", W = f === "rtl", F = k ? S : 0;
|
|
1019
|
+
A[u] = T = {
|
|
990
1020
|
position: "absolute",
|
|
991
|
-
left:
|
|
992
|
-
right:
|
|
993
|
-
top:
|
|
994
|
-
height:
|
|
995
|
-
width:
|
|
1021
|
+
left: W ? void 0 : F,
|
|
1022
|
+
right: W ? F : void 0,
|
|
1023
|
+
top: k ? 0 : S,
|
|
1024
|
+
height: k ? "100%" : b,
|
|
1025
|
+
width: k ? b : "100%"
|
|
996
1026
|
};
|
|
997
1027
|
}
|
|
998
1028
|
return T;
|
|
999
|
-
},
|
|
1029
|
+
}, a._getItemStyleCache = void 0, a._getItemStyleCache = ee(function(u, c, f) {
|
|
1000
1030
|
return {};
|
|
1001
|
-
}),
|
|
1002
|
-
var c =
|
|
1003
|
-
|
|
1004
|
-
if (A.scrollOffset ===
|
|
1031
|
+
}), a._onScrollHorizontal = function(u) {
|
|
1032
|
+
var c = u.currentTarget, f = c.clientWidth, v = c.scrollLeft, N = c.scrollWidth;
|
|
1033
|
+
a.setState(function(A) {
|
|
1034
|
+
if (A.scrollOffset === v)
|
|
1005
1035
|
return null;
|
|
1006
|
-
var T =
|
|
1036
|
+
var T = a.props.direction, S = v;
|
|
1007
1037
|
if (T === "rtl")
|
|
1008
1038
|
switch (we()) {
|
|
1009
1039
|
case "negative":
|
|
1010
|
-
S = -
|
|
1040
|
+
S = -v;
|
|
1011
1041
|
break;
|
|
1012
1042
|
case "positive-descending":
|
|
1013
|
-
S =
|
|
1043
|
+
S = N - f - v;
|
|
1014
1044
|
break;
|
|
1015
1045
|
}
|
|
1016
|
-
return S = Math.max(0, Math.min(S,
|
|
1046
|
+
return S = Math.max(0, Math.min(S, N - f)), {
|
|
1017
1047
|
isScrolling: !0,
|
|
1018
|
-
scrollDirection: A.scrollOffset <
|
|
1048
|
+
scrollDirection: A.scrollOffset < v ? "forward" : "backward",
|
|
1019
1049
|
scrollOffset: S,
|
|
1020
1050
|
scrollUpdateWasRequested: !1
|
|
1021
1051
|
};
|
|
1022
|
-
},
|
|
1023
|
-
},
|
|
1024
|
-
var c =
|
|
1025
|
-
|
|
1026
|
-
if (A.scrollOffset ===
|
|
1052
|
+
}, a._resetIsScrollingDebounced);
|
|
1053
|
+
}, a._onScrollVertical = function(u) {
|
|
1054
|
+
var c = u.currentTarget, f = c.clientHeight, v = c.scrollHeight, N = c.scrollTop;
|
|
1055
|
+
a.setState(function(A) {
|
|
1056
|
+
if (A.scrollOffset === N)
|
|
1027
1057
|
return null;
|
|
1028
|
-
var T = Math.max(0, Math.min(
|
|
1058
|
+
var T = Math.max(0, Math.min(N, v - f));
|
|
1029
1059
|
return {
|
|
1030
1060
|
isScrolling: !0,
|
|
1031
1061
|
scrollDirection: A.scrollOffset < T ? "forward" : "backward",
|
|
1032
1062
|
scrollOffset: T,
|
|
1033
1063
|
scrollUpdateWasRequested: !1
|
|
1034
1064
|
};
|
|
1035
|
-
},
|
|
1036
|
-
},
|
|
1037
|
-
var c =
|
|
1038
|
-
|
|
1039
|
-
},
|
|
1040
|
-
|
|
1041
|
-
},
|
|
1042
|
-
|
|
1065
|
+
}, a._resetIsScrollingDebounced);
|
|
1066
|
+
}, a._outerRefSetter = function(u) {
|
|
1067
|
+
var c = a.props.outerRef;
|
|
1068
|
+
a._outerRef = u, typeof c == "function" ? c(u) : c != null && typeof c == "object" && c.hasOwnProperty("current") && (c.current = u);
|
|
1069
|
+
}, a._resetIsScrollingDebounced = function() {
|
|
1070
|
+
a._resetIsScrollingTimeoutId !== null && xe(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = ln(a._resetIsScrolling, cn);
|
|
1071
|
+
}, a._resetIsScrolling = function() {
|
|
1072
|
+
a._resetIsScrollingTimeoutId = null, a.setState({
|
|
1043
1073
|
isScrolling: !1
|
|
1044
1074
|
}, function() {
|
|
1045
|
-
|
|
1075
|
+
a._getItemStyleCache(-1, null);
|
|
1046
1076
|
});
|
|
1047
|
-
},
|
|
1077
|
+
}, a;
|
|
1048
1078
|
}
|
|
1049
|
-
l.getDerivedStateFromProps = function(
|
|
1050
|
-
return
|
|
1079
|
+
l.getDerivedStateFromProps = function(a, u) {
|
|
1080
|
+
return pn(a, u), _(a), null;
|
|
1051
1081
|
};
|
|
1052
|
-
var
|
|
1053
|
-
return
|
|
1054
|
-
|
|
1055
|
-
return
|
|
1056
|
-
scrollDirection:
|
|
1057
|
-
scrollOffset:
|
|
1082
|
+
var M = l.prototype;
|
|
1083
|
+
return M.scrollTo = function(a) {
|
|
1084
|
+
a = Math.max(0, a), this.setState(function(u) {
|
|
1085
|
+
return u.scrollOffset === a ? null : {
|
|
1086
|
+
scrollDirection: u.scrollOffset < a ? "forward" : "backward",
|
|
1087
|
+
scrollOffset: a,
|
|
1058
1088
|
scrollUpdateWasRequested: !0
|
|
1059
1089
|
};
|
|
1060
1090
|
}, this._resetIsScrollingDebounced);
|
|
1061
|
-
},
|
|
1062
|
-
|
|
1063
|
-
var c = this.props,
|
|
1064
|
-
|
|
1091
|
+
}, M.scrollToItem = function(a, u) {
|
|
1092
|
+
u === void 0 && (u = "auto");
|
|
1093
|
+
var c = this.props, f = c.itemCount, v = c.layout, N = this.state.scrollOffset;
|
|
1094
|
+
a = Math.max(0, Math.min(a, f - 1));
|
|
1065
1095
|
var A = 0;
|
|
1066
1096
|
if (this._outerRef) {
|
|
1067
1097
|
var T = this._outerRef;
|
|
1068
|
-
|
|
1098
|
+
v === "vertical" ? A = T.scrollWidth > T.clientWidth ? De() : 0 : A = T.scrollHeight > T.clientHeight ? De() : 0;
|
|
1069
1099
|
}
|
|
1070
|
-
this.scrollTo(p(this.props,
|
|
1071
|
-
},
|
|
1072
|
-
var
|
|
1100
|
+
this.scrollTo(p(this.props, a, u, N, this._instanceProps, A));
|
|
1101
|
+
}, M.componentDidMount = function() {
|
|
1102
|
+
var a = this.props, u = a.direction, c = a.initialScrollOffset, f = a.layout;
|
|
1073
1103
|
if (typeof c == "number" && this._outerRef != null) {
|
|
1074
|
-
var
|
|
1075
|
-
|
|
1104
|
+
var v = this._outerRef;
|
|
1105
|
+
u === "horizontal" || f === "horizontal" ? v.scrollLeft = c : v.scrollTop = c;
|
|
1076
1106
|
}
|
|
1077
1107
|
this._callPropsCallbacks();
|
|
1078
|
-
},
|
|
1079
|
-
var
|
|
1080
|
-
if (
|
|
1108
|
+
}, M.componentDidUpdate = function() {
|
|
1109
|
+
var a = this.props, u = a.direction, c = a.layout, f = this.state, v = f.scrollOffset, N = f.scrollUpdateWasRequested;
|
|
1110
|
+
if (N && this._outerRef != null) {
|
|
1081
1111
|
var A = this._outerRef;
|
|
1082
|
-
if (
|
|
1083
|
-
if (
|
|
1112
|
+
if (u === "horizontal" || c === "horizontal")
|
|
1113
|
+
if (u === "rtl")
|
|
1084
1114
|
switch (we()) {
|
|
1085
1115
|
case "negative":
|
|
1086
|
-
A.scrollLeft = -
|
|
1116
|
+
A.scrollLeft = -v;
|
|
1087
1117
|
break;
|
|
1088
1118
|
case "positive-ascending":
|
|
1089
|
-
A.scrollLeft =
|
|
1119
|
+
A.scrollLeft = v;
|
|
1090
1120
|
break;
|
|
1091
1121
|
default:
|
|
1092
1122
|
var T = A.clientWidth, S = A.scrollWidth;
|
|
1093
|
-
A.scrollLeft = S - T -
|
|
1123
|
+
A.scrollLeft = S - T - v;
|
|
1094
1124
|
break;
|
|
1095
1125
|
}
|
|
1096
1126
|
else
|
|
1097
|
-
A.scrollLeft =
|
|
1127
|
+
A.scrollLeft = v;
|
|
1098
1128
|
else
|
|
1099
|
-
A.scrollTop =
|
|
1129
|
+
A.scrollTop = v;
|
|
1100
1130
|
}
|
|
1101
1131
|
this._callPropsCallbacks();
|
|
1102
|
-
},
|
|
1132
|
+
}, M.componentWillUnmount = function() {
|
|
1103
1133
|
this._resetIsScrollingTimeoutId !== null && xe(this._resetIsScrollingTimeoutId);
|
|
1104
|
-
},
|
|
1105
|
-
var
|
|
1134
|
+
}, M.render = function() {
|
|
1135
|
+
var a = this.props, u = a.children, c = a.className, f = a.direction, v = a.height, N = a.innerRef, A = a.innerElementType, T = a.innerTagName, S = a.itemCount, b = a.itemData, k = a.itemKey, W = k === void 0 ? dn : k, F = a.layout, Pe = a.outerElementType, We = a.outerTagName, Fe = a.style, Ve = a.useIsScrolling, He = a.width, le = this.state.isScrolling, Z = f === "horizontal" || F === "horizontal", Be = Z ? this._onScrollHorizontal : this._onScrollVertical, ce = this._getRangeToRender(), Ge = ce[0], Ze = ce[1], de = [];
|
|
1106
1136
|
if (S > 0)
|
|
1107
|
-
for (var
|
|
1108
|
-
de.push(
|
|
1109
|
-
data:
|
|
1110
|
-
key:
|
|
1111
|
-
index:
|
|
1137
|
+
for (var U = Ge; U <= Ze; U++)
|
|
1138
|
+
de.push(G(u, {
|
|
1139
|
+
data: b,
|
|
1140
|
+
key: W(U, b),
|
|
1141
|
+
index: U,
|
|
1112
1142
|
isScrolling: Ve ? le : void 0,
|
|
1113
|
-
style: this._getItemStyle(
|
|
1143
|
+
style: this._getItemStyle(U)
|
|
1114
1144
|
}));
|
|
1115
1145
|
var ue = n(this.props, this._instanceProps);
|
|
1116
|
-
return
|
|
1146
|
+
return G(Pe || We || "div", {
|
|
1117
1147
|
className: c,
|
|
1118
1148
|
onScroll: Be,
|
|
1119
1149
|
ref: this._outerRefSetter,
|
|
1120
1150
|
style: ae({
|
|
1121
1151
|
position: "relative",
|
|
1122
|
-
height:
|
|
1152
|
+
height: v,
|
|
1123
1153
|
width: He,
|
|
1124
1154
|
overflow: "auto",
|
|
1125
1155
|
WebkitOverflowScrolling: "touch",
|
|
1126
1156
|
willChange: "transform",
|
|
1127
|
-
direction:
|
|
1157
|
+
direction: f
|
|
1128
1158
|
}, Fe)
|
|
1129
|
-
},
|
|
1159
|
+
}, G(A || T || "div", {
|
|
1130
1160
|
children: de,
|
|
1131
|
-
ref:
|
|
1161
|
+
ref: N,
|
|
1132
1162
|
style: {
|
|
1133
1163
|
height: Z ? "100%" : ue,
|
|
1134
1164
|
pointerEvents: le ? "none" : void 0,
|
|
1135
1165
|
width: Z ? ue : "100%"
|
|
1136
1166
|
}
|
|
1137
1167
|
}));
|
|
1138
|
-
},
|
|
1168
|
+
}, M._callPropsCallbacks = function() {
|
|
1139
1169
|
if (typeof this.props.onItemsRendered == "function") {
|
|
1140
|
-
var
|
|
1141
|
-
if (
|
|
1142
|
-
var
|
|
1143
|
-
this._callOnItemsRendered(c,
|
|
1170
|
+
var a = this.props.itemCount;
|
|
1171
|
+
if (a > 0) {
|
|
1172
|
+
var u = this._getRangeToRender(), c = u[0], f = u[1], v = u[2], N = u[3];
|
|
1173
|
+
this._callOnItemsRendered(c, f, v, N);
|
|
1144
1174
|
}
|
|
1145
1175
|
}
|
|
1146
1176
|
if (typeof this.props.onScroll == "function") {
|
|
1147
|
-
var A = this.state, T = A.scrollDirection, S = A.scrollOffset,
|
|
1148
|
-
this._callOnScroll(T, S,
|
|
1177
|
+
var A = this.state, T = A.scrollDirection, S = A.scrollOffset, b = A.scrollUpdateWasRequested;
|
|
1178
|
+
this._callOnScroll(T, S, b);
|
|
1149
1179
|
}
|
|
1150
|
-
},
|
|
1151
|
-
var
|
|
1152
|
-
if (
|
|
1180
|
+
}, M._getRangeToRender = function() {
|
|
1181
|
+
var a = this.props, u = a.itemCount, c = a.overscanCount, f = this.state, v = f.isScrolling, N = f.scrollDirection, A = f.scrollOffset;
|
|
1182
|
+
if (u === 0)
|
|
1153
1183
|
return [0, 0, 0, 0];
|
|
1154
|
-
var T = d(this.props, A, this._instanceProps), S =
|
|
1155
|
-
return [Math.max(0, T -
|
|
1184
|
+
var T = d(this.props, A, this._instanceProps), S = m(this.props, T, A, this._instanceProps), b = !v || N === "backward" ? Math.max(1, c) : 1, k = !v || N === "forward" ? Math.max(1, c) : 1;
|
|
1185
|
+
return [Math.max(0, T - b), Math.max(0, Math.min(u - 1, S + k)), T, S];
|
|
1156
1186
|
}, l;
|
|
1157
|
-
}(
|
|
1187
|
+
}($e), e.defaultProps = {
|
|
1158
1188
|
direction: "ltr",
|
|
1159
1189
|
itemData: void 0,
|
|
1160
1190
|
layout: "vertical",
|
|
@@ -1162,9 +1192,9 @@ function on(t) {
|
|
|
1162
1192
|
useIsScrolling: !1
|
|
1163
1193
|
}, e;
|
|
1164
1194
|
}
|
|
1165
|
-
var
|
|
1195
|
+
var pn = function(e, s) {
|
|
1166
1196
|
e.children, e.direction, e.height, e.layout, e.innerTagName, e.outerTagName, e.width, s.instance;
|
|
1167
|
-
},
|
|
1197
|
+
}, hn = /* @__PURE__ */ un({
|
|
1168
1198
|
getItemOffset: function(e, s) {
|
|
1169
1199
|
var n = e.itemSize;
|
|
1170
1200
|
return s * n;
|
|
@@ -1178,19 +1208,19 @@ var ln = function(e, s) {
|
|
|
1178
1208
|
return n * s;
|
|
1179
1209
|
},
|
|
1180
1210
|
getOffsetForIndexAndAlignment: function(e, s, n, i, p, d) {
|
|
1181
|
-
var
|
|
1182
|
-
switch (n === "smart" && (i >= c -
|
|
1211
|
+
var m = e.direction, h = e.height, g = e.itemCount, _ = e.itemSize, z = e.layout, l = e.width, M = m === "horizontal" || z === "horizontal", y = M ? l : h, a = Math.max(0, g * _ - y), u = Math.min(a, s * _), c = Math.max(0, s * _ - y + _ + d);
|
|
1212
|
+
switch (n === "smart" && (i >= c - y && i <= u + y ? n = "auto" : n = "center"), n) {
|
|
1183
1213
|
case "start":
|
|
1184
|
-
return
|
|
1214
|
+
return u;
|
|
1185
1215
|
case "end":
|
|
1186
1216
|
return c;
|
|
1187
1217
|
case "center": {
|
|
1188
|
-
var
|
|
1189
|
-
return
|
|
1218
|
+
var f = Math.round(c + (u - c) / 2);
|
|
1219
|
+
return f < Math.ceil(y / 2) ? 0 : f > a + Math.floor(y / 2) ? a : f;
|
|
1190
1220
|
}
|
|
1191
1221
|
case "auto":
|
|
1192
1222
|
default:
|
|
1193
|
-
return i >= c && i <=
|
|
1223
|
+
return i >= c && i <= u ? i : i < c ? c : u;
|
|
1194
1224
|
}
|
|
1195
1225
|
},
|
|
1196
1226
|
getStartIndexForOffset: function(e, s) {
|
|
@@ -1198,10 +1228,10 @@ var ln = function(e, s) {
|
|
|
1198
1228
|
return Math.max(0, Math.min(n - 1, Math.floor(s / i)));
|
|
1199
1229
|
},
|
|
1200
1230
|
getStopIndexForStartIndex: function(e, s, n) {
|
|
1201
|
-
var i = e.direction, p = e.height, d = e.itemCount,
|
|
1231
|
+
var i = e.direction, p = e.height, d = e.itemCount, m = e.itemSize, h = e.layout, g = e.width, _ = i === "horizontal" || h === "horizontal", z = s * m, l = _ ? g : p, M = Math.ceil((l + n - z) / m);
|
|
1202
1232
|
return Math.max(0, Math.min(
|
|
1203
1233
|
d - 1,
|
|
1204
|
-
s +
|
|
1234
|
+
s + M - 1
|
|
1205
1235
|
// -1 is because stop index is inclusive
|
|
1206
1236
|
));
|
|
1207
1237
|
},
|
|
@@ -1212,34 +1242,34 @@ var ln = function(e, s) {
|
|
|
1212
1242
|
e.itemSize;
|
|
1213
1243
|
}
|
|
1214
1244
|
});
|
|
1215
|
-
function
|
|
1245
|
+
function mn(t) {
|
|
1216
1246
|
var e = t.lastRenderedStartIndex, s = t.lastRenderedStopIndex, n = t.startIndex, i = t.stopIndex;
|
|
1217
1247
|
return !(n > s || i < e);
|
|
1218
1248
|
}
|
|
1219
|
-
function
|
|
1220
|
-
for (var e = t.isItemLoaded, s = t.itemCount, n = t.minimumBatchSize, i = t.startIndex, p = t.stopIndex, d = [],
|
|
1221
|
-
var
|
|
1222
|
-
|
|
1249
|
+
function fn(t) {
|
|
1250
|
+
for (var e = t.isItemLoaded, s = t.itemCount, n = t.minimumBatchSize, i = t.startIndex, p = t.stopIndex, d = [], m = null, h = null, g = i; g <= p; g++) {
|
|
1251
|
+
var _ = e(g);
|
|
1252
|
+
_ ? h !== null && (d.push(m, h), m = h = null) : (h = g, m === null && (m = g));
|
|
1223
1253
|
}
|
|
1224
1254
|
if (h !== null) {
|
|
1225
|
-
for (var z = Math.min(Math.max(h,
|
|
1255
|
+
for (var z = Math.min(Math.max(h, m + n - 1), s - 1), l = h + 1; l <= z && !e(l); l++)
|
|
1226
1256
|
h = l;
|
|
1227
|
-
d.push(
|
|
1257
|
+
d.push(m, h);
|
|
1228
1258
|
}
|
|
1229
1259
|
if (d.length)
|
|
1230
1260
|
for (; d[1] - d[0] + 1 < n && d[0] > 0; ) {
|
|
1231
|
-
var
|
|
1232
|
-
if (!e(
|
|
1233
|
-
d[0] =
|
|
1261
|
+
var M = d[0] - 1;
|
|
1262
|
+
if (!e(M))
|
|
1263
|
+
d[0] = M;
|
|
1234
1264
|
else
|
|
1235
1265
|
break;
|
|
1236
1266
|
}
|
|
1237
1267
|
return d;
|
|
1238
1268
|
}
|
|
1239
|
-
var
|
|
1269
|
+
var gn = function(t, e) {
|
|
1240
1270
|
if (!(t instanceof e))
|
|
1241
1271
|
throw new TypeError("Cannot call a class as a function");
|
|
1242
|
-
},
|
|
1272
|
+
}, In = function() {
|
|
1243
1273
|
function t(e, s) {
|
|
1244
1274
|
for (var n = 0; n < s.length; n++) {
|
|
1245
1275
|
var i = s[n];
|
|
@@ -1249,7 +1279,7 @@ var pn = function(t, e) {
|
|
|
1249
1279
|
return function(e, s, n) {
|
|
1250
1280
|
return s && t(e.prototype, s), n && t(e, n), e;
|
|
1251
1281
|
};
|
|
1252
|
-
}(),
|
|
1282
|
+
}(), vn = function(t, e) {
|
|
1253
1283
|
if (typeof e != "function" && e !== null)
|
|
1254
1284
|
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1255
1285
|
t.prototype = Object.create(e && e.prototype, {
|
|
@@ -1260,25 +1290,25 @@ var pn = function(t, e) {
|
|
|
1260
1290
|
configurable: !0
|
|
1261
1291
|
}
|
|
1262
1292
|
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1263
|
-
},
|
|
1293
|
+
}, be = function(t, e) {
|
|
1264
1294
|
if (!t)
|
|
1265
1295
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1266
1296
|
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1267
|
-
},
|
|
1268
|
-
|
|
1297
|
+
}, Mn = function(t) {
|
|
1298
|
+
vn(e, t);
|
|
1269
1299
|
function e() {
|
|
1270
1300
|
var s, n, i, p;
|
|
1271
|
-
|
|
1272
|
-
for (var d = arguments.length,
|
|
1273
|
-
|
|
1274
|
-
return p = (n = (i =
|
|
1275
|
-
var
|
|
1276
|
-
i._lastRenderedStartIndex =
|
|
1301
|
+
gn(this, e);
|
|
1302
|
+
for (var d = arguments.length, m = Array(d), h = 0; h < d; h++)
|
|
1303
|
+
m[h] = arguments[h];
|
|
1304
|
+
return p = (n = (i = be(this, (s = e.__proto__ || Object.getPrototypeOf(e)).call.apply(s, [this].concat(m))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(g) {
|
|
1305
|
+
var _ = g.visibleStartIndex, z = g.visibleStopIndex;
|
|
1306
|
+
i._lastRenderedStartIndex = _, i._lastRenderedStopIndex = z, i._ensureRowsLoaded(_, z);
|
|
1277
1307
|
}, i._setRef = function(g) {
|
|
1278
1308
|
i._listRef = g;
|
|
1279
|
-
}, n),
|
|
1309
|
+
}, n), be(i, p);
|
|
1280
1310
|
}
|
|
1281
|
-
return
|
|
1311
|
+
return In(e, [{
|
|
1282
1312
|
key: "resetloadMoreItemsCache",
|
|
1283
1313
|
value: function() {
|
|
1284
1314
|
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1300,72 +1330,72 @@ var pn = function(t, e) {
|
|
|
1300
1330
|
}, {
|
|
1301
1331
|
key: "_ensureRowsLoaded",
|
|
1302
1332
|
value: function(n, i) {
|
|
1303
|
-
var p = this.props, d = p.isItemLoaded,
|
|
1333
|
+
var p = this.props, d = p.isItemLoaded, m = p.itemCount, h = p.minimumBatchSize, g = h === void 0 ? 10 : h, _ = p.threshold, z = _ === void 0 ? 15 : _, l = fn({
|
|
1304
1334
|
isItemLoaded: d,
|
|
1305
|
-
itemCount:
|
|
1335
|
+
itemCount: m,
|
|
1306
1336
|
minimumBatchSize: g,
|
|
1307
1337
|
startIndex: Math.max(0, n - z),
|
|
1308
|
-
stopIndex: Math.min(
|
|
1338
|
+
stopIndex: Math.min(m - 1, i + z)
|
|
1309
1339
|
});
|
|
1310
|
-
(this._memoizedUnloadedRanges.length !== l.length || this._memoizedUnloadedRanges.some(function(
|
|
1311
|
-
return l[
|
|
1340
|
+
(this._memoizedUnloadedRanges.length !== l.length || this._memoizedUnloadedRanges.some(function(M, y) {
|
|
1341
|
+
return l[y] !== M;
|
|
1312
1342
|
})) && (this._memoizedUnloadedRanges = l, this._loadUnloadedRanges(l));
|
|
1313
1343
|
}
|
|
1314
1344
|
}, {
|
|
1315
1345
|
key: "_loadUnloadedRanges",
|
|
1316
1346
|
value: function(n) {
|
|
1317
1347
|
for (var i = this, p = this.props.loadMoreItems || this.props.loadMoreRows, d = function(g) {
|
|
1318
|
-
var
|
|
1348
|
+
var _ = n[g], z = n[g + 1], l = p(_, z);
|
|
1319
1349
|
l != null && l.then(function() {
|
|
1320
|
-
if (
|
|
1350
|
+
if (mn({
|
|
1321
1351
|
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
1322
1352
|
lastRenderedStopIndex: i._lastRenderedStopIndex,
|
|
1323
|
-
startIndex:
|
|
1353
|
+
startIndex: _,
|
|
1324
1354
|
stopIndex: z
|
|
1325
1355
|
})) {
|
|
1326
1356
|
if (i._listRef == null)
|
|
1327
1357
|
return;
|
|
1328
|
-
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(
|
|
1358
|
+
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(_, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
|
|
1329
1359
|
}
|
|
1330
1360
|
});
|
|
1331
|
-
},
|
|
1332
|
-
d(
|
|
1361
|
+
}, m = 0; m < n.length; m += 2)
|
|
1362
|
+
d(m);
|
|
1333
1363
|
}
|
|
1334
1364
|
}]), e;
|
|
1335
|
-
}(
|
|
1336
|
-
const
|
|
1365
|
+
}($e);
|
|
1366
|
+
const yn = () => x, zn = /* @__PURE__ */ o("div")({
|
|
1337
1367
|
name: "a",
|
|
1338
1368
|
class: "a1w9zony",
|
|
1339
1369
|
propsAsIs: !1
|
|
1340
|
-
}),
|
|
1370
|
+
}), Nn = /* @__PURE__ */ o("div")({
|
|
1341
1371
|
name: "l",
|
|
1342
1372
|
class: "l16qcfv8",
|
|
1343
1373
|
propsAsIs: !1
|
|
1344
|
-
}),
|
|
1374
|
+
}), An = /* @__PURE__ */ o("img")({
|
|
1345
1375
|
name: "p",
|
|
1346
1376
|
class: "p1gmcc5f",
|
|
1347
1377
|
propsAsIs: !1
|
|
1348
|
-
}),
|
|
1378
|
+
}), _n = /* @__PURE__ */ o("div")({
|
|
1349
1379
|
name: "s",
|
|
1350
1380
|
class: "s1doddh0",
|
|
1351
1381
|
propsAsIs: !1
|
|
1352
|
-
}),
|
|
1382
|
+
}), Tn = /* @__PURE__ */ o("div")({
|
|
1353
1383
|
name: "c",
|
|
1354
1384
|
class: "c1js9xhe",
|
|
1355
1385
|
propsAsIs: !1
|
|
1356
|
-
}),
|
|
1386
|
+
}), Sn = /* @__PURE__ */ o("div")({
|
|
1357
1387
|
name: "d",
|
|
1358
1388
|
class: "d1tmnqsh",
|
|
1359
1389
|
propsAsIs: !1
|
|
1360
|
-
}),
|
|
1390
|
+
}), xn = /* @__PURE__ */ o("span")({
|
|
1361
1391
|
name: "g",
|
|
1362
1392
|
class: "gi9h87j",
|
|
1363
1393
|
propsAsIs: !1
|
|
1364
|
-
}),
|
|
1394
|
+
}), Dn = /* @__PURE__ */ o(yn())({
|
|
1365
1395
|
name: "x",
|
|
1366
1396
|
class: "x13mk3z6",
|
|
1367
1397
|
propsAsIs: !0
|
|
1368
|
-
}),
|
|
1398
|
+
}), wn = ({
|
|
1369
1399
|
rank: t,
|
|
1370
1400
|
avatar: e,
|
|
1371
1401
|
name: s,
|
|
@@ -1373,38 +1403,38 @@ const gn = () => x, In = /* @__PURE__ */ o("div")({
|
|
|
1373
1403
|
isCurrentUser: i,
|
|
1374
1404
|
openItemDetail: p,
|
|
1375
1405
|
style: d
|
|
1376
|
-
}) => /* @__PURE__ */
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1379
|
-
e ? /* @__PURE__ */
|
|
1380
|
-
/* @__PURE__ */
|
|
1381
|
-
/* @__PURE__ */
|
|
1382
|
-
i && /* @__PURE__ */
|
|
1406
|
+
}) => /* @__PURE__ */ I(zn, { onClick: p, style: d, children: [
|
|
1407
|
+
/* @__PURE__ */ r(Nn, { children: t || 0 }),
|
|
1408
|
+
/* @__PURE__ */ I(Tn, { children: [
|
|
1409
|
+
e ? /* @__PURE__ */ r(An, { alt: "leaderboard-item-avatar", src: e }) : /* @__PURE__ */ r(_n, { children: Ee(s || "") }),
|
|
1410
|
+
/* @__PURE__ */ I(Sn, { children: [
|
|
1411
|
+
/* @__PURE__ */ r(xn, { children: s || "" }),
|
|
1412
|
+
i && /* @__PURE__ */ r(Dn, { name: "icon-star" })
|
|
1383
1413
|
] })
|
|
1384
1414
|
] }),
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
] }),
|
|
1415
|
+
/* @__PURE__ */ r("div", { children: je(n) })
|
|
1416
|
+
] }), bn = ({
|
|
1387
1417
|
items: t,
|
|
1388
1418
|
currentUserId: e,
|
|
1389
1419
|
openItemDetail: s,
|
|
1390
1420
|
fetchMore: n
|
|
1391
|
-
}) => /* @__PURE__ */
|
|
1392
|
-
|
|
1421
|
+
}) => /* @__PURE__ */ r(sn, { children: ({ width: i, height: p }) => /* @__PURE__ */ r(
|
|
1422
|
+
Mn,
|
|
1393
1423
|
{
|
|
1394
1424
|
isItemLoaded: (d) => d < t.length,
|
|
1395
1425
|
itemCount: t.length + 1,
|
|
1396
1426
|
loadMoreItems: n,
|
|
1397
|
-
children: ({ onItemsRendered: d, ref:
|
|
1398
|
-
|
|
1427
|
+
children: ({ onItemsRendered: d, ref: m }) => /* @__PURE__ */ r(
|
|
1428
|
+
hn,
|
|
1399
1429
|
{
|
|
1400
1430
|
itemSize: 56,
|
|
1401
1431
|
onItemsRendered: d,
|
|
1402
|
-
ref:
|
|
1432
|
+
ref: m,
|
|
1403
1433
|
itemCount: t.length,
|
|
1404
1434
|
width: i,
|
|
1405
1435
|
height: p,
|
|
1406
|
-
children: ({ index: h, style: g }) => /* @__PURE__ */
|
|
1407
|
-
|
|
1436
|
+
children: ({ index: h, style: g }) => /* @__PURE__ */ r(
|
|
1437
|
+
wn,
|
|
1408
1438
|
{
|
|
1409
1439
|
style: { ...g, maxHeight: 48 },
|
|
1410
1440
|
...t[h],
|
|
@@ -1417,76 +1447,76 @@ const gn = () => x, In = /* @__PURE__ */ o("div")({
|
|
|
1417
1447
|
)
|
|
1418
1448
|
}
|
|
1419
1449
|
) });
|
|
1420
|
-
const
|
|
1450
|
+
const kn = () => x, On = () => x, En = /* @__PURE__ */ o("div")({
|
|
1421
1451
|
name: "a",
|
|
1422
1452
|
class: "ay8exst",
|
|
1423
1453
|
propsAsIs: !1
|
|
1424
|
-
}),
|
|
1454
|
+
}), jn = /* @__PURE__ */ o("div")({
|
|
1425
1455
|
name: "l",
|
|
1426
1456
|
class: "l31riw0",
|
|
1427
1457
|
propsAsIs: !1
|
|
1428
|
-
}),
|
|
1458
|
+
}), Ln = /* @__PURE__ */ o(kn())({
|
|
1429
1459
|
name: "p",
|
|
1430
1460
|
class: "pcmm4w7",
|
|
1431
1461
|
propsAsIs: !0
|
|
1432
|
-
}),
|
|
1462
|
+
}), $n = /* @__PURE__ */ o("div")({
|
|
1433
1463
|
name: "c",
|
|
1434
1464
|
class: "cct922a",
|
|
1435
1465
|
propsAsIs: !1
|
|
1436
|
-
}),
|
|
1466
|
+
}), Cn = /* @__PURE__ */ o("div")({
|
|
1437
1467
|
name: "s",
|
|
1438
1468
|
class: "s12b7u74",
|
|
1439
1469
|
propsAsIs: !1
|
|
1440
|
-
}),
|
|
1470
|
+
}), Rn = /* @__PURE__ */ o("div")({
|
|
1441
1471
|
name: "x",
|
|
1442
1472
|
class: "x1896nrl",
|
|
1443
1473
|
propsAsIs: !1
|
|
1444
|
-
}),
|
|
1474
|
+
}), Un = /* @__PURE__ */ o("div")({
|
|
1445
1475
|
name: "d",
|
|
1446
1476
|
class: "d1vnagog",
|
|
1447
1477
|
propsAsIs: !1
|
|
1448
|
-
}),
|
|
1478
|
+
}), Qn = /* @__PURE__ */ o("div")({
|
|
1449
1479
|
name: "g",
|
|
1450
1480
|
class: "gznzzc2",
|
|
1451
1481
|
propsAsIs: !1
|
|
1452
|
-
}),
|
|
1482
|
+
}), qn = /* @__PURE__ */ o("span")({
|
|
1453
1483
|
name: "f",
|
|
1454
1484
|
class: "fnmvyxu",
|
|
1455
1485
|
propsAsIs: !1
|
|
1456
|
-
}),
|
|
1486
|
+
}), Yn = /* @__PURE__ */ o("span")({
|
|
1457
1487
|
name: "h",
|
|
1458
1488
|
class: "h1iubd2g",
|
|
1459
1489
|
propsAsIs: !1
|
|
1460
|
-
}),
|
|
1490
|
+
}), Pn = /* @__PURE__ */ o(On())({
|
|
1461
1491
|
name: "m",
|
|
1462
1492
|
class: "mmvjfuo",
|
|
1463
1493
|
propsAsIs: !0
|
|
1464
|
-
}),
|
|
1494
|
+
}), Wn = /* @__PURE__ */ o("div")({
|
|
1465
1495
|
name: "v",
|
|
1466
1496
|
class: "v1oi1553",
|
|
1467
1497
|
propsAsIs: !1
|
|
1468
|
-
}),
|
|
1498
|
+
}), Fn = /* @__PURE__ */ o("a")({
|
|
1469
1499
|
name: "w",
|
|
1470
1500
|
class: "w1vwcogq",
|
|
1471
1501
|
propsAsIs: !1
|
|
1472
|
-
}),
|
|
1502
|
+
}), Vn = /* @__PURE__ */ o("span")({
|
|
1473
1503
|
name: "u",
|
|
1474
1504
|
class: "utbqo0e",
|
|
1475
1505
|
propsAsIs: !1
|
|
1476
|
-
}),
|
|
1506
|
+
}), Hn = ({
|
|
1477
1507
|
inviteLink: t,
|
|
1478
1508
|
socialLinks: e,
|
|
1479
1509
|
inviteCardTitle: s,
|
|
1480
1510
|
inviteCardSubtext: n,
|
|
1481
1511
|
primaryColor: i,
|
|
1482
1512
|
className: p
|
|
1483
|
-
}) => /* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
/* @__PURE__ */
|
|
1486
|
-
/* @__PURE__ */
|
|
1487
|
-
/* @__PURE__ */
|
|
1513
|
+
}) => /* @__PURE__ */ I(En, { className: p, children: [
|
|
1514
|
+
/* @__PURE__ */ r(jn, { style: { backgroundColor: i }, children: /* @__PURE__ */ r(Ln, { name: "invite-game-icon" }) }),
|
|
1515
|
+
/* @__PURE__ */ I($n, { children: [
|
|
1516
|
+
/* @__PURE__ */ r(Cn, { children: s || "" }),
|
|
1517
|
+
/* @__PURE__ */ r(Rn, { children: n || "" })
|
|
1488
1518
|
] }),
|
|
1489
|
-
t && /* @__PURE__ */
|
|
1519
|
+
t && /* @__PURE__ */ I(Un, { onClick: async () => {
|
|
1490
1520
|
if (t)
|
|
1491
1521
|
try {
|
|
1492
1522
|
await navigator.clipboard.writeText(t);
|
|
@@ -1494,20 +1524,20 @@ const xn = () => x, Dn = () => x, wn = /* @__PURE__ */ o("div")({
|
|
|
1494
1524
|
console.error("Unable to copy to clipboard", d);
|
|
1495
1525
|
}
|
|
1496
1526
|
}, children: [
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ I(Qn, { children: [
|
|
1528
|
+
/* @__PURE__ */ r(qn, { children: "Invite link" }),
|
|
1529
|
+
/* @__PURE__ */ r(Yn, { children: t })
|
|
1500
1530
|
] }),
|
|
1501
|
-
/* @__PURE__ */
|
|
1531
|
+
/* @__PURE__ */ r(Pn, { name: "icon-copy" })
|
|
1502
1532
|
] }),
|
|
1503
|
-
e && e.length > 0 && /* @__PURE__ */
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
] },
|
|
1507
|
-
] }),
|
|
1533
|
+
e && e.length > 0 && /* @__PURE__ */ r(Wn, { children: e.map(({ icon: d, link: m, label: h }) => /* @__PURE__ */ I(Fn, { href: m, target: "_blank", children: [
|
|
1534
|
+
/* @__PURE__ */ r(x, { name: d }),
|
|
1535
|
+
/* @__PURE__ */ r(Vn, { children: h })
|
|
1536
|
+
] }, m)) })
|
|
1537
|
+
] }), Bn = ({ deepLink: t }) => {
|
|
1508
1538
|
const { data: e } = O(t.$store);
|
|
1509
|
-
return /* @__PURE__ */
|
|
1510
|
-
|
|
1539
|
+
return /* @__PURE__ */ r(
|
|
1540
|
+
Hn,
|
|
1511
1541
|
{
|
|
1512
1542
|
inviteLink: e == null ? void 0 : e.url,
|
|
1513
1543
|
socialLinks: [
|
|
@@ -1526,65 +1556,65 @@ const xn = () => x, Dn = () => x, wn = /* @__PURE__ */ o("div")({
|
|
|
1526
1556
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1527
1557
|
}
|
|
1528
1558
|
);
|
|
1529
|
-
},
|
|
1559
|
+
}, Gn = ({ gamification: t }) => {
|
|
1530
1560
|
const { data: e } = O(t.leaderboardList.$store);
|
|
1531
|
-
return e != null && e.length ? /* @__PURE__ */
|
|
1532
|
-
|
|
1561
|
+
return e != null && e.length ? /* @__PURE__ */ r(
|
|
1562
|
+
bn,
|
|
1533
1563
|
{
|
|
1534
1564
|
fetchMore: t.leaderboardList.fetchMore,
|
|
1535
1565
|
items: e,
|
|
1536
1566
|
openItemDetail: t.openUser,
|
|
1537
1567
|
currentUserId: t.currentUserId.get()
|
|
1538
1568
|
}
|
|
1539
|
-
) : /* @__PURE__ */
|
|
1569
|
+
) : /* @__PURE__ */ r(Bn, { deepLink: t.deepLink });
|
|
1540
1570
|
};
|
|
1541
|
-
const
|
|
1571
|
+
const Zn = /* @__PURE__ */ o("button")({
|
|
1542
1572
|
name: "a",
|
|
1543
1573
|
class: "akly9h2",
|
|
1544
1574
|
propsAsIs: !1
|
|
1545
|
-
}),
|
|
1575
|
+
}), Jn = /* @__PURE__ */ o("span")({
|
|
1546
1576
|
name: "e",
|
|
1547
1577
|
class: "eptoiz9",
|
|
1548
1578
|
propsAsIs: !1
|
|
1549
|
-
}),
|
|
1550
|
-
const
|
|
1579
|
+
}), Kn = ({ disabled: t, variant: e = "primary", onClick: s, children: n, ...i }) => /* @__PURE__ */ r(Zn, { onClick: s, disabled: t, "data-variant": e, ...i, children: /* @__PURE__ */ r(Jn, { children: n }) });
|
|
1580
|
+
const Xn = () => x, ei = () => x, ti = /* @__PURE__ */ o("div")({
|
|
1551
1581
|
name: "s",
|
|
1552
1582
|
class: "s1lblda3",
|
|
1553
1583
|
propsAsIs: !1
|
|
1554
|
-
}),
|
|
1584
|
+
}), si = /* @__PURE__ */ o("div")({
|
|
1555
1585
|
name: "a",
|
|
1556
1586
|
class: "ascvb2g",
|
|
1557
1587
|
propsAsIs: !1
|
|
1558
|
-
}),
|
|
1588
|
+
}), ni = /* @__PURE__ */ o("div")({
|
|
1559
1589
|
name: "p",
|
|
1560
1590
|
class: "p17rl8zy",
|
|
1561
1591
|
propsAsIs: !1
|
|
1562
|
-
}),
|
|
1592
|
+
}), ii = /* @__PURE__ */ o("div")({
|
|
1563
1593
|
name: "l",
|
|
1564
1594
|
class: "l1vvttbn",
|
|
1565
1595
|
propsAsIs: !1
|
|
1566
|
-
}), se = /* @__PURE__ */ o(
|
|
1596
|
+
}), se = /* @__PURE__ */ o(Xn())({
|
|
1567
1597
|
name: "c",
|
|
1568
1598
|
class: "c6fk2ph",
|
|
1569
1599
|
propsAsIs: !0
|
|
1570
|
-
}),
|
|
1600
|
+
}), ri = /* @__PURE__ */ o(ei())({
|
|
1571
1601
|
name: "d",
|
|
1572
1602
|
class: "d1rdm136",
|
|
1573
1603
|
propsAsIs: !0
|
|
1574
|
-
}),
|
|
1604
|
+
}), ai = /* @__PURE__ */ o("div")({
|
|
1575
1605
|
name: "f",
|
|
1576
1606
|
class: "fwqnnel",
|
|
1577
1607
|
propsAsIs: !1
|
|
1578
|
-
}),
|
|
1608
|
+
}), oi = /* @__PURE__ */ o("div")({
|
|
1579
1609
|
name: "u",
|
|
1580
1610
|
class: "ucyxnlg",
|
|
1581
1611
|
propsAsIs: !1
|
|
1582
|
-
}),
|
|
1583
|
-
[
|
|
1584
|
-
[
|
|
1585
|
-
[
|
|
1586
|
-
[
|
|
1587
|
-
},
|
|
1612
|
+
}), li = {
|
|
1613
|
+
[V.LOST]: /* @__PURE__ */ r(se, { name: "icon-cross" }),
|
|
1614
|
+
[V.WON]: /* @__PURE__ */ r(se, { name: "icon-check" }),
|
|
1615
|
+
[V.UNSET]: void 0,
|
|
1616
|
+
[V.DNP]: /* @__PURE__ */ r(se, { name: "icon-arrow" })
|
|
1617
|
+
}, ci = ({
|
|
1588
1618
|
questionId: t,
|
|
1589
1619
|
questionType: e,
|
|
1590
1620
|
questionStatus: s,
|
|
@@ -1593,118 +1623,118 @@ const Gn = () => x, Zn = () => x, Jn = /* @__PURE__ */ o("div")({
|
|
|
1593
1623
|
openQuestion: p,
|
|
1594
1624
|
status: d
|
|
1595
1625
|
}) => {
|
|
1596
|
-
const
|
|
1597
|
-
return
|
|
1598
|
-
/* @__PURE__ */
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
|
|
1626
|
+
const m = Oe[e], h = li[d];
|
|
1627
|
+
return m ? /* @__PURE__ */ I(ti, { onClick: () => p == null ? void 0 : p(t), children: [
|
|
1628
|
+
/* @__PURE__ */ I(oi, { children: [
|
|
1629
|
+
/* @__PURE__ */ I(si, { children: [
|
|
1630
|
+
/* @__PURE__ */ r(ri, { name: m.iconName }),
|
|
1631
|
+
/* @__PURE__ */ I(ai, { children: [
|
|
1632
|
+
m.label,
|
|
1603
1633
|
e === D.TRIVIA && s === Y.RESOLVED && " • Expired"
|
|
1604
1634
|
] })
|
|
1605
1635
|
] }),
|
|
1606
|
-
/* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ r(ni, { children: n || "" })
|
|
1607
1637
|
] }),
|
|
1608
|
-
/* @__PURE__ */
|
|
1638
|
+
/* @__PURE__ */ r(ii, { children: h || (i ? /* @__PURE__ */ r(Kn, { children: "Play" }) : null) })
|
|
1609
1639
|
] }) : null;
|
|
1610
1640
|
};
|
|
1611
|
-
const
|
|
1641
|
+
const di = /* @__PURE__ */ o("div")({
|
|
1612
1642
|
name: "n",
|
|
1613
1643
|
class: "n1jcgove",
|
|
1614
1644
|
propsAsIs: !1
|
|
1615
|
-
}),
|
|
1645
|
+
}), ui = /* @__PURE__ */ o("button")({
|
|
1616
1646
|
name: "l",
|
|
1617
1647
|
class: "l1bwp7hh",
|
|
1618
1648
|
propsAsIs: !1
|
|
1619
|
-
}),
|
|
1649
|
+
}), pi = ({
|
|
1620
1650
|
openInsight: t,
|
|
1621
1651
|
questionId: e,
|
|
1622
1652
|
...s
|
|
1623
|
-
}) => /* @__PURE__ */
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
t && /* @__PURE__ */
|
|
1653
|
+
}) => /* @__PURE__ */ I(di, { children: [
|
|
1654
|
+
/* @__PURE__ */ r(Ye, { questionId: e, ...s }),
|
|
1655
|
+
t && /* @__PURE__ */ r(ui, { onClick: () => t(e), children: "View Insight" })
|
|
1626
1656
|
] });
|
|
1627
|
-
const
|
|
1657
|
+
const hi = /* @__PURE__ */ o("div")({
|
|
1628
1658
|
name: "t",
|
|
1629
1659
|
class: "t19vr3p1",
|
|
1630
1660
|
propsAsIs: !1
|
|
1631
|
-
}),
|
|
1661
|
+
}), mi = ({ questions: t, openQuestion: e }) => /* @__PURE__ */ r(hi, { children: t == null ? void 0 : t.map((s) => {
|
|
1632
1662
|
var n, i;
|
|
1633
1663
|
if (s.type === "question" && ((n = s.attributes) == null ? void 0 : n.attributes.case) === "question") {
|
|
1634
1664
|
const p = s.attributes.attributes.value;
|
|
1635
|
-
return /* @__PURE__ */
|
|
1665
|
+
return /* @__PURE__ */ r(ci, { openQuestion: e, ...p }, p.questionId);
|
|
1636
1666
|
}
|
|
1637
1667
|
if (s.type === "insight" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "insight") {
|
|
1638
1668
|
const p = s.attributes.attributes.value;
|
|
1639
|
-
return /* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ r(pi, { openInsight: e, ...p }, p.questionId);
|
|
1640
1670
|
}
|
|
1641
1671
|
return null;
|
|
1642
|
-
}) }),
|
|
1672
|
+
}) }), fi = ({ store: t, openQuestion: e }) => {
|
|
1643
1673
|
const s = O(t);
|
|
1644
|
-
return s != null && s.data ? /* @__PURE__ */
|
|
1645
|
-
},
|
|
1674
|
+
return s != null && s.data ? /* @__PURE__ */ r(mi, { openQuestion: e, questions: s.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
|
|
1675
|
+
}, gi = ({ userSummary: t }) => {
|
|
1646
1676
|
var e, s;
|
|
1647
1677
|
const n = O(t.getStore());
|
|
1648
|
-
return (e = n.data) != null && e.summary ? /* @__PURE__ */
|
|
1649
|
-
},
|
|
1650
|
-
const [e, s] =
|
|
1651
|
-
return /* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
e ===
|
|
1678
|
+
return (e = n.data) != null && e.summary ? /* @__PURE__ */ r(Re, { ...n.data.summary, successRate: (s = n.data.percentage) == null ? void 0 : s.correct }) : /* @__PURE__ */ r("div", { children: "wait user..." });
|
|
1679
|
+
}, Ii = ({ gamification: t }) => {
|
|
1680
|
+
const [e, s] = R(q.HOME);
|
|
1681
|
+
return /* @__PURE__ */ I("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
1682
|
+
/* @__PURE__ */ I(ne, { children: [
|
|
1683
|
+
/* @__PURE__ */ r(en, { activePage: e, toggleActivePage: s }),
|
|
1684
|
+
e === q.HOME && /* @__PURE__ */ r(gi, { userSummary: t.userSummary })
|
|
1655
1685
|
] }),
|
|
1656
|
-
e ===
|
|
1657
|
-
e ===
|
|
1686
|
+
e === q.HOME && /* @__PURE__ */ r(st, { children: /* @__PURE__ */ r(fi, { openQuestion: t.openQuestion, store: t.feedList.getStore() }) }),
|
|
1687
|
+
e === q.LEADERBOARD && /* @__PURE__ */ r(ne, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ r(Gn, { gamification: t }) })
|
|
1658
1688
|
] });
|
|
1659
1689
|
};
|
|
1660
|
-
const
|
|
1690
|
+
const vi = () => nt, ke = /* @__PURE__ */ o(vi())({
|
|
1661
1691
|
name: "n",
|
|
1662
1692
|
class: "n1ph66cs",
|
|
1663
1693
|
propsAsIs: !0
|
|
1664
|
-
}),
|
|
1694
|
+
}), Mi = /* @__PURE__ */ o("div")({
|
|
1665
1695
|
name: "x",
|
|
1666
1696
|
class: "xorme7i",
|
|
1667
1697
|
propsAsIs: !1
|
|
1668
|
-
}),
|
|
1698
|
+
}), yi = ({
|
|
1669
1699
|
correct: t,
|
|
1670
1700
|
incorrect: e
|
|
1671
1701
|
}) => {
|
|
1672
1702
|
const s = t + e;
|
|
1673
1703
|
return s === 0 ? 0 : Math.round(t / s * 100);
|
|
1674
|
-
},
|
|
1704
|
+
}, _i = ({
|
|
1675
1705
|
gamification: t,
|
|
1676
1706
|
className: e
|
|
1677
1707
|
}) => {
|
|
1678
1708
|
const s = O(t.openedQuestion.$store), n = O(t.openedUser);
|
|
1679
|
-
return /* @__PURE__ */
|
|
1680
|
-
children: [s && /* @__PURE__ */
|
|
1709
|
+
return /* @__PURE__ */ I($, {
|
|
1710
|
+
children: [s && /* @__PURE__ */ r(ke, {
|
|
1681
1711
|
className: e,
|
|
1682
|
-
children: /* @__PURE__ */
|
|
1712
|
+
children: /* @__PURE__ */ r(Gs, {
|
|
1683
1713
|
gamification: t
|
|
1684
1714
|
})
|
|
1685
|
-
}), n && /* @__PURE__ */
|
|
1715
|
+
}), n && /* @__PURE__ */ r(ke, {
|
|
1686
1716
|
className: e,
|
|
1687
|
-
children: /* @__PURE__ */
|
|
1688
|
-
children: [/* @__PURE__ */
|
|
1717
|
+
children: /* @__PURE__ */ I(Mi, {
|
|
1718
|
+
children: [/* @__PURE__ */ r(Ce, {
|
|
1689
1719
|
label: "Friend's Rank",
|
|
1690
1720
|
close: t.closeUser
|
|
1691
|
-
}), /* @__PURE__ */
|
|
1692
|
-
children: /* @__PURE__ */
|
|
1721
|
+
}), /* @__PURE__ */ r(ne, {
|
|
1722
|
+
children: /* @__PURE__ */ r(Re, {
|
|
1693
1723
|
...n,
|
|
1694
|
-
successRate:
|
|
1724
|
+
successRate: yi(n)
|
|
1695
1725
|
})
|
|
1696
1726
|
})]
|
|
1697
1727
|
})
|
|
1698
|
-
}), /* @__PURE__ */
|
|
1728
|
+
}), /* @__PURE__ */ r(Le, {
|
|
1699
1729
|
className: e,
|
|
1700
1730
|
"data-nav": "true",
|
|
1701
|
-
children: /* @__PURE__ */
|
|
1731
|
+
children: /* @__PURE__ */ r(Ii, {
|
|
1702
1732
|
gamification: t
|
|
1703
1733
|
})
|
|
1704
1734
|
})]
|
|
1705
1735
|
});
|
|
1706
1736
|
};
|
|
1707
1737
|
export {
|
|
1708
|
-
|
|
1709
|
-
|
|
1738
|
+
_i as GamificationOverlay,
|
|
1739
|
+
_i as default
|
|
1710
1740
|
};
|