@streamlayer/react 1.21.2 → 1.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/index2.js +4 -4
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +15 -15
- package/lib/cjs/useStreamLayerApp2.js +17 -16
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/bet-pack.js +4 -4
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +10 -10
- package/lib/classic/cjs/useStreamLayerApp2.js +17 -16
- package/lib/classic/es/advertisement.js +2 -2
- package/lib/classic/es/bet-pack.js +6 -7
- package/lib/classic/es/insight.js +1 -1
- package/lib/classic/es/notification.js +29 -29
- package/lib/classic/es/points.js +1 -1
- package/lib/classic/es/provider.js +27 -29
- package/lib/classic/es/useStreamLayerApp2.js +4651 -2705
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +34 -33
- package/lib/dist/es/gamification-feature2.js +1 -1
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +9557 -7614
- package/lib/es/advertisement.js +2 -2
- package/lib/es/index2.js +6 -7
- package/lib/es/insight.js +1 -1
- package/lib/es/notification.js +29 -29
- package/lib/es/points.js +1 -1
- package/lib/es/provider.js +27 -29
- package/lib/es/useStreamLayerApp2.js +4651 -2705
- package/package.json +17 -17
package/lib/es/advertisement.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as Y, jsxs as pe, Fragment as to } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as It, useState as Lo, useRef as wi, useCallback as nn } from "react";
|
|
3
|
-
import "nanostores";
|
|
4
3
|
import { n as ai, s as J, e as Ht, O as Fr, B as gm, q as fm, k as mm, f as bs, y as io, E as ym, r as _m, t as bm, u as Tm, c as vm, d as Sm, a as Ni, h as Em } from "./provider.js";
|
|
4
|
+
import "nanostores";
|
|
5
5
|
import "lodash.throttle";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "react-countup";
|
|
8
|
-
import { A as Gh, N as vi,
|
|
8
|
+
import { A as Gh, N as vi, b as Xh, c as Kh, d as no, e as Yh, P as rs, f as Jt, g as wm, h as km, i as Cm, S as Im } from "./useStreamLayerApp2.js";
|
|
9
9
|
import { c as xm, u as Am } from "./vast-client.min-B0NUra1B.js";
|
|
10
10
|
import { D as Pm } from "./index-l-eyvmpL.js";
|
|
11
11
|
import { v4 as fu, validate as Lm, v5 as mu } from "uuid";
|
package/lib/es/index2.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
2
2
|
import { s as _, B as te, o as ft, p as ht, f as Se, j as gt, n as Ee } from "./provider.js";
|
|
3
3
|
import $, { forwardRef as Ae, useState as W, useRef as D, useEffect as X, useLayoutEffect as vt, createContext as Ve, useMemo as He, useCallback as Re, memo as wt } from "react";
|
|
4
|
-
import
|
|
5
|
-
import St from "
|
|
6
|
-
import { S as qe } from "./useStreamLayerApp2.js";
|
|
4
|
+
import bt from "lodash.throttle";
|
|
5
|
+
import { C as yt, a as St, S as qe } from "./useStreamLayerApp2.js";
|
|
7
6
|
function _e(t) {
|
|
8
7
|
return t !== null && typeof t == "object" && "constructor" in t && t.constructor === Object;
|
|
9
8
|
}
|
|
@@ -3239,7 +3238,7 @@ const yr = ({ data: t, gamification: e, onEvent: s, swipeable: r, autoplay: n })
|
|
|
3239
3238
|
e.closeQuestion();
|
|
3240
3239
|
}, [u, f] = W(1.1);
|
|
3241
3240
|
return X(() => {
|
|
3242
|
-
const g =
|
|
3241
|
+
const g = bt(() => {
|
|
3243
3242
|
var h;
|
|
3244
3243
|
const b = (h = l.current) == null ? void 0 : h.size;
|
|
3245
3244
|
if (!b)
|
|
@@ -3283,7 +3282,7 @@ const yr = ({ data: t, gamification: e, onEvent: s, swipeable: r, autoplay: n })
|
|
|
3283
3282
|
{
|
|
3284
3283
|
onEvent: n,
|
|
3285
3284
|
actionFn: () => n({ type: "slHardRefresh" }),
|
|
3286
|
-
description: l instanceof
|
|
3285
|
+
description: l instanceof yt && l.code !== St.InvalidArgument ? `The event ID was not
|
|
3287
3286
|
specified or is invalid.` : `The server is unable to
|
|
3288
3287
|
handle this request.`
|
|
3289
3288
|
}
|
|
@@ -3352,7 +3351,7 @@ handle this request.`
|
|
|
3352
3351
|
name: "SlideSwitchButton",
|
|
3353
3352
|
class: "spp13y7",
|
|
3354
3353
|
propsAsIs: !1
|
|
3355
|
-
}),
|
|
3354
|
+
}), Vr = Ae(({ sdk: t, onEvent: e, close: s }, r) => {
|
|
3356
3355
|
const [n, i] = W(), [l, a] = W(), o = Re(
|
|
3357
3356
|
(c) => {
|
|
3358
3357
|
if (c.type === "slBetPackReady") {
|
|
@@ -3411,5 +3410,5 @@ view this resource.`
|
|
|
3411
3410
|
});
|
|
3412
3411
|
export {
|
|
3413
3412
|
Gr as Q,
|
|
3414
|
-
|
|
3413
|
+
Vr as n
|
|
3415
3414
|
};
|
package/lib/es/insight.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as u, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as l, useEffect as h } from "react";
|
|
3
|
-
import "nanostores";
|
|
4
3
|
import { f as m, s as f, T as S, u as I, d as g, h as v, a as k } from "./provider.js";
|
|
4
|
+
import "nanostores";
|
|
5
5
|
import "lodash.throttle";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "react-countup";
|
package/lib/es/notification.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as w, useRef as _, useEffect as y, useCallback as As, useMemo as
|
|
2
|
+
import { useState as w, useRef as _, useEffect as y, useCallback as As, useMemo as Is } from "react";
|
|
3
|
+
import { s as n, B as A, $ as hs, a0 as $s, a1 as K, R as G, a2 as gs, E as ws, O as x, y as ys, i as Ts, f as bs, e as Cs, N as R, u as fs, d as ks, c as Ns, h as qs } from "./provider.js";
|
|
3
4
|
import "nanostores";
|
|
4
|
-
import { s as n, B as A, $ as Is, a0 as $s, a1 as K, R as G, a2 as gs, E as ws, O as x, y as ys, i as Ts, f as bs, e as Cs, N as R, u as fs, d as ks, c as Ns, h as qs } from "./provider.js";
|
|
5
5
|
import "lodash.throttle";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "react-countup";
|
|
8
|
-
import {
|
|
8
|
+
import { j as v, Q as h, k as H, l as L, S as Es, A as O } from "./useStreamLayerApp2.js";
|
|
9
9
|
const b = /* @__PURE__ */ n("div")({
|
|
10
10
|
name: "Media",
|
|
11
11
|
class: "m1bcvojl",
|
|
@@ -105,7 +105,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
105
105
|
return /* @__PURE__ */ l(Hs, { children: [
|
|
106
106
|
p && /* @__PURE__ */ s(_s, { children: /* @__PURE__ */ s(Ks, { children: p }) }),
|
|
107
107
|
/* @__PURE__ */ s(
|
|
108
|
-
|
|
108
|
+
hs,
|
|
109
109
|
{
|
|
110
110
|
image: e,
|
|
111
111
|
name: (d = i == null ? void 0 : i.meta) == null ? void 0 : d.accountName,
|
|
@@ -133,13 +133,13 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
133
133
|
if (!d || !t || !t.notification)
|
|
134
134
|
return null;
|
|
135
135
|
const { title: m, image: u, imageMode: $ } = t.notification;
|
|
136
|
-
let
|
|
137
|
-
i ===
|
|
138
|
-
const g = t.useMediaFromContent && (o == null ? void 0 : o.image), c = i ===
|
|
139
|
-
return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(zs, { style:
|
|
140
|
-
|
|
136
|
+
let I = u;
|
|
137
|
+
i === h.TWEET && a != null && a.tweetMedia && (I = a.tweetMedia.image), $ === v.NONE && (I = "");
|
|
138
|
+
const g = t.useMediaFromContent && (o == null ? void 0 : o.image), c = i === h.TWEET && ((p = a == null ? void 0 : a.tweetMedia) == null ? void 0 : p.video) || i === h.FACTOID && (o == null ? void 0 : o.video);
|
|
139
|
+
return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(zs, { style: I ? {} : { paddingLeft: "1.5rem" }, children: [
|
|
140
|
+
I && !g && /* @__PURE__ */ s(j, { src: I, imageMode: $, withVideo: !!c }),
|
|
141
141
|
g && /* @__PURE__ */ s(j, { src: g, fromInsight: !0, withVideo: !!c }),
|
|
142
|
-
i ===
|
|
142
|
+
i === h.TWEET ? /* @__PURE__ */ s(Zs, { tweet: a }) : /* @__PURE__ */ s(Xs, { questionTypeData: d, questionType: i, title: m }),
|
|
143
143
|
/* @__PURE__ */ s(Qs, { name: "inapp-button", children: r || "Open" }),
|
|
144
144
|
/* @__PURE__ */ s(Ys, { name: "chevronRight" })
|
|
145
145
|
] }) });
|
|
@@ -184,7 +184,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
184
184
|
name: "MediaNone",
|
|
185
185
|
class: "mqfzyyr",
|
|
186
186
|
propsAsIs: !0
|
|
187
|
-
}), Ae = "v170mtgf",
|
|
187
|
+
}), Ae = "v170mtgf", Ie = {
|
|
188
188
|
[v.UNSET]: S,
|
|
189
189
|
[v.NONE]: S,
|
|
190
190
|
[v.ROUNDED]: pe,
|
|
@@ -204,7 +204,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
204
204
|
color: o,
|
|
205
205
|
children: /* @__PURE__ */ s(S, {})
|
|
206
206
|
});
|
|
207
|
-
const d = a === L.ENABLED ? re :
|
|
207
|
+
const d = a === L.ENABLED ? re : Ie[i];
|
|
208
208
|
return /* @__PURE__ */ s(B, {
|
|
209
209
|
color: o,
|
|
210
210
|
children: t ? /* @__PURE__ */ s(te, {
|
|
@@ -220,14 +220,14 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
220
220
|
})
|
|
221
221
|
})
|
|
222
222
|
});
|
|
223
|
-
},
|
|
223
|
+
}, he = () => ({
|
|
224
224
|
withoutPadding: e
|
|
225
225
|
}) => e ? "0px" : "1rem", X = /* @__PURE__ */ n("div")({
|
|
226
226
|
name: "NotificationContent",
|
|
227
227
|
class: "n1p3bk1c",
|
|
228
228
|
propsAsIs: !1,
|
|
229
229
|
vars: {
|
|
230
|
-
"n1p3bk1c-0": [
|
|
230
|
+
"n1p3bk1c-0": [he()]
|
|
231
231
|
}
|
|
232
232
|
}), $e = /* @__PURE__ */ n("div")({
|
|
233
233
|
name: "MainContent",
|
|
@@ -243,7 +243,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
243
243
|
propsAsIs: !1
|
|
244
244
|
}), ye = () => ({
|
|
245
245
|
questionType: e
|
|
246
|
-
}) => e ===
|
|
246
|
+
}) => e === h.FACTOID ? "7.3rem" : "4.5rem", Te = () => ({
|
|
247
247
|
webos: e
|
|
248
248
|
}) => e ? "11px 0px 8px 0px" : "11px 0px", be = () => ({
|
|
249
249
|
imageMode: e,
|
|
@@ -332,20 +332,20 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
332
332
|
webos: d
|
|
333
333
|
}) => {
|
|
334
334
|
var r, m, u;
|
|
335
|
-
const [$,
|
|
336
|
-
y(() => (o != null && o.sponsorLogo && (
|
|
337
|
-
|
|
335
|
+
const [$, I] = w(!1), g = _();
|
|
336
|
+
y(() => (o != null && o.sponsorLogo && (I(!0), g.current = setTimeout(() => {
|
|
337
|
+
I(!1);
|
|
338
338
|
}, 5e3)), () => clearTimeout(g.current)), [o == null ? void 0 : o.sponsorLogo]);
|
|
339
339
|
const c = G[t];
|
|
340
340
|
if (!c || !o || !o.notification)
|
|
341
341
|
return null;
|
|
342
|
-
const { title: ds, image: ps, imageMode: f, useContentMedia: k } = o.notification, ms = t ===
|
|
342
|
+
const { title: ds, image: ps, imageMode: f, useContentMedia: k } = o.notification, ms = t === h.FACTOID ? a == null ? void 0 : a.heading : ds, us = t === h.FACTOID ? a == null ? void 0 : a.body : "", vs = ps, N = t === h.FACTOID && ((r = a == null ? void 0 : a.video) == null ? void 0 : r.url) && (o == null ? void 0 : o.isVideo) && k === L.ENABLED, q = k === L.ENABLED ? N ? (m = a == null ? void 0 : a.video) == null ? void 0 : m.url : a == null ? void 0 : a.image : "";
|
|
343
343
|
return o != null && o.sponsorLogo && $ ? /* @__PURE__ */ s(
|
|
344
344
|
Fe,
|
|
345
345
|
{
|
|
346
346
|
sponsorLogo: o == null ? void 0 : o.sponsorLogo,
|
|
347
347
|
webos: d,
|
|
348
|
-
onClick: () =>
|
|
348
|
+
onClick: () => I(!1)
|
|
349
349
|
}
|
|
350
350
|
) : /* @__PURE__ */ l(
|
|
351
351
|
Z,
|
|
@@ -355,7 +355,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
355
355
|
onClick: (C) => {
|
|
356
356
|
d || e == null || e(C);
|
|
357
357
|
},
|
|
358
|
-
"data-is-insight": t ===
|
|
358
|
+
"data-is-insight": t === h.FACTOID,
|
|
359
359
|
"data-webos": d,
|
|
360
360
|
children: [
|
|
361
361
|
(o == null ? void 0 : o.sponsorLogo) && /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s(ss, { src: o == null ? void 0 : o.sponsorLogo }) }),
|
|
@@ -563,7 +563,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
563
563
|
name: "Line1",
|
|
564
564
|
class: "le78kvg",
|
|
565
565
|
propsAsIs: !0
|
|
566
|
-
}),
|
|
566
|
+
}), In = () => D, hn = /* @__PURE__ */ n(In())({
|
|
567
567
|
name: "Line2",
|
|
568
568
|
class: "l1o7966d",
|
|
569
569
|
propsAsIs: !0
|
|
@@ -574,7 +574,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
574
574
|
}), wn = () => /* @__PURE__ */ l(un, {
|
|
575
575
|
children: [/* @__PURE__ */ s(An, {
|
|
576
576
|
children: /* @__PURE__ */ s("div", {})
|
|
577
|
-
}), /* @__PURE__ */ s(
|
|
577
|
+
}), /* @__PURE__ */ s(hn, {
|
|
578
578
|
children: /* @__PURE__ */ s("div", {})
|
|
579
579
|
}), /* @__PURE__ */ s(gn, {
|
|
580
580
|
children: /* @__PURE__ */ s("div", {})
|
|
@@ -879,7 +879,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
879
879
|
1: 3e3,
|
|
880
880
|
2: 4e3,
|
|
881
881
|
3: 4e3
|
|
882
|
-
},
|
|
882
|
+
}, Io = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
|
|
883
883
|
if (y(() => {
|
|
884
884
|
if (t) {
|
|
885
885
|
const u = setTimeout(() => {
|
|
@@ -902,10 +902,10 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
902
902
|
r === 3 && !a && /* @__PURE__ */ s(Ao, { title: p || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" })
|
|
903
903
|
] })
|
|
904
904
|
] }) });
|
|
905
|
-
},
|
|
905
|
+
}, ho = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
|
|
906
906
|
const [d, r] = w(1);
|
|
907
907
|
return /* @__PURE__ */ s(
|
|
908
|
-
|
|
908
|
+
Io,
|
|
909
909
|
{
|
|
910
910
|
close: e,
|
|
911
911
|
action: i,
|
|
@@ -953,11 +953,11 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
953
953
|
}, 5e3)), () => clearTimeout(m.current);
|
|
954
954
|
}, [(i = e == null ? void 0 : e.inApp) == null ? void 0 : i.sponsorLogo]), (t = e == null ? void 0 : e.inApp) != null && t.sponsorLogo && d ? /* @__PURE__ */ s(bo, { sponsorLogo: (o = e.inApp) == null ? void 0 : o.sponsorLogo, onClick: () => r(!1) }) : /* @__PURE__ */ s(cs, { children: /* @__PURE__ */ l("div", { children: [
|
|
955
955
|
((a = e == null ? void 0 : e.inApp) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ s(To, { children: /* @__PURE__ */ s(ls, { src: (p = e == null ? void 0 : e.inApp) == null ? void 0 : p.sponsorLogo }) }),
|
|
956
|
-
/* @__PURE__ */ s(
|
|
956
|
+
/* @__PURE__ */ s(ho, { ...e })
|
|
957
957
|
] }) });
|
|
958
958
|
}, fo = ({ sdk: e, webos: i }) => {
|
|
959
959
|
var t, o, a, p, d, r, m, u;
|
|
960
|
-
const [$] = w(e.getNotificationsStore()),
|
|
960
|
+
const [$] = w(e.getNotificationsStore()), I = bs($), g = e.getFeature(Es.GAMES), c = Is(() => e.getActiveNotification(), [e, I]);
|
|
961
961
|
return y(() => {
|
|
962
962
|
c && Cs.emit("notification", {
|
|
963
963
|
action: "rendered",
|
|
@@ -966,7 +966,7 @@ const b = /* @__PURE__ */ n("div")({
|
|
|
966
966
|
questionType: c.data.questionType
|
|
967
967
|
}
|
|
968
968
|
});
|
|
969
|
-
}, [c]), c && c.type === R.QUESTION_RESOLVED ? c.data.question && c.data.questionType ===
|
|
969
|
+
}, [c]), c && c.type === R.QUESTION_RESOLVED ? c.data.question && c.data.questionType === h.PREDICTION ? c && ((t = c.data.inApp) == null ? void 0 : t.adUnit) === O.STANDART ? /* @__PURE__ */ s(
|
|
970
970
|
Co,
|
|
971
971
|
{
|
|
972
972
|
action: c.action,
|
package/lib/es/points.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useEffect as d } from "react";
|
|
3
|
-
import "nanostores";
|
|
4
3
|
import { s as a, B as y, m as h, i as S, f, F as c, e as r, u as v, d as g, h as k } from "./provider.js";
|
|
4
|
+
import "nanostores";
|
|
5
5
|
import "lodash.throttle";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "react-countup";
|
package/lib/es/provider.js
CHANGED
|
@@ -3,8 +3,8 @@ var Nn = (e, t, n) => t in e ? Hn(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var p1 = (e, t, n) => Nn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as a, jsxs as g, Fragment as d1 } from "react/jsx-runtime";
|
|
5
5
|
import * as d from "react";
|
|
6
|
-
import
|
|
7
|
-
import { S as A1, Q as S,
|
|
6
|
+
import H1, { useState as Z, useEffect as j, useRef as l1, createContext as R6, useContext as Y1, useCallback as o1, useMemo as f1, useLayoutEffect as $6, forwardRef as F3, memo as Dn, Component as qn, createElement as Bn, PureComponent as Pn, lazy as Zn, Suspense as Kn } from "react";
|
|
7
|
+
import { S as A1, a as j1, m as ct, Q as S, n as Un, j as U1, k as i2, A as S6, h as jn, g as L3, I as k6, o as zn, p as x2, u as Gn } from "./useStreamLayerApp2.js";
|
|
8
8
|
import { listenKeys as Wn } from "nanostores";
|
|
9
9
|
import { pino as Qn } from "pino";
|
|
10
10
|
import I3 from "lodash.throttle";
|
|
@@ -13,8 +13,6 @@ import { createPortal as O2 } from "react-dom";
|
|
|
13
13
|
import Yn from "react-countup";
|
|
14
14
|
import Xn from "react-infinite-scroller";
|
|
15
15
|
import "uuid";
|
|
16
|
-
import { Code as j1, createContextKey as ct } from "@connectrpc/connect";
|
|
17
|
-
import "@connectrpc/connect-web";
|
|
18
16
|
import "@nanostores/query";
|
|
19
17
|
const Jn = Qn({
|
|
20
18
|
level: "trace",
|
|
@@ -247,8 +245,8 @@ function h7(e) {
|
|
|
247
245
|
f[T] = y[T];
|
|
248
246
|
}), C.style = f;
|
|
249
247
|
}
|
|
250
|
-
return e.__wyw_meta && e !== l ? (C.as = l,
|
|
251
|
-
}, i =
|
|
248
|
+
return e.__wyw_meta && e !== l ? (C.as = l, H1.createElement(e, C)) : H1.createElement(l, C);
|
|
249
|
+
}, i = H1.forwardRef ? H1.forwardRef(r) : (
|
|
252
250
|
// React.forwardRef won't available on older React versions and in Preact
|
|
253
251
|
// Fallback to a innerRef prop in that case
|
|
254
252
|
(s) => {
|
|
@@ -310,7 +308,7 @@ var g2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
310
308
|
* This source code is licensed under the MIT license found in the
|
|
311
309
|
* LICENSE file in the root directory of this source tree.
|
|
312
310
|
*/
|
|
313
|
-
var o2 =
|
|
311
|
+
var o2 = H1;
|
|
314
312
|
function _7(e, t) {
|
|
315
313
|
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
316
314
|
}
|
|
@@ -352,17 +350,17 @@ const X2 = (e, t) => (n) => {
|
|
|
352
350
|
e.current !== n && (e.current = n, t());
|
|
353
351
|
};
|
|
354
352
|
function V7(e, { keys: t, deps: n = [e, t] } = {}) {
|
|
355
|
-
const r =
|
|
353
|
+
const r = H1.useRef();
|
|
356
354
|
r.current = e.get();
|
|
357
|
-
const i =
|
|
358
|
-
return
|
|
355
|
+
const i = H1.useCallback((o) => (X2(r, o)(e.value), (t == null ? void 0 : t.length) > 0 ? Wn(e, t, X2(r, o)) : e.listen(X2(r, o))), n), s = () => r.current;
|
|
356
|
+
return H1.useSyncExternalStore ? H1.useSyncExternalStore(i, s, s) : F7.useSyncExternalStore(i, s, s);
|
|
359
357
|
}
|
|
360
358
|
const J = V7, O7 = () => [
|
|
361
359
|
!1,
|
|
362
360
|
(e) => {
|
|
363
361
|
window.requestAnimationFrame(() => e());
|
|
364
362
|
}
|
|
365
|
-
], H7 =
|
|
363
|
+
], H7 = H1.useTransition || O7, N7 = (e) => {
|
|
366
364
|
const t = J(e.getActiveFeature()), n = J(e.streamStore()), [r, i] = Z(null);
|
|
367
365
|
return j(() => {
|
|
368
366
|
const s = e.getFeatures();
|
|
@@ -2572,7 +2570,7 @@ function vs() {
|
|
|
2572
2570
|
}
|
|
2573
2571
|
(function(e, t) {
|
|
2574
2572
|
(function(n, r) {
|
|
2575
|
-
e.exports = r(K6(), Kr(), J9(), ts(), rs(), ss(), as(), os(), hs(), fs(), vs(),
|
|
2573
|
+
e.exports = r(K6(), Kr(), J9(), ts(), rs(), ss(), as(), os(), hs(), fs(), vs(), H1);
|
|
2576
2574
|
})(g2, function(n, r, i, s, o, l, u, p, C, v, f, y) {
|
|
2577
2575
|
return function() {
|
|
2578
2576
|
var A = { 654: function(L, m, w) {
|
|
@@ -2646,8 +2644,8 @@ function vs() {
|
|
|
2646
2644
|
return Math.abs(G - n1);
|
|
2647
2645
|
}
|
|
2648
2646
|
if (R === "edges") {
|
|
2649
|
-
var b1 = Math.min(X, Q), c1 = Math.min(z, u1), k1 = Math.max(X, Q), P1 = Math.max(z, u1),
|
|
2650
|
-
return Math.min(
|
|
2647
|
+
var b1 = Math.min(X, Q), c1 = Math.min(z, u1), k1 = Math.max(X, Q), P1 = Math.max(z, u1), N1 = Math.abs(b1 - c1), M1 = Math.abs(k1 - P1);
|
|
2648
|
+
return Math.min(N1, M1);
|
|
2651
2649
|
}
|
|
2652
2650
|
var h2 = [Math.abs(z - X), Math.abs(z - Q), Math.abs(u1 - X), Math.abs(u1 - Q)];
|
|
2653
2651
|
return Math.min.apply(Math, h2);
|
|
@@ -2658,8 +2656,8 @@ function vs() {
|
|
|
2658
2656
|
return V.log("smartNavigate", "distance (primary, secondary, total weighted) for ".concat(U.focusKey, " relative to ").concat(R, " is"), z, u1, G), V.log("smartNavigate", "priority for ".concat(U.focusKey, " relative to ").concat(R, " is"), n1), V.visualDebugger && (V.visualDebugger.drawPoint(t1.a.x, t1.a.y, "yellow", 6), V.visualDebugger.drawPoint(t1.b.x, t1.b.y, "yellow", 6)), n1;
|
|
2659
2657
|
});
|
|
2660
2658
|
}, x.prototype.init = function(h) {
|
|
2661
|
-
var b = this, I = h === void 0 ? {} : h, R = I.debug, V = R !== void 0 && R, q = I.visualDebug, B = q !== void 0 && q, U = I.nativeMode, t1 = U !== void 0 && U, e1 = I.throttle, X = e1 === void 0 ? 0 : e1, Q = I.throttleKeypresses, z = Q !== void 0 && Q, u1 = I.useGetBoundingClientRect, G = u1 !== void 0 && u1, n1 = I.shouldFocusDOMNode, b1 = n1 !== void 0 && n1, c1 = I.domNodeFocusOptions, k1 = c1 === void 0 ? {} : c1, P1 = I.shouldUseNativeEvents,
|
|
2662
|
-
if (!this.enabled && (this.domNodeFocusOptions = k1, this.enabled = !0, this.nativeMode = t1, this.throttleKeypresses = z, this.useGetBoundingClientRect = G, this.shouldFocusDOMNode = b1 && !t1, this.shouldUseNativeEvents =
|
|
2659
|
+
var b = this, I = h === void 0 ? {} : h, R = I.debug, V = R !== void 0 && R, q = I.visualDebug, B = q !== void 0 && q, U = I.nativeMode, t1 = U !== void 0 && U, e1 = I.throttle, X = e1 === void 0 ? 0 : e1, Q = I.throttleKeypresses, z = Q !== void 0 && Q, u1 = I.useGetBoundingClientRect, G = u1 !== void 0 && u1, n1 = I.shouldFocusDOMNode, b1 = n1 !== void 0 && n1, c1 = I.domNodeFocusOptions, k1 = c1 === void 0 ? {} : c1, P1 = I.shouldUseNativeEvents, N1 = P1 !== void 0 && P1, M1 = I.rtl, h2 = M1 !== void 0 && M1, h1 = I.distanceCalculationMethod, E1 = h1 === void 0 ? "corners" : h1, at = I.customDistanceCalculationFunction, Vn = at === void 0 ? void 0 : at;
|
|
2660
|
+
if (!this.enabled && (this.domNodeFocusOptions = k1, this.enabled = !0, this.nativeMode = t1, this.throttleKeypresses = z, this.useGetBoundingClientRect = G, this.shouldFocusDOMNode = b1 && !t1, this.shouldUseNativeEvents = N1, this.writingDirection = h2 ? C1.default.RTL : C1.default.LTR, this.distanceCalculationMethod = E1, this.customDistanceCalculationFunction = Vn, this.debug = V, !this.nativeMode && (Number.isInteger(X) && X > 0 && (this.throttle = X), this.bindEventHandlers(), B))) {
|
|
2663
2661
|
this.visualDebugger = new I1.default(this.writingDirection);
|
|
2664
2662
|
var ot = function() {
|
|
2665
2663
|
requestAnimationFrame(function() {
|
|
@@ -2811,12 +2809,12 @@ function vs() {
|
|
|
2811
2809
|
var b = h.focusKey, I = h.node, R = h.parentFocusKey, V = h.onEnterPress, q = h.onEnterRelease, B = h.onArrowPress, U = h.onArrowRelease, t1 = h.onFocus, e1 = h.onBlur, X = h.saveLastFocusedChild, Q = h.trackChildren, z = h.onUpdateFocus, u1 = h.onUpdateHasFocusedChild, G = h.preferredChildFocusKey, n1 = h.autoRestoreFocus, b1 = h.forceFocus, c1 = h.focusable, k1 = h.isFocusBoundary, P1 = h.focusBoundaryDirections;
|
|
2812
2810
|
if (this.focusableComponents[b] = { focusKey: b, node: I, parentFocusKey: R, onEnterPress: V, onEnterRelease: q, onArrowPress: B, onArrowRelease: U, onFocus: t1, onBlur: e1, onUpdateFocus: z, onUpdateHasFocusedChild: u1, saveLastFocusedChild: X, trackChildren: Q, preferredChildFocusKey: G, focusable: c1, isFocusBoundary: k1, focusBoundaryDirections: P1, autoRestoreFocus: n1, forceFocus: b1, lastFocusedChildKey: null, layout: { x: 0, y: 0, width: 0, height: 0, left: 0, top: 0, right: 0, bottom: 0, node: I }, layoutUpdated: !1 }, I || console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ', this.focusableComponents[b]), !this.nativeMode) {
|
|
2813
2811
|
this.updateLayout(b), this.log("addFocusable", "Component added: ", this.focusableComponents[b]), b === this.focusKey && this.setFocus(G || b);
|
|
2814
|
-
for (var
|
|
2815
|
-
if (
|
|
2812
|
+
for (var N1 = this.focusableComponents[this.focusKey]; N1; ) {
|
|
2813
|
+
if (N1.parentFocusKey === b) {
|
|
2816
2814
|
this.updateParentsHasFocusedChild(this.focusKey, {}), this.updateParentsLastFocusedChild(this.focusKey);
|
|
2817
2815
|
break;
|
|
2818
2816
|
}
|
|
2819
|
-
|
|
2817
|
+
N1 = this.focusableComponents[N1.parentFocusKey];
|
|
2820
2818
|
}
|
|
2821
2819
|
}
|
|
2822
2820
|
}, x.prototype.removeFocusable = function(h) {
|
|
@@ -3023,14 +3021,14 @@ function vs() {
|
|
|
3023
3021
|
R(h1, B, E1);
|
|
3024
3022
|
}, [B, R]), z = (0, E.useCallback)(function(h1, E1) {
|
|
3025
3023
|
q(h1, B, E1);
|
|
3026
|
-
}, [B, q]), u1 = (0, E.useRef)(null), G = (0, E.useState)(!1), n1 = G[0], b1 = G[1], c1 = (0, E.useState)(!1), k1 = c1[0], P1 = c1[1],
|
|
3024
|
+
}, [B, q]), u1 = (0, E.useRef)(null), G = (0, E.useState)(!1), n1 = G[0], b1 = G[1], c1 = (0, E.useState)(!1), k1 = c1[0], P1 = c1[1], N1 = (0, N.useFocusContext)(), M1 = (0, E.useMemo)(function() {
|
|
3027
3025
|
return S1 || (0, k.default)("sn:focusable-item-");
|
|
3028
3026
|
}, [S1]), h2 = (0, E.useCallback)(function(h1) {
|
|
3029
3027
|
h1 === void 0 && (h1 = {}), F.SpatialNavigation.setFocus(M1, h1);
|
|
3030
3028
|
}, [M1]);
|
|
3031
3029
|
return (0, E.useEffect)(function() {
|
|
3032
3030
|
var h1 = u1.current;
|
|
3033
|
-
return F.SpatialNavigation.addFocusable({ focusKey: M1, node: h1, parentFocusKey:
|
|
3031
|
+
return F.SpatialNavigation.addFocusable({ focusKey: M1, node: h1, parentFocusKey: N1, preferredChildFocusKey: Y, onEnterPress: U, onEnterRelease: t1, onArrowPress: e1, onArrowRelease: X, onFocus: Q, onBlur: z, onUpdateFocus: function(E1) {
|
|
3034
3032
|
return E1 === void 0 && (E1 = !1), b1(E1);
|
|
3035
3033
|
}, onUpdateHasFocusedChild: function(E1) {
|
|
3036
3034
|
return E1 === void 0 && (E1 = !1), P1(E1);
|
|
@@ -3488,7 +3486,7 @@ const ys = (e) => /* @__PURE__ */ d.createElement("svg", { width: 24, height: 24
|
|
|
3488
3486
|
[S.POLL]: { label: "Poll", iconName: "icon-poll" },
|
|
3489
3487
|
[S.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
|
|
3490
3488
|
[S.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
|
|
3491
|
-
},
|
|
3489
|
+
}, Sf = {
|
|
3492
3490
|
[S.TWEET]: "Learn more",
|
|
3493
3491
|
[S.FACTOID]: "Learn more",
|
|
3494
3492
|
[S.POLL]: "Answer",
|
|
@@ -6122,7 +6120,7 @@ const Qd = /* @__PURE__ */ c("div")({
|
|
|
6122
6120
|
}) => {
|
|
6123
6121
|
const n = e + t;
|
|
6124
6122
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
6125
|
-
},
|
|
6123
|
+
}, kf = ({
|
|
6126
6124
|
gamification: e,
|
|
6127
6125
|
scrollStore: t,
|
|
6128
6126
|
className: n,
|
|
@@ -7564,7 +7562,7 @@ const Qd = /* @__PURE__ */ c("div")({
|
|
|
7564
7562
|
n({ ...r });
|
|
7565
7563
|
}) : () => {
|
|
7566
7564
|
}, [e == null ? void 0 : e.uiState]), t;
|
|
7567
|
-
},
|
|
7565
|
+
}, Mf = ({ event: e, topNavigation: t, theme: n, muted: r, withSidebarNotification: i = !0 }) => {
|
|
7568
7566
|
const { sdk: s, status: o } = Y1(X1), l = hf(), u = Cf(), { event: p } = Y1(X1);
|
|
7569
7567
|
if (o === M3.UNSET)
|
|
7570
7568
|
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
@@ -7582,7 +7580,7 @@ var M3 = /* @__PURE__ */ ((e) => (e[e.UNSET = 0] = "UNSET", e[e.CONNECTED = 1] =
|
|
|
7582
7580
|
const vf = {
|
|
7583
7581
|
status: 0,
|
|
7584
7582
|
sdk: null
|
|
7585
|
-
}, X1 = R6(vf),
|
|
7583
|
+
}, X1 = R6(vf), Ff = ({
|
|
7586
7584
|
sdkKey: e,
|
|
7587
7585
|
theme: t,
|
|
7588
7586
|
themeMode: n,
|
|
@@ -7654,7 +7652,7 @@ export {
|
|
|
7654
7652
|
f6 as P,
|
|
7655
7653
|
VC as Q,
|
|
7656
7654
|
z2 as R,
|
|
7657
|
-
|
|
7655
|
+
Ff as S,
|
|
7658
7656
|
Ed as T,
|
|
7659
7657
|
D7 as U,
|
|
7660
7658
|
T1 as V,
|
|
@@ -7666,13 +7664,13 @@ export {
|
|
|
7666
7664
|
ff as a,
|
|
7667
7665
|
hd as a0,
|
|
7668
7666
|
qu as a1,
|
|
7669
|
-
|
|
7670
|
-
|
|
7667
|
+
Sf as a2,
|
|
7668
|
+
Mf as b,
|
|
7671
7669
|
hf as c,
|
|
7672
7670
|
Cf as d,
|
|
7673
7671
|
b2 as e,
|
|
7674
7672
|
J as f,
|
|
7675
|
-
|
|
7673
|
+
kf as g,
|
|
7676
7674
|
df as h,
|
|
7677
7675
|
tt as i,
|
|
7678
7676
|
l2 as j,
|