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