@streamlayer/react 0.31.2 → 0.31.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  import { jsxs as p, jsx as s, Fragment as b } from "react/jsx-runtime";
2
- import { s as o, i as j } from "./index4.js";
2
+ import { s as o, 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 $e, A as Re, O as Qe, a as K, n as Ue, d as _e } from "./masters2.js";
5
+ import { QuestionType as z, QuestionStatus as Q, QuestionImages as $, PickHistoryStatus as P } from "@streamlayer/sdk-web-types";
5
6
  import { useState as R, useCallback as F, useMemo as W, createElement as H, PureComponent as ye } from "react";
6
- import { QuestionType as x, QuestionStatus as Q, QuestionImages as $, PickHistoryStatus as q } from "@streamlayer/sdk-web-types";
7
- import { m as qe } from "./index3.js";
7
+ import { m as Pe } from "./index3.js";
8
8
  import "react-countup";
9
- import { CountdownCircleTimer as Pe } from "react-countdown-circle-timer";
9
+ import { CountdownCircleTimer as qe } from "react-countdown-circle-timer";
10
10
  import { E } from "./index2.js";
11
11
  import "@streamlayer/sdk-web-interfaces";
12
12
  import "@streamlayer/sdk-web-notifications";
@@ -21,7 +21,7 @@ const Ye = /* @__PURE__ */ o("div")({
21
21
  name: "QuestionTypeWrap",
22
22
  class: "qyktpt0",
23
23
  propsAsIs: !1
24
- }), Ve = () => j, Fe = /* @__PURE__ */ o(Ve())({
24
+ }), Ve = () => O, Fe = /* @__PURE__ */ o(Ve())({
25
25
  name: "QuestionTypeIcon",
26
26
  class: "q951jdx",
27
27
  propsAsIs: !0
@@ -33,7 +33,7 @@ const Ye = /* @__PURE__ */ o("div")({
33
33
  name: "CloseButton",
34
34
  class: "c1ao1jtv",
35
35
  propsAsIs: !1
36
- }), Ze = () => j, Ge = /* @__PURE__ */ o(Ze())({
36
+ }), Ze = () => O, Ge = /* @__PURE__ */ o(Ze())({
37
37
  name: "CloseIcon",
38
38
  class: "cvsl7l3",
39
39
  propsAsIs: !0
@@ -41,7 +41,14 @@ const Ye = /* @__PURE__ */ o("div")({
41
41
  const i = e ? Ne[e] : { label: n, iconName: void 0 };
42
42
  return /* @__PURE__ */ p(Ye, { children: [
43
43
  /* @__PURE__ */ p(We, { children: [
44
- (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(Fe, { name: i.iconName }),
44
+ (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
45
+ Fe,
46
+ {
47
+ "data-type-trivia": e === z.TRIVIA,
48
+ "data-type-poll": e === z.POLL,
49
+ name: i.iconName
50
+ }
51
+ ),
45
52
  (i == null ? void 0 : i.label) && /* @__PURE__ */ s(Be, { children: i.label })
46
53
  ] }),
47
54
  /* @__PURE__ */ s(He, { onClick: t, children: /* @__PURE__ */ s(Ge, { name: "icon-cross" }) })
@@ -80,7 +87,7 @@ const Ye = /* @__PURE__ */ o("div")({
80
87
  name: "Title",
81
88
  class: "t8s05oq",
82
89
  propsAsIs: !1
83
- }), P = ({ indicator: e, title: t }) => /* @__PURE__ */ p(st, { children: [
90
+ }), q = ({ indicator: e, title: t }) => /* @__PURE__ */ p(st, { children: [
84
91
  /* @__PURE__ */ s(it, { children: e }),
85
92
  /* @__PURE__ */ s(rt, { children: t })
86
93
  ] }), ot = /* @__PURE__ */ o("div")({
@@ -193,10 +200,10 @@ const Ye = /* @__PURE__ */ o("div")({
193
200
  /* @__PURE__ */ s(oe, { indicator: r || 0, title: "Global rank" })
194
201
  ] }),
195
202
  /* @__PURE__ */ p(Nt, { children: [
196
- /* @__PURE__ */ s(P, { indicator: m || 0, title: "Win streak" }),
197
- /* @__PURE__ */ s(P, { indicator: c || 0, title: "Correct" }),
198
- /* @__PURE__ */ s(P, { indicator: I || 0, title: "Incorrect" }),
199
- /* @__PURE__ */ s(P, { indicator: `${h || 0}%`, title: "Succ. rate" })
203
+ /* @__PURE__ */ s(q, { indicator: m || 0, title: "Win streak" }),
204
+ /* @__PURE__ */ s(q, { indicator: c || 0, title: "Correct" }),
205
+ /* @__PURE__ */ s(q, { indicator: I || 0, title: "Incorrect" }),
206
+ /* @__PURE__ */ s(q, { indicator: `${h || 0}%`, title: "Succ. rate" })
200
207
  ] })
201
208
  ] })
202
209
  ] }), Dt = /* @__PURE__ */ o("div")({
@@ -212,14 +219,14 @@ const Ye = /* @__PURE__ */ o("div")({
212
219
  class: "dlaj9xp",
213
220
  propsAsIs: !1
214
221
  }), xt = ({ title: e, description: t }) => /* @__PURE__ */ p(Dt, { children: [
215
- /* @__PURE__ */ s(j, { name: "icon-check-circle" }),
222
+ /* @__PURE__ */ s(O, { name: "icon-check-circle" }),
216
223
  /* @__PURE__ */ s(St, { children: e }),
217
224
  /* @__PURE__ */ s(zt, { children: t })
218
- ] }), jt = /* @__PURE__ */ o("div")({
225
+ ] }), Ot = /* @__PURE__ */ o("div")({
219
226
  name: "Container",
220
227
  class: "c16sbdnm",
221
228
  propsAsIs: !1
222
- }), Ot = () => j, Ct = /* @__PURE__ */ o(Ot())({
229
+ }), jt = () => O, Ct = /* @__PURE__ */ o(jt())({
223
230
  name: "IconPrediction",
224
231
  class: "ibhorgl",
225
232
  propsAsIs: !0
@@ -251,13 +258,13 @@ const Ye = /* @__PURE__ */ o("div")({
251
258
  hasCorrectAnswer: r,
252
259
  questionStatus: m
253
260
  }) => {
254
- const c = n && (i === x.TRIVIA || i === x.PREDICTION);
261
+ const c = n && (i === z.TRIVIA || i === z.PREDICTION);
255
262
  if (!c && m !== Q.RESOLVED)
256
263
  return null;
257
- const I = i === x.PREDICTION && !r, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
258
- return /* @__PURE__ */ p(jt, { "data-isPrediction": I, children: [
259
- m === Q.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ p(b, { children: [
260
- /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
264
+ const I = i === z.PREDICTION && !r, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
265
+ return /* @__PURE__ */ p(Ot, { "data-isPrediction": I, children: [
266
+ m === Q.RESOLVED && i === z.TRIVIA && !n && /* @__PURE__ */ p(b, { children: [
267
+ /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(O, { name: "questionExpired" }) }),
261
268
  /* @__PURE__ */ p("div", { children: [
262
269
  /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Z, { children: "Question Expired" }) }),
263
270
  /* @__PURE__ */ s(wt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
@@ -268,7 +275,7 @@ const Ye = /* @__PURE__ */ o("div")({
268
275
  /* @__PURE__ */ s(Z, { children: "Stay tuned to see if your prediction was correct." })
269
276
  ] }),
270
277
  c && r && /* @__PURE__ */ p(b, { children: [
271
- /* @__PURE__ */ s(ae, { "data-feedbackType": u, children: /* @__PURE__ */ s(j, { name: u }) }),
278
+ /* @__PURE__ */ s(ae, { "data-feedbackType": u, children: /* @__PURE__ */ s(O, { name: u }) }),
272
279
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ p(le, { children: [
273
280
  /* @__PURE__ */ s(kt, { "data-feedbackType": u, children: h == null ? void 0 : h.title }),
274
281
  /* @__PURE__ */ s(Z, { children: h == null ? void 0 : h.description })
@@ -303,11 +310,11 @@ const Ye = /* @__PURE__ */ o("div")({
303
310
  name: "ButtonBody",
304
311
  class: "b1gq1lnf",
305
312
  propsAsIs: !1
306
- }), qt = /* @__PURE__ */ o("div")({
313
+ }), Pt = /* @__PURE__ */ o("div")({
307
314
  name: "IconContainer",
308
315
  class: "i1j65z51",
309
316
  propsAsIs: !1
310
- }), Pt = /* @__PURE__ */ o("div")({
317
+ }), qt = /* @__PURE__ */ o("div")({
311
318
  name: "IconWrap",
312
319
  class: "i19tpfua",
313
320
  propsAsIs: !1
@@ -335,33 +342,33 @@ const Ye = /* @__PURE__ */ o("div")({
335
342
  name: "Percentage",
336
343
  class: "p17ajcu2",
337
344
  propsAsIs: !1
338
- }), Gt = () => j, Jt = /* @__PURE__ */ o(Gt())({
345
+ }), Gt = () => O, Jt = /* @__PURE__ */ o(Gt())({
339
346
  name: "CheckIcon",
340
347
  class: "cu9kmlb",
341
348
  propsAsIs: !0
342
349
  }), ce = {
343
350
  [$.CENTERED]: (e) => /* @__PURE__ */ s(Wt, { alt: "option-icon", src: e }),
344
- [$.TRANSPARENT]: (e) => /* @__PURE__ */ s(qt, { children: /* @__PURE__ */ s(Pt, { style: { backgroundImage: `url(${e})` } }) }),
351
+ [$.TRANSPARENT]: (e) => /* @__PURE__ */ s(Pt, { children: /* @__PURE__ */ s(qt, { style: { backgroundImage: `url(${e})` } }) }),
345
352
  [$.ROUNDED]: (e) => /* @__PURE__ */ s(Ft, { alt: "option-icon", src: e }),
346
353
  [$.NONE]: () => null,
347
354
  [$.UNSET]: () => null
348
355
  }, Kt = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
349
- if (e === x.POLL && i)
356
+ if (e === z.POLL && i)
350
357
  return "correct";
351
- if (e === x.PREDICTION) {
358
+ if (e === z.PREDICTION) {
352
359
  if (t && r)
353
360
  return i ? n ? "correct" : "incorrect" : n ? "correct" : "unset";
354
361
  if (i)
355
362
  return "correct";
356
363
  }
357
- return e === x.TRIVIA && r ? i ? n ? "correct" : "incorrect" : n ? "correct" : "unset" : "unset";
364
+ return e === z.TRIVIA && r ? i ? n ? "correct" : "incorrect" : n ? "correct" : "unset" : "unset";
358
365
  }, Xt = ({
359
366
  questionType: e,
360
367
  questionVoted: t,
361
368
  correct: n,
362
369
  hasCorrectAnswer: i,
363
370
  questionStatus: r
364
- }) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && i || r === Q.RESOLVED && n : !1, en = (e) => {
371
+ }) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || r === Q.RESOLVED && n : !1, en = (e) => {
365
372
  var t;
366
373
  const {
367
374
  // option props
@@ -381,7 +388,7 @@ const Ye = /* @__PURE__ */ o("div")({
381
388
  questionType: A,
382
389
  correct: T,
383
390
  hasCorrectAnswer: a
384
- } = e, l = Kt(e), d = Xt({ questionType: A, questionVoted: u, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = u || D === Q.RESOLVED && A === x.PREDICTION;
391
+ } = e, l = Kt(e), d = Xt({ questionType: A, questionVoted: u, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = u || D === Q.RESOLVED && A === z.PREDICTION;
385
392
  return /* @__PURE__ */ p(
386
393
  Qt,
387
394
  {
@@ -397,7 +404,7 @@ const Ye = /* @__PURE__ */ o("div")({
397
404
  /* @__PURE__ */ s(Bt, { children: r }),
398
405
  g && /* @__PURE__ */ p(Ht, { children: [
399
406
  d && /* @__PURE__ */ s(Jt, { name: "selected" }),
400
- /* @__PURE__ */ s(Zt, { children: /* @__PURE__ */ s(qe, { value: m, suffix: "%" }) })
407
+ /* @__PURE__ */ s(Zt, { children: /* @__PURE__ */ s(Pe, { value: m, suffix: "%" }) })
401
408
  ] })
402
409
  ] })
403
410
  ]
@@ -421,7 +428,7 @@ const Ye = /* @__PURE__ */ o("div")({
421
428
  }, [n, r]), I = F((u) => {
422
429
  u === 10 && r(de);
423
430
  }, [r]);
424
- return /* @__PURE__ */ s(Pe, {
431
+ return /* @__PURE__ */ s(qe, {
425
432
  isPlaying: e,
426
433
  duration: t,
427
434
  colors: tn,
@@ -446,7 +453,7 @@ const Ye = /* @__PURE__ */ o("div")({
446
453
  name: "Title",
447
454
  class: "t1l3ucjp",
448
455
  propsAsIs: !1
449
- }), un = () => j, pn = /* @__PURE__ */ o(un())({
456
+ }), un = () => O, pn = /* @__PURE__ */ o(un())({
450
457
  name: "WinIcon",
451
458
  class: "wx7j799",
452
459
  propsAsIs: !0
@@ -473,7 +480,7 @@ const Ye = /* @__PURE__ */ o("div")({
473
480
  }) => /* @__PURE__ */ p(ln, { children: [
474
481
  /* @__PURE__ */ p(cn, { children: [
475
482
  e && /* @__PURE__ */ s(dn, { children: e }),
476
- t !== void 0 && r !== x.POLL && /* @__PURE__ */ p(b, { children: [
483
+ t !== void 0 && r !== z.POLL && /* @__PURE__ */ p(b, { children: [
477
484
  /* @__PURE__ */ s(pn, { name: "icon-trophy" }),
478
485
  /* @__PURE__ */ p(mn, { children: [
479
486
  /* @__PURE__ */ s(In, { children: t }),
@@ -528,10 +535,10 @@ const Ye = /* @__PURE__ */ o("div")({
528
535
  questionStatus: e.status
529
536
  }
530
537
  ),
531
- e.type !== x.PREDICTION && /* @__PURE__ */ s(
538
+ e.type !== z.PREDICTION && /* @__PURE__ */ s(
532
539
  gn,
533
540
  {
534
- title: I ? "Time expired" : e.type === x.POLL ? "Time remaining" : "To win",
541
+ title: I ? "Time expired" : e.type === z.POLL ? "Time remaining" : "To win",
535
542
  points: I ? void 0 : 100,
536
543
  onTimerExpired: a,
537
544
  questionType: e.type,
@@ -547,7 +554,7 @@ const Ye = /* @__PURE__ */ o("div")({
547
554
  description: "Watch for additional enhanced stream interactive experience."
548
555
  }
549
556
  ) : /* @__PURE__ */ p(b, { children: [
550
- /* @__PURE__ */ s($t, { "data-isPrediction": e.type === x.PREDICTION, children: r }),
557
+ /* @__PURE__ */ s($t, { "data-isPrediction": e.type === z.PREDICTION, children: r }),
551
558
  /* @__PURE__ */ s(Rt, { children: g.map((v) => /* @__PURE__ */ s(en, { ...v }, v.id)) })
552
559
  ] })
553
560
  ] }) }) });
@@ -612,13 +619,13 @@ const Ye = /* @__PURE__ */ o("div")({
612
619
  /* @__PURE__ */ s(xe, { instantView: e, ...t }),
613
620
  (e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(Sn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
614
621
  "Explore more of the Masters History",
615
- /* @__PURE__ */ s(j, { name: "icon-external-link" })
622
+ /* @__PURE__ */ s(O, { name: "icon-external-link" })
616
623
  ] })
617
624
  ] }), xn = /* @__PURE__ */ o("div")({
618
625
  name: "QuestionContainer",
619
626
  class: "qdri6g3",
620
627
  propsAsIs: !1
621
- }), jn = ({
628
+ }), On = ({
622
629
  openedQuestion: e
623
630
  }) => {
624
631
  var t;
@@ -626,7 +633,7 @@ const Ye = /* @__PURE__ */ o("div")({
626
633
  created: e.attributes.created,
627
634
  ...e.attributes.attributes.value
628
635
  }) : null;
629
- }, On = ({
636
+ }, jn = ({
630
637
  extendedQuestion: e,
631
638
  vote: t,
632
639
  close: n
@@ -651,12 +658,12 @@ const Ye = /* @__PURE__ */ o("div")({
651
658
  return /* @__PURE__ */ p(xn, {
652
659
  children: [/* @__PURE__ */ s(Ae, {
653
660
  close: e.closeQuestion,
654
- type: ((t = n.attributes) == null ? void 0 : t.type) || x.UNSET
655
- }), r === "question" && /* @__PURE__ */ s(On, {
661
+ type: ((t = n.attributes) == null ? void 0 : t.type) || z.UNSET
662
+ }), r === "question" && /* @__PURE__ */ s(jn, {
656
663
  vote: e.submitAnswer,
657
664
  close: e.closeQuestion,
658
665
  extendedQuestion: i
659
- }), r !== "question" && /* @__PURE__ */ s(jn, {
666
+ }), r !== "question" && /* @__PURE__ */ s(On, {
660
667
  openedQuestion: n
661
668
  })]
662
669
  });
@@ -778,7 +785,7 @@ function fe(e) {
778
785
  }
779
786
  return w;
780
787
  }
781
- var qn = 150, Pn = function(t, n) {
788
+ var Pn = 150, qn = function(t, n) {
782
789
  return t;
783
790
  };
784
791
  function Yn(e) {
@@ -811,14 +818,14 @@ function Yn(e) {
811
818
  if (f.hasOwnProperty(l))
812
819
  S = f[l];
813
820
  else {
814
- var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), C = g === "horizontal" || v === "horizontal", U = g === "rtl", _ = C ? z : 0;
821
+ var x = n(a.props, l, a._instanceProps), j = r(a.props, l, a._instanceProps), C = g === "horizontal" || v === "horizontal", U = g === "rtl", _ = C ? x : 0;
815
822
  f[l] = S = {
816
823
  position: "absolute",
817
824
  left: U ? void 0 : _,
818
825
  right: U ? _ : void 0,
819
- top: C ? 0 : z,
820
- height: C ? "100%" : O,
821
- width: C ? O : "100%"
826
+ top: C ? 0 : x,
827
+ height: C ? "100%" : j,
828
+ width: C ? j : "100%"
822
829
  };
823
830
  }
824
831
  return S;
@@ -829,20 +836,20 @@ function Yn(e) {
829
836
  a.setState(function(f) {
830
837
  if (f.scrollOffset === M)
831
838
  return null;
832
- var S = a.props.direction, z = M;
839
+ var S = a.props.direction, x = M;
833
840
  if (S === "rtl")
834
841
  switch (fe()) {
835
842
  case "negative":
836
- z = -M;
843
+ x = -M;
837
844
  break;
838
845
  case "positive-descending":
839
- z = v - g - M;
846
+ x = v - g - M;
840
847
  break;
841
848
  }
842
- return z = Math.max(0, Math.min(z, v - g)), {
849
+ return x = Math.max(0, Math.min(x, v - g)), {
843
850
  isScrolling: !0,
844
851
  scrollDirection: f.scrollOffset < M ? "forward" : "backward",
845
- scrollOffset: z,
852
+ scrollOffset: x,
846
853
  scrollUpdateWasRequested: !1
847
854
  };
848
855
  }, a._resetIsScrollingDebounced);
@@ -863,7 +870,7 @@ function Yn(e) {
863
870
  var d = a.props.outerRef;
864
871
  a._outerRef = l, typeof d == "function" ? d(l) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = l);
865
872
  }, a._resetIsScrollingDebounced = function() {
866
- a._resetIsScrollingTimeoutId !== null && he(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = _n(a._resetIsScrolling, qn);
873
+ a._resetIsScrollingTimeoutId !== null && he(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = _n(a._resetIsScrolling, Pn);
867
874
  }, a._resetIsScrolling = function() {
868
875
  a._resetIsScrollingTimeoutId = null, a.setState({
869
876
  isScrolling: !1
@@ -915,8 +922,8 @@ function Yn(e) {
915
922
  f.scrollLeft = M;
916
923
  break;
917
924
  default:
918
- var S = f.clientWidth, z = f.scrollWidth;
919
- f.scrollLeft = z - S - M;
925
+ var S = f.clientWidth, x = f.scrollWidth;
926
+ f.scrollLeft = x - S - M;
920
927
  break;
921
928
  }
922
929
  else
@@ -928,18 +935,18 @@ function Yn(e) {
928
935
  }, A.componentWillUnmount = function() {
929
936
  this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
930
937
  }, A.render = function() {
931
- 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, z = a.itemCount, O = a.itemData, C = a.itemKey, U = C === void 0 ? Pn : C, _ = a.layout, je = a.outerElementType, Oe = a.outerTagName, Ce = a.style, ke = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = g === "horizontal" || _ === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
932
- if (z > 0)
938
+ 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, U = C === void 0 ? qn : C, _ = a.layout, Oe = a.outerElementType, je = a.outerTagName, Ce = a.style, ke = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = g === "horizontal" || _ === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
939
+ if (x > 0)
933
940
  for (var L = Ee; L <= Le; L++)
934
941
  ie.push(H(l, {
935
- data: O,
936
- key: U(L, O),
942
+ data: j,
943
+ key: U(L, j),
937
944
  index: L,
938
945
  isScrolling: ke ? ne : void 0,
939
946
  style: this._getItemStyle(L)
940
947
  }));
941
948
  var re = i(this.props, this._instanceProps);
942
- return H(je || Oe || "div", {
949
+ return H(Oe || je || "div", {
943
950
  className: d,
944
951
  onScroll: be,
945
952
  ref: this._outerRefSetter,
@@ -970,15 +977,15 @@ function Yn(e) {
970
977
  }
971
978
  }
972
979
  if (typeof this.props.onScroll == "function") {
973
- var f = this.state, S = f.scrollDirection, z = f.scrollOffset, O = f.scrollUpdateWasRequested;
974
- this._callOnScroll(S, z, O);
980
+ var f = this.state, S = f.scrollDirection, x = f.scrollOffset, j = f.scrollUpdateWasRequested;
981
+ this._callOnScroll(S, x, j);
975
982
  }
976
983
  }, A._getRangeToRender = function() {
977
984
  var a = this.props, l = a.itemCount, d = a.overscanCount, g = this.state, M = g.isScrolling, v = g.scrollDirection, f = g.scrollOffset;
978
985
  if (l === 0)
979
986
  return [0, 0, 0, 0];
980
- var S = c(this.props, f, this._instanceProps), z = I(this.props, S, f, this._instanceProps), O = !M || v === "backward" ? Math.max(1, d) : 1, C = !M || v === "forward" ? Math.max(1, d) : 1;
981
- return [Math.max(0, S - O), Math.max(0, Math.min(l - 1, z + C)), S, z];
987
+ var S = c(this.props, f, this._instanceProps), x = I(this.props, S, f, this._instanceProps), j = !M || v === "backward" ? Math.max(1, d) : 1, C = !M || v === "forward" ? Math.max(1, d) : 1;
988
+ return [Math.max(0, S - j), Math.max(0, Math.min(l - 1, x + C)), S, x];
982
989
  }, N;
983
990
  }(ye), t.defaultProps = {
984
991
  direction: "ltr",
@@ -1187,7 +1194,7 @@ const Kn = /* @__PURE__ */ o("div")({
1187
1194
  name: "Name",
1188
1195
  class: "njsrqgr",
1189
1196
  propsAsIs: !1
1190
- }), rs = () => j, os = /* @__PURE__ */ o(rs())({
1197
+ }), rs = () => O, os = /* @__PURE__ */ o(rs())({
1191
1198
  name: "CurrentUserBadge",
1192
1199
  class: "c17uc4zr",
1193
1200
  propsAsIs: !0
@@ -1295,11 +1302,11 @@ const Kn = /* @__PURE__ */ o("div")({
1295
1302
  name: "QuestionAction",
1296
1303
  class: "q105uluy",
1297
1304
  propsAsIs: !1
1298
- }), gs = () => j, Y = /* @__PURE__ */ o(gs())({
1305
+ }), gs = () => O, Y = /* @__PURE__ */ o(gs())({
1299
1306
  name: "QuestionActionIcon",
1300
1307
  class: "q1fa0b9h",
1301
1308
  propsAsIs: !0
1302
- }), fs = () => j, Ms = /* @__PURE__ */ o(fs())({
1309
+ }), fs = () => O, Ms = /* @__PURE__ */ o(fs())({
1303
1310
  name: "QuestionTypeIcon",
1304
1311
  class: "qxlt78s",
1305
1312
  propsAsIs: !0
@@ -1316,10 +1323,10 @@ const Kn = /* @__PURE__ */ o("div")({
1316
1323
  class: "p1pba9p1",
1317
1324
  propsAsIs: !1
1318
1325
  }), As = {
1319
- [q.LOST]: /* @__PURE__ */ s(Y, { name: "icon-cross" }),
1320
- [q.WON]: /* @__PURE__ */ s(Y, { name: "icon-check" }),
1321
- [q.UNSET]: /* @__PURE__ */ s(Y, { name: "icon-arrow" }),
1322
- [q.DNP]: /* @__PURE__ */ s(Y, { name: "icon-arrow" })
1326
+ [P.LOST]: /* @__PURE__ */ s(Y, { name: "incorrectVoted" }),
1327
+ [P.WON]: /* @__PURE__ */ s(Y, { name: "icon-check" }),
1328
+ [P.UNSET]: /* @__PURE__ */ s(Y, { name: "icon-arrow" }),
1329
+ [P.DNP]: /* @__PURE__ */ s(Y, { name: "icon-arrow" })
1323
1330
  }, Ts = ({
1324
1331
  questionId: e,
1325
1332
  questionType: t,
@@ -1333,10 +1340,17 @@ const Kn = /* @__PURE__ */ o("div")({
1333
1340
  return I ? /* @__PURE__ */ p(ps, { onClick: () => m == null ? void 0 : m(e), children: [
1334
1341
  /* @__PURE__ */ p(Ns, { children: [
1335
1342
  /* @__PURE__ */ p(ms, { children: [
1336
- /* @__PURE__ */ s(Ms, { name: I.iconName }),
1343
+ /* @__PURE__ */ s(
1344
+ Ms,
1345
+ {
1346
+ "data-type-trivia": t === z.TRIVIA,
1347
+ "data-type-poll": t === z.POLL,
1348
+ name: I.iconName
1349
+ }
1350
+ ),
1337
1351
  /* @__PURE__ */ p(vs, { children: [
1338
1352
  I.label,
1339
- t === x.TRIVIA && n === Q.RESOLVED && " • Expired"
1353
+ t === z.TRIVIA && n === Q.RESOLVED && " • Expired"
1340
1354
  ] })
1341
1355
  ] }),
1342
1356
  /* @__PURE__ */ s(Is, { children: i || "" })
@@ -1362,7 +1376,7 @@ const Kn = /* @__PURE__ */ o("div")({
1362
1376
  name: "QuestionsContainer",
1363
1377
  class: "qvghv3l",
1364
1378
  propsAsIs: !1
1365
- }), js = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(xs, { children: e == null ? void 0 : e.map((n) => {
1379
+ }), Os = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(xs, { children: e == null ? void 0 : e.map((n) => {
1366
1380
  var i, r;
1367
1381
  if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1368
1382
  const m = n.attributes.attributes.value;
@@ -1373,9 +1387,9 @@ const Kn = /* @__PURE__ */ o("div")({
1373
1387
  return /* @__PURE__ */ s(zs, { openInsight: t, ...m }, m.questionId);
1374
1388
  }
1375
1389
  return null;
1376
- }) }), Os = ({ store: e, openQuestion: t }) => {
1390
+ }) }), js = ({ store: e, openQuestion: t }) => {
1377
1391
  const n = k(e);
1378
- return n != null && n.data ? /* @__PURE__ */ s(js, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1392
+ return n != null && n.data ? /* @__PURE__ */ s(Os, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1379
1393
  }, Cs = ({ userSummary: e }) => {
1380
1394
  var t, n;
1381
1395
  const i = k(e.getStore());
@@ -1408,7 +1422,7 @@ const Kn = /* @__PURE__ */ o("div")({
1408
1422
  userSummary: e.userSummary
1409
1423
  })
1410
1424
  }), /* @__PURE__ */ s(Ue, {
1411
- children: /* @__PURE__ */ s(Os, {
1425
+ children: /* @__PURE__ */ s(js, {
1412
1426
  openQuestion: e.openQuestion,
1413
1427
  store: e.feedList.getStore()
1414
1428
  })