@streamlayer/react 1.3.0 → 1.3.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/es/index2.js CHANGED
@@ -2,11 +2,11 @@ var fe = Object.defineProperty;
2
2
  var ke = (e, s, n) => s in e ? fe(e, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[s] = n;
3
3
  var m = (e, s, n) => ke(e, typeof s != "symbol" ? s + "" : s, n);
4
4
  import { C, e as G, Q as x, S as w } from "./useStreamLayerApp2.js";
5
- import { a4 as P, u, F as ye, s as h, T as re, i as Ne, p as be, b as Se, N as Ie, k as Ee, M as Ae, g as Ce, S as we, C as $e, h as De, O as le, m as q, l as Le, j as Te, n as Oe, o as de, q as xe, r as Re, t as Ve, v as M, w as Pe, x as ce, y as U, z as qe, A as H, I as O, c as pe, D as _e, E as Fe, G as Qe, e as Ke, H as R, J as j, K as Me, P as Ue, R as ze, a as ue, V as We, W as Be, L as _, _ as Ge, f as F, $ as He, a0 as je, X as Xe, Y as Ye, Z as Ze, a5 as Je, a2 as he, a3 as X } from "./provider.js";
5
+ import { a4 as P, u, F as ye, s as h, T as ae, i as Ne, p as be, b as Se, N as Ie, k as Ee, M as Ae, f as Ce, S as we, C as $e, g as De, O as le, m as q, l as Le, h as Te, j as Oe, n as de, o as xe, q as Re, r as Ve, t as M, w as Pe, x as ce, y as U, z as qe, A as H, I as O, c as pe, D as _e, E as Fe, G as Qe, e as Ke, H as R, J as j, K as Me, P as Ue, R as ze, a as ue, V as We, W as Be, L as _, _ as Ge, v as F, $ as He, a0 as je, X as Xe, Y as Ye, Z as Ze, a5 as Je, a2 as he, a3 as X } from "./provider.js";
6
6
  import { jsx as t, jsxs as g, Fragment as L } from "react/jsx-runtime";
7
7
  import { createContext as es, useContext as z, useRef as D, useState as E, useEffect as k, useTransition as ss, lazy as ns, useMemo as $, Suspense as ts, forwardRef as os, useLayoutEffect as is, useCallback as V } from "react";
8
8
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
9
- function as(e) {
9
+ function rs(e) {
10
10
  return e instanceof DOMException && // everything except Firefox
11
11
  (e.code === 22 || // Firefox
12
12
  e.code === 1014 || // test name field too, because code might not be present
@@ -14,7 +14,7 @@ function as(e) {
14
14
  e.name === "QuotaExceededError" || // Firefox
15
15
  e.name === "NS_ERROR_DOM_QUOTA_REACHED");
16
16
  }
17
- class rs {
17
+ class as {
18
18
  constructor(s = "main", n = window.localStorage) {
19
19
  m(this, "delimiter", ":");
20
20
  m(this, "prefix");
@@ -28,8 +28,8 @@ class rs {
28
28
  const n = s.pop() || "", o = this.generateKey(s);
29
29
  try {
30
30
  this.storage.setItem(o, n);
31
- } catch (a) {
32
- as(a) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(o, n));
31
+ } catch (r) {
32
+ rs(r) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(o, n));
33
33
  }
34
34
  });
35
35
  m(this, "read", (...s) => {
@@ -53,7 +53,7 @@ var I;
53
53
  (function(e) {
54
54
  e.SCHEMA = "schema", e.EXTERNAL_TOKEN = "eToken", e.TOKEN = "token";
55
55
  })(I || (I = {}));
56
- class ls extends rs {
56
+ class ls extends as {
57
57
  constructor() {
58
58
  super("user");
59
59
  // Schema
@@ -116,10 +116,10 @@ const ds = {
116
116
  sdk: s,
117
117
  children: n,
118
118
  className: o,
119
- noWait: a
119
+ noWait: r
120
120
  }) => {
121
- const r = u(e.status), l = u(s.sdkStore.slStreamId);
122
- if (!a) {
121
+ const a = u(e.status), l = u(s.sdkStore.slStreamId);
122
+ if (!r) {
123
123
  if (l != null && l.loading && !l.data)
124
124
  return /* @__PURE__ */ t(Q, {
125
125
  className: o,
@@ -130,7 +130,7 @@ const ds = {
130
130
  className: o,
131
131
  children: "Event is forbidden..."
132
132
  });
133
- if (r !== ye.Ready)
133
+ if (a !== ye.Ready)
134
134
  return /* @__PURE__ */ t(Q, {
135
135
  className: o,
136
136
  children: "Wait feature..."
@@ -164,12 +164,12 @@ const ds = {
164
164
  }) => {
165
165
  const {
166
166
  loading: o,
167
- data: a
167
+ data: r
168
168
  } = e;
169
- return a ? /* @__PURE__ */ t(Ie, {
169
+ return r ? /* @__PURE__ */ t(Ie, {
170
170
  vote: s,
171
171
  close: n,
172
- openedQuestion: a,
172
+ openedQuestion: r,
173
173
  isLoading: !!o
174
174
  }) : /* @__PURE__ */ t(Ee, {});
175
175
  }, vs = ({
@@ -178,16 +178,16 @@ const ds = {
178
178
  className: n,
179
179
  hideHeader: o
180
180
  }) => {
181
- var a, r, l;
181
+ var r, a, l;
182
182
  const d = u(e.openedQuestion.$store), i = u(e.openedQuestion.$extendedStore);
183
183
  if (!d)
184
184
  return null;
185
185
  const c = d.type;
186
186
  return /* @__PURE__ */ g(ps, {
187
187
  className: n,
188
- children: [!o && /* @__PURE__ */ t(re, {
188
+ children: [!o && /* @__PURE__ */ t(ae, {
189
189
  close: e.closeQuestion,
190
- type: ((a = d.attributes) == null ? void 0 : a.type) || x.UNSET
190
+ type: ((r = d.attributes) == null ? void 0 : r.type) || x.UNSET
191
191
  }), c === "question" && /* @__PURE__ */ t(hs, {
192
192
  vote: e.submitAnswer,
193
193
  close: e.closeQuestion,
@@ -195,7 +195,7 @@ const ds = {
195
195
  }), c !== "question" && /* @__PURE__ */ t(us, {
196
196
  openedQuestion: d
197
197
  }), !s && /* @__PURE__ */ t(Ne, {
198
- sponsorLogo: (l = (r = i.data) == null ? void 0 : r.sponsorship) == null ? void 0 : l.logo
198
+ sponsorLogo: (l = (a = i.data) == null ? void 0 : a.sponsorship) == null ? void 0 : l.logo
199
199
  })]
200
200
  });
201
201
  }, ms = /* @__PURE__ */ h("div")({
@@ -220,22 +220,22 @@ const ds = {
220
220
  scrollStore: n
221
221
  }) => {
222
222
  const o = D(null), {
223
- data: a,
224
- hasMore: r,
223
+ data: r,
224
+ hasMore: a,
225
225
  loading: l,
226
226
  key: d
227
227
  } = u(e.leaderboardList.$store), {
228
228
  data: i
229
229
  } = u(e.deepLink.$store), [c, p] = Ce(o);
230
- return !a.length && !l ? /* @__PURE__ */ t(gs, {
230
+ return !r.length && !l ? /* @__PURE__ */ t(gs, {
231
231
  deepLink: i
232
232
  }) : /* @__PURE__ */ g(L, {
233
233
  children: [/* @__PURE__ */ t(we, {
234
- items: a,
234
+ items: r,
235
235
  scrollNode: s,
236
236
  scrollStore: n,
237
237
  fetchMore: e.leaderboardList.fetchMore,
238
- hasMore: r,
238
+ hasMore: a,
239
239
  openItemDetail: e.openUser,
240
240
  currentUserId: e.currentUserId.get()
241
241
  }, d), i && /* @__PURE__ */ t(fs, {
@@ -254,18 +254,18 @@ const ds = {
254
254
  var s;
255
255
  const [n, o] = E(void 0);
256
256
  return k(() => {
257
- const a = e.$store.subscribe((r) => {
258
- r && o(r);
257
+ const r = e.$store.subscribe((a) => {
258
+ a && o(a);
259
259
  });
260
260
  return () => {
261
- a();
261
+ r();
262
262
  };
263
263
  }, [e]), /* @__PURE__ */ t(le, { loading: !(n != null && n.summary), ...n == null ? void 0 : n.summary, successRate: (s = n == null ? void 0 : n.percentage) == null ? void 0 : s.correct });
264
- }, bs = ({ gamification: e, className: s, scrollStore: n, scrollNode: o, appNode: a, style: r, responsiveStore: l }) => {
264
+ }, bs = ({ gamification: e, className: s, scrollStore: n, scrollNode: o, appNode: r, style: a, responsiveStore: l }) => {
265
265
  const { tabsShown: d } = u(n, { keys: ["tabsShown"] }), [i, c] = E(q.HOME), [, p] = ss(), { sdkInDesktopView: v, screen: f } = u(l, { keys: ["sdkInDesktopView"] }), N = (S) => {
266
266
  p(() => {
267
267
  var y;
268
- c(S), v === !1 && (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(a, f.size, { behavior: "instant" });
268
+ c(S), v === !1 && (((y = r.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(r, f.size, { behavior: "instant" });
269
269
  });
270
270
  };
271
271
  k(() => n.subscribe((S) => {
@@ -276,7 +276,7 @@ const ds = {
276
276
  l.get().sdkInDesktopView ? n.setKey("tabsShown", S.scrollDirection === "backward") : n.setKey("tabsShown", S.scrollDirection === "forward");
277
277
  }), [n, l]);
278
278
  let b = "0px";
279
- return v ? b = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : b = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ g(Le, { className: s, style: r, children: [
279
+ return v ? b = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : b = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ g(Le, { className: s, style: a, children: [
280
280
  /* @__PURE__ */ t(
281
281
  Te,
282
282
  {
@@ -311,22 +311,22 @@ const ds = {
311
311
  scrollStore: s,
312
312
  className: n,
313
313
  appNode: o,
314
- scrollNode: a,
315
- responsiveStore: r
314
+ scrollNode: r,
315
+ responsiveStore: a
316
316
  }) => /* @__PURE__ */ t(bs, {
317
317
  appNode: o,
318
318
  scrollStore: s,
319
- scrollNode: a,
319
+ scrollNode: r,
320
320
  className: n,
321
321
  gamification: e,
322
- responsiveStore: r
322
+ responsiveStore: a
323
323
  }), As = ({
324
324
  gamification: e,
325
325
  className: s,
326
326
  appNode: n,
327
327
  responsiveStore: o
328
328
  }) => {
329
- const a = u(e.openedQuestion.$store), r = u(e.openedUser), {
329
+ const r = u(e.openedQuestion.$store), a = u(e.openedUser), {
330
330
  sdkInDesktopView: l
331
331
  } = u(o, {
332
332
  keys: ["sdkInDesktopView"]
@@ -334,27 +334,27 @@ const ds = {
334
334
  hiding: d,
335
335
  onAnimationEnd: i
336
336
  } = Pe();
337
- if (!n.current || !a && !r)
337
+ if (!n.current || !r && !a)
338
338
  return null;
339
- const c = a ? /* @__PURE__ */ t(oe, {
339
+ const c = r ? /* @__PURE__ */ t(oe, {
340
340
  className: s,
341
341
  hiding: d,
342
342
  onAnimationEnd: i,
343
343
  children: /* @__PURE__ */ t(vs, {
344
344
  gamification: e
345
345
  })
346
- }) : r ? /* @__PURE__ */ t(oe, {
346
+ }) : a ? /* @__PURE__ */ t(oe, {
347
347
  className: s,
348
348
  hiding: d,
349
349
  onAnimationEnd: i,
350
350
  children: /* @__PURE__ */ g(Is, {
351
- children: [/* @__PURE__ */ t(re, {
351
+ children: [/* @__PURE__ */ t(ae, {
352
352
  label: "Friend's Rank",
353
353
  close: e.closeUser
354
354
  }), /* @__PURE__ */ t(de, {
355
355
  children: /* @__PURE__ */ t(le, {
356
- ...r,
357
- successRate: Es(r)
356
+ ...a,
357
+ successRate: Es(a)
358
358
  })
359
359
  })]
360
360
  })
@@ -364,18 +364,18 @@ const ds = {
364
364
  useContainer: !l,
365
365
  children: c
366
366
  });
367
- }, Cs = ns(() => import("./gamification-feature.js")), ws = ({ sdk: e, feature: s, className: n, scrollStore: o, appNode: a, scrollNode: r, responsiveStore: l }) => {
367
+ }, Cs = ns(() => import("./gamification-feature.js")), ws = ({ sdk: e, feature: s, className: n, scrollStore: o, appNode: r, scrollNode: a, responsiveStore: l }) => {
368
368
  const d = $(() => s && s.featureConfig.get().type === w.GAMES ? /* @__PURE__ */ t(cs, { className: n, sdk: e, feature: s, children: /* @__PURE__ */ t(
369
369
  Cs,
370
370
  {
371
- appNode: a,
371
+ appNode: r,
372
372
  scrollStore: o,
373
- scrollNode: r,
373
+ scrollNode: a,
374
374
  className: n,
375
375
  responsiveStore: l,
376
376
  gamification: s
377
377
  }
378
- ) }) : null, [e, s, n, l, o, r, a]);
378
+ ) }) : null, [e, s, n, l, o, a, r]);
379
379
  return /* @__PURE__ */ t(
380
380
  ts,
381
381
  {
@@ -399,10 +399,10 @@ const ds = {
399
399
  sdk: e,
400
400
  className: s
401
401
  }, n) => {
402
- const o = u(e.sdkStore.organizationSettings), a = u(e.sdkStore.streamSettings), r = u(e.getActiveFeature()), l = $(() => {
403
- const i = (a == null ? void 0 : a.data) || (o == null ? void 0 : o.data);
402
+ const o = u(e.sdkStore.organizationSettings), r = u(e.sdkStore.streamSettings), a = u(e.getActiveFeature()), l = $(() => {
403
+ const i = (r == null ? void 0 : r.data) || (o == null ? void 0 : o.data);
404
404
  return i != null && i.overlays ? i.overlays : [];
405
- }, [o, a]), d = $(() => [...l.filter(({
405
+ }, [o, r]), d = $(() => [...l.filter(({
406
406
  enableSdkButton: i,
407
407
  type: c
408
408
  }) => c === w.GAMES || i).map((i) => ({
@@ -424,20 +424,20 @@ const ds = {
424
424
  id: "Channels",
425
425
  onClick: () => e.closeFeature(),
426
426
  label: "Channels",
427
- active: r === 0
427
+ active: a === 0
428
428
  }, "Channels"), ...d.map((i) => i.id === w.GAMES ? /* @__PURE__ */ t(O, {
429
429
  ...i,
430
- active: i.id === r,
430
+ active: i.id === a,
431
431
  label: "StreamLayer +",
432
432
  id: "featuredGroups",
433
433
  icon: /* @__PURE__ */ t(Ls, {
434
434
  name: "icon-btn-feature-groups",
435
- "data-selected": i.id === r
435
+ "data-selected": i.id === a
436
436
  })
437
437
  }, i.id) : /* @__PURE__ */ t(O, {
438
438
  ...i,
439
439
  icon: void 0,
440
- active: i.id === r
440
+ active: i.id === a
441
441
  }, i.id))]
442
442
  }), !d.length && /* @__PURE__ */ t(H, {
443
443
  children: [/* @__PURE__ */ t(O, {
@@ -487,11 +487,11 @@ const ds = {
487
487
  class: "a1h1bk90",
488
488
  propsAsIs: !1
489
489
  }), ie = ({ close: e, action: s, onboarding: n }) => {
490
- var o, a, r, l, d, i, c, p;
490
+ var o, r, a, l, d, i, c, p;
491
491
  return /* @__PURE__ */ g(Os, { children: [
492
492
  /* @__PURE__ */ t(xs, { onClick: e, children: /* @__PURE__ */ t(Vs, { name: "icon-cross" }) }),
493
- ((a = (o = n == null ? void 0 : n.titleCard) == null ? void 0 : o.media) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ g(Ps, { children: [
494
- /* @__PURE__ */ t(qs, { alt: "sponsor-logo", src: (l = (r = n == null ? void 0 : n.titleCard) == null ? void 0 : r.media) == null ? void 0 : l.sponsorLogo }),
493
+ ((r = (o = n == null ? void 0 : n.titleCard) == null ? void 0 : o.media) == null ? void 0 : r.sponsorLogo) && /* @__PURE__ */ g(Ps, { children: [
494
+ /* @__PURE__ */ t(qs, { alt: "sponsor-logo", src: (l = (a = n == null ? void 0 : n.titleCard) == null ? void 0 : a.media) == null ? void 0 : l.sponsorLogo }),
495
495
  /* @__PURE__ */ t(_s, { children: "PRESENTS" })
496
496
  ] }),
497
497
  ((d = n == null ? void 0 : n.titleCard) == null ? void 0 : d.title) && /* @__PURE__ */ t(Fs, { children: (i = n == null ? void 0 : n.titleCard) == null ? void 0 : i.title }),
@@ -524,7 +524,7 @@ const ds = {
524
524
  name: "OnboardingNotificationContainer",
525
525
  class: "o1vnouv7",
526
526
  propsAsIs: !0
527
- }), ae = /* @__PURE__ */ h("div")({
527
+ }), re = /* @__PURE__ */ h("div")({
528
528
  name: "InnerContainer",
529
529
  class: "i59uefw",
530
530
  propsAsIs: !1
@@ -533,17 +533,17 @@ const ds = {
533
533
  onboardingOpts: s,
534
534
  notification: n,
535
535
  gamification: o,
536
- loading: a,
537
- sdk: r
536
+ loading: r,
537
+ sdk: a
538
538
  }) => {
539
539
  var l, d, i, c, p, v, f;
540
540
  const N = u(o.friends.getStore()), [b, S] = E(void 0), y = $(() => {
541
541
  var A, T;
542
- const B = r.getInviter();
542
+ const B = a.getInviter();
543
543
  return B ? (T = (A = N.data) == null ? void 0 : A.find(({
544
544
  slId: ge
545
545
  }) => ge === B)) == null ? void 0 : T.name : "";
546
- }, [N.data, r]);
546
+ }, [N.data, a]);
547
547
  return k(() => {
548
548
  const A = e.$store.subscribe((T) => {
549
549
  T && S(T.data);
@@ -553,7 +553,7 @@ const ds = {
553
553
  };
554
554
  }, [e.$store]), /* @__PURE__ */ t(Ms, {
555
555
  children: /* @__PURE__ */ t(Fe, {
556
- loading: a,
556
+ loading: r,
557
557
  rules: [{
558
558
  label: "Answer as many questions as you like.",
559
559
  icon: "icon-btn-feature-groups"
@@ -579,7 +579,7 @@ const ds = {
579
579
  (A = n.close) == null || A.call(n);
580
580
  },
581
581
  gamification: o,
582
- sdk: r,
582
+ sdk: a,
583
583
  inviterName: y
584
584
  })
585
585
  });
@@ -588,8 +588,8 @@ const ds = {
588
588
  notification: s,
589
589
  saveHeight: n,
590
590
  style: o,
591
- appNode: a,
592
- sdkInDesktopView: r,
591
+ appNode: r,
592
+ sdkInDesktopView: a,
593
593
  responsiveStore: l
594
594
  }) => {
595
595
  const d = D(null), i = s.data.onboarding, [c, p] = E(i == null ? void 0 : i.instantOpen), v = e.getFeature(w.GAMES), f = $(() => K == null ? void 0 : K.map(({
@@ -607,9 +607,9 @@ const ds = {
607
607
  loading: b,
608
608
  throttled: S
609
609
  } = _e(f);
610
- return c && v && i && a.current && !S ? /* @__PURE__ */ t(ce, {
611
- container: a,
612
- useContainer: !r,
610
+ return c && v && i && r.current && !S ? /* @__PURE__ */ t(ce, {
611
+ container: r,
612
+ useContainer: !a,
613
613
  children: /* @__PURE__ */ t(Ws, {
614
614
  notification: s,
615
615
  setOpened: p,
@@ -617,11 +617,11 @@ const ds = {
617
617
  onboardingOpts: i,
618
618
  deepLink: v.deepLink,
619
619
  loading: b,
620
- renderToNode: a,
620
+ renderToNode: r,
621
621
  sdk: e
622
622
  })
623
623
  }) : /* @__PURE__ */ g(L, {
624
- children: [/* @__PURE__ */ t(ae, {
624
+ children: [/* @__PURE__ */ t(re, {
625
625
  ref: d,
626
626
  style: {
627
627
  position: "absolute",
@@ -637,12 +637,12 @@ const ds = {
637
637
  }), /* @__PURE__ */ t(zs, {
638
638
  style: o,
639
639
  hiding: s.hiding,
640
- children: /* @__PURE__ */ t(ae, {
640
+ children: /* @__PURE__ */ t(re, {
641
641
  children: /* @__PURE__ */ t(ie, {
642
642
  close: s.close,
643
643
  action: () => {
644
644
  var y;
645
- p(!0), (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(a, N.size, {
645
+ p(!0), (((y = r.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(r, N.size, {
646
646
  behavior: "smooth"
647
647
  });
648
648
  },
@@ -672,7 +672,7 @@ const ds = {
672
672
  class: "p1lha68t",
673
673
  propsAsIs: !0
674
674
  }), en = (e) => {
675
- const [s, n] = E(0), o = D(null), a = V((l) => {
675
+ const [s, n] = E(0), o = D(null), r = V((l) => {
676
676
  o.current = l;
677
677
  }, []);
678
678
  k(() => {
@@ -680,17 +680,17 @@ const ds = {
680
680
  const d = (l = o.current) == null ? void 0 : l.getBoundingClientRect();
681
681
  d && n(d.height);
682
682
  }, [e]);
683
- const r = V((l) => {
683
+ const a = V((l) => {
684
684
  n(l);
685
685
  }, []);
686
- return [a, s, r];
686
+ return [r, s, a];
687
687
  }, sn = ({
688
688
  sdk: e,
689
689
  notification: s,
690
690
  appNode: n,
691
691
  responsiveStore: o
692
692
  }) => {
693
- var a, r;
693
+ var r, a;
694
694
  const {
695
695
  sdkInDesktopView: l
696
696
  } = u(o, {
@@ -719,7 +719,7 @@ const ds = {
719
719
  })
720
720
  }), /* @__PURE__ */ t(Ys, {}, s.id)]
721
721
  })]
722
- }) : s.type === R.QUESTION_RESOLVED && (r = (a = s.data) == null ? void 0 : a.question) != null && r.predictionResult ? /* @__PURE__ */ t(Me, {
722
+ }) : s.type === R.QUESTION_RESOLVED && (a = (r = s.data) == null ? void 0 : r.question) != null && a.predictionResult ? /* @__PURE__ */ t(Me, {
723
723
  style: {
724
724
  height: s.hiding ? 0 : c
725
725
  },
@@ -743,14 +743,14 @@ const ds = {
743
743
  setPill: s,
744
744
  appNode: n,
745
745
  headerNode: o,
746
- scrollNode: a,
747
- responsiveStore: r,
746
+ scrollNode: r,
747
+ responsiveStore: a,
748
748
  scrollStore: l
749
749
  }) => {
750
750
  var d, i;
751
751
  const {
752
752
  screen: c
753
- } = u(r, {
753
+ } = u(a, {
754
754
  keys: ["screen"]
755
755
  }), {
756
756
  tabsShown: p,
@@ -759,14 +759,14 @@ const ds = {
759
759
  keys: ["tabsShown", "scrollPosition"]
760
760
  });
761
761
  k(() => {
762
- r.get().sdkInDesktopView ? v < 50 && s(null) : v > -50 && s(null);
763
- }, [v, r, s]);
764
- const f = r.get().sdkInDesktopView ? n : o;
762
+ a.get().sdkInDesktopView ? v < 50 && s(null) : v > -50 && s(null);
763
+ }, [v, a, s]);
764
+ const f = a.get().sdkInDesktopView ? n : o;
765
765
  return !e || !f.current ? null : Ue.createPortal(/* @__PURE__ */ t(Js, {
766
766
  title: e.type === R.QUESTION_RESOLVED ? "Prediction result" : `New ${((i = ze[(d = e.data) == null ? void 0 : d.questionType]) == null ? void 0 : i.label) || "notification"}`,
767
767
  onClick: () => {
768
768
  var N;
769
- r.get().sdkInDesktopView ? (N = a.current) == null || N.scrollTo({
769
+ a.get().sdkInDesktopView ? (N = r.current) == null || N.scrollTo({
770
770
  top: 0,
771
771
  behavior: "smooth"
772
772
  }) : M(n, c.size, {
@@ -780,8 +780,8 @@ const ds = {
780
780
  headerNode: s,
781
781
  scrollNode: n,
782
782
  responsiveStore: o,
783
- appNode: a,
784
- scrollStore: r
783
+ appNode: r,
784
+ scrollStore: a
785
785
  }) => {
786
786
  const [l] = E(e.getNotificationsStore()), d = u(l), [i, c] = E(null), p = $(() => e.getActiveNotification(), [e, d]);
787
787
  return k(() => {
@@ -794,30 +794,30 @@ const ds = {
794
794
  });
795
795
  }, [p]), k(() => {
796
796
  p && (o.get().sdkInDesktopView || o.get().sdkInView) && (!o.get().sdkInDesktopView && o.get().sdkInView && c(p), o.get().sdkInDesktopView && window.requestAnimationFrame(() => {
797
- r.get().scrollPosition !== 0 && c(p);
797
+ a.get().scrollPosition !== 0 && c(p);
798
798
  }));
799
799
  }, [p]), k(() => {
800
800
  p || c(null);
801
801
  }, [p]), /* @__PURE__ */ g(L, {
802
802
  children: [!i && p && /* @__PURE__ */ t(sn, {
803
803
  headerNode: s,
804
- appNode: a,
804
+ appNode: r,
805
805
  sdk: e,
806
806
  notification: p,
807
807
  responsiveStore: o
808
808
  }), i && /* @__PURE__ */ t(tn, {
809
809
  pill: i,
810
810
  setPill: c,
811
- appNode: a,
811
+ appNode: r,
812
812
  notification: p,
813
813
  headerNode: s,
814
814
  scrollNode: n,
815
- scrollStore: r,
815
+ scrollStore: a,
816
816
  responsiveStore: o
817
817
  })]
818
818
  });
819
- }, an = (e) => {
820
- const s = D(""), [n, o] = E(!1), a = u(e.status), r = u(e.sdkStore.slStreamId), l = u(e.userId()), d = u(e.getActiveFeature()), i = a === "ready" && !!r.data;
819
+ }, rn = (e) => {
820
+ const s = D(""), [n, o] = E(!1), r = u(e.status), a = u(e.sdkStore.slStreamId), l = u(e.userId()), d = u(e.getActiveFeature()), i = r === "ready" && !!a.data;
821
821
  k(() => {
822
822
  const v = e.getFeature(w.GAMES);
823
823
  v && (v.closeQuestion(), v.closeUser());
@@ -857,24 +857,24 @@ const ds = {
857
857
  deactivate: p,
858
858
  isLogged: !!l
859
859
  };
860
- }, rn = ({ sdk: e, className: s, scrollStore: n, appNode: o, scrollNode: a, responsiveStore: r }) => {
860
+ }, an = ({ sdk: e, className: s, scrollStore: n, appNode: o, scrollNode: r, responsiveStore: a }) => {
861
861
  const [, l] = je(e);
862
862
  return /* @__PURE__ */ t(
863
863
  ws,
864
864
  {
865
865
  className: s,
866
- scrollNode: a,
866
+ scrollNode: r,
867
867
  appNode: o,
868
868
  scrollStore: n,
869
869
  feature: l,
870
- responsiveStore: r,
870
+ responsiveStore: a,
871
871
  sdk: e
872
872
  }
873
873
  );
874
874
  }, ln = ({ sdk: e, className: s, appNode: n, responsiveStore: o }) => {
875
- const a = u(e.featuresList.getStore());
876
- return a ? Array.from(a, (r) => {
877
- const l = e.getFeature(r);
875
+ const r = u(e.featuresList.getStore());
876
+ return r ? Array.from(r, (a) => {
877
+ const l = e.getFeature(a);
878
878
  return l ? /* @__PURE__ */ t(
879
879
  $s,
880
880
  {
@@ -884,19 +884,19 @@ const ds = {
884
884
  responsiveStore: o,
885
885
  sdk: e
886
886
  },
887
- r
887
+ a
888
888
  ) : null;
889
889
  }) : null;
890
890
  }, dn = ({ sdk: e, event: s }) => {
891
- const n = D(null), o = D(null), [a] = We(n), [r, l] = Be(n, a), { sdkEnabled: d, sdkReady: i, activateEventWithId: c, deactivate: p, isLogged: v } = an(e);
891
+ const n = D(null), o = D(null), [r] = We(n), [a, l] = Be(n, r), { sdkEnabled: d, sdkReady: i, activateEventWithId: c, deactivate: p, isLogged: v } = rn(e);
892
892
  k(() => {
893
893
  s ? (e.createEventSession(s), c(s)) : p();
894
- }, [s, c, p, e]), _(n, { enabled: d, event: "click", listener: Xe }), _(r, {
894
+ }, [s, c, p, e]), _(n, { enabled: d, event: "click", listener: Xe }), _(a, {
895
895
  enabled: d,
896
896
  event: "scrollend",
897
897
  listener: Ye,
898
898
  useDomNode: !0
899
- }), _(r, {
899
+ }), _(a, {
900
900
  enabled: d,
901
901
  event: "click",
902
902
  listener: Ze,
@@ -907,30 +907,30 @@ const ds = {
907
907
  import("./gamification-feature.js");
908
908
  }, []), /* @__PURE__ */ t(ve.Provider, { value: f, children: /* @__PURE__ */ g(Ge, { ref: n, children: [
909
909
  d && /* @__PURE__ */ t(Ts, { className: F, sdk: e, ref: o }),
910
- /* @__PURE__ */ g(He, { className: "sl-hide-on-modal", ref: r, "data-nav": d.toString(), children: [
910
+ /* @__PURE__ */ g(He, { className: "sl-hide-on-modal", ref: a, "data-nav": d.toString(), children: [
911
911
  i && /* @__PURE__ */ t(
912
912
  on,
913
913
  {
914
914
  sdk: e,
915
- scrollNode: r,
915
+ scrollNode: a,
916
916
  headerNode: o,
917
917
  appNode: n,
918
918
  scrollStore: l,
919
- responsiveStore: a
919
+ responsiveStore: r
920
920
  }
921
921
  ),
922
922
  i && /* @__PURE__ */ t(
923
- rn,
923
+ an,
924
924
  {
925
925
  scrollStore: l,
926
- responsiveStore: a,
927
- scrollNode: r,
926
+ responsiveStore: r,
927
+ scrollNode: a,
928
928
  appNode: n,
929
929
  className: F,
930
930
  sdk: e
931
931
  }
932
932
  ),
933
- i && /* @__PURE__ */ t(ln, { responsiveStore: a, appNode: n, className: F, sdk: e })
933
+ i && /* @__PURE__ */ t(ln, { responsiveStore: r, appNode: n, className: F, sdk: e })
934
934
  ] }),
935
935
  d && !v && /* @__PURE__ */ t(
936
936
  "div",
@@ -951,7 +951,7 @@ const ds = {
951
951
  };
952
952
  export {
953
953
  gn as E,
954
- an as F,
954
+ rn as F,
955
955
  kn as S,
956
956
  cn as d,
957
957
  fn as u
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as L, Fragment as E } from "react/jsx-runtime";
2
- import { u as C, F as r2, s as u, T as j, i as i2, p as a2, b as l2, N as d2, k as c2, M as p2, g as u2, S as C2, C as v2, h as h2, O as K, m as x, l as m2, j as g2, n as L2, o as X, q as f2, r as S2, t as y2, v as U, w as k2, x as J, y as _, I as e2, c as P, z as N2, A as b2, B as z, D as A2, E as I2, G as $2, e as E2, H as T, J as q, K as V2, P as w2, R as R2, a as H2, U as Q, V as T2, W as x2, L as F, X as F2, Y as D2, Z as M2, _ as O2, f as D, $ as U2, a0 as _2, a1 as P2, a2 as B2, a3 as G2 } from "./provider.js";
2
+ import { u as C, F as r2, s as u, T as j, i as i2, p as a2, b as l2, N as d2, k as c2, M as p2, f as u2, S as C2, C as v2, g as h2, O as K, m as x, l as m2, h as g2, j as L2, n as X, o as f2, q as S2, r as y2, t as U, w as k2, x as J, y as _, I as e2, c as P, z as N2, A as b2, B as z, D as A2, E as I2, G as $2, e as E2, H as T, J as q, K as V2, P as w2, R as R2, a as H2, U as Q, V as T2, W as x2, L as F, X as F2, Y as D2, Z as M2, _ as O2, v as D, $ as U2, a0 as _2, a1 as P2, a2 as B2, a3 as G2 } from "./provider.js";
3
3
  import { createContext as z2, useContext as s2, useRef as $, useState as b, useEffect as k, useTransition as q2, lazy as Q2, useMemo as H, Suspense as Z2, forwardRef as Y2, useLayoutEffect as W2, useCallback as R, Component as j2 } from "react";
4
4
  import { Q as K2, S as I } from "./useStreamLayerApp2.js";
5
5
  const M = /* @__PURE__ */ u("div")({
package/lib/es/points.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as p, useEffect as u } from "react";
3
- import { s as t, c as m, f as d, d as f, u as S, F as y } from "./provider.js";
4
- import { u as v, d as h } from "./index2.js";
3
+ import { s as t, c as m, v as d, d as S, u as f, F as v } from "./provider.js";
4
+ import { u as y, d as h } from "./index2.js";
5
5
  import { S as g } from "./useStreamLayerApp2.js";
6
6
  const A = /* @__PURE__ */ t("div")({
7
7
  name: "PointsContainer",
@@ -31,7 +31,7 @@ const A = /* @__PURE__ */ t("div")({
31
31
  /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(k, { name: "icon-trophy" }) }),
32
32
  /* @__PURE__ */ a(b, { children: [
33
33
  /* @__PURE__ */ r(x, { children: "Total points" }),
34
- /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(f, { value: s }) })
34
+ /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(S, { value: s }) })
35
35
  ] })
36
36
  ] }), L = ({ gamification: s }) => {
37
37
  const e = s.userSummary.$store, [i, l] = p(0);
@@ -44,15 +44,15 @@ const A = /* @__PURE__ */ t("div")({
44
44
  c();
45
45
  };
46
46
  }, [e]), /* @__PURE__ */ r(F, { points: i, onClick: () => {
47
- s.status.get() === y.Suspended && s.openFeature();
47
+ s.status.get() === v.Suspended && s.openFeature();
48
48
  } });
49
49
  }, $ = ({ sdk: s }) => {
50
- if (!S(s.featuresList.getStore()))
50
+ if (!f(s.featuresList.getStore()))
51
51
  return null;
52
52
  const e = s.getFeature(g.GAMES);
53
53
  return e ? /* @__PURE__ */ r(L, { gamification: e }) : null;
54
54
  }, K = () => {
55
- const s = v();
55
+ const s = y();
56
56
  return s ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r($, { sdk: s }) }) }) : null;
57
57
  };
58
58
  export {