@streamlayer/react 1.17.1 → 1.18.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 +1 -0
- package/lib/app/app.d.ts +3 -0
- package/lib/app/provider.d.ts +4 -1
- package/lib/app/useStreamLayerApp.d.ts +2 -1
- package/lib/cjs/advertisement.js +36 -36
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index2.js +2 -2
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +62 -19
- package/lib/cjs/useStreamLayerApp2.js +15 -15
- package/lib/classic/app/advertisement.d.ts +1 -0
- package/lib/classic/app/app.d.ts +3 -0
- package/lib/classic/app/provider.d.ts +4 -1
- package/lib/classic/app/useStreamLayerApp.d.ts +2 -1
- package/lib/classic/cjs/advertisement.js +36 -36
- package/lib/classic/cjs/bet-pack.js +2 -2
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +57 -14
- package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
- package/lib/classic/es/advertisement.js +6778 -6620
- package/lib/classic/es/bet-pack.js +245 -245
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/index.js +3 -3
- package/lib/classic/es/insight.js +41 -38
- package/lib/classic/es/notification.js +739 -230
- package/lib/classic/es/points.js +10 -10
- package/lib/classic/es/provider.js +7285 -4829
- package/lib/classic/es/useStreamLayerApp.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +4007 -3787
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/masters.js +47 -43
- package/lib/dist/es/gamification-feature2.js +15 -15
- package/lib/dist/es/index.js +3 -3
- package/lib/dist/es/masters.js +14631 -12156
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +6778 -6620
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/index2.js +362 -362
- package/lib/es/insight.js +41 -38
- package/lib/es/masters2.js +28 -26
- package/lib/es/notification.js +739 -230
- package/lib/es/points.js +10 -10
- package/lib/es/provider.js +7162 -4706
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +4007 -3787
- package/lib/style.css +1 -1
- package/package.json +14 -14
package/lib/es/notification.js
CHANGED
|
@@ -1,485 +1,994 @@
|
|
|
1
|
-
import { s,
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { s as n, B as A, $ as As, a0 as hs, a1 as W, G as _, a2 as Is, Y as $s, V as E, X as gs, d as ws, a as ys, e as Ts, N as M, u as bs, b as Cs, _ as fs, h as ks } from "./provider.js";
|
|
2
|
+
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { useState as w, useRef as G, useEffect as y, useCallback as Ns, useMemo as qs } from "react";
|
|
4
|
+
import { l as v, Q as I, m as K, r as L, S as Ls, A as R } from "./useStreamLayerApp2.js";
|
|
5
|
+
const b = /* @__PURE__ */ n("div")({
|
|
6
6
|
name: "Media",
|
|
7
7
|
class: "m1bcvojl",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), Ss = () => b, Es = /* @__PURE__ */ n(Ss())({
|
|
10
10
|
name: "MediaImgBottom",
|
|
11
11
|
class: "m58gin0",
|
|
12
12
|
propsAsIs: !0
|
|
13
|
-
}),
|
|
13
|
+
}), xs = () => b, q = /* @__PURE__ */ n(xs())({
|
|
14
14
|
name: "MediaImgSolid",
|
|
15
15
|
class: "m1atm8do",
|
|
16
16
|
propsAsIs: !0
|
|
17
|
-
}),
|
|
17
|
+
}), Ds = () => b, Ms = /* @__PURE__ */ n(Ds())({
|
|
18
18
|
name: "MediaImgRounded",
|
|
19
19
|
class: "myx3xoi",
|
|
20
20
|
propsAsIs: !0
|
|
21
|
-
}),
|
|
21
|
+
}), Rs = () => b, Os = /* @__PURE__ */ n(Rs())({
|
|
22
22
|
name: "MediaImgCentered",
|
|
23
23
|
class: "m1bwv0gx",
|
|
24
24
|
propsAsIs: !0
|
|
25
|
-
}),
|
|
25
|
+
}), Bs = () => b, js = /* @__PURE__ */ n(Bs())({
|
|
26
26
|
name: "MediaImgInsight",
|
|
27
27
|
class: "mntjanp",
|
|
28
28
|
propsAsIs: !0
|
|
29
|
-
}),
|
|
29
|
+
}), Ps = /* @__PURE__ */ n("div")({
|
|
30
30
|
name: "VideoIcon",
|
|
31
31
|
class: "v1kofb47",
|
|
32
32
|
propsAsIs: !1
|
|
33
|
-
}),
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
}), Us = {
|
|
34
|
+
[v.UNSET]: q,
|
|
35
|
+
[v.NONE]: q,
|
|
36
|
+
[v.ROUNDED]: Ms,
|
|
37
|
+
[v.CENTERED]: Os,
|
|
38
|
+
[v.TRANSPARENT]: Es,
|
|
39
|
+
[v.SOLID]: q
|
|
40
|
+
}, O = ({
|
|
41
|
+
src: e,
|
|
42
|
+
imageMode: i = v.UNSET,
|
|
43
|
+
withVideo: t,
|
|
44
|
+
fromInsight: o
|
|
44
45
|
}) => {
|
|
45
|
-
if (i ===
|
|
46
|
+
if (i === v.NONE)
|
|
46
47
|
return null;
|
|
47
|
-
const
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
-
src:
|
|
48
|
+
const a = o ? js : Us[i];
|
|
49
|
+
return /* @__PURE__ */ l(a, {
|
|
50
|
+
children: [/* @__PURE__ */ s("img", {
|
|
51
|
+
src: e,
|
|
51
52
|
alt: ""
|
|
52
|
-
}),
|
|
53
|
-
children: /* @__PURE__ */
|
|
53
|
+
}), t && /* @__PURE__ */ s(Ps, {
|
|
54
|
+
children: /* @__PURE__ */ s(A, {
|
|
54
55
|
name: "icon-play"
|
|
55
56
|
})
|
|
56
57
|
})]
|
|
57
58
|
});
|
|
58
|
-
},
|
|
59
|
+
}, zs = /* @__PURE__ */ n("div")({
|
|
59
60
|
name: "NotificationContent",
|
|
60
61
|
class: "nuraq9m",
|
|
61
62
|
propsAsIs: !1
|
|
62
|
-
}),
|
|
63
|
+
}), Vs = /* @__PURE__ */ n("div")({
|
|
63
64
|
name: "NotificationContainer",
|
|
64
65
|
class: "ns1nzpg",
|
|
65
66
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
67
|
+
}), X = /* @__PURE__ */ n("div")({
|
|
67
68
|
name: "Body",
|
|
68
69
|
class: "b1j59nzs",
|
|
69
70
|
propsAsIs: !1
|
|
70
|
-
}),
|
|
71
|
+
}), Fs = /* @__PURE__ */ n("div")({
|
|
71
72
|
name: "Title",
|
|
72
73
|
class: "t9vmnpp",
|
|
73
74
|
propsAsIs: !1
|
|
74
|
-
}),
|
|
75
|
+
}), Qs = /* @__PURE__ */ n("button")({
|
|
75
76
|
name: "Button",
|
|
76
77
|
class: "b14ivj5k",
|
|
77
78
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
79
|
+
}), Ys = () => A, Ws = /* @__PURE__ */ n(Ys())({
|
|
79
80
|
name: "StyledChevronRight",
|
|
80
81
|
class: "s1atci8n",
|
|
81
82
|
propsAsIs: !0
|
|
82
|
-
}),
|
|
83
|
+
}), _s = /* @__PURE__ */ n("div")({
|
|
83
84
|
name: "QuoteWrap",
|
|
84
85
|
class: "q4w8jgs",
|
|
85
86
|
propsAsIs: !1
|
|
86
|
-
}),
|
|
87
|
+
}), Gs = /* @__PURE__ */ n("blockquote")({
|
|
87
88
|
name: "Quote",
|
|
88
89
|
class: "qaa0kez",
|
|
89
90
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
91
|
+
}), Ks = /* @__PURE__ */ n("div")({
|
|
91
92
|
name: "Body",
|
|
92
93
|
class: "b1wvd52w",
|
|
93
94
|
propsAsIs: !1
|
|
94
|
-
}),
|
|
95
|
+
}), Xs = /* @__PURE__ */ n("div")({
|
|
95
96
|
name: "Container",
|
|
96
97
|
class: "ccvukea",
|
|
97
98
|
propsAsIs: !1
|
|
98
|
-
}),
|
|
99
|
-
var
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
|
|
99
|
+
}), Hs = ({ image: e, tweet: i, account: t, accountVerified: o, body: a, title: p }) => {
|
|
100
|
+
var d;
|
|
101
|
+
return /* @__PURE__ */ l(Xs, { children: [
|
|
102
|
+
p && /* @__PURE__ */ s(_s, { children: /* @__PURE__ */ s(Gs, { children: p }) }),
|
|
103
|
+
/* @__PURE__ */ s(
|
|
104
|
+
As,
|
|
104
105
|
{
|
|
105
|
-
image:
|
|
106
|
-
name: (
|
|
107
|
-
userName:
|
|
108
|
-
verified:
|
|
106
|
+
image: e,
|
|
107
|
+
name: (d = i == null ? void 0 : i.meta) == null ? void 0 : d.accountName,
|
|
108
|
+
userName: t,
|
|
109
|
+
verified: o,
|
|
109
110
|
createdTweet: i == null ? void 0 : i.date
|
|
110
111
|
}
|
|
111
112
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ s(Ks, { children: hs(a) })
|
|
113
114
|
] });
|
|
114
|
-
},
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
|
|
115
|
+
}, Js = ({ title: e, questionType: i, questionTypeData: t }) => /* @__PURE__ */ l(X, { children: [
|
|
116
|
+
/* @__PURE__ */ s(
|
|
117
|
+
W,
|
|
117
118
|
{
|
|
118
|
-
questionTypeData:
|
|
119
|
+
questionTypeData: t,
|
|
119
120
|
questionType: i,
|
|
120
|
-
questionStatus:
|
|
121
|
+
questionStatus: K.UNSET
|
|
121
122
|
}
|
|
122
123
|
),
|
|
123
|
-
|
|
124
|
-
] }),
|
|
125
|
-
} }) }) : null,
|
|
126
|
-
var
|
|
127
|
-
const
|
|
128
|
-
if (!
|
|
124
|
+
e && /* @__PURE__ */ s(Fs, { children: e })
|
|
125
|
+
] }), Zs = ({ tweet: e }) => e ? /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(Hs, { ...e, controlVideo: () => {
|
|
126
|
+
} }) }) : null, se = ({ action: e, questionType: i, inApp: t, insight: o, tweet: a }) => {
|
|
127
|
+
var p;
|
|
128
|
+
const d = _[i], r = Is[i];
|
|
129
|
+
if (!d || !t || !t.notification)
|
|
129
130
|
return null;
|
|
130
|
-
const { title:
|
|
131
|
-
let h =
|
|
132
|
-
i ===
|
|
133
|
-
const
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
h && !
|
|
136
|
-
|
|
137
|
-
i ===
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
131
|
+
const { title: m, image: u, imageMode: $ } = t.notification;
|
|
132
|
+
let h = u;
|
|
133
|
+
i === I.TWEET && a != null && a.tweetMedia && (h = a.tweetMedia.image), $ === v.NONE && (h = "");
|
|
134
|
+
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);
|
|
135
|
+
return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(zs, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
|
|
136
|
+
h && !g && /* @__PURE__ */ s(O, { src: h, imageMode: $, withVideo: !!c }),
|
|
137
|
+
g && /* @__PURE__ */ s(O, { src: g, fromInsight: !0, withVideo: !!c }),
|
|
138
|
+
i === I.TWEET ? /* @__PURE__ */ s(Zs, { tweet: a }) : /* @__PURE__ */ s(Js, { questionTypeData: d, questionType: i, title: m }),
|
|
139
|
+
/* @__PURE__ */ s(Qs, { name: "inapp-button", children: r || "Open" }),
|
|
140
|
+
/* @__PURE__ */ s(Ws, { name: "chevronRight" })
|
|
140
141
|
] }) });
|
|
141
|
-
},
|
|
142
|
+
}, ee = () => ({
|
|
143
|
+
color: e
|
|
144
|
+
}) => e, B = /* @__PURE__ */ n("div")({
|
|
145
|
+
name: "MediaComponentWrap",
|
|
146
|
+
class: "mek728j",
|
|
147
|
+
propsAsIs: !1,
|
|
148
|
+
vars: {
|
|
149
|
+
"mek728j-0": [ee()]
|
|
150
|
+
}
|
|
151
|
+
}), T = /* @__PURE__ */ n("div")({
|
|
152
|
+
name: "Media",
|
|
153
|
+
class: "m461t56",
|
|
154
|
+
propsAsIs: !1
|
|
155
|
+
}), ne = () => T, oe = /* @__PURE__ */ n(ne())({
|
|
156
|
+
name: "MediaImgBottom",
|
|
157
|
+
class: "m22bh04",
|
|
158
|
+
propsAsIs: !0
|
|
159
|
+
}), ie = () => T, te = /* @__PURE__ */ n(ie())({
|
|
160
|
+
name: "MediaVideo",
|
|
161
|
+
class: "m17u1e34",
|
|
162
|
+
propsAsIs: !0
|
|
163
|
+
}), ae = () => T, re = /* @__PURE__ */ n(ae())({
|
|
164
|
+
name: "MediaImgContentMedia",
|
|
165
|
+
class: "m4j3eds",
|
|
166
|
+
propsAsIs: !0
|
|
167
|
+
}), ce = () => T, le = /* @__PURE__ */ n(ce())({
|
|
168
|
+
name: "MediaImgSolid",
|
|
169
|
+
class: "m1lp3swr",
|
|
170
|
+
propsAsIs: !0
|
|
171
|
+
}), de = () => T, pe = /* @__PURE__ */ n(de())({
|
|
172
|
+
name: "MediaImgRounded",
|
|
173
|
+
class: "mc7lij",
|
|
174
|
+
propsAsIs: !0
|
|
175
|
+
}), me = () => T, ue = /* @__PURE__ */ n(me())({
|
|
176
|
+
name: "MediaImgCentered",
|
|
177
|
+
class: "mwwaw7o",
|
|
178
|
+
propsAsIs: !0
|
|
179
|
+
}), ve = () => T, S = /* @__PURE__ */ n(ve())({
|
|
180
|
+
name: "MediaNone",
|
|
181
|
+
class: "mqfzyyr",
|
|
182
|
+
propsAsIs: !0
|
|
183
|
+
}), Ae = "v170mtgf", he = {
|
|
184
|
+
[v.UNSET]: S,
|
|
185
|
+
[v.NONE]: S,
|
|
186
|
+
[v.ROUNDED]: pe,
|
|
187
|
+
[v.CENTERED]: ue,
|
|
188
|
+
[v.TRANSPARENT]: oe,
|
|
189
|
+
[v.SOLID]: le
|
|
190
|
+
}, j = ({
|
|
191
|
+
src: e,
|
|
192
|
+
imageMode: i = v.UNSET,
|
|
193
|
+
withVideo: t,
|
|
194
|
+
color: o,
|
|
195
|
+
useContentMedia: a,
|
|
196
|
+
thumbnailUrl: p
|
|
197
|
+
}) => {
|
|
198
|
+
if (!e)
|
|
199
|
+
return /* @__PURE__ */ s(B, {
|
|
200
|
+
color: o,
|
|
201
|
+
children: /* @__PURE__ */ s(S, {})
|
|
202
|
+
});
|
|
203
|
+
const d = a === L.ENABLED ? re : he[i];
|
|
204
|
+
return /* @__PURE__ */ s(B, {
|
|
205
|
+
color: o,
|
|
206
|
+
children: t ? /* @__PURE__ */ s(te, {
|
|
207
|
+
children: /* @__PURE__ */ s($s, {
|
|
208
|
+
className: Ae,
|
|
209
|
+
source: e,
|
|
210
|
+
poster: p || ""
|
|
211
|
+
})
|
|
212
|
+
}) : /* @__PURE__ */ s(d, {
|
|
213
|
+
children: /* @__PURE__ */ s("img", {
|
|
214
|
+
src: e,
|
|
215
|
+
alt: ""
|
|
216
|
+
})
|
|
217
|
+
})
|
|
218
|
+
});
|
|
219
|
+
}, Ie = () => ({
|
|
220
|
+
withoutPadding: e
|
|
221
|
+
}) => e ? "0px" : "1rem", H = /* @__PURE__ */ n("div")({
|
|
222
|
+
name: "NotificationContent",
|
|
223
|
+
class: "n1p3bk1c",
|
|
224
|
+
propsAsIs: !1,
|
|
225
|
+
vars: {
|
|
226
|
+
"n1p3bk1c-0": [Ie()]
|
|
227
|
+
}
|
|
228
|
+
}), $e = /* @__PURE__ */ n("div")({
|
|
229
|
+
name: "MainContent",
|
|
230
|
+
class: "m1g211mu",
|
|
231
|
+
propsAsIs: !1
|
|
232
|
+
}), ge = () => A, we = /* @__PURE__ */ n(ge())({
|
|
233
|
+
name: "StyledChevronRight",
|
|
234
|
+
class: "sx1hq4c",
|
|
235
|
+
propsAsIs: !0
|
|
236
|
+
}), J = /* @__PURE__ */ n("div")({
|
|
237
|
+
name: "NotificationContainer",
|
|
238
|
+
class: "n1fcriet",
|
|
239
|
+
propsAsIs: !1
|
|
240
|
+
}), ye = () => ({
|
|
241
|
+
questionType: e
|
|
242
|
+
}) => e === I.FACTOID ? "7.3rem" : "4.5rem", Te = () => ({
|
|
243
|
+
webos: e
|
|
244
|
+
}) => e ? "11px 0px 8px 0px" : "11px 0px", be = () => ({
|
|
245
|
+
imageMode: e,
|
|
246
|
+
webos: i
|
|
247
|
+
}) => i ? "330px" : e === v.SOLID ? "310px" : e === v.CENTERED || e === v.ROUNDED || e === v.TRANSPARENT ? "370px" : "430px", Ce = /* @__PURE__ */ n("div")({
|
|
248
|
+
name: "Body",
|
|
249
|
+
class: "b1byyovs",
|
|
250
|
+
propsAsIs: !1,
|
|
251
|
+
vars: {
|
|
252
|
+
"b1byyovs-0": [ye()],
|
|
253
|
+
"b1byyovs-1": [Te()],
|
|
254
|
+
"b1byyovs-2": [be()]
|
|
255
|
+
}
|
|
256
|
+
}), fe = () => ({
|
|
257
|
+
webos: e
|
|
258
|
+
}) => e ? "0.85rem" : "1.033rem", ke = () => ({
|
|
259
|
+
webos: e
|
|
260
|
+
}) => e ? "0.95rem" : "1.25rem", Ne = () => ({
|
|
261
|
+
webos: e
|
|
262
|
+
}) => e ? "4.7rem" : "2.25rem", qe = () => ({
|
|
263
|
+
webos: e
|
|
264
|
+
}) => e ? "pre-wrap" : "nowrap", Le = /* @__PURE__ */ n("div")({
|
|
265
|
+
name: "Title",
|
|
266
|
+
class: "t1y5k5id",
|
|
267
|
+
propsAsIs: !1,
|
|
268
|
+
vars: {
|
|
269
|
+
"t1y5k5id-0": [fe()],
|
|
270
|
+
"t1y5k5id-1": [ke()],
|
|
271
|
+
"t1y5k5id-2": [Ne()],
|
|
272
|
+
"t1y5k5id-3": [qe()]
|
|
273
|
+
}
|
|
274
|
+
}), Se = /* @__PURE__ */ n("div")({
|
|
275
|
+
name: "Description",
|
|
276
|
+
class: "dw9eb7l",
|
|
277
|
+
propsAsIs: !1
|
|
278
|
+
}), Ee = /* @__PURE__ */ n("div")({
|
|
279
|
+
name: "LogoImgContainer",
|
|
280
|
+
class: "ldu8wgy",
|
|
281
|
+
propsAsIs: !1
|
|
282
|
+
}), Z = /* @__PURE__ */ n("img")({
|
|
283
|
+
name: "LogoImg",
|
|
284
|
+
class: "ln4a3eh",
|
|
285
|
+
propsAsIs: !1
|
|
286
|
+
}), xe = () => J, De = /* @__PURE__ */ n(xe())({
|
|
287
|
+
name: "NotificationInterstitialContainer",
|
|
288
|
+
class: "no2k63v",
|
|
289
|
+
propsAsIs: !0
|
|
290
|
+
}), Me = /* @__PURE__ */ n("div")({
|
|
291
|
+
name: "TVButtons",
|
|
292
|
+
class: "th9nn6a",
|
|
293
|
+
propsAsIs: !1
|
|
294
|
+
}), ss = /* @__PURE__ */ n("button")({
|
|
295
|
+
name: "TVButton",
|
|
296
|
+
class: "t1eee77p",
|
|
297
|
+
propsAsIs: !1
|
|
298
|
+
}), Re = () => ss, Oe = /* @__PURE__ */ n(Re())({
|
|
299
|
+
name: "DismissButton",
|
|
300
|
+
class: "ds000hw",
|
|
301
|
+
propsAsIs: !0
|
|
302
|
+
}), Be = () => ss, je = /* @__PURE__ */ n(Be())({
|
|
303
|
+
name: "AnswerButton",
|
|
304
|
+
class: "a1nz9hoe",
|
|
305
|
+
propsAsIs: !0
|
|
306
|
+
}), Pe = ({ title: e, questionType: i, questionTypeData: t, description: o, imageMode: a, webos: p }) => /* @__PURE__ */ l(Ce, { imageMode: a, questionType: i, webos: p, children: [
|
|
307
|
+
/* @__PURE__ */ s(
|
|
308
|
+
W,
|
|
309
|
+
{
|
|
310
|
+
questionTypeData: t,
|
|
311
|
+
questionType: i,
|
|
312
|
+
questionStatus: K.UNSET
|
|
313
|
+
}
|
|
314
|
+
),
|
|
315
|
+
e && /* @__PURE__ */ s(Le, { webos: p, children: e }),
|
|
316
|
+
o && /* @__PURE__ */ s(Se, { children: o })
|
|
317
|
+
] }), Ue = E(De), ze = E(Oe), Ve = E(je), Fe = ({
|
|
318
|
+
sponsorLogo: e,
|
|
319
|
+
onClick: i,
|
|
320
|
+
webos: t
|
|
321
|
+
}) => /* @__PURE__ */ s(Ue, { autoFocus: !0, webos: t, onClick: i, "data-webos": t, children: /* @__PURE__ */ s(H, { withoutPadding: !0, children: /* @__PURE__ */ s(Z, { src: e }) }) }), Qe = ({
|
|
322
|
+
action: e,
|
|
323
|
+
close: i,
|
|
324
|
+
questionType: t,
|
|
325
|
+
inApp: o,
|
|
326
|
+
insight: a,
|
|
327
|
+
color: p,
|
|
328
|
+
webos: d
|
|
329
|
+
}) => {
|
|
330
|
+
var r, m, u;
|
|
331
|
+
const [$, h] = w(!1), g = G();
|
|
332
|
+
y(() => (o != null && o.sponsorLogo && (h(!0), g.current = setTimeout(() => {
|
|
333
|
+
h(!1);
|
|
334
|
+
}, 5e3)), () => clearTimeout(g.current)), [o == null ? void 0 : o.sponsorLogo]);
|
|
335
|
+
const c = _[t];
|
|
336
|
+
if (!c || !o || !o.notification)
|
|
337
|
+
return null;
|
|
338
|
+
const { title: ls, image: ds, imageMode: C, useContentMedia: f } = o.notification, ps = t === I.FACTOID ? a == null ? void 0 : a.heading : ls, ms = t === I.FACTOID ? a == null ? void 0 : a.body : "", us = ds, k = t === I.FACTOID && ((r = a == null ? void 0 : a.video) == null ? void 0 : r.url) && (o == null ? void 0 : o.isVideo) && f === L.ENABLED, N = f === L.ENABLED ? k ? (m = a == null ? void 0 : a.video) == null ? void 0 : m.url : a == null ? void 0 : a.image : "";
|
|
339
|
+
return o != null && o.sponsorLogo && $ ? /* @__PURE__ */ s(
|
|
340
|
+
Fe,
|
|
341
|
+
{
|
|
342
|
+
sponsorLogo: o == null ? void 0 : o.sponsorLogo,
|
|
343
|
+
webos: d,
|
|
344
|
+
onClick: () => h(!1)
|
|
345
|
+
}
|
|
346
|
+
) : /* @__PURE__ */ l(
|
|
347
|
+
J,
|
|
348
|
+
{
|
|
349
|
+
"data-a": "intr",
|
|
350
|
+
className: "SL_InApp",
|
|
351
|
+
onClick: (vs) => {
|
|
352
|
+
d && (e == null || e(vs));
|
|
353
|
+
},
|
|
354
|
+
"data-is-insight": t === I.FACTOID,
|
|
355
|
+
"data-webos": d,
|
|
356
|
+
children: [
|
|
357
|
+
(o == null ? void 0 : o.sponsorLogo) && /* @__PURE__ */ s(Ee, { children: /* @__PURE__ */ s(Z, { src: o == null ? void 0 : o.sponsorLogo }) }),
|
|
358
|
+
/* @__PURE__ */ l(H, { children: [
|
|
359
|
+
/* @__PURE__ */ l($e, { children: [
|
|
360
|
+
!N && /* @__PURE__ */ s(j, { src: us, imageMode: C, withVideo: !!k, color: p }),
|
|
361
|
+
N && /* @__PURE__ */ s(
|
|
362
|
+
j,
|
|
363
|
+
{
|
|
364
|
+
src: N,
|
|
365
|
+
imageMode: C,
|
|
366
|
+
withVideo: !!k,
|
|
367
|
+
color: p,
|
|
368
|
+
useContentMedia: f,
|
|
369
|
+
thumbnailUrl: (u = a == null ? void 0 : a.video) == null ? void 0 : u.thumbnailUrl
|
|
370
|
+
}
|
|
371
|
+
),
|
|
372
|
+
/* @__PURE__ */ s(
|
|
373
|
+
Pe,
|
|
374
|
+
{
|
|
375
|
+
questionTypeData: c,
|
|
376
|
+
questionType: t,
|
|
377
|
+
title: ps,
|
|
378
|
+
description: ms,
|
|
379
|
+
imageMode: C,
|
|
380
|
+
webos: d
|
|
381
|
+
}
|
|
382
|
+
)
|
|
383
|
+
] }),
|
|
384
|
+
!d && /* @__PURE__ */ s(we, { name: "chevronRight" }),
|
|
385
|
+
d && /* @__PURE__ */ l(Me, { children: [
|
|
386
|
+
/* @__PURE__ */ s(ze, { webos: !0, "data-close-btn": "true", onClick: i, children: "Dismiss" }),
|
|
387
|
+
/* @__PURE__ */ s(Ve, { webos: !0, autoFocus: !0, onClick: e, children: "Answer" })
|
|
388
|
+
] })
|
|
389
|
+
] })
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
}, Ye = /* @__PURE__ */ n("div")({
|
|
142
394
|
name: "NotificationContainer",
|
|
143
395
|
class: "n11jcrxe",
|
|
144
396
|
propsAsIs: !1
|
|
145
|
-
}),
|
|
397
|
+
}), P = /* @__PURE__ */ n("img")({
|
|
146
398
|
name: "Icon",
|
|
147
399
|
class: "i1vmpt6u",
|
|
148
400
|
propsAsIs: !1
|
|
149
|
-
}),
|
|
401
|
+
}), We = /* @__PURE__ */ n("div")({
|
|
150
402
|
name: "IconContainer",
|
|
151
403
|
class: "i180665s",
|
|
152
404
|
propsAsIs: !1
|
|
153
|
-
}),
|
|
405
|
+
}), _e = () => A, Ge = /* @__PURE__ */ n(_e())({
|
|
154
406
|
name: "TitleIcon",
|
|
155
407
|
class: "t16zzzei",
|
|
156
408
|
propsAsIs: !0
|
|
157
|
-
}),
|
|
409
|
+
}), Ke = () => gs, Xe = /* @__PURE__ */ n(Ke())({
|
|
158
410
|
name: "Close",
|
|
159
411
|
class: "c1sur0q2",
|
|
160
412
|
propsAsIs: !0
|
|
161
|
-
}),
|
|
413
|
+
}), He = /* @__PURE__ */ n("div")({
|
|
162
414
|
name: "Body",
|
|
163
415
|
class: "bai9j52",
|
|
164
416
|
propsAsIs: !1
|
|
165
|
-
}),
|
|
417
|
+
}), Je = /* @__PURE__ */ n("div")({
|
|
166
418
|
name: "Title",
|
|
167
419
|
class: "t1bnt25p",
|
|
168
420
|
propsAsIs: !1
|
|
169
|
-
}),
|
|
421
|
+
}), Ze = /* @__PURE__ */ n("div")({
|
|
170
422
|
name: "Description",
|
|
171
423
|
class: "dmixjec",
|
|
172
424
|
propsAsIs: !1
|
|
173
|
-
}),
|
|
425
|
+
}), sn = /* @__PURE__ */ n("button")({
|
|
174
426
|
name: "Button",
|
|
175
427
|
class: "b1ubkw1q",
|
|
176
428
|
propsAsIs: !1
|
|
177
|
-
}),
|
|
178
|
-
open:
|
|
429
|
+
}), en = ({
|
|
430
|
+
open: e,
|
|
179
431
|
close: i,
|
|
180
|
-
...
|
|
432
|
+
...t
|
|
181
433
|
}) => {
|
|
182
|
-
var
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
|
|
434
|
+
var o, a;
|
|
435
|
+
return /* @__PURE__ */ l(
|
|
436
|
+
Ye,
|
|
185
437
|
{
|
|
186
438
|
"data-a": "intr",
|
|
187
439
|
onClick: () => {
|
|
188
|
-
|
|
440
|
+
e == null || e(), t && t.markIstantOpen();
|
|
189
441
|
},
|
|
190
442
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
|
|
443
|
+
/* @__PURE__ */ l(We, { children: [
|
|
444
|
+
/* @__PURE__ */ s(P, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
|
|
445
|
+
/* @__PURE__ */ s(
|
|
446
|
+
P,
|
|
195
447
|
{
|
|
196
448
|
className: "on-dark",
|
|
197
449
|
src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
|
|
198
450
|
}
|
|
199
451
|
)
|
|
200
452
|
] }),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
(
|
|
453
|
+
/* @__PURE__ */ l(He, { children: [
|
|
454
|
+
/* @__PURE__ */ l(Je, { children: [
|
|
455
|
+
/* @__PURE__ */ s(Ge, { name: "icon-trophy-solid" }),
|
|
456
|
+
(o = t == null ? void 0 : t.titleCard) == null ? void 0 : o.title
|
|
205
457
|
] }),
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ l(Ze, { children: [
|
|
459
|
+
/* @__PURE__ */ s("span", { children: (a = t == null ? void 0 : t.titleCard) == null ? void 0 : a.subtitle }),
|
|
460
|
+
/* @__PURE__ */ s(sn, { name: "inapp-button", children: "Play Now" })
|
|
209
461
|
] })
|
|
210
462
|
] }),
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
|
|
463
|
+
/* @__PURE__ */ s(
|
|
464
|
+
Xe,
|
|
213
465
|
{
|
|
214
|
-
close: (
|
|
215
|
-
|
|
466
|
+
close: (p) => {
|
|
467
|
+
p == null || p.stopPropagation(), i == null || i();
|
|
216
468
|
}
|
|
217
469
|
}
|
|
218
470
|
)
|
|
219
471
|
]
|
|
220
472
|
}
|
|
221
473
|
);
|
|
222
|
-
},
|
|
474
|
+
}, nn = /* @__PURE__ */ n("div")({
|
|
223
475
|
name: "Container",
|
|
224
476
|
class: "cef8huz",
|
|
225
477
|
propsAsIs: !1
|
|
226
|
-
}),
|
|
478
|
+
}), on = () => A, tn = /* @__PURE__ */ n(on())({
|
|
227
479
|
name: "CheckIcon",
|
|
228
480
|
class: "c1mo15kk",
|
|
229
481
|
propsAsIs: !0
|
|
230
|
-
}),
|
|
482
|
+
}), an = () => A, rn = /* @__PURE__ */ n(an())({
|
|
231
483
|
name: "PredictionIcon",
|
|
232
484
|
class: "p16zkqnm",
|
|
233
485
|
propsAsIs: !0
|
|
234
|
-
}),
|
|
486
|
+
}), cn = /* @__PURE__ */ n("div")({
|
|
235
487
|
name: "PredictionIconContainer",
|
|
236
488
|
class: "pjszi7a",
|
|
237
489
|
propsAsIs: !1
|
|
238
|
-
}),
|
|
490
|
+
}), ln = /* @__PURE__ */ n("div")({
|
|
239
491
|
name: "BodyContainer",
|
|
240
492
|
class: "bftbmo3",
|
|
241
493
|
propsAsIs: !1
|
|
242
|
-
}),
|
|
494
|
+
}), dn = /* @__PURE__ */ n("div")({
|
|
243
495
|
name: "Body",
|
|
244
496
|
class: "barrbyu",
|
|
245
497
|
propsAsIs: !1
|
|
246
|
-
}),
|
|
498
|
+
}), pn = /* @__PURE__ */ n("div")({
|
|
247
499
|
name: "Subtitle",
|
|
248
500
|
class: "sz7237i",
|
|
249
501
|
propsAsIs: !1
|
|
250
|
-
}),
|
|
251
|
-
step:
|
|
502
|
+
}), mn = ({
|
|
503
|
+
step: e,
|
|
252
504
|
children: i,
|
|
253
|
-
answer:
|
|
254
|
-
state:
|
|
505
|
+
answer: t,
|
|
506
|
+
state: o = "pending"
|
|
255
507
|
}) => {
|
|
256
|
-
const [
|
|
508
|
+
const [a, p] = w(0), [d] = w(() => new ResizeObserver((m) => {
|
|
257
509
|
window.requestAnimationFrame(() => {
|
|
258
|
-
var
|
|
259
|
-
|
|
510
|
+
var u, $;
|
|
511
|
+
p((($ = (u = m == null ? void 0 : m[0]) == null ? void 0 : u.contentRect) == null ? void 0 : $.width) ?? 0);
|
|
260
512
|
});
|
|
261
|
-
})), r =
|
|
262
|
-
|
|
263
|
-
}, [
|
|
264
|
-
return
|
|
265
|
-
|
|
266
|
-
}, [
|
|
267
|
-
children: [/* @__PURE__ */
|
|
268
|
-
children: /* @__PURE__ */
|
|
513
|
+
})), r = Ns((m) => {
|
|
514
|
+
m ? d.observe(m) : d.disconnect();
|
|
515
|
+
}, [d]);
|
|
516
|
+
return y(() => () => {
|
|
517
|
+
d.disconnect();
|
|
518
|
+
}, [d]), /* @__PURE__ */ l(nn, {
|
|
519
|
+
children: [/* @__PURE__ */ s(cn, {
|
|
520
|
+
children: /* @__PURE__ */ s(rn, {
|
|
269
521
|
name: "icon-prediction"
|
|
270
522
|
})
|
|
271
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ s(ln, {
|
|
272
524
|
style: {
|
|
273
|
-
minWidth: `${
|
|
525
|
+
minWidth: `${a}px`
|
|
274
526
|
},
|
|
275
|
-
children: /* @__PURE__ */
|
|
527
|
+
children: /* @__PURE__ */ s(dn, {
|
|
276
528
|
children: i
|
|
277
|
-
},
|
|
278
|
-
}), /* @__PURE__ */
|
|
529
|
+
}, e)
|
|
530
|
+
}), /* @__PURE__ */ s(pn, {
|
|
279
531
|
ref: r,
|
|
280
|
-
className:
|
|
281
|
-
children: /* @__PURE__ */
|
|
282
|
-
children: [/* @__PURE__ */
|
|
532
|
+
className: o,
|
|
533
|
+
children: /* @__PURE__ */ l("div", {
|
|
534
|
+
children: [/* @__PURE__ */ s(tn, {
|
|
283
535
|
name: "icon-check"
|
|
284
|
-
}), "Your Pick: ",
|
|
536
|
+
}), "Your Pick: ", t]
|
|
285
537
|
})
|
|
286
538
|
})]
|
|
287
539
|
});
|
|
288
|
-
},
|
|
540
|
+
}, un = /* @__PURE__ */ n("div")({
|
|
289
541
|
name: "Container",
|
|
290
542
|
class: "ckyzolp",
|
|
291
543
|
propsAsIs: !1
|
|
292
|
-
}),
|
|
544
|
+
}), x = /* @__PURE__ */ n("div")({
|
|
293
545
|
name: "Line",
|
|
294
546
|
class: "l16t1zr7",
|
|
295
547
|
propsAsIs: !1
|
|
296
|
-
}),
|
|
548
|
+
}), vn = () => x, An = /* @__PURE__ */ n(vn())({
|
|
297
549
|
name: "Line1",
|
|
298
550
|
class: "le78kvg",
|
|
299
551
|
propsAsIs: !0
|
|
300
|
-
}),
|
|
552
|
+
}), hn = () => x, In = /* @__PURE__ */ n(hn())({
|
|
301
553
|
name: "Line2",
|
|
302
554
|
class: "l1o7966d",
|
|
303
555
|
propsAsIs: !0
|
|
304
|
-
}),
|
|
556
|
+
}), $n = () => x, gn = /* @__PURE__ */ n($n())({
|
|
305
557
|
name: "Line3",
|
|
306
558
|
class: "lu9lyxq",
|
|
307
559
|
propsAsIs: !0
|
|
308
|
-
}),
|
|
309
|
-
children: [/* @__PURE__ */
|
|
310
|
-
children: /* @__PURE__ */
|
|
311
|
-
}), /* @__PURE__ */
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
-
}), /* @__PURE__ */
|
|
314
|
-
children: /* @__PURE__ */
|
|
560
|
+
}), wn = () => /* @__PURE__ */ l(un, {
|
|
561
|
+
children: [/* @__PURE__ */ s(An, {
|
|
562
|
+
children: /* @__PURE__ */ s("div", {})
|
|
563
|
+
}), /* @__PURE__ */ s(In, {
|
|
564
|
+
children: /* @__PURE__ */ s("div", {})
|
|
565
|
+
}), /* @__PURE__ */ s(gn, {
|
|
566
|
+
children: /* @__PURE__ */ s("div", {})
|
|
315
567
|
})]
|
|
316
|
-
}),
|
|
568
|
+
}), yn = /* @__PURE__ */ n("div")({
|
|
317
569
|
name: "Container",
|
|
318
570
|
class: "c10jy6zf",
|
|
319
571
|
propsAsIs: !1
|
|
320
|
-
}),
|
|
572
|
+
}), Tn = () => A, bn = /* @__PURE__ */ n(Tn())({
|
|
321
573
|
name: "CheckIcon",
|
|
322
574
|
class: "c1c7scay",
|
|
323
575
|
propsAsIs: !0
|
|
324
|
-
}),
|
|
325
|
-
children: [/* @__PURE__ */
|
|
576
|
+
}), Cn = () => /* @__PURE__ */ l(yn, {
|
|
577
|
+
children: [/* @__PURE__ */ s(bn, {
|
|
326
578
|
name: "icon-check"
|
|
327
579
|
}), " Prediction results are in!"]
|
|
328
|
-
}),
|
|
580
|
+
}), fn = /* @__PURE__ */ n("div")({
|
|
329
581
|
name: "Container",
|
|
330
582
|
class: "cf6k2yy",
|
|
331
583
|
propsAsIs: !1
|
|
332
|
-
}),
|
|
584
|
+
}), kn = /* @__PURE__ */ n("div")({
|
|
333
585
|
name: "Caption",
|
|
334
586
|
class: "c1c8xjus",
|
|
335
587
|
propsAsIs: !1
|
|
336
|
-
}),
|
|
588
|
+
}), Nn = /* @__PURE__ */ n("div")({
|
|
337
589
|
name: "Title",
|
|
338
590
|
class: "t1d1uekn",
|
|
339
591
|
propsAsIs: !1
|
|
340
|
-
}),
|
|
341
|
-
title:
|
|
342
|
-
}) => /* @__PURE__ */
|
|
343
|
-
children: [/* @__PURE__ */
|
|
592
|
+
}), qn = ({
|
|
593
|
+
title: e
|
|
594
|
+
}) => /* @__PURE__ */ l(fn, {
|
|
595
|
+
children: [/* @__PURE__ */ s(kn, {
|
|
344
596
|
children: "Results for"
|
|
345
|
-
}), /* @__PURE__ */
|
|
346
|
-
children:
|
|
597
|
+
}), /* @__PURE__ */ s(Nn, {
|
|
598
|
+
children: e
|
|
347
599
|
})]
|
|
348
|
-
}),
|
|
600
|
+
}), es = /* @__PURE__ */ n("div")({
|
|
349
601
|
name: "Container",
|
|
350
602
|
class: "c181a1as",
|
|
351
603
|
propsAsIs: !1
|
|
352
|
-
}),
|
|
604
|
+
}), ns = /* @__PURE__ */ n("div")({
|
|
353
605
|
name: "Title",
|
|
354
606
|
class: "t1cduox6",
|
|
355
607
|
propsAsIs: !1
|
|
356
|
-
}),
|
|
608
|
+
}), Ln = () => A, os = /* @__PURE__ */ n(Ln())({
|
|
357
609
|
name: "CorrectIcon",
|
|
358
610
|
class: "c1onrv6j",
|
|
359
611
|
propsAsIs: !0
|
|
360
|
-
}),
|
|
612
|
+
}), Sn = () => os, En = /* @__PURE__ */ n(Sn())({
|
|
361
613
|
name: "InCorrectIcon",
|
|
362
614
|
class: "i17n9o7e",
|
|
363
615
|
propsAsIs: !0
|
|
364
|
-
}),
|
|
365
|
-
children: [/* @__PURE__ */
|
|
366
|
-
children: ["Congratulations!", /* @__PURE__ */
|
|
367
|
-
}), /* @__PURE__ */
|
|
616
|
+
}), xn = () => /* @__PURE__ */ l(es, {
|
|
617
|
+
children: [/* @__PURE__ */ l(ns, {
|
|
618
|
+
children: ["Congratulations!", /* @__PURE__ */ s("br", {}), "You answered correctly."]
|
|
619
|
+
}), /* @__PURE__ */ s(os, {
|
|
368
620
|
name: "icon-check"
|
|
369
621
|
})]
|
|
370
|
-
}),
|
|
371
|
-
title:
|
|
372
|
-
}) => /* @__PURE__ */
|
|
373
|
-
children: [/* @__PURE__ */
|
|
374
|
-
children: ["Better luck next time!", /* @__PURE__ */
|
|
375
|
-
}), /* @__PURE__ */
|
|
622
|
+
}), Dn = ({
|
|
623
|
+
title: e
|
|
624
|
+
}) => /* @__PURE__ */ l(es, {
|
|
625
|
+
children: [/* @__PURE__ */ l(ns, {
|
|
626
|
+
children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", e]
|
|
627
|
+
}), /* @__PURE__ */ s(En, {
|
|
376
628
|
name: "icon-cross"
|
|
377
629
|
})]
|
|
378
|
-
}),
|
|
630
|
+
}), Mn = /* @__PURE__ */ n("div")({
|
|
379
631
|
name: "Container",
|
|
380
632
|
class: "cnxgcs2",
|
|
381
633
|
propsAsIs: !1
|
|
382
|
-
}),
|
|
634
|
+
}), Rn = /* @__PURE__ */ n("div")({
|
|
383
635
|
name: "Title",
|
|
384
636
|
class: "t903f8n",
|
|
385
637
|
propsAsIs: !1
|
|
386
|
-
}),
|
|
638
|
+
}), On = () => A, Bn = /* @__PURE__ */ n(On())({
|
|
387
639
|
name: "CheckIcon",
|
|
388
640
|
class: "ceyu3qj",
|
|
389
641
|
propsAsIs: !0
|
|
390
|
-
}),
|
|
391
|
-
points:
|
|
392
|
-
}) => /* @__PURE__ */
|
|
393
|
-
children: [/* @__PURE__ */
|
|
394
|
-
children: ["You won ", /* @__PURE__ */
|
|
642
|
+
}), jn = ({
|
|
643
|
+
points: e
|
|
644
|
+
}) => /* @__PURE__ */ l(Mn, {
|
|
645
|
+
children: [/* @__PURE__ */ l(Rn, {
|
|
646
|
+
children: ["You won ", /* @__PURE__ */ s(ws, {
|
|
395
647
|
delay: 0.5,
|
|
396
648
|
prefix: "+",
|
|
397
649
|
suffix: " points",
|
|
398
|
-
value:
|
|
650
|
+
value: e
|
|
399
651
|
})]
|
|
400
|
-
}), /* @__PURE__ */
|
|
652
|
+
}), /* @__PURE__ */ s(Bn, {
|
|
401
653
|
name: "icon-trophy-solid"
|
|
402
654
|
})]
|
|
403
|
-
}),
|
|
655
|
+
}), U = /* @__PURE__ */ n("div")({
|
|
404
656
|
name: "Container",
|
|
405
657
|
class: "cq3agu2",
|
|
406
658
|
propsAsIs: !1
|
|
407
|
-
}),
|
|
659
|
+
}), z = /* @__PURE__ */ n("div")({
|
|
408
660
|
name: "Body",
|
|
409
661
|
class: "b16qj0do",
|
|
410
662
|
propsAsIs: !1
|
|
411
|
-
}),
|
|
663
|
+
}), V = {
|
|
412
664
|
1: 3e3,
|
|
413
665
|
2: 4e3,
|
|
414
666
|
3: 4e3,
|
|
415
667
|
4: 4e3
|
|
416
|
-
},
|
|
417
|
-
if (
|
|
418
|
-
if (
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
},
|
|
668
|
+
}, Pn = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
|
|
669
|
+
if (y(() => {
|
|
670
|
+
if (t) {
|
|
671
|
+
const u = setTimeout(() => {
|
|
672
|
+
V[r + 1] && (a || r < 3) ? t(r + 1) : e == null || e();
|
|
673
|
+
}, V[r]);
|
|
422
674
|
return () => {
|
|
423
|
-
|
|
675
|
+
u && clearTimeout(u);
|
|
424
676
|
};
|
|
425
677
|
}
|
|
426
678
|
return () => {
|
|
427
679
|
};
|
|
428
|
-
}, [
|
|
429
|
-
return /* @__PURE__ */
|
|
430
|
-
let
|
|
431
|
-
return (r === 3 || r === 4) && (
|
|
432
|
-
r !== 1 && /* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
r === 2 && /* @__PURE__ */
|
|
435
|
-
r === 3 &&
|
|
436
|
-
r === 3 && !
|
|
437
|
-
r === 4 && /* @__PURE__ */
|
|
680
|
+
}, [t, r, e, a]), r === 1)
|
|
681
|
+
return /* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(z, { children: /* @__PURE__ */ s(Cn, {}) }) });
|
|
682
|
+
let m = "pending";
|
|
683
|
+
return (r === 3 || r === 4) && (m = a ? "correct" : "incorrect"), /* @__PURE__ */ s(U, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ l(z, { children: [
|
|
684
|
+
r !== 1 && /* @__PURE__ */ s(wn, {}, r),
|
|
685
|
+
/* @__PURE__ */ l(mn, { state: m, step: r, answer: (o == null ? void 0 : o.title) || "unknown", children: [
|
|
686
|
+
r === 2 && /* @__PURE__ */ s(qn, { title: d || "unknown" }),
|
|
687
|
+
r === 3 && a && /* @__PURE__ */ s(xn, {}),
|
|
688
|
+
r === 3 && !a && /* @__PURE__ */ s(Dn, { title: p || "unknown" }),
|
|
689
|
+
r === 4 && /* @__PURE__ */ s(jn, { points: (o == null ? void 0 : o.points) || 0 })
|
|
438
690
|
] })
|
|
439
691
|
] }) });
|
|
440
|
-
},
|
|
441
|
-
const [
|
|
442
|
-
return /* @__PURE__ */
|
|
443
|
-
|
|
692
|
+
}, Un = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
|
|
693
|
+
const [d, r] = w(1);
|
|
694
|
+
return /* @__PURE__ */ s(
|
|
695
|
+
Pn,
|
|
444
696
|
{
|
|
445
|
-
close:
|
|
697
|
+
close: e,
|
|
446
698
|
action: i,
|
|
447
|
-
votedAnswer:
|
|
448
|
-
correct:
|
|
449
|
-
correctAnswerTitle:
|
|
450
|
-
questionTitle:
|
|
699
|
+
votedAnswer: t,
|
|
700
|
+
correct: o,
|
|
701
|
+
correctAnswerTitle: a,
|
|
702
|
+
questionTitle: p,
|
|
451
703
|
setStep: r,
|
|
452
|
-
step:
|
|
704
|
+
step: d,
|
|
453
705
|
title: ""
|
|
454
706
|
}
|
|
455
707
|
);
|
|
456
|
-
},
|
|
708
|
+
}, zn = /* @__PURE__ */ n("div")({
|
|
457
709
|
name: "NotificationContainer",
|
|
458
710
|
class: "n1i4h28u",
|
|
459
711
|
propsAsIs: !1
|
|
460
|
-
}),
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
712
|
+
}), Vn = (e) => /* @__PURE__ */ s(zn, { children: /* @__PURE__ */ s(Un, { ...e }) }), Fn = /* @__PURE__ */ n("div")({
|
|
713
|
+
name: "Container",
|
|
714
|
+
class: "cwa9tgs",
|
|
715
|
+
propsAsIs: !1
|
|
716
|
+
}), Qn = /* @__PURE__ */ n("div")({
|
|
717
|
+
name: "BodyContainer",
|
|
718
|
+
class: "b1xx7swj",
|
|
719
|
+
propsAsIs: !1
|
|
720
|
+
}), Yn = /* @__PURE__ */ n("div")({
|
|
721
|
+
name: "Body",
|
|
722
|
+
class: "b1a21en",
|
|
723
|
+
propsAsIs: !1
|
|
724
|
+
}), Wn = ({
|
|
725
|
+
step: e,
|
|
726
|
+
children: i,
|
|
727
|
+
state: t = "pending"
|
|
728
|
+
}) => {
|
|
729
|
+
const [o, a] = w(0);
|
|
730
|
+
return y(() => {
|
|
731
|
+
const p = new ResizeObserver((d) => {
|
|
732
|
+
window.requestAnimationFrame(() => {
|
|
733
|
+
var r, m;
|
|
734
|
+
const u = ((m = (r = d == null ? void 0 : d[0]) == null ? void 0 : r.contentRect) == null ? void 0 : m.width) ?? 0;
|
|
735
|
+
a(u);
|
|
736
|
+
});
|
|
737
|
+
});
|
|
738
|
+
return () => {
|
|
739
|
+
p.disconnect();
|
|
740
|
+
};
|
|
741
|
+
}, []), /* @__PURE__ */ s(Fn, {
|
|
742
|
+
style: {
|
|
743
|
+
padding: `${e === 3 && t === "incorrect" || e === 1 ? "5px 100px" : "5px 40px"}`
|
|
744
|
+
},
|
|
745
|
+
children: /* @__PURE__ */ s(Qn, {
|
|
746
|
+
style: {
|
|
747
|
+
minWidth: `${o}px`
|
|
748
|
+
},
|
|
749
|
+
children: /* @__PURE__ */ s(Yn, {
|
|
750
|
+
children: i
|
|
751
|
+
}, e)
|
|
752
|
+
})
|
|
753
|
+
});
|
|
754
|
+
}, _n = /* @__PURE__ */ n("div")({
|
|
755
|
+
name: "Container",
|
|
756
|
+
class: "c1nd5cu8",
|
|
757
|
+
propsAsIs: !1
|
|
758
|
+
}), D = /* @__PURE__ */ n("div")({
|
|
759
|
+
name: "Line",
|
|
760
|
+
class: "lgbipw0",
|
|
761
|
+
propsAsIs: !1
|
|
762
|
+
}), Gn = () => D, Kn = /* @__PURE__ */ n(Gn())({
|
|
763
|
+
name: "Line1",
|
|
764
|
+
class: "l1anth16",
|
|
765
|
+
propsAsIs: !0
|
|
766
|
+
}), Xn = () => D, Hn = /* @__PURE__ */ n(Xn())({
|
|
767
|
+
name: "Line2",
|
|
768
|
+
class: "l193yd7v",
|
|
769
|
+
propsAsIs: !0
|
|
770
|
+
}), Jn = () => D, Zn = /* @__PURE__ */ n(Jn())({
|
|
771
|
+
name: "Line3",
|
|
772
|
+
class: "lhbflsp",
|
|
773
|
+
propsAsIs: !0
|
|
774
|
+
}), so = () => /* @__PURE__ */ l(_n, {
|
|
775
|
+
children: [/* @__PURE__ */ s(Kn, {
|
|
776
|
+
children: /* @__PURE__ */ s("div", {})
|
|
777
|
+
}), /* @__PURE__ */ s(Hn, {
|
|
778
|
+
children: /* @__PURE__ */ s("div", {})
|
|
779
|
+
}), /* @__PURE__ */ s(Zn, {
|
|
780
|
+
children: /* @__PURE__ */ s("div", {})
|
|
781
|
+
})]
|
|
782
|
+
}), eo = /* @__PURE__ */ n("div")({
|
|
783
|
+
name: "Container",
|
|
784
|
+
class: "c1lvd429",
|
|
785
|
+
propsAsIs: !1
|
|
786
|
+
}), no = () => A, oo = /* @__PURE__ */ n(no())({
|
|
787
|
+
name: "PredictionIcon",
|
|
788
|
+
class: "p1n4m87t",
|
|
789
|
+
propsAsIs: !0
|
|
790
|
+
}), io = () => /* @__PURE__ */ l(eo, {
|
|
791
|
+
children: [/* @__PURE__ */ s(oo, {
|
|
792
|
+
name: "icon-prediction"
|
|
793
|
+
}), " Prediction results are in!"]
|
|
794
|
+
}), to = () => A, ao = /* @__PURE__ */ n(to())({
|
|
795
|
+
name: "CheckIcon",
|
|
796
|
+
class: "c126r8f9",
|
|
797
|
+
propsAsIs: !0
|
|
798
|
+
}), ro = /* @__PURE__ */ n("div")({
|
|
799
|
+
name: "Answer",
|
|
800
|
+
class: "a1o2rpgl",
|
|
801
|
+
propsAsIs: !1
|
|
802
|
+
}), co = /* @__PURE__ */ n("div")({
|
|
803
|
+
name: "Container",
|
|
804
|
+
class: "cej6ci1",
|
|
805
|
+
propsAsIs: !1
|
|
806
|
+
}), lo = /* @__PURE__ */ n("div")({
|
|
807
|
+
name: "Title",
|
|
808
|
+
class: "tob24mr",
|
|
809
|
+
propsAsIs: !1
|
|
810
|
+
}), po = ({
|
|
811
|
+
title: e,
|
|
812
|
+
answer: i
|
|
813
|
+
}) => /* @__PURE__ */ l(co, {
|
|
814
|
+
children: [/* @__PURE__ */ s(lo, {
|
|
815
|
+
children: e
|
|
816
|
+
}), /* @__PURE__ */ l(ro, {
|
|
817
|
+
children: [/* @__PURE__ */ s(ao, {
|
|
818
|
+
name: "icon-prediction"
|
|
819
|
+
}), "Your Pick: ", i]
|
|
820
|
+
})]
|
|
821
|
+
}), is = /* @__PURE__ */ n("div")({
|
|
822
|
+
name: "Container",
|
|
823
|
+
class: "c1lesal4",
|
|
824
|
+
propsAsIs: !1
|
|
825
|
+
}), ts = /* @__PURE__ */ n("div")({
|
|
826
|
+
name: "Title",
|
|
827
|
+
class: "tv66n4w",
|
|
828
|
+
propsAsIs: !1
|
|
829
|
+
}), mo = () => A, uo = /* @__PURE__ */ n(mo())({
|
|
830
|
+
name: "CorrectIcon",
|
|
831
|
+
class: "cx0vlv2",
|
|
832
|
+
propsAsIs: !0
|
|
833
|
+
}), as = /* @__PURE__ */ n("div")({
|
|
834
|
+
name: "Answer",
|
|
835
|
+
class: "akfh4v5",
|
|
836
|
+
propsAsIs: !1
|
|
837
|
+
}), vo = ({
|
|
838
|
+
answer: e
|
|
839
|
+
}) => /* @__PURE__ */ l(is, {
|
|
840
|
+
children: [/* @__PURE__ */ s(ts, {
|
|
841
|
+
children: "Congratulations! You answered correctly."
|
|
842
|
+
}), /* @__PURE__ */ l(as, {
|
|
843
|
+
children: [/* @__PURE__ */ s(uo, {
|
|
844
|
+
name: "icon-correct"
|
|
845
|
+
}), "Your Pick: ", e]
|
|
846
|
+
})]
|
|
847
|
+
}), Ao = ({
|
|
848
|
+
title: e,
|
|
849
|
+
answer: i
|
|
850
|
+
}) => /* @__PURE__ */ l(is, {
|
|
851
|
+
children: [/* @__PURE__ */ l(ts, {
|
|
852
|
+
children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", e]
|
|
853
|
+
}), /* @__PURE__ */ l(as, {
|
|
854
|
+
children: ["Your Pick: ", i]
|
|
855
|
+
})]
|
|
856
|
+
}), F = /* @__PURE__ */ n("div")({
|
|
857
|
+
name: "Container",
|
|
858
|
+
class: "cmox3ot",
|
|
859
|
+
propsAsIs: !1
|
|
860
|
+
}), Q = /* @__PURE__ */ n("div")({
|
|
861
|
+
name: "Body",
|
|
862
|
+
class: "bqq1ix4",
|
|
863
|
+
propsAsIs: !1
|
|
864
|
+
}), Y = {
|
|
865
|
+
1: 3e3,
|
|
866
|
+
2: 4e3,
|
|
867
|
+
3: 4e3
|
|
868
|
+
}, ho = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
|
|
869
|
+
if (y(() => {
|
|
870
|
+
if (t) {
|
|
871
|
+
const u = setTimeout(() => {
|
|
872
|
+
Y[r + 1] && (a || r < 3) ? t(r + 1) : e == null || e();
|
|
873
|
+
}, Y[r]);
|
|
874
|
+
return () => {
|
|
875
|
+
u && clearTimeout(u);
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
return () => {
|
|
879
|
+
};
|
|
880
|
+
}, [t, r, e, a]), r === 1)
|
|
881
|
+
return /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(io, {}) }) });
|
|
882
|
+
let m = "pending";
|
|
883
|
+
return r === 3 && (m = a ? "correct" : "incorrect"), /* @__PURE__ */ s(F, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ l(Q, { children: [
|
|
884
|
+
r !== 1 && /* @__PURE__ */ s(so, {}, r),
|
|
885
|
+
/* @__PURE__ */ l(Wn, { state: m, step: r, children: [
|
|
886
|
+
r === 2 && /* @__PURE__ */ s(po, { title: d || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" }),
|
|
887
|
+
r === 3 && a && /* @__PURE__ */ s(vo, { answer: (o == null ? void 0 : o.title) || "unknown" }),
|
|
888
|
+
r === 3 && !a && /* @__PURE__ */ s(Ao, { title: p || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" })
|
|
889
|
+
] })
|
|
890
|
+
] }) });
|
|
891
|
+
}, Io = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
|
|
892
|
+
const [d, r] = w(1);
|
|
893
|
+
return /* @__PURE__ */ s(
|
|
894
|
+
ho,
|
|
895
|
+
{
|
|
896
|
+
close: e,
|
|
897
|
+
action: i,
|
|
898
|
+
votedAnswer: t,
|
|
899
|
+
correct: o,
|
|
900
|
+
correctAnswerTitle: a,
|
|
901
|
+
questionTitle: p,
|
|
902
|
+
setStep: r,
|
|
903
|
+
step: d,
|
|
904
|
+
title: ""
|
|
905
|
+
}
|
|
906
|
+
);
|
|
907
|
+
}, rs = /* @__PURE__ */ n("div")({
|
|
908
|
+
name: "NotificationContainer",
|
|
909
|
+
class: "nn0nqh6",
|
|
910
|
+
propsAsIs: !1
|
|
911
|
+
}), $o = () => ({
|
|
912
|
+
withoutPadding: e
|
|
913
|
+
}) => e ? "0px" : "1rem", go = /* @__PURE__ */ n("div")({
|
|
914
|
+
name: "NotificationContent",
|
|
915
|
+
class: "n1bcdf3j",
|
|
916
|
+
propsAsIs: !1,
|
|
917
|
+
vars: {
|
|
918
|
+
"n1bcdf3j-0": [$o()]
|
|
919
|
+
}
|
|
920
|
+
}), cs = /* @__PURE__ */ n("img")({
|
|
921
|
+
name: "LogoImg",
|
|
922
|
+
class: "l8jorbq",
|
|
923
|
+
propsAsIs: !1
|
|
924
|
+
}), wo = () => rs, yo = /* @__PURE__ */ n(wo())({
|
|
925
|
+
name: "NotificationInterstitialContainer",
|
|
926
|
+
class: "nf920y3",
|
|
927
|
+
propsAsIs: !0
|
|
928
|
+
}), To = /* @__PURE__ */ n("div")({
|
|
929
|
+
name: "LogoImgContainer",
|
|
930
|
+
class: "lzsmehn",
|
|
931
|
+
propsAsIs: !1
|
|
932
|
+
}), bo = ({ sponsorLogo: e, onClick: i }) => /* @__PURE__ */ s(yo, { onClick: i, children: /* @__PURE__ */ s(go, { withoutPadding: !0, children: /* @__PURE__ */ s(cs, { src: e }) }) }), Co = (e) => {
|
|
933
|
+
var i, t, o, a, p;
|
|
934
|
+
const [d, r] = w(!1), m = G();
|
|
935
|
+
return y(() => {
|
|
936
|
+
var u;
|
|
937
|
+
return (u = e == null ? void 0 : e.inApp) != null && u.sponsorLogo && (r(!0), m.current = setTimeout(() => {
|
|
938
|
+
r(!1);
|
|
939
|
+
}, 5e3)), () => clearTimeout(m.current);
|
|
940
|
+
}, [(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(rs, { children: /* @__PURE__ */ l("div", { children: [
|
|
941
|
+
((a = e == null ? void 0 : e.inApp) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ s(To, { children: /* @__PURE__ */ s(cs, { src: (p = e == null ? void 0 : e.inApp) == null ? void 0 : p.sponsorLogo }) }),
|
|
942
|
+
/* @__PURE__ */ s(Io, { ...e })
|
|
943
|
+
] }) });
|
|
944
|
+
}, fo = ({ sdk: e, webos: i }) => {
|
|
945
|
+
var t, o, a, p, d, r, m, u;
|
|
946
|
+
const [$] = w(e.getNotificationsStore()), h = ys($), g = e.getFeature(Ls.GAMES), c = qs(() => e.getActiveNotification(), [e, h]);
|
|
947
|
+
return y(() => {
|
|
948
|
+
c && Ts.emit("notification", {
|
|
464
949
|
action: "rendered",
|
|
465
950
|
payload: {
|
|
466
|
-
questionId:
|
|
467
|
-
questionType:
|
|
951
|
+
questionId: c.data.questionId,
|
|
952
|
+
questionType: c.data.questionType
|
|
468
953
|
}
|
|
469
954
|
});
|
|
470
|
-
}, [
|
|
471
|
-
|
|
955
|
+
}, [c]), c && c.type === M.QUESTION_RESOLVED ? c.data.question && c.data.questionType === I.PREDICTION ? c && ((t = c.data.inApp) == null ? void 0 : t.adUnit) === R.STANDART ? /* @__PURE__ */ s(
|
|
956
|
+
Co,
|
|
957
|
+
{
|
|
958
|
+
action: c.action,
|
|
959
|
+
close: c.close,
|
|
960
|
+
...c.data.question,
|
|
961
|
+
inApp: c.data.inApp
|
|
962
|
+
}
|
|
963
|
+
) : /* @__PURE__ */ s(
|
|
964
|
+
Vn,
|
|
965
|
+
{
|
|
966
|
+
action: c.action,
|
|
967
|
+
close: c.close,
|
|
968
|
+
...c.data.question
|
|
969
|
+
}
|
|
970
|
+
) : null : c && c.type === M.ONBOARDING ? c.data.onboarding ? /* @__PURE__ */ s(
|
|
971
|
+
en,
|
|
972
|
+
{
|
|
973
|
+
open: g == null ? void 0 : g.openOnboarding,
|
|
974
|
+
close: c.close,
|
|
975
|
+
...c.data.onboarding
|
|
976
|
+
}
|
|
977
|
+
) : null : c && ((o = c.data.inApp) == null ? void 0 : o.adUnit) === R.STANDART ? /* @__PURE__ */ s(
|
|
978
|
+
Qe,
|
|
472
979
|
{
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
980
|
+
...c.data,
|
|
981
|
+
action: c.action,
|
|
982
|
+
close: c.close,
|
|
983
|
+
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),
|
|
984
|
+
webos: i
|
|
476
985
|
}
|
|
477
|
-
) :
|
|
478
|
-
},
|
|
479
|
-
const i =
|
|
480
|
-
return i && (
|
|
986
|
+
) : c && /* @__PURE__ */ s(se, { ...c.data, action: c.action });
|
|
987
|
+
}, So = ({ theme: e }) => {
|
|
988
|
+
const i = bs(), t = Cs(), o = fs();
|
|
989
|
+
return i && (o.appNotification || o.onboardingNotification) ? o.app && !o.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(ks, { customTheme: e ?? t.theme, themeMode: t.themeMode, children: /* @__PURE__ */ s(fo, { sdk: i }) }) }) : null;
|
|
481
990
|
};
|
|
482
991
|
export {
|
|
483
|
-
|
|
484
|
-
|
|
992
|
+
So as StreamLayerSDKNotification,
|
|
993
|
+
fo as StreamLayerSDKNotificationUI
|
|
485
994
|
};
|