@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
package/lib/es/notification.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { s as n, B as A, a0 as As, a1 as Is, a2 as _, H as K, a3 as hs, Z as $s, W as x, Y as gs, d as ws, a as ys, e as Ts, N as R, u as bs, b as Cs, $ as fs, h as ks } from "./provider.js";
|
|
2
1
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
3
|
-
import { useState as w, useRef as
|
|
4
|
-
import
|
|
2
|
+
import { useState as w, useRef as _, useEffect as y, useCallback as As, useMemo as hs } from "react";
|
|
3
|
+
import "@nanostores/react";
|
|
4
|
+
import "nanostores";
|
|
5
|
+
import { s as n, B as A, $ as Is, a0 as $s, a1 as K, R as G, a2 as gs, E as ws, O as x, y as ys, i as Ts, f as bs, e as Cs, N as R, u as fs, d as ks, c as Ns, h as qs } from "./provider.js";
|
|
6
|
+
import "lodash.throttle";
|
|
7
|
+
import "react-dom";
|
|
8
|
+
import "react-countup";
|
|
9
|
+
import { h as v, Q as I, i as H, j as L, S as Es, A as O } from "./useStreamLayerApp2.js";
|
|
5
10
|
const b = /* @__PURE__ */ n("div")({
|
|
6
11
|
name: "Media",
|
|
7
12
|
class: "m1bcvojl",
|
|
8
13
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
14
|
+
}), Ls = () => b, Ss = /* @__PURE__ */ n(Ls())({
|
|
10
15
|
name: "MediaImgBottom",
|
|
11
16
|
class: "m58gin0",
|
|
12
17
|
propsAsIs: !0
|
|
13
|
-
}), xs = () => b,
|
|
18
|
+
}), xs = () => b, E = /* @__PURE__ */ n(xs())({
|
|
14
19
|
name: "MediaImgSolid",
|
|
15
20
|
class: "m1atm8do",
|
|
16
21
|
propsAsIs: !0
|
|
@@ -22,7 +27,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
22
27
|
name: "MediaImgCentered",
|
|
23
28
|
class: "m1bwv0gx",
|
|
24
29
|
propsAsIs: !0
|
|
25
|
-
}),
|
|
30
|
+
}), js = () => b, Bs = /* @__PURE__ */ n(js())({
|
|
26
31
|
name: "MediaImgInsight",
|
|
27
32
|
class: "mntjanp",
|
|
28
33
|
propsAsIs: !0
|
|
@@ -31,13 +36,13 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
31
36
|
class: "v1kofb47",
|
|
32
37
|
propsAsIs: !1
|
|
33
38
|
}), Us = {
|
|
34
|
-
[v.UNSET]:
|
|
35
|
-
[v.NONE]:
|
|
39
|
+
[v.UNSET]: E,
|
|
40
|
+
[v.NONE]: E,
|
|
36
41
|
[v.ROUNDED]: Ms,
|
|
37
42
|
[v.CENTERED]: Os,
|
|
38
|
-
[v.TRANSPARENT]:
|
|
39
|
-
[v.SOLID]:
|
|
40
|
-
},
|
|
43
|
+
[v.TRANSPARENT]: Ss,
|
|
44
|
+
[v.SOLID]: E
|
|
45
|
+
}, j = ({
|
|
41
46
|
src: e,
|
|
42
47
|
imageMode: i = v.UNSET,
|
|
43
48
|
withVideo: t,
|
|
@@ -45,7 +50,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
45
50
|
}) => {
|
|
46
51
|
if (i === v.NONE)
|
|
47
52
|
return null;
|
|
48
|
-
const a = o ?
|
|
53
|
+
const a = o ? Bs : Us[i];
|
|
49
54
|
return /* @__PURE__ */ l(a, {
|
|
50
55
|
children: [/* @__PURE__ */ s("img", {
|
|
51
56
|
src: e,
|
|
@@ -64,7 +69,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
64
69
|
name: "NotificationContainer",
|
|
65
70
|
class: "ns1nzpg",
|
|
66
71
|
propsAsIs: !1
|
|
67
|
-
}),
|
|
72
|
+
}), J = /* @__PURE__ */ n("div")({
|
|
68
73
|
name: "Body",
|
|
69
74
|
class: "b1j59nzs",
|
|
70
75
|
propsAsIs: !1
|
|
@@ -96,12 +101,12 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
96
101
|
name: "Container",
|
|
97
102
|
class: "ccvukea",
|
|
98
103
|
propsAsIs: !1
|
|
99
|
-
}),
|
|
104
|
+
}), Js = ({ image: e, tweet: i, account: t, accountVerified: o, body: a, title: p }) => {
|
|
100
105
|
var d;
|
|
101
106
|
return /* @__PURE__ */ l(Hs, { children: [
|
|
102
107
|
p && /* @__PURE__ */ s(_s, { children: /* @__PURE__ */ s(Ks, { children: p }) }),
|
|
103
108
|
/* @__PURE__ */ s(
|
|
104
|
-
|
|
109
|
+
Is,
|
|
105
110
|
{
|
|
106
111
|
image: e,
|
|
107
112
|
name: (d = i == null ? void 0 : i.meta) == null ? void 0 : d.accountName,
|
|
@@ -110,11 +115,11 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
110
115
|
createdTweet: i == null ? void 0 : i.date
|
|
111
116
|
}
|
|
112
117
|
),
|
|
113
|
-
/* @__PURE__ */ s(Gs, { children:
|
|
118
|
+
/* @__PURE__ */ s(Gs, { children: $s(a) })
|
|
114
119
|
] });
|
|
115
|
-
},
|
|
120
|
+
}, Xs = ({ title: e, questionType: i, questionTypeData: t }) => /* @__PURE__ */ l(J, { children: [
|
|
116
121
|
/* @__PURE__ */ s(
|
|
117
|
-
|
|
122
|
+
K,
|
|
118
123
|
{
|
|
119
124
|
questionTypeData: t,
|
|
120
125
|
questionType: i,
|
|
@@ -122,26 +127,26 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
122
127
|
}
|
|
123
128
|
),
|
|
124
129
|
e && /* @__PURE__ */ s(Fs, { children: e })
|
|
125
|
-
] }),
|
|
130
|
+
] }), Zs = ({ tweet: e }) => e ? /* @__PURE__ */ s(J, { children: /* @__PURE__ */ s(Js, { ...e, controlVideo: () => {
|
|
126
131
|
} }) }) : null, se = ({ action: e, questionType: i, inApp: t, insight: o, tweet: a }) => {
|
|
127
132
|
var p;
|
|
128
|
-
const d =
|
|
133
|
+
const d = G[i], r = gs[i];
|
|
129
134
|
if (!d || !t || !t.notification)
|
|
130
135
|
return null;
|
|
131
|
-
const { title:
|
|
132
|
-
let
|
|
133
|
-
i ===
|
|
134
|
-
const g = t.useMediaFromContent && (o == null ? void 0 : o.image), c = i ===
|
|
135
|
-
return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(zs, { style:
|
|
136
|
-
|
|
137
|
-
g && /* @__PURE__ */ s(
|
|
138
|
-
i ===
|
|
136
|
+
const { title: m, image: u, imageMode: $ } = t.notification;
|
|
137
|
+
let h = u;
|
|
138
|
+
i === I.TWEET && a != null && a.tweetMedia && (h = a.tweetMedia.image), $ === v.NONE && (h = "");
|
|
139
|
+
const g = t.useMediaFromContent && (o == null ? void 0 : o.image), c = i === I.TWEET && ((p = a == null ? void 0 : a.tweetMedia) == null ? void 0 : p.video) || i === I.FACTOID && (o == null ? void 0 : o.video);
|
|
140
|
+
return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(zs, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
|
|
141
|
+
h && !g && /* @__PURE__ */ s(j, { src: h, imageMode: $, withVideo: !!c }),
|
|
142
|
+
g && /* @__PURE__ */ s(j, { src: g, fromInsight: !0, withVideo: !!c }),
|
|
143
|
+
i === I.TWEET ? /* @__PURE__ */ s(Zs, { tweet: a }) : /* @__PURE__ */ s(Xs, { questionTypeData: d, questionType: i, title: m }),
|
|
139
144
|
/* @__PURE__ */ s(Qs, { name: "inapp-button", children: r || "Open" }),
|
|
140
145
|
/* @__PURE__ */ s(Ys, { name: "chevronRight" })
|
|
141
146
|
] }) });
|
|
142
147
|
}, ee = () => ({
|
|
143
148
|
color: e
|
|
144
|
-
}) => e,
|
|
149
|
+
}) => e, B = /* @__PURE__ */ n("div")({
|
|
145
150
|
name: "MediaComponentWrap",
|
|
146
151
|
class: "mek728j",
|
|
147
152
|
propsAsIs: !1,
|
|
@@ -172,19 +177,19 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
172
177
|
name: "MediaImgRounded",
|
|
173
178
|
class: "mc7lij",
|
|
174
179
|
propsAsIs: !0
|
|
175
|
-
}),
|
|
180
|
+
}), me = () => T, ue = /* @__PURE__ */ n(me())({
|
|
176
181
|
name: "MediaImgCentered",
|
|
177
182
|
class: "mwwaw7o",
|
|
178
183
|
propsAsIs: !0
|
|
179
|
-
}), ve = () => T,
|
|
184
|
+
}), ve = () => T, S = /* @__PURE__ */ n(ve())({
|
|
180
185
|
name: "MediaNone",
|
|
181
186
|
class: "mqfzyyr",
|
|
182
187
|
propsAsIs: !0
|
|
183
|
-
}), Ae = "v170mtgf",
|
|
184
|
-
[v.UNSET]:
|
|
185
|
-
[v.NONE]:
|
|
188
|
+
}), Ae = "v170mtgf", he = {
|
|
189
|
+
[v.UNSET]: S,
|
|
190
|
+
[v.NONE]: S,
|
|
186
191
|
[v.ROUNDED]: pe,
|
|
187
|
-
[v.CENTERED]:
|
|
192
|
+
[v.CENTERED]: ue,
|
|
188
193
|
[v.TRANSPARENT]: oe,
|
|
189
194
|
[v.SOLID]: le
|
|
190
195
|
}, P = ({
|
|
@@ -196,15 +201,15 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
196
201
|
thumbnailUrl: p
|
|
197
202
|
}) => {
|
|
198
203
|
if (!e)
|
|
199
|
-
return /* @__PURE__ */ s(
|
|
204
|
+
return /* @__PURE__ */ s(B, {
|
|
200
205
|
color: o,
|
|
201
|
-
children: /* @__PURE__ */ s(
|
|
206
|
+
children: /* @__PURE__ */ s(S, {})
|
|
202
207
|
});
|
|
203
|
-
const d = a ===
|
|
204
|
-
return /* @__PURE__ */ s(
|
|
208
|
+
const d = a === L.ENABLED ? re : he[i];
|
|
209
|
+
return /* @__PURE__ */ s(B, {
|
|
205
210
|
color: o,
|
|
206
211
|
children: t ? /* @__PURE__ */ s(te, {
|
|
207
|
-
children: /* @__PURE__ */ s(
|
|
212
|
+
children: /* @__PURE__ */ s(ws, {
|
|
208
213
|
className: Ae,
|
|
209
214
|
source: e,
|
|
210
215
|
poster: p || ""
|
|
@@ -216,14 +221,14 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
216
221
|
})
|
|
217
222
|
})
|
|
218
223
|
});
|
|
219
|
-
},
|
|
224
|
+
}, Ie = () => ({
|
|
220
225
|
withoutPadding: e
|
|
221
|
-
}) => e ? "0px" : "1rem",
|
|
226
|
+
}) => e ? "0px" : "1rem", X = /* @__PURE__ */ n("div")({
|
|
222
227
|
name: "NotificationContent",
|
|
223
228
|
class: "n1p3bk1c",
|
|
224
229
|
propsAsIs: !1,
|
|
225
230
|
vars: {
|
|
226
|
-
"n1p3bk1c-0": [
|
|
231
|
+
"n1p3bk1c-0": [Ie()]
|
|
227
232
|
}
|
|
228
233
|
}), $e = /* @__PURE__ */ n("div")({
|
|
229
234
|
name: "MainContent",
|
|
@@ -233,13 +238,13 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
233
238
|
name: "StyledChevronRight",
|
|
234
239
|
class: "sx1hq4c",
|
|
235
240
|
propsAsIs: !0
|
|
236
|
-
}),
|
|
241
|
+
}), Z = /* @__PURE__ */ n("div")({
|
|
237
242
|
name: "NotificationContainer",
|
|
238
243
|
class: "n1fcriet",
|
|
239
244
|
propsAsIs: !1
|
|
240
245
|
}), ye = () => ({
|
|
241
246
|
questionType: e
|
|
242
|
-
}) => e ===
|
|
247
|
+
}) => e === I.FACTOID ? "7.3rem" : "4.5rem", Te = () => ({
|
|
243
248
|
webos: e
|
|
244
249
|
}) => e ? "11px 0px 8px 0px" : "11px 0px", be = () => ({
|
|
245
250
|
imageMode: e,
|
|
@@ -261,7 +266,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
261
266
|
webos: e
|
|
262
267
|
}) => e ? "4.7rem" : "2.25rem", qe = () => ({
|
|
263
268
|
webos: e
|
|
264
|
-
}) => e ? "pre-wrap" : "nowrap",
|
|
269
|
+
}) => e ? "pre-wrap" : "nowrap", Ee = /* @__PURE__ */ n("div")({
|
|
265
270
|
name: "Title",
|
|
266
271
|
class: "t1y5k5id",
|
|
267
272
|
propsAsIs: !1,
|
|
@@ -271,11 +276,11 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
271
276
|
"t1y5k5id-2": [Ne()],
|
|
272
277
|
"t1y5k5id-3": [qe()]
|
|
273
278
|
}
|
|
274
|
-
}),
|
|
279
|
+
}), Le = /* @__PURE__ */ n("div")({
|
|
275
280
|
name: "Description",
|
|
276
281
|
class: "dw9eb7l",
|
|
277
282
|
propsAsIs: !1
|
|
278
|
-
}),
|
|
283
|
+
}), Se = /* @__PURE__ */ n("div")({
|
|
279
284
|
name: "LogoImgContainer",
|
|
280
285
|
class: "ldu8wgy",
|
|
281
286
|
propsAsIs: !1
|
|
@@ -283,7 +288,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
283
288
|
name: "LogoImg",
|
|
284
289
|
class: "ln4a3eh",
|
|
285
290
|
propsAsIs: !1
|
|
286
|
-
}), xe = () =>
|
|
291
|
+
}), xe = () => Z, De = /* @__PURE__ */ n(xe())({
|
|
287
292
|
name: "NotificationInterstitialContainer",
|
|
288
293
|
class: "no2k63v",
|
|
289
294
|
propsAsIs: !0
|
|
@@ -299,26 +304,26 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
299
304
|
name: "DismissButton",
|
|
300
305
|
class: "ds000hw",
|
|
301
306
|
propsAsIs: !0
|
|
302
|
-
}),
|
|
307
|
+
}), je = () => es, Be = /* @__PURE__ */ n(je())({
|
|
303
308
|
name: "AnswerButton",
|
|
304
309
|
class: "a1nz9hoe",
|
|
305
310
|
propsAsIs: !0
|
|
306
311
|
}), Pe = ({ title: e, questionType: i, questionTypeData: t, description: o, imageMode: a, webos: p }) => /* @__PURE__ */ l(Ce, { imageMode: a, questionType: i, webos: p, children: [
|
|
307
312
|
/* @__PURE__ */ s(
|
|
308
|
-
|
|
313
|
+
K,
|
|
309
314
|
{
|
|
310
315
|
questionTypeData: t,
|
|
311
316
|
questionType: i,
|
|
312
317
|
questionStatus: H.UNSET
|
|
313
318
|
}
|
|
314
319
|
),
|
|
315
|
-
e && /* @__PURE__ */ s(
|
|
316
|
-
o && /* @__PURE__ */ s(
|
|
317
|
-
] }), Ue = x(De), ze = x(Oe), Ve = x(
|
|
320
|
+
e && /* @__PURE__ */ s(Ee, { webos: p, children: e }),
|
|
321
|
+
o && /* @__PURE__ */ s(Le, { children: o })
|
|
322
|
+
] }), Ue = x(De), ze = x(Oe), Ve = x(Be), Fe = ({
|
|
318
323
|
sponsorLogo: e,
|
|
319
324
|
onClick: i,
|
|
320
325
|
webos: t
|
|
321
|
-
}) => /* @__PURE__ */ s(Ue, { autoFocus: !0, webos: t, onClick: i, "data-webos": t, children: /* @__PURE__ */ s(
|
|
326
|
+
}) => /* @__PURE__ */ s(Ue, { autoFocus: !0, webos: t, onClick: i, "data-webos": t, children: /* @__PURE__ */ s(X, { withoutPadding: !0, children: /* @__PURE__ */ s(ss, { src: e }) }) }), Qe = ({
|
|
322
327
|
action: e,
|
|
323
328
|
close: i,
|
|
324
329
|
questionType: t,
|
|
@@ -327,35 +332,35 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
327
332
|
color: p,
|
|
328
333
|
webos: d
|
|
329
334
|
}) => {
|
|
330
|
-
var r,
|
|
331
|
-
const [$,
|
|
332
|
-
y(() => (o != null && o.sponsorLogo && (
|
|
333
|
-
|
|
335
|
+
var r, m, u;
|
|
336
|
+
const [$, h] = w(!1), g = _();
|
|
337
|
+
y(() => (o != null && o.sponsorLogo && (h(!0), g.current = setTimeout(() => {
|
|
338
|
+
h(!1);
|
|
334
339
|
}, 5e3)), () => clearTimeout(g.current)), [o == null ? void 0 : o.sponsorLogo]);
|
|
335
|
-
const c =
|
|
340
|
+
const c = G[t];
|
|
336
341
|
if (!c || !o || !o.notification)
|
|
337
342
|
return null;
|
|
338
|
-
const { title: ds, image: ps, imageMode: f, useContentMedia: k } = o.notification,
|
|
343
|
+
const { title: ds, image: ps, imageMode: f, useContentMedia: k } = o.notification, ms = t === I.FACTOID ? a == null ? void 0 : a.heading : ds, us = t === I.FACTOID ? a == null ? void 0 : a.body : "", vs = ps, N = t === I.FACTOID && ((r = a == null ? void 0 : a.video) == null ? void 0 : r.url) && (o == null ? void 0 : o.isVideo) && k === L.ENABLED, q = k === L.ENABLED ? N ? (m = a == null ? void 0 : a.video) == null ? void 0 : m.url : a == null ? void 0 : a.image : "";
|
|
339
344
|
return o != null && o.sponsorLogo && $ ? /* @__PURE__ */ s(
|
|
340
345
|
Fe,
|
|
341
346
|
{
|
|
342
347
|
sponsorLogo: o == null ? void 0 : o.sponsorLogo,
|
|
343
348
|
webos: d,
|
|
344
|
-
onClick: () =>
|
|
349
|
+
onClick: () => h(!1)
|
|
345
350
|
}
|
|
346
351
|
) : /* @__PURE__ */ l(
|
|
347
|
-
|
|
352
|
+
Z,
|
|
348
353
|
{
|
|
349
354
|
"data-a": "intr",
|
|
350
355
|
className: "SL_InApp",
|
|
351
356
|
onClick: (C) => {
|
|
352
357
|
d || e == null || e(C);
|
|
353
358
|
},
|
|
354
|
-
"data-is-insight": t ===
|
|
359
|
+
"data-is-insight": t === I.FACTOID,
|
|
355
360
|
"data-webos": d,
|
|
356
361
|
children: [
|
|
357
|
-
(o == null ? void 0 : o.sponsorLogo) && /* @__PURE__ */ s(
|
|
358
|
-
/* @__PURE__ */ l(
|
|
362
|
+
(o == null ? void 0 : o.sponsorLogo) && /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s(ss, { src: o == null ? void 0 : o.sponsorLogo }) }),
|
|
363
|
+
/* @__PURE__ */ l(X, { children: [
|
|
359
364
|
/* @__PURE__ */ l($e, { children: [
|
|
360
365
|
!q && /* @__PURE__ */ s(P, { src: vs, imageMode: f, withVideo: !!N, color: p }),
|
|
361
366
|
q && /* @__PURE__ */ s(
|
|
@@ -366,7 +371,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
366
371
|
withVideo: !!N,
|
|
367
372
|
color: p,
|
|
368
373
|
useContentMedia: k,
|
|
369
|
-
thumbnailUrl: (
|
|
374
|
+
thumbnailUrl: (u = a == null ? void 0 : a.video) == null ? void 0 : u.thumbnailUrl
|
|
370
375
|
}
|
|
371
376
|
),
|
|
372
377
|
/* @__PURE__ */ s(
|
|
@@ -374,8 +379,8 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
374
379
|
{
|
|
375
380
|
questionTypeData: c,
|
|
376
381
|
questionType: t,
|
|
377
|
-
title:
|
|
378
|
-
description:
|
|
382
|
+
title: ms,
|
|
383
|
+
description: us,
|
|
379
384
|
imageMode: f,
|
|
380
385
|
webos: d
|
|
381
386
|
}
|
|
@@ -416,19 +421,19 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
416
421
|
name: "TitleIcon",
|
|
417
422
|
class: "t16zzzei",
|
|
418
423
|
propsAsIs: !0
|
|
419
|
-
}), Ge = () =>
|
|
424
|
+
}), Ge = () => ys, He = /* @__PURE__ */ n(Ge())({
|
|
420
425
|
name: "Close",
|
|
421
426
|
class: "c1sur0q2",
|
|
422
427
|
propsAsIs: !0
|
|
423
|
-
}),
|
|
428
|
+
}), Je = /* @__PURE__ */ n("div")({
|
|
424
429
|
name: "Body",
|
|
425
430
|
class: "bai9j52",
|
|
426
431
|
propsAsIs: !1
|
|
427
|
-
}),
|
|
432
|
+
}), Xe = /* @__PURE__ */ n("div")({
|
|
428
433
|
name: "Title",
|
|
429
434
|
class: "t1bnt25p",
|
|
430
435
|
propsAsIs: !1
|
|
431
|
-
}),
|
|
436
|
+
}), Ze = /* @__PURE__ */ n("div")({
|
|
432
437
|
name: "Description",
|
|
433
438
|
class: "dmixjec",
|
|
434
439
|
propsAsIs: !1
|
|
@@ -460,12 +465,12 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
460
465
|
}
|
|
461
466
|
)
|
|
462
467
|
] }),
|
|
463
|
-
/* @__PURE__ */ l(
|
|
464
|
-
/* @__PURE__ */ l(
|
|
468
|
+
/* @__PURE__ */ l(Je, { children: [
|
|
469
|
+
/* @__PURE__ */ l(Xe, { children: [
|
|
465
470
|
/* @__PURE__ */ s(Ke, { name: "icon-trophy-solid" }),
|
|
466
471
|
(o = t == null ? void 0 : t.titleCard) == null ? void 0 : o.title
|
|
467
472
|
] }),
|
|
468
|
-
/* @__PURE__ */ l(
|
|
473
|
+
/* @__PURE__ */ l(Ze, { children: [
|
|
469
474
|
/* @__PURE__ */ s("span", { children: (a = t == null ? void 0 : t.titleCard) == null ? void 0 : a.subtitle }),
|
|
470
475
|
/* @__PURE__ */ s(sn, { name: "inapp-button", children: "Play Now" })
|
|
471
476
|
] })
|
|
@@ -509,19 +514,19 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
509
514
|
name: "Subtitle",
|
|
510
515
|
class: "sz7237i",
|
|
511
516
|
propsAsIs: !1
|
|
512
|
-
}),
|
|
517
|
+
}), mn = ({
|
|
513
518
|
step: e,
|
|
514
519
|
children: i,
|
|
515
520
|
answer: t,
|
|
516
521
|
state: o = "pending"
|
|
517
522
|
}) => {
|
|
518
|
-
const [a, p] = w(0), [d] = w(() => new ResizeObserver((
|
|
523
|
+
const [a, p] = w(0), [d] = w(() => new ResizeObserver((m) => {
|
|
519
524
|
window.requestAnimationFrame(() => {
|
|
520
|
-
var
|
|
521
|
-
p((($ = (
|
|
525
|
+
var u, $;
|
|
526
|
+
p((($ = (u = m == null ? void 0 : m[0]) == null ? void 0 : u.contentRect) == null ? void 0 : $.width) ?? 0);
|
|
522
527
|
});
|
|
523
|
-
})), r =
|
|
524
|
-
|
|
528
|
+
})), r = As((m) => {
|
|
529
|
+
m ? d.observe(m) : d.disconnect();
|
|
525
530
|
}, [d]);
|
|
526
531
|
return y(() => () => {
|
|
527
532
|
d.disconnect();
|
|
@@ -547,7 +552,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
547
552
|
})
|
|
548
553
|
})]
|
|
549
554
|
});
|
|
550
|
-
},
|
|
555
|
+
}, un = /* @__PURE__ */ n("div")({
|
|
551
556
|
name: "Container",
|
|
552
557
|
class: "ckyzolp",
|
|
553
558
|
propsAsIs: !1
|
|
@@ -559,7 +564,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
559
564
|
name: "Line1",
|
|
560
565
|
class: "le78kvg",
|
|
561
566
|
propsAsIs: !0
|
|
562
|
-
}),
|
|
567
|
+
}), hn = () => D, In = /* @__PURE__ */ n(hn())({
|
|
563
568
|
name: "Line2",
|
|
564
569
|
class: "l1o7966d",
|
|
565
570
|
propsAsIs: !0
|
|
@@ -567,10 +572,10 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
567
572
|
name: "Line3",
|
|
568
573
|
class: "lu9lyxq",
|
|
569
574
|
propsAsIs: !0
|
|
570
|
-
}), wn = () => /* @__PURE__ */ l(
|
|
575
|
+
}), wn = () => /* @__PURE__ */ l(un, {
|
|
571
576
|
children: [/* @__PURE__ */ s(An, {
|
|
572
577
|
children: /* @__PURE__ */ s("div", {})
|
|
573
|
-
}), /* @__PURE__ */ s(
|
|
578
|
+
}), /* @__PURE__ */ s(In, {
|
|
574
579
|
children: /* @__PURE__ */ s("div", {})
|
|
575
580
|
}), /* @__PURE__ */ s(gn, {
|
|
576
581
|
children: /* @__PURE__ */ s("div", {})
|
|
@@ -615,11 +620,11 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
615
620
|
name: "Title",
|
|
616
621
|
class: "t1cduox6",
|
|
617
622
|
propsAsIs: !1
|
|
618
|
-
}),
|
|
623
|
+
}), En = () => A, is = /* @__PURE__ */ n(En())({
|
|
619
624
|
name: "CorrectIcon",
|
|
620
625
|
class: "c1onrv6j",
|
|
621
626
|
propsAsIs: !0
|
|
622
|
-
}),
|
|
627
|
+
}), Ln = () => is, Sn = /* @__PURE__ */ n(Ln())({
|
|
623
628
|
name: "InCorrectIcon",
|
|
624
629
|
class: "i17n9o7e",
|
|
625
630
|
propsAsIs: !0
|
|
@@ -634,7 +639,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
634
639
|
}) => /* @__PURE__ */ l(ns, {
|
|
635
640
|
children: [/* @__PURE__ */ l(os, {
|
|
636
641
|
children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", e]
|
|
637
|
-
}), /* @__PURE__ */ s(
|
|
642
|
+
}), /* @__PURE__ */ s(Sn, {
|
|
638
643
|
name: "icon-cross"
|
|
639
644
|
})]
|
|
640
645
|
}), Mn = /* @__PURE__ */ n("div")({
|
|
@@ -645,21 +650,21 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
645
650
|
name: "Title",
|
|
646
651
|
class: "t903f8n",
|
|
647
652
|
propsAsIs: !1
|
|
648
|
-
}), On = () => A,
|
|
653
|
+
}), On = () => A, jn = /* @__PURE__ */ n(On())({
|
|
649
654
|
name: "CheckIcon",
|
|
650
655
|
class: "ceyu3qj",
|
|
651
656
|
propsAsIs: !0
|
|
652
|
-
}),
|
|
657
|
+
}), Bn = ({
|
|
653
658
|
points: e
|
|
654
659
|
}) => /* @__PURE__ */ l(Mn, {
|
|
655
660
|
children: [/* @__PURE__ */ l(Rn, {
|
|
656
|
-
children: ["You won ", /* @__PURE__ */ s(
|
|
661
|
+
children: ["You won ", /* @__PURE__ */ s(Ts, {
|
|
657
662
|
delay: 0.5,
|
|
658
663
|
prefix: "+",
|
|
659
664
|
suffix: " points",
|
|
660
665
|
value: e
|
|
661
666
|
})]
|
|
662
|
-
}), /* @__PURE__ */ s(
|
|
667
|
+
}), /* @__PURE__ */ s(jn, {
|
|
663
668
|
name: "icon-trophy-solid"
|
|
664
669
|
})]
|
|
665
670
|
}), z = /* @__PURE__ */ n("div")({
|
|
@@ -678,25 +683,25 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
678
683
|
}, Pn = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
|
|
679
684
|
if (y(() => {
|
|
680
685
|
if (t) {
|
|
681
|
-
const
|
|
686
|
+
const u = setTimeout(() => {
|
|
682
687
|
F[r + 1] && (a || r < 3) ? t(r + 1) : e == null || e();
|
|
683
688
|
}, F[r]);
|
|
684
689
|
return () => {
|
|
685
|
-
|
|
690
|
+
u && clearTimeout(u);
|
|
686
691
|
};
|
|
687
692
|
}
|
|
688
693
|
return () => {
|
|
689
694
|
};
|
|
690
695
|
}, [t, r, e, a]), r === 1)
|
|
691
696
|
return /* @__PURE__ */ s(z, { children: /* @__PURE__ */ s(V, { children: /* @__PURE__ */ s(Cn, {}) }) });
|
|
692
|
-
let
|
|
693
|
-
return (r === 3 || r === 4) && (
|
|
697
|
+
let m = "pending";
|
|
698
|
+
return (r === 3 || r === 4) && (m = a ? "correct" : "incorrect"), /* @__PURE__ */ s(z, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ l(V, { children: [
|
|
694
699
|
r !== 1 && /* @__PURE__ */ s(wn, {}, r),
|
|
695
|
-
/* @__PURE__ */ l(
|
|
700
|
+
/* @__PURE__ */ l(mn, { state: m, step: r, answer: (o == null ? void 0 : o.title) || "unknown", children: [
|
|
696
701
|
r === 2 && /* @__PURE__ */ s(qn, { title: d || "unknown" }),
|
|
697
702
|
r === 3 && a && /* @__PURE__ */ s(xn, {}),
|
|
698
703
|
r === 3 && !a && /* @__PURE__ */ s(Dn, { title: p || "unknown" }),
|
|
699
|
-
r === 4 && /* @__PURE__ */ s(
|
|
704
|
+
r === 4 && /* @__PURE__ */ s(Bn, { points: (o == null ? void 0 : o.points) || 0 })
|
|
700
705
|
] })
|
|
701
706
|
] }) });
|
|
702
707
|
}, Un = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
|
|
@@ -740,9 +745,9 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
740
745
|
return y(() => {
|
|
741
746
|
const p = new ResizeObserver((d) => {
|
|
742
747
|
window.requestAnimationFrame(() => {
|
|
743
|
-
var r,
|
|
744
|
-
const
|
|
745
|
-
a(
|
|
748
|
+
var r, m;
|
|
749
|
+
const u = ((m = (r = d == null ? void 0 : d[0]) == null ? void 0 : r.contentRect) == null ? void 0 : m.width) ?? 0;
|
|
750
|
+
a(u);
|
|
746
751
|
});
|
|
747
752
|
});
|
|
748
753
|
return () => {
|
|
@@ -773,20 +778,20 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
773
778
|
name: "Line1",
|
|
774
779
|
class: "l1anth16",
|
|
775
780
|
propsAsIs: !0
|
|
776
|
-
}), Hn = () => M,
|
|
781
|
+
}), Hn = () => M, Jn = /* @__PURE__ */ n(Hn())({
|
|
777
782
|
name: "Line2",
|
|
778
783
|
class: "l193yd7v",
|
|
779
784
|
propsAsIs: !0
|
|
780
|
-
}),
|
|
785
|
+
}), Xn = () => M, Zn = /* @__PURE__ */ n(Xn())({
|
|
781
786
|
name: "Line3",
|
|
782
787
|
class: "lhbflsp",
|
|
783
788
|
propsAsIs: !0
|
|
784
789
|
}), so = () => /* @__PURE__ */ l(_n, {
|
|
785
790
|
children: [/* @__PURE__ */ s(Gn, {
|
|
786
791
|
children: /* @__PURE__ */ s("div", {})
|
|
787
|
-
}), /* @__PURE__ */ s(
|
|
792
|
+
}), /* @__PURE__ */ s(Jn, {
|
|
788
793
|
children: /* @__PURE__ */ s("div", {})
|
|
789
|
-
}), /* @__PURE__ */ s(
|
|
794
|
+
}), /* @__PURE__ */ s(Zn, {
|
|
790
795
|
children: /* @__PURE__ */ s("div", {})
|
|
791
796
|
})]
|
|
792
797
|
}), eo = /* @__PURE__ */ n("div")({
|
|
@@ -836,7 +841,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
836
841
|
name: "Title",
|
|
837
842
|
class: "tv66n4w",
|
|
838
843
|
propsAsIs: !1
|
|
839
|
-
}),
|
|
844
|
+
}), mo = () => A, uo = /* @__PURE__ */ n(mo())({
|
|
840
845
|
name: "CorrectIcon",
|
|
841
846
|
class: "cx0vlv2",
|
|
842
847
|
propsAsIs: !0
|
|
@@ -850,7 +855,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
850
855
|
children: [/* @__PURE__ */ s(as, {
|
|
851
856
|
children: "Congratulations! You answered correctly."
|
|
852
857
|
}), /* @__PURE__ */ l(rs, {
|
|
853
|
-
children: [/* @__PURE__ */ s(
|
|
858
|
+
children: [/* @__PURE__ */ s(uo, {
|
|
854
859
|
name: "icon-correct"
|
|
855
860
|
}), "Your Pick: ", e]
|
|
856
861
|
})]
|
|
@@ -875,33 +880,33 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
875
880
|
1: 3e3,
|
|
876
881
|
2: 4e3,
|
|
877
882
|
3: 4e3
|
|
878
|
-
},
|
|
883
|
+
}, ho = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
|
|
879
884
|
if (y(() => {
|
|
880
885
|
if (t) {
|
|
881
|
-
const
|
|
886
|
+
const u = setTimeout(() => {
|
|
882
887
|
Y[r + 1] && (a || r < 3) ? t(r + 1) : e == null || e();
|
|
883
888
|
}, Y[r]);
|
|
884
889
|
return () => {
|
|
885
|
-
|
|
890
|
+
u && clearTimeout(u);
|
|
886
891
|
};
|
|
887
892
|
}
|
|
888
893
|
return () => {
|
|
889
894
|
};
|
|
890
895
|
}, [t, r, e, a]), r === 1)
|
|
891
896
|
return /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(W, { children: /* @__PURE__ */ s(io, {}) }) });
|
|
892
|
-
let
|
|
893
|
-
return r === 3 && (
|
|
897
|
+
let m = "pending";
|
|
898
|
+
return r === 3 && (m = a ? "correct" : "incorrect"), /* @__PURE__ */ s(Q, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ l(W, { children: [
|
|
894
899
|
r !== 1 && /* @__PURE__ */ s(so, {}, r),
|
|
895
|
-
/* @__PURE__ */ l(Yn, { state:
|
|
900
|
+
/* @__PURE__ */ l(Yn, { state: m, step: r, children: [
|
|
896
901
|
r === 2 && /* @__PURE__ */ s(po, { title: d || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" }),
|
|
897
902
|
r === 3 && a && /* @__PURE__ */ s(vo, { answer: (o == null ? void 0 : o.title) || "unknown" }),
|
|
898
903
|
r === 3 && !a && /* @__PURE__ */ s(Ao, { title: p || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" })
|
|
899
904
|
] })
|
|
900
905
|
] }) });
|
|
901
|
-
},
|
|
906
|
+
}, Io = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
|
|
902
907
|
const [d, r] = w(1);
|
|
903
908
|
return /* @__PURE__ */ s(
|
|
904
|
-
|
|
909
|
+
ho,
|
|
905
910
|
{
|
|
906
911
|
close: e,
|
|
907
912
|
action: i,
|
|
@@ -941,28 +946,28 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
941
946
|
propsAsIs: !1
|
|
942
947
|
}), bo = ({ sponsorLogo: e, onClick: i }) => /* @__PURE__ */ s(yo, { onClick: i, children: /* @__PURE__ */ s(go, { withoutPadding: !0, children: /* @__PURE__ */ s(ls, { src: e }) }) }), Co = (e) => {
|
|
943
948
|
var i, t, o, a, p;
|
|
944
|
-
const [d, r] = w(!1),
|
|
949
|
+
const [d, r] = w(!1), m = _();
|
|
945
950
|
return y(() => {
|
|
946
|
-
var
|
|
947
|
-
return (
|
|
951
|
+
var u;
|
|
952
|
+
return (u = e == null ? void 0 : e.inApp) != null && u.sponsorLogo && (r(!0), m.current = setTimeout(() => {
|
|
948
953
|
r(!1);
|
|
949
|
-
}, 5e3)), () => clearTimeout(
|
|
954
|
+
}, 5e3)), () => clearTimeout(m.current);
|
|
950
955
|
}, [(i = e == null ? void 0 : e.inApp) == null ? void 0 : i.sponsorLogo]), (t = e == null ? void 0 : e.inApp) != null && t.sponsorLogo && d ? /* @__PURE__ */ s(bo, { sponsorLogo: (o = e.inApp) == null ? void 0 : o.sponsorLogo, onClick: () => r(!1) }) : /* @__PURE__ */ s(cs, { children: /* @__PURE__ */ l("div", { children: [
|
|
951
956
|
((a = e == null ? void 0 : e.inApp) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ s(To, { children: /* @__PURE__ */ s(ls, { src: (p = e == null ? void 0 : e.inApp) == null ? void 0 : p.sponsorLogo }) }),
|
|
952
|
-
/* @__PURE__ */ s(
|
|
957
|
+
/* @__PURE__ */ s(Io, { ...e })
|
|
953
958
|
] }) });
|
|
954
959
|
}, fo = ({ sdk: e, webos: i }) => {
|
|
955
|
-
var t, o, a, p, d, r,
|
|
956
|
-
const [$] = w(e.getNotificationsStore()),
|
|
960
|
+
var t, o, a, p, d, r, m, u;
|
|
961
|
+
const [$] = w(e.getNotificationsStore()), h = bs($), g = e.getFeature(Es.GAMES), c = hs(() => e.getActiveNotification(), [e, h]);
|
|
957
962
|
return y(() => {
|
|
958
|
-
c &&
|
|
963
|
+
c && Cs.emit("notification", {
|
|
959
964
|
action: "rendered",
|
|
960
965
|
payload: {
|
|
961
966
|
questionId: c.data.questionId,
|
|
962
967
|
questionType: c.data.questionType
|
|
963
968
|
}
|
|
964
969
|
});
|
|
965
|
-
}, [c]), c && c.type === R.QUESTION_RESOLVED ? c.data.question && c.data.questionType ===
|
|
970
|
+
}, [c]), c && c.type === R.QUESTION_RESOLVED ? c.data.question && c.data.questionType === I.PREDICTION ? c && ((t = c.data.inApp) == null ? void 0 : t.adUnit) === O.STANDART ? /* @__PURE__ */ s(
|
|
966
971
|
Co,
|
|
967
972
|
{
|
|
968
973
|
action: c.action,
|
|
@@ -990,15 +995,15 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
990
995
|
...c.data,
|
|
991
996
|
action: c.action,
|
|
992
997
|
close: c.close,
|
|
993
|
-
color: ((d = (p = (a = c == null ? void 0 : c.data) == null ? void 0 : a.inApp) == null ? void 0 : p.notification) == null ? void 0 : d.indicatorColor) || ((
|
|
998
|
+
color: ((d = (p = (a = c == null ? void 0 : c.data) == null ? void 0 : a.inApp) == null ? void 0 : p.notification) == null ? void 0 : d.indicatorColor) || ((u = (m = (r = c == null ? void 0 : c.data) == null ? void 0 : r.inApp) == null ? void 0 : m.appearance) == null ? void 0 : u.primaryColor),
|
|
994
999
|
webos: i
|
|
995
1000
|
}
|
|
996
1001
|
) : c && /* @__PURE__ */ s(se, { ...c.data, action: c.action });
|
|
997
|
-
},
|
|
998
|
-
const i =
|
|
999
|
-
return i && (o.appNotification || o.onboardingNotification) ? o.app && !o.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(
|
|
1002
|
+
}, Ro = ({ theme: e }) => {
|
|
1003
|
+
const i = fs(), t = ks(), o = Ns();
|
|
1004
|
+
return i && (o.appNotification || o.onboardingNotification) ? o.app && !o.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(qs, { customTheme: e ?? t.theme, themeMode: t.themeMode, children: /* @__PURE__ */ s(fo, { sdk: i }) }) }) : null;
|
|
1000
1005
|
};
|
|
1001
1006
|
export {
|
|
1002
|
-
|
|
1007
|
+
Ro as StreamLayerSDKNotification,
|
|
1003
1008
|
fo as StreamLayerSDKNotificationUI
|
|
1004
1009
|
};
|