@streamlayer/react 0.26.2 → 0.27.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-3bc05c48.js → app-15ce925d.js} +1 -1
- package/lib/{app-3b0713d0.cjs → app-bc994186.cjs} +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/es/auth.js +2 -2
- package/lib/es/index.js +2 -2
- package/lib/es/masters.js +272 -207
- package/lib/es/points.js +2 -2
- package/lib/{index-5a223768.js → index-ad42babc.js} +920 -920
- package/lib/index-e9cf1c5b.cjs +14 -0
- package/lib/style.css +1 -1
- package/package.json +9 -9
- package/lib/index-0f70e34a.cjs +0 -14
package/lib/es/masters.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { s as r, q as
|
|
1
|
+
import { jsx as a, jsxs as d, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as C, useState as f, useMemo as R, useCallback as j, useEffect as N, useContext as F } from "react";
|
|
3
|
+
import { s as r, q as v, o as O, Y as q, j as M, d as U, v as _, e as y, g as w, i as G, k as $, r as A, l as D, f as x, S as P, a as T, b as B, p as H } from "../index-ad42babc.js";
|
|
4
4
|
import "react-auth-code-input";
|
|
5
5
|
import "react-phone-number-input";
|
|
6
6
|
import "@connectrpc/connect";
|
|
7
7
|
import "@connectrpc/connect-web";
|
|
8
8
|
import "@streamlayer/sl-eslib/users/users_connect";
|
|
9
9
|
import "react-countdown-circle-timer";
|
|
10
|
-
import { QuestionType as
|
|
11
|
-
import { FeatureStatus as
|
|
10
|
+
import { QuestionType as z, FeatureType as L } from "@streamlayer/sdk-web-types";
|
|
11
|
+
import { FeatureStatus as b } from "@streamlayer/sdk-web-interfaces";
|
|
12
12
|
import "@streamlayer/sdk-web-features";
|
|
13
13
|
import "@streamlayer/sdk-web-api";
|
|
14
14
|
import "@streamlayer/sdk-web-storage";
|
|
15
|
-
import { useStore as
|
|
15
|
+
import { useStore as u } from "@nanostores/react";
|
|
16
16
|
import "@streamlayer/sdk-web-notifications";
|
|
17
17
|
import "./useStreamLayerApp.js";
|
|
18
18
|
import "@streamlayer/sdk-web";
|
|
@@ -21,360 +21,425 @@ import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
|
21
21
|
import "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
22
22
|
import "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
23
23
|
import "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
24
|
-
const
|
|
25
|
-
const l =
|
|
26
|
-
return o != null && o.loading ? /* @__PURE__ */ a("div", { className:
|
|
24
|
+
const K = ({ feature: e, sdk: s, children: n, className: t }) => {
|
|
25
|
+
const l = u(e.status), { slStreamId: o } = u(s.sdkStore);
|
|
26
|
+
return o != null && o.loading ? /* @__PURE__ */ a("div", { className: t, children: "event is loading..." }) : o != null && o.data ? l !== b.Ready ? /* @__PURE__ */ a("div", { className: t, children: "wait feature..." }) : n : /* @__PURE__ */ a("div", { className: t, children: "event is forbidden..." });
|
|
27
27
|
};
|
|
28
|
-
const
|
|
29
|
-
name: "n",
|
|
30
|
-
class: "n1aopxp8",
|
|
31
|
-
propsAsIs: !1
|
|
32
|
-
}), W = ({
|
|
33
|
-
children: e,
|
|
34
|
-
style: s,
|
|
35
|
-
className: t
|
|
36
|
-
}) => /* @__PURE__ */ a(U, {
|
|
37
|
-
style: s,
|
|
38
|
-
className: t,
|
|
39
|
-
children: e
|
|
40
|
-
});
|
|
41
|
-
const J = () => y, V = () => y, X = /* @__PURE__ */ r("div")({
|
|
28
|
+
const J = () => v, V = () => v, W = /* @__PURE__ */ r("div")({
|
|
42
29
|
name: "a",
|
|
43
30
|
class: "acysrl1",
|
|
44
31
|
propsAsIs: !1
|
|
45
|
-
}),
|
|
32
|
+
}), Y = /* @__PURE__ */ r("div")({
|
|
46
33
|
name: "l",
|
|
47
34
|
class: "lo57cjm",
|
|
48
35
|
propsAsIs: !1
|
|
49
|
-
}),
|
|
36
|
+
}), X = /* @__PURE__ */ r(J())({
|
|
50
37
|
name: "p",
|
|
51
38
|
class: "p14kwh4y",
|
|
52
39
|
propsAsIs: !0
|
|
53
|
-
}),
|
|
40
|
+
}), Z = /* @__PURE__ */ r("span")({
|
|
54
41
|
name: "s",
|
|
55
42
|
class: "sxun7sq",
|
|
56
43
|
propsAsIs: !1
|
|
57
|
-
}),
|
|
44
|
+
}), ee = /* @__PURE__ */ r("button")({
|
|
58
45
|
name: "c",
|
|
59
46
|
class: "c1i8ida8",
|
|
60
47
|
propsAsIs: !1
|
|
61
|
-
}),
|
|
48
|
+
}), se = /* @__PURE__ */ r(V())({
|
|
62
49
|
name: "g",
|
|
63
50
|
class: "g1m0xfmw",
|
|
64
51
|
propsAsIs: !0
|
|
65
|
-
}),
|
|
66
|
-
const t = O[e];
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
(t == null ? void 0 : t.iconName) && /* @__PURE__ */ a(
|
|
70
|
-
(t == null ? void 0 : t.label) && /* @__PURE__ */ a(
|
|
52
|
+
}), E = ({ type: e, close: s, label: n }) => {
|
|
53
|
+
const t = e ? O[e] : { label: n, iconName: void 0 };
|
|
54
|
+
return /* @__PURE__ */ d(W, { children: [
|
|
55
|
+
/* @__PURE__ */ d(Y, { children: [
|
|
56
|
+
(t == null ? void 0 : t.iconName) && /* @__PURE__ */ a(X, { name: t.iconName }),
|
|
57
|
+
(t == null ? void 0 : t.label) && /* @__PURE__ */ a(Z, { children: t.label })
|
|
71
58
|
] }),
|
|
72
|
-
/* @__PURE__ */ a(
|
|
59
|
+
/* @__PURE__ */ a(ee, { onClick: s, children: /* @__PURE__ */ a(se, { name: "icon-cross" }) })
|
|
73
60
|
] });
|
|
74
61
|
};
|
|
75
|
-
const
|
|
76
|
-
name: "
|
|
77
|
-
class: "
|
|
62
|
+
const ae = /* @__PURE__ */ r("div")({
|
|
63
|
+
name: "n",
|
|
64
|
+
class: "n1aopxp8",
|
|
65
|
+
propsAsIs: !1
|
|
66
|
+
}), Q = ({
|
|
67
|
+
children: e,
|
|
68
|
+
style: s,
|
|
69
|
+
className: n
|
|
70
|
+
}) => /* @__PURE__ */ a(ae, {
|
|
71
|
+
style: s,
|
|
72
|
+
className: n,
|
|
73
|
+
children: e
|
|
74
|
+
});
|
|
75
|
+
const ne = /* @__PURE__ */ r("div")({
|
|
76
|
+
name: "i",
|
|
77
|
+
class: "i1bwjtdb",
|
|
78
|
+
propsAsIs: !1
|
|
79
|
+
}), te = /* @__PURE__ */ r("video")({
|
|
80
|
+
name: "e",
|
|
81
|
+
class: "enb7moc",
|
|
78
82
|
propsAsIs: !1
|
|
79
83
|
}), re = /* @__PURE__ */ r("img")({
|
|
84
|
+
name: "r",
|
|
85
|
+
class: "r1ws5lyh",
|
|
86
|
+
propsAsIs: !1
|
|
87
|
+
}), oe = /* @__PURE__ */ r("div")({
|
|
88
|
+
name: "s",
|
|
89
|
+
class: "soibf55",
|
|
90
|
+
propsAsIs: !1
|
|
91
|
+
}), le = ({ poster: e, source: s }) => {
|
|
92
|
+
const n = C(null), [t, l] = f(!1), [o, i] = f(!0);
|
|
93
|
+
return /* @__PURE__ */ d(ne, { onClick: () => {
|
|
94
|
+
const c = n == null ? void 0 : n.current;
|
|
95
|
+
c && l((p) => p ? (c.pause(), !1) : (c.play(), i(!1), !0));
|
|
96
|
+
}, children: [
|
|
97
|
+
/* @__PURE__ */ a(
|
|
98
|
+
te,
|
|
99
|
+
{
|
|
100
|
+
ref: n,
|
|
101
|
+
src: s,
|
|
102
|
+
onEnded: () => {
|
|
103
|
+
var c;
|
|
104
|
+
(c = n == null ? void 0 : n.current) == null || c.load(), l(!1), i(!0);
|
|
105
|
+
},
|
|
106
|
+
style: { visibility: o ? "hidden" : "visible" }
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ a(re, { src: e, style: { visibility: o ? "visible" : "hidden" } }),
|
|
110
|
+
/* @__PURE__ */ a(oe, { children: !t && /* @__PURE__ */ a(v, { name: "icon-play" }) })
|
|
111
|
+
] });
|
|
112
|
+
};
|
|
113
|
+
const ie = /* @__PURE__ */ r("div")({
|
|
114
|
+
name: "t",
|
|
115
|
+
class: "t18unvw4",
|
|
116
|
+
propsAsIs: !1
|
|
117
|
+
}), ce = /* @__PURE__ */ r("div")({
|
|
118
|
+
name: "r",
|
|
119
|
+
class: "rs0uvk8",
|
|
120
|
+
propsAsIs: !1
|
|
121
|
+
}), de = /* @__PURE__ */ r("h3")({
|
|
122
|
+
name: "n",
|
|
123
|
+
class: "n1hem4g7",
|
|
124
|
+
propsAsIs: !1
|
|
125
|
+
}), ue = /* @__PURE__ */ r("div")({
|
|
80
126
|
name: "i",
|
|
81
|
-
class: "
|
|
127
|
+
class: "i193lbwv",
|
|
82
128
|
propsAsIs: !1
|
|
83
|
-
}),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
129
|
+
}), pe = /* @__PURE__ */ r("a")({
|
|
130
|
+
name: "a",
|
|
131
|
+
class: "a1dka9qs",
|
|
132
|
+
propsAsIs: !1
|
|
133
|
+
}), me = ({ title: e, instantView: s }) => /* @__PURE__ */ d(ie, { children: [
|
|
134
|
+
(s == null ? void 0 : s.video) && /* @__PURE__ */ a(le, { source: s.video.url, poster: s.video.thumbnailUrl }),
|
|
135
|
+
/* @__PURE__ */ d(ce, { children: [
|
|
136
|
+
/* @__PURE__ */ a(de, { children: (s == null ? void 0 : s.heading) || e }),
|
|
137
|
+
/* @__PURE__ */ a(ue, { children: s == null ? void 0 : s.body }),
|
|
138
|
+
(s == null ? void 0 : s.webLink) && /* @__PURE__ */ d(pe, { href: "webLink", target: "_blank", children: [
|
|
139
|
+
"Explore more of the Masters History",
|
|
140
|
+
/* @__PURE__ */ a(v, { name: "icon-external-link" })
|
|
141
|
+
] })
|
|
142
|
+
] })
|
|
143
|
+
] });
|
|
144
|
+
const ve = /* @__PURE__ */ r("div")({
|
|
145
|
+
name: "d",
|
|
146
|
+
class: "dk8r1eq",
|
|
94
147
|
propsAsIs: !1
|
|
95
|
-
}),
|
|
96
|
-
openedQuestion: e
|
|
97
|
-
|
|
98
|
-
|
|
148
|
+
}), fe = ({
|
|
149
|
+
openedQuestion: e
|
|
150
|
+
}) => {
|
|
151
|
+
var s;
|
|
152
|
+
return ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ a(me, {
|
|
153
|
+
...e.attributes.attributes.value
|
|
154
|
+
}) : null;
|
|
155
|
+
}, be = ({
|
|
156
|
+
extendedQuestion: e,
|
|
157
|
+
vote: s
|
|
99
158
|
}) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
159
|
+
const {
|
|
160
|
+
loading: n,
|
|
161
|
+
data: t
|
|
162
|
+
} = e;
|
|
163
|
+
return !n && t ? /* @__PURE__ */ a(q, {
|
|
164
|
+
vote: s,
|
|
165
|
+
openedQuestion: t
|
|
166
|
+
}) : null;
|
|
167
|
+
}, he = ({
|
|
168
|
+
gamification: e
|
|
169
|
+
}) => {
|
|
170
|
+
var s;
|
|
171
|
+
const n = u(e.openedQuestion.$store), t = u(e.openedQuestion.$extendedStore);
|
|
172
|
+
if (!n)
|
|
173
|
+
return null;
|
|
174
|
+
const l = n.type;
|
|
175
|
+
return /* @__PURE__ */ d(ve, {
|
|
176
|
+
children: [/* @__PURE__ */ a(E, {
|
|
177
|
+
close: e.closeQuestion,
|
|
178
|
+
type: ((s = n.attributes) == null ? void 0 : s.type) || z.UNSET
|
|
179
|
+
}), l === "question" && /* @__PURE__ */ a(be, {
|
|
180
|
+
vote: e.submitAnswer,
|
|
181
|
+
extendedQuestion: t
|
|
182
|
+
}), l !== "question" && /* @__PURE__ */ a(fe, {
|
|
183
|
+
openedQuestion: n
|
|
110
184
|
})]
|
|
111
185
|
});
|
|
112
|
-
},
|
|
113
|
-
const { data:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
const
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}, me = ({ gamification: e }) => {
|
|
128
|
-
const [s, t] = v(b.HOME);
|
|
129
|
-
return /* @__PURE__ */ i(g, { children: [
|
|
130
|
-
/* @__PURE__ */ i(G, { children: [
|
|
131
|
-
/* @__PURE__ */ a(H, { activePage: s, toggleActivePage: t }),
|
|
132
|
-
s === b.HOME && /* @__PURE__ */ a(ue, { store: e.userSummary.getStore() })
|
|
186
|
+
}, ye = ({ leaderboardList: e, openUser: s }) => {
|
|
187
|
+
const { data: n } = u(e.$store);
|
|
188
|
+
return /* @__PURE__ */ a(M, { fetchMore: e.fetchMore, items: n, openItemDetail: s });
|
|
189
|
+
}, ge = ({ store: e, openQuestion: s }) => {
|
|
190
|
+
const n = u(e);
|
|
191
|
+
return n != null && n.data ? /* @__PURE__ */ a(U, { openQuestion: s, questions: n.data }) : /* @__PURE__ */ a("div", { children: "wait questions..." });
|
|
192
|
+
}, ke = ({ store: e }) => {
|
|
193
|
+
const { data: s } = u(e);
|
|
194
|
+
return s != null && s.summary ? /* @__PURE__ */ a(_, { ...s.summary, ...s.percentage }) : /* @__PURE__ */ a("div", { children: "wait user..." });
|
|
195
|
+
}, Ae = ({ gamification: e }) => {
|
|
196
|
+
const [s, n] = f(y.HOME);
|
|
197
|
+
return /* @__PURE__ */ d("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
198
|
+
/* @__PURE__ */ d(w, { children: [
|
|
199
|
+
/* @__PURE__ */ a(G, { activePage: s, toggleActivePage: n }),
|
|
200
|
+
s === y.HOME && /* @__PURE__ */ a(ke, { store: e.userSummary.getStore() })
|
|
133
201
|
] }),
|
|
134
|
-
s ===
|
|
135
|
-
s ===
|
|
202
|
+
s === y.HOME && /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(ge, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) }),
|
|
203
|
+
s === y.LEADERBOARD && /* @__PURE__ */ a($, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ a(ye, { openUser: e.openUser, leaderboardList: e.leaderboardList }) })
|
|
136
204
|
] });
|
|
137
205
|
};
|
|
138
|
-
const
|
|
139
|
-
name: "
|
|
140
|
-
class: "
|
|
206
|
+
const Se = () => Q, $e = () => Q, xe = /* @__PURE__ */ r(Se())({
|
|
207
|
+
name: "v",
|
|
208
|
+
class: "v1ph66cs",
|
|
141
209
|
propsAsIs: !0
|
|
142
|
-
}),
|
|
210
|
+
}), Ie = /* @__PURE__ */ r($e())({
|
|
211
|
+
name: "x",
|
|
212
|
+
class: "xorme7i",
|
|
213
|
+
propsAsIs: !0
|
|
214
|
+
}), Ne = /* @__PURE__ */ r("div")({
|
|
215
|
+
name: "b",
|
|
216
|
+
class: "b1tuxhle",
|
|
217
|
+
propsAsIs: !1
|
|
218
|
+
}), _e = ({
|
|
143
219
|
gamification: e,
|
|
144
220
|
className: s
|
|
145
221
|
}) => {
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
} = p(e.openedQuestion);
|
|
150
|
-
return /* @__PURE__ */ i(g, {
|
|
151
|
-
children: [(t || n) && /* @__PURE__ */ a(ve, {
|
|
222
|
+
const n = u(e.openedQuestion.$store), t = u(e.openedUser);
|
|
223
|
+
return /* @__PURE__ */ d(I, {
|
|
224
|
+
children: [n && /* @__PURE__ */ a(xe, {
|
|
152
225
|
className: s,
|
|
153
|
-
children: /* @__PURE__ */ a(
|
|
154
|
-
|
|
155
|
-
vote: e.submitAnswer,
|
|
156
|
-
openedQuestion: n
|
|
226
|
+
children: /* @__PURE__ */ a(he, {
|
|
227
|
+
gamification: e
|
|
157
228
|
})
|
|
158
|
-
}), /* @__PURE__ */ a(
|
|
229
|
+
}), t && /* @__PURE__ */ a(Ie, {
|
|
230
|
+
children: /* @__PURE__ */ d(Ne, {
|
|
231
|
+
children: [/* @__PURE__ */ a(E, {
|
|
232
|
+
label: "Friend's Rank",
|
|
233
|
+
close: e.closeUser
|
|
234
|
+
}), /* @__PURE__ */ a(w, {
|
|
235
|
+
children: /* @__PURE__ */ a(_, {
|
|
236
|
+
...t
|
|
237
|
+
})
|
|
238
|
+
})]
|
|
239
|
+
})
|
|
240
|
+
}), /* @__PURE__ */ a(A, {
|
|
159
241
|
className: s,
|
|
160
242
|
"data-nav": "true",
|
|
161
|
-
children: /* @__PURE__ */ a(
|
|
243
|
+
children: /* @__PURE__ */ a(Ae, {
|
|
162
244
|
gamification: e
|
|
163
245
|
})
|
|
164
246
|
})]
|
|
165
247
|
});
|
|
166
|
-
},
|
|
167
|
-
highlights: e,
|
|
168
|
-
className: s
|
|
169
|
-
}) => {
|
|
170
|
-
const t = p(e.openedInsight);
|
|
171
|
-
return /* @__PURE__ */ i(g, { children: [
|
|
172
|
-
!t && e.insights && /* @__PURE__ */ a(j, { className: s, highlights: e, store: e.insights.getStore() }),
|
|
173
|
-
t && /* @__PURE__ */ a(
|
|
174
|
-
D,
|
|
175
|
-
{
|
|
176
|
-
className: s,
|
|
177
|
-
openedInsight: t,
|
|
178
|
-
closeHighlights: e.closeFeature,
|
|
179
|
-
closeInsight: e.closeHighlight
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
] });
|
|
183
|
-
}, ye = ({
|
|
248
|
+
}, we = ({
|
|
184
249
|
sdk: e,
|
|
185
250
|
feature: s,
|
|
186
|
-
className:
|
|
187
|
-
}) =>
|
|
188
|
-
const
|
|
251
|
+
className: n
|
|
252
|
+
}) => R(() => s && s.featureConfig.get().type === L.GAMES ? /* @__PURE__ */ a(K, { className: n, sdk: e, feature: s, children: /* @__PURE__ */ a(_e, { className: n, gamification: s, sdk: e }) }) : null, [e, s, n]);
|
|
253
|
+
const Le = /* @__PURE__ */ r("button")({
|
|
189
254
|
name: "e",
|
|
190
255
|
class: "enu64b2",
|
|
191
256
|
propsAsIs: !1
|
|
192
|
-
}),
|
|
257
|
+
}), Ee = /* @__PURE__ */ r("span")({
|
|
193
258
|
name: "t",
|
|
194
259
|
class: "tw2meku",
|
|
195
260
|
propsAsIs: !1
|
|
196
|
-
}),
|
|
261
|
+
}), Qe = /* @__PURE__ */ r("span")({
|
|
197
262
|
name: "a",
|
|
198
263
|
class: "aka8vam",
|
|
199
264
|
propsAsIs: !1
|
|
200
|
-
}),
|
|
201
|
-
l && /* @__PURE__ */ a(
|
|
202
|
-
/* @__PURE__ */ a(
|
|
265
|
+
}), S = ({ disabled: e, active: s, onClick: n, label: t, icon: l }) => /* @__PURE__ */ a(Le, { onClick: n, disabled: e, "data-selected": s, children: /* @__PURE__ */ d(I, { children: [
|
|
266
|
+
l && /* @__PURE__ */ a(Ee, { children: l }),
|
|
267
|
+
/* @__PURE__ */ a(Qe, { children: t })
|
|
203
268
|
] }) });
|
|
204
|
-
const
|
|
269
|
+
const Ce = () => v, Re = /* @__PURE__ */ r(Ce())({
|
|
205
270
|
name: "a",
|
|
206
271
|
class: "a10lggiw",
|
|
207
272
|
propsAsIs: !0
|
|
208
|
-
}),
|
|
273
|
+
}), h = "channels", je = (e) => {
|
|
209
274
|
var s;
|
|
210
|
-
return /* @__PURE__ */ a(
|
|
275
|
+
return /* @__PURE__ */ a(S, {
|
|
211
276
|
...e,
|
|
212
277
|
id: "channels",
|
|
213
278
|
label: "Channels",
|
|
214
|
-
icon: /* @__PURE__ */ a(
|
|
279
|
+
icon: /* @__PURE__ */ a(Re, {
|
|
215
280
|
name: "icon-btn-channels",
|
|
216
281
|
"data-selected": (s = e.active) == null ? void 0 : s.toString()
|
|
217
282
|
})
|
|
218
283
|
});
|
|
219
284
|
};
|
|
220
|
-
const
|
|
285
|
+
const Fe = () => v, Oe = /* @__PURE__ */ r(Fe())({
|
|
221
286
|
name: "d",
|
|
222
287
|
class: "d1x5s8ie",
|
|
223
288
|
propsAsIs: !0
|
|
224
|
-
}),
|
|
289
|
+
}), m = "featuredGroups", qe = (e) => {
|
|
225
290
|
var s;
|
|
226
|
-
return /* @__PURE__ */ a(
|
|
291
|
+
return /* @__PURE__ */ a(S, {
|
|
227
292
|
...e,
|
|
228
293
|
label: "FG+",
|
|
229
294
|
id: "featuredGroups",
|
|
230
|
-
icon: /* @__PURE__ */ a(
|
|
295
|
+
icon: /* @__PURE__ */ a(Oe, {
|
|
231
296
|
name: "icon-btn-feature-groups",
|
|
232
297
|
"data-selected": (s = e.active) == null ? void 0 : s.toString()
|
|
233
298
|
})
|
|
234
299
|
});
|
|
235
300
|
};
|
|
236
|
-
const
|
|
301
|
+
const Me = () => v, Ue = /* @__PURE__ */ r(Me())({
|
|
237
302
|
name: "n",
|
|
238
303
|
class: "ntav86o",
|
|
239
304
|
propsAsIs: !0
|
|
240
|
-
}),
|
|
305
|
+
}), g = "leaderboard", Ge = (e) => {
|
|
241
306
|
var s;
|
|
242
|
-
return /* @__PURE__ */ a(
|
|
307
|
+
return /* @__PURE__ */ a(S, {
|
|
243
308
|
...e,
|
|
244
309
|
label: "Leader Board",
|
|
245
310
|
id: "leaderboard",
|
|
246
|
-
icon: /* @__PURE__ */ a(
|
|
311
|
+
icon: /* @__PURE__ */ a(Ue, {
|
|
247
312
|
name: "icon-btn-leaderboard",
|
|
248
313
|
"data-selected": (s = e.active) == null ? void 0 : s.toString()
|
|
249
314
|
})
|
|
250
315
|
});
|
|
251
316
|
};
|
|
252
|
-
const
|
|
317
|
+
const De = /* @__PURE__ */ r("div")({
|
|
253
318
|
name: "n",
|
|
254
319
|
class: "n1rlvhvz",
|
|
255
320
|
propsAsIs: !1
|
|
256
|
-
}),
|
|
321
|
+
}), Pe = ({
|
|
257
322
|
children: e,
|
|
258
323
|
className: s
|
|
259
|
-
}) => /* @__PURE__ */ a(
|
|
324
|
+
}) => /* @__PURE__ */ a(De, {
|
|
260
325
|
className: s,
|
|
261
326
|
children: e
|
|
262
327
|
});
|
|
263
|
-
const
|
|
328
|
+
const Te = () => Pe, Be = /* @__PURE__ */ r(Te())({
|
|
264
329
|
name: "n",
|
|
265
330
|
class: "n9bnom",
|
|
266
331
|
propsAsIs: !0
|
|
267
|
-
}),
|
|
268
|
-
/* @__PURE__ */ a(
|
|
332
|
+
}), He = ({ activeOverlay: e, setActiveOverlay: s, sdkReady: n, className: t }) => /* @__PURE__ */ d(Be, { className: t, children: [
|
|
333
|
+
/* @__PURE__ */ a(je, { active: e === h, onClick: () => s(h) }),
|
|
269
334
|
/* @__PURE__ */ a(
|
|
270
|
-
|
|
335
|
+
qe,
|
|
271
336
|
{
|
|
272
|
-
active: e ===
|
|
273
|
-
disabled: !
|
|
337
|
+
active: e === m,
|
|
338
|
+
disabled: !n,
|
|
274
339
|
onClick: () => {
|
|
275
|
-
s(
|
|
340
|
+
s(m);
|
|
276
341
|
}
|
|
277
342
|
}
|
|
278
343
|
),
|
|
279
344
|
/* @__PURE__ */ a(
|
|
280
|
-
|
|
345
|
+
Ge,
|
|
281
346
|
{
|
|
282
|
-
active: e ===
|
|
283
|
-
onClick: () => s(
|
|
347
|
+
active: e === g,
|
|
348
|
+
onClick: () => s(g)
|
|
284
349
|
}
|
|
285
350
|
)
|
|
286
|
-
] }),
|
|
287
|
-
const [s,
|
|
288
|
-
(
|
|
289
|
-
o(
|
|
351
|
+
] }), ze = (e) => {
|
|
352
|
+
const [s, n] = f(!1), t = u(e.status) === "ready", [l, o] = f(m), i = j(
|
|
353
|
+
(c, p) => {
|
|
354
|
+
o(p), p === m ? (c && e.createEventSession(c), e.openFeature(L.GAMES)) : e.closeFeature();
|
|
290
355
|
},
|
|
291
356
|
[e]
|
|
292
357
|
);
|
|
293
|
-
return
|
|
294
|
-
!
|
|
295
|
-
}, [
|
|
358
|
+
return N(() => {
|
|
359
|
+
!t && l === m && (o(h), e.closeFeature());
|
|
360
|
+
}, [t, l, e]), {
|
|
296
361
|
sdkEnabled: s,
|
|
297
|
-
sdkReady:
|
|
362
|
+
sdkReady: t,
|
|
298
363
|
activeOverlay: l,
|
|
299
|
-
activateAndLoadOverlay:
|
|
300
|
-
enableSdk: (
|
|
301
|
-
e.initializeApp().then(({ enabled:
|
|
302
|
-
if (
|
|
303
|
-
c
|
|
364
|
+
activateAndLoadOverlay: i,
|
|
365
|
+
enableSdk: (c) => {
|
|
366
|
+
e.initializeApp().then(({ enabled: p, err: k }) => {
|
|
367
|
+
if (n(!0), k) {
|
|
368
|
+
i(c, h);
|
|
304
369
|
return;
|
|
305
370
|
}
|
|
306
|
-
if (
|
|
307
|
-
c
|
|
371
|
+
if (p) {
|
|
372
|
+
i(c, m);
|
|
308
373
|
return;
|
|
309
374
|
}
|
|
310
375
|
});
|
|
311
376
|
},
|
|
312
377
|
disableSdk: () => {
|
|
313
|
-
|
|
378
|
+
n(!1), e.disableApp();
|
|
314
379
|
}
|
|
315
380
|
};
|
|
316
|
-
},
|
|
317
|
-
const s =
|
|
318
|
-
return
|
|
381
|
+
}, Ke = (e) => {
|
|
382
|
+
const s = u(e.getActiveFeature()), [n, t] = f(null);
|
|
383
|
+
return N(() => {
|
|
319
384
|
const l = e.getFeatures();
|
|
320
385
|
if (s)
|
|
321
|
-
for (const [o,
|
|
322
|
-
o === s ?
|
|
386
|
+
for (const [o, i] of l)
|
|
387
|
+
o === s ? i.status.get() === b.Suspended && (i.enable(), t(i)) : i.status.get() === b.Ready && i.disable();
|
|
323
388
|
else {
|
|
324
389
|
for (const [, o] of l)
|
|
325
|
-
o.status.get() ===
|
|
326
|
-
|
|
390
|
+
o.status.get() === b.Ready && o.disable();
|
|
391
|
+
t(null);
|
|
327
392
|
}
|
|
328
393
|
return () => {
|
|
329
394
|
for (const [, o] of l)
|
|
330
|
-
o.status.get() ===
|
|
395
|
+
o.status.get() === b.Ready && o.disable();
|
|
331
396
|
};
|
|
332
|
-
}, [s, e]), [s,
|
|
333
|
-
},
|
|
334
|
-
const [,
|
|
335
|
-
return /* @__PURE__ */ a(
|
|
336
|
-
},
|
|
337
|
-
const { sdkEnabled:
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
|
|
340
|
-
|
|
397
|
+
}, [s, e]), [s, n];
|
|
398
|
+
}, Je = ({ sdk: e, className: s }) => {
|
|
399
|
+
const [, n] = Ke(e);
|
|
400
|
+
return /* @__PURE__ */ a(we, { className: s, feature: n, sdk: e });
|
|
401
|
+
}, Ve = ({ sdk: e, overlays: s, children: n }) => {
|
|
402
|
+
const { sdkEnabled: t, sdkReady: l, activeOverlay: o, activateAndLoadOverlay: i, enableSdk: c, disableSdk: p } = ze(e);
|
|
403
|
+
return /* @__PURE__ */ d(D, { children: [
|
|
404
|
+
t && /* @__PURE__ */ a(
|
|
405
|
+
He,
|
|
341
406
|
{
|
|
342
407
|
sdkReady: l,
|
|
343
408
|
activeOverlay: o,
|
|
344
|
-
className:
|
|
345
|
-
setActiveOverlay: (
|
|
409
|
+
className: x,
|
|
410
|
+
setActiveOverlay: (k) => i("", k)
|
|
346
411
|
}
|
|
347
412
|
),
|
|
348
413
|
/* @__PURE__ */ a(
|
|
349
|
-
|
|
414
|
+
A,
|
|
350
415
|
{
|
|
351
|
-
"data-nav":
|
|
352
|
-
style: { display: !
|
|
353
|
-
children:
|
|
416
|
+
"data-nav": t.toString(),
|
|
417
|
+
style: { display: !t || o === h ? "block" : "none" },
|
|
418
|
+
children: n && n({ enableSdk: c, disableSdk: p })
|
|
354
419
|
}
|
|
355
420
|
),
|
|
356
421
|
/* @__PURE__ */ a(
|
|
357
|
-
|
|
422
|
+
A,
|
|
358
423
|
{
|
|
359
|
-
"data-nav":
|
|
360
|
-
style: { display: o ===
|
|
361
|
-
children: s && o ===
|
|
424
|
+
"data-nav": t.toString(),
|
|
425
|
+
style: { display: o === g ? "block" : "none" },
|
|
426
|
+
children: s && o === g && s[o]
|
|
362
427
|
}
|
|
363
428
|
),
|
|
364
|
-
|
|
429
|
+
t && o === m && /* @__PURE__ */ a(Je, { className: x, sdk: e })
|
|
365
430
|
] });
|
|
366
|
-
},
|
|
431
|
+
}, gs = ({
|
|
367
432
|
sdkKey: e,
|
|
368
433
|
plugins: s,
|
|
369
|
-
children:
|
|
370
|
-
production:
|
|
371
|
-
}) => /* @__PURE__ */ a(
|
|
372
|
-
const { sdk:
|
|
373
|
-
if (
|
|
434
|
+
children: n,
|
|
435
|
+
production: t = !0
|
|
436
|
+
}) => /* @__PURE__ */ a(P, { sdkKey: e, plugins: s, production: t, autoEnable: !1, children: n }), ks = ({ children: e, overlays: s }) => {
|
|
437
|
+
const { sdk: n, status: t } = F(T);
|
|
438
|
+
if (t === B.UNSET)
|
|
374
439
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
375
|
-
return
|
|
440
|
+
return n ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(Ve, { sdk: n, overlays: s, children: e }) }) }) : e({});
|
|
376
441
|
};
|
|
377
442
|
export {
|
|
378
|
-
|
|
379
|
-
|
|
443
|
+
gs as MastersStreamLayerProvider,
|
|
444
|
+
ks as MastersStreamLayerSDKReact
|
|
380
445
|
};
|