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