@streamlayer/react 1.3.1 → 1.3.3
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 +1 -0
- package/lib/app/provider.d.ts +14 -2
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/masters2.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +10 -10
- package/lib/cjs/useStreamLayerApp2.js +9 -9
- package/lib/dist/cjs/masters.js +44 -44
- package/lib/dist/es/masters.js +3962 -3958
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +257 -161
- package/lib/es/index2.js +108 -108
- package/lib/es/masters2.js +1 -1
- package/lib/es/points.js +6 -6
- package/lib/es/provider.js +674 -669
- package/lib/es/useStreamLayerApp2.js +1397 -1396
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -13
package/lib/es/advertisement.js
CHANGED
|
@@ -1,337 +1,433 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import {
|
|
4
|
-
import { F as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as Q, useRef as J, useMemo as V } from "react";
|
|
3
|
+
import { c as f, s as n, a as K, Q as X, e as $, u as N, L as Y } from "./provider.js";
|
|
4
|
+
import { F as Z, u as oo, d as eo } from "./index2.js";
|
|
5
|
+
import { N as h, a as no, b as so, P as g, c as I, S as io } from "./useStreamLayerApp2.js";
|
|
6
|
+
const ao = /* @__PURE__ */ n("div")({
|
|
7
7
|
name: "Container",
|
|
8
8
|
class: "c5b6wdg",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
11
|
-
children:
|
|
10
|
+
}), to = "a1rlj479", ro = "s35f1di", lo = "sj4471g", co = "b12050d8", mo = "b1d5ybek", po = (o) => o === "left" || o === "right" ? ro : co, uo = (o) => o === "left" || o === "right" ? lo : mo, vo = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", k = ({
|
|
11
|
+
children: o,
|
|
12
12
|
style: s,
|
|
13
13
|
className: r,
|
|
14
|
-
enabled:
|
|
15
|
-
hiding:
|
|
16
|
-
direction:
|
|
17
|
-
onAnimationEnd:
|
|
18
|
-
}) => /* @__PURE__ */
|
|
14
|
+
enabled: i = !0,
|
|
15
|
+
hiding: a,
|
|
16
|
+
direction: l = "left",
|
|
17
|
+
onAnimationEnd: t
|
|
18
|
+
}) => /* @__PURE__ */ e(ao, {
|
|
19
19
|
style: s,
|
|
20
|
-
className:
|
|
21
|
-
onAnimationEnd:
|
|
22
|
-
children:
|
|
23
|
-
}),
|
|
20
|
+
className: f(r, to, vo(l), i && !a && po(l), i && a && uo(l)),
|
|
21
|
+
onAnimationEnd: t,
|
|
22
|
+
children: o
|
|
23
|
+
}), go = /* @__PURE__ */ n("a")({
|
|
24
24
|
name: "Link",
|
|
25
25
|
class: "l1sgte8c",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}),
|
|
27
|
+
}), ho = /* @__PURE__ */ n("div")({
|
|
28
28
|
name: "BannerContainer",
|
|
29
29
|
class: "b7yfc72",
|
|
30
30
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
31
|
+
}), Io = () => go, bo = /* @__PURE__ */ n(Io())({
|
|
32
32
|
name: "BannerLink",
|
|
33
33
|
class: "bejjq94",
|
|
34
34
|
propsAsIs: !0
|
|
35
|
-
}),
|
|
35
|
+
}), Ao = /* @__PURE__ */ n("img")({
|
|
36
36
|
name: "BannerImg",
|
|
37
37
|
class: "b1j94hdr",
|
|
38
38
|
propsAsIs: !1
|
|
39
|
-
}),
|
|
40
|
-
var
|
|
41
|
-
return (
|
|
42
|
-
|
|
39
|
+
}), yo = ({ promotion: o, promotionId: s, hiding: r, direction: i = "bottom" }) => {
|
|
40
|
+
var a;
|
|
41
|
+
return (a = o.additionalBanner) != null && a.imageUrl ? /* @__PURE__ */ e(k, { direction: i, hiding: r, children: /* @__PURE__ */ e(ho, { className: "BannerContainer", children: /* @__PURE__ */ e(
|
|
42
|
+
bo,
|
|
43
43
|
{
|
|
44
44
|
className: "BannerLink",
|
|
45
|
-
href:
|
|
46
|
-
style: { backgroundImage: `url(${
|
|
45
|
+
href: o.additionalBanner.url,
|
|
46
|
+
style: { backgroundImage: `url(${o.additionalBanner.imageUrl})` },
|
|
47
47
|
"data-promo-id": s,
|
|
48
|
-
"data-promo-type":
|
|
48
|
+
"data-promo-type": o.type,
|
|
49
49
|
"data-analytics": "banner",
|
|
50
50
|
target: "_blank",
|
|
51
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ e(Ao, { src: o.additionalBanner.imageUrl, alt: "promo" })
|
|
52
52
|
}
|
|
53
53
|
) }) }) : null;
|
|
54
|
-
},
|
|
54
|
+
}, fo = /* @__PURE__ */ n("div")({
|
|
55
|
+
name: "NotificationContent",
|
|
56
|
+
class: "n1ku6hz",
|
|
57
|
+
propsAsIs: !1
|
|
58
|
+
}), $o = /* @__PURE__ */ n("div")({
|
|
59
|
+
name: "NotificationContainer",
|
|
60
|
+
class: "nbxqmol",
|
|
61
|
+
propsAsIs: !1
|
|
62
|
+
}), No = /* @__PURE__ */ n("div")({
|
|
63
|
+
name: "Body",
|
|
64
|
+
class: "b1gu3eml",
|
|
65
|
+
propsAsIs: !1
|
|
66
|
+
}), ko = /* @__PURE__ */ n("div")({
|
|
67
|
+
name: "Title",
|
|
68
|
+
class: "t1u17zva",
|
|
69
|
+
propsAsIs: !1
|
|
70
|
+
}), Co = /* @__PURE__ */ n("div")({
|
|
71
|
+
name: "Text",
|
|
72
|
+
class: "t10ko1g",
|
|
73
|
+
propsAsIs: !1
|
|
74
|
+
}), b = /* @__PURE__ */ n("div")({
|
|
75
|
+
name: "Media",
|
|
76
|
+
class: "mntc42e",
|
|
77
|
+
propsAsIs: !1
|
|
78
|
+
}), So = () => b, w = /* @__PURE__ */ n(So())({
|
|
79
|
+
name: "MediaImgFit",
|
|
80
|
+
class: "ml060eo",
|
|
81
|
+
propsAsIs: !0
|
|
82
|
+
}), Mo = () => b, W = /* @__PURE__ */ n(Mo())({
|
|
83
|
+
name: "MediaImgCentered",
|
|
84
|
+
class: "m1vqlvig",
|
|
85
|
+
propsAsIs: !0
|
|
86
|
+
}), To = () => W, Bo = /* @__PURE__ */ n(To())({
|
|
87
|
+
name: "MediaImgBottom",
|
|
88
|
+
class: "m1e7tvi5",
|
|
89
|
+
propsAsIs: !0
|
|
90
|
+
}), Eo = () => b, Lo = /* @__PURE__ */ n(Eo())({
|
|
91
|
+
name: "MediaImgSolid",
|
|
92
|
+
class: "mqvntt2",
|
|
93
|
+
propsAsIs: !0
|
|
94
|
+
}), xo = () => b, Oo = /* @__PURE__ */ n(xo())({
|
|
95
|
+
name: "MediaImgMiddle",
|
|
96
|
+
class: "m12jtj3u",
|
|
97
|
+
propsAsIs: !0
|
|
98
|
+
}), Po = /* @__PURE__ */ n("button")({
|
|
99
|
+
name: "Button",
|
|
100
|
+
class: "bkq1frv",
|
|
101
|
+
propsAsIs: !1
|
|
102
|
+
}), _o = () => K, jo = /* @__PURE__ */ n(_o())({
|
|
103
|
+
name: "StyledChevronRight",
|
|
104
|
+
class: "sis90pl",
|
|
105
|
+
propsAsIs: !0
|
|
106
|
+
}), Do = /* @__PURE__ */ n("div")({
|
|
107
|
+
name: "Logo",
|
|
108
|
+
class: "l9mjmz3",
|
|
109
|
+
propsAsIs: !1
|
|
110
|
+
}), Ro = {
|
|
111
|
+
[h.UNSET]: w,
|
|
112
|
+
[h.FIT]: w,
|
|
113
|
+
[h.CENTERED]: W,
|
|
114
|
+
[h.BOTTOM]: Bo,
|
|
115
|
+
[h.SOLID]: Lo,
|
|
116
|
+
[h.MIDDLE]: Oo
|
|
117
|
+
}, Fo = ({ src: o, imagePosition: s }) => {
|
|
118
|
+
const r = Ro[s];
|
|
119
|
+
return /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
|
|
120
|
+
}, qo = ({ notification: o, promotionId: s, hiding: r, direction: i = "left" }) => {
|
|
121
|
+
if (!o || !o.promotion || o.enabled !== no.NOTIFICATION_ENABLED)
|
|
122
|
+
return null;
|
|
123
|
+
const { title: a, body: l, image: t, promotion: p } = o, { sponsorLogo: u, sponsorLogoMode: v, imagePosition: m, ctaButton: d } = p;
|
|
124
|
+
return /* @__PURE__ */ e(k, { direction: i, hiding: r, children: /* @__PURE__ */ c($o, { children: [
|
|
125
|
+
v !== so.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(Do, { children: /* @__PURE__ */ e("img", { src: u, alt: a }) }),
|
|
126
|
+
/* @__PURE__ */ c(fo, { children: [
|
|
127
|
+
/* @__PURE__ */ e(Fo, { src: t, imagePosition: m }),
|
|
128
|
+
/* @__PURE__ */ c(No, { children: [
|
|
129
|
+
a && /* @__PURE__ */ e(ko, { children: a }),
|
|
130
|
+
l && /* @__PURE__ */ e(Co, { children: l })
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ e(Po, { name: "promo-button", style: { color: d == null ? void 0 : d.textColor, backgroundColor: d == null ? void 0 : d.color }, children: (d == null ? void 0 : d.label) || "Open" }),
|
|
133
|
+
/* @__PURE__ */ e(jo, { name: "chevronRight" })
|
|
134
|
+
] })
|
|
135
|
+
] }) });
|
|
136
|
+
}, Uo = /* @__PURE__ */ n("div")({
|
|
55
137
|
name: "OverlayContainer",
|
|
56
138
|
class: "okzhq2w",
|
|
57
139
|
propsAsIs: !1
|
|
58
|
-
}),
|
|
140
|
+
}), wo = /* @__PURE__ */ n("div")({
|
|
59
141
|
name: "PromoOverlay",
|
|
60
142
|
class: "pmgz5i",
|
|
61
143
|
propsAsIs: !1
|
|
62
|
-
}),
|
|
144
|
+
}), Go = /* @__PURE__ */ n("div")({
|
|
63
145
|
name: "Header",
|
|
64
146
|
class: "hyxi3jt",
|
|
65
147
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
148
|
+
}), zo = /* @__PURE__ */ n("div")({
|
|
67
149
|
name: "HeaderContent",
|
|
68
150
|
class: "h149e3gp",
|
|
69
151
|
propsAsIs: !1
|
|
70
|
-
}),
|
|
152
|
+
}), Ho = "h10toh7", G = /* @__PURE__ */ n("img")({
|
|
71
153
|
name: "SponsorLogo",
|
|
72
154
|
class: "s1jyea6t",
|
|
73
155
|
propsAsIs: !1
|
|
74
|
-
}),
|
|
156
|
+
}), Ko = /* @__PURE__ */ n("div")({
|
|
75
157
|
name: "SponsorName",
|
|
76
158
|
class: "szpfa3h",
|
|
77
159
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
160
|
+
}), Wo = /* @__PURE__ */ n("div")({
|
|
79
161
|
name: "Media",
|
|
80
162
|
class: "m1crmu01",
|
|
81
163
|
propsAsIs: !1
|
|
82
|
-
}),
|
|
164
|
+
}), Qo = /* @__PURE__ */ n("img")({
|
|
83
165
|
name: "PromoImg",
|
|
84
166
|
class: "p1l37r8s",
|
|
85
167
|
propsAsIs: !1
|
|
86
|
-
}),
|
|
168
|
+
}), Jo = "s1nmch9k", z = /* @__PURE__ */ n("div")({
|
|
87
169
|
name: "Content",
|
|
88
170
|
class: "c1er0ljd",
|
|
89
171
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
172
|
+
}), Vo = /* @__PURE__ */ n("div")({
|
|
91
173
|
name: "Description",
|
|
92
174
|
class: "dydopmr",
|
|
93
175
|
propsAsIs: !1
|
|
94
|
-
}),
|
|
176
|
+
}), Xo = /* @__PURE__ */ n("div")({
|
|
95
177
|
name: "Sponsor",
|
|
96
178
|
class: "s1w6nt04",
|
|
97
179
|
propsAsIs: !1
|
|
98
|
-
}),
|
|
180
|
+
}), Yo = /* @__PURE__ */ n("div")({
|
|
99
181
|
name: "SponsorText",
|
|
100
182
|
class: "s1evcmtq",
|
|
101
183
|
propsAsIs: !1
|
|
102
|
-
}),
|
|
184
|
+
}), Zo = /* @__PURE__ */ n("div")({
|
|
103
185
|
name: "ADLogo",
|
|
104
186
|
class: "awodx0x",
|
|
105
187
|
propsAsIs: !1
|
|
106
|
-
}),
|
|
188
|
+
}), oe = /* @__PURE__ */ n("span")({
|
|
107
189
|
name: "SponsoredText",
|
|
108
190
|
class: "s1q3n6oi",
|
|
109
191
|
propsAsIs: !1
|
|
110
|
-
}),
|
|
192
|
+
}), ee = /* @__PURE__ */ n("div")({
|
|
111
193
|
name: "CloseIconWrap",
|
|
112
194
|
class: "c8d4xfk",
|
|
113
195
|
propsAsIs: !1
|
|
114
|
-
}),
|
|
196
|
+
}), ne = () => K, se = /* @__PURE__ */ n(ne())({
|
|
115
197
|
name: "CloseIcon",
|
|
116
198
|
class: "ct6oobh",
|
|
117
199
|
propsAsIs: !0
|
|
118
|
-
}),
|
|
200
|
+
}), ie = /* @__PURE__ */ n("div")({
|
|
119
201
|
name: "ActionBtnWrap",
|
|
120
202
|
class: "a1gyg7tt",
|
|
121
203
|
propsAsIs: !1
|
|
122
|
-
}),
|
|
204
|
+
}), ae = /* @__PURE__ */ n("a")({
|
|
123
205
|
name: "ActionButton",
|
|
124
206
|
class: "a17rwbtk",
|
|
125
207
|
propsAsIs: !1
|
|
126
|
-
}),
|
|
208
|
+
}), te = /* @__PURE__ */ n("div")({
|
|
127
209
|
name: "Title",
|
|
128
210
|
class: "t3vxzaw",
|
|
129
211
|
propsAsIs: !1
|
|
130
|
-
}),
|
|
131
|
-
var
|
|
132
|
-
const
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
((
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
212
|
+
}), re = "h10f3u0j", H = ({ promotion: o, promotionId: s, onClose: r }) => {
|
|
213
|
+
var i, a, l, t, p, u, v, m, d, C, S, M, T, B, E, L, x, O, P, _, j, D, R, F, q, U;
|
|
214
|
+
const A = o.type === g.INGAME_IAB11_LBAR || o.type === g.INGAME_IAB11, y = ((i = o.sponsor) == null ? void 0 : i.logo) && o.logoMode === I.CENTER;
|
|
215
|
+
return /* @__PURE__ */ c(wo, { className: "PromoOverlay", children: [
|
|
216
|
+
/* @__PURE__ */ c(Go, { children: [
|
|
217
|
+
/* @__PURE__ */ c(zo, { className: f(!y && Ho), children: [
|
|
218
|
+
((a = o.sponsor) == null ? void 0 : a.logo) && o.logoMode === I.LEFT && /* @__PURE__ */ e(G, { src: (l = o.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
|
|
219
|
+
/* @__PURE__ */ c(
|
|
220
|
+
Xo,
|
|
139
221
|
{
|
|
140
222
|
style: {
|
|
141
|
-
paddingLeft: (
|
|
223
|
+
paddingLeft: (t = o.sponsor) != null && t.logo && o.logoMode === I.LEFT ? "0px" : "8px"
|
|
142
224
|
},
|
|
143
225
|
children: [
|
|
144
|
-
((p =
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
226
|
+
((p = o.sponsor) == null ? void 0 : p.logo) && o.logoMode === I.LEFT && /* @__PURE__ */ e(Ko, { children: (u = o.sponsor) == null ? void 0 : u.name }),
|
|
227
|
+
/* @__PURE__ */ c(Yo, { className: "SponsorText", children: [
|
|
228
|
+
/* @__PURE__ */ e(Zo, { children: "AD" }),
|
|
229
|
+
/* @__PURE__ */ e(oe, { children: "SPONSORED" })
|
|
148
230
|
] })
|
|
149
231
|
]
|
|
150
232
|
}
|
|
151
233
|
)
|
|
152
234
|
] }),
|
|
153
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ e(ee, { className: "ClosePromoIcon", onClick: r, children: /* @__PURE__ */ e(se, { name: "icon-cross" }) })
|
|
154
236
|
] }),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
|
|
237
|
+
/* @__PURE__ */ c(Wo, { children: [
|
|
238
|
+
y && /* @__PURE__ */ e(G, { className: Jo, src: (v = o.sponsor) == null ? void 0 : v.logo, alt: "promo" }),
|
|
239
|
+
/* @__PURE__ */ e(z, { children: (d = (m = o.banner) == null ? void 0 : m.video) != null && d.url ? /* @__PURE__ */ e(
|
|
240
|
+
X,
|
|
159
241
|
{
|
|
160
|
-
source: (
|
|
161
|
-
poster: (
|
|
162
|
-
aspectRatio:
|
|
242
|
+
source: (S = (C = o.banner) == null ? void 0 : C.video) == null ? void 0 : S.url,
|
|
243
|
+
poster: (T = (M = o.banner) == null ? void 0 : M.video) == null ? void 0 : T.thumbnailUrl,
|
|
244
|
+
aspectRatio: A ? "1/1" : "16/9",
|
|
163
245
|
onPlay: () => {
|
|
164
|
-
|
|
246
|
+
$.emit("advertisement", {
|
|
165
247
|
action: "videoPlay",
|
|
166
248
|
payload: {
|
|
167
249
|
advertisementId: s,
|
|
168
|
-
advertisementType:
|
|
250
|
+
advertisementType: o.type
|
|
169
251
|
}
|
|
170
252
|
});
|
|
171
253
|
}
|
|
172
254
|
}
|
|
173
|
-
) : (
|
|
174
|
-
!
|
|
175
|
-
((
|
|
176
|
-
((
|
|
255
|
+
) : (B = o.banner) != null && B.imageUrl ? /* @__PURE__ */ e(Qo, { style: A ? { aspectRatio: "1/1" } : {}, src: (E = o.banner) == null ? void 0 : E.imageUrl, alt: "promo" }) : null }),
|
|
256
|
+
!A && /* @__PURE__ */ c(z, { children: [
|
|
257
|
+
((L = o.banner) == null ? void 0 : L.title) && /* @__PURE__ */ e(te, { className: f("AdvTitle", y && re), children: (x = o.banner) == null ? void 0 : x.title }),
|
|
258
|
+
((O = o.banner) == null ? void 0 : O.body) && /* @__PURE__ */ e(Vo, { className: "AdvDescription", children: (P = o.banner) == null ? void 0 : P.body })
|
|
177
259
|
] })
|
|
178
260
|
] }),
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
|
|
261
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(
|
|
262
|
+
ae,
|
|
181
263
|
{
|
|
182
|
-
href: (
|
|
264
|
+
href: (_ = o.banner) == null ? void 0 : _.url,
|
|
183
265
|
style: {
|
|
184
|
-
backgroundColor: ((
|
|
185
|
-
color: ((
|
|
266
|
+
backgroundColor: ((D = (j = o.banner) == null ? void 0 : j.ctaButton) == null ? void 0 : D.color) || "#009dc4",
|
|
267
|
+
color: ((F = (R = o.banner) == null ? void 0 : R.ctaButton) == null ? void 0 : F.textColor) || "#fff"
|
|
186
268
|
},
|
|
187
269
|
"data-analytics": "button",
|
|
188
270
|
"data-promo-id": s,
|
|
189
|
-
"data-promo-type":
|
|
271
|
+
"data-promo-type": o.type,
|
|
190
272
|
target: "_blank",
|
|
191
|
-
children: (
|
|
273
|
+
children: (U = (q = o.banner) == null ? void 0 : q.ctaButton) == null ? void 0 : U.label
|
|
192
274
|
}
|
|
193
275
|
) })
|
|
194
276
|
] });
|
|
195
|
-
},
|
|
277
|
+
}, le = /* @__PURE__ */ n("div")({
|
|
196
278
|
name: "SidebarContainer",
|
|
197
279
|
class: "s1abskp8",
|
|
198
280
|
propsAsIs: !1
|
|
199
|
-
}),
|
|
200
|
-
children:
|
|
281
|
+
}), de = ({
|
|
282
|
+
children: o,
|
|
201
283
|
direction: s,
|
|
202
284
|
style: r,
|
|
203
|
-
className:
|
|
204
|
-
hiding:
|
|
205
|
-
}) => /* @__PURE__ */
|
|
285
|
+
className: i,
|
|
286
|
+
hiding: a
|
|
287
|
+
}) => /* @__PURE__ */ e(k, {
|
|
206
288
|
direction: s,
|
|
207
289
|
style: r,
|
|
208
|
-
hiding:
|
|
209
|
-
className:
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
-
children:
|
|
290
|
+
hiding: a,
|
|
291
|
+
className: i,
|
|
292
|
+
children: /* @__PURE__ */ e(le, {
|
|
293
|
+
children: o
|
|
212
294
|
})
|
|
213
|
-
}),
|
|
214
|
-
const
|
|
215
|
-
return !
|
|
295
|
+
}), ce = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === g.INGAME_IAB21_LBAR, me = (o) => (o == null ? void 0 : o.type) === g.INGAME_IAB11 || (o == null ? void 0 : o.type) === g.INGAME_IAB21, pe = ({ advertisement: o, skipTypeCheck: s, layoutMode: r = "side-by-side", sidebar: i, isNotification: a, banner: l }) => {
|
|
296
|
+
const t = N(o.data);
|
|
297
|
+
return !t.data && t.loading ? null : t.error ? /* @__PURE__ */ c("div", { children: [
|
|
216
298
|
"error ",
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
] }) :
|
|
299
|
+
/* @__PURE__ */ e("button", { onClick: o.close, children: "close" })
|
|
300
|
+
] }) : t.data ? a ? /* @__PURE__ */ e(qo, { notification: t.data.notification, promotionId: o.id }) : !i && !l && (s || me(t.data.promotions)) ? /* @__PURE__ */ e(Uo, { className: "PromoOverlayContainer", children: /* @__PURE__ */ e(H, { promotionId: o.id, promotion: t.data.promotions, onClose: o.close }) }) : i && (s || ce(t.data.promotions)) ? /* @__PURE__ */ e(de, { className: "PromoSidebarContainer", direction: i, hiding: o.hiding, children: /* @__PURE__ */ e(H, { promotionId: o.id, promotion: t.data.promotions, onClose: o.close }) }) : l ? /* @__PURE__ */ e(
|
|
301
|
+
yo,
|
|
302
|
+
{
|
|
303
|
+
promotionId: o.id,
|
|
304
|
+
hiding: o.hiding,
|
|
305
|
+
promotion: t.data.promotions,
|
|
306
|
+
direction: l
|
|
307
|
+
}
|
|
308
|
+
) : null : /* @__PURE__ */ c("div", { children: [
|
|
219
309
|
"empty promo ",
|
|
220
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ e("button", { onClick: o.close, children: "close" })
|
|
221
311
|
] });
|
|
222
|
-
},
|
|
312
|
+
}, ue = /* @__PURE__ */ n("div")({
|
|
223
313
|
name: "AdvertisementUIWrap",
|
|
224
314
|
class: "aa6pjif",
|
|
225
315
|
propsAsIs: !1
|
|
226
|
-
}),
|
|
227
|
-
const s =
|
|
316
|
+
}), ve = (o) => {
|
|
317
|
+
const s = o.target;
|
|
228
318
|
if (s instanceof HTMLAnchorElement && s.target === "_blank") {
|
|
229
|
-
const r = s.getAttribute("data-promo-id") || "",
|
|
230
|
-
s.getAttribute("data-analytics") === "button" &&
|
|
319
|
+
const r = s.getAttribute("data-promo-id") || "", i = s.getAttribute("data-promo-type") || g.UNSET;
|
|
320
|
+
s.getAttribute("data-analytics") === "button" && $.emit("advertisement", {
|
|
231
321
|
action: "buttonSelect",
|
|
232
322
|
payload: {
|
|
233
323
|
advertisementId: r,
|
|
234
|
-
advertisementType:
|
|
324
|
+
advertisementType: i
|
|
235
325
|
}
|
|
236
|
-
}), s.getAttribute("data-analytics") === "banner" &&
|
|
326
|
+
}), s.getAttribute("data-analytics") === "banner" && $.emit("advertisement", {
|
|
237
327
|
action: "bannerSelect",
|
|
238
328
|
payload: {
|
|
239
329
|
advertisementId: r,
|
|
240
|
-
advertisementType:
|
|
330
|
+
advertisementType: i
|
|
241
331
|
}
|
|
242
332
|
});
|
|
243
333
|
}
|
|
244
|
-
},
|
|
245
|
-
gamification:
|
|
334
|
+
}, ge = ({
|
|
335
|
+
gamification: o,
|
|
246
336
|
layoutMode: s,
|
|
247
337
|
skipTypeCheck: r,
|
|
248
|
-
sidebar:
|
|
249
|
-
banner:
|
|
250
|
-
|
|
251
|
-
|
|
338
|
+
sidebar: i,
|
|
339
|
+
banner: a,
|
|
340
|
+
notification: l,
|
|
341
|
+
isMobileScreen: t,
|
|
342
|
+
persistent: p
|
|
252
343
|
}) => {
|
|
253
|
-
const
|
|
254
|
-
() =>
|
|
344
|
+
const u = J(null), v = N(o.advertisement.$list), m = V(
|
|
345
|
+
() => o.advertisement.getActiveAdvertisement(p),
|
|
255
346
|
// fire getActiveNotification when notifications were updated
|
|
256
347
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
257
|
-
[
|
|
348
|
+
[v, p]
|
|
258
349
|
);
|
|
259
|
-
return
|
|
260
|
-
enabled: !!
|
|
350
|
+
return Y(u, {
|
|
351
|
+
enabled: !!m,
|
|
261
352
|
event: "click",
|
|
262
|
-
listener:
|
|
263
|
-
}),
|
|
264
|
-
ref:
|
|
353
|
+
listener: ve
|
|
354
|
+
}), m ? /* @__PURE__ */ e(ue, {
|
|
355
|
+
ref: u,
|
|
265
356
|
style: {
|
|
266
|
-
height: !
|
|
357
|
+
height: !a && !i ? "auto" : "100%"
|
|
267
358
|
},
|
|
268
|
-
className:
|
|
269
|
-
children: /* @__PURE__ */
|
|
359
|
+
className: t ? "mobile-view" : "",
|
|
360
|
+
children: /* @__PURE__ */ e(pe, {
|
|
270
361
|
skipTypeCheck: r,
|
|
271
|
-
sidebar:
|
|
272
|
-
banner:
|
|
273
|
-
advertisement:
|
|
274
|
-
layoutMode: s
|
|
362
|
+
sidebar: i,
|
|
363
|
+
banner: a,
|
|
364
|
+
advertisement: m,
|
|
365
|
+
layoutMode: s,
|
|
366
|
+
isNotification: l
|
|
275
367
|
})
|
|
276
368
|
}) : null;
|
|
277
|
-
},
|
|
278
|
-
sdk:
|
|
369
|
+
}, he = ({
|
|
370
|
+
sdk: o,
|
|
279
371
|
sidebar: s,
|
|
280
372
|
banner: r,
|
|
281
|
-
skipTypeCheck:
|
|
282
|
-
event:
|
|
283
|
-
layoutMode:
|
|
284
|
-
isMobileScreen:
|
|
285
|
-
persistent: p
|
|
373
|
+
skipTypeCheck: i,
|
|
374
|
+
event: a,
|
|
375
|
+
layoutMode: l,
|
|
376
|
+
isMobileScreen: t,
|
|
377
|
+
persistent: p,
|
|
378
|
+
notification: u
|
|
286
379
|
}) => {
|
|
287
380
|
const {
|
|
288
|
-
deactivate:
|
|
289
|
-
} =
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}, [
|
|
293
|
-
const
|
|
381
|
+
deactivate: v
|
|
382
|
+
} = Z(o);
|
|
383
|
+
Q(() => {
|
|
384
|
+
a ? o.createEventSession(a) : v();
|
|
385
|
+
}, [a, v, o]);
|
|
386
|
+
const m = N(o.featuresList.getStore());
|
|
294
387
|
if (s && r)
|
|
295
|
-
return /* @__PURE__ */
|
|
388
|
+
return /* @__PURE__ */ e("div", {
|
|
296
389
|
style: {
|
|
297
390
|
color: "red"
|
|
298
391
|
},
|
|
299
392
|
children: "define either sidebar or banner, not both."
|
|
300
393
|
});
|
|
301
|
-
if (!
|
|
394
|
+
if (!m)
|
|
302
395
|
return null;
|
|
303
|
-
const
|
|
304
|
-
return
|
|
305
|
-
gamification:
|
|
396
|
+
const d = o.getFeature(io.GAMES);
|
|
397
|
+
return d ? /* @__PURE__ */ e(ge, {
|
|
398
|
+
gamification: d,
|
|
306
399
|
sidebar: s,
|
|
307
400
|
banner: r,
|
|
308
|
-
layoutMode:
|
|
309
|
-
isMobileScreen:
|
|
401
|
+
layoutMode: l,
|
|
402
|
+
isMobileScreen: t,
|
|
310
403
|
persistent: p,
|
|
311
|
-
|
|
404
|
+
notification: u,
|
|
405
|
+
skipTypeCheck: i
|
|
312
406
|
}) : null;
|
|
313
|
-
},
|
|
314
|
-
event:
|
|
407
|
+
}, $e = ({
|
|
408
|
+
event: o,
|
|
315
409
|
sidebar: s,
|
|
316
410
|
banner: r,
|
|
317
|
-
isMobileScreen:
|
|
318
|
-
persistent:
|
|
411
|
+
isMobileScreen: i,
|
|
412
|
+
persistent: a,
|
|
413
|
+
notification: l
|
|
319
414
|
}) => {
|
|
320
|
-
const
|
|
321
|
-
return
|
|
322
|
-
|
|
415
|
+
const t = oo();
|
|
416
|
+
return t ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(eo, { children: /* @__PURE__ */ e(
|
|
417
|
+
he,
|
|
323
418
|
{
|
|
324
|
-
sdk:
|
|
325
|
-
event:
|
|
419
|
+
sdk: t,
|
|
420
|
+
event: o,
|
|
326
421
|
sidebar: s,
|
|
327
422
|
banner: r,
|
|
328
|
-
isMobileScreen:
|
|
329
|
-
persistent:
|
|
423
|
+
isMobileScreen: i,
|
|
424
|
+
persistent: a,
|
|
425
|
+
notification: l,
|
|
330
426
|
layoutMode: "side-by-side"
|
|
331
427
|
}
|
|
332
428
|
) }) }) : null;
|
|
333
429
|
};
|
|
334
430
|
export {
|
|
335
|
-
|
|
336
|
-
|
|
431
|
+
$e as StreamLayerSDKAdvertisement,
|
|
432
|
+
he as StreamLayerSDKAdvertisementUI
|
|
337
433
|
};
|