@streamlayer/react 1.23.2 → 1.24.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/masters.d.ts +0 -1
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +203 -28
- package/lib/cjs/analytics.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/cjs/index-ByUNFvMk.js +5 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -1
- package/lib/cjs/index11.js +1 -3
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +1 -3
- package/lib/cjs/index14.js +4 -1
- package/lib/cjs/index15.js +1 -1
- package/lib/cjs/index16.js +5 -3
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +5 -3
- package/lib/cjs/index5.js +1 -1
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +7 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +8 -1
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +14 -9
- package/lib/cjs/sl-types.js +1 -1
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/theme.js +1 -1
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +17 -3
- package/lib/cjs/utils.js +47 -1
- package/lib/classic/app/masters.d.ts +0 -1
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +203 -28
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +5 -3
- package/lib/classic/cjs/feature.js +1 -1
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/classic/cjs/index-ByUNFvMk.js +5 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -1
- package/lib/classic/cjs/index13.js +4 -3
- package/lib/classic/cjs/index2.js +5 -3
- package/lib/classic/cjs/index3.js +1 -1
- package/lib/classic/cjs/index4.js +1 -1
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +7 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +1 -3
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +14 -9
- package/lib/classic/cjs/sl-types.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +17 -3
- package/lib/classic/cjs/utils.js +47 -1
- package/lib/classic/es/Question.js +258 -275
- package/lib/classic/es/advertisement.js +22128 -38694
- package/lib/classic/es/analytics.js +55 -57
- package/lib/classic/es/auth.js +8 -14
- package/lib/classic/es/bet-pack.js +2413 -2455
- package/lib/classic/es/feature.js +46 -95
- package/lib/classic/es/gamification-feature.js +2 -2
- package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
- package/lib/classic/es/index-ByUNFvMk.js +3775 -0
- package/lib/classic/es/index.js +13 -16
- package/lib/classic/es/index10.js +2587 -83
- package/lib/classic/es/index11.js +305 -3087
- package/lib/classic/es/index12.js +121 -124
- package/lib/classic/es/index13.js +559 -589
- package/lib/classic/es/index2.js +1755 -2114
- package/lib/classic/es/index3.js +13 -13
- package/lib/classic/es/index4.js +4 -283
- package/lib/classic/es/index5.js +5 -5
- package/lib/classic/es/index6.js +285 -10
- package/lib/classic/es/index7.js +179 -6
- package/lib/classic/es/index8.js +5 -10
- package/lib/classic/es/index9.js +8 -318
- package/lib/classic/es/insight.js +54 -61
- package/lib/classic/es/notification.js +5 -5
- package/lib/classic/es/notification2.js +730 -787
- package/lib/classic/es/pause-ad.js +168 -191
- package/lib/classic/es/points.js +47 -55
- package/lib/classic/es/polymarket.js +4058 -4289
- package/lib/classic/es/sl-types.js +128 -298
- package/lib/classic/es/useStreamLayerApp.js +2 -2
- package/lib/classic/es/useStreamLayerApp2.js +9090 -11121
- package/lib/classic/es/utils.js +28 -28
- package/lib/classic/index.d.ts +0 -1
- package/lib/classic/source.css +110 -0
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +69 -3
- package/lib/dist/es/gamification-feature.js +2 -2
- package/lib/dist/es/index-ByUNFvMk.js +3775 -0
- package/lib/dist/es/index.js +7 -10
- package/lib/dist/es/masters.js +16944 -19645
- package/lib/dist/index.d.ts +7 -17
- package/lib/dist/source.css +64 -0
- package/lib/es/Question.js +101 -105
- package/lib/es/advertisement.js +22128 -38694
- package/lib/es/analytics.js +55 -57
- package/lib/es/auth.js +8 -14
- package/lib/es/bet-pack.js +18 -29
- package/lib/es/feature.js +46 -95
- package/lib/es/gamification-feature.js +2 -2
- package/lib/es/gamification-feature2.js +2 -2
- package/lib/es/hooks-n9ax4LRT.js +97 -0
- package/lib/es/index-ByUNFvMk.js +3775 -0
- package/lib/es/index.js +13 -17
- package/lib/es/index10.js +8 -274
- package/lib/es/index11.js +172 -837
- package/lib/es/index12.js +2587 -183
- package/lib/es/index13.js +258 -314
- package/lib/es/index14.js +813 -81
- package/lib/es/index15.js +305 -3087
- package/lib/es/index16.js +803 -1005
- package/lib/es/index2.js +980 -1133
- package/lib/es/index3.js +4 -3
- package/lib/es/index4.js +2401 -2431
- package/lib/es/index5.js +13 -13
- package/lib/es/index6.js +5 -285
- package/lib/es/index7.js +7 -10
- package/lib/es/index8.js +283 -5
- package/lib/es/index9.js +180 -10
- package/lib/es/insight.js +54 -61
- package/lib/es/masters.js +5 -7
- package/lib/es/masters2.js +538 -708
- package/lib/es/notification.js +663 -719
- package/lib/es/pause-ad.js +168 -191
- package/lib/es/points.js +48 -56
- package/lib/es/polymarket.js +4058 -4289
- package/lib/es/sl-types.js +128 -317
- package/lib/es/storage.js +74 -75
- package/lib/es/theme.js +3 -190
- package/lib/es/useStreamLayerApp.js +2 -2
- package/lib/es/useStreamLayerApp2.js +9090 -11121
- package/lib/es/utils.js +28 -28
- package/lib/index.d.ts +0 -1
- package/lib/source.css +120 -0
- package/lib/style.css +1 -1
- package/package.json +21 -24
- package/lib/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/cjs/index-eShKGO10.js +0 -1
- package/lib/cjs/style.css +0 -1
- package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/classic/cjs/index-eShKGO10.js +0 -1
- package/lib/classic/cjs/style.css +0 -1
- package/lib/classic/es/hooks-WfHlJH12.js +0 -98
- package/lib/classic/es/index-eShKGO10.js +0 -3757
- package/lib/classic/style.css +0 -1
- package/lib/dist/cjs/index-eShKGO10.js +0 -1
- package/lib/dist/es/index-eShKGO10.js +0 -3757
- package/lib/dist/style.css +0 -1
- package/lib/es/hooks-WfHlJH12.js +0 -98
- package/lib/es/index-eShKGO10.js +0 -3757
package/lib/es/index2.js
CHANGED
|
@@ -1,1062 +1,923 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
1
|
+
import { h as ye } from "./index7.js";
|
|
2
|
+
import { jsx as n, jsxs as v, Fragment as R } from "react/jsx-runtime";
|
|
3
|
+
import { u as f, s as p, a as Ne, c as $, N as M } from "./sl-types.js";
|
|
4
|
+
import { l as Se, S as $e, m as we, d as Ae, n as Ce, C as Ee, y as Re, a as xe, f as V, p as Le, c as De } from "./index14.js";
|
|
5
|
+
import { M as Te, b as Oe, Q as _e, z as me, c as he, T as fe, I as Me, n as Be, f as Ue, w as Q, a as Fe, p as Pe } from "./index16.js";
|
|
6
|
+
import P from "lodash.throttle";
|
|
7
|
+
import { useState as N, useEffect as b, useRef as E, PureComponent as ze, useCallback as z, useMemo as w, Suspense as Ve, lazy as qe, forwardRef as ve, useLayoutEffect as je, useContext as K } from "react";
|
|
8
|
+
import { A as L } from "./index9.js";
|
|
9
|
+
import { f as ge, u as Qe, A as Ke, a as We } from "./analytics.js";
|
|
10
|
+
import { m as O } from "./theme.js";
|
|
11
|
+
import { F as Ge, c as T } from "./feature.js";
|
|
12
|
+
import "nanostores";
|
|
13
|
+
import { p as q, _ as He, e as Je } from "./Question.js";
|
|
14
|
+
import { O as Ze } from "./index13.js";
|
|
15
|
+
import { B as x } from "./index8.js";
|
|
16
|
+
import { I as Xe, S as y, f as C, h as W, Q as U } from "./useStreamLayerApp2.js";
|
|
17
|
+
import Ye from "react-infinite-scroller";
|
|
18
|
+
import { I as et, s as tt, e as st } from "./index11.js";
|
|
19
|
+
import "uuid";
|
|
20
|
+
import "@nanostores/query";
|
|
21
21
|
import "./storage.js";
|
|
22
|
-
import "./
|
|
23
|
-
import { createPortal } from "react-dom";
|
|
24
|
-
import { e as
|
|
22
|
+
import "./index6.js";
|
|
23
|
+
import { createPortal as nt } from "react-dom";
|
|
24
|
+
import { e as ot } from "./index3.js";
|
|
25
|
+
import { i as G, q as at, _ as rt, j as H } from "./hooks-n9ax4LRT.js";
|
|
25
26
|
import "./notification.js";
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
let
|
|
29
|
-
for (let
|
|
30
|
-
const
|
|
31
|
-
if (!(
|
|
32
|
-
|
|
27
|
+
const J = Object.keys(L), Z = () => {
|
|
28
|
+
const e = window.innerWidth;
|
|
29
|
+
let t = "sm";
|
|
30
|
+
for (let s = J.length - 1; s > 0; s--) {
|
|
31
|
+
const a = J[s];
|
|
32
|
+
if (!(e < L[a]) && e >= L[a]) {
|
|
33
|
+
t = a;
|
|
33
34
|
break;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
return {
|
|
37
|
-
name:
|
|
38
|
-
size:
|
|
38
|
+
name: t,
|
|
39
|
+
size: L[t]
|
|
39
40
|
};
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
screen: c$4(),
|
|
46
|
-
sdkInView: d$3(t2),
|
|
47
|
-
sdkInDesktopView: w$1()
|
|
41
|
+
}, X = (e) => (e.current?.getBoundingClientRect().y || 0) < -68, B = () => window.matchMedia("(orientation: landscape)").matches, it = (e) => {
|
|
42
|
+
const [t] = N(() => ge({
|
|
43
|
+
screen: Z(),
|
|
44
|
+
sdkInView: X(e),
|
|
45
|
+
sdkInDesktopView: B()
|
|
48
46
|
}));
|
|
49
|
-
return
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
}, 200),
|
|
53
|
-
const
|
|
54
|
-
|
|
47
|
+
return b(() => {
|
|
48
|
+
const s = P(() => {
|
|
49
|
+
t.setKey("sdkInView", X(e));
|
|
50
|
+
}, 200), a = P(() => {
|
|
51
|
+
const o = Z();
|
|
52
|
+
t.setKey("screen", o), t.setKey("sdkInDesktopView", B());
|
|
55
53
|
}, 200);
|
|
56
|
-
return window.addEventListener("scroll",
|
|
57
|
-
window.removeEventListener("scroll",
|
|
54
|
+
return window.addEventListener("scroll", s), window.addEventListener("resize", a), () => {
|
|
55
|
+
window.removeEventListener("scroll", s), window.removeEventListener("resize", a);
|
|
58
56
|
};
|
|
59
|
-
}, [
|
|
60
|
-
}
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
...n2
|
|
57
|
+
}, [t, e]), [t];
|
|
58
|
+
}, j = (e, t, s) => {
|
|
59
|
+
const a = t >= L.lg && t < L.xl ? 75 : 52;
|
|
60
|
+
e.current && window.scrollTo({
|
|
61
|
+
top: e.current.offsetTop - a,
|
|
62
|
+
...s
|
|
66
63
|
});
|
|
67
|
-
},
|
|
68
|
-
const
|
|
69
|
-
|
|
64
|
+
}, lt = 15, dt = (e, t) => {
|
|
65
|
+
const s = E(null), a = E(0), [o] = N(
|
|
66
|
+
ge({
|
|
70
67
|
scrollPosition: 0,
|
|
71
|
-
tabsShown:
|
|
68
|
+
tabsShown: !0,
|
|
72
69
|
scrollDirection: "forward"
|
|
73
70
|
})
|
|
74
|
-
),
|
|
75
|
-
return
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
71
|
+
), r = f(t);
|
|
72
|
+
return b(() => {
|
|
73
|
+
const d = B() ? s.current : window;
|
|
74
|
+
if (!d)
|
|
78
75
|
return () => {
|
|
79
76
|
};
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (!i2)
|
|
77
|
+
const l = P((i) => {
|
|
78
|
+
const c = i.target;
|
|
79
|
+
if (!c)
|
|
84
80
|
return;
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
81
|
+
let u = 0;
|
|
82
|
+
B() ? u = c.scrollTop : u = e.current?.getBoundingClientRect().y || 0;
|
|
83
|
+
const m = a.current - u;
|
|
84
|
+
if (lt > Math.abs(m))
|
|
89
85
|
return;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
scrollPosition: Math.round(
|
|
93
|
-
scrollDirection:
|
|
94
|
-
tabsShown:
|
|
86
|
+
const h = a.current < u ? "forward" : "backward";
|
|
87
|
+
a.current = u, o.set({
|
|
88
|
+
scrollPosition: Math.round(u),
|
|
89
|
+
scrollDirection: h,
|
|
90
|
+
tabsShown: o.get().tabsShown
|
|
95
91
|
});
|
|
96
92
|
}, 200);
|
|
97
|
-
return
|
|
98
|
-
|
|
93
|
+
return d.addEventListener("scroll", l), () => {
|
|
94
|
+
d.removeEventListener("scroll", l);
|
|
99
95
|
};
|
|
100
|
-
}, [
|
|
101
|
-
}
|
|
102
|
-
const o$4 = /* @__PURE__ */ styled_default("div")({
|
|
96
|
+
}, [o, e, r.screen]), [s, o];
|
|
97
|
+
}, F = /* @__PURE__ */ p("div")({
|
|
103
98
|
name: "LoadingContainer",
|
|
104
99
|
class: "lclc0ej",
|
|
105
|
-
propsAsIs:
|
|
106
|
-
}),
|
|
107
|
-
feature:
|
|
108
|
-
sdk:
|
|
109
|
-
children:
|
|
110
|
-
className:
|
|
111
|
-
noWait:
|
|
100
|
+
propsAsIs: !1
|
|
101
|
+
}), ct = ({
|
|
102
|
+
feature: e,
|
|
103
|
+
sdk: t,
|
|
104
|
+
children: s,
|
|
105
|
+
className: a,
|
|
106
|
+
noWait: o
|
|
112
107
|
}) => {
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
115
|
-
if (
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
-
className:
|
|
108
|
+
const r = f(e.status), d = f(t.sdkStore.slStreamId);
|
|
109
|
+
if (!o) {
|
|
110
|
+
if (d?.loading && !d.data)
|
|
111
|
+
return /* @__PURE__ */ n(F, {
|
|
112
|
+
className: a,
|
|
118
113
|
children: "Event is loading..."
|
|
119
114
|
});
|
|
120
|
-
if (!
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
-
className:
|
|
115
|
+
if (!d?.data)
|
|
116
|
+
return /* @__PURE__ */ n(F, {
|
|
117
|
+
className: a,
|
|
123
118
|
children: "Event is forbidden..."
|
|
124
119
|
});
|
|
125
|
-
if (
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
-
className:
|
|
120
|
+
if (r !== Ge.Ready)
|
|
121
|
+
return /* @__PURE__ */ n(F, {
|
|
122
|
+
className: a,
|
|
128
123
|
children: "Wait feature..."
|
|
129
124
|
});
|
|
130
125
|
}
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
const t$3 = /* @__PURE__ */ styled_default("div")({
|
|
126
|
+
return s;
|
|
127
|
+
}, pt = /* @__PURE__ */ p("div")({
|
|
134
128
|
name: "Container",
|
|
135
129
|
class: "c115qtkr",
|
|
136
|
-
propsAsIs:
|
|
137
|
-
}),
|
|
130
|
+
propsAsIs: !1
|
|
131
|
+
}), ut = /* @__PURE__ */ p("div")({
|
|
138
132
|
name: "STabs",
|
|
139
133
|
class: "sxnslc8",
|
|
140
|
-
propsAsIs:
|
|
141
|
-
}),
|
|
134
|
+
propsAsIs: !1
|
|
135
|
+
}), mt = /* @__PURE__ */ p("button")({
|
|
142
136
|
name: "Button",
|
|
143
137
|
class: "b1umzux0",
|
|
144
|
-
propsAsIs:
|
|
145
|
-
}),
|
|
138
|
+
propsAsIs: !1
|
|
139
|
+
}), ht = /* @__PURE__ */ p("span")({
|
|
146
140
|
name: "Title",
|
|
147
141
|
class: "tspsaas",
|
|
148
|
-
propsAsIs:
|
|
142
|
+
propsAsIs: !1
|
|
149
143
|
});
|
|
150
|
-
var
|
|
151
|
-
const
|
|
152
|
-
/* @__PURE__ */
|
|
144
|
+
var D = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(D || {});
|
|
145
|
+
const Y = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(mt, { "data-a": "intr", onClick: s, "data-selected": t, children: /* @__PURE__ */ n(ht, { "data-a": "intr", children: e }) }), ft = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(pt, { children: /* @__PURE__ */ v(ut, { "data-position": e === "home" ? "left" : "right", children: [
|
|
146
|
+
/* @__PURE__ */ n(Y, { title: "Home", active: e === "home", onClick: () => t(
|
|
153
147
|
"home"
|
|
154
148
|
/* HOME */
|
|
155
149
|
) }),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
150
|
+
/* @__PURE__ */ n(
|
|
151
|
+
Y,
|
|
158
152
|
{
|
|
159
153
|
title: "Friends",
|
|
160
|
-
active:
|
|
161
|
-
onClick: () =>
|
|
154
|
+
active: e === "leaderboard",
|
|
155
|
+
onClick: () => t(
|
|
162
156
|
"leaderboard"
|
|
163
157
|
/* LEADERBOARD */
|
|
164
158
|
)
|
|
165
159
|
}
|
|
166
160
|
)
|
|
167
|
-
] }) })
|
|
168
|
-
const r$5 = /* @__PURE__ */ styled_default("div")({
|
|
161
|
+
] }) }), vt = /* @__PURE__ */ p("div")({
|
|
169
162
|
name: "Container",
|
|
170
163
|
class: "c1ux29ft",
|
|
171
|
-
propsAsIs:
|
|
172
|
-
}),
|
|
164
|
+
propsAsIs: !1
|
|
165
|
+
}), gt = () => x, It = /* @__PURE__ */ p(gt())({
|
|
173
166
|
name: "FriendsIcon",
|
|
174
167
|
class: "f10ncfg2",
|
|
175
|
-
propsAsIs:
|
|
176
|
-
}),
|
|
168
|
+
propsAsIs: !0
|
|
169
|
+
}), bt = /* @__PURE__ */ p("div")({
|
|
177
170
|
name: "Content",
|
|
178
171
|
class: "c1yc07bd",
|
|
179
|
-
propsAsIs:
|
|
180
|
-
}),
|
|
172
|
+
propsAsIs: !1
|
|
173
|
+
}), kt = /* @__PURE__ */ p("div")({
|
|
181
174
|
name: "Title",
|
|
182
175
|
class: "tj6cq7w",
|
|
183
|
-
propsAsIs:
|
|
184
|
-
}),
|
|
176
|
+
propsAsIs: !1
|
|
177
|
+
}), yt = /* @__PURE__ */ p("div")({
|
|
185
178
|
name: "Description",
|
|
186
179
|
class: "d1ag78xo",
|
|
187
|
-
propsAsIs:
|
|
188
|
-
}),
|
|
180
|
+
propsAsIs: !1
|
|
181
|
+
}), Nt = () => x, St = /* @__PURE__ */ p(Nt())({
|
|
189
182
|
name: "ArrowInviteIcon",
|
|
190
183
|
class: "awohrz6",
|
|
191
|
-
propsAsIs:
|
|
192
|
-
})
|
|
193
|
-
const
|
|
194
|
-
const [c2] = f$4({
|
|
184
|
+
propsAsIs: !0
|
|
185
|
+
}), $t = ({ title: e, description: t, onClick: s, className: a }) => {
|
|
186
|
+
const [o] = Qe({
|
|
195
187
|
type: "invitation",
|
|
196
188
|
action: "sent",
|
|
197
189
|
payload: {
|
|
198
|
-
from:
|
|
190
|
+
from: Xe.TITLE_CARD
|
|
199
191
|
}
|
|
200
192
|
});
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */
|
|
193
|
+
return /* @__PURE__ */ v(vt, { "data-a": "intr", onClick: o(s), className: a, children: [
|
|
194
|
+
/* @__PURE__ */ n(It, { name: "icon-friends" }),
|
|
195
|
+
/* @__PURE__ */ v(bt, { children: [
|
|
196
|
+
/* @__PURE__ */ n(kt, { children: e }),
|
|
197
|
+
/* @__PURE__ */ n(yt, { children: t })
|
|
206
198
|
] }),
|
|
207
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ n(St, { name: "icon-copy" })
|
|
208
200
|
] });
|
|
209
201
|
};
|
|
210
|
-
function
|
|
211
|
-
var
|
|
212
|
-
return !(
|
|
202
|
+
function wt(e) {
|
|
203
|
+
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, a = e.startIndex, o = e.stopIndex;
|
|
204
|
+
return !(a > s || o < t);
|
|
213
205
|
}
|
|
214
|
-
function
|
|
215
|
-
var
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
var rangeStopIndex = null;
|
|
219
|
-
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
|
220
|
-
var loaded = isItemLoaded(_index);
|
|
221
|
-
if (!loaded) {
|
|
222
|
-
rangeStopIndex = _index;
|
|
223
|
-
if (rangeStartIndex === null) {
|
|
224
|
-
rangeStartIndex = _index;
|
|
225
|
-
}
|
|
226
|
-
} else if (rangeStopIndex !== null) {
|
|
227
|
-
unloadedRanges.push(rangeStartIndex, rangeStopIndex);
|
|
228
|
-
rangeStartIndex = rangeStopIndex = null;
|
|
229
|
-
}
|
|
206
|
+
function At(e) {
|
|
207
|
+
for (var t = e.isItemLoaded, s = e.itemCount, a = e.minimumBatchSize, o = e.startIndex, r = e.stopIndex, d = [], l = null, i = null, c = o; c <= r; c++) {
|
|
208
|
+
var u = t(c);
|
|
209
|
+
u ? i !== null && (d.push(l, i), l = i = null) : (i = c, l === null && (l = c));
|
|
230
210
|
}
|
|
231
|
-
if (
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
rangeStopIndex = _index2;
|
|
236
|
-
} else {
|
|
237
|
-
break;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
unloadedRanges.push(rangeStartIndex, rangeStopIndex);
|
|
211
|
+
if (i !== null) {
|
|
212
|
+
for (var m = Math.min(Math.max(i, l + a - 1), s - 1), h = i + 1; h <= m && !t(h); h++)
|
|
213
|
+
i = h;
|
|
214
|
+
d.push(l, i);
|
|
241
215
|
}
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
var
|
|
245
|
-
if (!
|
|
246
|
-
|
|
247
|
-
|
|
216
|
+
if (d.length)
|
|
217
|
+
for (; d[1] - d[0] + 1 < a && d[0] > 0; ) {
|
|
218
|
+
var g = d[0] - 1;
|
|
219
|
+
if (!t(g))
|
|
220
|
+
d[0] = g;
|
|
221
|
+
else
|
|
248
222
|
break;
|
|
249
|
-
}
|
|
250
223
|
}
|
|
251
|
-
|
|
252
|
-
return unloadedRanges;
|
|
224
|
+
return d;
|
|
253
225
|
}
|
|
254
|
-
var
|
|
255
|
-
if (!(
|
|
226
|
+
var Ct = function(e, t) {
|
|
227
|
+
if (!(e instanceof t))
|
|
256
228
|
throw new TypeError("Cannot call a class as a function");
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
var
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
var descriptor = props[i2];
|
|
263
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
264
|
-
descriptor.configurable = true;
|
|
265
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
266
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
229
|
+
}, Et = /* @__PURE__ */ (function() {
|
|
230
|
+
function e(t, s) {
|
|
231
|
+
for (var a = 0; a < s.length; a++) {
|
|
232
|
+
var o = s[a];
|
|
233
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
|
|
267
234
|
}
|
|
268
235
|
}
|
|
269
|
-
return function(
|
|
270
|
-
|
|
271
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
272
|
-
return Constructor;
|
|
236
|
+
return function(t, s, a) {
|
|
237
|
+
return s && e(t.prototype, s), a && e(t, a), t;
|
|
273
238
|
};
|
|
274
|
-
}()
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
239
|
+
})(), Rt = function(e, t) {
|
|
240
|
+
if (typeof t != "function" && t !== null)
|
|
241
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
242
|
+
e.prototype = Object.create(t && t.prototype, {
|
|
280
243
|
constructor: {
|
|
281
|
-
value:
|
|
282
|
-
enumerable:
|
|
283
|
-
writable:
|
|
284
|
-
configurable:
|
|
244
|
+
value: e,
|
|
245
|
+
enumerable: !1,
|
|
246
|
+
writable: !0,
|
|
247
|
+
configurable: !0
|
|
285
248
|
}
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
var possibleConstructorReturn = function(self, call) {
|
|
290
|
-
if (!self) {
|
|
249
|
+
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
|
|
250
|
+
}, ee = function(e, t) {
|
|
251
|
+
if (!e)
|
|
291
252
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
292
|
-
|
|
293
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
253
|
+
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
294
254
|
};
|
|
295
|
-
(function(
|
|
296
|
-
|
|
297
|
-
function
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
_this._ensureRowsLoaded(visibleStartIndex, visibleStopIndex);
|
|
309
|
-
}, _this._setRef = function(listRef) {
|
|
310
|
-
_this._listRef = listRef;
|
|
311
|
-
}, _temp), possibleConstructorReturn(_this, _ret);
|
|
255
|
+
(function(e) {
|
|
256
|
+
Rt(t, e);
|
|
257
|
+
function t() {
|
|
258
|
+
var s, a, o, r;
|
|
259
|
+
Ct(this, t);
|
|
260
|
+
for (var d = arguments.length, l = Array(d), i = 0; i < d; i++)
|
|
261
|
+
l[i] = arguments[i];
|
|
262
|
+
return r = (a = (o = ee(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(l))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(c) {
|
|
263
|
+
var u = c.visibleStartIndex, m = c.visibleStopIndex;
|
|
264
|
+
o._lastRenderedStartIndex = u, o._lastRenderedStopIndex = m, o._ensureRowsLoaded(u, m);
|
|
265
|
+
}, o._setRef = function(c) {
|
|
266
|
+
o._listRef = c;
|
|
267
|
+
}, a), ee(o, r);
|
|
312
268
|
}
|
|
313
|
-
|
|
269
|
+
return Et(t, [{
|
|
314
270
|
key: "resetloadMoreItemsCache",
|
|
315
|
-
value: function
|
|
316
|
-
var
|
|
317
|
-
this._memoizedUnloadedRanges = [];
|
|
318
|
-
if (autoReload) {
|
|
319
|
-
this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
320
|
-
}
|
|
271
|
+
value: function() {
|
|
272
|
+
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
273
|
+
this._memoizedUnloadedRanges = [], a && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
321
274
|
}
|
|
322
275
|
}, {
|
|
323
276
|
key: "componentDidMount",
|
|
324
|
-
value: function
|
|
277
|
+
value: function() {
|
|
325
278
|
}
|
|
326
279
|
}, {
|
|
327
280
|
key: "render",
|
|
328
|
-
value: function
|
|
329
|
-
var
|
|
330
|
-
return
|
|
281
|
+
value: function() {
|
|
282
|
+
var a = this.props.children;
|
|
283
|
+
return a({
|
|
331
284
|
onItemsRendered: this._onItemsRendered,
|
|
332
285
|
ref: this._setRef
|
|
333
286
|
});
|
|
334
287
|
}
|
|
335
288
|
}, {
|
|
336
289
|
key: "_ensureRowsLoaded",
|
|
337
|
-
value: function
|
|
338
|
-
var
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
stopIndex: Math.min(itemCount - 1, stopIndex + threshold)
|
|
290
|
+
value: function(a, o) {
|
|
291
|
+
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
|
+
isItemLoaded: d,
|
|
293
|
+
itemCount: l,
|
|
294
|
+
minimumBatchSize: c,
|
|
295
|
+
startIndex: Math.max(0, a - m),
|
|
296
|
+
stopIndex: Math.min(l - 1, o + m)
|
|
345
297
|
});
|
|
346
|
-
|
|
347
|
-
return
|
|
348
|
-
}))
|
|
349
|
-
this._memoizedUnloadedRanges = unloadedRanges;
|
|
350
|
-
this._loadUnloadedRanges(unloadedRanges);
|
|
351
|
-
}
|
|
298
|
+
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(g, I) {
|
|
299
|
+
return h[I] !== g;
|
|
300
|
+
})) && (this._memoizedUnloadedRanges = h, this._loadUnloadedRanges(h));
|
|
352
301
|
}
|
|
353
302
|
}, {
|
|
354
303
|
key: "_loadUnloadedRanges",
|
|
355
|
-
value: function
|
|
356
|
-
var
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
if (typeof _this2._listRef.resetAfterIndex === "function") {
|
|
374
|
-
_this2._listRef.resetAfterIndex(startIndex, true);
|
|
375
|
-
} else {
|
|
376
|
-
if (typeof _this2._listRef._getItemStyleCache === "function") {
|
|
377
|
-
_this2._listRef._getItemStyleCache(-1);
|
|
378
|
-
}
|
|
379
|
-
_this2._listRef.forceUpdate();
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
for (var i2 = 0; i2 < unloadedRanges.length; i2 += 2) {
|
|
386
|
-
_loop(i2);
|
|
387
|
-
}
|
|
304
|
+
value: function(a) {
|
|
305
|
+
for (var o = this, r = this.props.loadMoreItems || this.props.loadMoreRows, d = function(c) {
|
|
306
|
+
var u = a[c], m = a[c + 1], h = r(u, m);
|
|
307
|
+
h?.then(function() {
|
|
308
|
+
if (wt({
|
|
309
|
+
lastRenderedStartIndex: o._lastRenderedStartIndex,
|
|
310
|
+
lastRenderedStopIndex: o._lastRenderedStopIndex,
|
|
311
|
+
startIndex: u,
|
|
312
|
+
stopIndex: m
|
|
313
|
+
})) {
|
|
314
|
+
if (o._listRef == null)
|
|
315
|
+
return;
|
|
316
|
+
typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(u, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}, l = 0; l < a.length; l += 2)
|
|
320
|
+
d(l);
|
|
388
321
|
}
|
|
389
|
-
}]);
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
const r$4 = /* @__PURE__ */ styled_default("div")({
|
|
322
|
+
}]), t;
|
|
323
|
+
})(ze);
|
|
324
|
+
const xt = /* @__PURE__ */ p("div")({
|
|
393
325
|
name: "Container",
|
|
394
326
|
class: "culdu4a",
|
|
395
|
-
propsAsIs:
|
|
396
|
-
}),
|
|
327
|
+
propsAsIs: !1
|
|
328
|
+
}), Lt = /* @__PURE__ */ p("div")({
|
|
397
329
|
name: "Position",
|
|
398
330
|
class: "pwf8e69",
|
|
399
|
-
propsAsIs:
|
|
400
|
-
}),
|
|
331
|
+
propsAsIs: !1
|
|
332
|
+
}), Dt = /* @__PURE__ */ p("img")({
|
|
401
333
|
name: "Avatar",
|
|
402
334
|
class: "atf4yh4",
|
|
403
|
-
propsAsIs:
|
|
404
|
-
}),
|
|
335
|
+
propsAsIs: !1
|
|
336
|
+
}), Tt = /* @__PURE__ */ p("div")({
|
|
405
337
|
name: "AvatarPlaceholder",
|
|
406
338
|
class: "a1dg29ja",
|
|
407
|
-
propsAsIs:
|
|
408
|
-
}),
|
|
339
|
+
propsAsIs: !1
|
|
340
|
+
}), Ot = /* @__PURE__ */ p("div")({
|
|
409
341
|
name: "Content",
|
|
410
342
|
class: "c10a68rc",
|
|
411
|
-
propsAsIs:
|
|
412
|
-
}),
|
|
343
|
+
propsAsIs: !1
|
|
344
|
+
}), _t = /* @__PURE__ */ p("div")({
|
|
413
345
|
name: "NameContainer",
|
|
414
346
|
class: "nc4kck5",
|
|
415
|
-
propsAsIs:
|
|
416
|
-
}),
|
|
347
|
+
propsAsIs: !1
|
|
348
|
+
}), Mt = /* @__PURE__ */ p("span")({
|
|
417
349
|
name: "Name",
|
|
418
350
|
class: "njsrqgr",
|
|
419
|
-
propsAsIs:
|
|
420
|
-
}),
|
|
351
|
+
propsAsIs: !1
|
|
352
|
+
}), Bt = () => x, Ut = /* @__PURE__ */ p(Bt())({
|
|
421
353
|
name: "CurrentUserBadge",
|
|
422
354
|
class: "c17uc4zr",
|
|
423
|
-
propsAsIs:
|
|
424
|
-
})
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
d2 && /* @__PURE__ */ jsx(d$2, { name: "icon-star" })
|
|
355
|
+
propsAsIs: !0
|
|
356
|
+
}), Ft = ({
|
|
357
|
+
friendsRank: e,
|
|
358
|
+
avatar: t,
|
|
359
|
+
name: s,
|
|
360
|
+
userId: a,
|
|
361
|
+
points: o,
|
|
362
|
+
isCurrentUser: r,
|
|
363
|
+
style: d
|
|
364
|
+
}) => /* @__PURE__ */ v(xt, { "data-name": a, style: d, children: [
|
|
365
|
+
/* @__PURE__ */ n(Lt, { children: e || 0 }),
|
|
366
|
+
/* @__PURE__ */ v(Ot, { children: [
|
|
367
|
+
t ? /* @__PURE__ */ n(Dt, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(Tt, { children: et(s || "") }),
|
|
368
|
+
/* @__PURE__ */ v(_t, { children: [
|
|
369
|
+
/* @__PURE__ */ n(Mt, { children: s || "" }),
|
|
370
|
+
r && /* @__PURE__ */ n(Ut, { name: "icon-star" })
|
|
440
371
|
] })
|
|
441
372
|
] }),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
] })
|
|
444
|
-
const u$1 = /* @__PURE__ */ styled_default("div")({
|
|
373
|
+
/* @__PURE__ */ n("div", { children: tt(o) })
|
|
374
|
+
] }), Pt = /* @__PURE__ */ p("div")({
|
|
445
375
|
name: "Container",
|
|
446
376
|
class: "c16btbfp",
|
|
447
|
-
propsAsIs:
|
|
448
|
-
}),
|
|
449
|
-
items:
|
|
450
|
-
currentUserId:
|
|
451
|
-
openItemDetail:
|
|
452
|
-
fetchMore:
|
|
453
|
-
scrollNode:
|
|
454
|
-
hasMore:
|
|
377
|
+
propsAsIs: !1
|
|
378
|
+
}), zt = ({
|
|
379
|
+
items: e,
|
|
380
|
+
currentUserId: t,
|
|
381
|
+
openItemDetail: s,
|
|
382
|
+
fetchMore: a,
|
|
383
|
+
scrollNode: o,
|
|
384
|
+
hasMore: r
|
|
455
385
|
}) => {
|
|
456
|
-
const
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
}, [
|
|
460
|
-
return /* @__PURE__ */
|
|
461
|
-
loadMore:
|
|
462
|
-
initialLoad:
|
|
463
|
-
hasMore:
|
|
464
|
-
useWindow:
|
|
465
|
-
getScrollParent: () =>
|
|
466
|
-
children: /* @__PURE__ */
|
|
386
|
+
const d = z((l) => {
|
|
387
|
+
const i = l.target.getAttribute("data-name");
|
|
388
|
+
i && s(i);
|
|
389
|
+
}, [s]);
|
|
390
|
+
return /* @__PURE__ */ n(Ye, {
|
|
391
|
+
loadMore: a,
|
|
392
|
+
initialLoad: !1,
|
|
393
|
+
hasMore: r,
|
|
394
|
+
useWindow: !1,
|
|
395
|
+
getScrollParent: () => o.current,
|
|
396
|
+
children: /* @__PURE__ */ n(Pt, {
|
|
467
397
|
"data-a": "intr",
|
|
468
|
-
onClick:
|
|
469
|
-
children:
|
|
470
|
-
...
|
|
471
|
-
isCurrentUser: !!
|
|
472
|
-
},
|
|
398
|
+
onClick: d,
|
|
399
|
+
children: e.map((l) => /* @__PURE__ */ n(Ft, {
|
|
400
|
+
...l,
|
|
401
|
+
isCurrentUser: !!t && t === l.userId
|
|
402
|
+
}, l.userId))
|
|
473
403
|
})
|
|
474
404
|
});
|
|
475
|
-
}
|
|
476
|
-
const r$3 = /* @__PURE__ */ styled_default("div")({
|
|
405
|
+
}, Vt = /* @__PURE__ */ p("div")({
|
|
477
406
|
name: "InviteFriendsContainer",
|
|
478
407
|
class: "i1c9dygq",
|
|
479
|
-
propsAsIs:
|
|
480
|
-
}),
|
|
481
|
-
deepLink:
|
|
482
|
-
}) => /* @__PURE__ */
|
|
483
|
-
children: /* @__PURE__ */
|
|
484
|
-
inviteLink:
|
|
408
|
+
propsAsIs: !1
|
|
409
|
+
}), qt = ({
|
|
410
|
+
deepLink: e
|
|
411
|
+
}) => /* @__PURE__ */ n(Vt, {
|
|
412
|
+
children: /* @__PURE__ */ n(Te, {
|
|
413
|
+
inviteLink: e,
|
|
485
414
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
486
415
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
487
416
|
})
|
|
488
|
-
})
|
|
489
|
-
const v$1 = /* @__PURE__ */ styled_default("div")({
|
|
417
|
+
}), jt = /* @__PURE__ */ p("div")({
|
|
490
418
|
name: "InviteLinkContainer",
|
|
491
419
|
class: "i1odbhm4",
|
|
492
|
-
propsAsIs:
|
|
493
|
-
}),
|
|
494
|
-
gamification:
|
|
495
|
-
scrollNode:
|
|
496
|
-
scrollStore:
|
|
497
|
-
leaderboardList:
|
|
420
|
+
propsAsIs: !1
|
|
421
|
+
}), Qt = ({
|
|
422
|
+
gamification: e,
|
|
423
|
+
scrollNode: t,
|
|
424
|
+
scrollStore: s,
|
|
425
|
+
leaderboardList: a
|
|
498
426
|
}) => {
|
|
499
|
-
const
|
|
500
|
-
data:
|
|
501
|
-
hasMore:
|
|
502
|
-
loading:
|
|
503
|
-
key:
|
|
504
|
-
} =
|
|
505
|
-
data:
|
|
506
|
-
} =
|
|
507
|
-
return !
|
|
508
|
-
deepLink:
|
|
509
|
-
}) : /* @__PURE__ */
|
|
510
|
-
children: [/* @__PURE__ */
|
|
511
|
-
items:
|
|
512
|
-
scrollNode:
|
|
513
|
-
scrollStore:
|
|
514
|
-
fetchMore:
|
|
515
|
-
hasMore:
|
|
516
|
-
openItemDetail:
|
|
517
|
-
currentUserId:
|
|
518
|
-
},
|
|
519
|
-
ref:
|
|
520
|
-
children: /* @__PURE__ */
|
|
427
|
+
const o = E(null), {
|
|
428
|
+
data: r,
|
|
429
|
+
hasMore: d,
|
|
430
|
+
loading: l,
|
|
431
|
+
key: i
|
|
432
|
+
} = f(a.$store), {
|
|
433
|
+
data: c
|
|
434
|
+
} = f(e.deepLink.$store), [u, m] = Oe(o);
|
|
435
|
+
return !r.length && !l ? /* @__PURE__ */ n(qt, {
|
|
436
|
+
deepLink: c
|
|
437
|
+
}) : /* @__PURE__ */ v(R, {
|
|
438
|
+
children: [/* @__PURE__ */ n(zt, {
|
|
439
|
+
items: r,
|
|
440
|
+
scrollNode: t,
|
|
441
|
+
scrollStore: s,
|
|
442
|
+
fetchMore: a.fetchMore,
|
|
443
|
+
hasMore: d,
|
|
444
|
+
openItemDetail: e.openUser,
|
|
445
|
+
currentUserId: e.currentUserId.get()
|
|
446
|
+
}, i), c && /* @__PURE__ */ n(jt, {
|
|
447
|
+
ref: o,
|
|
448
|
+
children: /* @__PURE__ */ n($t, {
|
|
521
449
|
"data-a": "intr",
|
|
522
|
-
onClick: () =>
|
|
450
|
+
onClick: () => u(c),
|
|
523
451
|
title: "Invite Friends",
|
|
524
452
|
description: "Challenge them now!"
|
|
525
453
|
})
|
|
526
|
-
}),
|
|
454
|
+
}), m]
|
|
527
455
|
});
|
|
528
|
-
},
|
|
529
|
-
gamification:
|
|
530
|
-
scrollNode:
|
|
531
|
-
scrollStore:
|
|
532
|
-
}) =>
|
|
533
|
-
leaderboardList:
|
|
534
|
-
gamification:
|
|
535
|
-
scrollNode:
|
|
536
|
-
scrollStore:
|
|
537
|
-
}) : null
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
return useEffect(() => {
|
|
546
|
-
const c2 = r2.$store.subscribe((o2) => {
|
|
547
|
-
o2 && s2(o2);
|
|
456
|
+
}, Kt = ({
|
|
457
|
+
gamification: e,
|
|
458
|
+
scrollNode: t,
|
|
459
|
+
scrollStore: s
|
|
460
|
+
}) => e.leaderboardList ? /* @__PURE__ */ n(Qt, {
|
|
461
|
+
leaderboardList: e.leaderboardList,
|
|
462
|
+
gamification: e,
|
|
463
|
+
scrollNode: t,
|
|
464
|
+
scrollStore: s
|
|
465
|
+
}) : null, Wt = ({ store: e, openQuestion: t }) => {
|
|
466
|
+
const { sdk: s } = q(), a = f(e);
|
|
467
|
+
return /* @__PURE__ */ n(_e, { openQuestion: t, questions: a.data, controlVideo: s?.controlVideoPlayer });
|
|
468
|
+
}, Gt = ({ userSummary: e }) => {
|
|
469
|
+
const [t, s] = N(void 0);
|
|
470
|
+
return b(() => {
|
|
471
|
+
const a = e.$store.subscribe((o) => {
|
|
472
|
+
o && s(o);
|
|
548
473
|
});
|
|
549
474
|
return () => {
|
|
550
|
-
|
|
475
|
+
a();
|
|
551
476
|
};
|
|
552
|
-
}, [
|
|
553
|
-
}
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
var b2;
|
|
558
|
-
h2(r2), l2 === false && (((b2 = c2.current) == null ? void 0 : b2.getBoundingClientRect().y) || 0) < 0 && I$2(c2, g2.size, { behavior: "instant" });
|
|
477
|
+
}, [e]), /* @__PURE__ */ n(me, { loading: !t?.summary, ...t?.summary, successRate: t?.percentage?.correct });
|
|
478
|
+
}, Ht = ({ gamification: e, className: t, scrollStore: s, scrollNode: a, appNode: o, style: r, responsiveStore: d }) => {
|
|
479
|
+
const { tabsShown: l } = f(s, { keys: ["tabsShown"] }), i = f(e.friendsTabEnabled), [c, u] = N(D.HOME), [, m] = Ne(), { sdkInDesktopView: h, screen: g } = f(d, { keys: ["sdkInDesktopView"] }), I = (k) => {
|
|
480
|
+
m(() => {
|
|
481
|
+
u(k), h === !1 && (o.current?.getBoundingClientRect().y || 0) < 0 && j(o, g.size, { behavior: "instant" });
|
|
559
482
|
});
|
|
560
483
|
};
|
|
561
|
-
|
|
562
|
-
if (
|
|
563
|
-
|
|
484
|
+
b(() => s.subscribe((k) => {
|
|
485
|
+
if (k.scrollPosition === 0) {
|
|
486
|
+
s.setKey("tabsShown", !0);
|
|
564
487
|
return;
|
|
565
488
|
}
|
|
566
|
-
|
|
567
|
-
}), [
|
|
568
|
-
|
|
569
|
-
}, [
|
|
570
|
-
let
|
|
571
|
-
return
|
|
572
|
-
|
|
573
|
-
|
|
489
|
+
d.get().sdkInDesktopView ? s.setKey("tabsShown", k.scrollDirection === "backward") : s.setKey("tabsShown", k.scrollDirection === "forward");
|
|
490
|
+
}), [s, d]), b(() => {
|
|
491
|
+
i || u(D.HOME);
|
|
492
|
+
}, [i]);
|
|
493
|
+
let A = "0px";
|
|
494
|
+
return h ? A = l ? "0px" : "calc(0px - var(--header-height))" : A = l ? "var(--header-height)" : "0px", /* @__PURE__ */ v(Se, { className: $(t, "SL-Tabs", "sl-hide-on-modal"), style: r, children: [
|
|
495
|
+
i && /* @__PURE__ */ n(
|
|
496
|
+
$e,
|
|
574
497
|
{
|
|
575
498
|
style: {
|
|
576
|
-
top:
|
|
499
|
+
top: A
|
|
577
500
|
},
|
|
578
|
-
children: /* @__PURE__ */
|
|
501
|
+
children: /* @__PURE__ */ n(ft, { activePage: c, toggleActivePage: I })
|
|
579
502
|
}
|
|
580
503
|
),
|
|
581
|
-
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
/* @__PURE__ */
|
|
504
|
+
c === D.HOME && /* @__PURE__ */ v(R, { children: [
|
|
505
|
+
/* @__PURE__ */ n(we, { children: /* @__PURE__ */ n(Ae, { children: /* @__PURE__ */ n(Gt, { userSummary: e.userSummary }) }) }),
|
|
506
|
+
/* @__PURE__ */ n(Ce, { style: { flex: 1 }, children: /* @__PURE__ */ n(Wt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
584
507
|
] }),
|
|
585
|
-
|
|
508
|
+
c === D.LEADERBOARD && /* @__PURE__ */ n(Ee, { children: /* @__PURE__ */ n(Kt, { scrollStore: s, scrollNode: a, gamification: e }) })
|
|
586
509
|
] });
|
|
587
|
-
}
|
|
588
|
-
const R = () => f$5, u = /* @__PURE__ */ styled_default(R())({
|
|
510
|
+
}, Jt = () => V, te = /* @__PURE__ */ p(Jt())({
|
|
589
511
|
name: "OpenedContainer",
|
|
590
512
|
class: "ouvguos",
|
|
591
|
-
propsAsIs:
|
|
592
|
-
}),
|
|
513
|
+
propsAsIs: !0
|
|
514
|
+
}), se = "t1eu4lbg", Zt = /* @__PURE__ */ p("div")({
|
|
593
515
|
name: "UserContainer",
|
|
594
516
|
class: "uuv2xqo",
|
|
595
|
-
propsAsIs:
|
|
596
|
-
}),
|
|
597
|
-
correct:
|
|
598
|
-
incorrect:
|
|
517
|
+
propsAsIs: !1
|
|
518
|
+
}), Xt = ({
|
|
519
|
+
correct: e,
|
|
520
|
+
incorrect: t
|
|
599
521
|
}) => {
|
|
600
|
-
const
|
|
601
|
-
return
|
|
602
|
-
},
|
|
603
|
-
gamification:
|
|
604
|
-
scrollStore:
|
|
605
|
-
className:
|
|
606
|
-
appNode:
|
|
607
|
-
scrollNode:
|
|
608
|
-
responsiveStore:
|
|
609
|
-
}) => /* @__PURE__ */
|
|
610
|
-
appNode:
|
|
611
|
-
scrollStore:
|
|
612
|
-
scrollNode:
|
|
613
|
-
className:
|
|
614
|
-
gamification:
|
|
615
|
-
responsiveStore:
|
|
616
|
-
}),
|
|
617
|
-
gamification:
|
|
618
|
-
muted:
|
|
619
|
-
sdk:
|
|
620
|
-
className:
|
|
621
|
-
appNode:
|
|
622
|
-
responsiveStore:
|
|
522
|
+
const s = e + t;
|
|
523
|
+
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
524
|
+
}, Tn = ({
|
|
525
|
+
gamification: e,
|
|
526
|
+
scrollStore: t,
|
|
527
|
+
className: s,
|
|
528
|
+
appNode: a,
|
|
529
|
+
scrollNode: o,
|
|
530
|
+
responsiveStore: r
|
|
531
|
+
}) => /* @__PURE__ */ n(Ht, {
|
|
532
|
+
appNode: a,
|
|
533
|
+
scrollStore: t,
|
|
534
|
+
scrollNode: o,
|
|
535
|
+
className: s,
|
|
536
|
+
gamification: e,
|
|
537
|
+
responsiveStore: r
|
|
538
|
+
}), Yt = ({
|
|
539
|
+
gamification: e,
|
|
540
|
+
muted: t,
|
|
541
|
+
sdk: s,
|
|
542
|
+
className: a,
|
|
543
|
+
appNode: o,
|
|
544
|
+
responsiveStore: r
|
|
623
545
|
}) => {
|
|
624
546
|
const {
|
|
625
|
-
topNavigation:
|
|
626
|
-
} =
|
|
627
|
-
sdkInDesktopView:
|
|
628
|
-
} =
|
|
547
|
+
topNavigation: d
|
|
548
|
+
} = q(), l = f(e.openedQuestionId), i = f(e.openedQuestion.$store), c = f(e.openedUser || he(void 0)), {
|
|
549
|
+
sdkInDesktopView: u
|
|
550
|
+
} = f(r, {
|
|
629
551
|
keys: ["sdkInDesktopView"]
|
|
630
552
|
}), {
|
|
631
|
-
hiding:
|
|
632
|
-
onAnimationEnd:
|
|
633
|
-
} =
|
|
634
|
-
if (!
|
|
553
|
+
hiding: m,
|
|
554
|
+
onAnimationEnd: h
|
|
555
|
+
} = Re();
|
|
556
|
+
if (!l && !c)
|
|
635
557
|
return null;
|
|
636
|
-
const
|
|
637
|
-
className:
|
|
638
|
-
hiding:
|
|
639
|
-
onAnimationEnd:
|
|
640
|
-
children: /* @__PURE__ */
|
|
641
|
-
muted:
|
|
642
|
-
sdk:
|
|
643
|
-
gamification:
|
|
558
|
+
const g = i ? /* @__PURE__ */ n(te, {
|
|
559
|
+
className: $(a, !d && se),
|
|
560
|
+
hiding: m,
|
|
561
|
+
onAnimationEnd: h,
|
|
562
|
+
children: /* @__PURE__ */ n(He, {
|
|
563
|
+
muted: t,
|
|
564
|
+
sdk: s,
|
|
565
|
+
gamification: e
|
|
644
566
|
})
|
|
645
|
-
}) :
|
|
646
|
-
className:
|
|
647
|
-
hiding:
|
|
648
|
-
onAnimationEnd:
|
|
649
|
-
children: /* @__PURE__ */
|
|
650
|
-
children: [/* @__PURE__ */
|
|
567
|
+
}) : c ? /* @__PURE__ */ n(te, {
|
|
568
|
+
className: $(a, !d && se),
|
|
569
|
+
hiding: m,
|
|
570
|
+
onAnimationEnd: h,
|
|
571
|
+
children: /* @__PURE__ */ v(Zt, {
|
|
572
|
+
children: [/* @__PURE__ */ n(Ze, {
|
|
651
573
|
label: "Friend's Rank",
|
|
652
|
-
close:
|
|
653
|
-
}), /* @__PURE__ */
|
|
654
|
-
children: /* @__PURE__ */
|
|
655
|
-
...
|
|
656
|
-
successRate:
|
|
574
|
+
close: e.closeUser
|
|
575
|
+
}), /* @__PURE__ */ n(xe, {
|
|
576
|
+
children: /* @__PURE__ */ n(me, {
|
|
577
|
+
...c,
|
|
578
|
+
successRate: Xt(c)
|
|
657
579
|
})
|
|
658
580
|
})]
|
|
659
581
|
})
|
|
660
582
|
}) : null;
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
container:
|
|
663
|
-
useContainer: !
|
|
664
|
-
children:
|
|
583
|
+
return /* @__PURE__ */ n(fe, {
|
|
584
|
+
container: o,
|
|
585
|
+
useContainer: !u,
|
|
586
|
+
children: g
|
|
665
587
|
});
|
|
666
|
-
}
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
d$1,
|
|
588
|
+
}, es = qe(() => import("./gamification-feature.js")), ts = ({ sdk: e, feature: t, className: s, scrollStore: a, appNode: o, scrollNode: r, responsiveStore: d }) => {
|
|
589
|
+
const l = w(() => t && t.featureConfig.get().type === y.GAMES ? /* @__PURE__ */ n(ct, { className: s, sdk: e, feature: t, children: /* @__PURE__ */ n(
|
|
590
|
+
es,
|
|
670
591
|
{
|
|
671
|
-
appNode:
|
|
672
|
-
scrollStore:
|
|
673
|
-
scrollNode:
|
|
674
|
-
className:
|
|
675
|
-
responsiveStore:
|
|
676
|
-
gamification:
|
|
592
|
+
appNode: o,
|
|
593
|
+
scrollStore: a,
|
|
594
|
+
scrollNode: r,
|
|
595
|
+
className: s,
|
|
596
|
+
responsiveStore: d,
|
|
597
|
+
gamification: t
|
|
677
598
|
}
|
|
678
|
-
) }) : null, [
|
|
679
|
-
return /* @__PURE__ */
|
|
680
|
-
|
|
599
|
+
) }) : null, [e, t, s, d, a, r, o]);
|
|
600
|
+
return /* @__PURE__ */ n(
|
|
601
|
+
Ve,
|
|
681
602
|
{
|
|
682
|
-
fallback: /* @__PURE__ */
|
|
683
|
-
children:
|
|
603
|
+
fallback: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
604
|
+
children: l
|
|
684
605
|
}
|
|
685
606
|
);
|
|
686
|
-
},
|
|
687
|
-
|
|
607
|
+
}, ss = ({ feature: e, sdk: t, muted: s, className: a, appNode: o, responsiveStore: r }) => e && e.featureConfig.get().type === y.GAMES ? /* @__PURE__ */ n(
|
|
608
|
+
Yt,
|
|
688
609
|
{
|
|
689
|
-
className:
|
|
690
|
-
appNode:
|
|
691
|
-
muted:
|
|
692
|
-
sdk:
|
|
693
|
-
responsiveStore:
|
|
694
|
-
gamification:
|
|
610
|
+
className: a,
|
|
611
|
+
appNode: o,
|
|
612
|
+
muted: s,
|
|
613
|
+
sdk: t,
|
|
614
|
+
responsiveStore: r,
|
|
615
|
+
gamification: e
|
|
695
616
|
}
|
|
696
617
|
) : null;
|
|
697
618
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
698
|
-
function
|
|
699
|
-
return
|
|
700
|
-
(
|
|
701
|
-
|
|
619
|
+
function ns(e) {
|
|
620
|
+
return e instanceof DOMException && // everything except Firefox
|
|
621
|
+
(e.code === 22 || // Firefox
|
|
622
|
+
e.code === 1014 || // test name field too, because code might not be present
|
|
702
623
|
// everything except Firefox
|
|
703
|
-
|
|
704
|
-
|
|
624
|
+
e.name === "QuotaExceededError" || // Firefox
|
|
625
|
+
e.name === "NS_ERROR_DOM_QUOTA_REACHED");
|
|
705
626
|
}
|
|
706
|
-
class
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
for (const key in window.localStorage) {
|
|
713
|
-
if (key.startsWith(this.prefix)) {
|
|
714
|
-
this.storage.removeItem(key);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
});
|
|
718
|
-
__publicField(this, "generateKey", (keyParts) => `${this.prefix}${this.delimiter}${keyParts.join(this.delimiter)}`);
|
|
719
|
-
__publicField(this, "write", (...keyParts) => {
|
|
720
|
-
const value = keyParts.pop() || "";
|
|
721
|
-
const key = this.generateKey(keyParts);
|
|
722
|
-
try {
|
|
723
|
-
this.storage.setItem(key, value);
|
|
724
|
-
} catch (err) {
|
|
725
|
-
if (isQuotaExceededError(err) && this.storage === window.sessionStorage) {
|
|
726
|
-
window.sessionStorage.removeItem("slstreamlogs");
|
|
727
|
-
this.storage.setItem(key, value);
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
});
|
|
731
|
-
__publicField(this, "read", (...keyParts) => {
|
|
732
|
-
const value = this.storage.getItem(this.generateKey(keyParts));
|
|
733
|
-
return value === null ? void 0 : value;
|
|
734
|
-
});
|
|
735
|
-
__publicField(this, "remove", (...keyParts) => {
|
|
736
|
-
this.storage.removeItem(this.generateKey(keyParts));
|
|
737
|
-
});
|
|
738
|
-
this.prefix = `sl-sdk${this.delimiter}${prefix}`;
|
|
739
|
-
this.storage = storage;
|
|
627
|
+
class os {
|
|
628
|
+
delimiter = ":";
|
|
629
|
+
prefix;
|
|
630
|
+
storage;
|
|
631
|
+
constructor(t = "main", s = window.localStorage) {
|
|
632
|
+
this.prefix = `sl-sdk${this.delimiter}${t}`, this.storage = s;
|
|
740
633
|
}
|
|
634
|
+
clear = () => {
|
|
635
|
+
for (const t in window.localStorage)
|
|
636
|
+
t.startsWith(this.prefix) && this.storage.removeItem(t);
|
|
637
|
+
};
|
|
638
|
+
generateKey = (t) => `${this.prefix}${this.delimiter}${t.join(this.delimiter)}`;
|
|
639
|
+
write = (...t) => {
|
|
640
|
+
const s = t.pop() || "", a = this.generateKey(t);
|
|
641
|
+
try {
|
|
642
|
+
this.storage.setItem(a, s);
|
|
643
|
+
} catch (o) {
|
|
644
|
+
ns(o) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(a, s));
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
read = (...t) => {
|
|
648
|
+
const s = this.storage.getItem(this.generateKey(t));
|
|
649
|
+
return s === null ? void 0 : s;
|
|
650
|
+
};
|
|
651
|
+
remove = (...t) => {
|
|
652
|
+
this.storage.removeItem(this.generateKey(t));
|
|
653
|
+
};
|
|
741
654
|
}
|
|
742
|
-
var
|
|
743
|
-
(function(
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
Code.Unknown,
|
|
756
|
-
Code.Internal,
|
|
757
|
-
Code.DeadlineExceeded,
|
|
758
|
-
Code.ResourceExhausted,
|
|
759
|
-
Code.FailedPrecondition,
|
|
760
|
-
Code.Unavailable,
|
|
761
|
-
Code.DataLoss
|
|
762
|
-
]);
|
|
763
|
-
createLogger("grpc:retry");
|
|
764
|
-
({
|
|
765
|
-
retryAttempts: createContextKey(10, { description: "Number of attempts to retry" }),
|
|
766
|
-
retryDelay: createContextKey(3e4, { description: "Max delay between retries in milliseconds" })
|
|
767
|
-
});
|
|
768
|
-
var KEY_PREFIX$2;
|
|
769
|
-
(function(KEY_PREFIX2) {
|
|
770
|
-
KEY_PREFIX2["SCHEMA"] = "schema";
|
|
771
|
-
KEY_PREFIX2["EXTERNAL_TOKEN"] = "eToken";
|
|
772
|
-
KEY_PREFIX2["TOKEN"] = "token";
|
|
773
|
-
})(KEY_PREFIX$2 || (KEY_PREFIX$2 = {}));
|
|
774
|
-
class UserStorage extends Storage {
|
|
655
|
+
var ne;
|
|
656
|
+
(function(e) {
|
|
657
|
+
e.Init = "init", e.Ready = "ready", e.Connecting = "connecting", e.Connected = "connected", e.Disconnected = "disconnected", e.Failed = "failed", e.Reconnect = "reconnect", e.Reconnecting = "reconnecting";
|
|
658
|
+
})(ne || (ne = {}));
|
|
659
|
+
T("grpc:stream");
|
|
660
|
+
C.Unknown, C.Internal, C.DeadlineExceeded, C.ResourceExhausted, C.FailedPrecondition, C.Unavailable, C.DataLoss;
|
|
661
|
+
T("grpc:retry");
|
|
662
|
+
W(10, { description: "Number of attempts to retry" }), W(3e4, { description: "Max delay between retries in milliseconds" });
|
|
663
|
+
var S;
|
|
664
|
+
(function(e) {
|
|
665
|
+
e.SCHEMA = "schema", e.EXTERNAL_TOKEN = "eToken", e.TOKEN = "token";
|
|
666
|
+
})(S || (S = {}));
|
|
667
|
+
class as extends os {
|
|
775
668
|
constructor() {
|
|
776
669
|
super("user");
|
|
777
|
-
// Schema
|
|
778
|
-
__publicField(this, "setSchema", (value) => {
|
|
779
|
-
this.write(KEY_PREFIX$2.SCHEMA, value);
|
|
780
|
-
});
|
|
781
|
-
__publicField(this, "getSchema", () => {
|
|
782
|
-
return this.read(KEY_PREFIX$2.SCHEMA);
|
|
783
|
-
});
|
|
784
|
-
// Token
|
|
785
|
-
__publicField(this, "setToken", (value) => {
|
|
786
|
-
this.write(KEY_PREFIX$2.TOKEN, value);
|
|
787
|
-
});
|
|
788
|
-
__publicField(this, "getToken", () => {
|
|
789
|
-
return this.read(KEY_PREFIX$2.TOKEN);
|
|
790
|
-
});
|
|
791
|
-
// External Token
|
|
792
|
-
__publicField(this, "setExternalToken", (value) => {
|
|
793
|
-
this.write(KEY_PREFIX$2.EXTERNAL_TOKEN, value);
|
|
794
|
-
});
|
|
795
|
-
__publicField(this, "getExternalToken", () => {
|
|
796
|
-
return this.read(KEY_PREFIX$2.EXTERNAL_TOKEN);
|
|
797
|
-
});
|
|
798
|
-
__publicField(this, "removeToken", () => {
|
|
799
|
-
this.remove(KEY_PREFIX$2.TOKEN);
|
|
800
|
-
});
|
|
801
670
|
}
|
|
671
|
+
// Schema
|
|
672
|
+
setSchema = (t) => {
|
|
673
|
+
this.write(S.SCHEMA, t);
|
|
674
|
+
};
|
|
675
|
+
getSchema = () => this.read(S.SCHEMA);
|
|
676
|
+
// Token
|
|
677
|
+
setToken = (t) => {
|
|
678
|
+
this.write(S.TOKEN, t);
|
|
679
|
+
};
|
|
680
|
+
getToken = () => this.read(S.TOKEN);
|
|
681
|
+
// External Token
|
|
682
|
+
setExternalToken = (t) => {
|
|
683
|
+
this.write(S.EXTERNAL_TOKEN, t);
|
|
684
|
+
};
|
|
685
|
+
getExternalToken = () => this.read(S.EXTERNAL_TOKEN);
|
|
686
|
+
removeToken = () => {
|
|
687
|
+
this.remove(S.TOKEN);
|
|
688
|
+
};
|
|
802
689
|
}
|
|
803
|
-
var
|
|
804
|
-
(function(
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
})(
|
|
811
|
-
var
|
|
812
|
-
(function(
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
})(
|
|
823
|
-
|
|
824
|
-
(
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
new UserStorage();
|
|
836
|
-
createLogger("video_player");
|
|
837
|
-
var OnboardingStatus;
|
|
838
|
-
(function(OnboardingStatus2) {
|
|
839
|
-
OnboardingStatus2["Unset"] = "unset";
|
|
840
|
-
OnboardingStatus2["Required"] = "required";
|
|
841
|
-
OnboardingStatus2["Optional"] = "optional";
|
|
842
|
-
OnboardingStatus2["Completed"] = "completed";
|
|
843
|
-
OnboardingStatus2["Disabled"] = "disabled";
|
|
844
|
-
OnboardingStatus2["Unavailable"] = "unavailable";
|
|
845
|
-
})(OnboardingStatus || (OnboardingStatus = {}));
|
|
846
|
-
/* @__PURE__ */ new Set([QuestionType.POLL, QuestionType.PREDICTION, QuestionType.TRIVIA]);
|
|
847
|
-
const AvailableFeatures = {
|
|
848
|
-
[SdkOverlayType.GAMES]: true
|
|
849
|
-
};
|
|
850
|
-
const n$2 = /* @__PURE__ */ styled_default("div")({
|
|
690
|
+
var oe;
|
|
691
|
+
(function(e) {
|
|
692
|
+
e.DISABLED = "disabled", e.INITIALIZATION = "initialization", e.READY = "ready", e.FAILED = "failed", e.SUSPENDED = "suspended";
|
|
693
|
+
})(oe || (oe = {}));
|
|
694
|
+
var ae;
|
|
695
|
+
(function(e) {
|
|
696
|
+
e.SHOWED = "showed", e.EVENT = "ev";
|
|
697
|
+
})(ae || (ae = {}));
|
|
698
|
+
var re;
|
|
699
|
+
(function(e) {
|
|
700
|
+
e.ONBOARDING = "onboarding", e.ONBOARDING_IO = "onboarding_io", e.QUESTION_RECEIVED = "q-received", e.QUESTION_OPENED = "q-opened";
|
|
701
|
+
})(re || (re = {}));
|
|
702
|
+
var ie;
|
|
703
|
+
(function(e) {
|
|
704
|
+
e.ALLOWED = "allowed", e.DISALLOWED = "disallowed";
|
|
705
|
+
})(ie || (ie = {}));
|
|
706
|
+
var le;
|
|
707
|
+
(function(e) {
|
|
708
|
+
e.UNKNOWN = "unknown", e.ALREADY_VOTED = "already_voted";
|
|
709
|
+
})(le || (le = {}));
|
|
710
|
+
T("deep_link");
|
|
711
|
+
T("bypass");
|
|
712
|
+
new as();
|
|
713
|
+
T("video_player");
|
|
714
|
+
var de;
|
|
715
|
+
(function(e) {
|
|
716
|
+
e.Unset = "unset", e.Required = "required", e.Optional = "optional", e.Completed = "completed", e.Disabled = "disabled", e.Unavailable = "unavailable";
|
|
717
|
+
})(de || (de = {}));
|
|
718
|
+
U.POLL, U.PREDICTION, U.TRIVIA;
|
|
719
|
+
const rs = {
|
|
720
|
+
[y.GAMES]: !0
|
|
721
|
+
}, is = /* @__PURE__ */ p("div")({
|
|
851
722
|
name: "Buttons",
|
|
852
723
|
class: "b5o8qbl",
|
|
853
|
-
propsAsIs:
|
|
854
|
-
}),
|
|
855
|
-
children:
|
|
856
|
-
className:
|
|
857
|
-
}) => /* @__PURE__ */
|
|
858
|
-
className:
|
|
859
|
-
children:
|
|
860
|
-
})
|
|
861
|
-
const n$1 = /* @__PURE__ */ styled_default("div")({
|
|
724
|
+
propsAsIs: !1
|
|
725
|
+
}), ls = ({
|
|
726
|
+
children: e,
|
|
727
|
+
className: t
|
|
728
|
+
}) => /* @__PURE__ */ n(is, {
|
|
729
|
+
className: t,
|
|
730
|
+
children: e
|
|
731
|
+
}), Ie = /* @__PURE__ */ p("div")({
|
|
862
732
|
name: "Navigation",
|
|
863
733
|
class: "n6tbwuy",
|
|
864
|
-
propsAsIs:
|
|
865
|
-
}),
|
|
734
|
+
propsAsIs: !1
|
|
735
|
+
}), ds = () => ls, ce = /* @__PURE__ */ p(ds())({
|
|
866
736
|
name: "NavigationItems",
|
|
867
737
|
class: "n1up4z7v",
|
|
868
|
-
propsAsIs:
|
|
869
|
-
})
|
|
870
|
-
const o = /* @__PURE__ */ styled_default("button")({
|
|
738
|
+
propsAsIs: !0
|
|
739
|
+
}), cs = /* @__PURE__ */ p("button")({
|
|
871
740
|
name: "SButton",
|
|
872
741
|
class: "sxxa0c",
|
|
873
|
-
propsAsIs:
|
|
874
|
-
}),
|
|
742
|
+
propsAsIs: !1
|
|
743
|
+
}), ps = /* @__PURE__ */ p("span")({
|
|
875
744
|
name: "ButtonIcon",
|
|
876
745
|
class: "b193dcyu",
|
|
877
|
-
propsAsIs:
|
|
878
|
-
}),
|
|
746
|
+
propsAsIs: !1
|
|
747
|
+
}), us = /* @__PURE__ */ p("span")({
|
|
879
748
|
name: "ButtonLabel",
|
|
880
749
|
class: "b40tuix",
|
|
881
|
-
propsAsIs:
|
|
882
|
-
}),
|
|
883
|
-
|
|
884
|
-
o,
|
|
750
|
+
propsAsIs: !1
|
|
751
|
+
}), ms = "s14xk0af", hs = "ha3mg7c", fs = "h103yr45", _ = ({ disabled: e, active: t, onClick: s, label: a, icon: o, id: r }) => /* @__PURE__ */ n(
|
|
752
|
+
cs,
|
|
885
753
|
{
|
|
886
|
-
onClick:
|
|
754
|
+
onClick: s,
|
|
887
755
|
"data-a": "intr",
|
|
888
|
-
disabled:
|
|
889
|
-
className:
|
|
890
|
-
|
|
891
|
-
!
|
|
892
|
-
!
|
|
756
|
+
disabled: e,
|
|
757
|
+
className: $(
|
|
758
|
+
t && ms,
|
|
759
|
+
!t && (r === "channels" || r === "featuredGroups") && hs,
|
|
760
|
+
!t && r === "leaderboard" && fs
|
|
893
761
|
),
|
|
894
|
-
children: /* @__PURE__ */
|
|
895
|
-
o
|
|
896
|
-
/* @__PURE__ */
|
|
762
|
+
children: /* @__PURE__ */ v(R, { children: [
|
|
763
|
+
o && /* @__PURE__ */ n(ps, { children: o }),
|
|
764
|
+
/* @__PURE__ */ n(us, { children: a })
|
|
897
765
|
] })
|
|
898
766
|
}
|
|
899
|
-
)
|
|
900
|
-
const g = () => B1, x$1 = /* @__PURE__ */ styled_default(g())({
|
|
767
|
+
), vs = () => x, gs = /* @__PURE__ */ p(vs())({
|
|
901
768
|
name: "ButtonIcon",
|
|
902
769
|
class: "b11wpe79",
|
|
903
|
-
propsAsIs:
|
|
904
|
-
}),
|
|
770
|
+
propsAsIs: !0
|
|
771
|
+
}), Is = /* @__PURE__ */ p("div")({
|
|
905
772
|
name: "Container",
|
|
906
773
|
class: "calnblm",
|
|
907
|
-
propsAsIs:
|
|
908
|
-
}),
|
|
774
|
+
propsAsIs: !1
|
|
775
|
+
}), bs = /* @__PURE__ */ p("div")({
|
|
909
776
|
name: "Title",
|
|
910
777
|
class: "t1438p52",
|
|
911
|
-
propsAsIs:
|
|
912
|
-
}),
|
|
778
|
+
propsAsIs: !1
|
|
779
|
+
}), ks = /* @__PURE__ */ p("div")({
|
|
913
780
|
name: "CloseIconWrap",
|
|
914
781
|
class: "c17srj38",
|
|
915
|
-
propsAsIs:
|
|
916
|
-
}),
|
|
782
|
+
propsAsIs: !1
|
|
783
|
+
}), ys = () => x, Ns = /* @__PURE__ */ p(ys())({
|
|
917
784
|
name: "CloseIcon",
|
|
918
785
|
class: "clqia8k",
|
|
919
|
-
propsAsIs:
|
|
920
|
-
}),
|
|
786
|
+
propsAsIs: !0
|
|
787
|
+
}), Ss = () => x, $s = /* @__PURE__ */ p(Ss())({
|
|
921
788
|
name: "DashboardIcon",
|
|
922
789
|
class: "df5w958",
|
|
923
|
-
propsAsIs:
|
|
924
|
-
}),
|
|
925
|
-
sdk:
|
|
926
|
-
className:
|
|
927
|
-
},
|
|
928
|
-
const
|
|
929
|
-
|
|
790
|
+
propsAsIs: !0
|
|
791
|
+
}), ws = "h12x6aiv", As = ve(({
|
|
792
|
+
sdk: e,
|
|
793
|
+
className: t
|
|
794
|
+
}, s) => {
|
|
795
|
+
const a = () => {
|
|
796
|
+
e.closeFeature();
|
|
930
797
|
};
|
|
931
|
-
return /* @__PURE__ */
|
|
932
|
-
className:
|
|
933
|
-
children: [/* @__PURE__ */
|
|
934
|
-
children: [/* @__PURE__ */
|
|
935
|
-
children: [/* @__PURE__ */
|
|
798
|
+
return /* @__PURE__ */ v(Ie, {
|
|
799
|
+
className: $(t, ws),
|
|
800
|
+
children: [/* @__PURE__ */ v(Is, {
|
|
801
|
+
children: [/* @__PURE__ */ v(bs, {
|
|
802
|
+
children: [/* @__PURE__ */ n($s, {
|
|
936
803
|
name: "dashboard"
|
|
937
804
|
}), "Dashboard"]
|
|
938
|
-
}), /* @__PURE__ */
|
|
805
|
+
}), /* @__PURE__ */ n(ks, {
|
|
939
806
|
"data-a": "intr",
|
|
940
|
-
onClick:
|
|
941
|
-
children: /* @__PURE__ */
|
|
807
|
+
onClick: a,
|
|
808
|
+
children: /* @__PURE__ */ n(Ns, {
|
|
942
809
|
name: "icon-cross"
|
|
943
810
|
})
|
|
944
811
|
})]
|
|
945
|
-
}), /* @__PURE__ */
|
|
946
|
-
ref:
|
|
812
|
+
}), /* @__PURE__ */ n("div", {
|
|
813
|
+
ref: s
|
|
947
814
|
})]
|
|
948
815
|
});
|
|
949
|
-
}),
|
|
950
|
-
sdk:
|
|
951
|
-
className:
|
|
952
|
-
},
|
|
953
|
-
const
|
|
954
|
-
const
|
|
955
|
-
return
|
|
956
|
-
}, [
|
|
957
|
-
enableSdkButton:
|
|
958
|
-
type:
|
|
959
|
-
}) =>
|
|
960
|
-
id:
|
|
961
|
-
onClick: () =>
|
|
962
|
-
disabled: !(
|
|
963
|
-
label:
|
|
964
|
-
icon: /* @__PURE__ */
|
|
965
|
-
src:
|
|
816
|
+
}), Cs = ve(({
|
|
817
|
+
sdk: e,
|
|
818
|
+
className: t
|
|
819
|
+
}, s) => {
|
|
820
|
+
const a = f(e.sdkStore.organizationSettings), o = f(e.sdkStore.streamSettings), r = f(e.getActiveFeature()), d = w(() => {
|
|
821
|
+
const i = o?.data || a?.data;
|
|
822
|
+
return i?.overlays ? i.overlays : [];
|
|
823
|
+
}, [a, o]), l = w(() => [...d.filter(({
|
|
824
|
+
enableSdkButton: i,
|
|
825
|
+
type: c
|
|
826
|
+
}) => c === y.GAMES || i).map((i) => ({
|
|
827
|
+
id: i.type,
|
|
828
|
+
onClick: () => e.openFeature(i.type),
|
|
829
|
+
disabled: !(i.type in rs),
|
|
830
|
+
label: i.name,
|
|
831
|
+
icon: /* @__PURE__ */ n("img", {
|
|
832
|
+
src: i.icon,
|
|
966
833
|
alt: ""
|
|
967
834
|
}),
|
|
968
835
|
/** multiplied by 10 to add the ability to insert custom buttons between our buttons */
|
|
969
|
-
position:
|
|
970
|
-
}))].sort((
|
|
971
|
-
return /* @__PURE__ */
|
|
972
|
-
className:
|
|
973
|
-
children: [
|
|
974
|
-
children: [/* @__PURE__ */
|
|
836
|
+
position: i.position * 10
|
|
837
|
+
}))].sort((i, c) => i.position - c.position), [d, e]);
|
|
838
|
+
return /* @__PURE__ */ v(Ie, {
|
|
839
|
+
className: t,
|
|
840
|
+
children: [l.length !== 0 && /* @__PURE__ */ n(ce, {
|
|
841
|
+
children: [/* @__PURE__ */ n(_, {
|
|
975
842
|
id: "Channels",
|
|
976
|
-
onClick: () =>
|
|
843
|
+
onClick: () => e.closeFeature(),
|
|
977
844
|
label: "Channels",
|
|
978
|
-
active:
|
|
979
|
-
}, "Channels"), ...
|
|
980
|
-
...
|
|
981
|
-
active:
|
|
845
|
+
active: r === 0
|
|
846
|
+
}, "Channels"), ...l.map((i) => i.id === y.GAMES ? /* @__PURE__ */ n(_, {
|
|
847
|
+
...i,
|
|
848
|
+
active: i.id === r,
|
|
982
849
|
label: "StreamLayer +",
|
|
983
850
|
id: "featuredGroups",
|
|
984
|
-
icon: /* @__PURE__ */
|
|
851
|
+
icon: /* @__PURE__ */ n(gs, {
|
|
985
852
|
name: "icon-btn-feature-groups",
|
|
986
|
-
"data-selected":
|
|
853
|
+
"data-selected": i.id === r
|
|
987
854
|
})
|
|
988
|
-
},
|
|
989
|
-
...
|
|
855
|
+
}, i.id) : /* @__PURE__ */ n(_, {
|
|
856
|
+
...i,
|
|
990
857
|
icon: void 0,
|
|
991
|
-
active:
|
|
992
|
-
},
|
|
993
|
-
}), !
|
|
994
|
-
children: [/* @__PURE__ */
|
|
858
|
+
active: i.id === r
|
|
859
|
+
}, i.id))]
|
|
860
|
+
}), !l.length && /* @__PURE__ */ n(ce, {
|
|
861
|
+
children: [/* @__PURE__ */ n(_, {
|
|
995
862
|
id: "empty",
|
|
996
863
|
label: "No Features...",
|
|
997
|
-
active:
|
|
998
|
-
disabled:
|
|
864
|
+
active: !1,
|
|
865
|
+
disabled: !0
|
|
999
866
|
}, "empty")]
|
|
1000
|
-
}), /* @__PURE__ */
|
|
1001
|
-
ref:
|
|
867
|
+
}), /* @__PURE__ */ n("div", {
|
|
868
|
+
ref: s
|
|
1002
869
|
})]
|
|
1003
870
|
});
|
|
1004
|
-
})
|
|
1005
|
-
const a = /* @__PURE__ */ styled_default("div")({
|
|
871
|
+
}), Es = /* @__PURE__ */ p("div")({
|
|
1006
872
|
name: "Container",
|
|
1007
873
|
class: "c1qjj4d4",
|
|
1008
|
-
propsAsIs:
|
|
1009
|
-
}),
|
|
874
|
+
propsAsIs: !1
|
|
875
|
+
}), Rs = /* @__PURE__ */ p("div")({
|
|
1010
876
|
name: "CloseIconWrap",
|
|
1011
877
|
class: "c1lg6b8a",
|
|
1012
|
-
propsAsIs:
|
|
1013
|
-
}),
|
|
878
|
+
propsAsIs: !1
|
|
879
|
+
}), xs = () => x, Ls = /* @__PURE__ */ p(xs())({
|
|
1014
880
|
name: "CloseIcon",
|
|
1015
881
|
class: "c159el66",
|
|
1016
|
-
propsAsIs:
|
|
1017
|
-
}),
|
|
882
|
+
propsAsIs: !0
|
|
883
|
+
}), Ds = /* @__PURE__ */ p("div")({
|
|
1018
884
|
name: "Title",
|
|
1019
885
|
class: "t16xmufv",
|
|
1020
|
-
propsAsIs:
|
|
1021
|
-
}),
|
|
886
|
+
propsAsIs: !1
|
|
887
|
+
}), Ts = /* @__PURE__ */ p("img")({
|
|
1022
888
|
name: "SponsorLogo",
|
|
1023
889
|
class: "s83lc21",
|
|
1024
|
-
propsAsIs:
|
|
1025
|
-
}),
|
|
890
|
+
propsAsIs: !1
|
|
891
|
+
}), Os = /* @__PURE__ */ p("div")({
|
|
1026
892
|
name: "PresentsTitle",
|
|
1027
893
|
class: "p1p7igia",
|
|
1028
|
-
propsAsIs:
|
|
1029
|
-
}),
|
|
894
|
+
propsAsIs: !1
|
|
895
|
+
}), _s = /* @__PURE__ */ p("div")({
|
|
1030
896
|
name: "Subtitle",
|
|
1031
897
|
class: "s1eftsbu",
|
|
1032
|
-
propsAsIs:
|
|
1033
|
-
}),
|
|
898
|
+
propsAsIs: !1
|
|
899
|
+
}), Ms = /* @__PURE__ */ p("div")({
|
|
1034
900
|
name: "Description",
|
|
1035
901
|
class: "d8uezec",
|
|
1036
|
-
propsAsIs:
|
|
1037
|
-
}),
|
|
902
|
+
propsAsIs: !1
|
|
903
|
+
}), Bs = /* @__PURE__ */ p("button")({
|
|
1038
904
|
name: "ActionButton",
|
|
1039
905
|
class: "a1h1bk90",
|
|
1040
|
-
propsAsIs:
|
|
1041
|
-
})
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
((m2 = t2 == null ? void 0 : t2.titleCard) == null ? void 0 : m2.subtitle) && /* @__PURE__ */ jsx(I, { children: (i2 = t2 == null ? void 0 : t2.titleCard) == null ? void 0 : i2.subtitle }),
|
|
1052
|
-
/* @__PURE__ */ jsx(f$1, { "data-a": "intr", onClick: S2, children: "Play Now" })
|
|
1053
|
-
] });
|
|
1054
|
-
};
|
|
1055
|
-
const C = [{
|
|
906
|
+
propsAsIs: !1
|
|
907
|
+
}), pe = ({ close: e, action: t, onboarding: s }) => /* @__PURE__ */ v(Es, { children: [
|
|
908
|
+
/* @__PURE__ */ n(Rs, { "data-a": "intr", onClick: e, children: /* @__PURE__ */ n(Ls, { name: "icon-cross" }) }),
|
|
909
|
+
s?.titleCard?.media?.sponsorLogo && /* @__PURE__ */ v(Ds, { children: [
|
|
910
|
+
/* @__PURE__ */ n(Ts, { alt: "sponsor-logo", src: s?.titleCard?.media?.sponsorLogo }),
|
|
911
|
+
/* @__PURE__ */ n(Os, { children: "PRESENTS" })
|
|
912
|
+
] }),
|
|
913
|
+
s?.titleCard?.title && /* @__PURE__ */ n(_s, { children: s?.titleCard?.title }),
|
|
914
|
+
s?.titleCard?.subtitle && /* @__PURE__ */ n(Ms, { children: s?.titleCard?.subtitle }),
|
|
915
|
+
/* @__PURE__ */ n(Bs, { "data-a": "intr", onClick: t, children: "Play Now" })
|
|
916
|
+
] }), be = [{
|
|
1056
917
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
|
|
1057
918
|
tagline: "",
|
|
1058
|
-
headline: /* @__PURE__ */
|
|
1059
|
-
children: ["Welcome to ", /* @__PURE__ */
|
|
919
|
+
headline: /* @__PURE__ */ v(R, {
|
|
920
|
+
children: ["Welcome to ", /* @__PURE__ */ n("br", {}), " Live Challenge"]
|
|
1060
921
|
})
|
|
1061
922
|
}, {
|
|
1062
923
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",
|
|
@@ -1064,51 +925,49 @@ const C = [{
|
|
|
1064
925
|
}, {
|
|
1065
926
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",
|
|
1066
927
|
headline: "Win points and play against friends."
|
|
1067
|
-
}],
|
|
928
|
+
}], Us = /* @__PURE__ */ p("div")({
|
|
1068
929
|
name: "OnboardingContainer",
|
|
1069
930
|
class: "o1xni1kr",
|
|
1070
|
-
propsAsIs:
|
|
1071
|
-
}),
|
|
931
|
+
propsAsIs: !1
|
|
932
|
+
}), Fs = () => V, Ps = /* @__PURE__ */ p(Fs())({
|
|
1072
933
|
name: "OnboardingNotificationContainer",
|
|
1073
934
|
class: "o1vnouv7",
|
|
1074
|
-
propsAsIs:
|
|
1075
|
-
}),
|
|
935
|
+
propsAsIs: !0
|
|
936
|
+
}), ue = /* @__PURE__ */ p("div")({
|
|
1076
937
|
name: "InnerContainer",
|
|
1077
938
|
class: "i59uefw",
|
|
1078
|
-
propsAsIs:
|
|
1079
|
-
}),
|
|
939
|
+
propsAsIs: !1
|
|
940
|
+
}), zs = /* @__PURE__ */ p("div")({
|
|
1080
941
|
name: "OnboardingOverlap",
|
|
1081
942
|
class: "ovnr8ov",
|
|
1082
|
-
propsAsIs:
|
|
1083
|
-
}),
|
|
1084
|
-
deepLink:
|
|
1085
|
-
onboardingOpts:
|
|
1086
|
-
notification:
|
|
1087
|
-
gamification:
|
|
1088
|
-
loading:
|
|
1089
|
-
sdk:
|
|
1090
|
-
throttled:
|
|
943
|
+
propsAsIs: !1
|
|
944
|
+
}), Vs = ({
|
|
945
|
+
deepLink: e,
|
|
946
|
+
onboardingOpts: t,
|
|
947
|
+
notification: s,
|
|
948
|
+
gamification: a,
|
|
949
|
+
loading: o,
|
|
950
|
+
sdk: r,
|
|
951
|
+
throttled: d
|
|
1091
952
|
}) => {
|
|
1092
|
-
|
|
1093
|
-
const u2 = useStore(d2.friends ? d2.friends.getStore() : createSingleStore({
|
|
953
|
+
const l = f(a.friends ? a.friends.getStore() : he({
|
|
1094
954
|
data: []
|
|
1095
|
-
})), [
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
p2 && S2(p2.data);
|
|
955
|
+
})), [i, c] = N(void 0), u = w(() => {
|
|
956
|
+
const m = r.getInviter();
|
|
957
|
+
return m ? l.data?.find(({
|
|
958
|
+
slId: h
|
|
959
|
+
}) => h === m)?.name : "";
|
|
960
|
+
}, [l.data, r]);
|
|
961
|
+
return b(() => {
|
|
962
|
+
const m = e.$store.subscribe((h) => {
|
|
963
|
+
h && c(h.data);
|
|
1105
964
|
});
|
|
1106
965
|
return () => {
|
|
1107
|
-
|
|
966
|
+
m();
|
|
1108
967
|
};
|
|
1109
|
-
}, [
|
|
1110
|
-
children: [/* @__PURE__ */
|
|
1111
|
-
loading:
|
|
968
|
+
}, [e.$store]), /* @__PURE__ */ v(Us, {
|
|
969
|
+
children: [/* @__PURE__ */ n(Be, {
|
|
970
|
+
loading: o,
|
|
1112
971
|
rules: [{
|
|
1113
972
|
label: "Answer as many questions as you like.",
|
|
1114
973
|
icon: "icon-btn-feature-groups"
|
|
@@ -1119,396 +978,385 @@ const C = [{
|
|
|
1119
978
|
label: "Top the leader board and best your friends.",
|
|
1120
979
|
icon: "icon-trophy"
|
|
1121
980
|
}],
|
|
1122
|
-
rulesBtnLabel:
|
|
1123
|
-
rulesTitle:
|
|
981
|
+
rulesBtnLabel: t.rules?.buttonLabel,
|
|
982
|
+
rulesTitle: t.rules?.heading,
|
|
1124
983
|
termsTitle: "Terms and Conditions",
|
|
1125
|
-
termsText:
|
|
1126
|
-
steps:
|
|
1127
|
-
primaryColor:
|
|
1128
|
-
inviteLink:
|
|
1129
|
-
inviteCardTitle:
|
|
1130
|
-
inviteCardSubtext:
|
|
1131
|
-
inviteCardBtnLabel:
|
|
984
|
+
termsText: t.rules?.terms,
|
|
985
|
+
steps: be,
|
|
986
|
+
primaryColor: t.inviteCard?.iconColor,
|
|
987
|
+
inviteLink: i,
|
|
988
|
+
inviteCardTitle: t.inviteCard?.heading,
|
|
989
|
+
inviteCardSubtext: t.inviteCard?.subtext,
|
|
990
|
+
inviteCardBtnLabel: t.inviteCard?.buttonLabel,
|
|
1132
991
|
onClose: () => {
|
|
1133
|
-
|
|
1134
|
-
(i2 = o2.close) == null || i2.call(o2);
|
|
992
|
+
s.close?.();
|
|
1135
993
|
},
|
|
1136
|
-
gamification:
|
|
1137
|
-
sdk:
|
|
1138
|
-
inviterName:
|
|
1139
|
-
}),
|
|
994
|
+
gamification: a,
|
|
995
|
+
sdk: r,
|
|
996
|
+
inviterName: u
|
|
997
|
+
}), d && /* @__PURE__ */ n(zs, {})]
|
|
1140
998
|
});
|
|
1141
|
-
},
|
|
1142
|
-
sdk:
|
|
1143
|
-
notification:
|
|
1144
|
-
saveHeight:
|
|
1145
|
-
style:
|
|
1146
|
-
appNode:
|
|
1147
|
-
sdkInDesktopView:
|
|
1148
|
-
responsiveStore:
|
|
999
|
+
}, qs = ({
|
|
1000
|
+
sdk: e,
|
|
1001
|
+
notification: t,
|
|
1002
|
+
saveHeight: s,
|
|
1003
|
+
style: a,
|
|
1004
|
+
appNode: o,
|
|
1005
|
+
sdkInDesktopView: r,
|
|
1006
|
+
responsiveStore: d
|
|
1149
1007
|
}) => {
|
|
1150
|
-
const
|
|
1151
|
-
graphicSrc:
|
|
1152
|
-
}) =>
|
|
1153
|
-
screen:
|
|
1154
|
-
} =
|
|
1008
|
+
const l = E(null), i = t.data.onboarding, [c, u] = N(i?.instantOpen), m = e.getFeature(y.GAMES), h = w(() => be?.map(({
|
|
1009
|
+
graphicSrc: k
|
|
1010
|
+
}) => k), []), {
|
|
1011
|
+
screen: g
|
|
1012
|
+
} = f(d, {
|
|
1155
1013
|
keys: ["screen"]
|
|
1156
1014
|
});
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
}, [o2]);
|
|
1015
|
+
je(() => {
|
|
1016
|
+
s(l.current?.getBoundingClientRect().height || 0);
|
|
1017
|
+
}, [s]);
|
|
1161
1018
|
const {
|
|
1162
|
-
loading:
|
|
1163
|
-
throttled:
|
|
1164
|
-
} =
|
|
1165
|
-
return
|
|
1166
|
-
container:
|
|
1167
|
-
useContainer: !
|
|
1168
|
-
children: /* @__PURE__ */
|
|
1169
|
-
throttled:
|
|
1170
|
-
notification:
|
|
1171
|
-
setOpened:
|
|
1172
|
-
gamification:
|
|
1173
|
-
onboardingOpts:
|
|
1174
|
-
deepLink:
|
|
1175
|
-
loading:
|
|
1176
|
-
renderToNode:
|
|
1177
|
-
sdk:
|
|
1019
|
+
loading: I,
|
|
1020
|
+
throttled: A
|
|
1021
|
+
} = Me(h);
|
|
1022
|
+
return c && m && i && o.current ? /* @__PURE__ */ n(fe, {
|
|
1023
|
+
container: o,
|
|
1024
|
+
useContainer: !r,
|
|
1025
|
+
children: /* @__PURE__ */ n(Vs, {
|
|
1026
|
+
throttled: A,
|
|
1027
|
+
notification: t,
|
|
1028
|
+
setOpened: u,
|
|
1029
|
+
gamification: m,
|
|
1030
|
+
onboardingOpts: i,
|
|
1031
|
+
deepLink: m.deepLink,
|
|
1032
|
+
loading: I,
|
|
1033
|
+
renderToNode: o,
|
|
1034
|
+
sdk: e
|
|
1178
1035
|
})
|
|
1179
|
-
}) : /* @__PURE__ */
|
|
1180
|
-
children: [/* @__PURE__ */
|
|
1181
|
-
ref:
|
|
1036
|
+
}) : /* @__PURE__ */ v(R, {
|
|
1037
|
+
children: [/* @__PURE__ */ n(ue, {
|
|
1038
|
+
ref: l,
|
|
1182
1039
|
style: {
|
|
1183
1040
|
position: "absolute",
|
|
1184
1041
|
visibility: "hidden"
|
|
1185
1042
|
},
|
|
1186
|
-
children: /* @__PURE__ */
|
|
1043
|
+
children: /* @__PURE__ */ n(pe, {
|
|
1187
1044
|
close: () => {
|
|
1188
1045
|
},
|
|
1189
1046
|
action: () => {
|
|
1190
1047
|
},
|
|
1191
|
-
onboarding:
|
|
1048
|
+
onboarding: i
|
|
1192
1049
|
})
|
|
1193
|
-
}), /* @__PURE__ */
|
|
1194
|
-
style:
|
|
1195
|
-
hiding:
|
|
1196
|
-
children: /* @__PURE__ */
|
|
1197
|
-
children: /* @__PURE__ */
|
|
1198
|
-
close:
|
|
1050
|
+
}), /* @__PURE__ */ n(Ps, {
|
|
1051
|
+
style: a,
|
|
1052
|
+
hiding: t.hiding,
|
|
1053
|
+
children: /* @__PURE__ */ n(ue, {
|
|
1054
|
+
children: /* @__PURE__ */ n(pe, {
|
|
1055
|
+
close: t.close,
|
|
1199
1056
|
action: () => {
|
|
1200
|
-
|
|
1201
|
-
g2(true), (((m2 = s2.current) == null ? void 0 : m2.getBoundingClientRect().y) || 0) < 0 && I$2(s2, h2.size, {
|
|
1057
|
+
u(!0), (o.current?.getBoundingClientRect().y || 0) < 0 && j(o, g.size, {
|
|
1202
1058
|
behavior: "smooth"
|
|
1203
1059
|
});
|
|
1204
1060
|
},
|
|
1205
|
-
onboarding:
|
|
1061
|
+
onboarding: i
|
|
1206
1062
|
})
|
|
1207
1063
|
})
|
|
1208
1064
|
})]
|
|
1209
1065
|
});
|
|
1210
|
-
}
|
|
1211
|
-
const e = () => f$5, c = /* @__PURE__ */ styled_default(e())({
|
|
1066
|
+
}, js = () => V, Qs = /* @__PURE__ */ p(js())({
|
|
1212
1067
|
name: "Container",
|
|
1213
1068
|
class: "c8ol1ve",
|
|
1214
|
-
propsAsIs:
|
|
1215
|
-
}),
|
|
1069
|
+
propsAsIs: !0
|
|
1070
|
+
}), ke = /* @__PURE__ */ p("div")({
|
|
1216
1071
|
name: "InnerContainer",
|
|
1217
1072
|
class: "iqfywam",
|
|
1218
|
-
propsAsIs:
|
|
1219
|
-
}),
|
|
1073
|
+
propsAsIs: !1
|
|
1074
|
+
}), Ks = () => ke, Ws = /* @__PURE__ */ p(Ks())({
|
|
1220
1075
|
name: "HiddenContainer",
|
|
1221
1076
|
class: "hokmtod",
|
|
1222
|
-
propsAsIs:
|
|
1223
|
-
}),
|
|
1077
|
+
propsAsIs: !0
|
|
1078
|
+
}), Gs = /* @__PURE__ */ p("div")({
|
|
1224
1079
|
name: "NotificationRefreshing",
|
|
1225
1080
|
class: "n192d1q8",
|
|
1226
|
-
propsAsIs:
|
|
1227
|
-
}),
|
|
1081
|
+
propsAsIs: !1
|
|
1082
|
+
}), Hs = () => Ue, Js = /* @__PURE__ */ p(Hs())({
|
|
1228
1083
|
name: "Pill",
|
|
1229
1084
|
class: "p1lha68t",
|
|
1230
|
-
propsAsIs:
|
|
1231
|
-
})
|
|
1232
|
-
const
|
|
1233
|
-
const [e2, d2] = useState(0), i2 = useRef(null), l2 = useMemo(() => new ResizeObserver((n2) => {
|
|
1085
|
+
propsAsIs: !0
|
|
1086
|
+
}), Zs = (e) => {
|
|
1087
|
+
const [t, s] = N(0), a = E(null), o = w(() => new ResizeObserver((l) => {
|
|
1234
1088
|
window.requestAnimationFrame(() => {
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
o2 && d2(o2.height);
|
|
1089
|
+
if (Array.isArray(l)) {
|
|
1090
|
+
for (const i of l)
|
|
1091
|
+
if (i.contentBoxSize) {
|
|
1092
|
+
const c = a.current?.getBoundingClientRect();
|
|
1093
|
+
c && s(c.height);
|
|
1241
1094
|
}
|
|
1242
1095
|
}
|
|
1243
1096
|
});
|
|
1244
|
-
}), []),
|
|
1245
|
-
|
|
1246
|
-
}, []),
|
|
1247
|
-
|
|
1097
|
+
}), []), r = z((l) => {
|
|
1098
|
+
a.current = l;
|
|
1099
|
+
}, []), d = z((l) => {
|
|
1100
|
+
s(l);
|
|
1248
1101
|
}, []);
|
|
1249
|
-
return
|
|
1250
|
-
const
|
|
1251
|
-
return
|
|
1252
|
-
|
|
1102
|
+
return b(() => {
|
|
1103
|
+
const l = a.current;
|
|
1104
|
+
return l ? (o.observe(l), () => {
|
|
1105
|
+
o.unobserve(l);
|
|
1253
1106
|
}) : () => {
|
|
1254
1107
|
};
|
|
1255
|
-
}, [
|
|
1256
|
-
|
|
1257
|
-
}), [
|
|
1258
|
-
},
|
|
1259
|
-
sdk:
|
|
1260
|
-
notification:
|
|
1261
|
-
appNode:
|
|
1262
|
-
responsiveStore:
|
|
1263
|
-
hasActiveFeature:
|
|
1108
|
+
}, [e]), b(() => () => {
|
|
1109
|
+
o.disconnect();
|
|
1110
|
+
}), [r, t, d];
|
|
1111
|
+
}, Xs = ({
|
|
1112
|
+
sdk: e,
|
|
1113
|
+
notification: t,
|
|
1114
|
+
appNode: s,
|
|
1115
|
+
responsiveStore: a,
|
|
1116
|
+
hasActiveFeature: o
|
|
1264
1117
|
}) => {
|
|
1265
|
-
var t$12, m$12;
|
|
1266
1118
|
const {
|
|
1267
|
-
sdkInDesktopView:
|
|
1268
|
-
} =
|
|
1119
|
+
sdkInDesktopView: r
|
|
1120
|
+
} = f(a, {
|
|
1269
1121
|
keys: ["sdkInDesktopView"]
|
|
1270
1122
|
}), {
|
|
1271
|
-
sdk:
|
|
1272
|
-
} =
|
|
1273
|
-
let
|
|
1274
|
-
return
|
|
1275
|
-
children: [/* @__PURE__ */
|
|
1276
|
-
ref:
|
|
1277
|
-
children: /* @__PURE__ */
|
|
1278
|
-
...
|
|
1123
|
+
sdk: d
|
|
1124
|
+
} = q(), [l, i, c] = Zs(t.id);
|
|
1125
|
+
let u = i;
|
|
1126
|
+
return o || (u = "auto"), t.type === M.QUESTION ? /* @__PURE__ */ v(R, {
|
|
1127
|
+
children: [/* @__PURE__ */ n(Ws, {
|
|
1128
|
+
ref: l,
|
|
1129
|
+
children: /* @__PURE__ */ n(Q, {
|
|
1130
|
+
...t
|
|
1279
1131
|
})
|
|
1280
|
-
}), /* @__PURE__ */
|
|
1132
|
+
}), /* @__PURE__ */ v(Qs, {
|
|
1281
1133
|
style: {
|
|
1282
|
-
height:
|
|
1134
|
+
height: t.hiding ? 0 : u
|
|
1283
1135
|
},
|
|
1284
|
-
hiding:
|
|
1285
|
-
children: [/* @__PURE__ */
|
|
1136
|
+
hiding: t.hiding,
|
|
1137
|
+
children: [/* @__PURE__ */ n(ke, {
|
|
1286
1138
|
style: {
|
|
1287
1139
|
height: "100%"
|
|
1288
1140
|
},
|
|
1289
|
-
children: /* @__PURE__ */
|
|
1290
|
-
...
|
|
1291
|
-
controlVideo:
|
|
1141
|
+
children: /* @__PURE__ */ n(Q, {
|
|
1142
|
+
...t,
|
|
1143
|
+
controlVideo: d?.controlVideoPlayer
|
|
1292
1144
|
})
|
|
1293
|
-
}), /* @__PURE__ */
|
|
1145
|
+
}), /* @__PURE__ */ n(Gs, {}, t.id)]
|
|
1294
1146
|
})]
|
|
1295
|
-
}) :
|
|
1147
|
+
}) : t.type === M.QUESTION_RESOLVED && t.data?.question?.predictionResult ? /* @__PURE__ */ n(Fe, {
|
|
1296
1148
|
style: {
|
|
1297
|
-
height:
|
|
1149
|
+
height: t.hiding ? 0 : i
|
|
1298
1150
|
},
|
|
1299
|
-
saveHeight: c
|
|
1300
|
-
close:
|
|
1301
|
-
hiding:
|
|
1302
|
-
...
|
|
1303
|
-
}) :
|
|
1151
|
+
saveHeight: c,
|
|
1152
|
+
close: t.close,
|
|
1153
|
+
hiding: t.hiding,
|
|
1154
|
+
...t.data.question
|
|
1155
|
+
}) : t.type === M.ONBOARDING ? /* @__PURE__ */ n(qs, {
|
|
1304
1156
|
style: {
|
|
1305
|
-
height:
|
|
1157
|
+
height: t.hiding ? 0 : u
|
|
1306
1158
|
},
|
|
1307
|
-
saveHeight: c
|
|
1308
|
-
sdk:
|
|
1309
|
-
notification:
|
|
1310
|
-
sdkInDesktopView:
|
|
1311
|
-
appNode:
|
|
1312
|
-
responsiveStore:
|
|
1159
|
+
saveHeight: c,
|
|
1160
|
+
sdk: e,
|
|
1161
|
+
notification: t,
|
|
1162
|
+
sdkInDesktopView: r,
|
|
1163
|
+
appNode: s,
|
|
1164
|
+
responsiveStore: a
|
|
1313
1165
|
}) : null;
|
|
1314
|
-
},
|
|
1315
|
-
pill:
|
|
1316
|
-
setPill:
|
|
1317
|
-
appNode:
|
|
1318
|
-
headerNode:
|
|
1319
|
-
scrollNode:
|
|
1320
|
-
responsiveStore:
|
|
1321
|
-
scrollStore:
|
|
1166
|
+
}, Ys = "p7vfi6t", en = ({
|
|
1167
|
+
pill: e,
|
|
1168
|
+
setPill: t,
|
|
1169
|
+
appNode: s,
|
|
1170
|
+
headerNode: a,
|
|
1171
|
+
scrollNode: o,
|
|
1172
|
+
responsiveStore: r,
|
|
1173
|
+
scrollStore: d
|
|
1322
1174
|
}) => {
|
|
1323
|
-
var t2, m2;
|
|
1324
1175
|
const {
|
|
1325
|
-
screen:
|
|
1326
|
-
} =
|
|
1176
|
+
screen: l
|
|
1177
|
+
} = f(r, {
|
|
1327
1178
|
keys: ["screen"]
|
|
1328
1179
|
}), {
|
|
1329
|
-
tabsShown:
|
|
1330
|
-
scrollPosition:
|
|
1331
|
-
} =
|
|
1180
|
+
tabsShown: i,
|
|
1181
|
+
scrollPosition: c
|
|
1182
|
+
} = f(d, {
|
|
1332
1183
|
keys: ["tabsShown", "scrollPosition"]
|
|
1333
1184
|
});
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
}, [
|
|
1337
|
-
const
|
|
1338
|
-
return !
|
|
1339
|
-
title:
|
|
1185
|
+
b(() => {
|
|
1186
|
+
r.get().sdkInDesktopView ? c < 50 && t(null) : c > -50 && t(null);
|
|
1187
|
+
}, [c, r, t]);
|
|
1188
|
+
const u = r.get().sdkInDesktopView ? s : a;
|
|
1189
|
+
return !e || !u.current ? null : nt(/* @__PURE__ */ n(Js, {
|
|
1190
|
+
title: e.type === M.QUESTION_RESOLVED ? "Prediction result" : `New ${st[e.data?.questionType]?.label || "notification"}`,
|
|
1340
1191
|
"data-a": "intr",
|
|
1341
1192
|
onClick: () => {
|
|
1342
|
-
|
|
1343
|
-
s2.get().sdkInDesktopView ? (g2 = l2.current) == null || g2.scrollTo({
|
|
1193
|
+
r.get().sdkInDesktopView ? o.current?.scrollTo({
|
|
1344
1194
|
top: 0,
|
|
1345
1195
|
behavior: "smooth"
|
|
1346
|
-
}) :
|
|
1196
|
+
}) : j(s, l.size, {
|
|
1347
1197
|
behavior: "smooth"
|
|
1348
|
-
}),
|
|
1198
|
+
}), t(null);
|
|
1349
1199
|
},
|
|
1350
|
-
className:
|
|
1351
|
-
}),
|
|
1352
|
-
},
|
|
1353
|
-
sdk:
|
|
1354
|
-
headerNode:
|
|
1355
|
-
scrollNode:
|
|
1356
|
-
responsiveStore:
|
|
1357
|
-
appNode:
|
|
1358
|
-
scrollStore:
|
|
1359
|
-
hasActiveFeature:
|
|
1200
|
+
className: $(i && Ys, "sl-pill-button")
|
|
1201
|
+
}), u.current);
|
|
1202
|
+
}, tn = ({
|
|
1203
|
+
sdk: e,
|
|
1204
|
+
headerNode: t,
|
|
1205
|
+
scrollNode: s,
|
|
1206
|
+
responsiveStore: a,
|
|
1207
|
+
appNode: o,
|
|
1208
|
+
scrollStore: r,
|
|
1209
|
+
hasActiveFeature: d
|
|
1360
1210
|
}) => {
|
|
1361
|
-
const [
|
|
1362
|
-
return
|
|
1363
|
-
|
|
1211
|
+
const [l] = N(e.getNotificationsStore()), i = f(l), [c, u] = N(null), m = w(() => e.getActiveNotification(), [e, i]);
|
|
1212
|
+
return b(() => {
|
|
1213
|
+
m && ot.emit("notification", {
|
|
1364
1214
|
action: "rendered",
|
|
1365
1215
|
payload: {
|
|
1366
|
-
questionId:
|
|
1367
|
-
questionType:
|
|
1216
|
+
questionId: m.data.questionId,
|
|
1217
|
+
questionType: m.data.questionType
|
|
1368
1218
|
}
|
|
1369
1219
|
});
|
|
1370
|
-
}, [
|
|
1220
|
+
}, [m]), b(() => {
|
|
1371
1221
|
const {
|
|
1372
|
-
sdkInDesktopView:
|
|
1373
|
-
sdkInView:
|
|
1374
|
-
} =
|
|
1375
|
-
|
|
1376
|
-
|
|
1222
|
+
sdkInDesktopView: h,
|
|
1223
|
+
sdkInView: g
|
|
1224
|
+
} = a.get();
|
|
1225
|
+
m && (h || g) && (!h && g && u(m), h && window.requestAnimationFrame(() => {
|
|
1226
|
+
r.get().scrollPosition !== 0 && u(m);
|
|
1377
1227
|
}));
|
|
1378
|
-
}, [
|
|
1379
|
-
|
|
1380
|
-
}, [
|
|
1381
|
-
children: [!
|
|
1382
|
-
appNode:
|
|
1383
|
-
sdk:
|
|
1384
|
-
hasActiveFeature:
|
|
1385
|
-
notification:
|
|
1386
|
-
responsiveStore:
|
|
1387
|
-
}),
|
|
1388
|
-
pill:
|
|
1389
|
-
setPill:
|
|
1390
|
-
appNode:
|
|
1391
|
-
notification:
|
|
1392
|
-
headerNode:
|
|
1393
|
-
scrollNode:
|
|
1394
|
-
scrollStore:
|
|
1395
|
-
responsiveStore:
|
|
1228
|
+
}, [m]), b(() => {
|
|
1229
|
+
m || u(null);
|
|
1230
|
+
}, [m]), /* @__PURE__ */ v(R, {
|
|
1231
|
+
children: [!c && m && /* @__PURE__ */ n(Xs, {
|
|
1232
|
+
appNode: o,
|
|
1233
|
+
sdk: e,
|
|
1234
|
+
hasActiveFeature: d,
|
|
1235
|
+
notification: m,
|
|
1236
|
+
responsiveStore: a
|
|
1237
|
+
}), c && /* @__PURE__ */ n(en, {
|
|
1238
|
+
pill: c,
|
|
1239
|
+
setPill: u,
|
|
1240
|
+
appNode: o,
|
|
1241
|
+
notification: m,
|
|
1242
|
+
headerNode: t,
|
|
1243
|
+
scrollNode: s,
|
|
1244
|
+
scrollStore: r,
|
|
1245
|
+
responsiveStore: a
|
|
1396
1246
|
})]
|
|
1397
1247
|
});
|
|
1398
|
-
}
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
p2 && r2 !== SdkOverlayType.GAMES && e2.openFeature(SdkOverlayType.GAMES);
|
|
1248
|
+
}, sn = (e) => {
|
|
1249
|
+
const t = f(e.status), s = f(e.sdkStore.slStreamId), a = f(e.userId()), o = f(e.getActiveFeature()), r = t === "ready" && !!s.data;
|
|
1250
|
+
return b(() => {
|
|
1251
|
+
const d = e.getFeature(y.GAMES);
|
|
1252
|
+
d && o !== y.GAMES && (d.closeQuestion(), d.closeUser()), d?.openedQuestionId.subscribe((l) => {
|
|
1253
|
+
l && o !== y.GAMES && e.openFeature(y.GAMES);
|
|
1405
1254
|
});
|
|
1406
|
-
}, [
|
|
1407
|
-
sdkReady:
|
|
1408
|
-
activeFeature:
|
|
1409
|
-
isLogged: !!
|
|
1255
|
+
}, [o, e]), {
|
|
1256
|
+
sdkReady: r,
|
|
1257
|
+
activeFeature: o,
|
|
1258
|
+
isLogged: !!a
|
|
1410
1259
|
};
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
responsiveStore: r2
|
|
1260
|
+
}, nn = ({
|
|
1261
|
+
sdk: e,
|
|
1262
|
+
className: t,
|
|
1263
|
+
scrollStore: s,
|
|
1264
|
+
appNode: a,
|
|
1265
|
+
scrollNode: o,
|
|
1266
|
+
responsiveStore: r
|
|
1419
1267
|
}) => {
|
|
1420
|
-
const [,
|
|
1421
|
-
return /* @__PURE__ */
|
|
1422
|
-
className:
|
|
1423
|
-
scrollNode:
|
|
1424
|
-
appNode:
|
|
1425
|
-
scrollStore:
|
|
1426
|
-
feature:
|
|
1427
|
-
responsiveStore:
|
|
1428
|
-
sdk:
|
|
1268
|
+
const [, d] = Pe(e);
|
|
1269
|
+
return /* @__PURE__ */ n(ts, {
|
|
1270
|
+
className: t,
|
|
1271
|
+
scrollNode: o,
|
|
1272
|
+
appNode: a,
|
|
1273
|
+
scrollStore: s,
|
|
1274
|
+
feature: d,
|
|
1275
|
+
responsiveStore: r,
|
|
1276
|
+
sdk: e
|
|
1429
1277
|
});
|
|
1430
|
-
},
|
|
1431
|
-
sdk:
|
|
1432
|
-
muted:
|
|
1433
|
-
className:
|
|
1434
|
-
appNode:
|
|
1435
|
-
responsiveStore:
|
|
1278
|
+
}, on = ({
|
|
1279
|
+
sdk: e,
|
|
1280
|
+
muted: t,
|
|
1281
|
+
className: s,
|
|
1282
|
+
appNode: a,
|
|
1283
|
+
responsiveStore: o
|
|
1436
1284
|
}) => {
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1439
|
-
const
|
|
1440
|
-
return
|
|
1441
|
-
className:
|
|
1442
|
-
muted:
|
|
1443
|
-
appNode:
|
|
1444
|
-
feature:
|
|
1445
|
-
responsiveStore:
|
|
1446
|
-
sdk:
|
|
1447
|
-
},
|
|
1285
|
+
const r = f(e.featuresList.getStore());
|
|
1286
|
+
return r ? Array.from(r, (d) => {
|
|
1287
|
+
const l = e.getFeature(d);
|
|
1288
|
+
return l ? /* @__PURE__ */ n(ss, {
|
|
1289
|
+
className: s,
|
|
1290
|
+
muted: t,
|
|
1291
|
+
appNode: a,
|
|
1292
|
+
feature: l,
|
|
1293
|
+
responsiveStore: o,
|
|
1294
|
+
sdk: e
|
|
1295
|
+
}, d) : null;
|
|
1448
1296
|
}) : null;
|
|
1449
|
-
},
|
|
1450
|
-
sdk:
|
|
1451
|
-
muted:
|
|
1452
|
-
topNavigation:
|
|
1297
|
+
}, an = ({
|
|
1298
|
+
sdk: e,
|
|
1299
|
+
muted: t,
|
|
1300
|
+
topNavigation: s
|
|
1453
1301
|
}) => {
|
|
1454
|
-
const [
|
|
1455
|
-
sdkReady:
|
|
1456
|
-
activeFeature:
|
|
1457
|
-
isLogged:
|
|
1458
|
-
} =
|
|
1459
|
-
|
|
1460
|
-
enabled:
|
|
1302
|
+
const [a, o] = N(!0), r = E(null), d = f(e.uiState), l = E(null), [i] = it(r), [c, u] = dt(r, i), {
|
|
1303
|
+
sdkReady: m,
|
|
1304
|
+
activeFeature: h,
|
|
1305
|
+
isLogged: g
|
|
1306
|
+
} = sn(e), I = !!m;
|
|
1307
|
+
Ke(r, {
|
|
1308
|
+
enabled: I,
|
|
1461
1309
|
event: "click",
|
|
1462
|
-
listener:
|
|
1310
|
+
listener: We
|
|
1463
1311
|
});
|
|
1464
|
-
const
|
|
1465
|
-
sdk:
|
|
1466
|
-
topNavigation:
|
|
1467
|
-
}), [
|
|
1468
|
-
return
|
|
1312
|
+
const A = w(() => ({
|
|
1313
|
+
sdk: e,
|
|
1314
|
+
topNavigation: s
|
|
1315
|
+
}), [e, s]);
|
|
1316
|
+
return b(() => {
|
|
1469
1317
|
import("./gamification-feature.js");
|
|
1470
|
-
}, []), /* @__PURE__ */
|
|
1471
|
-
value:
|
|
1472
|
-
children: /* @__PURE__ */
|
|
1473
|
-
ref: (
|
|
1474
|
-
|
|
1318
|
+
}, []), /* @__PURE__ */ n(Je.Provider, {
|
|
1319
|
+
value: A,
|
|
1320
|
+
children: /* @__PURE__ */ v(Le, {
|
|
1321
|
+
ref: (k) => {
|
|
1322
|
+
r.current = k, o(!!k);
|
|
1475
1323
|
},
|
|
1476
|
-
className:
|
|
1477
|
-
children: [
|
|
1478
|
-
className:
|
|
1479
|
-
sdk:
|
|
1480
|
-
ref:
|
|
1481
|
-
}),
|
|
1482
|
-
className:
|
|
1483
|
-
sdk:
|
|
1484
|
-
ref:
|
|
1485
|
-
}), /* @__PURE__ */
|
|
1324
|
+
className: s ? "" : "c10llmat",
|
|
1325
|
+
children: [I && s && d.app && /* @__PURE__ */ n(Cs, {
|
|
1326
|
+
className: $(O, "sl-hide-on-modal"),
|
|
1327
|
+
sdk: e,
|
|
1328
|
+
ref: l
|
|
1329
|
+
}), I && !s && !!h && d.app && /* @__PURE__ */ n(As, {
|
|
1330
|
+
className: $(O, "sl-hide-on-modal"),
|
|
1331
|
+
sdk: e,
|
|
1332
|
+
ref: l
|
|
1333
|
+
}), /* @__PURE__ */ v(De, {
|
|
1486
1334
|
className: "sl-hide-on-modal",
|
|
1487
|
-
ref:
|
|
1488
|
-
"data-nav": (!!
|
|
1489
|
-
children: [
|
|
1490
|
-
sdk:
|
|
1491
|
-
scrollNode:
|
|
1492
|
-
headerNode:
|
|
1493
|
-
appNode:
|
|
1494
|
-
scrollStore:
|
|
1495
|
-
responsiveStore:
|
|
1496
|
-
hasActiveFeature: !!
|
|
1497
|
-
}),
|
|
1498
|
-
scrollStore:
|
|
1499
|
-
responsiveStore:
|
|
1500
|
-
scrollNode:
|
|
1501
|
-
appNode:
|
|
1502
|
-
className:
|
|
1503
|
-
sdk:
|
|
1504
|
-
}),
|
|
1505
|
-
muted:
|
|
1506
|
-
responsiveStore:
|
|
1507
|
-
appNode:
|
|
1508
|
-
className:
|
|
1509
|
-
sdk:
|
|
1335
|
+
ref: c,
|
|
1336
|
+
"data-nav": (!!h && I).toString(),
|
|
1337
|
+
children: [I && d.app && /* @__PURE__ */ n(tn, {
|
|
1338
|
+
sdk: e,
|
|
1339
|
+
scrollNode: c,
|
|
1340
|
+
headerNode: l,
|
|
1341
|
+
appNode: r,
|
|
1342
|
+
scrollStore: u,
|
|
1343
|
+
responsiveStore: i,
|
|
1344
|
+
hasActiveFeature: !!h
|
|
1345
|
+
}), I && d.app && /* @__PURE__ */ n(nn, {
|
|
1346
|
+
scrollStore: u,
|
|
1347
|
+
responsiveStore: i,
|
|
1348
|
+
scrollNode: c,
|
|
1349
|
+
appNode: r,
|
|
1350
|
+
className: O,
|
|
1351
|
+
sdk: e
|
|
1352
|
+
}), I && a && /* @__PURE__ */ n(on, {
|
|
1353
|
+
muted: t,
|
|
1354
|
+
responsiveStore: i,
|
|
1355
|
+
appNode: r,
|
|
1356
|
+
className: O,
|
|
1357
|
+
sdk: e
|
|
1510
1358
|
})]
|
|
1511
|
-
}),
|
|
1359
|
+
}), I && !g && a && d.app && /* @__PURE__ */ n("div", {
|
|
1512
1360
|
style: {
|
|
1513
1361
|
display: "flex",
|
|
1514
1362
|
alignItems: "center",
|
|
@@ -1520,14 +1368,13 @@ const z = ({
|
|
|
1520
1368
|
})]
|
|
1521
1369
|
})
|
|
1522
1370
|
});
|
|
1523
|
-
}
|
|
1524
|
-
const
|
|
1525
|
-
|
|
1526
|
-
if (i2 === Y.UNSET)
|
|
1371
|
+
}, On = ({ event: e, topNavigation: t, theme: s, muted: a, withSidebarNotification: o = !0 }) => {
|
|
1372
|
+
const { sdk: r, status: d } = K(G), l = at(), i = rt(), { event: c } = K(G);
|
|
1373
|
+
if (d === H.UNSET)
|
|
1527
1374
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
1528
|
-
return
|
|
1375
|
+
return d === H.CONNECTED ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: "wait" }) : r === null ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : !l.app && !l.appNotification && !l.appSidebar || !l.app && !l.appSidebar && l.appNotification && !o ? null : /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ n(ye, { customTheme: s ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ n(an, { sdk: r, muted: a, event: c?.current || e, topNavigation: t }) }) });
|
|
1529
1376
|
};
|
|
1530
1377
|
export {
|
|
1531
|
-
|
|
1532
|
-
|
|
1378
|
+
Tn as B,
|
|
1379
|
+
On as D
|
|
1533
1380
|
};
|