@streamlayer/react 1.24.5 → 1.24.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 +19607 -203
- package/lib/cjs/auth.js +4459 -1
- package/lib/cjs/bet-pack.js +15691 -1
- package/lib/cjs/index.js +19411 -1
- package/lib/cjs/insight.js +13509 -1
- package/lib/cjs/masters.js +20696 -1
- package/lib/cjs/notification.js +13087 -1
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/pause-ad.js +8390 -1
- package/lib/cjs/points.js +7189 -1
- package/lib/cjs/polyfills.js +69 -0
- package/lib/cjs/polymarket.js +16394 -14
- package/lib/cjs/style.css +1 -0
- package/lib/cjs/useStreamLayerApp.js +4711 -1
- package/lib/dist/cjs/index.js +20696 -1
- package/lib/dist/es/index.js +20669 -10
- package/lib/dist/es/polyfills.js +92 -0
- package/lib/es/Question.js +66 -65
- package/lib/es/advertisement.js +3402 -3294
- package/lib/es/analytics.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/feature.js +192 -37
- package/lib/es/{index-DvqmgCor.js → index-D8wyDNJD.js} +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/index10.js +181 -7
- package/lib/es/index11.js +371 -181
- package/lib/es/index12.js +366 -2579
- package/lib/es/index13.js +789 -234
- package/lib/es/index14.js +293 -792
- package/lib/es/index15.js +2550 -305
- package/lib/es/index16.js +64 -66
- package/lib/es/index2.js +285 -279
- package/lib/es/index3.js +34 -4
- package/lib/es/index4.js +16 -17
- package/lib/es/index5.js +3 -19
- package/lib/es/index6.js +7 -5
- package/lib/es/index7.js +284 -5
- package/lib/es/index8.js +236 -281
- package/lib/es/index9.js +8 -179
- package/lib/es/insight.js +2 -2
- package/lib/es/masters2.js +199 -189
- package/lib/es/notification.js +27 -28
- package/lib/es/pause-ad.js +124 -149
- package/lib/es/points.js +23 -24
- package/lib/es/polymarket.js +3 -3
- package/lib/es/storage.js +4 -4
- package/lib/es/style.css +1 -0
- package/lib/es/useStreamLayerApp2.js +5579 -4475
- package/lib/source.css +1 -120
- package/package.json +126 -91
- package/lib/cjs/Question.js +0 -1
- package/lib/cjs/analytics.js +0 -1
- package/lib/cjs/feature.js +0 -1
- package/lib/cjs/gamification-feature.js +0 -1
- package/lib/cjs/gamification-feature2.js +0 -1
- package/lib/cjs/hooks-n9ax4LRT.js +0 -1
- package/lib/cjs/index-DvqmgCor.js +0 -5
- package/lib/cjs/index10.js +0 -1
- package/lib/cjs/index11.js +0 -1
- package/lib/cjs/index12.js +0 -1
- package/lib/cjs/index13.js +0 -1
- package/lib/cjs/index14.js +0 -4
- package/lib/cjs/index15.js +0 -1
- package/lib/cjs/index16.js +0 -5
- package/lib/cjs/index2.js +0 -1
- package/lib/cjs/index3.js +0 -1
- package/lib/cjs/index4.js +0 -5
- package/lib/cjs/index5.js +0 -1
- package/lib/cjs/index6.js +0 -1
- package/lib/cjs/index7.js +0 -1
- package/lib/cjs/index8.js +0 -1
- package/lib/cjs/index9.js +0 -7
- package/lib/cjs/masters2.js +0 -8
- package/lib/cjs/sl-types.js +0 -1
- package/lib/cjs/storage.js +0 -1
- package/lib/cjs/theme.js +0 -1
- package/lib/cjs/useStreamLayerApp2.js +0 -17
- package/lib/cjs/utils.js +0 -47
- package/lib/classic/app/advertisement.d.ts +0 -19
- package/lib/classic/app/app.d.ts +0 -23
- package/lib/classic/app/auth.d.ts +0 -4
- package/lib/classic/app/bet-pack.d.ts +0 -10
- package/lib/classic/app/insight.d.ts +0 -13
- package/lib/classic/app/masters.d.ts +0 -19
- package/lib/classic/app/notification.d.ts +0 -5
- package/lib/classic/app/pause-ad.d.ts +0 -27
- package/lib/classic/app/points.d.ts +0 -3
- package/lib/classic/app/polymarket.d.ts +0 -7
- package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
- package/lib/classic/cjs/Question.js +0 -1
- package/lib/classic/cjs/advertisement.js +0 -203
- package/lib/classic/cjs/analytics.js +0 -1
- package/lib/classic/cjs/auth.js +0 -1
- package/lib/classic/cjs/bet-pack.js +0 -5
- package/lib/classic/cjs/feature.js +0 -1
- package/lib/classic/cjs/gamification-feature.js +0 -1
- package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
- package/lib/classic/cjs/index-DvqmgCor.js +0 -5
- package/lib/classic/cjs/index.js +0 -1
- package/lib/classic/cjs/index10.js +0 -1
- package/lib/classic/cjs/index11.js +0 -1
- package/lib/classic/cjs/index12.js +0 -1
- package/lib/classic/cjs/index13.js +0 -4
- package/lib/classic/cjs/index2.js +0 -5
- package/lib/classic/cjs/index3.js +0 -1
- package/lib/classic/cjs/index4.js +0 -1
- package/lib/classic/cjs/index5.js +0 -1
- package/lib/classic/cjs/index6.js +0 -1
- package/lib/classic/cjs/index7.js +0 -7
- package/lib/classic/cjs/index8.js +0 -1
- package/lib/classic/cjs/index9.js +0 -1
- package/lib/classic/cjs/insight.js +0 -1
- package/lib/classic/cjs/notification.js +0 -1
- package/lib/classic/cjs/notification2.js +0 -1
- package/lib/classic/cjs/pause-ad.js +0 -1
- package/lib/classic/cjs/points.js +0 -1
- package/lib/classic/cjs/polymarket.js +0 -14
- package/lib/classic/cjs/sl-types.js +0 -1
- package/lib/classic/cjs/useStreamLayerApp.js +0 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
- package/lib/classic/cjs/utils.js +0 -47
- package/lib/classic/es/Question.js +0 -388
- package/lib/classic/es/advertisement.js +0 -38759
- package/lib/classic/es/analytics.js +0 -84
- package/lib/classic/es/auth.js +0 -11
- package/lib/classic/es/bet-pack.js +0 -3419
- package/lib/classic/es/feature.js +0 -59
- package/lib/classic/es/gamification-feature.js +0 -4
- package/lib/classic/es/hooks-n9ax4LRT.js +0 -97
- package/lib/classic/es/index-DvqmgCor.js +0 -3775
- package/lib/classic/es/index.js +0 -15
- package/lib/classic/es/index10.js +0 -2592
- package/lib/classic/es/index11.js +0 -317
- package/lib/classic/es/index12.js +0 -185
- package/lib/classic/es/index13.js +0 -820
- package/lib/classic/es/index2.js +0 -2597
- package/lib/classic/es/index3.js +0 -19
- package/lib/classic/es/index4.js +0 -6
- package/lib/classic/es/index5.js +0 -5
- package/lib/classic/es/index6.js +0 -285
- package/lib/classic/es/index7.js +0 -181
- package/lib/classic/es/index8.js +0 -7
- package/lib/classic/es/index9.js +0 -11
- package/lib/classic/es/insight.js +0 -79
- package/lib/classic/es/notification.js +0 -9
- package/lib/classic/es/notification2.js +0 -1127
- package/lib/classic/es/pause-ad.js +0 -257
- package/lib/classic/es/points.js +0 -77
- package/lib/classic/es/polymarket.js +0 -6617
- package/lib/classic/es/sl-types.js +0 -156
- package/lib/classic/es/useStreamLayerApp.js +0 -4
- package/lib/classic/es/useStreamLayerApp2.js +0 -11573
- package/lib/classic/es/utils.js +0 -76
- package/lib/classic/index.d.ts +0 -6
- package/lib/classic/masters.d.ts +0 -8
- package/lib/classic/source.css +0 -110
- package/lib/dist/cjs/gamification-feature.js +0 -1
- package/lib/dist/cjs/index-DvqmgCor.js +0 -5
- package/lib/dist/cjs/masters.js +0 -69
- package/lib/dist/es/gamification-feature.js +0 -4
- package/lib/dist/es/index-DvqmgCor.js +0 -3775
- package/lib/dist/es/masters.js +0 -22204
- package/lib/dist/index.d.ts +0 -1355
- package/lib/dist/source.css +0 -64
- package/lib/es/sl-types.js +0 -156
- package/lib/style.css +0 -1
package/lib/es/index2.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import { h as ye } from "./
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { u as f, s as p,
|
|
4
|
-
import { l as
|
|
5
|
-
import { M as
|
|
6
|
-
import
|
|
7
|
-
import { useState as N, useEffect as
|
|
8
|
-
import { A as L } from "./
|
|
9
|
-
import { f as ge, u as
|
|
1
|
+
import { h as ye } from "./index6.js";
|
|
2
|
+
import { jsx as o, jsxs as v, Fragment as R } from "react/jsx-runtime";
|
|
3
|
+
import { u as f, F as Ne, s as p, b as Se, c as w, a as T, N as M } from "./feature.js";
|
|
4
|
+
import { l as we, S as $e, m as Ae, d as Ce, n as Ee, C as Re, y as xe, a as Le, f as V, p as De, c as Te } from "./index13.js";
|
|
5
|
+
import { M as Oe, b as _e, Q as Me, z as me, c as he, T as fe, I as Be, n as Ue, f as Pe, w as Q, a as Fe, p as ze } from "./index16.js";
|
|
6
|
+
import F from "lodash.throttle";
|
|
7
|
+
import { useState as N, useEffect as I, useRef as E, PureComponent as Ve, useCallback as z, useMemo as $, Suspense as qe, lazy as je, forwardRef as ve, useLayoutEffect as Qe, useContext as K } from "react";
|
|
8
|
+
import { A as L } from "./index8.js";
|
|
9
|
+
import { f as ge, u as Ke, A as He, a as We } from "./analytics.js";
|
|
10
10
|
import { m as O } from "./theme.js";
|
|
11
|
-
import {
|
|
12
|
-
import "
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import { I as Xe, S as y, f as C, h as W, Q as U } from "./useStreamLayerApp2.js";
|
|
11
|
+
import { p as q, _ as Ge, e as Je } from "./Question.js";
|
|
12
|
+
import { O as Ze } from "./index12.js";
|
|
13
|
+
import { B as x } from "./index7.js";
|
|
14
|
+
import { I as Xe, S as y, g as C, j as H, Q as U } from "./useStreamLayerApp2.js";
|
|
15
|
+
import "@storybook/blocks";
|
|
17
16
|
import Ye from "react-infinite-scroller";
|
|
18
|
-
import { I as et, s as tt, e as st } from "./
|
|
19
|
-
import "uuid";
|
|
20
|
-
import "@nanostores/query";
|
|
17
|
+
import { I as et, s as tt, e as st } from "./index10.js";
|
|
21
18
|
import "./storage.js";
|
|
22
|
-
import "./
|
|
19
|
+
import "./index5.js";
|
|
23
20
|
import { createPortal as nt } from "react-dom";
|
|
24
21
|
import { e as ot } from "./index3.js";
|
|
25
|
-
import { i as
|
|
22
|
+
import { i as W, q as at, _ as rt, j as G } from "./hooks-n9ax4LRT.js";
|
|
26
23
|
import "./notification.js";
|
|
27
24
|
const J = Object.keys(L), Z = () => {
|
|
28
25
|
const e = window.innerWidth;
|
|
@@ -44,12 +41,12 @@ const J = Object.keys(L), Z = () => {
|
|
|
44
41
|
sdkInView: X(e),
|
|
45
42
|
sdkInDesktopView: B()
|
|
46
43
|
}));
|
|
47
|
-
return
|
|
48
|
-
const s =
|
|
44
|
+
return I(() => {
|
|
45
|
+
const s = F(() => {
|
|
49
46
|
t.setKey("sdkInView", X(e));
|
|
50
|
-
}, 200), a =
|
|
51
|
-
const
|
|
52
|
-
t.setKey("screen",
|
|
47
|
+
}, 200), a = F(() => {
|
|
48
|
+
const n = Z();
|
|
49
|
+
t.setKey("screen", n), t.setKey("sdkInDesktopView", B());
|
|
53
50
|
}, 200);
|
|
54
51
|
return window.addEventListener("scroll", s), window.addEventListener("resize", a), () => {
|
|
55
52
|
window.removeEventListener("scroll", s), window.removeEventListener("resize", a);
|
|
@@ -62,19 +59,19 @@ const J = Object.keys(L), Z = () => {
|
|
|
62
59
|
...s
|
|
63
60
|
});
|
|
64
61
|
}, lt = 15, dt = (e, t) => {
|
|
65
|
-
const s = E(null), a = E(0), [
|
|
62
|
+
const s = E(null), a = E(0), [n] = N(
|
|
66
63
|
ge({
|
|
67
64
|
scrollPosition: 0,
|
|
68
65
|
tabsShown: !0,
|
|
69
66
|
scrollDirection: "forward"
|
|
70
67
|
})
|
|
71
68
|
), r = f(t);
|
|
72
|
-
return
|
|
69
|
+
return I(() => {
|
|
73
70
|
const d = B() ? s.current : window;
|
|
74
71
|
if (!d)
|
|
75
72
|
return () => {
|
|
76
73
|
};
|
|
77
|
-
const l =
|
|
74
|
+
const l = F((i) => {
|
|
78
75
|
const c = i.target;
|
|
79
76
|
if (!c)
|
|
80
77
|
return;
|
|
@@ -84,17 +81,17 @@ const J = Object.keys(L), Z = () => {
|
|
|
84
81
|
if (lt > Math.abs(m))
|
|
85
82
|
return;
|
|
86
83
|
const h = a.current < u ? "forward" : "backward";
|
|
87
|
-
a.current = u,
|
|
84
|
+
a.current = u, n.set({
|
|
88
85
|
scrollPosition: Math.round(u),
|
|
89
86
|
scrollDirection: h,
|
|
90
|
-
tabsShown:
|
|
87
|
+
tabsShown: n.get().tabsShown
|
|
91
88
|
});
|
|
92
89
|
}, 200);
|
|
93
90
|
return d.addEventListener("scroll", l), () => {
|
|
94
91
|
d.removeEventListener("scroll", l);
|
|
95
92
|
};
|
|
96
|
-
}, [
|
|
97
|
-
},
|
|
93
|
+
}, [n, e, r.screen]), [s, n];
|
|
94
|
+
}, P = /* @__PURE__ */ p("div")({
|
|
98
95
|
name: "LoadingContainer",
|
|
99
96
|
class: "lclc0ej",
|
|
100
97
|
propsAsIs: !1
|
|
@@ -103,22 +100,22 @@ const J = Object.keys(L), Z = () => {
|
|
|
103
100
|
sdk: t,
|
|
104
101
|
children: s,
|
|
105
102
|
className: a,
|
|
106
|
-
noWait:
|
|
103
|
+
noWait: n
|
|
107
104
|
}) => {
|
|
108
105
|
const r = f(e.status), d = f(t.sdkStore.slStreamId);
|
|
109
|
-
if (!
|
|
106
|
+
if (!n) {
|
|
110
107
|
if (d?.loading && !d.data)
|
|
111
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ o(P, {
|
|
112
109
|
className: a,
|
|
113
110
|
children: "Event is loading..."
|
|
114
111
|
});
|
|
115
112
|
if (!d?.data)
|
|
116
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ o(P, {
|
|
117
114
|
className: a,
|
|
118
115
|
children: "Event is forbidden..."
|
|
119
116
|
});
|
|
120
|
-
if (r !==
|
|
121
|
-
return /* @__PURE__ */
|
|
117
|
+
if (r !== Ne.Ready)
|
|
118
|
+
return /* @__PURE__ */ o(P, {
|
|
122
119
|
className: a,
|
|
123
120
|
children: "Wait feature..."
|
|
124
121
|
});
|
|
@@ -142,12 +139,12 @@ const J = Object.keys(L), Z = () => {
|
|
|
142
139
|
propsAsIs: !1
|
|
143
140
|
});
|
|
144
141
|
var D = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(D || {});
|
|
145
|
-
const Y = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
142
|
+
const Y = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ o(mt, { "data-a": "intr", onClick: s, "data-selected": t, children: /* @__PURE__ */ o(ht, { "data-a": "intr", children: e }) }), ft = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ o(pt, { children: /* @__PURE__ */ v(ut, { "data-position": e === "home" ? "left" : "right", children: [
|
|
143
|
+
/* @__PURE__ */ o(Y, { title: "Home", active: e === "home", onClick: () => t(
|
|
147
144
|
"home"
|
|
148
145
|
/* HOME */
|
|
149
146
|
) }),
|
|
150
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ o(
|
|
151
148
|
Y,
|
|
152
149
|
{
|
|
153
150
|
title: "Friends",
|
|
@@ -166,11 +163,11 @@ const Y = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(mt, { "data
|
|
|
166
163
|
name: "FriendsIcon",
|
|
167
164
|
class: "f10ncfg2",
|
|
168
165
|
propsAsIs: !0
|
|
169
|
-
}),
|
|
166
|
+
}), kt = /* @__PURE__ */ p("div")({
|
|
170
167
|
name: "Content",
|
|
171
168
|
class: "c1yc07bd",
|
|
172
169
|
propsAsIs: !1
|
|
173
|
-
}),
|
|
170
|
+
}), bt = /* @__PURE__ */ p("div")({
|
|
174
171
|
name: "Title",
|
|
175
172
|
class: "tj6cq7w",
|
|
176
173
|
propsAsIs: !1
|
|
@@ -182,29 +179,29 @@ const Y = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(mt, { "data
|
|
|
182
179
|
name: "ArrowInviteIcon",
|
|
183
180
|
class: "awohrz6",
|
|
184
181
|
propsAsIs: !0
|
|
185
|
-
}),
|
|
186
|
-
const [
|
|
182
|
+
}), wt = ({ title: e, description: t, onClick: s, className: a }) => {
|
|
183
|
+
const [n] = Ke({
|
|
187
184
|
type: "invitation",
|
|
188
185
|
action: "sent",
|
|
189
186
|
payload: {
|
|
190
187
|
from: Xe.TITLE_CARD
|
|
191
188
|
}
|
|
192
189
|
});
|
|
193
|
-
return /* @__PURE__ */ v(vt, { "data-a": "intr", onClick:
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */ v(
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
190
|
+
return /* @__PURE__ */ v(vt, { "data-a": "intr", onClick: n(s), className: a, children: [
|
|
191
|
+
/* @__PURE__ */ o(It, { name: "icon-friends" }),
|
|
192
|
+
/* @__PURE__ */ v(kt, { children: [
|
|
193
|
+
/* @__PURE__ */ o(bt, { children: e }),
|
|
194
|
+
/* @__PURE__ */ o(yt, { children: t })
|
|
198
195
|
] }),
|
|
199
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ o(St, { name: "icon-copy" })
|
|
200
197
|
] });
|
|
201
198
|
};
|
|
202
|
-
function
|
|
203
|
-
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, a = e.startIndex,
|
|
204
|
-
return !(a > s ||
|
|
199
|
+
function $t(e) {
|
|
200
|
+
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, a = e.startIndex, n = e.stopIndex;
|
|
201
|
+
return !(a > s || n < t);
|
|
205
202
|
}
|
|
206
203
|
function At(e) {
|
|
207
|
-
for (var t = e.isItemLoaded, s = e.itemCount, a = e.minimumBatchSize,
|
|
204
|
+
for (var t = e.isItemLoaded, s = e.itemCount, a = e.minimumBatchSize, n = e.startIndex, r = e.stopIndex, d = [], l = null, i = null, c = n; c <= r; c++) {
|
|
208
205
|
var u = t(c);
|
|
209
206
|
u ? i !== null && (d.push(l, i), l = i = null) : (i = c, l === null && (l = c));
|
|
210
207
|
}
|
|
@@ -229,8 +226,8 @@ var Ct = function(e, t) {
|
|
|
229
226
|
}, Et = /* @__PURE__ */ (function() {
|
|
230
227
|
function e(t, s) {
|
|
231
228
|
for (var a = 0; a < s.length; a++) {
|
|
232
|
-
var
|
|
233
|
-
|
|
229
|
+
var n = s[a];
|
|
230
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
234
231
|
}
|
|
235
232
|
}
|
|
236
233
|
return function(t, s, a) {
|
|
@@ -255,16 +252,16 @@ var Ct = function(e, t) {
|
|
|
255
252
|
(function(e) {
|
|
256
253
|
Rt(t, e);
|
|
257
254
|
function t() {
|
|
258
|
-
var s, a,
|
|
255
|
+
var s, a, n, r;
|
|
259
256
|
Ct(this, t);
|
|
260
257
|
for (var d = arguments.length, l = Array(d), i = 0; i < d; i++)
|
|
261
258
|
l[i] = arguments[i];
|
|
262
|
-
return r = (a = (
|
|
259
|
+
return r = (a = (n = ee(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(l))), n), n._lastRenderedStartIndex = -1, n._lastRenderedStopIndex = -1, n._memoizedUnloadedRanges = [], n._onItemsRendered = function(c) {
|
|
263
260
|
var u = c.visibleStartIndex, m = c.visibleStopIndex;
|
|
264
|
-
|
|
265
|
-
},
|
|
266
|
-
|
|
267
|
-
}, a), ee(
|
|
261
|
+
n._lastRenderedStartIndex = u, n._lastRenderedStopIndex = m, n._ensureRowsLoaded(u, m);
|
|
262
|
+
}, n._setRef = function(c) {
|
|
263
|
+
n._listRef = c;
|
|
264
|
+
}, a), ee(n, r);
|
|
268
265
|
}
|
|
269
266
|
return Et(t, [{
|
|
270
267
|
key: "resetloadMoreItemsCache",
|
|
@@ -287,40 +284,40 @@ var Ct = function(e, t) {
|
|
|
287
284
|
}
|
|
288
285
|
}, {
|
|
289
286
|
key: "_ensureRowsLoaded",
|
|
290
|
-
value: function(a,
|
|
287
|
+
value: function(a, n) {
|
|
291
288
|
var r = this.props, d = r.isItemLoaded, l = r.itemCount, i = r.minimumBatchSize, c = i === void 0 ? 10 : i, u = r.threshold, m = u === void 0 ? 15 : u, h = At({
|
|
292
289
|
isItemLoaded: d,
|
|
293
290
|
itemCount: l,
|
|
294
291
|
minimumBatchSize: c,
|
|
295
292
|
startIndex: Math.max(0, a - m),
|
|
296
|
-
stopIndex: Math.min(l - 1,
|
|
293
|
+
stopIndex: Math.min(l - 1, n + m)
|
|
297
294
|
});
|
|
298
|
-
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(g,
|
|
299
|
-
return h[
|
|
295
|
+
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(g, k) {
|
|
296
|
+
return h[k] !== g;
|
|
300
297
|
})) && (this._memoizedUnloadedRanges = h, this._loadUnloadedRanges(h));
|
|
301
298
|
}
|
|
302
299
|
}, {
|
|
303
300
|
key: "_loadUnloadedRanges",
|
|
304
301
|
value: function(a) {
|
|
305
|
-
for (var
|
|
302
|
+
for (var n = this, r = this.props.loadMoreItems || this.props.loadMoreRows, d = function(c) {
|
|
306
303
|
var u = a[c], m = a[c + 1], h = r(u, m);
|
|
307
304
|
h?.then(function() {
|
|
308
|
-
if (
|
|
309
|
-
lastRenderedStartIndex:
|
|
310
|
-
lastRenderedStopIndex:
|
|
305
|
+
if ($t({
|
|
306
|
+
lastRenderedStartIndex: n._lastRenderedStartIndex,
|
|
307
|
+
lastRenderedStopIndex: n._lastRenderedStopIndex,
|
|
311
308
|
startIndex: u,
|
|
312
309
|
stopIndex: m
|
|
313
310
|
})) {
|
|
314
|
-
if (
|
|
311
|
+
if (n._listRef == null)
|
|
315
312
|
return;
|
|
316
|
-
typeof
|
|
313
|
+
typeof n._listRef.resetAfterIndex == "function" ? n._listRef.resetAfterIndex(u, !0) : (typeof n._listRef._getItemStyleCache == "function" && n._listRef._getItemStyleCache(-1), n._listRef.forceUpdate());
|
|
317
314
|
}
|
|
318
315
|
});
|
|
319
316
|
}, l = 0; l < a.length; l += 2)
|
|
320
317
|
d(l);
|
|
321
318
|
}
|
|
322
319
|
}]), t;
|
|
323
|
-
})(
|
|
320
|
+
})(Ve);
|
|
324
321
|
const xt = /* @__PURE__ */ p("div")({
|
|
325
322
|
name: "Container",
|
|
326
323
|
class: "culdu4a",
|
|
@@ -353,25 +350,25 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
353
350
|
name: "CurrentUserBadge",
|
|
354
351
|
class: "c17uc4zr",
|
|
355
352
|
propsAsIs: !0
|
|
356
|
-
}),
|
|
353
|
+
}), Pt = ({
|
|
357
354
|
friendsRank: e,
|
|
358
355
|
avatar: t,
|
|
359
356
|
name: s,
|
|
360
357
|
userId: a,
|
|
361
|
-
points:
|
|
358
|
+
points: n,
|
|
362
359
|
isCurrentUser: r,
|
|
363
360
|
style: d
|
|
364
361
|
}) => /* @__PURE__ */ v(xt, { "data-name": a, style: d, children: [
|
|
365
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ o(Lt, { children: e || 0 }),
|
|
366
363
|
/* @__PURE__ */ v(Ot, { children: [
|
|
367
|
-
t ? /* @__PURE__ */
|
|
364
|
+
t ? /* @__PURE__ */ o(Dt, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ o(Tt, { children: et(s || "") }),
|
|
368
365
|
/* @__PURE__ */ v(_t, { children: [
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
r && /* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ o(Mt, { children: s || "" }),
|
|
367
|
+
r && /* @__PURE__ */ o(Ut, { name: "icon-star" })
|
|
371
368
|
] })
|
|
372
369
|
] }),
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
] }),
|
|
370
|
+
/* @__PURE__ */ o("div", { children: tt(n) })
|
|
371
|
+
] }), Ft = /* @__PURE__ */ p("div")({
|
|
375
372
|
name: "Container",
|
|
376
373
|
class: "c16btbfp",
|
|
377
374
|
propsAsIs: !1
|
|
@@ -380,23 +377,23 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
380
377
|
currentUserId: t,
|
|
381
378
|
openItemDetail: s,
|
|
382
379
|
fetchMore: a,
|
|
383
|
-
scrollNode:
|
|
380
|
+
scrollNode: n,
|
|
384
381
|
hasMore: r
|
|
385
382
|
}) => {
|
|
386
383
|
const d = z((l) => {
|
|
387
384
|
const i = l.target.getAttribute("data-name");
|
|
388
385
|
i && s(i);
|
|
389
386
|
}, [s]);
|
|
390
|
-
return /* @__PURE__ */
|
|
387
|
+
return /* @__PURE__ */ o(Ye, {
|
|
391
388
|
loadMore: a,
|
|
392
389
|
initialLoad: !1,
|
|
393
390
|
hasMore: r,
|
|
394
391
|
useWindow: !1,
|
|
395
|
-
getScrollParent: () =>
|
|
396
|
-
children: /* @__PURE__ */
|
|
392
|
+
getScrollParent: () => n.current,
|
|
393
|
+
children: /* @__PURE__ */ o(Ft, {
|
|
397
394
|
"data-a": "intr",
|
|
398
395
|
onClick: d,
|
|
399
|
-
children: e.map((l) => /* @__PURE__ */
|
|
396
|
+
children: e.map((l) => /* @__PURE__ */ o(Pt, {
|
|
400
397
|
...l,
|
|
401
398
|
isCurrentUser: !!t && t === l.userId
|
|
402
399
|
}, l.userId))
|
|
@@ -408,8 +405,8 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
408
405
|
propsAsIs: !1
|
|
409
406
|
}), qt = ({
|
|
410
407
|
deepLink: e
|
|
411
|
-
}) => /* @__PURE__ */
|
|
412
|
-
children: /* @__PURE__ */
|
|
408
|
+
}) => /* @__PURE__ */ o(Vt, {
|
|
409
|
+
children: /* @__PURE__ */ o(Oe, {
|
|
413
410
|
inviteLink: e,
|
|
414
411
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
415
412
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
@@ -424,18 +421,18 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
424
421
|
scrollStore: s,
|
|
425
422
|
leaderboardList: a
|
|
426
423
|
}) => {
|
|
427
|
-
const
|
|
424
|
+
const n = E(null), {
|
|
428
425
|
data: r,
|
|
429
426
|
hasMore: d,
|
|
430
427
|
loading: l,
|
|
431
428
|
key: i
|
|
432
429
|
} = f(a.$store), {
|
|
433
430
|
data: c
|
|
434
|
-
} = f(e.deepLink.$store), [u, m] =
|
|
435
|
-
return !r.length && !l ? /* @__PURE__ */
|
|
431
|
+
} = f(e.deepLink.$store), [u, m] = _e(n);
|
|
432
|
+
return !r.length && !l ? /* @__PURE__ */ o(qt, {
|
|
436
433
|
deepLink: c
|
|
437
434
|
}) : /* @__PURE__ */ v(R, {
|
|
438
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ o(zt, {
|
|
439
436
|
items: r,
|
|
440
437
|
scrollNode: t,
|
|
441
438
|
scrollStore: s,
|
|
@@ -443,9 +440,9 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
443
440
|
hasMore: d,
|
|
444
441
|
openItemDetail: e.openUser,
|
|
445
442
|
currentUserId: e.currentUserId.get()
|
|
446
|
-
}, i), c && /* @__PURE__ */
|
|
447
|
-
ref:
|
|
448
|
-
children: /* @__PURE__ */
|
|
443
|
+
}, i), c && /* @__PURE__ */ o(jt, {
|
|
444
|
+
ref: n,
|
|
445
|
+
children: /* @__PURE__ */ o(wt, {
|
|
449
446
|
"data-a": "intr",
|
|
450
447
|
onClick: () => u(c),
|
|
451
448
|
title: "Invite Friends",
|
|
@@ -457,55 +454,64 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
457
454
|
gamification: e,
|
|
458
455
|
scrollNode: t,
|
|
459
456
|
scrollStore: s
|
|
460
|
-
}) => e.leaderboardList ? /* @__PURE__ */
|
|
457
|
+
}) => e.leaderboardList ? /* @__PURE__ */ o(Qt, {
|
|
461
458
|
leaderboardList: e.leaderboardList,
|
|
462
459
|
gamification: e,
|
|
463
460
|
scrollNode: t,
|
|
464
461
|
scrollStore: s
|
|
465
|
-
}) : null,
|
|
466
|
-
const { sdk:
|
|
467
|
-
return
|
|
468
|
-
|
|
462
|
+
}) : null, Ht = ({ store: e, openQuestion: t, withPickHistory: s }) => {
|
|
463
|
+
const { sdk: a } = q(), n = f(e);
|
|
464
|
+
return I(() => {
|
|
465
|
+
s.set(!0);
|
|
466
|
+
}, [s]), /* @__PURE__ */ o(Me, { openQuestion: t, questions: n.data, controlVideo: a?.controlVideoPlayer });
|
|
467
|
+
}, Wt = ({ userSummary: e }) => {
|
|
469
468
|
const [t, s] = N(void 0);
|
|
470
|
-
return
|
|
471
|
-
const a = e.$store.subscribe((
|
|
472
|
-
|
|
469
|
+
return I(() => {
|
|
470
|
+
const a = e.$store.subscribe((n) => {
|
|
471
|
+
n && s(n);
|
|
473
472
|
});
|
|
474
473
|
return () => {
|
|
475
474
|
a();
|
|
476
475
|
};
|
|
477
|
-
}, [e]), /* @__PURE__ */
|
|
478
|
-
},
|
|
479
|
-
const { tabsShown: l } = f(s, { keys: ["tabsShown"] }), i = f(e.friendsTabEnabled), [c, u] = N(D.HOME), [, m] =
|
|
476
|
+
}, [e]), /* @__PURE__ */ o(me, { loading: !t?.summary, ...t?.summary, successRate: t?.percentage?.correct });
|
|
477
|
+
}, Gt = ({ gamification: e, className: t, scrollStore: s, scrollNode: a, appNode: n, style: r, responsiveStore: d }) => {
|
|
478
|
+
const { tabsShown: l } = f(s, { keys: ["tabsShown"] }), i = f(e.friendsTabEnabled), [c, u] = N(D.HOME), [, m] = Se(), { sdkInDesktopView: h, screen: g } = f(d, { keys: ["sdkInDesktopView"] }), k = (b) => {
|
|
480
479
|
m(() => {
|
|
481
|
-
u(
|
|
480
|
+
u(b), h === !1 && (n.current?.getBoundingClientRect().y || 0) < 0 && j(n, g.size, { behavior: "instant" });
|
|
482
481
|
});
|
|
483
482
|
};
|
|
484
|
-
|
|
485
|
-
if (
|
|
483
|
+
I(() => s.subscribe((b) => {
|
|
484
|
+
if (b.scrollPosition === 0) {
|
|
486
485
|
s.setKey("tabsShown", !0);
|
|
487
486
|
return;
|
|
488
487
|
}
|
|
489
|
-
d.get().sdkInDesktopView ? s.setKey("tabsShown",
|
|
490
|
-
}), [s, d]),
|
|
488
|
+
d.get().sdkInDesktopView ? s.setKey("tabsShown", b.scrollDirection === "backward") : s.setKey("tabsShown", b.scrollDirection === "forward");
|
|
489
|
+
}), [s, d]), I(() => {
|
|
491
490
|
i || u(D.HOME);
|
|
492
491
|
}, [i]);
|
|
493
492
|
let A = "0px";
|
|
494
|
-
return h ? A = l ? "0px" : "calc(0px - var(--header-height))" : A = l ? "var(--header-height)" : "0px", /* @__PURE__ */ v(
|
|
495
|
-
i && /* @__PURE__ */
|
|
493
|
+
return h ? A = l ? "0px" : "calc(0px - var(--header-height))" : A = l ? "var(--header-height)" : "0px", /* @__PURE__ */ v(we, { className: w(t, "SL-Tabs", "sl-hide-on-modal"), style: r, children: [
|
|
494
|
+
i && /* @__PURE__ */ o(
|
|
496
495
|
$e,
|
|
497
496
|
{
|
|
498
497
|
style: {
|
|
499
498
|
top: A
|
|
500
499
|
},
|
|
501
|
-
children: /* @__PURE__ */
|
|
500
|
+
children: /* @__PURE__ */ o(ft, { activePage: c, toggleActivePage: k })
|
|
502
501
|
}
|
|
503
502
|
),
|
|
504
503
|
c === D.HOME && /* @__PURE__ */ v(R, { children: [
|
|
505
|
-
/* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ o(Ae, { children: /* @__PURE__ */ o(Ce, { children: /* @__PURE__ */ o(Wt, { userSummary: e.userSummary }) }) }),
|
|
505
|
+
/* @__PURE__ */ o(Ee, { style: { flex: 1 }, children: /* @__PURE__ */ o(
|
|
506
|
+
Ht,
|
|
507
|
+
{
|
|
508
|
+
openQuestion: e.openQuestion,
|
|
509
|
+
store: e.feedList.getStore(),
|
|
510
|
+
withPickHistory: e.withPickHistory
|
|
511
|
+
}
|
|
512
|
+
) })
|
|
507
513
|
] }),
|
|
508
|
-
c === D.LEADERBOARD && /* @__PURE__ */
|
|
514
|
+
c === D.LEADERBOARD && /* @__PURE__ */ o(Re, { children: /* @__PURE__ */ o(Kt, { scrollStore: s, scrollNode: a, gamification: e }) })
|
|
509
515
|
] });
|
|
510
516
|
}, Jt = () => V, te = /* @__PURE__ */ p(Jt())({
|
|
511
517
|
name: "OpenedContainer",
|
|
@@ -521,17 +527,17 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
521
527
|
}) => {
|
|
522
528
|
const s = e + t;
|
|
523
529
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
524
|
-
},
|
|
530
|
+
}, xn = ({
|
|
525
531
|
gamification: e,
|
|
526
532
|
scrollStore: t,
|
|
527
533
|
className: s,
|
|
528
534
|
appNode: a,
|
|
529
|
-
scrollNode:
|
|
535
|
+
scrollNode: n,
|
|
530
536
|
responsiveStore: r
|
|
531
|
-
}) => /* @__PURE__ */
|
|
537
|
+
}) => /* @__PURE__ */ o(Gt, {
|
|
532
538
|
appNode: a,
|
|
533
539
|
scrollStore: t,
|
|
534
|
-
scrollNode:
|
|
540
|
+
scrollNode: n,
|
|
535
541
|
className: s,
|
|
536
542
|
gamification: e,
|
|
537
543
|
responsiveStore: r
|
|
@@ -540,7 +546,7 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
540
546
|
muted: t,
|
|
541
547
|
sdk: s,
|
|
542
548
|
className: a,
|
|
543
|
-
appNode:
|
|
549
|
+
appNode: n,
|
|
544
550
|
responsiveStore: r
|
|
545
551
|
}) => {
|
|
546
552
|
const {
|
|
@@ -552,63 +558,63 @@ const xt = /* @__PURE__ */ p("div")({
|
|
|
552
558
|
}), {
|
|
553
559
|
hiding: m,
|
|
554
560
|
onAnimationEnd: h
|
|
555
|
-
} =
|
|
561
|
+
} = xe();
|
|
556
562
|
if (!l && !c)
|
|
557
563
|
return null;
|
|
558
|
-
const g = i ? /* @__PURE__ */
|
|
559
|
-
className:
|
|
564
|
+
const g = i ? /* @__PURE__ */ o(te, {
|
|
565
|
+
className: w(a, !d && se),
|
|
560
566
|
hiding: m,
|
|
561
567
|
onAnimationEnd: h,
|
|
562
|
-
children: /* @__PURE__ */
|
|
568
|
+
children: /* @__PURE__ */ o(Ge, {
|
|
563
569
|
muted: t,
|
|
564
570
|
sdk: s,
|
|
565
571
|
gamification: e
|
|
566
572
|
})
|
|
567
|
-
}) : c ? /* @__PURE__ */
|
|
568
|
-
className:
|
|
573
|
+
}) : c ? /* @__PURE__ */ o(te, {
|
|
574
|
+
className: w(a, !d && se),
|
|
569
575
|
hiding: m,
|
|
570
576
|
onAnimationEnd: h,
|
|
571
577
|
children: /* @__PURE__ */ v(Zt, {
|
|
572
|
-
children: [/* @__PURE__ */
|
|
578
|
+
children: [/* @__PURE__ */ o(Ze, {
|
|
573
579
|
label: "Friend's Rank",
|
|
574
580
|
close: e.closeUser
|
|
575
|
-
}), /* @__PURE__ */
|
|
576
|
-
children: /* @__PURE__ */
|
|
581
|
+
}), /* @__PURE__ */ o(Le, {
|
|
582
|
+
children: /* @__PURE__ */ o(me, {
|
|
577
583
|
...c,
|
|
578
584
|
successRate: Xt(c)
|
|
579
585
|
})
|
|
580
586
|
})]
|
|
581
587
|
})
|
|
582
588
|
}) : null;
|
|
583
|
-
return /* @__PURE__ */
|
|
584
|
-
container:
|
|
589
|
+
return /* @__PURE__ */ o(fe, {
|
|
590
|
+
container: n,
|
|
585
591
|
useContainer: !u,
|
|
586
592
|
children: g
|
|
587
593
|
});
|
|
588
|
-
}, es =
|
|
589
|
-
const l =
|
|
594
|
+
}, es = je(() => import("./gamification-feature.js")), ts = ({ sdk: e, feature: t, className: s, scrollStore: a, appNode: n, scrollNode: r, responsiveStore: d }) => {
|
|
595
|
+
const l = $(() => t && t.featureConfig.get().type === y.GAMES ? /* @__PURE__ */ o(ct, { className: s, sdk: e, feature: t, children: /* @__PURE__ */ o(
|
|
590
596
|
es,
|
|
591
597
|
{
|
|
592
|
-
appNode:
|
|
598
|
+
appNode: n,
|
|
593
599
|
scrollStore: a,
|
|
594
600
|
scrollNode: r,
|
|
595
601
|
className: s,
|
|
596
602
|
responsiveStore: d,
|
|
597
603
|
gamification: t
|
|
598
604
|
}
|
|
599
|
-
) }) : null, [e, t, s, d, a, r,
|
|
600
|
-
return /* @__PURE__ */
|
|
601
|
-
|
|
605
|
+
) }) : null, [e, t, s, d, a, r, n]);
|
|
606
|
+
return /* @__PURE__ */ o(
|
|
607
|
+
qe,
|
|
602
608
|
{
|
|
603
|
-
fallback: /* @__PURE__ */
|
|
609
|
+
fallback: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
604
610
|
children: l
|
|
605
611
|
}
|
|
606
612
|
);
|
|
607
|
-
}, ss = ({ feature: e, sdk: t, muted: s, className: a, appNode:
|
|
613
|
+
}, ss = ({ feature: e, sdk: t, muted: s, className: a, appNode: n, responsiveStore: r }) => e && e.featureConfig.get().type === y.GAMES ? /* @__PURE__ */ o(
|
|
608
614
|
Yt,
|
|
609
615
|
{
|
|
610
616
|
className: a,
|
|
611
|
-
appNode:
|
|
617
|
+
appNode: n,
|
|
612
618
|
muted: s,
|
|
613
619
|
sdk: t,
|
|
614
620
|
responsiveStore: r,
|
|
@@ -640,8 +646,8 @@ class os {
|
|
|
640
646
|
const s = t.pop() || "", a = this.generateKey(t);
|
|
641
647
|
try {
|
|
642
648
|
this.storage.setItem(a, s);
|
|
643
|
-
} catch (
|
|
644
|
-
ns(
|
|
649
|
+
} catch (n) {
|
|
650
|
+
ns(n) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(a, s));
|
|
645
651
|
}
|
|
646
652
|
};
|
|
647
653
|
read = (...t) => {
|
|
@@ -659,7 +665,7 @@ var ne;
|
|
|
659
665
|
T("grpc:stream");
|
|
660
666
|
C.Unknown, C.Internal, C.DeadlineExceeded, C.ResourceExhausted, C.FailedPrecondition, C.Unavailable, C.DataLoss;
|
|
661
667
|
T("grpc:retry");
|
|
662
|
-
|
|
668
|
+
H(10, { description: "Number of attempts to retry" }), H(3e4, { description: "Max delay between retries in milliseconds" });
|
|
663
669
|
var S;
|
|
664
670
|
(function(e) {
|
|
665
671
|
e.SCHEMA = "schema", e.EXTERNAL_TOKEN = "eToken", e.TOKEN = "token";
|
|
@@ -725,7 +731,7 @@ const rs = {
|
|
|
725
731
|
}), ls = ({
|
|
726
732
|
children: e,
|
|
727
733
|
className: t
|
|
728
|
-
}) => /* @__PURE__ */
|
|
734
|
+
}) => /* @__PURE__ */ o(is, {
|
|
729
735
|
className: t,
|
|
730
736
|
children: e
|
|
731
737
|
}), Ie = /* @__PURE__ */ p("div")({
|
|
@@ -748,20 +754,20 @@ const rs = {
|
|
|
748
754
|
name: "ButtonLabel",
|
|
749
755
|
class: "b40tuix",
|
|
750
756
|
propsAsIs: !1
|
|
751
|
-
}), ms = "s14xk0af", hs = "ha3mg7c", fs = "h103yr45", _ = ({ disabled: e, active: t, onClick: s, label: a, icon:
|
|
757
|
+
}), ms = "s14xk0af", hs = "ha3mg7c", fs = "h103yr45", _ = ({ disabled: e, active: t, onClick: s, label: a, icon: n, id: r }) => /* @__PURE__ */ o(
|
|
752
758
|
cs,
|
|
753
759
|
{
|
|
754
760
|
onClick: s,
|
|
755
761
|
"data-a": "intr",
|
|
756
762
|
disabled: e,
|
|
757
|
-
className:
|
|
763
|
+
className: w(
|
|
758
764
|
t && ms,
|
|
759
765
|
!t && (r === "channels" || r === "featuredGroups") && hs,
|
|
760
766
|
!t && r === "leaderboard" && fs
|
|
761
767
|
),
|
|
762
768
|
children: /* @__PURE__ */ v(R, { children: [
|
|
763
|
-
|
|
764
|
-
/* @__PURE__ */
|
|
769
|
+
n && /* @__PURE__ */ o(ps, { children: n }),
|
|
770
|
+
/* @__PURE__ */ o(us, { children: a })
|
|
765
771
|
] })
|
|
766
772
|
}
|
|
767
773
|
), vs = () => x, gs = /* @__PURE__ */ p(vs())({
|
|
@@ -772,11 +778,11 @@ const rs = {
|
|
|
772
778
|
name: "Container",
|
|
773
779
|
class: "calnblm",
|
|
774
780
|
propsAsIs: !1
|
|
775
|
-
}),
|
|
781
|
+
}), ks = /* @__PURE__ */ p("div")({
|
|
776
782
|
name: "Title",
|
|
777
783
|
class: "t1438p52",
|
|
778
784
|
propsAsIs: !1
|
|
779
|
-
}),
|
|
785
|
+
}), bs = /* @__PURE__ */ p("div")({
|
|
780
786
|
name: "CloseIconWrap",
|
|
781
787
|
class: "c17srj38",
|
|
782
788
|
propsAsIs: !1
|
|
@@ -784,11 +790,11 @@ const rs = {
|
|
|
784
790
|
name: "CloseIcon",
|
|
785
791
|
class: "clqia8k",
|
|
786
792
|
propsAsIs: !0
|
|
787
|
-
}), Ss = () => x,
|
|
793
|
+
}), Ss = () => x, ws = /* @__PURE__ */ p(Ss())({
|
|
788
794
|
name: "DashboardIcon",
|
|
789
795
|
class: "df5w958",
|
|
790
796
|
propsAsIs: !0
|
|
791
|
-
}),
|
|
797
|
+
}), $s = "h12x6aiv", As = ve(({
|
|
792
798
|
sdk: e,
|
|
793
799
|
className: t
|
|
794
800
|
}, s) => {
|
|
@@ -796,20 +802,20 @@ const rs = {
|
|
|
796
802
|
e.closeFeature();
|
|
797
803
|
};
|
|
798
804
|
return /* @__PURE__ */ v(Ie, {
|
|
799
|
-
className:
|
|
805
|
+
className: w(t, $s),
|
|
800
806
|
children: [/* @__PURE__ */ v(Is, {
|
|
801
|
-
children: [/* @__PURE__ */ v(
|
|
802
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ v(ks, {
|
|
808
|
+
children: [/* @__PURE__ */ o(ws, {
|
|
803
809
|
name: "dashboard"
|
|
804
810
|
}), "Dashboard"]
|
|
805
|
-
}), /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ o(bs, {
|
|
806
812
|
"data-a": "intr",
|
|
807
813
|
onClick: a,
|
|
808
|
-
children: /* @__PURE__ */
|
|
814
|
+
children: /* @__PURE__ */ o(Ns, {
|
|
809
815
|
name: "icon-cross"
|
|
810
816
|
})
|
|
811
817
|
})]
|
|
812
|
-
}), /* @__PURE__ */
|
|
818
|
+
}), /* @__PURE__ */ o("div", {
|
|
813
819
|
ref: s
|
|
814
820
|
})]
|
|
815
821
|
});
|
|
@@ -817,10 +823,10 @@ const rs = {
|
|
|
817
823
|
sdk: e,
|
|
818
824
|
className: t
|
|
819
825
|
}, s) => {
|
|
820
|
-
const a = f(e.sdkStore.organizationSettings),
|
|
821
|
-
const i =
|
|
826
|
+
const a = f(e.sdkStore.organizationSettings), n = f(e.sdkStore.streamSettings), r = f(e.getActiveFeature()), d = $(() => {
|
|
827
|
+
const i = n?.data || a?.data;
|
|
822
828
|
return i?.overlays ? i.overlays : [];
|
|
823
|
-
}, [a,
|
|
829
|
+
}, [a, n]), l = $(() => [...d.filter(({
|
|
824
830
|
enableSdkButton: i,
|
|
825
831
|
type: c
|
|
826
832
|
}) => c === y.GAMES || i).map((i) => ({
|
|
@@ -828,7 +834,7 @@ const rs = {
|
|
|
828
834
|
onClick: () => e.openFeature(i.type),
|
|
829
835
|
disabled: !(i.type in rs),
|
|
830
836
|
label: i.name,
|
|
831
|
-
icon: /* @__PURE__ */
|
|
837
|
+
icon: /* @__PURE__ */ o("img", {
|
|
832
838
|
src: i.icon,
|
|
833
839
|
alt: ""
|
|
834
840
|
}),
|
|
@@ -837,34 +843,34 @@ const rs = {
|
|
|
837
843
|
}))].sort((i, c) => i.position - c.position), [d, e]);
|
|
838
844
|
return /* @__PURE__ */ v(Ie, {
|
|
839
845
|
className: t,
|
|
840
|
-
children: [l.length !== 0 && /* @__PURE__ */
|
|
841
|
-
children: [/* @__PURE__ */
|
|
846
|
+
children: [l.length !== 0 && /* @__PURE__ */ o(ce, {
|
|
847
|
+
children: [/* @__PURE__ */ o(_, {
|
|
842
848
|
id: "Channels",
|
|
843
849
|
onClick: () => e.closeFeature(),
|
|
844
850
|
label: "Channels",
|
|
845
851
|
active: r === 0
|
|
846
|
-
}, "Channels"), ...l.map((i) => i.id === y.GAMES ? /* @__PURE__ */
|
|
852
|
+
}, "Channels"), ...l.map((i) => i.id === y.GAMES ? /* @__PURE__ */ o(_, {
|
|
847
853
|
...i,
|
|
848
854
|
active: i.id === r,
|
|
849
855
|
label: "StreamLayer +",
|
|
850
856
|
id: "featuredGroups",
|
|
851
|
-
icon: /* @__PURE__ */
|
|
857
|
+
icon: /* @__PURE__ */ o(gs, {
|
|
852
858
|
name: "icon-btn-feature-groups",
|
|
853
859
|
"data-selected": i.id === r
|
|
854
860
|
})
|
|
855
|
-
}, i.id) : /* @__PURE__ */
|
|
861
|
+
}, i.id) : /* @__PURE__ */ o(_, {
|
|
856
862
|
...i,
|
|
857
863
|
icon: void 0,
|
|
858
864
|
active: i.id === r
|
|
859
865
|
}, i.id))]
|
|
860
|
-
}), !l.length && /* @__PURE__ */
|
|
861
|
-
children: [/* @__PURE__ */
|
|
866
|
+
}), !l.length && /* @__PURE__ */ o(ce, {
|
|
867
|
+
children: [/* @__PURE__ */ o(_, {
|
|
862
868
|
id: "empty",
|
|
863
869
|
label: "No Features...",
|
|
864
870
|
active: !1,
|
|
865
871
|
disabled: !0
|
|
866
872
|
}, "empty")]
|
|
867
|
-
}), /* @__PURE__ */
|
|
873
|
+
}), /* @__PURE__ */ o("div", {
|
|
868
874
|
ref: s
|
|
869
875
|
})]
|
|
870
876
|
});
|
|
@@ -905,19 +911,19 @@ const rs = {
|
|
|
905
911
|
class: "a1h1bk90",
|
|
906
912
|
propsAsIs: !1
|
|
907
913
|
}), pe = ({ close: e, action: t, onboarding: s }) => /* @__PURE__ */ v(Es, { children: [
|
|
908
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ o(Rs, { "data-a": "intr", onClick: e, children: /* @__PURE__ */ o(Ls, { name: "icon-cross" }) }),
|
|
909
915
|
s?.titleCard?.media?.sponsorLogo && /* @__PURE__ */ v(Ds, { children: [
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ o(Ts, { alt: "sponsor-logo", src: s?.titleCard?.media?.sponsorLogo }),
|
|
917
|
+
/* @__PURE__ */ o(Os, { children: "PRESENTS" })
|
|
912
918
|
] }),
|
|
913
|
-
s?.titleCard?.title && /* @__PURE__ */
|
|
914
|
-
s?.titleCard?.subtitle && /* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
] }),
|
|
919
|
+
s?.titleCard?.title && /* @__PURE__ */ o(_s, { children: s?.titleCard?.title }),
|
|
920
|
+
s?.titleCard?.subtitle && /* @__PURE__ */ o(Ms, { children: s?.titleCard?.subtitle }),
|
|
921
|
+
/* @__PURE__ */ o(Bs, { "data-a": "intr", onClick: t, children: "Play Now" })
|
|
922
|
+
] }), ke = [{
|
|
917
923
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
|
|
918
924
|
tagline: "",
|
|
919
925
|
headline: /* @__PURE__ */ v(R, {
|
|
920
|
-
children: ["Welcome to ", /* @__PURE__ */
|
|
926
|
+
children: ["Welcome to ", /* @__PURE__ */ o("br", {}), " Live Challenge"]
|
|
921
927
|
})
|
|
922
928
|
}, {
|
|
923
929
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",
|
|
@@ -929,7 +935,7 @@ const rs = {
|
|
|
929
935
|
name: "OnboardingContainer",
|
|
930
936
|
class: "o1xni1kr",
|
|
931
937
|
propsAsIs: !1
|
|
932
|
-
}),
|
|
938
|
+
}), Ps = () => V, Fs = /* @__PURE__ */ p(Ps())({
|
|
933
939
|
name: "OnboardingNotificationContainer",
|
|
934
940
|
class: "o1vnouv7",
|
|
935
941
|
propsAsIs: !0
|
|
@@ -946,19 +952,19 @@ const rs = {
|
|
|
946
952
|
onboardingOpts: t,
|
|
947
953
|
notification: s,
|
|
948
954
|
gamification: a,
|
|
949
|
-
loading:
|
|
955
|
+
loading: n,
|
|
950
956
|
sdk: r,
|
|
951
957
|
throttled: d
|
|
952
958
|
}) => {
|
|
953
959
|
const l = f(a.friends ? a.friends.getStore() : he({
|
|
954
960
|
data: []
|
|
955
|
-
})), [i, c] = N(void 0), u =
|
|
961
|
+
})), [i, c] = N(void 0), u = $(() => {
|
|
956
962
|
const m = r.getInviter();
|
|
957
963
|
return m ? l.data?.find(({
|
|
958
964
|
slId: h
|
|
959
965
|
}) => h === m)?.name : "";
|
|
960
966
|
}, [l.data, r]);
|
|
961
|
-
return
|
|
967
|
+
return I(() => {
|
|
962
968
|
const m = e.$store.subscribe((h) => {
|
|
963
969
|
h && c(h.data);
|
|
964
970
|
});
|
|
@@ -966,8 +972,8 @@ const rs = {
|
|
|
966
972
|
m();
|
|
967
973
|
};
|
|
968
974
|
}, [e.$store]), /* @__PURE__ */ v(Us, {
|
|
969
|
-
children: [/* @__PURE__ */
|
|
970
|
-
loading:
|
|
975
|
+
children: [/* @__PURE__ */ o(Ue, {
|
|
976
|
+
loading: n,
|
|
971
977
|
rules: [{
|
|
972
978
|
label: "Answer as many questions as you like.",
|
|
973
979
|
icon: "icon-btn-feature-groups"
|
|
@@ -982,7 +988,7 @@ const rs = {
|
|
|
982
988
|
rulesTitle: t.rules?.heading,
|
|
983
989
|
termsTitle: "Terms and Conditions",
|
|
984
990
|
termsText: t.rules?.terms,
|
|
985
|
-
steps:
|
|
991
|
+
steps: ke,
|
|
986
992
|
primaryColor: t.inviteCard?.iconColor,
|
|
987
993
|
inviteLink: i,
|
|
988
994
|
inviteCardTitle: t.inviteCard?.heading,
|
|
@@ -994,67 +1000,67 @@ const rs = {
|
|
|
994
1000
|
gamification: a,
|
|
995
1001
|
sdk: r,
|
|
996
1002
|
inviterName: u
|
|
997
|
-
}), d && /* @__PURE__ */
|
|
1003
|
+
}), d && /* @__PURE__ */ o(zs, {})]
|
|
998
1004
|
});
|
|
999
1005
|
}, qs = ({
|
|
1000
1006
|
sdk: e,
|
|
1001
1007
|
notification: t,
|
|
1002
1008
|
saveHeight: s,
|
|
1003
1009
|
style: a,
|
|
1004
|
-
appNode:
|
|
1010
|
+
appNode: n,
|
|
1005
1011
|
sdkInDesktopView: r,
|
|
1006
1012
|
responsiveStore: d
|
|
1007
1013
|
}) => {
|
|
1008
|
-
const l = E(null), i = t.data.onboarding, [c, u] = N(i?.instantOpen), m = e.getFeature(y.GAMES), h =
|
|
1009
|
-
graphicSrc:
|
|
1010
|
-
}) =>
|
|
1014
|
+
const l = E(null), i = t.data.onboarding, [c, u] = N(i?.instantOpen), m = e.getFeature(y.GAMES), h = $(() => ke?.map(({
|
|
1015
|
+
graphicSrc: b
|
|
1016
|
+
}) => b), []), {
|
|
1011
1017
|
screen: g
|
|
1012
1018
|
} = f(d, {
|
|
1013
1019
|
keys: ["screen"]
|
|
1014
1020
|
});
|
|
1015
|
-
|
|
1021
|
+
Qe(() => {
|
|
1016
1022
|
s(l.current?.getBoundingClientRect().height || 0);
|
|
1017
1023
|
}, [s]);
|
|
1018
1024
|
const {
|
|
1019
|
-
loading:
|
|
1025
|
+
loading: k,
|
|
1020
1026
|
throttled: A
|
|
1021
|
-
} =
|
|
1022
|
-
return c && m && i &&
|
|
1023
|
-
container:
|
|
1027
|
+
} = Be(h);
|
|
1028
|
+
return c && m && i && n.current ? /* @__PURE__ */ o(fe, {
|
|
1029
|
+
container: n,
|
|
1024
1030
|
useContainer: !r,
|
|
1025
|
-
children: /* @__PURE__ */
|
|
1031
|
+
children: /* @__PURE__ */ o(Vs, {
|
|
1026
1032
|
throttled: A,
|
|
1027
1033
|
notification: t,
|
|
1028
1034
|
setOpened: u,
|
|
1029
1035
|
gamification: m,
|
|
1030
1036
|
onboardingOpts: i,
|
|
1031
1037
|
deepLink: m.deepLink,
|
|
1032
|
-
loading:
|
|
1033
|
-
renderToNode:
|
|
1038
|
+
loading: k,
|
|
1039
|
+
renderToNode: n,
|
|
1034
1040
|
sdk: e
|
|
1035
1041
|
})
|
|
1036
1042
|
}) : /* @__PURE__ */ v(R, {
|
|
1037
|
-
children: [/* @__PURE__ */
|
|
1043
|
+
children: [/* @__PURE__ */ o(ue, {
|
|
1038
1044
|
ref: l,
|
|
1039
1045
|
style: {
|
|
1040
1046
|
position: "absolute",
|
|
1041
1047
|
visibility: "hidden"
|
|
1042
1048
|
},
|
|
1043
|
-
children: /* @__PURE__ */
|
|
1049
|
+
children: /* @__PURE__ */ o(pe, {
|
|
1044
1050
|
close: () => {
|
|
1045
1051
|
},
|
|
1046
1052
|
action: () => {
|
|
1047
1053
|
},
|
|
1048
1054
|
onboarding: i
|
|
1049
1055
|
})
|
|
1050
|
-
}), /* @__PURE__ */
|
|
1056
|
+
}), /* @__PURE__ */ o(Fs, {
|
|
1051
1057
|
style: a,
|
|
1052
1058
|
hiding: t.hiding,
|
|
1053
|
-
children: /* @__PURE__ */
|
|
1054
|
-
children: /* @__PURE__ */
|
|
1059
|
+
children: /* @__PURE__ */ o(ue, {
|
|
1060
|
+
children: /* @__PURE__ */ o(pe, {
|
|
1055
1061
|
close: t.close,
|
|
1056
1062
|
action: () => {
|
|
1057
|
-
u(!0), (
|
|
1063
|
+
u(!0), (n.current?.getBoundingClientRect().y || 0) < 0 && j(n, g.size, {
|
|
1058
1064
|
behavior: "smooth"
|
|
1059
1065
|
});
|
|
1060
1066
|
},
|
|
@@ -1067,24 +1073,24 @@ const rs = {
|
|
|
1067
1073
|
name: "Container",
|
|
1068
1074
|
class: "c8ol1ve",
|
|
1069
1075
|
propsAsIs: !0
|
|
1070
|
-
}),
|
|
1076
|
+
}), be = /* @__PURE__ */ p("div")({
|
|
1071
1077
|
name: "InnerContainer",
|
|
1072
1078
|
class: "iqfywam",
|
|
1073
1079
|
propsAsIs: !1
|
|
1074
|
-
}), Ks = () =>
|
|
1080
|
+
}), Ks = () => be, Hs = /* @__PURE__ */ p(Ks())({
|
|
1075
1081
|
name: "HiddenContainer",
|
|
1076
1082
|
class: "hokmtod",
|
|
1077
1083
|
propsAsIs: !0
|
|
1078
|
-
}),
|
|
1084
|
+
}), Ws = /* @__PURE__ */ p("div")({
|
|
1079
1085
|
name: "NotificationRefreshing",
|
|
1080
1086
|
class: "n192d1q8",
|
|
1081
1087
|
propsAsIs: !1
|
|
1082
|
-
}),
|
|
1088
|
+
}), Gs = () => Pe, Js = /* @__PURE__ */ p(Gs())({
|
|
1083
1089
|
name: "Pill",
|
|
1084
1090
|
class: "p1lha68t",
|
|
1085
1091
|
propsAsIs: !0
|
|
1086
1092
|
}), Zs = (e) => {
|
|
1087
|
-
const [t, s] = N(0), a = E(null),
|
|
1093
|
+
const [t, s] = N(0), a = E(null), n = $(() => new ResizeObserver((l) => {
|
|
1088
1094
|
window.requestAnimationFrame(() => {
|
|
1089
1095
|
if (Array.isArray(l)) {
|
|
1090
1096
|
for (const i of l)
|
|
@@ -1099,21 +1105,21 @@ const rs = {
|
|
|
1099
1105
|
}, []), d = z((l) => {
|
|
1100
1106
|
s(l);
|
|
1101
1107
|
}, []);
|
|
1102
|
-
return
|
|
1108
|
+
return I(() => {
|
|
1103
1109
|
const l = a.current;
|
|
1104
|
-
return l ? (
|
|
1105
|
-
|
|
1110
|
+
return l ? (n.observe(l), () => {
|
|
1111
|
+
n.unobserve(l);
|
|
1106
1112
|
}) : () => {
|
|
1107
1113
|
};
|
|
1108
|
-
}, [e]),
|
|
1109
|
-
|
|
1114
|
+
}, [e]), I(() => () => {
|
|
1115
|
+
n.disconnect();
|
|
1110
1116
|
}), [r, t, d];
|
|
1111
1117
|
}, Xs = ({
|
|
1112
1118
|
sdk: e,
|
|
1113
1119
|
notification: t,
|
|
1114
1120
|
appNode: s,
|
|
1115
1121
|
responsiveStore: a,
|
|
1116
|
-
hasActiveFeature:
|
|
1122
|
+
hasActiveFeature: n
|
|
1117
1123
|
}) => {
|
|
1118
1124
|
const {
|
|
1119
1125
|
sdkInDesktopView: r
|
|
@@ -1123,10 +1129,10 @@ const rs = {
|
|
|
1123
1129
|
sdk: d
|
|
1124
1130
|
} = q(), [l, i, c] = Zs(t.id);
|
|
1125
1131
|
let u = i;
|
|
1126
|
-
return
|
|
1127
|
-
children: [/* @__PURE__ */
|
|
1132
|
+
return n || (u = "auto"), t.type === M.QUESTION ? /* @__PURE__ */ v(R, {
|
|
1133
|
+
children: [/* @__PURE__ */ o(Hs, {
|
|
1128
1134
|
ref: l,
|
|
1129
|
-
children: /* @__PURE__ */
|
|
1135
|
+
children: /* @__PURE__ */ o(Q, {
|
|
1130
1136
|
...t
|
|
1131
1137
|
})
|
|
1132
1138
|
}), /* @__PURE__ */ v(Qs, {
|
|
@@ -1134,17 +1140,17 @@ const rs = {
|
|
|
1134
1140
|
height: t.hiding ? 0 : u
|
|
1135
1141
|
},
|
|
1136
1142
|
hiding: t.hiding,
|
|
1137
|
-
children: [/* @__PURE__ */
|
|
1143
|
+
children: [/* @__PURE__ */ o(be, {
|
|
1138
1144
|
style: {
|
|
1139
1145
|
height: "100%"
|
|
1140
1146
|
},
|
|
1141
|
-
children: /* @__PURE__ */
|
|
1147
|
+
children: /* @__PURE__ */ o(Q, {
|
|
1142
1148
|
...t,
|
|
1143
1149
|
controlVideo: d?.controlVideoPlayer
|
|
1144
1150
|
})
|
|
1145
|
-
}), /* @__PURE__ */
|
|
1151
|
+
}), /* @__PURE__ */ o(Ws, {}, t.id)]
|
|
1146
1152
|
})]
|
|
1147
|
-
}) : t.type === M.QUESTION_RESOLVED && t.data?.question?.predictionResult ? /* @__PURE__ */
|
|
1153
|
+
}) : t.type === M.QUESTION_RESOLVED && t.data?.question?.predictionResult ? /* @__PURE__ */ o(Fe, {
|
|
1148
1154
|
style: {
|
|
1149
1155
|
height: t.hiding ? 0 : i
|
|
1150
1156
|
},
|
|
@@ -1152,7 +1158,7 @@ const rs = {
|
|
|
1152
1158
|
close: t.close,
|
|
1153
1159
|
hiding: t.hiding,
|
|
1154
1160
|
...t.data.question
|
|
1155
|
-
}) : t.type === M.ONBOARDING ? /* @__PURE__ */
|
|
1161
|
+
}) : t.type === M.ONBOARDING ? /* @__PURE__ */ o(qs, {
|
|
1156
1162
|
style: {
|
|
1157
1163
|
height: t.hiding ? 0 : u
|
|
1158
1164
|
},
|
|
@@ -1168,7 +1174,7 @@ const rs = {
|
|
|
1168
1174
|
setPill: t,
|
|
1169
1175
|
appNode: s,
|
|
1170
1176
|
headerNode: a,
|
|
1171
|
-
scrollNode:
|
|
1177
|
+
scrollNode: n,
|
|
1172
1178
|
responsiveStore: r,
|
|
1173
1179
|
scrollStore: d
|
|
1174
1180
|
}) => {
|
|
@@ -1182,34 +1188,34 @@ const rs = {
|
|
|
1182
1188
|
} = f(d, {
|
|
1183
1189
|
keys: ["tabsShown", "scrollPosition"]
|
|
1184
1190
|
});
|
|
1185
|
-
|
|
1191
|
+
I(() => {
|
|
1186
1192
|
r.get().sdkInDesktopView ? c < 50 && t(null) : c > -50 && t(null);
|
|
1187
1193
|
}, [c, r, t]);
|
|
1188
1194
|
const u = r.get().sdkInDesktopView ? s : a;
|
|
1189
|
-
return !e || !u.current ? null : nt(/* @__PURE__ */
|
|
1195
|
+
return !e || !u.current ? null : nt(/* @__PURE__ */ o(Js, {
|
|
1190
1196
|
title: e.type === M.QUESTION_RESOLVED ? "Prediction result" : `New ${st[e.data?.questionType]?.label || "notification"}`,
|
|
1191
1197
|
"data-a": "intr",
|
|
1192
1198
|
onClick: () => {
|
|
1193
|
-
r.get().sdkInDesktopView ?
|
|
1199
|
+
r.get().sdkInDesktopView ? n.current?.scrollTo({
|
|
1194
1200
|
top: 0,
|
|
1195
1201
|
behavior: "smooth"
|
|
1196
1202
|
}) : j(s, l.size, {
|
|
1197
1203
|
behavior: "smooth"
|
|
1198
1204
|
}), t(null);
|
|
1199
1205
|
},
|
|
1200
|
-
className:
|
|
1206
|
+
className: w(i && Ys, "sl-pill-button")
|
|
1201
1207
|
}), u.current);
|
|
1202
1208
|
}, tn = ({
|
|
1203
1209
|
sdk: e,
|
|
1204
1210
|
headerNode: t,
|
|
1205
1211
|
scrollNode: s,
|
|
1206
1212
|
responsiveStore: a,
|
|
1207
|
-
appNode:
|
|
1213
|
+
appNode: n,
|
|
1208
1214
|
scrollStore: r,
|
|
1209
1215
|
hasActiveFeature: d
|
|
1210
1216
|
}) => {
|
|
1211
|
-
const [l] = N(e.getNotificationsStore()), i = f(l), [c, u] = N(null), m =
|
|
1212
|
-
return
|
|
1217
|
+
const [l] = N(e.getNotificationsStore()), i = f(l), [c, u] = N(null), m = $(() => e.getActiveNotification(), [e, i]);
|
|
1218
|
+
return I(() => {
|
|
1213
1219
|
m && ot.emit("notification", {
|
|
1214
1220
|
action: "rendered",
|
|
1215
1221
|
payload: {
|
|
@@ -1217,7 +1223,7 @@ const rs = {
|
|
|
1217
1223
|
questionType: m.data.questionType
|
|
1218
1224
|
}
|
|
1219
1225
|
});
|
|
1220
|
-
}, [m]),
|
|
1226
|
+
}, [m]), I(() => {
|
|
1221
1227
|
const {
|
|
1222
1228
|
sdkInDesktopView: h,
|
|
1223
1229
|
sdkInView: g
|
|
@@ -1225,19 +1231,19 @@ const rs = {
|
|
|
1225
1231
|
m && (h || g) && (!h && g && u(m), h && window.requestAnimationFrame(() => {
|
|
1226
1232
|
r.get().scrollPosition !== 0 && u(m);
|
|
1227
1233
|
}));
|
|
1228
|
-
}, [m]),
|
|
1234
|
+
}, [m]), I(() => {
|
|
1229
1235
|
m || u(null);
|
|
1230
1236
|
}, [m]), /* @__PURE__ */ v(R, {
|
|
1231
|
-
children: [!c && m && /* @__PURE__ */
|
|
1232
|
-
appNode:
|
|
1237
|
+
children: [!c && m && /* @__PURE__ */ o(Xs, {
|
|
1238
|
+
appNode: n,
|
|
1233
1239
|
sdk: e,
|
|
1234
1240
|
hasActiveFeature: d,
|
|
1235
1241
|
notification: m,
|
|
1236
1242
|
responsiveStore: a
|
|
1237
|
-
}), c && /* @__PURE__ */
|
|
1243
|
+
}), c && /* @__PURE__ */ o(en, {
|
|
1238
1244
|
pill: c,
|
|
1239
1245
|
setPill: u,
|
|
1240
|
-
appNode:
|
|
1246
|
+
appNode: n,
|
|
1241
1247
|
notification: m,
|
|
1242
1248
|
headerNode: t,
|
|
1243
1249
|
scrollNode: s,
|
|
@@ -1246,15 +1252,15 @@ const rs = {
|
|
|
1246
1252
|
})]
|
|
1247
1253
|
});
|
|
1248
1254
|
}, sn = (e) => {
|
|
1249
|
-
const t = f(e.status), s = f(e.sdkStore.slStreamId), a = f(e.userId()),
|
|
1250
|
-
return
|
|
1255
|
+
const t = f(e.status), s = f(e.sdkStore.slStreamId), a = f(e.userId()), n = f(e.getActiveFeature()), r = t === "ready" && !!s.data;
|
|
1256
|
+
return I(() => {
|
|
1251
1257
|
const d = e.getFeature(y.GAMES);
|
|
1252
|
-
d &&
|
|
1253
|
-
l &&
|
|
1258
|
+
d && n !== y.GAMES && (d.closeQuestion(), d.closeUser()), d?.openedQuestionId.subscribe((l) => {
|
|
1259
|
+
l && n !== y.GAMES && e.openFeature(y.GAMES);
|
|
1254
1260
|
});
|
|
1255
|
-
}, [
|
|
1261
|
+
}, [n, e]), {
|
|
1256
1262
|
sdkReady: r,
|
|
1257
|
-
activeFeature:
|
|
1263
|
+
activeFeature: n,
|
|
1258
1264
|
isLogged: !!a
|
|
1259
1265
|
};
|
|
1260
1266
|
}, nn = ({
|
|
@@ -1262,13 +1268,13 @@ const rs = {
|
|
|
1262
1268
|
className: t,
|
|
1263
1269
|
scrollStore: s,
|
|
1264
1270
|
appNode: a,
|
|
1265
|
-
scrollNode:
|
|
1271
|
+
scrollNode: n,
|
|
1266
1272
|
responsiveStore: r
|
|
1267
1273
|
}) => {
|
|
1268
|
-
const [, d] =
|
|
1269
|
-
return /* @__PURE__ */
|
|
1274
|
+
const [, d] = ze(e);
|
|
1275
|
+
return /* @__PURE__ */ o(ts, {
|
|
1270
1276
|
className: t,
|
|
1271
|
-
scrollNode:
|
|
1277
|
+
scrollNode: n,
|
|
1272
1278
|
appNode: a,
|
|
1273
1279
|
scrollStore: s,
|
|
1274
1280
|
feature: d,
|
|
@@ -1280,17 +1286,17 @@ const rs = {
|
|
|
1280
1286
|
muted: t,
|
|
1281
1287
|
className: s,
|
|
1282
1288
|
appNode: a,
|
|
1283
|
-
responsiveStore:
|
|
1289
|
+
responsiveStore: n
|
|
1284
1290
|
}) => {
|
|
1285
1291
|
const r = f(e.featuresList.getStore());
|
|
1286
1292
|
return r ? Array.from(r, (d) => {
|
|
1287
1293
|
const l = e.getFeature(d);
|
|
1288
|
-
return l ? /* @__PURE__ */
|
|
1294
|
+
return l ? /* @__PURE__ */ o(ss, {
|
|
1289
1295
|
className: s,
|
|
1290
1296
|
muted: t,
|
|
1291
1297
|
appNode: a,
|
|
1292
1298
|
feature: l,
|
|
1293
|
-
responsiveStore:
|
|
1299
|
+
responsiveStore: n,
|
|
1294
1300
|
sdk: e
|
|
1295
1301
|
}, d) : null;
|
|
1296
1302
|
}) : null;
|
|
@@ -1299,42 +1305,42 @@ const rs = {
|
|
|
1299
1305
|
muted: t,
|
|
1300
1306
|
topNavigation: s
|
|
1301
1307
|
}) => {
|
|
1302
|
-
const [a,
|
|
1308
|
+
const [a, n] = N(!0), r = E(null), d = f(e.uiState), l = E(null), [i] = it(r), [c, u] = dt(r, i), {
|
|
1303
1309
|
sdkReady: m,
|
|
1304
1310
|
activeFeature: h,
|
|
1305
1311
|
isLogged: g
|
|
1306
|
-
} = sn(e),
|
|
1307
|
-
|
|
1308
|
-
enabled:
|
|
1312
|
+
} = sn(e), k = !!m;
|
|
1313
|
+
He(r, {
|
|
1314
|
+
enabled: k,
|
|
1309
1315
|
event: "click",
|
|
1310
1316
|
listener: We
|
|
1311
1317
|
});
|
|
1312
|
-
const A =
|
|
1318
|
+
const A = $(() => ({
|
|
1313
1319
|
sdk: e,
|
|
1314
1320
|
topNavigation: s
|
|
1315
1321
|
}), [e, s]);
|
|
1316
|
-
return
|
|
1322
|
+
return I(() => {
|
|
1317
1323
|
import("./gamification-feature.js");
|
|
1318
|
-
}, []), /* @__PURE__ */
|
|
1324
|
+
}, []), /* @__PURE__ */ o(Je.Provider, {
|
|
1319
1325
|
value: A,
|
|
1320
|
-
children: /* @__PURE__ */ v(
|
|
1321
|
-
ref: (
|
|
1322
|
-
r.current =
|
|
1326
|
+
children: /* @__PURE__ */ v(De, {
|
|
1327
|
+
ref: (b) => {
|
|
1328
|
+
r.current = b, n(!!b);
|
|
1323
1329
|
},
|
|
1324
1330
|
className: s ? "" : "c10llmat",
|
|
1325
|
-
children: [
|
|
1326
|
-
className:
|
|
1331
|
+
children: [k && s && d.app && /* @__PURE__ */ o(Cs, {
|
|
1332
|
+
className: w(O, "sl-hide-on-modal"),
|
|
1327
1333
|
sdk: e,
|
|
1328
1334
|
ref: l
|
|
1329
|
-
}),
|
|
1330
|
-
className:
|
|
1335
|
+
}), k && !s && !!h && d.app && /* @__PURE__ */ o(As, {
|
|
1336
|
+
className: w(O, "sl-hide-on-modal"),
|
|
1331
1337
|
sdk: e,
|
|
1332
1338
|
ref: l
|
|
1333
|
-
}), /* @__PURE__ */ v(
|
|
1339
|
+
}), /* @__PURE__ */ v(Te, {
|
|
1334
1340
|
className: "sl-hide-on-modal",
|
|
1335
1341
|
ref: c,
|
|
1336
|
-
"data-nav": (!!h &&
|
|
1337
|
-
children: [
|
|
1342
|
+
"data-nav": (!!h && k).toString(),
|
|
1343
|
+
children: [k && d.app && /* @__PURE__ */ o(tn, {
|
|
1338
1344
|
sdk: e,
|
|
1339
1345
|
scrollNode: c,
|
|
1340
1346
|
headerNode: l,
|
|
@@ -1342,21 +1348,21 @@ const rs = {
|
|
|
1342
1348
|
scrollStore: u,
|
|
1343
1349
|
responsiveStore: i,
|
|
1344
1350
|
hasActiveFeature: !!h
|
|
1345
|
-
}),
|
|
1351
|
+
}), k && d.app && /* @__PURE__ */ o(nn, {
|
|
1346
1352
|
scrollStore: u,
|
|
1347
1353
|
responsiveStore: i,
|
|
1348
1354
|
scrollNode: c,
|
|
1349
1355
|
appNode: r,
|
|
1350
1356
|
className: O,
|
|
1351
1357
|
sdk: e
|
|
1352
|
-
}),
|
|
1358
|
+
}), k && a && /* @__PURE__ */ o(on, {
|
|
1353
1359
|
muted: t,
|
|
1354
1360
|
responsiveStore: i,
|
|
1355
1361
|
appNode: r,
|
|
1356
1362
|
className: O,
|
|
1357
1363
|
sdk: e
|
|
1358
1364
|
})]
|
|
1359
|
-
}),
|
|
1365
|
+
}), k && !g && a && d.app && /* @__PURE__ */ o("div", {
|
|
1360
1366
|
style: {
|
|
1361
1367
|
display: "flex",
|
|
1362
1368
|
alignItems: "center",
|
|
@@ -1368,13 +1374,13 @@ const rs = {
|
|
|
1368
1374
|
})]
|
|
1369
1375
|
})
|
|
1370
1376
|
});
|
|
1371
|
-
},
|
|
1372
|
-
const { sdk: r, status: d } = K(
|
|
1373
|
-
if (d ===
|
|
1377
|
+
}, Ln = ({ event: e, topNavigation: t, theme: s, muted: a, withSidebarNotification: n = !0 }) => {
|
|
1378
|
+
const { sdk: r, status: d } = K(W), l = at(), i = rt(), { event: c } = K(W);
|
|
1379
|
+
if (d === G.UNSET)
|
|
1374
1380
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
1375
|
-
return d ===
|
|
1381
|
+
return d === G.CONNECTED ? /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: "wait" }) : r === null ? /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : !l.app && !l.appNotification && !l.appSidebar || !l.app && !l.appSidebar && l.appNotification && !n ? null : /* @__PURE__ */ o("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ o(ye, { customTheme: s ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ o(an, { sdk: r, muted: a, event: c?.current || e, topNavigation: t }) }) });
|
|
1376
1382
|
};
|
|
1377
1383
|
export {
|
|
1378
|
-
|
|
1379
|
-
|
|
1384
|
+
xn as B,
|
|
1385
|
+
Ln as D
|
|
1380
1386
|
};
|