@streamlayer/react 0.32.0 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index4.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +13 -13
- package/lib/dist/es/gamification-feature.js +356 -342
- package/lib/dist/es/masters.js +2120 -2117
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +227 -213
- package/lib/es/index4.js +93 -90
- package/lib/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as m, jsx as s, Fragment as
|
|
1
|
+
import { jsxs as m, jsx as s, Fragment as w } from "react/jsx-runtime";
|
|
2
2
|
import { s as r, n as O } from "./index4.js";
|
|
3
3
|
import { useStore as k } from "@nanostores/react";
|
|
4
4
|
import { o as Ne, r as te, w as Re, A as Qe, O as Ue, a as K, n as _e, d as Pe } from "./masters2.js";
|
|
@@ -206,26 +206,38 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
206
206
|
] })
|
|
207
207
|
] })
|
|
208
208
|
] }), Dt = /* @__PURE__ */ r("div")({
|
|
209
|
+
name: "SponsorLogoWrap",
|
|
210
|
+
class: "s8p5v5z",
|
|
211
|
+
propsAsIs: !1
|
|
212
|
+
}), St = () => O, zt = /* @__PURE__ */ r(St())({
|
|
213
|
+
name: "SponsorLogo",
|
|
214
|
+
class: "s755yti",
|
|
215
|
+
propsAsIs: !0
|
|
216
|
+
}), xt = () => /* @__PURE__ */ s(Dt, {
|
|
217
|
+
children: /* @__PURE__ */ s(zt, {
|
|
218
|
+
name: "mastersLogo"
|
|
219
|
+
})
|
|
220
|
+
}), Ot = /* @__PURE__ */ r("div")({
|
|
209
221
|
name: "Container",
|
|
210
222
|
class: "c38csyt",
|
|
211
223
|
propsAsIs: !1
|
|
212
|
-
}),
|
|
224
|
+
}), jt = /* @__PURE__ */ r("div")({
|
|
213
225
|
name: "Title",
|
|
214
226
|
class: "ty221rx",
|
|
215
227
|
propsAsIs: !1
|
|
216
|
-
}),
|
|
228
|
+
}), Ct = /* @__PURE__ */ r("div")({
|
|
217
229
|
name: "Description",
|
|
218
230
|
class: "dlaj9xp",
|
|
219
231
|
propsAsIs: !1
|
|
220
|
-
}),
|
|
232
|
+
}), kt = ({ title: e, description: t }) => /* @__PURE__ */ m(Ot, { children: [
|
|
221
233
|
/* @__PURE__ */ s(O, { name: "icon-check-circle" }),
|
|
222
|
-
/* @__PURE__ */ s(
|
|
223
|
-
/* @__PURE__ */ s(
|
|
224
|
-
] }),
|
|
234
|
+
/* @__PURE__ */ s(jt, { children: e }),
|
|
235
|
+
/* @__PURE__ */ s(Ct, { children: t })
|
|
236
|
+
] }), bt = /* @__PURE__ */ r("div")({
|
|
225
237
|
name: "Container",
|
|
226
238
|
class: "c16sbdnm",
|
|
227
239
|
propsAsIs: !1
|
|
228
|
-
}),
|
|
240
|
+
}), wt = () => O, Lt = /* @__PURE__ */ r(wt())({
|
|
229
241
|
name: "IconPrediction",
|
|
230
242
|
class: "ibhorgl",
|
|
231
243
|
propsAsIs: !0
|
|
@@ -237,7 +249,7 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
237
249
|
name: "FeedbackHeader",
|
|
238
250
|
class: "f455ozj",
|
|
239
251
|
propsAsIs: !1
|
|
240
|
-
}),
|
|
252
|
+
}), Et = /* @__PURE__ */ r("span")({
|
|
241
253
|
name: "FeedbackTitle",
|
|
242
254
|
class: "f1913njx",
|
|
243
255
|
propsAsIs: !1
|
|
@@ -245,11 +257,11 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
245
257
|
name: "FeedbackDescription",
|
|
246
258
|
class: "fzfk69z",
|
|
247
259
|
propsAsIs: !1
|
|
248
|
-
}),
|
|
260
|
+
}), $t = /* @__PURE__ */ r("div")({
|
|
249
261
|
name: "FeedbackText",
|
|
250
262
|
class: "fx87qaj",
|
|
251
263
|
propsAsIs: !1
|
|
252
|
-
}),
|
|
264
|
+
}), Rt = ({
|
|
253
265
|
feedbackMessages: e,
|
|
254
266
|
questionVotedCorrectly: t,
|
|
255
267
|
questionVoted: n,
|
|
@@ -261,59 +273,59 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
261
273
|
if (!p && u !== L.RESOLVED || u === L.RESOLVED && i === z.PREDICTION && !n)
|
|
262
274
|
return null;
|
|
263
275
|
const I = i === z.PREDICTION && !o, c = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
|
|
264
|
-
return /* @__PURE__ */ m(
|
|
265
|
-
u === L.RESOLVED && i === z.TRIVIA && !n && /* @__PURE__ */ m(
|
|
276
|
+
return /* @__PURE__ */ m(bt, { "data-isPrediction": I, children: [
|
|
277
|
+
u === L.RESOLVED && i === z.TRIVIA && !n && /* @__PURE__ */ m(w, { children: [
|
|
266
278
|
/* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(O, { name: "questionExpired" }) }),
|
|
267
279
|
/* @__PURE__ */ m("div", { children: [
|
|
268
280
|
/* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Z, { children: "Question Expired" }) }),
|
|
269
|
-
/* @__PURE__ */ s(
|
|
281
|
+
/* @__PURE__ */ s($t, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
270
282
|
] })
|
|
271
283
|
] }),
|
|
272
|
-
p && I && /* @__PURE__ */ m(
|
|
273
|
-
/* @__PURE__ */ s(
|
|
284
|
+
p && I && /* @__PURE__ */ m(w, { children: [
|
|
285
|
+
/* @__PURE__ */ s(Lt, { name: "icon-prediction" }),
|
|
274
286
|
/* @__PURE__ */ s(Z, { children: "Stay tuned to see if your prediction was correct." })
|
|
275
287
|
] }),
|
|
276
|
-
p && o && /* @__PURE__ */ m(
|
|
288
|
+
p && o && /* @__PURE__ */ m(w, { children: [
|
|
277
289
|
/* @__PURE__ */ s(ae, { "data-feedbackType": c, children: /* @__PURE__ */ s(O, { name: c }) }),
|
|
278
290
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ m(le, { children: [
|
|
279
|
-
/* @__PURE__ */ s(
|
|
291
|
+
/* @__PURE__ */ s(Et, { "data-feedbackType": c, children: h == null ? void 0 : h.title }),
|
|
280
292
|
/* @__PURE__ */ s(Z, { children: h == null ? void 0 : h.description })
|
|
281
293
|
] }) })
|
|
282
294
|
] })
|
|
283
295
|
] });
|
|
284
|
-
},
|
|
296
|
+
}, Qt = /* @__PURE__ */ r("div")({
|
|
285
297
|
name: "Container",
|
|
286
298
|
class: "c14ielyq",
|
|
287
299
|
propsAsIs: !1
|
|
288
|
-
}),
|
|
300
|
+
}), Ut = /* @__PURE__ */ r("div")({
|
|
289
301
|
name: "Content",
|
|
290
302
|
class: "c1tlqx57",
|
|
291
303
|
propsAsIs: !1
|
|
292
|
-
}),
|
|
304
|
+
}), _t = /* @__PURE__ */ r("div")({
|
|
293
305
|
name: "Title",
|
|
294
306
|
class: "t1hq58md",
|
|
295
307
|
propsAsIs: !1
|
|
296
|
-
}),
|
|
308
|
+
}), Pt = /* @__PURE__ */ r("div")({
|
|
297
309
|
name: "Options",
|
|
298
310
|
class: "o1c8nxcx",
|
|
299
311
|
propsAsIs: !1
|
|
300
|
-
}),
|
|
312
|
+
}), qt = /* @__PURE__ */ r("button")({
|
|
301
313
|
name: "ButtonContainer",
|
|
302
314
|
class: "b1b6dl8t",
|
|
303
315
|
propsAsIs: !1
|
|
304
|
-
}),
|
|
316
|
+
}), Yt = /* @__PURE__ */ r("div")({
|
|
305
317
|
name: "ButtonPct",
|
|
306
318
|
class: "b4iik8i",
|
|
307
319
|
propsAsIs: !1
|
|
308
|
-
}),
|
|
320
|
+
}), Wt = /* @__PURE__ */ r("span")({
|
|
309
321
|
name: "ButtonBody",
|
|
310
322
|
class: "b1gq1lnf",
|
|
311
323
|
propsAsIs: !1
|
|
312
|
-
}),
|
|
324
|
+
}), Vt = /* @__PURE__ */ r("div")({
|
|
313
325
|
name: "IconContainer",
|
|
314
326
|
class: "i1j65z51",
|
|
315
327
|
propsAsIs: !1
|
|
316
|
-
}),
|
|
328
|
+
}), Ft = /* @__PURE__ */ r("div")({
|
|
317
329
|
name: "IconWrap",
|
|
318
330
|
class: "i19tpfua",
|
|
319
331
|
propsAsIs: !1
|
|
@@ -321,37 +333,37 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
321
333
|
name: "Icon",
|
|
322
334
|
class: "i1tubmma",
|
|
323
335
|
propsAsIs: !1
|
|
324
|
-
}),
|
|
336
|
+
}), Bt = () => xe, Ht = /* @__PURE__ */ r(Bt())({
|
|
325
337
|
name: "IconDefault",
|
|
326
338
|
class: "i1grrgwj",
|
|
327
339
|
propsAsIs: !0
|
|
328
|
-
}),
|
|
340
|
+
}), Zt = () => xe, Gt = /* @__PURE__ */ r(Zt())({
|
|
329
341
|
name: "IconCircle",
|
|
330
342
|
class: "ibemyq8",
|
|
331
343
|
propsAsIs: !0
|
|
332
|
-
}),
|
|
344
|
+
}), Jt = /* @__PURE__ */ r("span")({
|
|
333
345
|
name: "Title",
|
|
334
346
|
class: "t1dceht",
|
|
335
347
|
propsAsIs: !1
|
|
336
|
-
}),
|
|
348
|
+
}), Kt = /* @__PURE__ */ r("span")({
|
|
337
349
|
name: "Indicators",
|
|
338
350
|
class: "i116q4vq",
|
|
339
351
|
propsAsIs: !1
|
|
340
|
-
}),
|
|
352
|
+
}), Xt = /* @__PURE__ */ r("span")({
|
|
341
353
|
name: "Percentage",
|
|
342
354
|
class: "p17ajcu2",
|
|
343
355
|
propsAsIs: !1
|
|
344
|
-
}),
|
|
356
|
+
}), en = () => O, tn = /* @__PURE__ */ r(en())({
|
|
345
357
|
name: "CheckIcon",
|
|
346
358
|
class: "cu9kmlb",
|
|
347
359
|
propsAsIs: !0
|
|
348
360
|
}), ce = {
|
|
349
|
-
[R.CENTERED]: (e) => /* @__PURE__ */ s(
|
|
350
|
-
[R.TRANSPARENT]: (e) => /* @__PURE__ */ s(
|
|
351
|
-
[R.ROUNDED]: (e) => /* @__PURE__ */ s(
|
|
361
|
+
[R.CENTERED]: (e) => /* @__PURE__ */ s(Ht, { alt: "option-icon", src: e }),
|
|
362
|
+
[R.TRANSPARENT]: (e) => /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ s(Ft, { style: { backgroundImage: `url(${e})` } }) }),
|
|
363
|
+
[R.ROUNDED]: (e) => /* @__PURE__ */ s(Gt, { alt: "option-icon", src: e }),
|
|
352
364
|
[R.NONE]: () => null,
|
|
353
365
|
[R.UNSET]: () => null
|
|
354
|
-
},
|
|
366
|
+
}, nn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: o }) => {
|
|
355
367
|
if (e === z.POLL && i)
|
|
356
368
|
return "correct";
|
|
357
369
|
if (e === z.PREDICTION) {
|
|
@@ -361,13 +373,13 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
361
373
|
return "correct";
|
|
362
374
|
}
|
|
363
375
|
return e === z.TRIVIA && o && i ? n ? "correct" : "incorrect" : "unset";
|
|
364
|
-
},
|
|
376
|
+
}, sn = ({
|
|
365
377
|
questionType: e,
|
|
366
378
|
questionVoted: t,
|
|
367
379
|
correct: n,
|
|
368
380
|
hasCorrectAnswer: i,
|
|
369
381
|
questionStatus: o
|
|
370
|
-
}) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || o === L.RESOLVED && n : !1,
|
|
382
|
+
}) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || o === L.RESOLVED && n : !1, on = (e) => {
|
|
371
383
|
var t;
|
|
372
384
|
const {
|
|
373
385
|
// option props
|
|
@@ -387,9 +399,9 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
387
399
|
questionType: A,
|
|
388
400
|
correct: T,
|
|
389
401
|
hasCorrectAnswer: a
|
|
390
|
-
} = e, l =
|
|
402
|
+
} = e, l = nn(e), d = sn({ questionType: A, questionVoted: c, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = D === L.RESOLVED && A === z.PREDICTION, M = c || g;
|
|
391
403
|
return /* @__PURE__ */ m(
|
|
392
|
-
|
|
404
|
+
qt,
|
|
393
405
|
{
|
|
394
406
|
value: n,
|
|
395
407
|
"data-selected": I,
|
|
@@ -398,41 +410,41 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
398
410
|
"data-isNotChecked": c && !I && l !== "incorrect",
|
|
399
411
|
onClick: p,
|
|
400
412
|
children: [
|
|
401
|
-
/* @__PURE__ */ s(
|
|
402
|
-
/* @__PURE__ */ m(
|
|
413
|
+
/* @__PURE__ */ s(Yt, { "data-answerState": l, style: { width: `${M ? u : 0}%` } }),
|
|
414
|
+
/* @__PURE__ */ m(Wt, { children: [
|
|
403
415
|
i && h && ((t = ce[h]) == null ? void 0 : t.call(ce, i)),
|
|
404
|
-
/* @__PURE__ */ s(
|
|
405
|
-
M && /* @__PURE__ */ m(
|
|
406
|
-
d && /* @__PURE__ */ s(
|
|
407
|
-
/* @__PURE__ */ s(
|
|
416
|
+
/* @__PURE__ */ s(Jt, { children: o }),
|
|
417
|
+
M && /* @__PURE__ */ m(Kt, { children: [
|
|
418
|
+
d && /* @__PURE__ */ s(tn, { name: "selected" }),
|
|
419
|
+
/* @__PURE__ */ s(Xt, { children: /* @__PURE__ */ s(Ae, { value: u, suffix: "%" }) })
|
|
408
420
|
] })
|
|
409
421
|
] })
|
|
410
422
|
]
|
|
411
423
|
}
|
|
412
424
|
);
|
|
413
|
-
},
|
|
425
|
+
}, rn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], an = [10, 10, 0], ln = /* @__PURE__ */ r("div")({
|
|
414
426
|
name: "RemainingTime",
|
|
415
427
|
class: "r165427",
|
|
416
428
|
propsAsIs: !1
|
|
417
|
-
}),
|
|
429
|
+
}), cn = E.SECONDARY_GREEN6, de = E.SECONDARY_RED3, dn = E.NEUTRALS_GRAY3, un = ({
|
|
418
430
|
isPlaying: e = !0,
|
|
419
431
|
duration: t = 30,
|
|
420
432
|
onTimerExpired: n
|
|
421
433
|
}) => {
|
|
422
|
-
const [i, o] = V(t > 10 ?
|
|
434
|
+
const [i, o] = V(t > 10 ? cn : de), u = ({
|
|
423
435
|
remainingTime: c
|
|
424
|
-
}) => /* @__PURE__ */ s(
|
|
436
|
+
}) => /* @__PURE__ */ s(ln, {
|
|
425
437
|
children: c
|
|
426
438
|
}), p = F(() => {
|
|
427
|
-
n == null || n(), o(
|
|
439
|
+
n == null || n(), o(dn);
|
|
428
440
|
}, [n, o]), I = F((c) => {
|
|
429
441
|
c === 10 && o(de);
|
|
430
442
|
}, [o]);
|
|
431
443
|
return /* @__PURE__ */ s(qe, {
|
|
432
444
|
isPlaying: e,
|
|
433
445
|
duration: t,
|
|
434
|
-
colors:
|
|
435
|
-
colorsTime:
|
|
446
|
+
colors: rn,
|
|
447
|
+
colorsTime: an,
|
|
436
448
|
size: 32,
|
|
437
449
|
strokeWidth: 2,
|
|
438
450
|
trailStrokeWidth: 2,
|
|
@@ -441,35 +453,35 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
441
453
|
onUpdate: I,
|
|
442
454
|
children: u
|
|
443
455
|
});
|
|
444
|
-
},
|
|
456
|
+
}, pn = /* @__PURE__ */ r("div")({
|
|
445
457
|
name: "WinBarContainer",
|
|
446
458
|
class: "wie6cqo",
|
|
447
459
|
propsAsIs: !1
|
|
448
|
-
}),
|
|
460
|
+
}), mn = /* @__PURE__ */ r("div")({
|
|
449
461
|
name: "Content",
|
|
450
462
|
class: "cgizw4u",
|
|
451
463
|
propsAsIs: !1
|
|
452
|
-
}),
|
|
464
|
+
}), In = /* @__PURE__ */ r("div")({
|
|
453
465
|
name: "Title",
|
|
454
466
|
class: "t1l3ucjp",
|
|
455
467
|
propsAsIs: !1
|
|
456
|
-
}),
|
|
468
|
+
}), hn = () => O, gn = /* @__PURE__ */ r(hn())({
|
|
457
469
|
name: "WinIcon",
|
|
458
470
|
class: "wx7j799",
|
|
459
471
|
propsAsIs: !0
|
|
460
|
-
}),
|
|
472
|
+
}), fn = /* @__PURE__ */ r("div")({
|
|
461
473
|
name: "Points",
|
|
462
474
|
class: "p4lwuj0",
|
|
463
475
|
propsAsIs: !1
|
|
464
|
-
}),
|
|
476
|
+
}), Mn = /* @__PURE__ */ r("span")({
|
|
465
477
|
name: "PointsCount",
|
|
466
478
|
class: "po9i64o",
|
|
467
479
|
propsAsIs: !1
|
|
468
|
-
}),
|
|
480
|
+
}), vn = /* @__PURE__ */ r("span")({
|
|
469
481
|
name: "PointsUnits",
|
|
470
482
|
class: "pe5g05h",
|
|
471
483
|
propsAsIs: !1
|
|
472
|
-
}),
|
|
484
|
+
}), Nn = ({
|
|
473
485
|
title: e,
|
|
474
486
|
points: t,
|
|
475
487
|
isPlayingTimer: n,
|
|
@@ -477,19 +489,19 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
477
489
|
questionType: o,
|
|
478
490
|
timerDuration: u,
|
|
479
491
|
onTimerExpired: p
|
|
480
|
-
}) => /* @__PURE__ */ m(
|
|
481
|
-
/* @__PURE__ */ m(
|
|
482
|
-
e && /* @__PURE__ */ s(
|
|
483
|
-
t !== void 0 && o !== z.POLL && /* @__PURE__ */ m(
|
|
484
|
-
/* @__PURE__ */ s(
|
|
485
|
-
/* @__PURE__ */ m(
|
|
486
|
-
/* @__PURE__ */ s(
|
|
487
|
-
/* @__PURE__ */ s(
|
|
492
|
+
}) => /* @__PURE__ */ m(pn, { children: [
|
|
493
|
+
/* @__PURE__ */ m(mn, { children: [
|
|
494
|
+
e && /* @__PURE__ */ s(In, { children: e }),
|
|
495
|
+
t !== void 0 && o !== z.POLL && /* @__PURE__ */ m(w, { children: [
|
|
496
|
+
/* @__PURE__ */ s(gn, { name: "icon-trophy" }),
|
|
497
|
+
/* @__PURE__ */ m(fn, { children: [
|
|
498
|
+
/* @__PURE__ */ s(Mn, { children: /* @__PURE__ */ s(Ae, { value: t }) }),
|
|
499
|
+
/* @__PURE__ */ s(vn, { children: "PTS" })
|
|
488
500
|
] })
|
|
489
501
|
] })
|
|
490
502
|
] }),
|
|
491
|
-
i && /* @__PURE__ */ s(
|
|
492
|
-
] }),
|
|
503
|
+
i && /* @__PURE__ */ s(un, { isPlaying: n, onTimerExpired: p, duration: u })
|
|
504
|
+
] }), yn = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
|
|
493
505
|
var o, u;
|
|
494
506
|
const p = e.subject, I = e.type, c = (o = e.options) == null ? void 0 : o.options, [h, y] = V(!1), [D, N] = V(""), A = e == null ? void 0 : e.id, T = F(
|
|
495
507
|
async (v) => {
|
|
@@ -523,9 +535,9 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
523
535
|
onVote: T
|
|
524
536
|
};
|
|
525
537
|
}) : [], [d, h, t, e, l, T, D]), M = c && (c.case === "trivia" || c.case === "prediction") ? c.value : void 0;
|
|
526
|
-
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(
|
|
538
|
+
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(Qt, { children: /* @__PURE__ */ m(Ut, { children: [
|
|
527
539
|
M && /* @__PURE__ */ s(
|
|
528
|
-
|
|
540
|
+
Rt,
|
|
529
541
|
{
|
|
530
542
|
feedbackMessages: M,
|
|
531
543
|
questionVoted: !!l,
|
|
@@ -536,7 +548,7 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
536
548
|
}
|
|
537
549
|
),
|
|
538
550
|
e.type !== z.PREDICTION && /* @__PURE__ */ s(
|
|
539
|
-
|
|
551
|
+
Nn,
|
|
540
552
|
{
|
|
541
553
|
title: h ? "Time expired" : e.type === z.POLL ? "Time remaining" : "To win",
|
|
542
554
|
points: h ? void 0 : l != null && l.correct ? l == null ? void 0 : l.points : 0,
|
|
@@ -548,37 +560,37 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
548
560
|
}
|
|
549
561
|
),
|
|
550
562
|
h ? /* @__PURE__ */ s(
|
|
551
|
-
|
|
563
|
+
kt,
|
|
552
564
|
{
|
|
553
565
|
title: "More to come...",
|
|
554
566
|
description: "Watch for additional enhanced stream interactive experience."
|
|
555
567
|
}
|
|
556
|
-
) : /* @__PURE__ */ m(
|
|
557
|
-
/* @__PURE__ */ s(
|
|
558
|
-
/* @__PURE__ */ s(
|
|
568
|
+
) : /* @__PURE__ */ m(w, { children: [
|
|
569
|
+
/* @__PURE__ */ s(_t, { "data-isPrediction": e.type === z.PREDICTION, children: p }),
|
|
570
|
+
/* @__PURE__ */ s(Pt, { children: g.map((v) => /* @__PURE__ */ s(on, { ...v }, v.id)) })
|
|
559
571
|
] })
|
|
560
572
|
] }) }) });
|
|
561
|
-
},
|
|
573
|
+
}, An = /* @__PURE__ */ r("div")({
|
|
562
574
|
name: "Container",
|
|
563
575
|
class: "cgn5uen",
|
|
564
576
|
propsAsIs: !1
|
|
565
|
-
}),
|
|
577
|
+
}), Tn = /* @__PURE__ */ r("div")({
|
|
566
578
|
name: "Content",
|
|
567
579
|
class: "c1px8nt6",
|
|
568
580
|
propsAsIs: !1
|
|
569
|
-
}),
|
|
581
|
+
}), Dn = /* @__PURE__ */ r("h3")({
|
|
570
582
|
name: "Title",
|
|
571
583
|
class: "t5et2jt",
|
|
572
584
|
propsAsIs: !1
|
|
573
|
-
}),
|
|
585
|
+
}), Sn = /* @__PURE__ */ r("div")({
|
|
574
586
|
name: "Description",
|
|
575
587
|
class: "d1i2kpk2",
|
|
576
588
|
propsAsIs: !1
|
|
577
|
-
}),
|
|
589
|
+
}), zn = /* @__PURE__ */ r("div")({
|
|
578
590
|
name: "DateWrap",
|
|
579
591
|
class: "dd3lh3p",
|
|
580
592
|
propsAsIs: !1
|
|
581
|
-
}),
|
|
593
|
+
}), xn = /* @__PURE__ */ r("img")({
|
|
582
594
|
name: "Image",
|
|
583
595
|
class: "i1gfjeu5",
|
|
584
596
|
propsAsIs: !1
|
|
@@ -594,46 +606,46 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
594
606
|
}
|
|
595
607
|
return null;
|
|
596
608
|
}, [e]), u = (i == null ? void 0 : i.image) || t;
|
|
597
|
-
return /* @__PURE__ */ m(
|
|
598
|
-
o && /* @__PURE__ */ m(
|
|
609
|
+
return /* @__PURE__ */ m(An, { children: [
|
|
610
|
+
o && /* @__PURE__ */ m(zn, { children: [
|
|
599
611
|
o.date,
|
|
600
612
|
" · ",
|
|
601
613
|
o.time
|
|
602
614
|
] }),
|
|
603
615
|
(i == null ? void 0 : i.video) && /* @__PURE__ */ s(Re, { source: i.video.url, poster: i.video.thumbnailUrl }),
|
|
604
|
-
u && /* @__PURE__ */ s(
|
|
605
|
-
/* @__PURE__ */ m(
|
|
606
|
-
/* @__PURE__ */ s(
|
|
607
|
-
/* @__PURE__ */ s(
|
|
616
|
+
u && /* @__PURE__ */ s(xn, { src: u }),
|
|
617
|
+
/* @__PURE__ */ m(Tn, { children: [
|
|
618
|
+
/* @__PURE__ */ s(Dn, { children: (i == null ? void 0 : i.heading) || n }),
|
|
619
|
+
/* @__PURE__ */ s(Sn, { children: i == null ? void 0 : i.body })
|
|
608
620
|
] })
|
|
609
621
|
] });
|
|
610
|
-
},
|
|
622
|
+
}, On = /* @__PURE__ */ r("div")({
|
|
611
623
|
name: "Container",
|
|
612
624
|
class: "c1euiow",
|
|
613
625
|
propsAsIs: !1
|
|
614
|
-
}),
|
|
626
|
+
}), jn = /* @__PURE__ */ r("a")({
|
|
615
627
|
name: "WebLinkBtn",
|
|
616
628
|
class: "w19zie3h",
|
|
617
629
|
propsAsIs: !1
|
|
618
|
-
}),
|
|
630
|
+
}), Cn = ({ instantView: e, ...t }) => /* @__PURE__ */ m(On, { children: [
|
|
619
631
|
/* @__PURE__ */ s(Oe, { instantView: e, ...t }),
|
|
620
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ m(
|
|
632
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ m(jn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
621
633
|
"Explore more of the Masters History",
|
|
622
634
|
/* @__PURE__ */ s(O, { name: "icon-external-link" })
|
|
623
635
|
] })
|
|
624
|
-
] }),
|
|
636
|
+
] }), kn = /* @__PURE__ */ r("div")({
|
|
625
637
|
name: "QuestionContainer",
|
|
626
638
|
class: "qdri6g3",
|
|
627
639
|
propsAsIs: !1
|
|
628
|
-
}),
|
|
640
|
+
}), bn = ({
|
|
629
641
|
openedQuestion: e
|
|
630
642
|
}) => {
|
|
631
643
|
var t;
|
|
632
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(
|
|
644
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(Cn, {
|
|
633
645
|
created: e.attributes.created,
|
|
634
646
|
...e.attributes.attributes.value
|
|
635
647
|
}) : null;
|
|
636
|
-
},
|
|
648
|
+
}, wn = ({
|
|
637
649
|
extendedQuestion: e,
|
|
638
650
|
vote: t,
|
|
639
651
|
close: n
|
|
@@ -642,13 +654,13 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
642
654
|
loading: i,
|
|
643
655
|
data: o
|
|
644
656
|
} = e;
|
|
645
|
-
return o ? /* @__PURE__ */ s(
|
|
657
|
+
return o ? /* @__PURE__ */ s(yn, {
|
|
646
658
|
vote: t,
|
|
647
659
|
close: n,
|
|
648
660
|
openedQuestion: o,
|
|
649
661
|
isLoading: !!i
|
|
650
662
|
}) : null;
|
|
651
|
-
},
|
|
663
|
+
}, Ln = ({
|
|
652
664
|
gamification: e
|
|
653
665
|
}) => {
|
|
654
666
|
var t;
|
|
@@ -656,37 +668,39 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
656
668
|
if (!n)
|
|
657
669
|
return null;
|
|
658
670
|
const o = n.type;
|
|
659
|
-
return /* @__PURE__ */ m(
|
|
671
|
+
return /* @__PURE__ */ m(kn, {
|
|
660
672
|
children: [/* @__PURE__ */ s(Te, {
|
|
661
673
|
close: e.closeQuestion,
|
|
662
674
|
type: ((t = n.attributes) == null ? void 0 : t.type) || z.UNSET
|
|
663
|
-
}), o === "question" && /* @__PURE__ */ s(
|
|
675
|
+
}), o === "question" && /* @__PURE__ */ s(wn, {
|
|
664
676
|
vote: e.submitAnswer,
|
|
665
677
|
close: e.closeQuestion,
|
|
666
678
|
extendedQuestion: i
|
|
667
|
-
}), o !== "question" && /* @__PURE__ */ s(
|
|
679
|
+
}), o !== "question" && /* @__PURE__ */ s(bn, {
|
|
668
680
|
openedQuestion: n
|
|
681
|
+
}), /* @__PURE__ */ s(xt, {
|
|
682
|
+
sponsorLogo: ""
|
|
669
683
|
})]
|
|
670
684
|
});
|
|
671
|
-
},
|
|
685
|
+
}, En = /* @__PURE__ */ r("div")({
|
|
672
686
|
name: "Container",
|
|
673
687
|
class: "c115qtkr",
|
|
674
688
|
propsAsIs: !1
|
|
675
|
-
}),
|
|
689
|
+
}), $n = /* @__PURE__ */ r("div")({
|
|
676
690
|
name: "STabs",
|
|
677
691
|
class: "sxnslc8",
|
|
678
692
|
propsAsIs: !1
|
|
679
|
-
}),
|
|
693
|
+
}), Rn = /* @__PURE__ */ r("button")({
|
|
680
694
|
name: "Button",
|
|
681
695
|
class: "b1umzux0",
|
|
682
696
|
propsAsIs: !1
|
|
683
|
-
}),
|
|
697
|
+
}), Qn = /* @__PURE__ */ r("span")({
|
|
684
698
|
name: "Title",
|
|
685
699
|
class: "tspsaas",
|
|
686
700
|
propsAsIs: !1
|
|
687
701
|
});
|
|
688
702
|
var W = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(W || {});
|
|
689
|
-
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(
|
|
703
|
+
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Rn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(Qn, { children: e }) }), Un = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(En, { children: /* @__PURE__ */ m($n, { "data-position": e === "home" ? "left" : "right", children: [
|
|
690
704
|
/* @__PURE__ */ s(ue, { title: "Home", active: e === "home", onClick: () => t(
|
|
691
705
|
"home"
|
|
692
706
|
/* HOME */
|
|
@@ -723,25 +737,25 @@ function ee(e, t) {
|
|
|
723
737
|
return i.__proto__ = o, i;
|
|
724
738
|
}, ee(e, t);
|
|
725
739
|
}
|
|
726
|
-
function
|
|
740
|
+
function _n(e, t) {
|
|
727
741
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ee(e, t);
|
|
728
742
|
}
|
|
729
743
|
var me = Number.isNaN || function(t) {
|
|
730
744
|
return typeof t == "number" && t !== t;
|
|
731
745
|
};
|
|
732
|
-
function
|
|
746
|
+
function Pn(e, t) {
|
|
733
747
|
return !!(e === t || me(e) && me(t));
|
|
734
748
|
}
|
|
735
|
-
function
|
|
749
|
+
function qn(e, t) {
|
|
736
750
|
if (e.length !== t.length)
|
|
737
751
|
return !1;
|
|
738
752
|
for (var n = 0; n < e.length; n++)
|
|
739
|
-
if (!
|
|
753
|
+
if (!Pn(e[n], t[n]))
|
|
740
754
|
return !1;
|
|
741
755
|
return !0;
|
|
742
756
|
}
|
|
743
757
|
function G(e, t) {
|
|
744
|
-
t === void 0 && (t =
|
|
758
|
+
t === void 0 && (t = qn);
|
|
745
759
|
var n, i = [], o, u = !1;
|
|
746
760
|
function p() {
|
|
747
761
|
for (var I = [], c = 0; c < arguments.length; c++)
|
|
@@ -750,7 +764,7 @@ function G(e, t) {
|
|
|
750
764
|
}
|
|
751
765
|
return p;
|
|
752
766
|
}
|
|
753
|
-
var
|
|
767
|
+
var Yn = typeof performance == "object" && typeof performance.now == "function", Ie = Yn ? function() {
|
|
754
768
|
return performance.now();
|
|
755
769
|
} : function() {
|
|
756
770
|
return Date.now();
|
|
@@ -758,7 +772,7 @@ var Un = typeof performance == "object" && typeof performance.now == "function",
|
|
|
758
772
|
function he(e) {
|
|
759
773
|
cancelAnimationFrame(e.id);
|
|
760
774
|
}
|
|
761
|
-
function
|
|
775
|
+
function Wn(e, t) {
|
|
762
776
|
var n = Ie();
|
|
763
777
|
function i() {
|
|
764
778
|
Ie() - n >= t ? e.call(null) : o.id = requestAnimationFrame(i);
|
|
@@ -776,23 +790,23 @@ function ge(e) {
|
|
|
776
790
|
}
|
|
777
791
|
return J;
|
|
778
792
|
}
|
|
779
|
-
var
|
|
793
|
+
var b = null;
|
|
780
794
|
function fe(e) {
|
|
781
|
-
if (e === void 0 && (e = !1),
|
|
795
|
+
if (e === void 0 && (e = !1), b === null || e) {
|
|
782
796
|
var t = document.createElement("div"), n = t.style;
|
|
783
797
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
784
798
|
var i = document.createElement("div"), o = i.style;
|
|
785
|
-
return o.width = "100px", o.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ?
|
|
799
|
+
return o.width = "100px", o.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? b = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? b = "negative" : b = "positive-ascending"), document.body.removeChild(t), b;
|
|
786
800
|
}
|
|
787
|
-
return
|
|
801
|
+
return b;
|
|
788
802
|
}
|
|
789
|
-
var
|
|
803
|
+
var Vn = 150, Fn = function(t, n) {
|
|
790
804
|
return t;
|
|
791
805
|
};
|
|
792
|
-
function
|
|
806
|
+
function Bn(e) {
|
|
793
807
|
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, o = e.getItemSize, u = e.getOffsetForIndexAndAlignment, p = e.getStartIndexForOffset, I = e.getStopIndexForStartIndex, c = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, y = e.validateProps;
|
|
794
808
|
return t = /* @__PURE__ */ function(D) {
|
|
795
|
-
|
|
809
|
+
_n(N, D);
|
|
796
810
|
function N(T) {
|
|
797
811
|
var a;
|
|
798
812
|
return a = D.call(this, T) || this, a._instanceProps = c(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
|
|
@@ -871,7 +885,7 @@ function Yn(e) {
|
|
|
871
885
|
var d = a.props.outerRef;
|
|
872
886
|
a._outerRef = l, typeof d == "function" ? d(l) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = l);
|
|
873
887
|
}, a._resetIsScrollingDebounced = function() {
|
|
874
|
-
a._resetIsScrollingTimeoutId !== null && he(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId =
|
|
888
|
+
a._resetIsScrollingTimeoutId !== null && he(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = Wn(a._resetIsScrolling, Vn);
|
|
875
889
|
}, a._resetIsScrolling = function() {
|
|
876
890
|
a._resetIsScrollingTimeoutId = null, a.setState({
|
|
877
891
|
isScrolling: !1
|
|
@@ -881,7 +895,7 @@ function Yn(e) {
|
|
|
881
895
|
}, a;
|
|
882
896
|
}
|
|
883
897
|
N.getDerivedStateFromProps = function(a, l) {
|
|
884
|
-
return
|
|
898
|
+
return Hn(a, l), y(a), null;
|
|
885
899
|
};
|
|
886
900
|
var A = N.prototype;
|
|
887
901
|
return A.scrollTo = function(a) {
|
|
@@ -936,14 +950,14 @@ function Yn(e) {
|
|
|
936
950
|
}, A.componentWillUnmount = function() {
|
|
937
951
|
this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
|
|
938
952
|
}, A.render = function() {
|
|
939
|
-
var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, x = a.itemCount, j = a.itemData, C = a.itemKey, Q = C === void 0 ?
|
|
953
|
+
var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, x = a.itemCount, j = a.itemData, C = a.itemKey, Q = C === void 0 ? Fn : C, U = a.layout, je = a.outerElementType, Ce = a.outerTagName, ke = a.style, be = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = g === "horizontal" || U === "horizontal", Le = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], $e = se[1], ie = [];
|
|
940
954
|
if (x > 0)
|
|
941
955
|
for (var $ = Ee; $ <= $e; $++)
|
|
942
956
|
ie.push(H(l, {
|
|
943
957
|
data: j,
|
|
944
958
|
key: Q($, j),
|
|
945
959
|
index: $,
|
|
946
|
-
isScrolling:
|
|
960
|
+
isScrolling: be ? ne : void 0,
|
|
947
961
|
style: this._getItemStyle($)
|
|
948
962
|
}));
|
|
949
963
|
var oe = i(this.props, this._instanceProps);
|
|
@@ -954,7 +968,7 @@ function Yn(e) {
|
|
|
954
968
|
style: X({
|
|
955
969
|
position: "relative",
|
|
956
970
|
height: M,
|
|
957
|
-
width:
|
|
971
|
+
width: we,
|
|
958
972
|
overflow: "auto",
|
|
959
973
|
WebkitOverflowScrolling: "touch",
|
|
960
974
|
willChange: "transform",
|
|
@@ -996,9 +1010,9 @@ function Yn(e) {
|
|
|
996
1010
|
useIsScrolling: !1
|
|
997
1011
|
}, t;
|
|
998
1012
|
}
|
|
999
|
-
var
|
|
1013
|
+
var Hn = function(t, n) {
|
|
1000
1014
|
t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
|
|
1001
|
-
},
|
|
1015
|
+
}, Zn = /* @__PURE__ */ Bn({
|
|
1002
1016
|
getItemOffset: function(t, n) {
|
|
1003
1017
|
var i = t.itemSize;
|
|
1004
1018
|
return n * i;
|
|
@@ -1046,11 +1060,11 @@ var Wn = function(t, n) {
|
|
|
1046
1060
|
t.itemSize;
|
|
1047
1061
|
}
|
|
1048
1062
|
});
|
|
1049
|
-
function
|
|
1063
|
+
function Gn(e) {
|
|
1050
1064
|
var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, o = e.stopIndex;
|
|
1051
1065
|
return !(i > n || o < t);
|
|
1052
1066
|
}
|
|
1053
|
-
function
|
|
1067
|
+
function Jn(e) {
|
|
1054
1068
|
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, o = e.startIndex, u = e.stopIndex, p = [], I = null, c = null, h = o; h <= u; h++) {
|
|
1055
1069
|
var y = t(h);
|
|
1056
1070
|
y ? c !== null && (p.push(I, c), I = c = null) : (c = h, I === null && (I = h));
|
|
@@ -1070,10 +1084,10 @@ function Bn(e) {
|
|
|
1070
1084
|
}
|
|
1071
1085
|
return p;
|
|
1072
1086
|
}
|
|
1073
|
-
var
|
|
1087
|
+
var Kn = function(e, t) {
|
|
1074
1088
|
if (!(e instanceof t))
|
|
1075
1089
|
throw new TypeError("Cannot call a class as a function");
|
|
1076
|
-
},
|
|
1090
|
+
}, Xn = function() {
|
|
1077
1091
|
function e(t, n) {
|
|
1078
1092
|
for (var i = 0; i < n.length; i++) {
|
|
1079
1093
|
var o = n[i];
|
|
@@ -1083,7 +1097,7 @@ var Hn = function(e, t) {
|
|
|
1083
1097
|
return function(t, n, i) {
|
|
1084
1098
|
return n && e(t.prototype, n), i && e(t, i), t;
|
|
1085
1099
|
};
|
|
1086
|
-
}(),
|
|
1100
|
+
}(), es = function(e, t) {
|
|
1087
1101
|
if (typeof t != "function" && t !== null)
|
|
1088
1102
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
1089
1103
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1098,11 +1112,11 @@ var Hn = function(e, t) {
|
|
|
1098
1112
|
if (!e)
|
|
1099
1113
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1100
1114
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
1101
|
-
},
|
|
1102
|
-
|
|
1115
|
+
}, ts = function(e) {
|
|
1116
|
+
es(t, e);
|
|
1103
1117
|
function t() {
|
|
1104
1118
|
var n, i, o, u;
|
|
1105
|
-
|
|
1119
|
+
Kn(this, t);
|
|
1106
1120
|
for (var p = arguments.length, I = Array(p), c = 0; c < p; c++)
|
|
1107
1121
|
I[c] = arguments[c];
|
|
1108
1122
|
return u = (i = (o = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(I))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(h) {
|
|
@@ -1112,7 +1126,7 @@ var Hn = function(e, t) {
|
|
|
1112
1126
|
o._listRef = h;
|
|
1113
1127
|
}, i), Me(o, u);
|
|
1114
1128
|
}
|
|
1115
|
-
return
|
|
1129
|
+
return Xn(t, [{
|
|
1116
1130
|
key: "resetloadMoreItemsCache",
|
|
1117
1131
|
value: function() {
|
|
1118
1132
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1134,7 +1148,7 @@ var Hn = function(e, t) {
|
|
|
1134
1148
|
}, {
|
|
1135
1149
|
key: "_ensureRowsLoaded",
|
|
1136
1150
|
value: function(i, o) {
|
|
1137
|
-
var u = this.props, p = u.isItemLoaded, I = u.itemCount, c = u.minimumBatchSize, h = c === void 0 ? 10 : c, y = u.threshold, D = y === void 0 ? 15 : y, N =
|
|
1151
|
+
var u = this.props, p = u.isItemLoaded, I = u.itemCount, c = u.minimumBatchSize, h = c === void 0 ? 10 : c, y = u.threshold, D = y === void 0 ? 15 : y, N = Jn({
|
|
1138
1152
|
isItemLoaded: p,
|
|
1139
1153
|
itemCount: I,
|
|
1140
1154
|
minimumBatchSize: h,
|
|
@@ -1151,7 +1165,7 @@ var Hn = function(e, t) {
|
|
|
1151
1165
|
for (var o = this, u = this.props.loadMoreItems || this.props.loadMoreRows, p = function(h) {
|
|
1152
1166
|
var y = i[h], D = i[h + 1], N = u(y, D);
|
|
1153
1167
|
N != null && N.then(function() {
|
|
1154
|
-
if (
|
|
1168
|
+
if (Gn({
|
|
1155
1169
|
lastRenderedStartIndex: o._lastRenderedStartIndex,
|
|
1156
1170
|
lastRenderedStopIndex: o._lastRenderedStopIndex,
|
|
1157
1171
|
startIndex: y,
|
|
@@ -1167,39 +1181,39 @@ var Hn = function(e, t) {
|
|
|
1167
1181
|
}
|
|
1168
1182
|
}]), t;
|
|
1169
1183
|
}(ye);
|
|
1170
|
-
const
|
|
1184
|
+
const ns = /* @__PURE__ */ r("div")({
|
|
1171
1185
|
name: "Container",
|
|
1172
1186
|
class: "culdu4a",
|
|
1173
1187
|
propsAsIs: !1
|
|
1174
|
-
}),
|
|
1188
|
+
}), ss = /* @__PURE__ */ r("div")({
|
|
1175
1189
|
name: "Position",
|
|
1176
1190
|
class: "pwf8e69",
|
|
1177
1191
|
propsAsIs: !1
|
|
1178
|
-
}),
|
|
1192
|
+
}), is = /* @__PURE__ */ r("img")({
|
|
1179
1193
|
name: "Avatar",
|
|
1180
1194
|
class: "atf4yh4",
|
|
1181
1195
|
propsAsIs: !1
|
|
1182
|
-
}),
|
|
1196
|
+
}), os = /* @__PURE__ */ r("div")({
|
|
1183
1197
|
name: "AvatarPlaceholder",
|
|
1184
1198
|
class: "a1dg29ja",
|
|
1185
1199
|
propsAsIs: !1
|
|
1186
|
-
}),
|
|
1200
|
+
}), rs = /* @__PURE__ */ r("div")({
|
|
1187
1201
|
name: "Content",
|
|
1188
1202
|
class: "c10a68rc",
|
|
1189
1203
|
propsAsIs: !1
|
|
1190
|
-
}),
|
|
1204
|
+
}), as = /* @__PURE__ */ r("div")({
|
|
1191
1205
|
name: "NameContainer",
|
|
1192
1206
|
class: "nc4kck5",
|
|
1193
1207
|
propsAsIs: !1
|
|
1194
|
-
}),
|
|
1208
|
+
}), ls = /* @__PURE__ */ r("span")({
|
|
1195
1209
|
name: "Name",
|
|
1196
1210
|
class: "njsrqgr",
|
|
1197
1211
|
propsAsIs: !1
|
|
1198
|
-
}),
|
|
1212
|
+
}), cs = () => O, ds = /* @__PURE__ */ r(cs())({
|
|
1199
1213
|
name: "CurrentUserBadge",
|
|
1200
1214
|
class: "c17uc4zr",
|
|
1201
1215
|
propsAsIs: !0
|
|
1202
|
-
}),
|
|
1216
|
+
}), us = ({
|
|
1203
1217
|
rank: e,
|
|
1204
1218
|
avatar: t,
|
|
1205
1219
|
name: n,
|
|
@@ -1207,33 +1221,33 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1207
1221
|
isCurrentUser: o,
|
|
1208
1222
|
openItemDetail: u,
|
|
1209
1223
|
style: p
|
|
1210
|
-
}) => /* @__PURE__ */ m(
|
|
1211
|
-
/* @__PURE__ */ s(
|
|
1212
|
-
/* @__PURE__ */ m(
|
|
1213
|
-
t ? /* @__PURE__ */ s(
|
|
1214
|
-
/* @__PURE__ */ m(
|
|
1215
|
-
/* @__PURE__ */ s(
|
|
1216
|
-
o && /* @__PURE__ */ s(
|
|
1224
|
+
}) => /* @__PURE__ */ m(ns, { onClick: u, style: p, children: [
|
|
1225
|
+
/* @__PURE__ */ s(ss, { children: e || 0 }),
|
|
1226
|
+
/* @__PURE__ */ m(rs, { children: [
|
|
1227
|
+
t ? /* @__PURE__ */ s(is, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(os, { children: De(n || "") }),
|
|
1228
|
+
/* @__PURE__ */ m(as, { children: [
|
|
1229
|
+
/* @__PURE__ */ s(ls, { children: n || "" }),
|
|
1230
|
+
o && /* @__PURE__ */ s(ds, { name: "icon-star" })
|
|
1217
1231
|
] })
|
|
1218
1232
|
] }),
|
|
1219
1233
|
/* @__PURE__ */ s("div", { children: Se(i) })
|
|
1220
|
-
] }),
|
|
1234
|
+
] }), ps = /* @__PURE__ */ r("div")({
|
|
1221
1235
|
name: "ScrollContainer",
|
|
1222
1236
|
class: "s13d8sg6",
|
|
1223
1237
|
propsAsIs: !1
|
|
1224
|
-
}),
|
|
1238
|
+
}), ms = ({
|
|
1225
1239
|
items: e,
|
|
1226
1240
|
currentUserId: t,
|
|
1227
1241
|
openItemDetail: n,
|
|
1228
1242
|
fetchMore: i
|
|
1229
1243
|
}) => /* @__PURE__ */ s(Qe, { children: ({ width: o, height: u }) => /* @__PURE__ */ s(
|
|
1230
|
-
|
|
1244
|
+
ts,
|
|
1231
1245
|
{
|
|
1232
1246
|
isItemLoaded: (p) => p < e.length,
|
|
1233
1247
|
itemCount: e.length + 1,
|
|
1234
1248
|
loadMoreItems: i,
|
|
1235
|
-
children: ({ onItemsRendered: p, ref: I }) => /* @__PURE__ */ s(
|
|
1236
|
-
|
|
1249
|
+
children: ({ onItemsRendered: p, ref: I }) => /* @__PURE__ */ s(ps, { children: /* @__PURE__ */ s(
|
|
1250
|
+
Zn,
|
|
1237
1251
|
{
|
|
1238
1252
|
itemSize: 56,
|
|
1239
1253
|
onItemsRendered: p,
|
|
@@ -1242,7 +1256,7 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1242
1256
|
width: o,
|
|
1243
1257
|
height: u,
|
|
1244
1258
|
children: ({ index: c, style: h }) => /* @__PURE__ */ s(
|
|
1245
|
-
|
|
1259
|
+
us,
|
|
1246
1260
|
{
|
|
1247
1261
|
style: { ...h, maxHeight: 48 },
|
|
1248
1262
|
...e[c],
|
|
@@ -1254,7 +1268,7 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1254
1268
|
}
|
|
1255
1269
|
) })
|
|
1256
1270
|
}
|
|
1257
|
-
) }),
|
|
1271
|
+
) }), Is = ({ deepLink: e }) => {
|
|
1258
1272
|
const { data: t } = k(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
|
|
1259
1273
|
return /* @__PURE__ */ s(
|
|
1260
1274
|
Ue,
|
|
@@ -1276,59 +1290,59 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1276
1290
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1277
1291
|
}
|
|
1278
1292
|
);
|
|
1279
|
-
},
|
|
1293
|
+
}, hs = ({ gamification: e }) => {
|
|
1280
1294
|
const { data: t } = k(e.leaderboardList.$store);
|
|
1281
1295
|
return t != null && t.length ? /* @__PURE__ */ s(
|
|
1282
|
-
|
|
1296
|
+
ms,
|
|
1283
1297
|
{
|
|
1284
1298
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1285
1299
|
items: t,
|
|
1286
1300
|
openItemDetail: e.openUser,
|
|
1287
1301
|
currentUserId: e.currentUserId.get()
|
|
1288
1302
|
}
|
|
1289
|
-
) : /* @__PURE__ */ s(
|
|
1290
|
-
},
|
|
1303
|
+
) : /* @__PURE__ */ s(Is, { deepLink: e.deepLink });
|
|
1304
|
+
}, gs = /* @__PURE__ */ r("div")({
|
|
1291
1305
|
name: "QuestionItem",
|
|
1292
1306
|
class: "q1w97g3p",
|
|
1293
1307
|
propsAsIs: !1
|
|
1294
|
-
}),
|
|
1308
|
+
}), fs = /* @__PURE__ */ r("div")({
|
|
1295
1309
|
name: "QuestionCaption",
|
|
1296
1310
|
class: "q2sl39u",
|
|
1297
1311
|
propsAsIs: !1
|
|
1298
|
-
}),
|
|
1312
|
+
}), Ms = /* @__PURE__ */ r("div")({
|
|
1299
1313
|
name: "QuestionBody",
|
|
1300
1314
|
class: "qd5h0uc",
|
|
1301
1315
|
propsAsIs: !1
|
|
1302
|
-
}),
|
|
1316
|
+
}), vs = /* @__PURE__ */ r("div")({
|
|
1303
1317
|
name: "QuestionAction",
|
|
1304
1318
|
class: "q105uluy",
|
|
1305
1319
|
propsAsIs: !1
|
|
1306
|
-
}),
|
|
1320
|
+
}), Ns = () => O, q = /* @__PURE__ */ r(Ns())({
|
|
1307
1321
|
name: "QuestionActionIcon",
|
|
1308
1322
|
class: "q1fa0b9h",
|
|
1309
1323
|
propsAsIs: !0
|
|
1310
|
-
}),
|
|
1324
|
+
}), ys = () => O, As = /* @__PURE__ */ r(ys())({
|
|
1311
1325
|
name: "QuestionTypeIcon",
|
|
1312
1326
|
class: "qxlt78s",
|
|
1313
1327
|
propsAsIs: !0
|
|
1314
|
-
}),
|
|
1328
|
+
}), Ts = /* @__PURE__ */ r("div")({
|
|
1315
1329
|
name: "QuestionTypeLabel",
|
|
1316
1330
|
class: "qmg0vkx",
|
|
1317
1331
|
propsAsIs: !1
|
|
1318
|
-
}),
|
|
1332
|
+
}), Ds = /* @__PURE__ */ r("div")({
|
|
1319
1333
|
name: "QuestionContent",
|
|
1320
1334
|
class: "q1uz5j1g",
|
|
1321
1335
|
propsAsIs: !1
|
|
1322
|
-
}),
|
|
1336
|
+
}), Ss = /* @__PURE__ */ r("button")({
|
|
1323
1337
|
name: "PlayButton",
|
|
1324
1338
|
class: "p1pba9p1",
|
|
1325
1339
|
propsAsIs: !1
|
|
1326
|
-
}),
|
|
1340
|
+
}), zs = {
|
|
1327
1341
|
[_.LOST]: /* @__PURE__ */ s(q, { name: "incorrectVoted" }),
|
|
1328
1342
|
[_.WON]: /* @__PURE__ */ s(q, { name: "icon-check" }),
|
|
1329
1343
|
[_.UNSET]: /* @__PURE__ */ s(q, { name: "icon-arrow" }),
|
|
1330
1344
|
[_.DNP]: /* @__PURE__ */ s(q, { name: "icon-arrow" })
|
|
1331
|
-
},
|
|
1345
|
+
}, xs = ({
|
|
1332
1346
|
questionId: e,
|
|
1333
1347
|
questionType: t,
|
|
1334
1348
|
questionStatus: n,
|
|
@@ -1337,65 +1351,65 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1337
1351
|
openQuestion: u,
|
|
1338
1352
|
status: p
|
|
1339
1353
|
}) => {
|
|
1340
|
-
const I = Ne[t], c =
|
|
1341
|
-
return I ? /* @__PURE__ */ m(
|
|
1342
|
-
/* @__PURE__ */ m(
|
|
1343
|
-
/* @__PURE__ */ m(
|
|
1354
|
+
const I = Ne[t], c = zs[p];
|
|
1355
|
+
return I ? /* @__PURE__ */ m(gs, { onClick: () => u == null ? void 0 : u(e), children: [
|
|
1356
|
+
/* @__PURE__ */ m(Ds, { children: [
|
|
1357
|
+
/* @__PURE__ */ m(fs, { children: [
|
|
1344
1358
|
/* @__PURE__ */ s(
|
|
1345
|
-
|
|
1359
|
+
As,
|
|
1346
1360
|
{
|
|
1347
1361
|
"data-type-trivia": t === z.TRIVIA,
|
|
1348
1362
|
"data-type-poll": t === z.POLL,
|
|
1349
1363
|
name: I.iconName
|
|
1350
1364
|
}
|
|
1351
1365
|
),
|
|
1352
|
-
/* @__PURE__ */ m(
|
|
1366
|
+
/* @__PURE__ */ m(Ts, { children: [
|
|
1353
1367
|
I.label,
|
|
1354
1368
|
t === z.TRIVIA && n === L.RESOLVED && " • Expired"
|
|
1355
1369
|
] })
|
|
1356
1370
|
] }),
|
|
1357
|
-
/* @__PURE__ */ s(
|
|
1371
|
+
/* @__PURE__ */ s(Ms, { children: i || "" })
|
|
1358
1372
|
] }),
|
|
1359
|
-
/* @__PURE__ */ s(
|
|
1373
|
+
/* @__PURE__ */ s(vs, { children: o ? /* @__PURE__ */ s(Ss, { children: "Play" }) : c })
|
|
1360
1374
|
] }) : null;
|
|
1361
|
-
},
|
|
1375
|
+
}, Os = /* @__PURE__ */ r("div")({
|
|
1362
1376
|
name: "Container",
|
|
1363
1377
|
class: "cll3md7",
|
|
1364
1378
|
propsAsIs: !1
|
|
1365
|
-
}),
|
|
1379
|
+
}), js = /* @__PURE__ */ r("button")({
|
|
1366
1380
|
name: "ActionBtn",
|
|
1367
1381
|
class: "a10g1iik",
|
|
1368
1382
|
propsAsIs: !1
|
|
1369
|
-
}),
|
|
1383
|
+
}), Cs = ({
|
|
1370
1384
|
openInsight: e,
|
|
1371
1385
|
questionId: t,
|
|
1372
1386
|
...n
|
|
1373
|
-
}) => /* @__PURE__ */ m(
|
|
1387
|
+
}) => /* @__PURE__ */ m(Os, { children: [
|
|
1374
1388
|
/* @__PURE__ */ s(Oe, { questionId: t, ...n }),
|
|
1375
|
-
e && /* @__PURE__ */ s(
|
|
1376
|
-
] }),
|
|
1389
|
+
e && /* @__PURE__ */ s(js, { onClick: () => e(t), children: "View Insight" })
|
|
1390
|
+
] }), ks = /* @__PURE__ */ r("div")({
|
|
1377
1391
|
name: "QuestionsContainer",
|
|
1378
1392
|
class: "qvghv3l",
|
|
1379
1393
|
propsAsIs: !1
|
|
1380
|
-
}),
|
|
1394
|
+
}), bs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(ks, { children: e == null ? void 0 : e.map((n) => {
|
|
1381
1395
|
var i, o;
|
|
1382
1396
|
if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1383
1397
|
const u = n.attributes.attributes.value;
|
|
1384
|
-
return /* @__PURE__ */ s(
|
|
1398
|
+
return /* @__PURE__ */ s(xs, { openQuestion: t, ...u }, u.questionId);
|
|
1385
1399
|
}
|
|
1386
1400
|
if (n.type === "insight" && ((o = n.attributes) == null ? void 0 : o.attributes.case) === "insight") {
|
|
1387
1401
|
const u = n.attributes.attributes.value;
|
|
1388
|
-
return /* @__PURE__ */ s(
|
|
1402
|
+
return /* @__PURE__ */ s(Cs, { openInsight: t, ...u }, u.questionId);
|
|
1389
1403
|
}
|
|
1390
1404
|
return null;
|
|
1391
|
-
}) }),
|
|
1405
|
+
}) }), ws = ({ store: e, openQuestion: t }) => {
|
|
1392
1406
|
const n = k(e);
|
|
1393
|
-
return n != null && n.data ? /* @__PURE__ */ s(
|
|
1394
|
-
},
|
|
1407
|
+
return n != null && n.data ? /* @__PURE__ */ s(bs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1408
|
+
}, Ls = ({ userSummary: e }) => {
|
|
1395
1409
|
var t, n;
|
|
1396
1410
|
const i = k(e.getStore());
|
|
1397
1411
|
return (t = i.data) != null && t.summary ? /* @__PURE__ */ s(ze, { ...i.data.summary, successRate: (n = i.data.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1398
|
-
},
|
|
1412
|
+
}, Es = ({
|
|
1399
1413
|
gamification: e
|
|
1400
1414
|
}) => {
|
|
1401
1415
|
const [t, n] = V(W.HOME);
|
|
@@ -1410,7 +1424,7 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1410
1424
|
style: {
|
|
1411
1425
|
paddingBottom: "4px"
|
|
1412
1426
|
},
|
|
1413
|
-
children: /* @__PURE__ */ s(
|
|
1427
|
+
children: /* @__PURE__ */ s(Un, {
|
|
1414
1428
|
activePage: t,
|
|
1415
1429
|
toggleActivePage: n
|
|
1416
1430
|
})
|
|
@@ -1419,69 +1433,69 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1419
1433
|
style: {
|
|
1420
1434
|
paddingTop: "12px"
|
|
1421
1435
|
},
|
|
1422
|
-
children: /* @__PURE__ */ s(
|
|
1436
|
+
children: /* @__PURE__ */ s(Ls, {
|
|
1423
1437
|
userSummary: e.userSummary
|
|
1424
1438
|
})
|
|
1425
1439
|
}), /* @__PURE__ */ s(_e, {
|
|
1426
|
-
children: /* @__PURE__ */ s(
|
|
1440
|
+
children: /* @__PURE__ */ s(ws, {
|
|
1427
1441
|
openQuestion: e.openQuestion,
|
|
1428
1442
|
store: e.feedList.getStore()
|
|
1429
1443
|
})
|
|
1430
1444
|
})]
|
|
1431
1445
|
}), t === W.LEADERBOARD && /* @__PURE__ */ s("div", {
|
|
1432
1446
|
className: "c1bp9dj2",
|
|
1433
|
-
children: /* @__PURE__ */ s(
|
|
1447
|
+
children: /* @__PURE__ */ s(hs, {
|
|
1434
1448
|
gamification: e
|
|
1435
1449
|
})
|
|
1436
1450
|
})]
|
|
1437
1451
|
});
|
|
1438
|
-
},
|
|
1452
|
+
}, $s = () => Pe, ve = /* @__PURE__ */ r($s())({
|
|
1439
1453
|
name: "OpenedContainer",
|
|
1440
1454
|
class: "oar61gl",
|
|
1441
1455
|
propsAsIs: !0
|
|
1442
|
-
}),
|
|
1456
|
+
}), Rs = /* @__PURE__ */ r("div")({
|
|
1443
1457
|
name: "UserContainer",
|
|
1444
1458
|
class: "u14zaal4",
|
|
1445
1459
|
propsAsIs: !1
|
|
1446
|
-
}),
|
|
1460
|
+
}), Qs = ({
|
|
1447
1461
|
correct: e,
|
|
1448
1462
|
incorrect: t
|
|
1449
1463
|
}) => {
|
|
1450
1464
|
const n = e + t;
|
|
1451
1465
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
1452
|
-
},
|
|
1466
|
+
}, Xs = ({
|
|
1453
1467
|
gamification: e,
|
|
1454
1468
|
className: t
|
|
1455
1469
|
}) => {
|
|
1456
1470
|
const n = k(e.openedQuestion.$store), i = k(e.openedUser);
|
|
1457
|
-
return /* @__PURE__ */ m(
|
|
1471
|
+
return /* @__PURE__ */ m(w, {
|
|
1458
1472
|
children: [n && /* @__PURE__ */ s(ve, {
|
|
1459
1473
|
className: t,
|
|
1460
|
-
children: /* @__PURE__ */ s(
|
|
1474
|
+
children: /* @__PURE__ */ s(Ln, {
|
|
1461
1475
|
gamification: e
|
|
1462
1476
|
})
|
|
1463
1477
|
}), i && /* @__PURE__ */ s(ve, {
|
|
1464
1478
|
className: t,
|
|
1465
|
-
children: /* @__PURE__ */ m(
|
|
1479
|
+
children: /* @__PURE__ */ m(Rs, {
|
|
1466
1480
|
children: [/* @__PURE__ */ s(Te, {
|
|
1467
1481
|
label: "Friend's Rank",
|
|
1468
1482
|
close: e.closeUser
|
|
1469
1483
|
}), /* @__PURE__ */ s(K, {
|
|
1470
1484
|
children: /* @__PURE__ */ s(ze, {
|
|
1471
1485
|
...i,
|
|
1472
|
-
successRate:
|
|
1486
|
+
successRate: Qs(i)
|
|
1473
1487
|
})
|
|
1474
1488
|
})]
|
|
1475
1489
|
})
|
|
1476
1490
|
}), /* @__PURE__ */ s(te, {
|
|
1477
1491
|
className: t,
|
|
1478
1492
|
"data-nav": "true",
|
|
1479
|
-
children: /* @__PURE__ */ s(
|
|
1493
|
+
children: /* @__PURE__ */ s(Es, {
|
|
1480
1494
|
gamification: e
|
|
1481
1495
|
})
|
|
1482
1496
|
})]
|
|
1483
1497
|
});
|
|
1484
1498
|
};
|
|
1485
1499
|
export {
|
|
1486
|
-
|
|
1500
|
+
Xs as default
|
|
1487
1501
|
};
|