@streamlayer/react 1.24.8-pre.11da316 → 1.24.8-pre.a96f156
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/app/advertisement.d.ts +0 -1
- package/lib/app/pause-ad.d.ts +17 -0
- package/lib/cjs/advertisement.js +657 -657
- package/lib/cjs/auth.js +68 -68
- package/lib/cjs/bet-pack.js +76 -76
- package/lib/cjs/index.js +174 -174
- package/lib/cjs/insight.js +90 -90
- package/lib/cjs/masters.js +155 -155
- package/lib/cjs/notification.js +92 -92
- package/lib/cjs/pause-ad.js +572 -341
- package/lib/cjs/points.js +73 -73
- package/lib/cjs/polymarket.js +77 -77
- package/lib/cjs/style.css +1 -1
- package/lib/cjs/useStreamLayerApp.js +111 -111
- package/lib/dist/cjs/index.js +155 -155
- package/lib/dist/es/index.js +155 -155
- package/lib/es/advertisement.js +4863 -4820
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/{hooks-42q2i9Iw.js → hooks-DHRXtbBc.js} +22 -22
- package/lib/es/{index-sWgEw6jy.js → index-B_CIB4_F.js} +35 -35
- package/lib/es/index.js +1 -1
- package/lib/es/index16.js +1 -1
- package/lib/es/index2.js +2 -2
- package/lib/es/insight.js +1 -1
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +1 -1
- package/lib/es/notification.js +1 -1
- package/lib/es/pause-ad.js +362 -152
- package/lib/es/points.js +1 -1
- package/lib/es/polymarket.js +1 -1
- package/lib/es/style.css +1 -1
- package/lib/es/useStreamLayerApp2.js +1345 -1337
- package/lib/source.css +1 -1
- package/package.json +3 -3
package/lib/es/pause-ad.js
CHANGED
|
@@ -1,232 +1,442 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { h as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { s as
|
|
5
|
-
import { e as
|
|
6
|
-
import { d as
|
|
7
|
-
import { w as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as m, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { h as z } from "./index7.js";
|
|
3
|
+
import { useEffect as I, useState as B, useRef as T, useMemo as J, useCallback as O, Component as Z } from "react";
|
|
4
|
+
import { s as _, u as N, c as V } from "./feature.js";
|
|
5
|
+
import { e as L } from "./index3.js";
|
|
6
|
+
import { d as Q } from "./index15.js";
|
|
7
|
+
import { w as X, q as Y } from "./hooks-DHRXtbBc.js";
|
|
8
|
+
const $ = /* @__PURE__ */ _("div")({
|
|
9
9
|
name: "PauseAdOverlay",
|
|
10
10
|
class: "pw9gih8",
|
|
11
11
|
propsAsIs: !1
|
|
12
|
-
}),
|
|
12
|
+
}), ee = /* @__PURE__ */ _("div")({
|
|
13
13
|
name: "PauseAdContent",
|
|
14
14
|
class: "p8lpomy",
|
|
15
15
|
propsAsIs: !1
|
|
16
|
-
}),
|
|
16
|
+
}), te = /* @__PURE__ */ _("div")({
|
|
17
17
|
name: "PauseAdBottomLeft",
|
|
18
18
|
class: "pv7u167",
|
|
19
19
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
20
|
+
}), re = /* @__PURE__ */ _("button")({
|
|
21
21
|
name: "PauseAdPlayButton",
|
|
22
22
|
class: "p1kh2yb0",
|
|
23
23
|
propsAsIs: !1
|
|
24
|
-
}),
|
|
24
|
+
}), ae = /* @__PURE__ */ _("div")({
|
|
25
25
|
name: "PauseAdSidebarGradient",
|
|
26
26
|
class: "pl8f94x",
|
|
27
27
|
propsAsIs: !1
|
|
28
|
-
}),
|
|
28
|
+
}), se = /* @__PURE__ */ _("div")({
|
|
29
29
|
name: "PauseAdSidebar",
|
|
30
30
|
class: "p1m6zmrt",
|
|
31
31
|
propsAsIs: !1
|
|
32
|
-
}),
|
|
32
|
+
}), K = /* @__PURE__ */ _("img")({
|
|
33
33
|
name: "ExternalAdContainer",
|
|
34
34
|
class: "em3vwfa",
|
|
35
35
|
propsAsIs: !1
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
|
|
36
|
+
}), ne = /* @__PURE__ */ _("iframe")({
|
|
37
|
+
name: "GptAdIframe",
|
|
38
|
+
class: "g1tibuhw",
|
|
39
|
+
propsAsIs: !1
|
|
40
|
+
}), de = ({
|
|
41
|
+
vastUrl: s,
|
|
42
|
+
isDesktop: h,
|
|
43
|
+
content: r
|
|
44
|
+
}) => (I(() => {
|
|
45
|
+
r.imageSrc && r.id && L.emit("exposedPauseAd", {
|
|
42
46
|
action: "rendered",
|
|
43
47
|
payload: {
|
|
44
|
-
id:
|
|
45
|
-
parentId:
|
|
48
|
+
id: r.id,
|
|
49
|
+
parentId: r.parentId
|
|
46
50
|
}
|
|
47
51
|
});
|
|
48
|
-
}, [
|
|
52
|
+
}, [r, s]), r?.imageSrc ? !r.adUrl || !h ? /* @__PURE__ */ m(K, { src: r.imageSrc }) : /* @__PURE__ */ m(
|
|
49
53
|
"a",
|
|
50
54
|
{
|
|
51
55
|
onClick: () => {
|
|
52
|
-
|
|
56
|
+
L.emit("exposedPauseAd", {
|
|
53
57
|
action: "navigated",
|
|
54
58
|
payload: {
|
|
55
|
-
id:
|
|
56
|
-
parentId:
|
|
59
|
+
id: r.id,
|
|
60
|
+
parentId: r.parentId
|
|
57
61
|
}
|
|
58
62
|
});
|
|
59
63
|
},
|
|
60
|
-
href:
|
|
64
|
+
href: r.adUrl,
|
|
61
65
|
target: "_blank",
|
|
62
66
|
rel: "noopener noreferrer",
|
|
63
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ m(K, { src: r.imageSrc })
|
|
64
68
|
}
|
|
65
|
-
) : null),
|
|
66
|
-
|
|
69
|
+
) : null), oe = ({
|
|
70
|
+
vastUrl: s,
|
|
71
|
+
sdk: h,
|
|
72
|
+
onLoaded: r,
|
|
73
|
+
product: o,
|
|
74
|
+
platform: P,
|
|
75
|
+
platformtype: f,
|
|
76
|
+
pagetype: y,
|
|
77
|
+
content: w,
|
|
78
|
+
adWidth: k,
|
|
79
|
+
adHeight: d,
|
|
80
|
+
rdid: b,
|
|
81
|
+
idtype: i,
|
|
82
|
+
npa: C,
|
|
83
|
+
isLat: G,
|
|
84
|
+
targeting: U,
|
|
85
|
+
containerRef: D
|
|
86
|
+
}) => {
|
|
87
|
+
const { production: E } = N(h.options), l = N(h.deviceId), [W, n] = B(!1), [g, a] = B({ width: 0, height: 0 }), [c, R] = B({ width: 0, height: 0 }), S = T(null), u = J(() => {
|
|
88
|
+
const e = new URLSearchParams();
|
|
89
|
+
return o && e.set("product", o), P && e.set("platform", P), f && e.set("platformtype", f), y && e.set("pagetype", y), w && e.set("content", w), k && e.set("width", k.toString()), d && e.set("height", d.toString()), C != null && e.set("npa", C.toString()), G != null && e.set("is_lat", G.toString()), U && e.set("targeting", new URLSearchParams(U).toString()), l && (e.set("rdid", l), e.set("idtype", "uuid")), b && e.set("rdid", b), i && e.set("idtype", i), s.startsWith("http") ? e.set("url", s) : e.set("slot", s), `https://${E ? "bell-ad.streamlayer.io" : "bell-ad-test.streamlayer.io"}?${e.toString()}`;
|
|
90
|
+
}, [
|
|
91
|
+
s,
|
|
92
|
+
o,
|
|
93
|
+
P,
|
|
94
|
+
f,
|
|
95
|
+
y,
|
|
96
|
+
w,
|
|
97
|
+
k,
|
|
98
|
+
d,
|
|
99
|
+
C,
|
|
100
|
+
G,
|
|
101
|
+
b,
|
|
102
|
+
i,
|
|
103
|
+
U,
|
|
104
|
+
l,
|
|
105
|
+
E
|
|
106
|
+
]);
|
|
107
|
+
I(() => {
|
|
108
|
+
u && (L.emit("exposedPauseAd", {
|
|
109
|
+
action: "load",
|
|
110
|
+
payload: {}
|
|
111
|
+
}), n(!1));
|
|
112
|
+
}, [u]), I(() => {
|
|
113
|
+
const e = D.current;
|
|
114
|
+
if (!e) return;
|
|
115
|
+
const t = new ResizeObserver(([x]) => {
|
|
116
|
+
const { width: A, height: j } = x.contentRect;
|
|
117
|
+
a({ width: Math.round(A), height: Math.round(j) });
|
|
118
|
+
});
|
|
119
|
+
return t.observe(e), () => t.disconnect();
|
|
120
|
+
}, [D]), I(() => {
|
|
121
|
+
const e = (t) => {
|
|
122
|
+
const x = E ? "https://bell-ad.streamlayer.io" : "https://bell-ad-test.streamlayer.io";
|
|
123
|
+
t.origin === x && t.data.id === "slGptAdCb" && (S.current && t.source !== S.current.contentWindow || (t.data?.type === "slGptAdLoaded" && (n(!0), r?.({
|
|
124
|
+
id: t.data.creativeId,
|
|
125
|
+
parentId: t.data.advertiserId,
|
|
126
|
+
width: t.data.width,
|
|
127
|
+
height: t.data.height
|
|
128
|
+
}), R({ width: t.data.width, height: t.data.height }), L.emit("exposedPauseAd", {
|
|
129
|
+
action: "rendered",
|
|
130
|
+
payload: {
|
|
131
|
+
id: t.data.creativeId,
|
|
132
|
+
parentId: t.data.advertiserId
|
|
133
|
+
}
|
|
134
|
+
})), t.data?.type === "slGptAdReady" && L.emit("exposedPauseAd", {
|
|
135
|
+
action: "loaded",
|
|
136
|
+
payload: {
|
|
137
|
+
id: t.data.creativeId,
|
|
138
|
+
parentId: t.data.advertiserId
|
|
139
|
+
}
|
|
140
|
+
})));
|
|
141
|
+
};
|
|
142
|
+
return S.current?.setAttribute("allowtransparency", "true"), window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
143
|
+
}, [r, E]);
|
|
144
|
+
const p = c.width > 0 && c.height > 0 ? Math.min(g.width / c.width, g.height / c.height) : 1;
|
|
145
|
+
return /* @__PURE__ */ m("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ m(
|
|
146
|
+
ne,
|
|
147
|
+
{
|
|
148
|
+
ref: S,
|
|
149
|
+
src: u,
|
|
150
|
+
scrolling: "no",
|
|
151
|
+
allow: "attribution-reporting",
|
|
152
|
+
style: {
|
|
153
|
+
opacity: W ? 1 : 0,
|
|
154
|
+
width: c.width,
|
|
155
|
+
height: c.height,
|
|
156
|
+
transformOrigin: "0 0",
|
|
157
|
+
transform: `scale(${p})`
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
) });
|
|
161
|
+
}, ie = ({
|
|
162
|
+
sdk: s,
|
|
163
|
+
isClosing: h,
|
|
164
|
+
adContent: r,
|
|
165
|
+
externalPauseAdStore: o,
|
|
166
|
+
onPlay: P,
|
|
167
|
+
onClose: f,
|
|
168
|
+
onGptAdLoaded: y,
|
|
169
|
+
vastUrl: w,
|
|
170
|
+
product: k,
|
|
171
|
+
platform: d,
|
|
172
|
+
platformtype: b,
|
|
173
|
+
pagetype: i,
|
|
174
|
+
content: C,
|
|
175
|
+
adWidth: G,
|
|
176
|
+
adHeight: U,
|
|
177
|
+
npa: D,
|
|
178
|
+
isLat: E,
|
|
179
|
+
targeting: l,
|
|
180
|
+
options: W,
|
|
181
|
+
isDesktop: n,
|
|
182
|
+
isGptAd: g,
|
|
183
|
+
rdid: a,
|
|
184
|
+
idtype: c,
|
|
185
|
+
gptAdLoaded: R
|
|
186
|
+
}) => {
|
|
187
|
+
const S = W?.showPauseButton ?? !0, u = T(null), { ref: p, focusSelf: e } = Q.useFocusable({
|
|
67
188
|
focusKey: "sl-pause-ad-play",
|
|
68
|
-
onEnterRelease:
|
|
189
|
+
onEnterRelease: P,
|
|
69
190
|
isFocusBoundary: !0,
|
|
70
191
|
forceFocus: !0
|
|
71
192
|
});
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
if (!
|
|
193
|
+
return I(() => () => {
|
|
194
|
+
o.revalidate();
|
|
195
|
+
}, [o]), I(() => {
|
|
196
|
+
p.current && e();
|
|
197
|
+
}, [p, e]), I(() => {
|
|
198
|
+
if (!f)
|
|
78
199
|
return () => {
|
|
79
200
|
};
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
|
|
201
|
+
const t = (x) => {
|
|
202
|
+
const A = x.keyCode;
|
|
203
|
+
if (A === 461 || A === 10009 || A === 27 || A === 8) {
|
|
204
|
+
x.preventDefault(), x.stopPropagation(), x.stopImmediatePropagation(), f();
|
|
84
205
|
return;
|
|
85
206
|
}
|
|
86
207
|
};
|
|
87
|
-
return window.addEventListener("keydown",
|
|
88
|
-
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
208
|
+
return window.addEventListener("keydown", t, { capture: !0 }), () => window.removeEventListener("keydown", t, { capture: !0 });
|
|
209
|
+
}, [f]), /* @__PURE__ */ m(
|
|
210
|
+
$,
|
|
211
|
+
{
|
|
212
|
+
className: V("SL_PauseAd", h && "pause-ad-closing", g && !R && "pause-ad-preloading"),
|
|
213
|
+
children: /* @__PURE__ */ F(ee, { children: [
|
|
214
|
+
S && /* @__PURE__ */ m(te, { children: /* @__PURE__ */ m(
|
|
215
|
+
re,
|
|
216
|
+
{
|
|
217
|
+
ref: p,
|
|
218
|
+
onClick: P,
|
|
219
|
+
onMouseEnter: () => p.current.focus(),
|
|
220
|
+
"aria-label": "Resume playback"
|
|
221
|
+
}
|
|
222
|
+
) }),
|
|
223
|
+
/* @__PURE__ */ m(ae, { className: V("SL_PauseAdSidebar", n && "SL_PauseAdSidebar--desktop"), children: /* @__PURE__ */ F(se, { ref: u, className: V(n && "SL_PauseAdSidebar__content--desktop"), children: [
|
|
224
|
+
g && w && /* @__PURE__ */ m(
|
|
225
|
+
oe,
|
|
226
|
+
{
|
|
227
|
+
vastUrl: w,
|
|
228
|
+
isDesktop: n,
|
|
229
|
+
product: k,
|
|
230
|
+
platform: d,
|
|
231
|
+
platformtype: b,
|
|
232
|
+
pagetype: i,
|
|
233
|
+
content: C,
|
|
234
|
+
adWidth: G,
|
|
235
|
+
adHeight: U,
|
|
236
|
+
npa: D,
|
|
237
|
+
isLat: E,
|
|
238
|
+
rdid: a,
|
|
239
|
+
idtype: c,
|
|
240
|
+
targeting: l,
|
|
241
|
+
containerRef: u,
|
|
242
|
+
onLoaded: y,
|
|
243
|
+
sdk: s
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
!g && w && r && /* @__PURE__ */ m(de, { content: r, isDesktop: n, vastUrl: w })
|
|
247
|
+
] }) })
|
|
248
|
+
] })
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
}, le = (s) => {
|
|
252
|
+
if (!s) return !1;
|
|
253
|
+
try {
|
|
254
|
+
return s.startsWith("http") ? new URL(s).searchParams.get("output") === "ldjh" : !0;
|
|
255
|
+
} catch {
|
|
256
|
+
return !1;
|
|
257
|
+
}
|
|
258
|
+
}, ce = ({ showPauseAd: s, externalUrls: h, vastUrls: r, sdk: o, onClose: P, onRender: f, options: y, isDesktop: w }) => {
|
|
259
|
+
const k = h ?? r, d = y?.pauseAdDelay ?? 0, b = y?.pauseAdRefetchInterval ?? 1e3 * 60 * 50, [i, C] = B(!1), [G, U] = B(!1), [D, E] = B(!1), l = T(), W = T(), n = k?.[0], g = n?.url, a = le(g), c = T(g), R = T(""), S = T(""), u = T(null);
|
|
260
|
+
c.current = g;
|
|
261
|
+
const [p, e] = o.advertisement.getExternalPauseAd(a ? "" : g, {
|
|
262
|
+
refetchInterval: b,
|
|
263
|
+
$enabled: !a && (d === 0 || !!s),
|
|
264
|
+
prefetch: !a && d === 0 && b > 0
|
|
265
|
+
}), t = N(p), x = O((v) => {
|
|
266
|
+
u.current = { id: v.id, parentId: v.parentId }, E(!0);
|
|
267
|
+
}, []), A = O(() => {
|
|
268
|
+
if (P) {
|
|
269
|
+
if (S.current = c.current, a)
|
|
270
|
+
L.emit("exposedPauseAd", {
|
|
271
|
+
action: "closed",
|
|
272
|
+
payload: u.current ? {
|
|
273
|
+
id: u.current.id,
|
|
274
|
+
parentId: u.current.parentId
|
|
275
|
+
} : {}
|
|
276
|
+
});
|
|
277
|
+
else {
|
|
278
|
+
const v = p.get().data;
|
|
279
|
+
L.emit("exposedPauseAd", {
|
|
280
|
+
action: "closed",
|
|
281
|
+
payload: v?.url === S.current ? {
|
|
282
|
+
id: v?.id,
|
|
283
|
+
parentId: v?.parentId
|
|
284
|
+
} : {}
|
|
285
|
+
});
|
|
96
286
|
}
|
|
97
|
-
|
|
98
|
-
/* @__PURE__ */ a(J, { className: D("SL_PauseAdSidebar", r && "SL_PauseAdSidebar--desktop"), children: /* @__PURE__ */ a(Q, { className: D(r && "SL_PauseAdSidebar__content--desktop"), children: c && /* @__PURE__ */ a(W, { content: n, isDesktop: r, vastUrl: c }) }) })
|
|
99
|
-
] }) });
|
|
100
|
-
}, Y = ({ showPauseAd: d, vastUrls: n, sdk: e, onClose: l, onRender: u, options: c, isDesktop: v }) => {
|
|
101
|
-
const r = c?.pauseAdDelay ?? 0, m = c?.pauseAdRefetchInterval ?? 1e3 * 60 * 50, [t, y] = _(!1), [b, f] = _(!1), s = g(), P = n?.[0].url, A = g(P), S = g(""), I = g("");
|
|
102
|
-
A.current = P;
|
|
103
|
-
const [p, L] = e.advertisement.getExternalPauseAd(P, {
|
|
104
|
-
refetchInterval: m,
|
|
105
|
-
$enabled: r === 0 || !!d,
|
|
106
|
-
prefetch: r === 0 && m > 0
|
|
107
|
-
}), x = j(p), C = R(() => {
|
|
108
|
-
if (l) {
|
|
109
|
-
I.current = A.current;
|
|
110
|
-
const o = p.get().data;
|
|
111
|
-
k.emit("exposedPauseAd", {
|
|
112
|
-
action: "closed",
|
|
113
|
-
payload: o?.url === I.current ? {
|
|
114
|
-
id: o?.id,
|
|
115
|
-
parentId: o?.parentId
|
|
116
|
-
} : {}
|
|
117
|
-
}), l();
|
|
287
|
+
P();
|
|
118
288
|
}
|
|
119
|
-
}, [
|
|
120
|
-
|
|
121
|
-
}, [
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}, [
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
289
|
+
}, [P, p, a]), j = O(() => {
|
|
290
|
+
o.controlVideoPlayer({ play: !0 });
|
|
291
|
+
}, [o]);
|
|
292
|
+
I(() => {
|
|
293
|
+
!a && e === c.current && t.error && (clearTimeout(l.current), A?.());
|
|
294
|
+
}, [t, a, A, e]), I(() => {
|
|
295
|
+
if (s && g) {
|
|
296
|
+
if (R.current = c.current, S.current = "", a)
|
|
297
|
+
u.current = null, E(!1), L.emit("exposedPauseAd", {
|
|
298
|
+
action: "enabled",
|
|
299
|
+
payload: {}
|
|
300
|
+
});
|
|
301
|
+
else {
|
|
302
|
+
const M = p.get().data;
|
|
303
|
+
L.emit("exposedPauseAd", {
|
|
304
|
+
action: "enabled",
|
|
305
|
+
payload: M?.url === R.current ? {
|
|
306
|
+
id: M?.id,
|
|
307
|
+
parentId: M?.parentId
|
|
308
|
+
} : {}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
const v = () => {
|
|
312
|
+
if (a) {
|
|
313
|
+
clearTimeout(l.current), U(!1), C(!0);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
const M = p.get(), H = M.data;
|
|
317
|
+
(!H || H?.url === c.current) && (!M.loading && H?.imageSrc ? (clearTimeout(l.current), U(!1), C(!0)) : M.loading && (l.current = setTimeout(() => {
|
|
318
|
+
v();
|
|
139
319
|
}, 200)));
|
|
140
320
|
};
|
|
141
|
-
clearTimeout(
|
|
142
|
-
|
|
143
|
-
},
|
|
321
|
+
clearTimeout(l.current), l.current = setTimeout(() => {
|
|
322
|
+
v();
|
|
323
|
+
}, d);
|
|
144
324
|
} else {
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
325
|
+
if (S.current !== c.current && (S.current = "", R.current !== "")) {
|
|
326
|
+
if (a)
|
|
327
|
+
L.emit("exposedPauseAd", {
|
|
328
|
+
action: "disabled",
|
|
329
|
+
payload: u.current ? {
|
|
330
|
+
id: u.current.id,
|
|
331
|
+
parentId: u.current.parentId
|
|
332
|
+
} : {}
|
|
333
|
+
});
|
|
334
|
+
else {
|
|
335
|
+
const v = p.get().data;
|
|
336
|
+
L.emit("exposedPauseAd", {
|
|
337
|
+
action: "disabled",
|
|
338
|
+
payload: R.current === v?.url ? {
|
|
339
|
+
id: v?.id,
|
|
340
|
+
parentId: v?.parentId
|
|
341
|
+
} : {}
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
R.current = "";
|
|
154
345
|
}
|
|
155
|
-
|
|
156
|
-
|
|
346
|
+
U(!0), l.current = setTimeout(() => {
|
|
347
|
+
C(!1);
|
|
157
348
|
}, 400);
|
|
158
349
|
}
|
|
159
350
|
return () => {
|
|
160
|
-
|
|
351
|
+
l.current && clearTimeout(l.current);
|
|
161
352
|
};
|
|
162
|
-
}, [p,
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
353
|
+
}, [p, a, A, d, s, g]), I(() => (i && a && !D ? W.current = setTimeout(() => {
|
|
354
|
+
A?.();
|
|
355
|
+
}, 1e4) : clearTimeout(W.current), () => clearTimeout(W.current)), [i, a, D, A]);
|
|
356
|
+
const q = i && (!a || D);
|
|
357
|
+
return I(() => {
|
|
358
|
+
f?.({ rendered: q });
|
|
359
|
+
}, [q, f]), I(() => () => {
|
|
360
|
+
f?.({ rendered: !1 });
|
|
361
|
+
}, [f]), !i || !a && !t.data ? null : /* @__PURE__ */ m(
|
|
362
|
+
ie,
|
|
168
363
|
{
|
|
169
|
-
onClose:
|
|
170
|
-
isClosing:
|
|
171
|
-
onPlay:
|
|
172
|
-
vastUrl:
|
|
173
|
-
|
|
174
|
-
|
|
364
|
+
onClose: A,
|
|
365
|
+
isClosing: G,
|
|
366
|
+
onPlay: j,
|
|
367
|
+
vastUrl: g,
|
|
368
|
+
product: n?.product,
|
|
369
|
+
platform: n?.platform,
|
|
370
|
+
platformtype: n?.platformtype,
|
|
371
|
+
pagetype: n?.pagetype,
|
|
372
|
+
content: n?.content,
|
|
373
|
+
adWidth: n?.adWidth,
|
|
374
|
+
adHeight: n?.adHeight,
|
|
375
|
+
npa: n?.npa,
|
|
376
|
+
isLat: n?.is_lat,
|
|
377
|
+
targeting: n?.targeting,
|
|
378
|
+
options: y,
|
|
379
|
+
isDesktop: w,
|
|
380
|
+
isGptAd: a,
|
|
381
|
+
gptAdLoaded: D,
|
|
382
|
+
onGptAdLoaded: x,
|
|
175
383
|
externalPauseAdStore: p,
|
|
176
|
-
|
|
384
|
+
adContent: t.data,
|
|
385
|
+
sdk: o
|
|
177
386
|
}
|
|
178
387
|
);
|
|
179
|
-
},
|
|
180
|
-
showPauseAd:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
388
|
+
}, ue = ({
|
|
389
|
+
showPauseAd: s,
|
|
390
|
+
pauseAdExternalUrls: h,
|
|
391
|
+
pauseAdVastUrl: r,
|
|
392
|
+
videoPlayerController: o,
|
|
393
|
+
onRenderPauseAd: P,
|
|
394
|
+
onClosePauseAd: f,
|
|
395
|
+
children: y,
|
|
396
|
+
options: w
|
|
187
397
|
}) => {
|
|
188
|
-
const r =
|
|
189
|
-
return
|
|
190
|
-
|
|
398
|
+
const k = h ?? r, d = X(), b = Y(), i = T();
|
|
399
|
+
return I(() => d ? (o && (i.current = o, d.addVideoPlayerController(i.current)), () => {
|
|
400
|
+
i.current && d.removeVideoPlayerController(i.current);
|
|
191
401
|
}) : () => {
|
|
192
|
-
}, [
|
|
193
|
-
|
|
402
|
+
}, [d, o]), d ? /* @__PURE__ */ m("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ F(
|
|
403
|
+
z,
|
|
194
404
|
{
|
|
195
|
-
style:
|
|
196
|
-
customTheme:
|
|
197
|
-
themeMode:
|
|
405
|
+
style: y ? { position: "relative" } : {},
|
|
406
|
+
customTheme: b.theme,
|
|
407
|
+
themeMode: b.themeMode,
|
|
198
408
|
children: [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
409
|
+
y,
|
|
410
|
+
k && /* @__PURE__ */ m(
|
|
411
|
+
ce,
|
|
202
412
|
{
|
|
203
|
-
sdk:
|
|
204
|
-
showPauseAd:
|
|
205
|
-
|
|
206
|
-
onClose:
|
|
207
|
-
onRender:
|
|
208
|
-
options:
|
|
413
|
+
sdk: d,
|
|
414
|
+
showPauseAd: s,
|
|
415
|
+
externalUrls: k,
|
|
416
|
+
onClose: f,
|
|
417
|
+
onRender: P,
|
|
418
|
+
options: w,
|
|
209
419
|
isDesktop: !0
|
|
210
420
|
}
|
|
211
421
|
)
|
|
212
422
|
]
|
|
213
423
|
}
|
|
214
|
-
) }) :
|
|
424
|
+
) }) : y;
|
|
215
425
|
};
|
|
216
|
-
class
|
|
217
|
-
constructor(
|
|
218
|
-
super(
|
|
426
|
+
class ve extends Z {
|
|
427
|
+
constructor(h) {
|
|
428
|
+
super(h), this.state = { hasError: !1 };
|
|
219
429
|
}
|
|
220
430
|
static getDerivedStateFromError() {
|
|
221
431
|
return { hasError: !0 };
|
|
222
432
|
}
|
|
223
|
-
componentDidCatch(
|
|
224
|
-
console.error(
|
|
433
|
+
componentDidCatch(h, r) {
|
|
434
|
+
console.error(h, r.componentStack);
|
|
225
435
|
}
|
|
226
436
|
render() {
|
|
227
|
-
return this.state.hasError ? this.props.children : /* @__PURE__ */
|
|
437
|
+
return this.state.hasError ? this.props.children : /* @__PURE__ */ m(ue, { ...this.props });
|
|
228
438
|
}
|
|
229
439
|
}
|
|
230
440
|
export {
|
|
231
|
-
|
|
441
|
+
ve as StreamLayerPauseAd
|
|
232
442
|
};
|
package/lib/es/points.js
CHANGED
|
@@ -7,7 +7,7 @@ import { p as h } from "./index11.js";
|
|
|
7
7
|
import { m as y } from "./theme.js";
|
|
8
8
|
import { M as S } from "./index5.js";
|
|
9
9
|
import { S as v } from "./useStreamLayerApp2.js";
|
|
10
|
-
import { w as g, q as A } from "./hooks-
|
|
10
|
+
import { w as g, q as A } from "./hooks-DHRXtbBc.js";
|
|
11
11
|
const I = /* @__PURE__ */ o("div")({
|
|
12
12
|
name: "PointsContainer",
|
|
13
13
|
class: "psiob9b",
|
package/lib/es/polymarket.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as K, jsx as E } from "react/jsx-runtime";
|
|
2
2
|
import { h as fs } from "./index7.js";
|
|
3
3
|
import { s as k, u as js, c as Vs } from "./feature.js";
|
|
4
|
-
import { z as ds, w as ms, q as ps } from "./hooks-
|
|
4
|
+
import { z as ds, w as ms, q as ps } from "./hooks-DHRXtbBc.js";
|
|
5
5
|
import { useRef as Ds, useEffect as Ks } from "react";
|
|
6
6
|
import "./index6.js";
|
|
7
7
|
function _(h) {
|