@streamlayer/react 0.31.12 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/masters.d.ts +2 -2
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +2 -2
- package/lib/dist/es/gamification-feature.js +27 -27
- package/lib/dist/es/masters.js +10 -7
- package/lib/dist/index.d.ts +4 -3
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +22 -22
- package/lib/es/masters2.js +71 -71
- package/lib/style.css +1 -1
- package/package.json +8 -8
|
@@ -2,12 +2,12 @@ import { jsxs as m, jsx as s, Fragment as b } from "react/jsx-runtime";
|
|
|
2
2
|
import { s as r, n as O } from "./index4.js";
|
|
3
3
|
import { useStore as k } from "@nanostores/react";
|
|
4
4
|
import { o as Ne, r as te, w as Re, A as Qe, O as Ue, a as K, n as _e, d as Pe } from "./masters2.js";
|
|
5
|
-
import { QuestionType as z, QuestionStatus as
|
|
5
|
+
import { QuestionType as z, QuestionStatus as L, QuestionImages as R, PickHistoryStatus as _ } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { useState as V, useCallback as F, useMemo as Y, createElement as H, PureComponent as ye } from "react";
|
|
7
7
|
import { d as Ae } from "./index3.js";
|
|
8
8
|
import "react-countup";
|
|
9
9
|
import { CountdownCircleTimer as qe } from "react-countdown-circle-timer";
|
|
10
|
-
import { E
|
|
10
|
+
import { E } from "./index2.js";
|
|
11
11
|
import "@streamlayer/sdk-web-interfaces";
|
|
12
12
|
import "@streamlayer/sdk-web-notifications";
|
|
13
13
|
import "./useStreamLayerApp.js";
|
|
@@ -258,11 +258,11 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
258
258
|
questionStatus: u
|
|
259
259
|
}) => {
|
|
260
260
|
const p = n && (i === z.TRIVIA || i === z.PREDICTION);
|
|
261
|
-
if (!p && u !==
|
|
261
|
+
if (!p && u !== L.RESOLVED || u === L.RESOLVED && i === z.PREDICTION && !n)
|
|
262
262
|
return null;
|
|
263
263
|
const I = i === z.PREDICTION && !o, c = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
|
|
264
264
|
return /* @__PURE__ */ m(Ot, { "data-isPrediction": I, children: [
|
|
265
|
-
u ===
|
|
265
|
+
u === L.RESOLVED && i === z.TRIVIA && !n && /* @__PURE__ */ m(b, { children: [
|
|
266
266
|
/* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(O, { name: "questionExpired" }) }),
|
|
267
267
|
/* @__PURE__ */ m("div", { children: [
|
|
268
268
|
/* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Z, { children: "Question Expired" }) }),
|
|
@@ -281,11 +281,11 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
281
281
|
] }) })
|
|
282
282
|
] })
|
|
283
283
|
] });
|
|
284
|
-
},
|
|
284
|
+
}, Lt = /* @__PURE__ */ r("div")({
|
|
285
285
|
name: "Container",
|
|
286
286
|
class: "c14ielyq",
|
|
287
287
|
propsAsIs: !1
|
|
288
|
-
}),
|
|
288
|
+
}), Et = /* @__PURE__ */ r("div")({
|
|
289
289
|
name: "Content",
|
|
290
290
|
class: "c1tlqx57",
|
|
291
291
|
propsAsIs: !1
|
|
@@ -367,7 +367,7 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
367
367
|
correct: n,
|
|
368
368
|
hasCorrectAnswer: i,
|
|
369
369
|
questionStatus: o
|
|
370
|
-
}) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || o ===
|
|
370
|
+
}) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || o === L.RESOLVED && n : !1, en = (e) => {
|
|
371
371
|
var t;
|
|
372
372
|
const {
|
|
373
373
|
// option props
|
|
@@ -387,7 +387,7 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
387
387
|
questionType: A,
|
|
388
388
|
correct: T,
|
|
389
389
|
hasCorrectAnswer: a
|
|
390
|
-
} = e, l = Kt(e), d = Xt({ questionType: A, questionVoted: c, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = D ===
|
|
390
|
+
} = e, l = Kt(e), d = Xt({ questionType: A, questionVoted: c, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = D === L.RESOLVED && A === z.PREDICTION, M = c || g;
|
|
391
391
|
return /* @__PURE__ */ m(
|
|
392
392
|
Qt,
|
|
393
393
|
{
|
|
@@ -410,11 +410,11 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
410
410
|
]
|
|
411
411
|
}
|
|
412
412
|
);
|
|
413
|
-
}, tn = [
|
|
413
|
+
}, tn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], nn = [10, 10, 0], sn = /* @__PURE__ */ r("div")({
|
|
414
414
|
name: "RemainingTime",
|
|
415
415
|
class: "r165427",
|
|
416
416
|
propsAsIs: !1
|
|
417
|
-
}), on =
|
|
417
|
+
}), on = E.SECONDARY_GREEN6, de = E.SECONDARY_RED3, rn = E.NEUTRALS_GRAY3, an = ({
|
|
418
418
|
isPlaying: e = !0,
|
|
419
419
|
duration: t = 30,
|
|
420
420
|
onTimerExpired: n
|
|
@@ -523,7 +523,7 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
523
523
|
onVote: T
|
|
524
524
|
};
|
|
525
525
|
}) : [], [d, h, t, e, l, T, D]), M = c && (c.case === "trivia" || c.case === "prediction") ? c.value : void 0;
|
|
526
|
-
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(
|
|
526
|
+
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(Lt, { children: /* @__PURE__ */ m(Et, { children: [
|
|
527
527
|
M && /* @__PURE__ */ s(
|
|
528
528
|
bt,
|
|
529
529
|
{
|
|
@@ -680,13 +680,13 @@ const Ye = /* @__PURE__ */ r("div")({
|
|
|
680
680
|
name: "Button",
|
|
681
681
|
class: "b1umzux0",
|
|
682
682
|
propsAsIs: !1
|
|
683
|
-
}),
|
|
683
|
+
}), Ln = /* @__PURE__ */ r("span")({
|
|
684
684
|
name: "Title",
|
|
685
685
|
class: "tspsaas",
|
|
686
686
|
propsAsIs: !1
|
|
687
687
|
});
|
|
688
688
|
var W = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(W || {});
|
|
689
|
-
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(bn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(
|
|
689
|
+
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(bn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(Ln, { children: e }) }), En = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(kn, { children: /* @__PURE__ */ m(wn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
690
690
|
/* @__PURE__ */ s(ue, { title: "Home", active: e === "home", onClick: () => t(
|
|
691
691
|
"home"
|
|
692
692
|
/* HOME */
|
|
@@ -936,9 +936,9 @@ function Yn(e) {
|
|
|
936
936
|
}, A.componentWillUnmount = function() {
|
|
937
937
|
this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
|
|
938
938
|
}, A.render = function() {
|
|
939
|
-
var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, x = a.itemCount, j = a.itemData, C = a.itemKey, Q = C === void 0 ? qn : C, U = a.layout, je = a.outerElementType, Ce = a.outerTagName, ke = a.style, we = a.useIsScrolling, be = a.width, ne = this.state.isScrolling, B = g === "horizontal" || U === "horizontal",
|
|
939
|
+
var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, x = a.itemCount, j = a.itemData, C = a.itemKey, Q = C === void 0 ? qn : C, U = a.layout, je = a.outerElementType, Ce = a.outerTagName, ke = a.style, we = a.useIsScrolling, be = a.width, ne = this.state.isScrolling, B = g === "horizontal" || U === "horizontal", Le = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], $e = se[1], ie = [];
|
|
940
940
|
if (x > 0)
|
|
941
|
-
for (var $ =
|
|
941
|
+
for (var $ = Ee; $ <= $e; $++)
|
|
942
942
|
ie.push(H(l, {
|
|
943
943
|
data: j,
|
|
944
944
|
key: Q($, j),
|
|
@@ -949,7 +949,7 @@ function Yn(e) {
|
|
|
949
949
|
var oe = i(this.props, this._instanceProps);
|
|
950
950
|
return H(je || Ce || "div", {
|
|
951
951
|
className: d,
|
|
952
|
-
onScroll:
|
|
952
|
+
onScroll: Le,
|
|
953
953
|
ref: this._outerRefSetter,
|
|
954
954
|
style: X({
|
|
955
955
|
position: "relative",
|
|
@@ -1255,11 +1255,11 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1255
1255
|
) })
|
|
1256
1256
|
}
|
|
1257
1257
|
) }), ds = ({ deepLink: e }) => {
|
|
1258
|
-
const { data: t } = k(e.$store);
|
|
1258
|
+
const { data: t } = k(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
|
|
1259
1259
|
return /* @__PURE__ */ s(
|
|
1260
1260
|
Ue,
|
|
1261
1261
|
{
|
|
1262
|
-
inviteLink:
|
|
1262
|
+
inviteLink: n || i,
|
|
1263
1263
|
socialLinks: [
|
|
1264
1264
|
{
|
|
1265
1265
|
icon: "icon-facebook",
|
|
@@ -1351,7 +1351,7 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1351
1351
|
),
|
|
1352
1352
|
/* @__PURE__ */ m(vs, { children: [
|
|
1353
1353
|
I.label,
|
|
1354
|
-
t === z.TRIVIA && n ===
|
|
1354
|
+
t === z.TRIVIA && n === L.RESOLVED && " • Expired"
|
|
1355
1355
|
] })
|
|
1356
1356
|
] }),
|
|
1357
1357
|
/* @__PURE__ */ s(Is, { children: i || "" })
|
|
@@ -1410,7 +1410,7 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1410
1410
|
style: {
|
|
1411
1411
|
paddingBottom: "4px"
|
|
1412
1412
|
},
|
|
1413
|
-
children: /* @__PURE__ */ s(
|
|
1413
|
+
children: /* @__PURE__ */ s(En, {
|
|
1414
1414
|
activePage: t,
|
|
1415
1415
|
toggleActivePage: n
|
|
1416
1416
|
})
|
|
@@ -1443,7 +1443,7 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1443
1443
|
name: "UserContainer",
|
|
1444
1444
|
class: "u14zaal4",
|
|
1445
1445
|
propsAsIs: !1
|
|
1446
|
-
}),
|
|
1446
|
+
}), Ls = ({
|
|
1447
1447
|
correct: e,
|
|
1448
1448
|
incorrect: t
|
|
1449
1449
|
}) => {
|
|
@@ -1469,7 +1469,7 @@ const Kn = /* @__PURE__ */ r("div")({
|
|
|
1469
1469
|
}), /* @__PURE__ */ s(K, {
|
|
1470
1470
|
children: /* @__PURE__ */ s(ze, {
|
|
1471
1471
|
...i,
|
|
1472
|
-
successRate:
|
|
1472
|
+
successRate: Ls(i)
|
|
1473
1473
|
})
|
|
1474
1474
|
})]
|
|
1475
1475
|
})
|
package/lib/es/masters2.js
CHANGED
|
@@ -172,11 +172,11 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
172
172
|
name: "InsightContent",
|
|
173
173
|
class: "i1qne9g6",
|
|
174
174
|
propsAsIs: !1
|
|
175
|
-
}),
|
|
175
|
+
}), vr = /* @__PURE__ */ h("h3")({
|
|
176
176
|
name: "Title",
|
|
177
177
|
class: "ttpr98r",
|
|
178
178
|
propsAsIs: !1
|
|
179
|
-
}),
|
|
179
|
+
}), Br = /* @__PURE__ */ h("div")({
|
|
180
180
|
name: "Description",
|
|
181
181
|
class: "d17iaqp8",
|
|
182
182
|
propsAsIs: !1
|
|
@@ -194,8 +194,8 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
194
194
|
(s == null ? void 0 : s.url) && /* @__PURE__ */ l(Ar, { source: s.url, poster: s.thumbnailUrl }),
|
|
195
195
|
n && /* @__PURE__ */ l(br, { src: n }),
|
|
196
196
|
/* @__PURE__ */ I(Er, { children: [
|
|
197
|
-
/* @__PURE__ */ l(
|
|
198
|
-
/* @__PURE__ */ l(
|
|
197
|
+
/* @__PURE__ */ l(vr, { children: c }),
|
|
198
|
+
/* @__PURE__ */ l(Br, { children: d }),
|
|
199
199
|
m && /* @__PURE__ */ l(_r, { onClick: m, children: "View Insight" })
|
|
200
200
|
] })
|
|
201
201
|
] }), ne = /* @__PURE__ */ h("div")({
|
|
@@ -325,7 +325,7 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
325
325
|
name: "AnswerText",
|
|
326
326
|
class: "a51sv9d",
|
|
327
327
|
propsAsIs: !1
|
|
328
|
-
}), Zr = () => z,
|
|
328
|
+
}), Zr = () => z, Be = /* @__PURE__ */ h(Zr())({
|
|
329
329
|
name: "FeedbackIcon",
|
|
330
330
|
class: "f1lbk2ye",
|
|
331
331
|
propsAsIs: !0
|
|
@@ -371,7 +371,7 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
371
371
|
/* @__PURE__ */ I(se, { "data-color-green": "true", children: [
|
|
372
372
|
/* @__PURE__ */ l(oe, { children: "Congratulations! You answered correctly." }),
|
|
373
373
|
/* @__PURE__ */ I(fe, { children: [
|
|
374
|
-
/* @__PURE__ */ l(
|
|
374
|
+
/* @__PURE__ */ l(Be, { name: "selected" }),
|
|
375
375
|
"Your Pick: ",
|
|
376
376
|
/* @__PURE__ */ l(ye, { children: n == null ? void 0 : n.title })
|
|
377
377
|
] })
|
|
@@ -384,7 +384,7 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
384
384
|
" points"
|
|
385
385
|
] }),
|
|
386
386
|
/* @__PURE__ */ I(fe, { children: [
|
|
387
|
-
/* @__PURE__ */ l(
|
|
387
|
+
/* @__PURE__ */ l(Be, { name: "selected" }),
|
|
388
388
|
"Your Pick: ",
|
|
389
389
|
/* @__PURE__ */ l(ye, { children: n == null ? void 0 : n.title })
|
|
390
390
|
] })
|
|
@@ -397,7 +397,7 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
397
397
|
"."
|
|
398
398
|
] }),
|
|
399
399
|
/* @__PURE__ */ I(fe, { "data-incorrect": "true", children: [
|
|
400
|
-
/* @__PURE__ */ l(
|
|
400
|
+
/* @__PURE__ */ l(Be, { name: "circleClose" }),
|
|
401
401
|
"Your Pick: ",
|
|
402
402
|
/* @__PURE__ */ l(ye, { children: n == null ? void 0 : n.title })
|
|
403
403
|
] })
|
|
@@ -490,11 +490,11 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
490
490
|
name: "Details",
|
|
491
491
|
class: "d1s19yop",
|
|
492
492
|
propsAsIs: !1
|
|
493
|
-
}),
|
|
493
|
+
}), vi = /* @__PURE__ */ h("div")({
|
|
494
494
|
name: "QuoteWrap",
|
|
495
495
|
class: "q1qyx94r",
|
|
496
496
|
propsAsIs: !1
|
|
497
|
-
}),
|
|
497
|
+
}), Bi = /* @__PURE__ */ h("blockquote")({
|
|
498
498
|
name: "Quote",
|
|
499
499
|
class: "qs97clu",
|
|
500
500
|
propsAsIs: !1
|
|
@@ -505,7 +505,7 @@ const Kt = ({ feature: s, sdk: n, children: c, className: d }) => {
|
|
|
505
505
|
title: d,
|
|
506
506
|
action: m
|
|
507
507
|
}) => /* @__PURE__ */ I(Ii, { children: [
|
|
508
|
-
/* @__PURE__ */ l(
|
|
508
|
+
/* @__PURE__ */ l(vi, { children: /* @__PURE__ */ l(Bi, { children: d }) }),
|
|
509
509
|
/* @__PURE__ */ I(Ei, { children: [
|
|
510
510
|
/* @__PURE__ */ l(wi, { ...s }),
|
|
511
511
|
/* @__PURE__ */ l(xi, { children: n }),
|
|
@@ -593,27 +593,27 @@ function Ri(s) {
|
|
|
593
593
|
var Ue = {};
|
|
594
594
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
595
595
|
Ue.read = function(s, n, c, d, m) {
|
|
596
|
-
var g, f, o = m * 8 - d - 1, w = (1 << o) - 1,
|
|
596
|
+
var g, f, o = m * 8 - d - 1, w = (1 << o) - 1, B = w >> 1, E = -7, C = c ? m - 1 : 0, y = c ? -1 : 1, A = s[n + C];
|
|
597
597
|
for (C += y, g = A & (1 << -E) - 1, A >>= -E, E += o; E > 0; g = g * 256 + s[n + C], C += y, E -= 8)
|
|
598
598
|
;
|
|
599
599
|
for (f = g & (1 << -E) - 1, g >>= -E, E += d; E > 0; f = f * 256 + s[n + C], C += y, E -= 8)
|
|
600
600
|
;
|
|
601
601
|
if (g === 0)
|
|
602
|
-
g = 1 -
|
|
602
|
+
g = 1 - B;
|
|
603
603
|
else {
|
|
604
604
|
if (g === w)
|
|
605
605
|
return f ? NaN : (A ? -1 : 1) * (1 / 0);
|
|
606
|
-
f = f + Math.pow(2, d), g = g -
|
|
606
|
+
f = f + Math.pow(2, d), g = g - B;
|
|
607
607
|
}
|
|
608
608
|
return (A ? -1 : 1) * f * Math.pow(2, g - d);
|
|
609
609
|
};
|
|
610
610
|
Ue.write = function(s, n, c, d, m, g) {
|
|
611
|
-
var f, o, w,
|
|
611
|
+
var f, o, w, B = g * 8 - m - 1, E = (1 << B) - 1, C = E >> 1, y = m === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, A = d ? 0 : g - 1, x = d ? 1 : -1, v = n < 0 || n === 0 && 1 / n < 0 ? 1 : 0;
|
|
612
612
|
for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (o = isNaN(n) ? 1 : 0, f = E) : (f = Math.floor(Math.log(n) / Math.LN2), n * (w = Math.pow(2, -f)) < 1 && (f--, w *= 2), f + C >= 1 ? n += y / w : n += y * Math.pow(2, 1 - C), n * w >= 2 && (f++, w /= 2), f + C >= E ? (o = 0, f = E) : f + C >= 1 ? (o = (n * w - 1) * Math.pow(2, m), f = f + C) : (o = n * Math.pow(2, C - 1) * Math.pow(2, m), f = 0)); m >= 8; s[c + A] = o & 255, A += x, o /= 256, m -= 8)
|
|
613
613
|
;
|
|
614
|
-
for (f = f << m | o,
|
|
614
|
+
for (f = f << m | o, B += m; B > 0; s[c + A] = f & 255, A += x, f /= 256, B -= 8)
|
|
615
615
|
;
|
|
616
|
-
s[c + A - x] |=
|
|
616
|
+
s[c + A - x] |= v * 128;
|
|
617
617
|
};
|
|
618
618
|
/*!
|
|
619
619
|
* The buffer module from node.js, for the browser.
|
|
@@ -678,7 +678,7 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
678
678
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
|
|
679
679
|
);
|
|
680
680
|
if (W(r, ArrayBuffer) || r && W(r.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (W(r, SharedArrayBuffer) || r && W(r.buffer, SharedArrayBuffer)))
|
|
681
|
-
return
|
|
681
|
+
return v(r, e, t);
|
|
682
682
|
if (typeof r == "number")
|
|
683
683
|
throw new TypeError(
|
|
684
684
|
'The "value" argument must not be of type number. Received type number'
|
|
@@ -698,20 +698,20 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
698
698
|
o.from = function(r, e, t) {
|
|
699
699
|
return w(r, e, t);
|
|
700
700
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
701
|
-
function
|
|
701
|
+
function B(r) {
|
|
702
702
|
if (typeof r != "number")
|
|
703
703
|
throw new TypeError('"size" argument must be of type number');
|
|
704
704
|
if (r < 0)
|
|
705
705
|
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
706
706
|
}
|
|
707
707
|
function E(r, e, t) {
|
|
708
|
-
return
|
|
708
|
+
return B(r), r <= 0 ? f(r) : e !== void 0 ? typeof t == "string" ? f(r).fill(e, t) : f(r).fill(e) : f(r);
|
|
709
709
|
}
|
|
710
710
|
o.alloc = function(r, e, t) {
|
|
711
711
|
return E(r, e, t);
|
|
712
712
|
};
|
|
713
713
|
function C(r) {
|
|
714
|
-
return
|
|
714
|
+
return B(r), f(r < 0 ? 0 : _(r) | 0);
|
|
715
715
|
}
|
|
716
716
|
o.allocUnsafe = function(r) {
|
|
717
717
|
return C(r);
|
|
@@ -735,11 +735,11 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
735
735
|
function x(r) {
|
|
736
736
|
if (W(r, Uint8Array)) {
|
|
737
737
|
const e = new Uint8Array(r);
|
|
738
|
-
return
|
|
738
|
+
return v(e.buffer, e.byteOffset, e.byteLength);
|
|
739
739
|
}
|
|
740
740
|
return A(r);
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function v(r, e, t) {
|
|
743
743
|
if (e < 0 || r.byteLength < e)
|
|
744
744
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
745
745
|
if (r.byteLength < e + (t || 0))
|
|
@@ -753,7 +753,7 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
753
753
|
return t.length === 0 || r.copy(t, 0, 0, e), t;
|
|
754
754
|
}
|
|
755
755
|
if (r.length !== void 0)
|
|
756
|
-
return typeof r.length != "number" ||
|
|
756
|
+
return typeof r.length != "number" || ve(r.length) ? f(0) : A(r);
|
|
757
757
|
if (r.type === "Buffer" && Array.isArray(r.data))
|
|
758
758
|
return A(r.data);
|
|
759
759
|
}
|
|
@@ -956,7 +956,7 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
956
956
|
function ze(r, e, t, i, a) {
|
|
957
957
|
if (r.length === 0)
|
|
958
958
|
return -1;
|
|
959
|
-
if (typeof t == "string" ? (i = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t,
|
|
959
|
+
if (typeof t == "string" ? (i = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, ve(t) && (t = a ? 0 : r.length - 1), t < 0 && (t = r.length + t), t >= r.length) {
|
|
960
960
|
if (a)
|
|
961
961
|
return -1;
|
|
962
962
|
t = r.length - 1;
|
|
@@ -1019,7 +1019,7 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
1019
1019
|
let p;
|
|
1020
1020
|
for (p = 0; p < i; ++p) {
|
|
1021
1021
|
const b = parseInt(e.substr(p * 2, 2), 16);
|
|
1022
|
-
if (
|
|
1022
|
+
if (ve(b))
|
|
1023
1023
|
return p;
|
|
1024
1024
|
r[t + p] = b;
|
|
1025
1025
|
}
|
|
@@ -1031,10 +1031,10 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
1031
1031
|
function Et(r, e, t, i) {
|
|
1032
1032
|
return ge(Nt(e), r, t, i);
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function vt(r, e, t, i) {
|
|
1035
1035
|
return ge(Ve(e), r, t, i);
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function Bt(r, e, t, i) {
|
|
1038
1038
|
return ge(Ut(e, r.length - t), r, t, i);
|
|
1039
1039
|
}
|
|
1040
1040
|
o.prototype.write = function(e, t, i, a) {
|
|
@@ -1065,12 +1065,12 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
1065
1065
|
case "binary":
|
|
1066
1066
|
return Et(this, e, t, i);
|
|
1067
1067
|
case "base64":
|
|
1068
|
-
return
|
|
1068
|
+
return vt(this, e, t, i);
|
|
1069
1069
|
case "ucs2":
|
|
1070
1070
|
case "ucs-2":
|
|
1071
1071
|
case "utf16le":
|
|
1072
1072
|
case "utf-16le":
|
|
1073
|
-
return
|
|
1073
|
+
return Bt(this, e, t, i);
|
|
1074
1074
|
default:
|
|
1075
1075
|
if (p)
|
|
1076
1076
|
throw new TypeError("Unknown encoding: " + a);
|
|
@@ -1572,7 +1572,7 @@ Ue.write = function(s, n, c, d, m, g) {
|
|
|
1572
1572
|
function W(r, e) {
|
|
1573
1573
|
return r instanceof e || r != null && r.constructor != null && r.constructor.name != null && r.constructor.name === e.name;
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function ve(r) {
|
|
1576
1576
|
return r !== r;
|
|
1577
1577
|
}
|
|
1578
1578
|
const zt = function() {
|
|
@@ -1745,23 +1745,23 @@ function Oi(s) {
|
|
|
1745
1745
|
let y = !1, A = "";
|
|
1746
1746
|
d = "animationstart";
|
|
1747
1747
|
const x = "Webkit Moz O ms".split(" ");
|
|
1748
|
-
let
|
|
1748
|
+
let v = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), R = "";
|
|
1749
1749
|
{
|
|
1750
1750
|
const _ = document.createElement("fakeelement");
|
|
1751
1751
|
if (_.style.animationName !== void 0 && (y = !0), y === !1) {
|
|
1752
1752
|
for (let F = 0; F < x.length; F++)
|
|
1753
1753
|
if (_.style[x[F] + "AnimationName"] !== void 0) {
|
|
1754
|
-
R = x[F], A = "-" + R.toLowerCase() + "-", d =
|
|
1754
|
+
R = x[F], A = "-" + R.toLowerCase() + "-", d = v[F], y = !0;
|
|
1755
1755
|
break;
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
1758
|
}
|
|
1759
1759
|
c = "resizeanim", n = "@" + A + "keyframes " + c + " { from { opacity: 0; } to { opacity: 0; } } ", m = A + "animation: 1ms " + c + "; ";
|
|
1760
1760
|
}
|
|
1761
|
-
const
|
|
1761
|
+
const B = function(y) {
|
|
1762
1762
|
if (!y.getElementById("detectElementResize")) {
|
|
1763
|
-
const A = (n || "") + ".resize-triggers { " + (m || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', x = y.head || y.getElementsByTagName("head")[0],
|
|
1764
|
-
|
|
1763
|
+
const A = (n || "") + ".resize-triggers { " + (m || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', x = y.head || y.getElementsByTagName("head")[0], v = y.createElement("style");
|
|
1764
|
+
v.id = "detectElementResize", v.type = "text/css", s != null && v.setAttribute("nonce", s), v.styleSheet ? v.styleSheet.cssText = A : v.appendChild(y.createTextNode(A)), x.appendChild(v);
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
return {
|
|
@@ -1770,8 +1770,8 @@ function Oi(s) {
|
|
|
1770
1770
|
y.attachEvent("onresize", A);
|
|
1771
1771
|
else {
|
|
1772
1772
|
if (!y.__resizeTriggers__) {
|
|
1773
|
-
const x = y.ownerDocument,
|
|
1774
|
-
|
|
1773
|
+
const x = y.ownerDocument, v = G.getComputedStyle(y);
|
|
1774
|
+
v && v.position === "static" && (y.style.position = "relative"), B(x), y.__resizeLast__ = {}, y.__resizeListeners__ = [], (y.__resizeTriggers__ = x.createElement("div")).className = "resize-triggers";
|
|
1775
1775
|
const R = x.createElement("div");
|
|
1776
1776
|
R.className = "expand-trigger", R.appendChild(x.createElement("div"));
|
|
1777
1777
|
const _ = x.createElement("div");
|
|
@@ -1811,15 +1811,15 @@ class Di extends jt {
|
|
|
1811
1811
|
} = this.props;
|
|
1812
1812
|
if (this._parentNode) {
|
|
1813
1813
|
var g, f, o, w;
|
|
1814
|
-
const
|
|
1815
|
-
(!c && (this.state.height !== _ || this.state.scaledHeight !==
|
|
1814
|
+
const B = window.getComputedStyle(this._parentNode) || {}, E = parseFloat((g = B.paddingLeft) !== null && g !== void 0 ? g : "0"), C = parseFloat((f = B.paddingRight) !== null && f !== void 0 ? f : "0"), y = parseFloat((o = B.paddingTop) !== null && o !== void 0 ? o : "0"), A = parseFloat((w = B.paddingBottom) !== null && w !== void 0 ? w : "0"), x = this._parentNode.getBoundingClientRect(), v = x.height - y - A, R = x.width - E - C, _ = this._parentNode.offsetHeight - y - A, F = this._parentNode.offsetWidth - E - C;
|
|
1815
|
+
(!c && (this.state.height !== _ || this.state.scaledHeight !== v) || !d && (this.state.width !== F || this.state.scaledWidth !== R)) && (this.setState({
|
|
1816
1816
|
height: _,
|
|
1817
1817
|
width: F,
|
|
1818
|
-
scaledHeight:
|
|
1818
|
+
scaledHeight: v,
|
|
1819
1819
|
scaledWidth: R
|
|
1820
1820
|
}), typeof m == "function" && m({
|
|
1821
1821
|
height: _,
|
|
1822
|
-
scaledHeight:
|
|
1822
|
+
scaledHeight: v,
|
|
1823
1823
|
scaledWidth: R,
|
|
1824
1824
|
width: F
|
|
1825
1825
|
}));
|
|
@@ -1849,21 +1849,21 @@ class Di extends jt {
|
|
|
1849
1849
|
nonce: f,
|
|
1850
1850
|
onResize: o,
|
|
1851
1851
|
style: w = {},
|
|
1852
|
-
tagName:
|
|
1852
|
+
tagName: B = "div",
|
|
1853
1853
|
...E
|
|
1854
1854
|
} = this.props, {
|
|
1855
1855
|
height: C,
|
|
1856
1856
|
scaledHeight: y,
|
|
1857
1857
|
scaledWidth: A,
|
|
1858
1858
|
width: x
|
|
1859
|
-
} = this.state,
|
|
1859
|
+
} = this.state, v = {
|
|
1860
1860
|
overflow: "visible"
|
|
1861
1861
|
}, R = {};
|
|
1862
1862
|
let _ = !1;
|
|
1863
|
-
return m || (C === 0 && (_ = !0),
|
|
1863
|
+
return m || (C === 0 && (_ = !0), v.height = 0, R.height = C, R.scaledHeight = y), g || (x === 0 && (_ = !0), v.width = 0, R.width = x, R.scaledWidth = A), Ht(B, {
|
|
1864
1864
|
ref: this._setRef,
|
|
1865
1865
|
style: {
|
|
1866
|
-
...
|
|
1866
|
+
...v,
|
|
1867
1867
|
...w
|
|
1868
1868
|
},
|
|
1869
1869
|
...E
|
|
@@ -2046,11 +2046,11 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2046
2046
|
name: "Container",
|
|
2047
2047
|
class: "c18uddbs",
|
|
2048
2048
|
propsAsIs: !1
|
|
2049
|
-
}),
|
|
2049
|
+
}), vn = /* @__PURE__ */ h("div")({
|
|
2050
2050
|
name: "Content",
|
|
2051
2051
|
class: "cvcfjf6",
|
|
2052
2052
|
propsAsIs: !1
|
|
2053
|
-
}),
|
|
2053
|
+
}), Bn = /* @__PURE__ */ h("div")({
|
|
2054
2054
|
name: "OnboardingHeader",
|
|
2055
2055
|
class: "o1ie27lw",
|
|
2056
2056
|
propsAsIs: !1
|
|
@@ -2084,22 +2084,22 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2084
2084
|
inviteLink: f,
|
|
2085
2085
|
socialLinks: o,
|
|
2086
2086
|
inviteCardTitle: w,
|
|
2087
|
-
inviteCardSubtext:
|
|
2087
|
+
inviteCardSubtext: B,
|
|
2088
2088
|
inviteCardBtnLabel: E,
|
|
2089
2089
|
onClose: C
|
|
2090
2090
|
}) => {
|
|
2091
|
-
const [y, A] = V(0), [x,
|
|
2091
|
+
const [y, A] = V(0), [x, v] = V(ce);
|
|
2092
2092
|
he(() => {
|
|
2093
|
-
n != null && n.length ?
|
|
2093
|
+
n != null && n.length ? v({ ...ce, steps: !0 }) : c != null && c.length ? v({ ...ce, rules: !0 }) : v({ ...ce, inviteCard: !0 });
|
|
2094
2094
|
}, []);
|
|
2095
2095
|
const R = Le(() => x.steps && y === 0 ? "Continue" : x.rules ? d || "Got it" : x.inviteCard ? E || "Play Now" : "Next", [x, y, d, E]), _ = pt(() => {
|
|
2096
|
-
n != null && n.length && y < n.length - 1 ? A((U) => ++U) : c != null && c.length && x.steps ?
|
|
2097
|
-
}, [y, n == null ? void 0 : n.length, c == null ? void 0 : c.length, x, A,
|
|
2096
|
+
n != null && n.length && y < n.length - 1 ? A((U) => ++U) : c != null && c.length && x.steps ? v({ ...ce, rules: !0 }) : x.rules && v({ ...ce, inviteCard: !0 });
|
|
2097
|
+
}, [y, n == null ? void 0 : n.length, c == null ? void 0 : c.length, x, A, v]), F = async () => {
|
|
2098
2098
|
await s.onboardingStatus.submitInplay();
|
|
2099
2099
|
};
|
|
2100
2100
|
return /* @__PURE__ */ l(Di, { children: ({ width: U, height: K }) => /* @__PURE__ */ I(En, { style: { width: U, height: K }, children: [
|
|
2101
|
-
/* @__PURE__ */ l(
|
|
2102
|
-
/* @__PURE__ */ I(
|
|
2101
|
+
/* @__PURE__ */ l(Bn, { children: /* @__PURE__ */ l(_n, { onClick: C, children: /* @__PURE__ */ l(Tn, { name: "icon-close-btn-gray" }) }) }),
|
|
2102
|
+
/* @__PURE__ */ I(vn, { children: [
|
|
2103
2103
|
x.steps && (n == null ? void 0 : n.length) && /* @__PURE__ */ l(Hi, { stepsCount: n.length, currentStep: y, ...n[y] }),
|
|
2104
2104
|
x.rules && /* @__PURE__ */ l(In, { rules: c, rulesTitle: m, primaryColor: g }),
|
|
2105
2105
|
x.inviteCard && /* @__PURE__ */ l(
|
|
@@ -2107,7 +2107,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2107
2107
|
{
|
|
2108
2108
|
inviteLink: f,
|
|
2109
2109
|
inviteCardTitle: w,
|
|
2110
|
-
inviteCardSubtext:
|
|
2110
|
+
inviteCardSubtext: B,
|
|
2111
2111
|
primaryColor: g,
|
|
2112
2112
|
socialLinks: o
|
|
2113
2113
|
}
|
|
@@ -2165,7 +2165,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2165
2165
|
class: "ay8e3j9",
|
|
2166
2166
|
propsAsIs: !1
|
|
2167
2167
|
}), jn = ({ close: s, action: n, onboarding: c }) => {
|
|
2168
|
-
var d, m, g, f, o, w,
|
|
2168
|
+
var d, m, g, f, o, w, B, E;
|
|
2169
2169
|
return /* @__PURE__ */ I(Nn, { children: [
|
|
2170
2170
|
/* @__PURE__ */ l(Un, { onClick: s, children: /* @__PURE__ */ l(On, { name: "icon-cross" }) }),
|
|
2171
2171
|
((m = (d = c == null ? void 0 : c.titleCard) == null ? void 0 : d.media) == null ? void 0 : m.sponsorLogo) && /* @__PURE__ */ I(Dn, { children: [
|
|
@@ -2173,7 +2173,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2173
2173
|
/* @__PURE__ */ l(Mn, { children: "PRESENTS" })
|
|
2174
2174
|
] }),
|
|
2175
2175
|
((o = c == null ? void 0 : c.titleCard) == null ? void 0 : o.title) && /* @__PURE__ */ l(qn, { children: (w = c == null ? void 0 : c.titleCard) == null ? void 0 : w.title }),
|
|
2176
|
-
((
|
|
2176
|
+
((B = c == null ? void 0 : c.titleCard) == null ? void 0 : B.subtitle) && /* @__PURE__ */ l(Gn, { children: (E = c == null ? void 0 : c.titleCard) == null ? void 0 : E.subtitle }),
|
|
2177
2177
|
/* @__PURE__ */ l(Wn, { onClick: n, children: "Play Now" })
|
|
2178
2178
|
] });
|
|
2179
2179
|
}, Hn = () => At, Yn = /* @__PURE__ */ h(Hn())({
|
|
@@ -2188,7 +2188,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2188
2188
|
notification: m,
|
|
2189
2189
|
gamification: g
|
|
2190
2190
|
}) => {
|
|
2191
|
-
var f, o, w,
|
|
2191
|
+
var f, o, w, B, E, C;
|
|
2192
2192
|
const {
|
|
2193
2193
|
data: y
|
|
2194
2194
|
} = Z(n.$store);
|
|
@@ -2227,7 +2227,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2227
2227
|
}],
|
|
2228
2228
|
primaryColor: (w = c.inviteCard) == null ? void 0 : w.iconColor,
|
|
2229
2229
|
inviteLink: y == null ? void 0 : y.url,
|
|
2230
|
-
inviteCardTitle: (
|
|
2230
|
+
inviteCardTitle: (B = c.inviteCard) == null ? void 0 : B.heading,
|
|
2231
2231
|
inviteCardSubtext: (E = c.inviteCard) == null ? void 0 : E.subtext,
|
|
2232
2232
|
inviteCardBtnLabel: (C = c.inviteCard) == null ? void 0 : C.buttonLabel,
|
|
2233
2233
|
onClose: () => {
|
|
@@ -2295,7 +2295,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2295
2295
|
class: "s1oe3036",
|
|
2296
2296
|
propsAsIs: !0
|
|
2297
2297
|
}), is = (s) => {
|
|
2298
|
-
const n = ht(""), [c, d] = V(!1), m = Z(s.status), g = Z(s.userId()), f = m === "ready", [o, w] = V(ee),
|
|
2298
|
+
const n = ht(""), [c, d] = V(!1), m = Z(s.status), g = Z(s.userId()), f = m === "ready", [o, w] = V(ee), B = pt(
|
|
2299
2299
|
(y, A) => {
|
|
2300
2300
|
w(A), A === ee ? (y && s.createEventSession(y), s.openFeature(Re.GAMES)) : s.closeFeature();
|
|
2301
2301
|
},
|
|
@@ -2307,13 +2307,13 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2307
2307
|
const E = (y) => {
|
|
2308
2308
|
n.current = y, s.initializeApp().then(({ enabled: A, err: x }) => {
|
|
2309
2309
|
if (d(!0), x) {
|
|
2310
|
-
|
|
2310
|
+
B(y, le);
|
|
2311
2311
|
return;
|
|
2312
2312
|
}
|
|
2313
2313
|
if (A) {
|
|
2314
|
-
s.isUserAuthorized().then((
|
|
2315
|
-
if (
|
|
2316
|
-
|
|
2314
|
+
s.isUserAuthorized().then((v) => {
|
|
2315
|
+
if (v) {
|
|
2316
|
+
B(y, ee);
|
|
2317
2317
|
return;
|
|
2318
2318
|
} else
|
|
2319
2319
|
s.disableApp();
|
|
@@ -2336,9 +2336,9 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2336
2336
|
sdkEnabled: c,
|
|
2337
2337
|
sdkReady: f,
|
|
2338
2338
|
activeOverlay: o,
|
|
2339
|
-
activateAndLoadOverlay:
|
|
2340
|
-
|
|
2341
|
-
|
|
2339
|
+
activateAndLoadOverlay: B,
|
|
2340
|
+
activateEventWithId: E,
|
|
2341
|
+
deactivate: C,
|
|
2342
2342
|
isLogged: !!g
|
|
2343
2343
|
};
|
|
2344
2344
|
}, ns = (s) => {
|
|
@@ -2362,7 +2362,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2362
2362
|
const [, c] = ns(s);
|
|
2363
2363
|
return /* @__PURE__ */ l(Xt, { className: n, feature: c, sdk: s });
|
|
2364
2364
|
}, os = ({ sdk: s, overlays: n, children: c }) => {
|
|
2365
|
-
const { sdkEnabled: d, sdkReady: m, activeOverlay: g, activateAndLoadOverlay: f,
|
|
2365
|
+
const { sdkEnabled: d, sdkReady: m, activeOverlay: g, activateAndLoadOverlay: f, activateEventWithId: o, deactivate: w, isLogged: B } = is(s);
|
|
2366
2366
|
return he(() => {
|
|
2367
2367
|
import("./gamification-feature.js");
|
|
2368
2368
|
}, []), /* @__PURE__ */ I(es, { children: [
|
|
@@ -2381,7 +2381,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2381
2381
|
{
|
|
2382
2382
|
"data-nav": d.toString(),
|
|
2383
2383
|
style: { display: !d || g === le ? "block" : "none" },
|
|
2384
|
-
children: c && c({
|
|
2384
|
+
children: c && c({ activateEventWithId: o, deactivate: w })
|
|
2385
2385
|
}
|
|
2386
2386
|
),
|
|
2387
2387
|
/* @__PURE__ */ l(
|
|
@@ -2393,7 +2393,7 @@ const Pi = /* @__PURE__ */ h("div")({
|
|
|
2393
2393
|
}
|
|
2394
2394
|
),
|
|
2395
2395
|
m && g === ee && /* @__PURE__ */ l(ss, { className: Ke, sdk: s }),
|
|
2396
|
-
!
|
|
2396
|
+
!B && /* @__PURE__ */ l("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
|
|
2397
2397
|
] });
|
|
2398
2398
|
};
|
|
2399
2399
|
const ys = ({
|