@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.
- package/lib/cjs/advertisement.js +29 -29
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index2.js +4 -4
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters2.js +7 -7
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +15 -39
- package/lib/cjs/useStreamLayerApp2.js +16 -17
- package/lib/classic/cjs/advertisement.js +29 -29
- package/lib/classic/cjs/bet-pack.js +4 -4
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +10 -34
- package/lib/classic/cjs/useStreamLayerApp2.js +16 -17
- package/lib/classic/es/advertisement.js +2193 -2265
- package/lib/classic/es/bet-pack.js +14 -12
- package/lib/classic/es/index.js +16 -11
- package/lib/classic/es/insight.js +35 -30
- package/lib/classic/es/notification.js +108 -103
- package/lib/classic/es/pause-ad.js +91 -87
- package/lib/classic/es/points.js +28 -23
- package/lib/classic/es/provider.js +4285 -10085
- package/lib/classic/es/useStreamLayerApp.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +3111 -5772
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +35 -60
- package/lib/dist/es/gamification-feature2.js +112 -105
- package/lib/dist/es/index.js +12 -7
- package/lib/dist/es/masters.js +9909 -18734
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +2193 -2265
- package/lib/es/index.js +16 -11
- package/lib/es/index2.js +12 -10
- package/lib/es/insight.js +35 -30
- package/lib/es/masters2.js +28 -25
- package/lib/es/notification.js +135 -130
- package/lib/es/pause-ad.js +91 -87
- package/lib/es/points.js +28 -23
- package/lib/es/provider.js +4302 -10466
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +3111 -5772
- package/lib/style.css +1 -1
- package/package.json +15 -15
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
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
|
|
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 = () =>
|
|
12
|
+
s.onload = () => e(r), s.onerror = () => n(), s.src = r;
|
|
8
13
|
}), D = () => {
|
|
9
|
-
const r =
|
|
10
|
-
return [
|
|
11
|
-
var
|
|
12
|
-
if ((
|
|
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
|
|
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 = (
|
|
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
|
|
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 = (
|
|
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
|
|
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
|
-
},
|
|
46
|
+
}, O = /* @__PURE__ */ p("div")({
|
|
42
47
|
name: "PauseAdOverlay",
|
|
43
48
|
class: "pw9gih8",
|
|
44
49
|
propsAsIs: !1
|
|
45
|
-
}),
|
|
50
|
+
}), J = /* @__PURE__ */ p("div")({
|
|
46
51
|
name: "PauseAdContent",
|
|
47
52
|
class: "p8lpomy",
|
|
48
53
|
propsAsIs: !1
|
|
49
|
-
}),
|
|
50
|
-
name: "
|
|
54
|
+
}), Q = /* @__PURE__ */ p("div")({
|
|
55
|
+
name: "PauseAdGradientRight",
|
|
51
56
|
class: "pv7u167",
|
|
52
57
|
propsAsIs: !1
|
|
53
|
-
}),
|
|
54
|
-
name: "
|
|
58
|
+
}), W = /* @__PURE__ */ p("div")({
|
|
59
|
+
name: "PauseAdGradientBottom",
|
|
55
60
|
class: "p1kh2yb0",
|
|
56
61
|
propsAsIs: !1
|
|
57
|
-
}),
|
|
58
|
-
name: "
|
|
62
|
+
}), X = /* @__PURE__ */ p("div")({
|
|
63
|
+
name: "PauseAdTopLeft",
|
|
59
64
|
class: "pl8f94x",
|
|
60
65
|
propsAsIs: !1
|
|
61
|
-
}),
|
|
62
|
-
name: "
|
|
66
|
+
}), Y = /* @__PURE__ */ p("h2")({
|
|
67
|
+
name: "PauseAdTitle",
|
|
63
68
|
class: "p1m6zmrt",
|
|
64
69
|
propsAsIs: !1
|
|
65
|
-
}),
|
|
66
|
-
name: "
|
|
70
|
+
}), Z = /* @__PURE__ */ p("p")({
|
|
71
|
+
name: "PauseAdCaption",
|
|
67
72
|
class: "pm3vwfa",
|
|
68
73
|
propsAsIs: !1
|
|
69
|
-
}), ee = /* @__PURE__ */ p("
|
|
70
|
-
name: "
|
|
74
|
+
}), ee = /* @__PURE__ */ p("div")({
|
|
75
|
+
name: "PauseAdBottomLeft",
|
|
71
76
|
class: "p1tibuhw",
|
|
72
77
|
propsAsIs: !1
|
|
73
|
-
}), re = /* @__PURE__ */ p("
|
|
74
|
-
name: "
|
|
78
|
+
}), re = /* @__PURE__ */ p("button")({
|
|
79
|
+
name: "PauseAdPlayButton",
|
|
75
80
|
class: "ptqqrqd",
|
|
76
81
|
propsAsIs: !1
|
|
77
|
-
}), se = /* @__PURE__ */ p("
|
|
78
|
-
name: "
|
|
82
|
+
}), se = /* @__PURE__ */ p("div")({
|
|
83
|
+
name: "PauseAdSidebar",
|
|
79
84
|
class: "p14estxv",
|
|
80
85
|
propsAsIs: !1
|
|
81
|
-
}), te = /* @__PURE__ */ p("
|
|
82
|
-
name: "
|
|
86
|
+
}), te = /* @__PURE__ */ p("span")({
|
|
87
|
+
name: "PauseAdTitleDescription",
|
|
83
88
|
class: "p1dpvfl1",
|
|
84
89
|
propsAsIs: !1
|
|
85
|
-
}),
|
|
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 [,
|
|
92
|
-
return (e = s == null ? void 0 : s[r]) != null && e.imageSrc ? s[r].adUrl ? /* @__PURE__ */
|
|
93
|
-
},
|
|
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
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
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",
|
|
111
|
-
}, [c]), /* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
116
|
-
/* @__PURE__ */
|
|
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__ */
|
|
120
|
-
|
|
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(
|
|
129
|
-
|
|
130
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ I(se, { children: [
|
|
133
|
+
a && /* @__PURE__ */ o(ne, { vastUrl: a }),
|
|
134
|
+
/* @__PURE__ */ o(te, { children: "ADVERTISEMENT" })
|
|
131
135
|
] })
|
|
132
136
|
] }) });
|
|
133
|
-
},
|
|
137
|
+
}, ae = ({
|
|
134
138
|
showPauseAd: r,
|
|
135
139
|
vastUrls: e,
|
|
136
|
-
title:
|
|
140
|
+
title: n,
|
|
137
141
|
caption: s,
|
|
138
142
|
onPlay: c,
|
|
139
|
-
onClose:
|
|
143
|
+
onClose: a,
|
|
140
144
|
onRender: l,
|
|
141
145
|
options: t
|
|
142
146
|
}) => {
|
|
143
|
-
const u = (t == null ? void 0 : t.pauseAdDelay) ?? 5e3, [i,
|
|
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
|
-
|
|
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),
|
|
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),
|
|
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),
|
|
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
|
-
|
|
173
|
+
L.emit("exposedPauseAd", {
|
|
170
174
|
action: "disabled",
|
|
171
175
|
payload: {}
|
|
172
|
-
}),
|
|
173
|
-
|
|
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,
|
|
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__ */
|
|
183
|
-
|
|
186
|
+
}, [l]), i ? /* @__PURE__ */ o(
|
|
187
|
+
oe,
|
|
184
188
|
{
|
|
185
|
-
onClose:
|
|
189
|
+
onClose: a,
|
|
186
190
|
isClosing: m,
|
|
187
|
-
title:
|
|
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:
|
|
201
|
+
videoPlayerController: n,
|
|
198
202
|
onRenderPauseAd: s,
|
|
199
203
|
onClosePauseAd: c,
|
|
200
|
-
children:
|
|
204
|
+
children: a,
|
|
201
205
|
options: l
|
|
202
206
|
}) => {
|
|
203
|
-
const t =
|
|
207
|
+
const t = $(), u = j(), i = x(), h = k(() => {
|
|
204
208
|
c == null || c();
|
|
205
|
-
}, [c]), m =
|
|
209
|
+
}, [c]), m = k(() => {
|
|
206
210
|
t == null || t.controlVideoPlayer({ play: !0 });
|
|
207
211
|
}, [t]);
|
|
208
|
-
return b(() => t ? (
|
|
212
|
+
return b(() => t ? (n && (i.current = n, t.addVideoPlayerController(i.current)), () => {
|
|
209
213
|
i.current && t.removeVideoPlayerController(i.current);
|
|
210
214
|
}) : () => {
|
|
211
|
-
}, [t,
|
|
212
|
-
|
|
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
|
-
|
|
219
|
-
e && /* @__PURE__ */
|
|
220
|
-
|
|
222
|
+
a,
|
|
223
|
+
e && /* @__PURE__ */ o(
|
|
224
|
+
ae,
|
|
221
225
|
{
|
|
222
226
|
showPauseAd: r,
|
|
223
227
|
vastUrls: e,
|
|
224
|
-
onClose:
|
|
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
|
-
) }) :
|
|
236
|
+
) }) : a;
|
|
233
237
|
};
|
|
234
|
-
class
|
|
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,
|
|
242
|
-
console.error(e,
|
|
245
|
+
componentDidCatch(e, n) {
|
|
246
|
+
console.error(e, n.componentStack);
|
|
243
247
|
}
|
|
244
248
|
render() {
|
|
245
|
-
return this.state.hasError ? this.props.children : /* @__PURE__ */
|
|
249
|
+
return this.state.hasError ? this.props.children : /* @__PURE__ */ o(le, { ...this.props });
|
|
246
250
|
}
|
|
247
251
|
}
|
|
248
252
|
export {
|
|
249
|
-
|
|
253
|
+
ye as StreamLayerPauseAd
|
|
250
254
|
};
|
package/lib/classic/es/points.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
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
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
-
}),
|
|
14
|
+
}), P = /* @__PURE__ */ a("div")({
|
|
10
15
|
name: "PointsIcon",
|
|
11
16
|
class: "p1gqe4lh",
|
|
12
17
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
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__ */
|
|
30
|
-
/* @__PURE__ */ t(
|
|
31
|
-
/* @__PURE__ */
|
|
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, [
|
|
41
|
+
const e = s.userSummary.$store, [o, l] = u(0);
|
|
37
42
|
return d(() => {
|
|
38
|
-
const
|
|
39
|
-
var
|
|
40
|
-
(
|
|
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
|
-
|
|
48
|
+
n();
|
|
44
49
|
};
|
|
45
|
-
}, [e]), /* @__PURE__ */ t(B, { points:
|
|
46
|
-
const
|
|
47
|
-
|
|
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
|
-
})) :
|
|
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(
|
|
69
|
+
const e = s.getFeature(A.GAMES);
|
|
65
70
|
return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
|
|
66
|
-
},
|
|
67
|
-
const e = v(),
|
|
68
|
-
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(
|
|
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
|
-
|
|
76
|
+
V as StreamLayerSDKPoints
|
|
72
77
|
};
|