@streamlayer/react 1.20.5 → 1.20.7

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.
Files changed (49) hide show
  1. package/lib/cjs/advertisement.js +29 -29
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/index2.js +4 -4
  4. package/lib/cjs/insight.js +1 -1
  5. package/lib/cjs/masters2.js +7 -7
  6. package/lib/cjs/notification.js +1 -1
  7. package/lib/cjs/pause-ad.js +1 -1
  8. package/lib/cjs/points.js +1 -1
  9. package/lib/cjs/provider.js +15 -39
  10. package/lib/cjs/useStreamLayerApp2.js +16 -17
  11. package/lib/classic/cjs/advertisement.js +29 -29
  12. package/lib/classic/cjs/bet-pack.js +4 -4
  13. package/lib/classic/cjs/index.js +1 -1
  14. package/lib/classic/cjs/insight.js +1 -1
  15. package/lib/classic/cjs/notification.js +1 -1
  16. package/lib/classic/cjs/pause-ad.js +1 -1
  17. package/lib/classic/cjs/points.js +1 -1
  18. package/lib/classic/cjs/provider.js +10 -34
  19. package/lib/classic/cjs/useStreamLayerApp2.js +16 -17
  20. package/lib/classic/es/advertisement.js +2193 -2265
  21. package/lib/classic/es/bet-pack.js +14 -12
  22. package/lib/classic/es/index.js +16 -11
  23. package/lib/classic/es/insight.js +35 -30
  24. package/lib/classic/es/notification.js +108 -103
  25. package/lib/classic/es/pause-ad.js +91 -87
  26. package/lib/classic/es/points.js +28 -23
  27. package/lib/classic/es/provider.js +4285 -10085
  28. package/lib/classic/es/useStreamLayerApp.js +1 -1
  29. package/lib/classic/es/useStreamLayerApp2.js +3111 -5772
  30. package/lib/dist/cjs/gamification-feature2.js +1 -1
  31. package/lib/dist/cjs/index.js +1 -1
  32. package/lib/dist/cjs/masters.js +35 -60
  33. package/lib/dist/es/gamification-feature2.js +112 -105
  34. package/lib/dist/es/index.js +12 -7
  35. package/lib/dist/es/masters.js +9909 -18734
  36. package/lib/dist/style.css +1 -1
  37. package/lib/es/advertisement.js +2193 -2265
  38. package/lib/es/index.js +16 -11
  39. package/lib/es/index2.js +12 -10
  40. package/lib/es/insight.js +35 -30
  41. package/lib/es/masters2.js +28 -25
  42. package/lib/es/notification.js +135 -130
  43. package/lib/es/pause-ad.js +91 -87
  44. package/lib/es/points.js +28 -23
  45. package/lib/es/provider.js +4302 -10466
  46. package/lib/es/useStreamLayerApp.js +1 -1
  47. package/lib/es/useStreamLayerApp2.js +3111 -5772
  48. package/lib/style.css +1 -1
  49. package/package.json +15 -15
@@ -1,20 +1,25 @@
1
- import { jsx as n, jsxs as I } from "react/jsx-runtime";
2
- import { c as K, i as V, s as p, e as x, f as F, j as M, a as _, u as j, b as q, h as z } from "./provider.js";
3
- import { useRef as L, useCallback as C, useState as R, useEffect as b, Component as G } from "react";
1
+ import { jsx as o, jsxs as I } from "react/jsx-runtime";
2
+ import { j as K, k as V, s as p, i as L, l as F, n as M, e as _, u as $, d as j, h as q } from "./provider.js";
3
+ import "nanostores";
4
+ import { useRef as x, useCallback as k, useState as C, useEffect as b, Component as z } from "react";
5
+ import "@nanostores/react";
6
+ import "lodash.throttle";
7
+ import "react-dom";
8
+ import "react-countup";
4
9
  import { c as N } from "./vast-client.min-B0NUra1B.js";
5
- const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Promise((e, a) => {
10
+ const G = {}, H = new N(), w = V(G), E = K("ui:gam-static"), R = (r) => new Promise((e, n) => {
6
11
  const s = new Image();
7
- s.onload = () => e(r), s.onerror = () => a(), s.src = r;
12
+ s.onload = () => e(r), s.onerror = () => n(), s.src = r;
8
13
  }), D = () => {
9
- const r = L(0);
10
- return [C(async (e) => {
11
- var a, s, c, o, l, t, u, i, f, m, h;
12
- if ((a = w.get()[e]) != null && a.imageSrc)
14
+ const r = x(0);
15
+ return [k(async (e) => {
16
+ var n, s, c, a, l, t, u, i, h, m, f;
17
+ if ((n = w.get()[e]) != null && n.imageSrc)
13
18
  return { success: !0 };
14
19
  const v = Date.now();
15
20
  r.current = v, w.setKey(e, { url: e });
16
21
  try {
17
- const d = await O.get(e);
22
+ const d = await H.get(e);
18
23
  if (E.debug(d, "parsedVAST"), r.current === v && w.get()[e].url) {
19
24
  const y = d.ads.find((g) => g.creatives.length > 0);
20
25
  if (y) {
@@ -22,15 +27,15 @@ const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Prom
22
27
  const g = y.creatives.find((S) => S.type === "nonlinear");
23
28
  if (g) {
24
29
  E.debug(g, "nonlinear");
25
- const S = (c = (s = g.variations) == null ? void 0 : s[0]) == null ? void 0 : c.staticResource, B = (l = (o = g.variations) == null ? void 0 : o[0]) == null ? void 0 : l.nonlinearClickThroughURLTemplate;
30
+ const S = (c = (s = g.variations) == null ? void 0 : s[0]) == null ? void 0 : c.staticResource, B = (l = (a = g.variations) == null ? void 0 : a[0]) == null ? void 0 : l.nonlinearClickThroughURLTemplate;
26
31
  if (S)
27
- return await U(S), w.setKey(e, { url: e, imageSrc: S, adUrl: B }), { success: !0 };
32
+ return await R(S), w.setKey(e, { url: e, imageSrc: S, adUrl: B }), { success: !0 };
28
33
  }
29
34
  const A = y.creatives.find((S) => S.type === "companion");
30
35
  E.debug(A, "companion");
31
- const T = (f = (i = (u = (t = A == null ? void 0 : A.variations) == null ? void 0 : t[0]) == null ? void 0 : u.staticResources) == null ? void 0 : i[0]) == null ? void 0 : f.url, P = (h = (m = A == null ? void 0 : A.variations) == null ? void 0 : m[0]) == null ? void 0 : h.companionClickThroughURLTemplate;
36
+ const T = (h = (i = (u = (t = A == null ? void 0 : A.variations) == null ? void 0 : t[0]) == null ? void 0 : u.staticResources) == null ? void 0 : i[0]) == null ? void 0 : h.url, P = (f = (m = A == null ? void 0 : A.variations) == null ? void 0 : m[0]) == null ? void 0 : f.companionClickThroughURLTemplate;
32
37
  if (T)
33
- return await U(T), w.setKey(e, { url: e, imageSrc: T, adUrl: P }), { success: !0 };
38
+ return await R(T), w.setKey(e, { url: e, imageSrc: T, adUrl: P }), { success: !0 };
34
39
  }
35
40
  }
36
41
  } catch (d) {
@@ -38,59 +43,59 @@ const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Prom
38
43
  }
39
44
  return { success: !1 };
40
45
  }, []), w];
41
- }, J = /* @__PURE__ */ p("div")({
46
+ }, O = /* @__PURE__ */ p("div")({
42
47
  name: "PauseAdOverlay",
43
48
  class: "pw9gih8",
44
49
  propsAsIs: !1
45
- }), Q = /* @__PURE__ */ p("div")({
50
+ }), J = /* @__PURE__ */ p("div")({
46
51
  name: "PauseAdContent",
47
52
  class: "p8lpomy",
48
53
  propsAsIs: !1
49
- }), W = /* @__PURE__ */ p("div")({
50
- name: "PauseAdGradientLeft",
54
+ }), Q = /* @__PURE__ */ p("div")({
55
+ name: "PauseAdGradientRight",
51
56
  class: "pv7u167",
52
57
  propsAsIs: !1
53
- }), X = /* @__PURE__ */ p("div")({
54
- name: "PauseAdGradientRight",
58
+ }), W = /* @__PURE__ */ p("div")({
59
+ name: "PauseAdGradientBottom",
55
60
  class: "p1kh2yb0",
56
61
  propsAsIs: !1
57
- }), Y = /* @__PURE__ */ p("div")({
58
- name: "PauseAdGradientBottom",
62
+ }), X = /* @__PURE__ */ p("div")({
63
+ name: "PauseAdTopLeft",
59
64
  class: "pl8f94x",
60
65
  propsAsIs: !1
61
- }), Z = /* @__PURE__ */ p("div")({
62
- name: "PauseAdTopLeft",
66
+ }), Y = /* @__PURE__ */ p("h2")({
67
+ name: "PauseAdTitle",
63
68
  class: "p1m6zmrt",
64
69
  propsAsIs: !1
65
- }), $ = /* @__PURE__ */ p("h2")({
66
- name: "PauseAdTitle",
70
+ }), Z = /* @__PURE__ */ p("p")({
71
+ name: "PauseAdCaption",
67
72
  class: "pm3vwfa",
68
73
  propsAsIs: !1
69
- }), ee = /* @__PURE__ */ p("p")({
70
- name: "PauseAdCaption",
74
+ }), ee = /* @__PURE__ */ p("div")({
75
+ name: "PauseAdBottomLeft",
71
76
  class: "p1tibuhw",
72
77
  propsAsIs: !1
73
- }), re = /* @__PURE__ */ p("div")({
74
- name: "PauseAdBottomLeft",
78
+ }), re = /* @__PURE__ */ p("button")({
79
+ name: "PauseAdPlayButton",
75
80
  class: "ptqqrqd",
76
81
  propsAsIs: !1
77
- }), se = /* @__PURE__ */ p("button")({
78
- name: "PauseAdPlayButton",
82
+ }), se = /* @__PURE__ */ p("div")({
83
+ name: "PauseAdSidebar",
79
84
  class: "p14estxv",
80
85
  propsAsIs: !1
81
- }), te = /* @__PURE__ */ p("div")({
82
- name: "PauseAdSidebar",
86
+ }), te = /* @__PURE__ */ p("span")({
87
+ name: "PauseAdTitleDescription",
83
88
  class: "p1dpvfl1",
84
89
  propsAsIs: !1
85
- }), k = /* @__PURE__ */ p("img")({
90
+ }), U = /* @__PURE__ */ p("img")({
86
91
  name: "ExternalAdContainer",
87
92
  class: "ezfmabr",
88
93
  propsAsIs: !1
89
94
  }), ne = ({ vastUrl: r }) => {
90
95
  var e;
91
- const [, a] = D(), s = _(a, { keys: [r] });
92
- return (e = s == null ? void 0 : s[r]) != null && e.imageSrc ? s[r].adUrl ? /* @__PURE__ */ n("a", { href: s[r].adUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ n(k, { src: s[r].imageSrc }) }) : /* @__PURE__ */ n(k, { src: s[r].imageSrc }) : null;
93
- }, ae = ({ isClosing: r, title: e, caption: a, onPlay: s, onClose: c, vastUrl: o, options: l }) => {
96
+ const [, n] = D(), s = _(n, { keys: [r] });
97
+ return (e = s == null ? void 0 : s[r]) != null && e.imageSrc ? s[r].adUrl ? /* @__PURE__ */ o("a", { href: s[r].adUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ o(U, { src: s[r].imageSrc }) }) : /* @__PURE__ */ o(U, { src: s[r].imageSrc }) : null;
98
+ }, oe = ({ isClosing: r, title: e, caption: n, onPlay: s, onClose: c, vastUrl: a, options: l }) => {
94
99
  const t = (l == null ? void 0 : l.showPauseButton) ?? !0, { ref: u, focusSelf: i } = F.useFocusable({
95
100
  focusKey: "sl-pause-ad-play",
96
101
  onEnterRelease: s,
@@ -100,24 +105,23 @@ const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Prom
100
105
  return b(() => {
101
106
  u.current && i();
102
107
  }, [u, i]), b(() => {
103
- const f = (m) => {
104
- const h = m.keyCode;
105
- if (h === 461 || h === 10009 || h === 27) {
108
+ const h = (m) => {
109
+ const f = m.keyCode;
110
+ if (f === 461 || f === 10009 || f === 27 || f === 8) {
106
111
  m.preventDefault(), m.stopPropagation(), m.stopImmediatePropagation(), c == null || c();
107
112
  return;
108
113
  }
109
114
  };
110
- return window.addEventListener("keydown", f, { capture: !0 }), () => window.removeEventListener("keydown", f, { capture: !0 });
111
- }, [c]), /* @__PURE__ */ n(J, { className: M(r && "pause-ad-closing"), children: /* @__PURE__ */ I(Q, { children: [
112
- /* @__PURE__ */ n(W, {}),
113
- /* @__PURE__ */ n(X, {}),
114
- /* @__PURE__ */ n(Y, {}),
115
- /* @__PURE__ */ I(Z, { children: [
116
- /* @__PURE__ */ n($, { children: e }),
117
- /* @__PURE__ */ n(ee, { children: a })
115
+ return window.addEventListener("keydown", h, { capture: !0 }), () => window.removeEventListener("keydown", h, { capture: !0 });
116
+ }, [c]), /* @__PURE__ */ o(O, { className: M(r && "pause-ad-closing"), children: /* @__PURE__ */ I(J, { children: [
117
+ /* @__PURE__ */ o(Q, {}),
118
+ /* @__PURE__ */ o(W, {}),
119
+ /* @__PURE__ */ I(X, { children: [
120
+ /* @__PURE__ */ o(Y, { children: e }),
121
+ /* @__PURE__ */ o(Z, { children: n })
118
122
  ] }),
119
- t && /* @__PURE__ */ n(re, { children: /* @__PURE__ */ n(
120
- se,
123
+ t && /* @__PURE__ */ o(ee, { children: /* @__PURE__ */ o(
124
+ re,
121
125
  {
122
126
  ref: u,
123
127
  onClick: s,
@@ -125,37 +129,37 @@ const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Prom
125
129
  "aria-label": "Resume playback"
126
130
  }
127
131
  ) }),
128
- /* @__PURE__ */ I(te, { children: [
129
- o && /* @__PURE__ */ n(ne, { vastUrl: o }),
130
- /* @__PURE__ */ n("span", { children: "ADVERTISEMENT" })
132
+ /* @__PURE__ */ I(se, { children: [
133
+ a && /* @__PURE__ */ o(ne, { vastUrl: a }),
134
+ /* @__PURE__ */ o(te, { children: "ADVERTISEMENT" })
131
135
  ] })
132
136
  ] }) });
133
- }, oe = ({
137
+ }, ae = ({
134
138
  showPauseAd: r,
135
139
  vastUrls: e,
136
- title: a,
140
+ title: n,
137
141
  caption: s,
138
142
  onPlay: c,
139
- onClose: o,
143
+ onClose: a,
140
144
  onRender: l,
141
145
  options: t
142
146
  }) => {
143
- const u = (t == null ? void 0 : t.pauseAdDelay) ?? 5e3, [i, f] = R(!1), [m, h] = R(!1), v = L(), d = e == null ? void 0 : e[0].url, y = L(d);
147
+ const u = (t == null ? void 0 : t.pauseAdDelay) ?? 5e3, [i, h] = C(!1), [m, f] = C(!1), v = x(), d = e == null ? void 0 : e[0].url, y = x(d);
144
148
  y.current = d;
145
149
  const [g, A] = D();
146
150
  return b(() => {
147
151
  if (r && d) {
148
- x.emit("exposedPauseAd", {
152
+ L.emit("exposedPauseAd", {
149
153
  action: "enabled",
150
154
  payload: {}
151
155
  }), g(d).then((P) => {
152
- y.current === d && (P == null ? void 0 : P.success) !== !0 && (clearTimeout(v.current), o == null || o());
156
+ y.current === d && (P == null ? void 0 : P.success) !== !0 && (clearTimeout(v.current), a == null || a());
153
157
  }).catch(() => {
154
- y.current === d && (clearTimeout(v.current), o == null || o());
158
+ y.current === d && (clearTimeout(v.current), a == null || a());
155
159
  });
156
160
  const T = () => {
157
161
  var P;
158
- (P = A.get()[y.current]) != null && P.imageSrc ? (clearTimeout(v.current), h(!1), f(!0), x.emit("exposedPauseAd", {
162
+ (P = A.get()[y.current]) != null && P.imageSrc ? (clearTimeout(v.current), f(!1), h(!0), L.emit("exposedPauseAd", {
159
163
  action: "rendered",
160
164
  payload: {}
161
165
  })) : v.current = setTimeout(() => {
@@ -166,25 +170,25 @@ const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Prom
166
170
  T();
167
171
  }, u);
168
172
  } else
169
- x.emit("exposedPauseAd", {
173
+ L.emit("exposedPauseAd", {
170
174
  action: "disabled",
171
175
  payload: {}
172
- }), h(!0), v.current = setTimeout(() => {
173
- f(!1);
176
+ }), f(!0), v.current = setTimeout(() => {
177
+ h(!1);
174
178
  }, 400);
175
179
  return () => {
176
180
  v.current && clearTimeout(v.current);
177
181
  };
178
- }, [A, g, o, u, r, d]), b(() => {
182
+ }, [A, g, a, u, r, d]), b(() => {
179
183
  l == null || l({ rendered: i });
180
184
  }, [i, l]), b(() => () => {
181
185
  l == null || l({ rendered: !1 });
182
- }, [l]), i ? /* @__PURE__ */ n(
183
- ae,
186
+ }, [l]), i ? /* @__PURE__ */ o(
187
+ oe,
184
188
  {
185
- onClose: o,
189
+ onClose: a,
186
190
  isClosing: m,
187
- title: a,
191
+ title: n,
188
192
  caption: s,
189
193
  onPlay: c,
190
194
  vastUrl: d,
@@ -194,34 +198,34 @@ const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Prom
194
198
  }, le = ({
195
199
  showPauseAd: r,
196
200
  pauseAdVastUrl: e,
197
- videoPlayerController: a,
201
+ videoPlayerController: n,
198
202
  onRenderPauseAd: s,
199
203
  onClosePauseAd: c,
200
- children: o,
204
+ children: a,
201
205
  options: l
202
206
  }) => {
203
- const t = j(), u = q(), i = L(), f = C(() => {
207
+ const t = $(), u = j(), i = x(), h = k(() => {
204
208
  c == null || c();
205
- }, [c]), m = C(() => {
209
+ }, [c]), m = k(() => {
206
210
  t == null || t.controlVideoPlayer({ play: !0 });
207
211
  }, [t]);
208
- return b(() => t ? (a && (i.current = a, t.addVideoPlayerController(i.current)), () => {
212
+ return b(() => t ? (n && (i.current = n, t.addVideoPlayerController(i.current)), () => {
209
213
  i.current && t.removeVideoPlayerController(i.current);
210
214
  }) : () => {
211
- }, [t, a]), t ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ I(
212
- z,
215
+ }, [t, n]), t ? /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ I(
216
+ q,
213
217
  {
214
218
  style: { position: "relative" },
215
219
  customTheme: u.theme,
216
220
  themeMode: u.themeMode,
217
221
  children: [
218
- o,
219
- e && /* @__PURE__ */ n(
220
- oe,
222
+ a,
223
+ e && /* @__PURE__ */ o(
224
+ ae,
221
225
  {
222
226
  showPauseAd: r,
223
227
  vastUrls: e,
224
- onClose: f,
228
+ onClose: h,
225
229
  onRender: s,
226
230
  onPlay: m,
227
231
  options: l
@@ -229,22 +233,22 @@ const H = {}, O = new N(), w = V(H), E = K("ui:gam-static"), U = (r) => new Prom
229
233
  )
230
234
  ]
231
235
  }
232
- ) }) : o;
236
+ ) }) : a;
233
237
  };
234
- class pe extends G {
238
+ class ye extends z {
235
239
  constructor(e) {
236
240
  super(e), this.state = { hasError: !1 };
237
241
  }
238
242
  static getDerivedStateFromError() {
239
243
  return { hasError: !0 };
240
244
  }
241
- componentDidCatch(e, a) {
242
- console.error(e, a.componentStack);
245
+ componentDidCatch(e, n) {
246
+ console.error(e, n.componentStack);
243
247
  }
244
248
  render() {
245
- return this.state.hasError ? this.props.children : /* @__PURE__ */ n(le, { ...this.props });
249
+ return this.state.hasError ? this.props.children : /* @__PURE__ */ o(le, { ...this.props });
246
250
  }
247
251
  }
248
252
  export {
249
- pe as StreamLayerPauseAd
253
+ ye as StreamLayerPauseAd
250
254
  };
@@ -1,16 +1,21 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as u, useEffect as d } from "react";
3
- import { s as a, B as y, m as h, d as S, a as f, F as p, e as r, u as v, b as g, h as b } from "./provider.js";
4
- import { S as k } from "./useStreamLayerApp2.js";
5
- const A = /* @__PURE__ */ a("div")({
3
+ import "@nanostores/react";
4
+ import "nanostores";
5
+ import { s as a, B as y, m as h, f as S, e as f, F as c, i as r, u as v, d as g, h as k } from "./provider.js";
6
+ import "lodash.throttle";
7
+ import "react-dom";
8
+ import "react-countup";
9
+ import { S as A } from "./useStreamLayerApp2.js";
10
+ const I = /* @__PURE__ */ a("div")({
6
11
  name: "PointsContainer",
7
12
  class: "psiob9b",
8
13
  propsAsIs: !1
9
- }), I = /* @__PURE__ */ a("div")({
14
+ }), P = /* @__PURE__ */ a("div")({
10
15
  name: "PointsIcon",
11
16
  class: "p1gqe4lh",
12
17
  propsAsIs: !1
13
- }), P = () => y, T = /* @__PURE__ */ a(P())({
18
+ }), b = () => y, T = /* @__PURE__ */ a(b())({
14
19
  name: "PointsSvg",
15
20
  class: "p15syg2y",
16
21
  propsAsIs: !0
@@ -26,31 +31,31 @@ const A = /* @__PURE__ */ a("div")({
26
31
  name: "PointsValue",
27
32
  class: "prj9b3v",
28
33
  propsAsIs: !1
29
- }), B = ({ points: s, onClick: e }) => /* @__PURE__ */ l(A, { className: h, onClick: e, children: [
30
- /* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(T, { name: "icon-trophy-solid" }) }),
31
- /* @__PURE__ */ l(F, { children: [
34
+ }), B = ({ points: s, onClick: e }) => /* @__PURE__ */ m(I, { className: h, onClick: e, children: [
35
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(T, { name: "icon-trophy-solid" }) }),
36
+ /* @__PURE__ */ m(F, { children: [
32
37
  /* @__PURE__ */ t(L, { children: "Total points" }),
33
38
  /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(S, { value: s }) })
34
39
  ] })
35
40
  ] }), C = ({ gamification: s }) => {
36
- const e = s.userSummary.$store, [n, m] = u(0);
41
+ const e = s.userSummary.$store, [o, l] = u(0);
37
42
  return d(() => {
38
- const o = e.subscribe((i) => {
39
- var c;
40
- (c = i == null ? void 0 : i.summary) != null && c.points && m(i.summary.points);
43
+ const n = e.subscribe((i) => {
44
+ var p;
45
+ (p = i == null ? void 0 : i.summary) != null && p.points && l(i.summary.points);
41
46
  });
42
47
  return () => {
43
- o();
48
+ n();
44
49
  };
45
- }, [e]), /* @__PURE__ */ t(B, { points: n, onClick: () => {
46
- const o = s.status.get();
47
- o === p.Suspended ? (s.openFeature(), r.emit("app", {
50
+ }, [e]), /* @__PURE__ */ t(B, { points: o, onClick: () => {
51
+ const n = s.status.get();
52
+ n === c.Suspended ? (s.openFeature(), r.emit("app", {
48
53
  action: "open",
49
54
  payload: {}
50
55
  }), r.emit("interactions", {
51
56
  action: "tap",
52
57
  payload: {}
53
- })) : o === p.Ready && (s.closeFeature(!1), r.emit("app", {
58
+ })) : n === c.Ready && (s.closeFeature(!1), r.emit("app", {
54
59
  action: "close",
55
60
  payload: {}
56
61
  }), r.emit("interactions", {
@@ -61,12 +66,12 @@ const A = /* @__PURE__ */ a("div")({
61
66
  }, j = ({ sdk: s }) => {
62
67
  if (!f(s.featuresList.getStore()))
63
68
  return null;
64
- const e = s.getFeature(k.GAMES);
69
+ const e = s.getFeature(A.GAMES);
65
70
  return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
66
- }, K = ({ theme: s }) => {
67
- const e = v(), n = g();
68
- return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(b, { customTheme: s ?? n.theme, themeMode: n.themeMode, children: /* @__PURE__ */ t(j, { sdk: e }) }) }) : null;
71
+ }, V = ({ theme: s }) => {
72
+ const e = v(), o = g();
73
+ return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(k, { customTheme: s ?? o.theme, themeMode: o.themeMode, children: /* @__PURE__ */ t(j, { sdk: e }) }) }) : null;
69
74
  };
70
75
  export {
71
- K as StreamLayerSDKPoints
76
+ V as StreamLayerSDKPoints
72
77
  };