@halibegic/react-video-player 0.0.56 → 0.0.57
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
1
|
+
var qn = Object.defineProperty, Yn = Object.defineProperties;
|
|
2
2
|
var Zn = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Pe = Object.getOwnPropertySymbols;
|
|
4
4
|
var xt = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var Tt = (e, t, n) => t in e ?
|
|
5
|
+
var Tt = (e, t, n) => t in e ? qn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, M = (e, t) => {
|
|
6
6
|
for (var n in t || (t = {}))
|
|
7
7
|
xt.call(t, n) && Tt(e, n, t[n]);
|
|
8
8
|
if (Pe)
|
|
@@ -116,7 +116,7 @@ function $(e) {
|
|
|
116
116
|
if (!(this instanceof $))
|
|
117
117
|
throw new TypeError("Promises must be constructed via new");
|
|
118
118
|
if (typeof e != "function") throw new TypeError("not a function");
|
|
119
|
-
this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [],
|
|
119
|
+
this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], zt(e, this);
|
|
120
120
|
}
|
|
121
121
|
function Wt(e, t) {
|
|
122
122
|
for (; e._state === 3; )
|
|
@@ -151,7 +151,7 @@ function Ge(e, t) {
|
|
|
151
151
|
e._state = 3, e._value = t, Xe(e);
|
|
152
152
|
return;
|
|
153
153
|
} else if (typeof n == "function") {
|
|
154
|
-
|
|
154
|
+
zt(Qn(n, t), e);
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -174,7 +174,7 @@ function Xe(e) {
|
|
|
174
174
|
function er(e, t, n) {
|
|
175
175
|
this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.promise = n;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function zt(e, t) {
|
|
178
178
|
var n = !1;
|
|
179
179
|
try {
|
|
180
180
|
e(
|
|
@@ -507,18 +507,18 @@ function nr() {
|
|
|
507
507
|
if (Q && T && typeof Q.stack == "string") {
|
|
508
508
|
for (var C = Q.stack.split(`
|
|
509
509
|
`), X = T.stack.split(`
|
|
510
|
-
`), W = C.length - 1,
|
|
511
|
-
|
|
512
|
-
for (; W >= 1 &&
|
|
513
|
-
if (C[W] !== X[
|
|
514
|
-
if (W !== 1 ||
|
|
510
|
+
`), W = C.length - 1, z = X.length - 1; W >= 1 && z >= 0 && C[W] !== X[z]; )
|
|
511
|
+
z--;
|
|
512
|
+
for (; W >= 1 && z >= 0; W--, z--)
|
|
513
|
+
if (C[W] !== X[z]) {
|
|
514
|
+
if (W !== 1 || z !== 1)
|
|
515
515
|
do
|
|
516
|
-
if (W--,
|
|
516
|
+
if (W--, z--, z < 0 || C[W] !== X[z]) {
|
|
517
517
|
var te = `
|
|
518
518
|
` + C[W].replace(" at new ", " at ");
|
|
519
519
|
return o.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", o.displayName)), typeof o == "function" && Re.set(o, te), te;
|
|
520
520
|
}
|
|
521
|
-
while (W >= 1 &&
|
|
521
|
+
while (W >= 1 && z >= 0);
|
|
522
522
|
break;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
@@ -703,8 +703,8 @@ function nr() {
|
|
|
703
703
|
P[N] === void 0 && (P[N] = W[N]);
|
|
704
704
|
}
|
|
705
705
|
if (C || X) {
|
|
706
|
-
var
|
|
707
|
-
C && kn(P,
|
|
706
|
+
var z = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
707
|
+
C && kn(P, z), X && Dn(P, z);
|
|
708
708
|
}
|
|
709
709
|
return Nn(o, C, X, I, T, dt.current, P);
|
|
710
710
|
}
|
|
@@ -719,7 +719,7 @@ function nr() {
|
|
|
719
719
|
}
|
|
720
720
|
var We;
|
|
721
721
|
We = !1;
|
|
722
|
-
function
|
|
722
|
+
function ze(o) {
|
|
723
723
|
return typeof o == "object" && o !== null && o.$$typeof === t;
|
|
724
724
|
}
|
|
725
725
|
function vt() {
|
|
@@ -770,15 +770,15 @@ Check the top-level render call using <` + p + ">.");
|
|
|
770
770
|
if (Ue(o))
|
|
771
771
|
for (var p = 0; p < o.length; p++) {
|
|
772
772
|
var T = o[p];
|
|
773
|
-
|
|
773
|
+
ze(T) && yt(T, h);
|
|
774
774
|
}
|
|
775
|
-
else if (
|
|
775
|
+
else if (ze(o))
|
|
776
776
|
o._store && (o._store.validated = !0);
|
|
777
777
|
else if (o) {
|
|
778
778
|
var I = R(o);
|
|
779
779
|
if (typeof I == "function" && I !== o.entries)
|
|
780
780
|
for (var N = I.call(o), P; !(P = N.next()).done; )
|
|
781
|
-
|
|
781
|
+
ze(P.value) && yt(P.value, h);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
}
|
|
@@ -831,9 +831,9 @@ Check the top-level render call using <` + p + ">.");
|
|
|
831
831
|
var W;
|
|
832
832
|
o === null ? W = "null" : Ue(o) ? W = "array" : o !== void 0 && o.$$typeof === t ? (W = "<" + (Y(o.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : W = typeof o, L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, C);
|
|
833
833
|
}
|
|
834
|
-
var
|
|
835
|
-
if (
|
|
836
|
-
return
|
|
834
|
+
var z = Mn(o, h, p, I, N);
|
|
835
|
+
if (z == null)
|
|
836
|
+
return z;
|
|
837
837
|
if (P) {
|
|
838
838
|
var te = h.children;
|
|
839
839
|
if (te !== void 0)
|
|
@@ -848,20 +848,20 @@ Check the top-level render call using <` + p + ">.");
|
|
|
848
848
|
gt(te, o);
|
|
849
849
|
}
|
|
850
850
|
if (ye.call(h, "key")) {
|
|
851
|
-
var ce = Y(o), Q = Object.keys(h).filter(function(
|
|
852
|
-
return
|
|
853
|
-
}),
|
|
854
|
-
if (!wt[ce +
|
|
851
|
+
var ce = Y(o), Q = Object.keys(h).filter(function(zn) {
|
|
852
|
+
return zn !== "key";
|
|
853
|
+
}), qe = Q.length > 0 ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
854
|
+
if (!wt[ce + qe]) {
|
|
855
855
|
var Wn = Q.length > 0 ? "{" + Q.join(": ..., ") + ": ...}" : "{}";
|
|
856
856
|
L(`A props object containing a "key" prop is being spread into JSX:
|
|
857
857
|
let props = %s;
|
|
858
858
|
<%s {...props} />
|
|
859
859
|
React keys must be passed directly to JSX without using spread:
|
|
860
860
|
let props = %s;
|
|
861
|
-
<%s key={someKey} {...props} />`,
|
|
861
|
+
<%s key={someKey} {...props} />`, qe, ce, Wn, ce), wt[ce + qe] = !0;
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
return o === r ? On(
|
|
864
|
+
return o === r ? On(z) : An(z), z;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
function Hn(o, h, p) {
|
|
@@ -879,10 +879,10 @@ function rr() {
|
|
|
879
879
|
return St || (St = 1, process.env.NODE_ENV === "production" ? Ie.exports = tr() : Ie.exports = nr()), Ie.exports;
|
|
880
880
|
}
|
|
881
881
|
var s = rr();
|
|
882
|
-
const
|
|
882
|
+
const qt = typeof window != "undefined" ? Kn : V;
|
|
883
883
|
function Ce(e, t) {
|
|
884
884
|
const n = O(e);
|
|
885
|
-
|
|
885
|
+
qt(() => {
|
|
886
886
|
n.current = e;
|
|
887
887
|
}, [e]), V(() => {
|
|
888
888
|
if (t === null)
|
|
@@ -1234,7 +1234,7 @@ const f = (e) => {
|
|
|
1234
1234
|
if (!t)
|
|
1235
1235
|
throw new Error("usePlayerStore must be used within PlayerStoreProvider");
|
|
1236
1236
|
return Vt(t, e);
|
|
1237
|
-
}, Sr = "0.0.
|
|
1237
|
+
}, Sr = "0.0.57", Qe = {
|
|
1238
1238
|
version: Sr
|
|
1239
1239
|
}, Ye = 11e3, Ze = {
|
|
1240
1240
|
DEBUG: 2,
|
|
@@ -1526,7 +1526,7 @@ function Wr({
|
|
|
1526
1526
|
});
|
|
1527
1527
|
}), a;
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1529
|
+
function zr({ callback: e }) {
|
|
1530
1530
|
const t = U((c) => c.delay), n = U((c) => c.startDate), r = n ? n.getTime() : 0, a = f((c) => c.eventEmitter);
|
|
1531
1531
|
return V(() => {
|
|
1532
1532
|
const c = () => e("timeUpdate", {
|
|
@@ -1573,7 +1573,7 @@ function nn() {
|
|
|
1573
1573
|
document.removeEventListener("keydown", u);
|
|
1574
1574
|
}), [u]), null;
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1576
|
+
function qr() {
|
|
1577
1577
|
const e = U((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), r = f((i) => i.getPauseTimeDiff), a = f((i) => i.play), c = U((i) => i.setDelay), u = A(
|
|
1578
1578
|
(i) => {
|
|
1579
1579
|
let l = !1;
|
|
@@ -1822,7 +1822,7 @@ function eo(e, {
|
|
|
1822
1822
|
function u() {
|
|
1823
1823
|
c(r(e));
|
|
1824
1824
|
}
|
|
1825
|
-
return
|
|
1825
|
+
return qt(() => {
|
|
1826
1826
|
if (typeof window == "undefined")
|
|
1827
1827
|
return;
|
|
1828
1828
|
const i = window.matchMedia(e);
|
|
@@ -2225,7 +2225,7 @@ function cn() {
|
|
|
2225
2225
|
}
|
|
2226
2226
|
);
|
|
2227
2227
|
}
|
|
2228
|
-
const Mo = "_playerContainer_146tx_1", Fo = "_controlsTop_146tx_12", Vo = "_controlsBottom_146tx_29", Ao = "_controlsContainer_146tx_45", Oo = "_controlsRow_146tx_61", Ho = "_controlsSection_146tx_68", $o = "_controlsSectionStart_146tx_78", Uo = "_controlsSectionEnd_146tx_82",
|
|
2228
|
+
const Mo = "_playerContainer_146tx_1", Fo = "_controlsTop_146tx_12", Vo = "_controlsBottom_146tx_29", Ao = "_controlsContainer_146tx_45", Oo = "_controlsRow_146tx_61", Ho = "_controlsSection_146tx_68", $o = "_controlsSectionStart_146tx_78", Uo = "_controlsSectionEnd_146tx_82", q = {
|
|
2229
2229
|
playerContainer: Mo,
|
|
2230
2230
|
controlsTop: Fo,
|
|
2231
2231
|
controlsBottom: Vo,
|
|
@@ -2274,9 +2274,9 @@ function un() {
|
|
|
2274
2274
|
c(!0);
|
|
2275
2275
|
}, [c]), /* @__PURE__ */ s.jsx(ae, { onClick: l, children: n ? /* @__PURE__ */ s.jsx(Wo, {}) : /* @__PURE__ */ s.jsx(Bo, {}) });
|
|
2276
2276
|
}
|
|
2277
|
-
const
|
|
2278
|
-
idleCheckContainer:
|
|
2279
|
-
idleCheckContainerIdle:
|
|
2277
|
+
const zo = "_idleCheckContainer_crh2s_1", qo = "_idleCheckContainerIdle_crh2s_5", Yo = "_idleCheckContainerActive_crh2s_11", Ke = {
|
|
2278
|
+
idleCheckContainer: zo,
|
|
2279
|
+
idleCheckContainerIdle: qo,
|
|
2280
2280
|
idleCheckContainerActive: Yo
|
|
2281
2281
|
}, Zo = 5 * 1e3;
|
|
2282
2282
|
function dn({ children: e }) {
|
|
@@ -2343,7 +2343,7 @@ function ti() {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
);
|
|
2345
2345
|
}
|
|
2346
|
-
const ni = "
|
|
2346
|
+
const ni = "_dropdownMenuContent_zi433_1", ri = "_dropdownMenuItem_zi433_77", oi = "_scrollAreaRoot_zi433_120", ii = "_scrollAreaViewport_zi433_127", si = "_scrollAreaScrollbar_zi433_133", ai = "_scrollAreaThumb_zi433_160", ve = {
|
|
2347
2347
|
dropdownMenuContent: ni,
|
|
2348
2348
|
dropdownMenuItem: ri,
|
|
2349
2349
|
scrollAreaRoot: oi,
|
|
@@ -2502,7 +2502,7 @@ function hi({ url: e, messages: t = {}, onEvent: n }) {
|
|
|
2502
2502
|
"div",
|
|
2503
2503
|
{
|
|
2504
2504
|
ref: r,
|
|
2505
|
-
className:
|
|
2505
|
+
className: q.playerContainer,
|
|
2506
2506
|
children: [
|
|
2507
2507
|
/* @__PURE__ */ s.jsxs(
|
|
2508
2508
|
Or,
|
|
@@ -2527,14 +2527,14 @@ function hi({ url: e, messages: t = {}, onEvent: n }) {
|
|
|
2527
2527
|
/* @__PURE__ */ s.jsx(fn, {}),
|
|
2528
2528
|
/* @__PURE__ */ s.jsx(co, {}),
|
|
2529
2529
|
/* @__PURE__ */ s.jsxs(dn, { children: [
|
|
2530
|
-
/* @__PURE__ */ s.jsx("div", { className:
|
|
2531
|
-
/* @__PURE__ */ s.jsx("div", { className:
|
|
2530
|
+
/* @__PURE__ */ s.jsx("div", { className: q.controlsTop, children: /* @__PURE__ */ s.jsx("div", { className: q.controlsContainer, children: /* @__PURE__ */ s.jsx("div", { className: q.controlsRow, children: /* @__PURE__ */ s.jsx(No, {}) }) }) }),
|
|
2531
|
+
/* @__PURE__ */ s.jsx("div", { className: q.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: q.controlsContainer, children: [
|
|
2532
2532
|
/* @__PURE__ */ s.jsx(bo, {}),
|
|
2533
|
-
/* @__PURE__ */ s.jsxs("div", { className:
|
|
2533
|
+
/* @__PURE__ */ s.jsxs("div", { className: q.controlsRow, children: [
|
|
2534
2534
|
/* @__PURE__ */ s.jsxs(
|
|
2535
2535
|
"div",
|
|
2536
2536
|
{
|
|
2537
|
-
className: `${
|
|
2537
|
+
className: `${q.controlsSection} ${q.controlsSectionStart}`,
|
|
2538
2538
|
children: [
|
|
2539
2539
|
/* @__PURE__ */ s.jsx(yo, {}),
|
|
2540
2540
|
/* @__PURE__ */ s.jsx(Lo, {}),
|
|
@@ -2545,7 +2545,7 @@ function hi({ url: e, messages: t = {}, onEvent: n }) {
|
|
|
2545
2545
|
/* @__PURE__ */ s.jsxs(
|
|
2546
2546
|
"div",
|
|
2547
2547
|
{
|
|
2548
|
-
className: `${
|
|
2548
|
+
className: `${q.controlsSection} ${q.controlsSectionEnd}`,
|
|
2549
2549
|
children: [
|
|
2550
2550
|
/* @__PURE__ */ s.jsx(po, { message: t == null ? void 0 : t.live }),
|
|
2551
2551
|
/* @__PURE__ */ s.jsx(yn, {}),
|
|
@@ -2557,12 +2557,12 @@ function hi({ url: e, messages: t = {}, onEvent: n }) {
|
|
|
2557
2557
|
] }) })
|
|
2558
2558
|
] }),
|
|
2559
2559
|
/* @__PURE__ */ s.jsx(Lr, { url: e }),
|
|
2560
|
-
/* @__PURE__ */ s.jsx(
|
|
2560
|
+
/* @__PURE__ */ s.jsx(qr, {}),
|
|
2561
2561
|
/* @__PURE__ */ s.jsx(Jr, { url: e })
|
|
2562
2562
|
]
|
|
2563
2563
|
}
|
|
2564
2564
|
),
|
|
2565
|
-
n && /* @__PURE__ */ s.jsx(
|
|
2565
|
+
n && /* @__PURE__ */ s.jsx(zr, { callback: n })
|
|
2566
2566
|
]
|
|
2567
2567
|
}
|
|
2568
2568
|
);
|
|
@@ -2733,7 +2733,7 @@ function Si({ url: e, messages: t, onEvent: n, startTime: r }) {
|
|
|
2733
2733
|
"div",
|
|
2734
2734
|
{
|
|
2735
2735
|
ref: c,
|
|
2736
|
-
className:
|
|
2736
|
+
className: q.playerContainer,
|
|
2737
2737
|
children: [
|
|
2738
2738
|
/* @__PURE__ */ s.jsx(
|
|
2739
2739
|
on,
|
|
@@ -2748,13 +2748,13 @@ function Si({ url: e, messages: t, onEvent: n, startTime: r }) {
|
|
|
2748
2748
|
/* @__PURE__ */ s.jsx(cn, {}),
|
|
2749
2749
|
/* @__PURE__ */ s.jsx(fn, {}),
|
|
2750
2750
|
/* @__PURE__ */ s.jsx(pi, {}),
|
|
2751
|
-
/* @__PURE__ */ s.jsx(dn, { children: /* @__PURE__ */ s.jsx("div", { className:
|
|
2751
|
+
/* @__PURE__ */ s.jsx(dn, { children: /* @__PURE__ */ s.jsx("div", { className: q.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: q.controlsContainer, children: [
|
|
2752
2752
|
/* @__PURE__ */ s.jsx(gi, {}),
|
|
2753
|
-
/* @__PURE__ */ s.jsxs("div", { className:
|
|
2753
|
+
/* @__PURE__ */ s.jsxs("div", { className: q.controlsRow, children: [
|
|
2754
2754
|
/* @__PURE__ */ s.jsxs(
|
|
2755
2755
|
"div",
|
|
2756
2756
|
{
|
|
2757
|
-
className: `${
|
|
2757
|
+
className: `${q.controlsSection} ${q.controlsSectionStart}`,
|
|
2758
2758
|
children: [
|
|
2759
2759
|
/* @__PURE__ */ s.jsx(yi, {}),
|
|
2760
2760
|
/* @__PURE__ */ s.jsx(gn, {}),
|
|
@@ -2765,7 +2765,7 @@ function Si({ url: e, messages: t, onEvent: n, startTime: r }) {
|
|
|
2765
2765
|
/* @__PURE__ */ s.jsxs(
|
|
2766
2766
|
"div",
|
|
2767
2767
|
{
|
|
2768
|
-
className: `${
|
|
2768
|
+
className: `${q.controlsSection} ${q.controlsSectionEnd}`,
|
|
2769
2769
|
children: [
|
|
2770
2770
|
/* @__PURE__ */ s.jsx(vi, {}),
|
|
2771
2771
|
/* @__PURE__ */ s.jsx(yn, {}),
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(function(k,f){typeof exports=="object"&&typeof module!="undefined"?f(exports,require("react"),require("zustand"),require("mitt"),require("hls.js"),require("@radix-ui/react-slider"),require("@radix-ui/react-popover"),require("@radix-ui/react-scroll-area")):typeof define=="function"&&define.amd?define(["exports","react","zustand","mitt","hls.js","@radix-ui/react-slider","@radix-ui/react-popover","@radix-ui/react-scroll-area"],f):(k=typeof globalThis!="undefined"?globalThis:k||self,f(k.ReactVideoPlayer={},k.React,k.zustand,k.Mitt,k.Hls,k.RadixUISlider,k.RadixUIPopover,k.RadixUIScrollArea))})(this,(function(k,f,Y,te,$,mn,pn,vn){"use strict";var xo=Object.defineProperty,Eo=Object.defineProperties;var Ro=Object.getOwnPropertyDescriptors;var Ve=Object.getOwnPropertySymbols;var fn=Object.prototype.hasOwnProperty,hn=Object.prototype.propertyIsEnumerable;var dn=(k,f,Y)=>f in k?xo(k,f,{enumerable:!0,configurable:!0,writable:!0,value:Y}):k[f]=Y,V=(k,f)=>{for(var Y in f||(f={}))fn.call(f,Y)&&dn(k,Y,f[Y]);if(Ve)for(var Y of Ve(f))hn.call(f,Y)&&dn(k,Y,f[Y]);return k},pe=(k,f)=>Eo(k,Ro(f));var re=(k,f)=>{var Y={};for(var te in k)fn.call(k,te)&&f.indexOf(te)<0&&(Y[te]=k[te]);if(k!=null&&Ve)for(var te of Ve(k))f.indexOf(te)<0&&hn.call(k,te)&&(Y[te]=k[te]);return Y};function Ae(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ee=Ae(mn),ve=Ae(pn),Re=Ae(vn);function nt(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}function rt(e){var t=this;return new t(function(n,r){if(!(e&&typeof e.length!="undefined"))return r(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var a=Array.prototype.slice.call(e);if(a.length===0)return n([]);var l=a.length;function u(c,d){if(d&&(typeof d=="object"||typeof d=="function")){var w=d.then;if(typeof w=="function"){w.call(d,function(_){u(c,_)},function(_){a[c]={status:"rejected",reason:_},--l===0&&n(a)});return}}a[c]={status:"fulfilled",value:d},--l===0&&n(a)}for(var s=0;s<a.length;s++)u(s,a[s])})}function ot(e,t){this.name="AggregateError",this.errors=e,this.message=t||""}ot.prototype=Error.prototype;function st(e){var t=this;return new t(function(n,r){if(!(e&&typeof e.length!="undefined"))return r(new TypeError("Promise.any accepts an array"));var a=Array.prototype.slice.call(e);if(a.length===0)return r();for(var l=[],u=0;u<a.length;u++)try{t.resolve(a[u]).then(n).catch(function(s){l.push(s),l.length===a.length&&r(new ot(l,"All promises were rejected"))})}catch(s){r(s)}})}var yn=setTimeout;function it(e){return!!(e&&typeof e.length!="undefined")}function gn(){}function wn(e,t){return function(){e.apply(t,arguments)}}function O(e){if(!(this instanceof O))throw new TypeError("Promises must be constructed via new");if(typeof e!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],ct(e,this)}function at(e,t){for(;e._state===3;)e=e._value;if(e._state===0){e._deferreds.push(t);return}e._handled=!0,O._immediateFn(function(){var n=e._state===1?t.onFulfilled:t.onRejected;if(n===null){(e._state===1?Oe:ye)(t.promise,e._value);return}var r;try{r=n(e._value)}catch(a){ye(t.promise,a);return}Oe(t.promise,r)})}function Oe(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&(typeof t=="object"||typeof t=="function")){var n=t.then;if(t instanceof O){e._state=3,e._value=t,He(e);return}else if(typeof n=="function"){ct(wn(n,t),e);return}}e._state=1,e._value=t,He(e)}catch(r){ye(e,r)}}function ye(e,t){e._state=2,e._value=t,He(e)}function He(e){e._state===2&&e._deferreds.length===0&&O._immediateFn(function(){e._handled||O._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)at(e,e._deferreds[t]);e._deferreds=null}function Cn(e,t,n){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.promise=n}function ct(e,t){var n=!1;try{e(function(r){n||(n=!0,Oe(t,r))},function(r){n||(n=!0,ye(t,r))})}catch(r){if(n)return;n=!0,ye(t,r)}}O.prototype.catch=function(e){return this.then(null,e)},O.prototype.then=function(e,t){var n=new this.constructor(gn);return at(this,new Cn(e,t,n)),n},O.prototype.finally=nt,O.all=function(e){return new O(function(t,n){if(!it(e))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(e);if(r.length===0)return t([]);var a=r.length;function l(s,c){try{if(c&&(typeof c=="object"||typeof c=="function")){var d=c.then;if(typeof d=="function"){d.call(c,function(w){l(s,w)},n);return}}r[s]=c,--a===0&&t(r)}catch(w){n(w)}}for(var u=0;u<r.length;u++)l(u,r[u])})},O.any=st,O.allSettled=rt,O.resolve=function(e){return e&&typeof e=="object"&&e.constructor===O?e:new O(function(t){t(e)})},O.reject=function(e){return new O(function(t,n){n(e)})},O.race=function(e){return new O(function(t,n){if(!it(e))return n(new TypeError("Promise.race accepts an array"));for(var r=0,a=e.length;r<a;r++)O.resolve(e[r]).then(t,n)})},O._immediateFn=typeof setImmediate=="function"&&function(e){setImmediate(e)}||function(e){yn(e,0)},O._unhandledRejectionFn=function(t){typeof console!="undefined"&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var ce=(function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("unable to locate global object")})();typeof ce.Promise!="function"?ce.Promise=O:(ce.Promise.prototype.finally||(ce.Promise.prototype.finally=nt),ce.Promise.allSettled||(ce.Promise.allSettled=rt),ce.Promise.any||(ce.Promise.any=st));var Se={exports:{}},ge={};var lt;function _n(){if(lt)return ge;lt=1;var e=f,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(s,c,d){var w,_={},g=null,N=null;d!==void 0&&(g=""+d),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(N=c.ref);for(w in c)r.call(c,w)&&!l.hasOwnProperty(w)&&(_[w]=c[w]);if(s&&s.defaultProps)for(w in c=s.defaultProps,c)_[w]===void 0&&(_[w]=c[w]);return{$$typeof:t,type:s,key:g,ref:N,props:_,_owner:a.current}}return ge.Fragment=n,ge.jsx=u,ge.jsxs=u,ge}var we={};var ut;function Tn(){return ut||(ut=1,process.env.NODE_ENV!=="production"&&(function(){var e=f,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),R=Symbol.iterator,x="@@iterator";function S(o){if(o===null||typeof o!="object")return null;var m=R&&o[R]||o[x];return typeof m=="function"?m:null}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(o){{for(var m=arguments.length,y=new Array(m>1?m-1:0),T=1;T<m;T++)y[T-1]=arguments[T];P("error",o,y)}}function P(o,m,y){{var T=C.ReactDebugCurrentFrame,D=T.getStackAddendum();D!==""&&(m+="%s",y=y.concat([D]));var F=y.map(function(L){return String(L)});F.unshift("Warning: "+m),Function.prototype.apply.call(console[o],console,F)}}var B=!1,U=!1,p=!1,v=!1,b=!1,I;I=Symbol.for("react.module.reference");function A(o){return!!(typeof o=="string"||typeof o=="function"||o===r||o===l||b||o===a||o===d||o===w||v||o===N||B||U||p||typeof o=="object"&&o!==null&&(o.$$typeof===g||o.$$typeof===_||o.$$typeof===u||o.$$typeof===s||o.$$typeof===c||o.$$typeof===I||o.getModuleId!==void 0))}function M(o,m,y){var T=o.displayName;if(T)return T;var D=m.displayName||m.name||"";return D!==""?y+"("+D+")":y}function Q(o){return o.displayName||"Context"}function K(o){if(o==null)return null;if(typeof o.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case r:return"Fragment";case n:return"Portal";case l:return"Profiler";case a:return"StrictMode";case d:return"Suspense";case w:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case s:var m=o;return Q(m)+".Consumer";case u:var y=o;return Q(y._context)+".Provider";case c:return M(o,o.render,"ForwardRef");case _:var T=o.displayName||null;return T!==null?T:K(o.type)||"Memo";case g:{var D=o,F=D._payload,L=D._init;try{return K(L(F))}catch(E){return null}}}return null}var G=Object.assign,ie=0,fe,ne,X,Te,Yt,Zt,Kt;function Gt(){}Gt.__reactDisabledLog=!0;function Xr(){{if(ie===0){fe=console.log,ne=console.info,X=console.warn,Te=console.error,Yt=console.group,Zt=console.groupCollapsed,Kt=console.groupEnd;var o={configurable:!0,enumerable:!0,value:Gt,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}ie++}}function Jr(){{if(ie--,ie===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},o,{value:fe}),info:G({},o,{value:ne}),warn:G({},o,{value:X}),error:G({},o,{value:Te}),group:G({},o,{value:Yt}),groupCollapsed:G({},o,{value:Zt}),groupEnd:G({},o,{value:Kt})})}ie<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ge=C.ReactCurrentDispatcher,Xe;function De(o,m,y){{if(Xe===void 0)try{throw Error()}catch(D){var T=D.stack.trim().match(/\n( *(at )?)/);Xe=T&&T[1]||""}return`
|
|
2
2
|
`+Xe+o}}var Je=!1,Ne;{var Qr=typeof WeakMap=="function"?WeakMap:Map;Ne=new Qr}function Xt(o,m){if(!o||Je)return"";{var y=Ne.get(o);if(y!==void 0)return y}var T;Je=!0;var D=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var F;F=Ge.current,Ge.current=null,Xr();try{if(m){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(q){T=q}Reflect.construct(o,[],L)}else{try{L.call()}catch(q){T=q}o.call(L.prototype)}}else{try{throw Error()}catch(q){T=q}o()}}catch(q){if(q&&T&&typeof q.stack=="string"){for(var E=q.stack.split(`
|
|
3
3
|
`),J=T.stack.split(`
|
|
4
|
-
`),
|
|
5
|
-
`+E[
|
|
4
|
+
`),z=E.length-1,W=J.length-1;z>=1&&W>=0&&E[z]!==J[W];)W--;for(;z>=1&&W>=0;z--,W--)if(E[z]!==J[W]){if(z!==1||W!==1)do if(z--,W--,W<0||E[z]!==J[W]){var ee=`
|
|
5
|
+
`+E[z].replace(" at new "," at ");return o.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",o.displayName)),typeof o=="function"&&Ne.set(o,ee),ee}while(z>=1&&W>=0);break}}}finally{Je=!1,Ge.current=F,Jr(),Error.prepareStackTrace=D}var me=o?o.displayName||o.name:"",le=me?De(me):"";return typeof o=="function"&&Ne.set(o,le),le}function qr(o,m,y){return Xt(o,!1)}function $r(o){var m=o.prototype;return!!(m&&m.isReactComponent)}function Me(o,m,y){if(o==null)return"";if(typeof o=="function")return Xt(o,$r(o));if(typeof o=="string")return De(o);switch(o){case d:return De("Suspense");case w:return De("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case c:return qr(o.render);case _:return Me(o.type,m,y);case g:{var T=o,D=T._payload,F=T._init;try{return Me(F(D),m,y)}catch(L){}}}return""}var xe=Object.prototype.hasOwnProperty,Jt={},Qt=C.ReactDebugCurrentFrame;function Fe(o){if(o){var m=o._owner,y=Me(o.type,o._source,m?m.type:null);Qt.setExtraStackFrame(y)}else Qt.setExtraStackFrame(null)}function eo(o,m,y,T,D){{var F=Function.call.bind(xe);for(var L in o)if(F(o,L)){var E=void 0;try{if(typeof o[L]!="function"){var J=Error((T||"React class")+": "+y+" type `"+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[L]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw J.name="Invariant Violation",J}E=o[L](m,L,T,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){E=z}E&&!(E instanceof Error)&&(Fe(D),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",y,L,typeof E),Fe(null)),E instanceof Error&&!(E.message in Jt)&&(Jt[E.message]=!0,Fe(D),j("Failed %s type: %s",y,E.message),Fe(null))}}}var to=Array.isArray;function Qe(o){return to(o)}function no(o){{var m=typeof Symbol=="function"&&Symbol.toStringTag,y=m&&o[Symbol.toStringTag]||o.constructor.name||"Object";return y}}function ro(o){try{return qt(o),!1}catch(m){return!0}}function qt(o){return""+o}function $t(o){if(ro(o))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",no(o)),qt(o)}var en=C.ReactCurrentOwner,oo={key:!0,ref:!0,__self:!0,__source:!0},tn,nn;function so(o){if(xe.call(o,"ref")){var m=Object.getOwnPropertyDescriptor(o,"ref").get;if(m&&m.isReactWarning)return!1}return o.ref!==void 0}function io(o){if(xe.call(o,"key")){var m=Object.getOwnPropertyDescriptor(o,"key").get;if(m&&m.isReactWarning)return!1}return o.key!==void 0}function ao(o,m){typeof o.ref=="string"&&en.current}function co(o,m){{var y=function(){tn||(tn=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};y.isReactWarning=!0,Object.defineProperty(o,"key",{get:y,configurable:!0})}}function lo(o,m){{var y=function(){nn||(nn=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};y.isReactWarning=!0,Object.defineProperty(o,"ref",{get:y,configurable:!0})}}var uo=function(o,m,y,T,D,F,L){var E={$$typeof:t,type:o,key:m,ref:y,props:L,_owner:F};return E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(E,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(E,"_source",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E};function fo(o,m,y,T,D){{var F,L={},E=null,J=null;y!==void 0&&($t(y),E=""+y),io(m)&&($t(m.key),E=""+m.key),so(m)&&(J=m.ref,ao(m,D));for(F in m)xe.call(m,F)&&!oo.hasOwnProperty(F)&&(L[F]=m[F]);if(o&&o.defaultProps){var z=o.defaultProps;for(F in z)L[F]===void 0&&(L[F]=z[F])}if(E||J){var W=typeof o=="function"?o.displayName||o.name||"Unknown":o;E&&co(L,W),J&&lo(L,W)}return uo(o,E,J,D,T,en.current,L)}}var qe=C.ReactCurrentOwner,rn=C.ReactDebugCurrentFrame;function he(o){if(o){var m=o._owner,y=Me(o.type,o._source,m?m.type:null);rn.setExtraStackFrame(y)}else rn.setExtraStackFrame(null)}var $e;$e=!1;function et(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function on(){{if(qe.current){var o=K(qe.current.type);if(o)return`
|
|
6
6
|
|
|
7
7
|
Check the render method of \``+o+"`."}return""}}function ho(o){return""}var sn={};function mo(o){{var m=on();if(!m){var y=typeof o=="string"?o:o.displayName||o.name;y&&(m=`
|
|
8
8
|
|
|
9
|
-
Check the top-level render call using <`+y+">.")}return m}}function an(o,m){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var y=mo(m);if(sn[y])return;sn[y]=!0;var T="";o&&o._owner&&o._owner!==qe.current&&(T=" It was passed a child from "+K(o._owner.type)+"."),he(o),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,T),he(null)}}function cn(o,m){{if(typeof o!="object")return;if(Qe(o))for(var y=0;y<o.length;y++){var T=o[y];et(T)&&an(T,m)}else if(et(o))o._store&&(o._store.validated=!0);else if(o){var D=S(o);if(typeof D=="function"&&D!==o.entries)for(var F=D.call(o),L;!(L=F.next()).done;)et(L.value)&&an(L.value,m)}}}function po(o){{var m=o.type;if(m==null||typeof m=="string")return;var y;if(typeof m=="function")y=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===c||m.$$typeof===_))y=m.propTypes;else return;if(y){var T=K(m);eo(y,o.props,"prop",T,o)}else if(m.PropTypes!==void 0&&!$e){$e=!0;var D=K(m);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",D||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vo(o){{for(var m=Object.keys(o.props),y=0;y<m.length;y++){var T=m[y];if(T!=="children"&&T!=="key"){he(o),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),he(null);break}}o.ref!==null&&(he(o),j("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var ln={};function un(o,m,y,T,D,F){{var L=A(o);if(!L){var E="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var J=ho();J?E+=J:E+=on();var
|
|
9
|
+
Check the top-level render call using <`+y+">.")}return m}}function an(o,m){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var y=mo(m);if(sn[y])return;sn[y]=!0;var T="";o&&o._owner&&o._owner!==qe.current&&(T=" It was passed a child from "+K(o._owner.type)+"."),he(o),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,T),he(null)}}function cn(o,m){{if(typeof o!="object")return;if(Qe(o))for(var y=0;y<o.length;y++){var T=o[y];et(T)&&an(T,m)}else if(et(o))o._store&&(o._store.validated=!0);else if(o){var D=S(o);if(typeof D=="function"&&D!==o.entries)for(var F=D.call(o),L;!(L=F.next()).done;)et(L.value)&&an(L.value,m)}}}function po(o){{var m=o.type;if(m==null||typeof m=="string")return;var y;if(typeof m=="function")y=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===c||m.$$typeof===_))y=m.propTypes;else return;if(y){var T=K(m);eo(y,o.props,"prop",T,o)}else if(m.PropTypes!==void 0&&!$e){$e=!0;var D=K(m);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",D||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vo(o){{for(var m=Object.keys(o.props),y=0;y<m.length;y++){var T=m[y];if(T!=="children"&&T!=="key"){he(o),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),he(null);break}}o.ref!==null&&(he(o),j("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var ln={};function un(o,m,y,T,D,F){{var L=A(o);if(!L){var E="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var J=ho();J?E+=J:E+=on();var z;o===null?z="null":Qe(o)?z="array":o!==void 0&&o.$$typeof===t?(z="<"+(K(o.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):z=typeof o,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",z,E)}var W=fo(o,m,y,D,F);if(W==null)return W;if(L){var ee=m.children;if(ee!==void 0)if(T)if(Qe(ee)){for(var me=0;me<ee.length;me++)cn(ee[me],o);Object.freeze&&Object.freeze(ee)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else cn(ee,o)}if(xe.call(m,"key")){var le=K(o),q=Object.keys(m).filter(function(To){return To!=="key"}),tt=q.length>0?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}";if(!ln[le+tt]){var _o=q.length>0?"{"+q.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
|
|
10
10
|
let props = %s;
|
|
11
11
|
<%s {...props} />
|
|
12
12
|
React keys must be passed directly to JSX without using spread:
|
|
13
13
|
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,tt,le,_o,le),ln[le+tt]=!0}}return o===r?vo(z):po(z),z}}function yo(o,m,y){return un(o,m,y,!0)}function go(o,m,y){return un(o,m,y,!1)}var wo=go,Co=yo;we.Fragment=r,we.jsx=wo,we.jsxs=Co})()),we}var dt;function xn(){return dt||(dt=1,process.env.NODE_ENV==="production"?Se.exports=_n():Se.exports=Tn()),Se.exports}var i=xn();const ft=typeof window!="undefined"?f.useLayoutEffect:f.useEffect;function Ce(e,t){const n=f.useRef(e);ft(()=>{n.current=e},[e]),f.useEffect(()=>{if(t===null)return;const r=setInterval(()=>{n.current()},t);return()=>{clearInterval(r)}},[t])}function En(e,t){var n,r,a,l,u,s;if(typeof Intl!="undefined"&&Intl.DateTimeFormat)try{const d=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),w=parseInt(((n=d.find(S=>S.type==="year"))==null?void 0:n.value)||"0",10),_=parseInt(((r=d.find(S=>S.type==="month"))==null?void 0:r.value)||"0",10)-1,g=parseInt(((a=d.find(S=>S.type==="day"))==null?void 0:a.value)||"0",10),N=parseInt(((l=d.find(S=>S.type==="hour"))==null?void 0:l.value)||"0",10),R=parseInt(((u=d.find(S=>S.type==="minute"))==null?void 0:u.value)||"0",10),x=parseInt(((s=d.find(S=>S.type==="second"))==null?void 0:s.value)||"0",10);return new Date(w,_,g,N,R,x)}catch(c){return console.warn(`Failed to convert date to timezone ${t}, returning original date:`,c),e}return console.warn("Intl.DateTimeFormat not available, timezone conversion may be inaccurate"),e}function Rn(e,t,n){return ht(t.getTime()-e.getTime(),n,"milliseconds")}function Sn(){const e=new Date,t="YYYY-MM-DD HH:mm:ss.SSSSSS",n=(a,l=2)=>String(a).padStart(l,"0"),r={YYYY:String(e.getFullYear()),MM:n(e.getMonth()+1),DD:n(e.getDate()),HH:n(e.getHours()),mm:n(e.getMinutes()),ss:n(e.getSeconds()),SSSSSS:n(e.getMilliseconds(),3)+"000"};return Object.entries(r).reduce((a,[l,u])=>a.replace(l,u),t)}const _e=e=>{if(isNaN(e)||e===1/0)return"0:00";const t=l=>(l<10?"0":"")+l,n=Math.floor(e/3600),r=Math.floor(e%3600/60),a=Math.floor(e%60);return n===0?`${r}:${t(a)}`:`${n}:${t(r)}:${t(a)}`};function bn(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return console.warn("Failed to get time zone, returning default time zone:",e),"Europe/Sarajevo"}}function Pn(e){return ht(e,"milliseconds","seconds")}function ht(e,t,n){const r={days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001};return e*(r[t]/r[n])}function Ue(e){var n;const t=typeof window!="undefined"&&((n=window.navigator)==null?void 0:n.userAgent)||"";return e.test(t)}const mt=Ue(/Safari/i)&&!Ue(/Chrome|Chromium/i),Ln=Ue(/Tizen/i);function jn(){const e=document;return!!(e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement)}function kn(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.webkitEnterFullScreen?e.webkitEnterFullScreen():e.mozRequestFullScreen&&e.mozRequestFullScreen()}function In(e){e.exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen&&e.mozCancelFullScreen()}function Dn(e,t){return e.addEventListener("fullscreenchange",t),e.addEventListener("webkitfullscreenchange",t),e.addEventListener("mozfullscreenchange",t),e.addEventListener("MSFullscreenChange",t),()=>{e.removeEventListener("fullscreenchange",t),e.removeEventListener("webkitfullscreenchange",t),e.removeEventListener("mozfullscreenchange",t),e.removeEventListener("MSFullscreenChange",t)}}const Nn=()=>te(),Mn=(e,t)=>({currentTime:0,duration:0,isEnded:!1,isLoading:!1,isLoop:!1,isMetaLoaded:!1,isPlaying:!1,isReady:!1,isStarted:!1,pauseTime:0,seekTime:-1,startTime:-1,volume:100,destroy:()=>{t().isStarted&&t().eventEmitter.emit("ended")},handleDurationChange:()=>{const n=t().techRef.current;n&&e({duration:n.duration})},handleEnd:()=>{t().techRef.current&&(t().eventEmitter.emit("ended"),e({isEnded:!0,isLoading:!1,isMetaLoaded:!1,isPlaying:!1}))},handleLoadedMetadata:()=>{const n=t().techRef.current;n&&(t().eventEmitter.emit("loadedMetadata",{duration:n.duration}),n.loop=t().isLoop,n.volume=n.muted?0:1,t().startTime!==-1&&(n.currentTime=t().startTime),e({currentTime:t().startTime!==-1?t().startTime:n.currentTime,duration:n.duration,startTime:-1,isMetaLoaded:!0,volume:n.muted?0:100}))},handleLoadStart:()=>{const n=t().techRef.current;n&&(t().eventEmitter.emit("loadStart"),e({isReady:!0}),!(t().isStarted&&!t().isPlaying)&&n.play().then(()=>{e({isEnded:!1,isLoading:!1,isPlaying:!0,isStarted:!0,pauseTime:0})}).catch(()=>{e({isStarted:!1,isEnded:!1,isLoading:!1,isPlaying:!1})}))},handlePause:()=>{t().techRef.current&&(t().eventEmitter.emit("pause"),e({isPlaying:!1,pauseTime:Date.now()}))},handlePlay:()=>{t().techRef.current&&(t().eventEmitter.emit(t().isStarted&&!t().isEnded?"resume":"play"),e({isPlaying:!0,pauseTime:0}))},handlePlaying:()=>{t().techRef.current&&(t().eventEmitter.emit("playing"),e({isLoading:!1}))},handleSeeked:()=>{t().techRef.current&&(t().eventEmitter.emit("seeked"),e({isLoading:!1}))},handleSeeking:()=>{t().techRef.current&&(t().eventEmitter.emit("seeking"),e({isLoading:!0}))},handleTimeUpdate:()=>{const n=t().techRef.current;n&&(t().eventEmitter.emit("timeUpdate",{currentTime:n.currentTime,duration:n.duration}),e({currentTime:n.currentTime}))},handleWaiting:()=>{t().techRef.current&&(t().eventEmitter.emit("waiting"),e({isLoading:!0}))},handleVolumeChange:()=>{const n=t().techRef.current;n&&t().eventEmitter.emit("volumeChange",{volume:n.volume})},handleError:n=>{const r=t().techRef.current;if(!r)return;t().eventEmitter.emit("error",n);const a=r.error;if(!a)return;const l=`${a.code}`,u=a.message||"Unknown error occurred";e({error:{message:u,code:l,tech:"native"}})},pause:()=>{const n=t().techRef.current;n&&(n.pause(),e({isEnded:!1,isPlaying:!1,pauseTime:Date.now()}))},getPauseTimeDiff:()=>!t().isStarted||!t().pauseTime?0:parseInt(Pn(Date.now()-t().pauseTime).toFixed(0)),play:()=>{const n=t().techRef.current;n&&n.play().then(()=>{e({isEnded:!1,isLoading:!1,isPlaying:!0,isStarted:!0,pauseTime:0})}).catch(()=>{e({isStarted:!1,isEnded:!1,isLoading:!1,isPlaying:!1})})},restart:()=>{t().eventEmitter.emit("restart")},seek:n=>{const r=t().techRef.current;r&&(r.currentTime=n,e({seekTime:-1,currentTime:n,isStarted:!0,isEnded:!1}))},setIsLoading:n=>e({isLoading:n}),setIsLoop:n=>{const r=t().techRef.current;r&&(r.loop=n,e({isLoop:n}))},setStartTime:n=>e({startTime:n}),setVolume:n=>{const r=t().techRef.current;r&&(r.muted=n===0,r.volume=n/100,e({volume:n}))},stop:()=>{t().techRef.current&&e({isPlaying:!1,isLoading:!1})}}),Fn=(e,t)=>({isIdle:!1,setIsIdle:n=>e({isIdle:n}),resetIdle:()=>t().eventEmitter.emit("resetIdle")}),Vn=e=>({idleLocks:new Set,addIdleLock:t=>e(n=>({idleLocks:new Set(n.idleLocks).add(t)})),removeIdleLock:t=>e(n=>{const r=new Set(n.idleLocks);return r.delete(t),{idleLocks:r}})}),An=(e,t)=>({playbackRate:1,setPlaybackRate:n=>{const r=t().techRef.current;r&&(r.playbackRate=n,e({playbackRate:n}))}}),On=(e,t)=>({level:null,levels:null,setLevels:n=>e({levels:n}),setLevel:n=>e({level:n}),logLevel:n=>{n&&t().eventEmitter.emit("qualityChange",{level:n})}}),Hn=(e,t)=>({isFullscreen:!1,isFullscreenReady:!1,exitFullscreen:()=>{t().eventEmitter.emit("fullscreenChange",{isFullscreen:!1}),In(document),e({isFullscreen:!1})},requestFullscreen:()=>{const n=t().techRef.current,r=t().containerRef.current;if(!n||!r)return;t().eventEmitter.emit("fullscreenChange",{isFullscreen:!0});const a=mt?n:r;a&&kn(a),e({isFullscreen:!0})},setIsFullscreen:n=>e({isFullscreen:n}),setIsFullscreenReady:n=>e({isFullscreenReady:n})}),Un=e=>({error:null,setError:t=>e({error:t})}),Bn=()=>({eventEmitter:Nn()}),Wn=e=>()=>V({},e),zn=(e,t)=>Y.create()((...n)=>V(V(V(V(V(V(V(V(V({},Mn(...n)),Fn(...n)),Vn(...n)),An(...n)),On(...n)),Hn(...n)),Un(...n)),Bn(...n)),Wn({techRef:e,containerRef:t})(...n))),pt=f.createContext(null);function Yn({children:e}){const t=f.useRef(null),n=f.useRef(null),r=f.useRef(null);return t.current||(t.current=zn(n,r)),i.jsx(pt.Provider,{value:t.current,children:e})}const h=e=>{const t=f.useContext(pt);if(!t)throw new Error("usePlayerStore must be used within PlayerStoreProvider");return Y.useStore(t,e)},Be={version:"0.0.56"},We=11e3,ze={DEBUG:2,INFO:3,WARNING:4};function vt({title:e,id:t,kind:n,delay:r,url:a}){const l=f.useRef(null),u=f.useRef(!1),[s,c]=f.useState(null),d=h(C=>C.eventEmitter),w=h(C=>C.isPlaying),_=a.includes("staging")?"stg":"prd",g=_==="stg"?"https://collector-staging.spectar.tv/ingest":"https://collector.spectar.tv/ingest",N=_==="stg"?"spectar_fitnessanny_staging":"spectar_fitnessanny_production";u.current=w;const R=f.useCallback(async({type:C,message:j,level:P=ze.INFO,duration:B,valueStr1:U,valueStr2:p})=>{const v={content_kind:n,datetime:{date:Sn(),timezone:bn()},installation:N,level_num:P,log_source:"fitnessanny_player",capp_version:Be.version,message:j,target_index:C==="client"?"client_log":"watching_activity_log"};e&&(v.title=e),t&&(v.value_int1=t),U&&(v.value_str1=U),p&&(v.value_str2=p),C==="watch"&&(B&&(v.interval_duration=B),r&&(v.catchup_time=r));const b=await fetch(g,{method:"POST",body:JSON.stringify(v)});if(!b.ok)throw new Error(`HTTP error! status: ${b.status}`)},[g,r,t,N,n,e]),x=f.useCallback(C=>{l.current=C!=null?C:new Date},[]),S=f.useCallback(async C=>{!C&&l.current&&(C=Rn(l.current,new Date,"milliseconds")),console.log("[Player][Activity]","Watching",C),await R({type:"watch",message:"WATCHING",duration:C})},[R]);return Ce(()=>{S(s),x()},s),f.useEffect(()=>{const C=()=>{c(We),R({type:"watch",message:"PLAY"}),x()},j=()=>{c(null),R({type:"watch",message:"PAUSE"}),S(),x()},P=()=>{c(We),R({type:"watch",message:"RESUME"}),x()},B=()=>{c(null),u.current&&(R({type:"watch",message:"STOP"}),S()),c(We),R({type:"watch",message:"PLAY"}),x()},U=()=>{c(null),R({type:"watch",message:"STOP"}),u.current&&S(),x()},p=({level:b})=>{b&&R({type:"client",message:"QUALITY_CHANGE",level:ze.DEBUG,valueStr1:b})},v=b=>{let I="UNKNOWN_ERROR",A="Unknown error occurred";b instanceof MediaError&&(b.code&&(I=`${b.code}`),b.message&&(A=`${b.message}`)),R({type:"client",message:"ERROR",level:ze.WARNING,valueStr1:I,valueStr2:A})};return d.on("play",C),d.on("pause",j),d.on("resume",P),d.on("restart",B),d.on("ended",U),d.on("qualityChange",p),d.on("error",v),()=>{d.off("play",C),d.off("pause",j),d.off("resume",P),d.off("restart",B),d.off("ended",U),d.off("qualityChange",p),d.off("error",v)}},[d,R,x,S]),null}const Zn=()=>Y.create(e=>({delay:0,startDate:null,viewerCount:null,setDelay:t=>e({delay:t}),setStartDate:t=>e({startDate:t}),setViewerCount:t=>e({viewerCount:t})})),yt=f.createContext(null),Kn=({children:e})=>{const t=f.useRef(null);return t.current||(t.current=Zn()),i.jsx(yt.Provider,{value:t.current,children:e})},H=e=>{const t=f.useContext(yt);if(!t)throw new Error("useLivePlayerStore must be used within PlayerStoreProvider");return Y.useStore(t,e)};function gt(e){try{const n=new URL(e).searchParams,r={};return n.forEach((a,l)=>{r[l]=a}),r}catch(t){return console.error("Invalid URL:",t),{}}}function Gn({url:e}){const{video_id:t}=gt(e),n=H(a=>a.delay),r=t?Number(t):void 0;return r?i.jsx(vt,{kind:n?"catchup":"live",delay:n,url:e,id:r}):null}const oe={playerNotice:"_playerNotice_x3acc_1",playerNoticeTitle:"_playerNoticeTitle_x3acc_19",playerNoticeText:"_playerNoticeText_x3acc_28",playerNoticeLowZIndex:"_playerNoticeLowZIndex_x3acc_37"};function Xn(e){const[,t]=f.useState(0);Ce(()=>t(n=>n+1),e)}function Jn(e){const t=e.split(`
|
|
14
|
+
<%s key={someKey} {...props} />`,tt,le,_o,le),ln[le+tt]=!0}}return o===r?vo(W):po(W),W}}function yo(o,m,y){return un(o,m,y,!0)}function go(o,m,y){return un(o,m,y,!1)}var wo=go,Co=yo;we.Fragment=r,we.jsx=wo,we.jsxs=Co})()),we}var dt;function xn(){return dt||(dt=1,process.env.NODE_ENV==="production"?Se.exports=_n():Se.exports=Tn()),Se.exports}var i=xn();const ft=typeof window!="undefined"?f.useLayoutEffect:f.useEffect;function Ce(e,t){const n=f.useRef(e);ft(()=>{n.current=e},[e]),f.useEffect(()=>{if(t===null)return;const r=setInterval(()=>{n.current()},t);return()=>{clearInterval(r)}},[t])}function En(e,t){var n,r,a,l,u,s;if(typeof Intl!="undefined"&&Intl.DateTimeFormat)try{const d=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),w=parseInt(((n=d.find(S=>S.type==="year"))==null?void 0:n.value)||"0",10),_=parseInt(((r=d.find(S=>S.type==="month"))==null?void 0:r.value)||"0",10)-1,g=parseInt(((a=d.find(S=>S.type==="day"))==null?void 0:a.value)||"0",10),N=parseInt(((l=d.find(S=>S.type==="hour"))==null?void 0:l.value)||"0",10),R=parseInt(((u=d.find(S=>S.type==="minute"))==null?void 0:u.value)||"0",10),x=parseInt(((s=d.find(S=>S.type==="second"))==null?void 0:s.value)||"0",10);return new Date(w,_,g,N,R,x)}catch(c){return console.warn(`Failed to convert date to timezone ${t}, returning original date:`,c),e}return console.warn("Intl.DateTimeFormat not available, timezone conversion may be inaccurate"),e}function Rn(e,t,n){return ht(t.getTime()-e.getTime(),n,"milliseconds")}function Sn(){const e=new Date,t="YYYY-MM-DD HH:mm:ss.SSSSSS",n=(a,l=2)=>String(a).padStart(l,"0"),r={YYYY:String(e.getFullYear()),MM:n(e.getMonth()+1),DD:n(e.getDate()),HH:n(e.getHours()),mm:n(e.getMinutes()),ss:n(e.getSeconds()),SSSSSS:n(e.getMilliseconds(),3)+"000"};return Object.entries(r).reduce((a,[l,u])=>a.replace(l,u),t)}const _e=e=>{if(isNaN(e)||e===1/0)return"0:00";const t=l=>(l<10?"0":"")+l,n=Math.floor(e/3600),r=Math.floor(e%3600/60),a=Math.floor(e%60);return n===0?`${r}:${t(a)}`:`${n}:${t(r)}:${t(a)}`};function bn(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return console.warn("Failed to get time zone, returning default time zone:",e),"Europe/Sarajevo"}}function Pn(e){return ht(e,"milliseconds","seconds")}function ht(e,t,n){const r={days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001};return e*(r[t]/r[n])}function Ue(e){var n;const t=typeof window!="undefined"&&((n=window.navigator)==null?void 0:n.userAgent)||"";return e.test(t)}const mt=Ue(/Safari/i)&&!Ue(/Chrome|Chromium/i),Ln=Ue(/Tizen/i);function jn(){const e=document;return!!(e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement)}function kn(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.webkitEnterFullScreen?e.webkitEnterFullScreen():e.mozRequestFullScreen&&e.mozRequestFullScreen()}function In(e){e.exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen&&e.mozCancelFullScreen()}function Dn(e,t){return e.addEventListener("fullscreenchange",t),e.addEventListener("webkitfullscreenchange",t),e.addEventListener("mozfullscreenchange",t),e.addEventListener("MSFullscreenChange",t),()=>{e.removeEventListener("fullscreenchange",t),e.removeEventListener("webkitfullscreenchange",t),e.removeEventListener("mozfullscreenchange",t),e.removeEventListener("MSFullscreenChange",t)}}const Nn=()=>te(),Mn=(e,t)=>({currentTime:0,duration:0,isEnded:!1,isLoading:!1,isLoop:!1,isMetaLoaded:!1,isPlaying:!1,isReady:!1,isStarted:!1,pauseTime:0,seekTime:-1,startTime:-1,volume:100,destroy:()=>{t().isStarted&&t().eventEmitter.emit("ended")},handleDurationChange:()=>{const n=t().techRef.current;n&&e({duration:n.duration})},handleEnd:()=>{t().techRef.current&&(t().eventEmitter.emit("ended"),e({isEnded:!0,isLoading:!1,isMetaLoaded:!1,isPlaying:!1}))},handleLoadedMetadata:()=>{const n=t().techRef.current;n&&(t().eventEmitter.emit("loadedMetadata",{duration:n.duration}),n.loop=t().isLoop,n.volume=n.muted?0:1,t().startTime!==-1&&(n.currentTime=t().startTime),e({currentTime:t().startTime!==-1?t().startTime:n.currentTime,duration:n.duration,startTime:-1,isMetaLoaded:!0,volume:n.muted?0:100}))},handleLoadStart:()=>{const n=t().techRef.current;n&&(t().eventEmitter.emit("loadStart"),e({isReady:!0}),!(t().isStarted&&!t().isPlaying)&&n.play().then(()=>{e({isEnded:!1,isLoading:!1,isPlaying:!0,isStarted:!0,pauseTime:0})}).catch(()=>{e({isStarted:!1,isEnded:!1,isLoading:!1,isPlaying:!1})}))},handlePause:()=>{t().techRef.current&&(t().eventEmitter.emit("pause"),e({isPlaying:!1,pauseTime:Date.now()}))},handlePlay:()=>{t().techRef.current&&(t().eventEmitter.emit(t().isStarted&&!t().isEnded?"resume":"play"),e({isPlaying:!0,pauseTime:0}))},handlePlaying:()=>{t().techRef.current&&(t().eventEmitter.emit("playing"),e({isLoading:!1}))},handleSeeked:()=>{t().techRef.current&&(t().eventEmitter.emit("seeked"),e({isLoading:!1}))},handleSeeking:()=>{t().techRef.current&&(t().eventEmitter.emit("seeking"),e({isLoading:!0}))},handleTimeUpdate:()=>{const n=t().techRef.current;n&&(t().eventEmitter.emit("timeUpdate",{currentTime:n.currentTime,duration:n.duration}),e({currentTime:n.currentTime}))},handleWaiting:()=>{t().techRef.current&&(t().eventEmitter.emit("waiting"),e({isLoading:!0}))},handleVolumeChange:()=>{const n=t().techRef.current;n&&t().eventEmitter.emit("volumeChange",{volume:n.volume})},handleError:n=>{const r=t().techRef.current;if(!r)return;t().eventEmitter.emit("error",n);const a=r.error;if(!a)return;const l=`${a.code}`,u=a.message||"Unknown error occurred";e({error:{message:u,code:l,tech:"native"}})},pause:()=>{const n=t().techRef.current;n&&(n.pause(),e({isEnded:!1,isPlaying:!1,pauseTime:Date.now()}))},getPauseTimeDiff:()=>!t().isStarted||!t().pauseTime?0:parseInt(Pn(Date.now()-t().pauseTime).toFixed(0)),play:()=>{const n=t().techRef.current;n&&n.play().then(()=>{e({isEnded:!1,isLoading:!1,isPlaying:!0,isStarted:!0,pauseTime:0})}).catch(()=>{e({isStarted:!1,isEnded:!1,isLoading:!1,isPlaying:!1})})},restart:()=>{t().eventEmitter.emit("restart")},seek:n=>{const r=t().techRef.current;r&&(r.currentTime=n,e({seekTime:-1,currentTime:n,isStarted:!0,isEnded:!1}))},setIsLoading:n=>e({isLoading:n}),setIsLoop:n=>{const r=t().techRef.current;r&&(r.loop=n,e({isLoop:n}))},setStartTime:n=>e({startTime:n}),setVolume:n=>{const r=t().techRef.current;r&&(r.muted=n===0,r.volume=n/100,e({volume:n}))},stop:()=>{t().techRef.current&&e({isPlaying:!1,isLoading:!1})}}),Fn=(e,t)=>({isIdle:!1,setIsIdle:n=>e({isIdle:n}),resetIdle:()=>t().eventEmitter.emit("resetIdle")}),Vn=e=>({idleLocks:new Set,addIdleLock:t=>e(n=>({idleLocks:new Set(n.idleLocks).add(t)})),removeIdleLock:t=>e(n=>{const r=new Set(n.idleLocks);return r.delete(t),{idleLocks:r}})}),An=(e,t)=>({playbackRate:1,setPlaybackRate:n=>{const r=t().techRef.current;r&&(r.playbackRate=n,e({playbackRate:n}))}}),On=(e,t)=>({level:null,levels:null,setLevels:n=>e({levels:n}),setLevel:n=>e({level:n}),logLevel:n=>{n&&t().eventEmitter.emit("qualityChange",{level:n})}}),Hn=(e,t)=>({isFullscreen:!1,isFullscreenReady:!1,exitFullscreen:()=>{t().eventEmitter.emit("fullscreenChange",{isFullscreen:!1}),In(document),e({isFullscreen:!1})},requestFullscreen:()=>{const n=t().techRef.current,r=t().containerRef.current;if(!n||!r)return;t().eventEmitter.emit("fullscreenChange",{isFullscreen:!0});const a=mt?n:r;a&&kn(a),e({isFullscreen:!0})},setIsFullscreen:n=>e({isFullscreen:n}),setIsFullscreenReady:n=>e({isFullscreenReady:n})}),Un=e=>({error:null,setError:t=>e({error:t})}),Bn=()=>({eventEmitter:Nn()}),zn=e=>()=>V({},e),Wn=(e,t)=>Y.create()((...n)=>V(V(V(V(V(V(V(V(V({},Mn(...n)),Fn(...n)),Vn(...n)),An(...n)),On(...n)),Hn(...n)),Un(...n)),Bn(...n)),zn({techRef:e,containerRef:t})(...n))),pt=f.createContext(null);function Yn({children:e}){const t=f.useRef(null),n=f.useRef(null),r=f.useRef(null);return t.current||(t.current=Wn(n,r)),i.jsx(pt.Provider,{value:t.current,children:e})}const h=e=>{const t=f.useContext(pt);if(!t)throw new Error("usePlayerStore must be used within PlayerStoreProvider");return Y.useStore(t,e)},Be={version:"0.0.57"},ze=11e3,We={DEBUG:2,INFO:3,WARNING:4};function vt({title:e,id:t,kind:n,delay:r,url:a}){const l=f.useRef(null),u=f.useRef(!1),[s,c]=f.useState(null),d=h(C=>C.eventEmitter),w=h(C=>C.isPlaying),_=a.includes("staging")?"stg":"prd",g=_==="stg"?"https://collector-staging.spectar.tv/ingest":"https://collector.spectar.tv/ingest",N=_==="stg"?"spectar_fitnessanny_staging":"spectar_fitnessanny_production";u.current=w;const R=f.useCallback(async({type:C,message:j,level:P=We.INFO,duration:B,valueStr1:U,valueStr2:p})=>{const v={content_kind:n,datetime:{date:Sn(),timezone:bn()},installation:N,level_num:P,log_source:"fitnessanny_player",capp_version:Be.version,message:j,target_index:C==="client"?"client_log":"watching_activity_log"};e&&(v.title=e),t&&(v.value_int1=t),U&&(v.value_str1=U),p&&(v.value_str2=p),C==="watch"&&(B&&(v.interval_duration=B),r&&(v.catchup_time=r));const b=await fetch(g,{method:"POST",body:JSON.stringify(v)});if(!b.ok)throw new Error(`HTTP error! status: ${b.status}`)},[g,r,t,N,n,e]),x=f.useCallback(C=>{l.current=C!=null?C:new Date},[]),S=f.useCallback(async C=>{!C&&l.current&&(C=Rn(l.current,new Date,"milliseconds")),console.log("[Player][Activity]","Watching",C),await R({type:"watch",message:"WATCHING",duration:C})},[R]);return Ce(()=>{S(s),x()},s),f.useEffect(()=>{const C=()=>{c(ze),R({type:"watch",message:"PLAY"}),x()},j=()=>{c(null),R({type:"watch",message:"PAUSE"}),S(),x()},P=()=>{c(ze),R({type:"watch",message:"RESUME"}),x()},B=()=>{c(null),u.current&&(R({type:"watch",message:"STOP"}),S()),c(ze),R({type:"watch",message:"PLAY"}),x()},U=()=>{c(null),R({type:"watch",message:"STOP"}),u.current&&S(),x()},p=({level:b})=>{b&&R({type:"client",message:"QUALITY_CHANGE",level:We.DEBUG,valueStr1:b})},v=b=>{let I="UNKNOWN_ERROR",A="Unknown error occurred";b instanceof MediaError&&(b.code&&(I=`${b.code}`),b.message&&(A=`${b.message}`)),R({type:"client",message:"ERROR",level:We.WARNING,valueStr1:I,valueStr2:A})};return d.on("play",C),d.on("pause",j),d.on("resume",P),d.on("restart",B),d.on("ended",U),d.on("qualityChange",p),d.on("error",v),()=>{d.off("play",C),d.off("pause",j),d.off("resume",P),d.off("restart",B),d.off("ended",U),d.off("qualityChange",p),d.off("error",v)}},[d,R,x,S]),null}const Zn=()=>Y.create(e=>({delay:0,startDate:null,viewerCount:null,setDelay:t=>e({delay:t}),setStartDate:t=>e({startDate:t}),setViewerCount:t=>e({viewerCount:t})})),yt=f.createContext(null),Kn=({children:e})=>{const t=f.useRef(null);return t.current||(t.current=Zn()),i.jsx(yt.Provider,{value:t.current,children:e})},H=e=>{const t=f.useContext(yt);if(!t)throw new Error("useLivePlayerStore must be used within PlayerStoreProvider");return Y.useStore(t,e)};function gt(e){try{const n=new URL(e).searchParams,r={};return n.forEach((a,l)=>{r[l]=a}),r}catch(t){return console.error("Invalid URL:",t),{}}}function Gn({url:e}){const{video_id:t}=gt(e),n=H(a=>a.delay),r=t?Number(t):void 0;return r?i.jsx(vt,{kind:n?"catchup":"live",delay:n,url:e,id:r}):null}const oe={playerNotice:"_playerNotice_x3acc_1",playerNoticeTitle:"_playerNoticeTitle_x3acc_19",playerNoticeText:"_playerNoticeText_x3acc_28",playerNoticeLowZIndex:"_playerNoticeLowZIndex_x3acc_37"};function Xn(e){const[,t]=f.useState(0);Ce(()=>t(n=>n+1),e)}function Jn(e){const t=e.split(`
|
|
15
15
|
`);for(const n of t){const r=n.trim();if(r.startsWith("#EXT-X-PROGRAM-DATE-TIME:")){const a=r.replace("#EXT-X-PROGRAM-DATE-TIME:","").trim(),l=new Date(a);if(!isNaN(l.getTime()))return En(l,"Europe/Sarajevo")}}return null}function Qn(e,t){const n=e.split(`
|
|
16
|
-
`);let r=!1;for(const a of n){const l=a.trim();if(l.startsWith("#EXT-X-STREAM-INF:")){r=!0;continue}if(r&&!l.startsWith("#")){if(l.startsWith("http"))return l;{const u=new URL(t);return new URL(l,u.origin+u.pathname.substring(0,u.pathname.lastIndexOf("/"))+"/").toString()}}}return null}function qn(e){return e.replace("playlist.m3u8","playlist_fmp4_dvr.m3u8")}async function $n(e){try{const t=qn(e);console.log("Converting to DVR URL:",t);const n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch master playlist: ${n.status} ${n.statusText}`);const r=await n.text(),a=Qn(r,t);if(!a)throw new Error("No chunklist URL found in master playlist");console.log("Found chunklist URL:",a);const l=await fetch(a);if(!l.ok)throw new Error(`Failed to fetch chunklist: ${l.status} ${l.statusText}`);const u=await l.text(),s=Jn(u);return s?console.log("Successfully detected start time:",s.toISOString()):console.log(" No start time found in chunklist"),s}catch(t){return console.error("Error getting start time from HLS URL:",t),null}}function er(n){var r=n,{url:e}=r,t=re(r,["url"]);const[a,l]=f.useState(!0),u=H(d=>d.startDate),s=H(d=>d.setStartDate),c=f.useCallback(async()=>{const d=await $n(e);d&&s(d)},[e,s]);return f.useEffect(()=>{(async()=>{l(!0),await c(),l(!1)})()},[c]),Ce(c,u?null:5e3),a?null:i.jsx(tr,V({},t))}function tr({children:e,messages:t}){const n=H(u=>u.startDate),r=h(u=>u.isStarted);return Xn(r?null:5e3),n?Date.now()<n.getTime()?i.jsx(nr,{startDate:n,title:t.eventNotStarted,message:t.eventStartingSoon}):i.jsx(i.Fragment,{children:e}):i.jsx("div",{className:oe.playerNotice,children:i.jsx("h3",{className:oe.playerNoticeTitle,children:t.unableToPlay})})}function nr({startDate:e,title:t,message:n}){const r=e.getTime()-Date.now(),a=Math.floor(r/(1e3*60*60)),l=Math.floor(r%(1e3*60*60)/(1e3*60));return a||l?i.jsxs("div",{className:oe.playerNotice,children:[i.jsx("h3",{className:oe.playerNoticeTitle,children:t}),i.jsxs("p",{className:oe.playerNoticeText,children:["(",a>0?`${a}h ${l}m`:`${l}m`,")"]})]}):i.jsx("div",{className:oe.playerNotice,children:i.jsx("h3",{className:oe.playerNoticeTitle,children:n})})}function wt({callback:e}){const t=h(n=>n.eventEmitter);return f.useEffect(()=>{const n=()=>e("play",void 0),r=()=>e("pause",void 0),a=()=>e("resume",void 0),l=()=>e("restart",void 0),u=()=>e("ended",void 0),s=()=>e("seeking",void 0),c=()=>e("seeked",void 0),d=C=>e("volumeChange",C),w=C=>e("fullscreenChange",C),_=C=>e("qualityChange",C),g=C=>e("loadedMetadata",C),N=()=>e("loadStart",void 0),R=()=>e("playing",void 0),x=()=>e("waiting",void 0),S=()=>e("error",void 0);return t.on("play",n),t.on("pause",r),t.on("resume",a),t.on("restart",l),t.on("ended",u),t.on("seeking",s),t.on("seeked",c),t.on("volumeChange",d),t.on("fullscreenChange",w),t.on("qualityChange",_),t.on("loadedMetadata",g),t.on("loadStart",N),t.on("playing",R),t.on("waiting",x),t.on("error",S),()=>{t.off("play",n),t.off("pause",r),t.off("resume",a),t.off("restart",l),t.off("ended",u),t.off("seeking",s),t.off("seeked",c),t.off("volumeChange",d),t.off("fullscreenChange",w),t.off("qualityChange",_),t.off("loadedMetadata",g),t.off("loadStart",N),t.off("playing",R),t.off("waiting",x),t.off("error",S)}},[e,t]),null}const Ct=(e,t=0)=>parseInt(Math.max(0,(Date.now()-(e+t*1e3))/1e3).toFixed(0)),_t=(e,t)=>Math.max(0,(Date.now()-e-t*1e3)/1e3),rr=(e,t)=>Math.max(0,(t-e)/1e3),or=(e,t=0)=>{const r=t<0?0:t,a=["bytes","kb","mb","gb","tb","pb","eb","zb","yb"],l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(r))}${a[l]}`};function sr({isAuto:e,level:t,levels:n}){const r=n.length,a=[];return r>1&&a.push({sid:"quality-level-auto",label:"Auto",value:-1,selected:e||t===-1}),n.sort(function(l,u){const s=l.height||l.bitrate||0,c=u.height||u.bitrate||0;return s===c?0:s>c?1:-1}),n.map(l=>{const{bitrate:u,height:s,index:c}=l;a.push({sid:`quality-level-${c}`,label:s?`${s}p`:or(u),value:c,selected:r===1||!e&&c===t})}),a}function ir({callback:e}){const t=H(l=>l.delay),n=H(l=>l.startDate),r=n?n.getTime():0,a=h(l=>l.eventEmitter);return f.useEffect(()=>{const l=()=>e("timeUpdate",{currentTime:_t(r,t),duration:-1});return a.on("timeUpdate",l),()=>{a.off("timeUpdate",l)}},[e,t,a,r]),i.jsx(wt,{callback:e})}function Tt(){const e=h(s=>s.exitFullscreen),t=h(s=>s.isFullscreen),n=h(s=>s.isFullscreenReady),r=h(s=>s.requestFullscreen),a=h(s=>s.setVolume),l=h(s=>s.volume),u=f.useCallback(s=>{let c=!1;if(!(s.target instanceof HTMLInputElement||s.ctrlKey)){switch(s.code){case"ArrowUp":a(l+10<100?l+10:100),c=!0;break;case"ArrowDown":a(l-10>0?l-10:0),c=!0;break;case"KeyM":a(l===0?100:0),c=!0;break;case"KeyF":n&&(t?e():r(),c=!0);break}c&&s.preventDefault()}},[e,t,n,r,a,l]);return f.useEffect(()=>(document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}),[u]),null}function ar(){const e=H(s=>s.delay),t=h(s=>s.isPlaying),n=h(s=>s.pause),r=h(s=>s.getPauseTimeDiff),a=h(s=>s.play),l=H(s=>s.setDelay),u=f.useCallback(s=>{let c=!1;if(!(s.target instanceof HTMLInputElement||s.ctrlKey)){switch(s.code){case"ArrowLeft":l(e+10),c=!0;break;case"ArrowRight":l(e-10>0?e-10:0),c=!0;break;case"Space":if(t)n();else{const d=r();d&&l(e+d),a()}c=!0;break}c&&s.preventDefault()}},[e,r,t,n,a,l]);return f.useEffect(()=>(document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}),[u]),i.jsx(Tt,{})}function xt({children:e}){return i.jsx(Yn,{children:e})}function cr({children:e}){return i.jsx(Kn,{children:i.jsx(xt,{children:e})})}function lr({url:e,isLive:t,messages:n}){const r=f.useRef(null),a=h(p=>p.level),l=h(p=>p.levels),u=h(p=>p.setLevel),s=h(p=>p.setLevels),c=h(p=>p.logLevel),d=h(p=>p.techRef),w=h(p=>p.setError),_=f.useRef(0),g=f.useRef(null),N=50,R=1e4,x=f.useCallback(p=>{if(r.current&&(r.current.nextLevel=p,u(null),l)){const v=l.map(b=>pe(V({},b),{selected:b.value===p}));s(v)}},[l,u,s]),S=f.useCallback(()=>{if(!d.current)return;console.log("[Player][HLS] MEDIA_ATTACHING");const p=document.createElement("source");p.src=e,p.type="application/vnd.apple.mpegurl",p.dataset.id="original-stream",d.current.appendChild(p),d.current.disableRemotePlayback=!1},[e,d]),C=f.useCallback(()=>{if(!r.current)return;console.log("[Player][HLS] MANIFEST_LOADED"),w(null),g.current&&(clearTimeout(g.current),g.current=null),_.current=0;const p=r.current.levels,v=r.current.currentLevel,b=r.current.autoLevelEnabled;s(sr({levels:p.map((I,A)=>{const{bitrate:M,height:Q,width:K}=I;return{bitrate:M,height:Q,index:A,width:K}}),level:v,isAuto:b}))},[w,s]),j=f.useCallback(()=>{if(!r.current)return;console.log("[Player][HLS] LEVEL_SWITCHED");const p=r.current.levels,v=r.current.currentLevel;if(p[v]?JSON.stringify(p[v]):null){let I="";p[v].height?I=`${p[v].height}p`:p[v].bitrate&&(I=`${p[v].bitrate}bps`),c(I)}},[c]),P=f.useCallback((p,v)=>{if(r.current&&v.fatal){let b,I="UNKNOWN_ERROR";switch(v.type){case $.ErrorTypes.NETWORK_ERROR:b=n.unableToPlay,console.log("[Player][HLS] NETWORK_ERROR",v),t?(_.current<N&&(g.current&&clearTimeout(g.current),_.current+=1,g.current=setTimeout(()=>{if(r.current)try{console.log("[Player][HLS] Retrying stream..."),r.current.loadSource(e)}catch(A){console.error("[Player][HLS] Retry failed:",A)}},R)),I="LIVE_MANIFEST_LOAD_ERROR"):(r.current.startLoad(),I="NETWORK_ERROR"),w({message:b,code:I,tech:"hls"});break;case $.ErrorTypes.MEDIA_ERROR:r.current.recoverMediaError();break}}},[t,e,w,n]),B=f.useCallback(()=>{if(!d.current)return;const p={startLevel:-1,maxBufferSize:30*1024*1024};Ln?(p.backBufferLength=-1,p.enableWorker=!1):t?p.backBufferLength=10:p.backBufferLength=60;try{console.log("[Player][HLS] URL",e),console.log("[Player][HLS] Config",JSON.stringify(p)),console.log("[Player][HLS] Version",$.version),r.current=new $(p),r.current.on($.Events.MEDIA_ATTACHING,S),r.current.on($.Events.MANIFEST_LOADED,C),r.current.on($.Events.LEVEL_SWITCHED,j),r.current.on($.Events.ERROR,P),r.current.attachMedia(d.current),r.current.loadSource(e)}catch(v){throw new Error(`Error initializing Hls: ${v}`)}},[S,C,j,P,t,d,e]),U=f.useCallback(()=>{if(r.current&&(r.current.off($.Events.MEDIA_ATTACHING,S),r.current.off($.Events.MANIFEST_LOADED,C),r.current.off($.Events.LEVEL_SWITCHED,j),r.current.off($.Events.ERROR,P),r.current.destroy(),r.current=null),d.current){const p=d.current;Array.from(p.children).filter(b=>{var I;return((I=b.dataset)==null?void 0:I.id)==="original-stream"}).forEach(b=>p.removeChild(b))}g.current&&(clearTimeout(g.current),g.current=null),_.current=0},[S,j,C,P,d]);return f.useEffect(()=>{a!==null&&x(a)},[a,x]),f.useEffect(()=>($.isSupported()&&B(),U),[U,B]),null}const ur={playerVideo:"_playerVideo_wc0sm_1"};function Et({url:e,isLive:t,isMuted:n=!1,messages:r}){const a=h(v=>v.destroy),l=h(v=>v.handleDurationChange),u=h(v=>v.handleEnd),s=h(v=>v.handleLoadedMetadata),c=h(v=>v.handleLoadStart),d=h(v=>v.handlePause),w=h(v=>v.handlePlay),_=h(v=>v.handlePlaying),g=h(v=>v.handleSeeked),N=h(v=>v.handleSeeking),R=h(v=>v.handleTimeUpdate),x=h(v=>v.handleWaiting),S=h(v=>v.handleVolumeChange),C=h(v=>v.handleError),j=h(v=>v.techRef),P=f.useRef(null),B=()=>t?{onTimeUpdate:U}:{onDurationChange:l,onSeeked:g,onSeeking:N,onTimeUpdate:U},U=()=>{(!P.current||Date.now()-P.current>=1e3)&&(R(),P.current=Date.now())},p=B();return f.useEffect(()=>()=>{a()},[a]),i.jsxs(i.Fragment,{children:[i.jsx(lr,{isLive:t,url:e,messages:r}),i.jsx("video",V({ref:j,className:ur.playerVideo,playsInline:!0,controls:!1,muted:n,preload:"auto",crossOrigin:"anonymous",onEnded:u,onError:C,onLoadedMetadata:s,onLoadStart:c,onPause:d,onPlay:w,onPlaying:_,onWaiting:x,onVolumeChange:S,tabIndex:-1},p))]})}function dr({url:e,messages:t}){const[n,r]=f.useState(null),a=H(u=>u.delay),l=f.useCallback(async()=>{r(a?e.replace("-live","-catchup").replace("playlist.m3u8",`playlist_fmp4_dvr_timeshift-${a}.m3u8`):e)},[a,e]);return f.useEffect(()=>{const u=requestAnimationFrame(()=>l());return()=>cancelAnimationFrame(u)},[l]),n?i.jsx(Et,{url:n,isLive:!0,messages:t}):null}function fr({url:e}){return h(n=>n.isStarted)?i.jsx(hr,{url:e}):null}function hr({url:e}){const t=H(l=>l.setViewerCount),n=f.useRef(null),r=l=>{try{return new URL(l).pathname.split("/").filter(d=>d.length>0)[0]||null}catch(u){return console.error("Failed to extract URI from player URL:",u),null}},a=f.useCallback(async()=>{var c;const l=r(e);if(!l){console.error("Could not extract URI from URL:",e);return}n.current&&n.current.abort(),n.current=new AbortController;const s=`https://${e.includes("staging")?"stg":"prd"}-fitnessanny.spectar.tv/analytics-api/v1/token-info/uri/${l}`;try{const d=await fetch(s,{signal:n.current.signal});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);const _=(c=(await d.json()).count)!=null?c:0;t(_)}catch(d){if(d.name==="AbortError")return;console.error("Failed to fetch viewer count:",d),t(null)}},[t,e]);return f.useEffect(()=>(a(),()=>{n.current&&n.current.abort()}),[a,e]),Ce(a,15e3),null}function mr(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=s=>typeof window=="undefined"?t:window.matchMedia(s).matches,[a,l]=f.useState(()=>n?r(e):t);function u(){l(r(e))}return ft(()=>{if(typeof window=="undefined")return;const s=window.matchMedia(e);return u(),s.addListener?s.addListener(u):s.addEventListener("change",u),()=>{s.removeListener?s.removeListener(u):s.removeEventListener("change",u)}},[e]),a}const ue={playbackButton:"_playbackButton_lgsgw_1",seekIndicator:"_seekIndicator_lgsgw_23",seekIndicatorLeft:"_seekIndicatorLeft_lgsgw_49",seekIndicatorRight:"_seekIndicatorRight_lgsgw_53",seekIndicatorVisible:"_seekIndicatorVisible_lgsgw_57"},pr=10;function Rt(s){var c=s,{className:e,onClick:t,onForwardSeek:n,onBackwardSeek:r,maxForwardTime:a,maxBackwardTime:l}=c,u=re(c,["className","onClick","onForwardSeek","onBackwardSeek","maxForwardTime","maxBackwardTime"]);return mr("(pointer: coarse)")?i.jsx(yr,V({className:e,maxForwardTime:a,maxBackwardTime:l,onForwardSeek:n,onBackwardSeek:r},u)):i.jsx(vr,V({className:e,onClick:t},u))}function vr(r){var a=r,{className:e,onClick:t}=a,n=re(a,["className","onClick"]);const l=f.useRef(null),u=h(x=>x.exitFullscreen),s=h(x=>x.isFullscreen),c=h(x=>x.requestFullscreen),d=h(x=>x.resetIdle),w=x=>{N()?(g(),s?u():c()):_(x)},_=x=>{l.current=window.setTimeout(()=>{t==null||t(x),g()},200)},g=()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},N=()=>l.current!==null,R=()=>{d()};return f.useEffect(()=>()=>{g()},[]),i.jsx("button",V({onClick:w,onMouseMove:R,className:[ue.playbackButton,e].filter(Boolean).join(" "),"aria-label":"Player gestures"},n))}function yr(u){var s=u,{className:e,maxForwardTime:t,maxBackwardTime:n,onForwardSeek:r,onBackwardSeek:a}=s,l=re(s,["className","maxForwardTime","maxBackwardTime","onForwardSeek","onBackwardSeek"]);const c=f.useRef(null),d=f.useRef({single:null,indicator:null,accumulate:null}),w=f.useRef(null),_=f.useRef(0),g=f.useRef(null),[N,R]=f.useState({visible:!1,direction:null,time:0}),x=h(p=>p.isIdle),S=h(p=>p.setIsIdle),C=h(p=>p.resetIdle),j=(p,v)=>p<v/2?"backward":"forward",P=p=>{if(!w.current)return;const v=p.changedTouches[0];if(!v)return;const b=Date.now(),I=w.current.getBoundingClientRect(),A=v.clientX-I.left,M=v.clientY-I.top;if(A<0||A>I.width||M<0||M>I.height)return;const Q=c.current,K=Q?b-Q.time:1/0,G=j(A,I.width),ie=g.current!==null&&g.current===G&&Q!==null&&K<700&&Math.abs(A-Q.x)<100;if(Q!==null&&g.current===null&&K<300&&Math.abs(A-Q.x)<50||ie){p.preventDefault(),p.stopPropagation(),d.current.single&&(window.clearTimeout(d.current.single),d.current.single=null),C(),(g.current===null||g.current!==G)&&(_.current=0,g.current=G);const ne=G==="backward"?n:t;_.current=Math.min(_.current+pr,ne!=null?ne:1/0),B(G,_.current),d.current.accumulate&&window.clearTimeout(d.current.accumulate),d.current.accumulate=window.setTimeout(()=>{const X=_.current;X>0&&(g.current==="backward"?a==null||a(X):r==null||r(X),C()),_.current=0,g.current=null,c.current=null,U(),d.current.accumulate=null},500),c.current={time:b,x:A}}else{c.current={time:b,x:A},d.current.single&&window.clearTimeout(d.current.single);const ne=g.current!==null?700:350;d.current.single=window.setTimeout(()=>{if(g.current===null){d.current.single=null;const X=x;S(!X),X&&C()}c.current=null},ne)}},B=(p,v)=>{v!==0&&(R({visible:!0,direction:p,time:v}),d.current.indicator&&window.clearTimeout(d.current.indicator),d.current.indicator=window.setTimeout(()=>{U()},700))},U=()=>{R({visible:!1,direction:null,time:0}),d.current.indicator&&(window.clearTimeout(d.current.indicator),d.current.indicator=null)};return f.useEffect(()=>{const p=d.current;return()=>{p!=null&&p.single&&window.clearTimeout(p.single),p!=null&&p.indicator&&window.clearTimeout(p.indicator),p!=null&&p.accumulate&&window.clearTimeout(p.accumulate)}},[]),i.jsxs(i.Fragment,{children:[i.jsx("button",V({ref:w,onTouchEnd:P,className:[ue.playbackButton,e].filter(Boolean).join(" "),"aria-label":"Player gestures"},l)),N.visible&&i.jsxs("div",{className:`${ue.seekIndicator} ${ue.seekIndicatorVisible} ${N.direction==="backward"?ue.seekIndicatorLeft:ue.seekIndicatorRight}`,children:[N.direction==="backward"?"-":"+",_e(N.time)]})]})}function gr(){const e=h(c=>c.isPlaying),t=h(c=>c.pause),n=h(c=>c.getPauseTimeDiff),r=h(c=>c.play),a=H(c=>c.delay),l=H(c=>c.setDelay),u=H(c=>c.startDate),s=u?u.getTime():0;return i.jsx(Rt,{onClick:()=>{if(e)t();else{const c=n();c&&l(a+c),r()}},onBackwardSeek:c=>{const d=a+c;l(d)},onForwardSeek:c=>{const d=Math.max(0,a-c);l(d)},maxBackwardTime:Math.floor(s),maxForwardTime:Math.floor(a)})}const St={playerButton:"_playerButton_izwqq_1",playerButtonCircle:"_playerButtonCircle_izwqq_42"},ae=f.forwardRef((a,r)=>{var l=a,{shape:e="circle",className:t}=l,n=re(l,["shape","className"]);const u=e==="circle"?St.playerButtonCircle:"",s=[St.playerButton,u,t].filter(Boolean).join(" ");return i.jsx("button",V({ref:r,className:s},n))});ae.displayName="PlayerButton";const be={liveIndicator:"_liveIndicator_1jczn_1",liveIndicatorHasDelay:"_liveIndicatorHasDelay_1jczn_9",liveIndicatorNoDelay:"_liveIndicatorNoDelay_1jczn_13"};function wr(n){var r=n,{message:e}=r,t=re(r,["message"]);const a=h(d=>d.restart),l=H(d=>d.delay),u=H(d=>d.setDelay),s=()=>{l&&(a(),u(0))},c=l?`${be.liveIndicator} ${be.liveIndicatorHasDelay}`:`${be.liveIndicator} ${be.liveIndicatorNoDelay}`;return i.jsxs(ae,pe(V({onClick:s,shape:"square"},t),{children:[i.jsx("div",{className:c}),e||"Live"]}))}function bt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M6 5H8V19H6V5ZM16 5H18V19H16V5Z"})})}function Pt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z"})})}function Cr(){const e=h(s=>s.isPlaying),t=h(s=>s.pause),n=h(s=>s.getPauseTimeDiff),r=h(s=>s.play),a=H(s=>s.delay),l=H(s=>s.setDelay),u=()=>{if(e)t();else{const s=n();s&&l(a+s),r()}};return i.jsx(ae,{onClick:u,children:e?i.jsx(bt,{}):i.jsx(Pt,{})})}const se={progressSlider:"_progressSlider_hwzgf_1",tipContainer:"_tipContainer_hwzgf_7",tipContainerVisible:"_tipContainerVisible_hwzgf_17",tipContainerHidden:"_tipContainerHidden_hwzgf_22",tipContent:"_tipContent_hwzgf_27"},Pe={sliderRoot:"_sliderRoot_aeak6_1",sliderTrack:"_sliderTrack_aeak6_18",sliderRange:"_sliderRange_aeak6_28",sliderThumb:"_sliderThumb_aeak6_37"},Le=f.forwardRef((l,a)=>{var u=l,{max:e=100,min:t=0,className:n}=u,r=re(u,["max","min","className"]);return i.jsxs(Ee.Root,pe(V({ref:a,min:t,max:e,"aria-label":"Player progress",className:[Pe.sliderRoot,n].filter(Boolean).join(" "),onKeyDown:s=>s.preventDefault()},r),{children:[i.jsx(Ee.Track,{className:Pe.sliderTrack,children:i.jsx(Ee.Range,{className:Pe.sliderRange})}),i.jsx(Ee.Thumb,{className:Pe.sliderThumb})]}))});Le.displayName="PlayerSlider";function je(e){const t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight?{left:t.left*100,right:t.right*100,top:t.top*100,bottom:t.bottom*100,width:t.width*100,height:t.height*100}:t}const Lt="vod-player-progress-bar";function _r(){const e=f.useRef(null),t=f.useRef(null),[n,r]=f.useState(0),[a,l]=f.useState(0),[u,s]=f.useState(!1),[c,d]=f.useState(-1),[w,_]=f.useState(-1),g=H(M=>M.delay),N=H(M=>M.startDate),R=N?N.getTime():0,x=new Date().getTime(),S=H(M=>M.setDelay),C=h(M=>M.isPlaying),j=h(M=>M.addIdleLock),P=h(M=>M.removeIdleLock),B=f.useCallback(()=>{r(_t(R,g)),l(rr(R,x))},[g,x,R]),U=parseFloat((a?(w!==-1?w:n)/a*100:0).toFixed(1)),p=M=>{_(a*(M[0]/100)),j(Lt)},v=()=>{if(w!==-1){const M=Ct(R,w);S(M),_(-1),P(Lt)}},b=()=>s(!0),I=()=>s(!1),A=f.useCallback(M=>{const Q=e.current,K=t.current;if(Q&&K){const G=je(Q),ie=je(K),fe=(M.pageX||M.clientX)-G.left,ne=fe/G.width;if(ne<0)return;let X=fe-ie.width/2;X<0&&(X=0),X>G.width-ie.width&&(X=-1),K.style.left=X>-1?`${X}px`:"auto",K.style.right=X>-1?"auto":"0px";const Te=a-ne*a;d(Te>0?Te:0)}b()},[a]);return Ce(()=>B(),C?1e3:null),f.useEffect(()=>{const M=requestAnimationFrame(()=>B());return()=>cancelAnimationFrame(M)},[B]),i.jsxs("div",{className:se.progressSlider,children:[i.jsx(Le,{ref:e,value:[U],onPointerLeave:I,onPointerDown:I,onPointerMove:A,onValueChange:p,onValueCommit:v,step:.1}),i.jsx("div",{ref:t,className:`${se.tipContainer} ${u?se.tipContainerVisible:se.tipContainerHidden}`,children:i.jsx("p",{className:se.tipContent,children:`-${_e(c)}`})})]})}function Tr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M22 12C22 17.5228 17.5229 22 12 22C6.4772 22 2 17.5228 2 12C2 6.47715 6.4772 2 12 2V4C7.5817 4 4 7.58172 4 12C4 16.4183 7.5817 20 12 20C16.4183 20 20 16.4183 20 12C20 9.53614 18.8862 7.33243 17.1346 5.86492L15 8V2L21 2L18.5535 4.44656C20.6649 6.28002 22 8.9841 22 12Z"})})}function xr(){const e=H(a=>a.startDate),t=H(a=>a.setDelay),n=e?e.getTime():0,r=()=>t(Ct(n));return i.jsx(ae,{onClick:r,children:i.jsx(Tr,{})})}const ke={viewersContainer:"_viewersContainer_z1ihz_1",viewersIndicator:"_viewersIndicator_z1ihz_16",viewersIcon:"_viewersIcon_z1ihz_24",viewersCount:"_viewersCount_z1ihz_28"};function Er(){const e=H(t=>t.viewerCount);return e?i.jsxs("div",{className:ke.viewersContainer,children:[i.jsx("span",{className:ke.viewersIndicator}),i.jsxs("svg",{className:ke.viewersIcon,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M8 7C9.10457 7 10 6.10457 10 5C10 3.89543 9.10457 3 8 3C6.89543 3 6 3.89543 6 5C6 6.10457 6.89543 7 8 7Z",fill:"currentColor"}),i.jsx("path",{d:"M8 8C5.79086 8 4 9.79086 4 12V13H12V12C12 9.79086 10.2091 8 8 8Z",fill:"currentColor"})]}),i.jsx("span",{className:ke.viewersCount,children:e.toLocaleString()})]}):null}function jt(){const e=h(n=>n.error);if(!e)return null;const t=e.code==="LIVE_MANIFEST_LOAD_ERROR";return i.jsx("div",{className:`${oe.playerNotice} ${t?oe.playerNoticeLowZIndex:""}`,children:i.jsx("h3",{className:oe.playerNoticeTitle,children:e.message})})}const Z={playerContainer:"_playerContainer_146tx_1",controlsTop:"_controlsTop_146tx_12",controlsBottom:"_controlsBottom_146tx_29",controlsContainer:"_controlsContainer_146tx_45",controlsRow:"_controlsRow_146tx_61",controlsSection:"_controlsSection_146tx_68",controlsSectionStart:"_controlsSectionStart_146tx_78",controlsSectionEnd:"_controlsSectionEnd_146tx_82"};function Rr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z"})})}function Sr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"})})}function kt(){const e=h(d=>d.containerRef),t=h(d=>d.exitFullscreen),n=h(d=>d.isFullscreen),r=h(d=>d.requestFullscreen),a=h(d=>d.setIsFullscreen),l=h(d=>d.setIsFullscreenReady),u=h(d=>d.techRef),s=f.useCallback(d=>{d.stopPropagation(),a(jn())},[a]),c=()=>{n?t():r()};return f.useEffect(()=>{const d=mt?u.current:e.current;if(d)return Dn(d,s)},[e,s,u]),f.useEffect(()=>{l(!0)},[l]),i.jsx(ae,{onClick:c,children:n?i.jsx(Sr,{}):i.jsx(Rr,{})})}const Ye={idleCheckContainer:"_idleCheckContainer_crh2s_1",idleCheckContainerIdle:"_idleCheckContainerIdle_crh2s_5",idleCheckContainerActive:"_idleCheckContainerActive_crh2s_11"},br=5*1e3;function It({children:e}){const t=f.useRef(null),n=h(g=>g.isIdle),r=h(g=>g.setIsIdle),a=f.useRef(null),u=h(g=>g.idleLocks).size,s=h(g=>g.eventEmitter),c=f.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null)},[]),d=f.useCallback(()=>{c(),a.current=window.setTimeout(()=>r(!0),br)},[c,r]);f.useEffect(()=>(r(!1),d(),()=>{c()}),[c,r,d]),f.useEffect(()=>{const g=()=>{r(!1),d()};return s.on("resetIdle",g),()=>{s.off("resetIdle",g)}},[s,r,d]);const w=n&&!u,_=`${Ye.idleCheckContainer} ${w?Ye.idleCheckContainerIdle:Ye.idleCheckContainerActive}`;return i.jsx("div",{ref:t,className:_,children:e})}const Pr={spinner:"_spinner_oo4hi_10"};function Lr(e){return i.jsx("div",V({className:Pr.spinner},e))}function jr(e,t=500){const[n,r]=f.useState(e);return f.useEffect(()=>{const a=window.setTimeout(()=>r(e),t);return()=>{window.clearTimeout(a)}},[e,t]),n}const kr={loadingContainer:"_loadingContainer_v9v7r_1"};function Dt(n){var r=n,{style:e}=r,t=re(r,["style"]);const a=h(u=>u.isLoading);return jr(a,100)?i.jsx("div",pe(V({className:kr.loadingContainer,style:e},t),{children:i.jsx(Lr,{})})):null}function Nt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"})})}function Ir(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M4 5V19H20V5H4ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM7.5 11.25H9.5V9H11V15H9.5V12.75H7.5V15H6V9H7.5V11.25ZM14.5 10.5V13.5H16C16.2761 13.5 16.5 13.2761 16.5 13V11C16.5 10.7239 16.2761 10.5 16 10.5H14.5ZM13 9H16C17.1046 9 18 9.89543 18 11V13C18 14.1046 17.1046 15 16 15H13V9Z"})})}const de={dropdownMenuContent:"_dropdownMenuContent_lqxir_1",dropdownMenuItem:"_dropdownMenuItem_lqxir_83",scrollAreaRoot:"_scrollAreaRoot_lqxir_126",scrollAreaViewport:"_scrollAreaViewport_lqxir_133",scrollAreaScrollbar:"_scrollAreaScrollbar_lqxir_139",scrollAreaThumb:"_scrollAreaThumb_lqxir_166"},Mt=ve.Root,Ft=ve.Trigger,Vt=ve.Portal,Ze=f.forwardRef((l,a)=>{var u=l,{sideOffset:e=4,className:t,children:n}=u,r=re(u,["sideOffset","className","children"]);return i.jsx(ve.Content,pe(V({ref:a,sideOffset:e,className:[de.dropdownMenuContent,t].filter(Boolean).join(" "),onOpenAutoFocus:s=>{s.preventDefault()},onCloseAutoFocus:s=>{s.preventDefault()}},r),{children:i.jsxs(Re.Root,{className:de.scrollAreaRoot,type:"always",scrollHideDelay:0,children:[i.jsx(Re.Viewport,{className:de.scrollAreaViewport,children:n}),i.jsx(Re.Scrollbar,{className:de.scrollAreaScrollbar,orientation:"vertical",children:i.jsx(Re.Thumb,{className:de.scrollAreaThumb})})]})}))});Ze.displayName="PlayerMenuContent";const Ke=f.forwardRef((a,r)=>{var l=a,{className:e,onClick:t}=l,n=re(l,["className","onClick"]);const u=c=>{t==null||t(c)},s=c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),t==null||t(c))};return i.jsx(ve.Close,{asChild:!0,children:i.jsx("div",V({ref:r,className:[de.dropdownMenuItem,e].filter(Boolean).join(" "),role:"menuitem",tabIndex:0,onClick:u,onKeyDown:s},n))})});Ke.displayName="PlayerMenuItem";const At="quality";function Ot(){const[e,t]=f.useState(!1),n=h(c=>c.containerRef),r=h(c=>c.addIdleLock),a=h(c=>c.removeIdleLock),l=h(c=>c.levels),u=h(c=>c.setLevel),s=f.useCallback(c=>{t(c),c?r(At):a(At)},[r,a]);return!l||l.length===0?null:i.jsxs(Mt,{open:e,onOpenChange:s,children:[i.jsx(Ft,{asChild:!0,children:i.jsx(ae,{children:i.jsx(Ir,{})})}),i.jsx(Vt,{container:n.current,children:i.jsx(Ze,{side:"top",align:"end",children:l.map(c=>i.jsxs(Ke,{onClick:()=>u(c.value),children:[c.label,c.selected&&i.jsx(Nt,{})]},c.sid))})})]})}function Dr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M6.60282 10.0001L10 7.22056V16.7796L6.60282 14.0001H3V10.0001H6.60282ZM2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"})})}function Nr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M13 7.22056L9.60282 10.0001H6V14.0001H9.60282L13 16.7796V7.22056ZM8.88889 16.0001H5C4.44772 16.0001 4 15.5524 4 15.0001V9.00007C4 8.44778 4.44772 8.00007 5 8.00007H8.88889L14.1834 3.66821C14.3971 3.49335 14.7121 3.52485 14.887 3.73857C14.9601 3.8279 15 3.93977 15 4.05519V19.9449C15 20.2211 14.7761 20.4449 14.5 20.4449C14.3846 20.4449 14.2727 20.405 14.1834 20.3319L8.88889 16.0001ZM18.8631 16.5911L17.4411 15.1691C18.3892 14.4376 19 13.2902 19 12.0001C19 10.5697 18.2493 9.31476 17.1203 8.60766L18.5589 7.16906C20.0396 8.26166 21 10.0187 21 12.0001C21 13.8422 20.1698 15.4905 18.8631 16.5911Z"})})}function Mr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M10 7.22056L6.60282 10.0001H3V14.0001H6.60282L10 16.7796V7.22056ZM5.88889 16.0001H2C1.44772 16.0001 1 15.5524 1 15.0001V9.00007C1 8.44778 1.44772 8.00007 2 8.00007H5.88889L11.1834 3.66821C11.3971 3.49335 11.7121 3.52485 11.887 3.73857C11.9601 3.8279 12 3.93977 12 4.05519V19.9449C12 20.2211 11.7761 20.4449 11.5 20.4449C11.3846 20.4449 11.2727 20.405 11.1834 20.3319L5.88889 16.0001ZM20.4142 12.0001L23.9497 15.5356L22.5355 16.9498L19 13.4143L15.4645 16.9498L14.0503 15.5356L17.5858 12.0001L14.0503 8.46454L15.4645 7.05032L19 10.5859L22.5355 7.05032L23.9497 8.46454L20.4142 12.0001Z"})})}const Ht={volumeContainer:"_volumeContainer_4d6jg_1",volumeSlider:"_volumeSlider_4d6jg_8"},Ut="volume";function Bt(){const e=h(s=>s.setVolume),t=h(s=>s.volume),n=h(s=>s.addIdleLock),r=h(s=>s.removeIdleLock),a=s=>{e(s[0]),n(Ut)},l=()=>{r(Ut)},u=()=>e(t?0:100);return i.jsxs("div",{className:Ht.volumeContainer,children:[i.jsx(ae,{onClick:u,className:"shrink-0",children:t?t>50?i.jsx(Dr,{}):i.jsx(Nr,{}):i.jsx(Mr,{})}),i.jsx("div",{className:Ht.volumeSlider,children:i.jsx(Le,{value:[t],onValueChange:a,onValueCommit:l})})]})}function Fr(e){return i.jsx(cr,{children:i.jsx(Vr,V({},e))})}function Vr({url:e,messages:t={},onEvent:n}){var l,u,s,c;const r=h(d=>d.containerRef),a={eventNotStarted:"Event has not started yet.",eventStartingSoon:"Starting in few seconds...",unableToPlay:"Unable to play the live stream. Please try again later."};return f.useEffect(()=>{console.log(`[Player][Live] Version: ${Be.version}`)},[]),i.jsxs("div",{ref:r,className:Z.playerContainer,children:[i.jsxs(er,{url:e,messages:{eventNotStarted:(l=t==null?void 0:t.eventNotStarted)!=null?l:a.eventNotStarted,eventStartingSoon:(u=t==null?void 0:t.eventStartingSoon)!=null?u:a.eventStartingSoon,unableToPlay:(s=t==null?void 0:t.unableToPlay)!=null?s:a.unableToPlay},children:[i.jsx(dr,{url:e,messages:{unableToPlay:(c=t==null?void 0:t.unableToPlay)!=null?c:a.unableToPlay}}),i.jsx(jt,{}),i.jsx(Dt,{}),i.jsx(gr,{}),i.jsxs(It,{children:[i.jsx("div",{className:Z.controlsTop,children:i.jsx("div",{className:Z.controlsContainer,children:i.jsx("div",{className:Z.controlsRow,children:i.jsx(Er,{})})})}),i.jsx("div",{className:Z.controlsBottom,children:i.jsxs("div",{className:Z.controlsContainer,children:[i.jsx(_r,{}),i.jsxs("div",{className:Z.controlsRow,children:[i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionStart}`,children:[i.jsx(Cr,{}),i.jsx(xr,{}),i.jsx(Bt,{})]}),i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionEnd}`,children:[i.jsx(wr,{message:t==null?void 0:t.live}),i.jsx(Ot,{}),i.jsx(kt,{})]})]})]})})]}),i.jsx(Gn,{url:e}),i.jsx(ar,{}),i.jsx(fr,{url:e})]}),n&&i.jsx(ir,{callback:n})]})}const Ar=[.5,.75,1,1.25,1.5,1.75,2],Wt="playback-rate";function Or(){const[e,t]=f.useState(!1),n=h(c=>c.containerRef),r=h(c=>c.addIdleLock),a=h(c=>c.removeIdleLock),l=h(c=>c.playbackRate),u=h(c=>c.setPlaybackRate),s=f.useCallback(c=>{t(c),c?r(Wt):a(Wt)},[r,a]);return i.jsxs(Mt,{open:e,onOpenChange:s,children:[i.jsx(Ft,{asChild:!0,children:i.jsxs(ae,{children:[l,"x"]})}),i.jsx(Vt,{container:n.current,children:i.jsx(Ze,{side:"top",align:"end",children:Ar.map(c=>i.jsxs(Ke,{onClick:()=>u(c),children:[c,"x",l===c&&i.jsx(Nt,{})]},c))})})]})}function Hr(){const e=h(u=>u.isPlaying),t=h(u=>u.pause),n=h(u=>u.play),r=h(u=>u.currentTime),a=h(u=>u.duration),l=h(u=>u.seek);return i.jsx(Rt,{onClick:()=>{e?t():n()},onBackwardSeek:u=>{const s=Math.max(0,r-u);l(s)},onForwardSeek:u=>{const s=Math.min(r+u,a);l(s)},maxBackwardTime:Math.floor(r),maxForwardTime:Math.floor(a-r)})}function Ur(){const e=h(a=>a.isPlaying),t=h(a=>a.pause),n=h(a=>a.play),r=()=>{e?t():n()};return i.jsx(ae,{onClick:r,children:e?i.jsx(bt,{}):i.jsx(Pt,{})})}const zt="vod-player-progress-bar";function Br(){const e=f.useRef(null),t=f.useRef(null),[n,r]=f.useState(!1),[a,l]=f.useState(-1),[u,s]=f.useState(-1),c=h(P=>P.currentTime),d=h(P=>P.duration),w=h(P=>P.seek),_=h(P=>P.addIdleLock),g=h(P=>P.removeIdleLock),N=parseFloat((d?(u!==-1?u:c)/d*100:0).toFixed(1)),R=P=>{s(d*(P[0]/100)),_(zt)},x=()=>{u!==-1&&(w(u),s(-1),g(zt))},S=()=>r(!0),C=()=>r(!1),j=f.useCallback(P=>{const B=e.current,U=t.current;if(B&&U){const p=je(B),v=je(U),b=(P.pageX||P.clientX)-p.left,I=b/p.width;if(I<0)return;let A=b-v.width/2;A<0&&(A=0),A>p.width-v.width&&(A=-1),U.style.left=A>-1?`${A}px`:"auto",U.style.right=A>-1?"auto":"0px",l(I*d)}S()},[d]);return i.jsxs("div",{className:se.progressSlider,children:[i.jsx(Le,{ref:e,value:[N],onPointerLeave:C,onPointerDown:C,onPointerMove:j,onValueChange:R,onValueCommit:x,step:.1}),i.jsx("div",{ref:t,className:`${se.tipContainer} ${n?se.tipContainerVisible:se.tipContainerHidden}`,children:i.jsx("p",{className:se.tipContent,children:_e(a)})})]})}const Ie={remainingTimeContainer:"_remainingTimeContainer_1yyhb_1",remainingTime:"_remainingTime_1yyhb_1",remainingSeparator:"_remainingSeparator_1yyhb_17"};function Wr(){const e=h(n=>n.currentTime),t=h(n=>n.duration);return i.jsxs("div",{className:Ie.remainingTimeContainer,children:[i.jsx("p",{className:Ie.remainingTime,children:_e(e)}),i.jsx("p",{className:Ie.remainingSeparator}),i.jsx("p",{className:Ie.remainingTime,children:_e(t)})]})}function zr({url:e}){const{video_id:t}=gt(e),n=t?Number(t):void 0;return n?i.jsx(vt,{kind:"vod",url:e,id:n}):null}function Yr({callback:e}){const t=h(n=>n.eventEmitter);return f.useEffect(()=>{const n=r=>e("timeUpdate",r);return t.on("timeUpdate",n),()=>{t.off("timeUpdate",n)}},[e,t]),i.jsx(wt,{callback:e})}function Zr(){const e=h(s=>s.currentTime),t=h(s=>s.duration),n=h(s=>s.isPlaying),r=h(s=>s.pause),a=h(s=>s.play),l=h(s=>s.seek),u=f.useCallback(s=>{let c=!1;if(!(s.target instanceof HTMLInputElement||s.ctrlKey)){switch(s.code){case"ArrowLeft":l(e-10>=0?e-10:0),c=!0;break;case"ArrowRight":l(e+10<t?e+10:t),c=!0;break;case"Space":n?r():a(),c=!0;break}c&&s.preventDefault()}},[e,t,n,r,a,l]);return f.useEffect(()=>(document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}),[u]),i.jsx(Tt,{})}function Kr(e){return i.jsx(xt,{children:i.jsx(Gr,V({},e))})}function Gr({url:e,messages:t,onEvent:n,startTime:r}){var s;const a=h(c=>c.setStartTime),l=h(c=>c.containerRef),u={unableToPlay:"Unable to play the video. Please try again later."};return f.useEffect(()=>{r&&a(r)},[r,a]),f.useEffect(()=>{console.log(`[Player][VOD] Version: ${Be.version}`)},[]),i.jsxs("div",{ref:l,className:Z.playerContainer,children:[i.jsx(Et,{url:e,isLive:!1,messages:{unableToPlay:(s=t==null?void 0:t.unableToPlay)!=null?s:u.unableToPlay}}),i.jsx(jt,{}),i.jsx(Dt,{}),i.jsx(Hr,{}),i.jsx(It,{children:i.jsx("div",{className:Z.controlsBottom,children:i.jsxs("div",{className:Z.controlsContainer,children:[i.jsx(Br,{}),i.jsxs("div",{className:Z.controlsRow,children:[i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionStart}`,children:[i.jsx(Ur,{}),i.jsx(Bt,{}),i.jsx(Wr,{})]}),i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionEnd}`,children:[i.jsx(Or,{}),i.jsx(Ot,{}),i.jsx(kt,{})]})]})]})})}),i.jsx(Zr,{}),i.jsx(zr,{url:e}),n&&i.jsx(Yr,{callback:n})]})}k.LivePlayer=Fr,k.VodPlayer=Kr,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|
|
16
|
+
`);let r=!1;for(const a of n){const l=a.trim();if(l.startsWith("#EXT-X-STREAM-INF:")){r=!0;continue}if(r&&!l.startsWith("#")){if(l.startsWith("http"))return l;{const u=new URL(t);return new URL(l,u.origin+u.pathname.substring(0,u.pathname.lastIndexOf("/"))+"/").toString()}}}return null}function qn(e){return e.replace("playlist.m3u8","playlist_fmp4_dvr.m3u8")}async function $n(e){try{const t=qn(e);console.log("Converting to DVR URL:",t);const n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch master playlist: ${n.status} ${n.statusText}`);const r=await n.text(),a=Qn(r,t);if(!a)throw new Error("No chunklist URL found in master playlist");console.log("Found chunklist URL:",a);const l=await fetch(a);if(!l.ok)throw new Error(`Failed to fetch chunklist: ${l.status} ${l.statusText}`);const u=await l.text(),s=Jn(u);return s?console.log("Successfully detected start time:",s.toISOString()):console.log(" No start time found in chunklist"),s}catch(t){return console.error("Error getting start time from HLS URL:",t),null}}function er(n){var r=n,{url:e}=r,t=re(r,["url"]);const[a,l]=f.useState(!0),u=H(d=>d.startDate),s=H(d=>d.setStartDate),c=f.useCallback(async()=>{const d=await $n(e);d&&s(d)},[e,s]);return f.useEffect(()=>{(async()=>{l(!0),await c(),l(!1)})()},[c]),Ce(c,u?null:5e3),a?null:i.jsx(tr,V({},t))}function tr({children:e,messages:t}){const n=H(u=>u.startDate),r=h(u=>u.isStarted);return Xn(r?null:5e3),n?Date.now()<n.getTime()?i.jsx(nr,{startDate:n,title:t.eventNotStarted,message:t.eventStartingSoon}):i.jsx(i.Fragment,{children:e}):i.jsx("div",{className:oe.playerNotice,children:i.jsx("h3",{className:oe.playerNoticeTitle,children:t.unableToPlay})})}function nr({startDate:e,title:t,message:n}){const r=e.getTime()-Date.now(),a=Math.floor(r/(1e3*60*60)),l=Math.floor(r%(1e3*60*60)/(1e3*60));return a||l?i.jsxs("div",{className:oe.playerNotice,children:[i.jsx("h3",{className:oe.playerNoticeTitle,children:t}),i.jsxs("p",{className:oe.playerNoticeText,children:["(",a>0?`${a}h ${l}m`:`${l}m`,")"]})]}):i.jsx("div",{className:oe.playerNotice,children:i.jsx("h3",{className:oe.playerNoticeTitle,children:n})})}function wt({callback:e}){const t=h(n=>n.eventEmitter);return f.useEffect(()=>{const n=()=>e("play",void 0),r=()=>e("pause",void 0),a=()=>e("resume",void 0),l=()=>e("restart",void 0),u=()=>e("ended",void 0),s=()=>e("seeking",void 0),c=()=>e("seeked",void 0),d=C=>e("volumeChange",C),w=C=>e("fullscreenChange",C),_=C=>e("qualityChange",C),g=C=>e("loadedMetadata",C),N=()=>e("loadStart",void 0),R=()=>e("playing",void 0),x=()=>e("waiting",void 0),S=()=>e("error",void 0);return t.on("play",n),t.on("pause",r),t.on("resume",a),t.on("restart",l),t.on("ended",u),t.on("seeking",s),t.on("seeked",c),t.on("volumeChange",d),t.on("fullscreenChange",w),t.on("qualityChange",_),t.on("loadedMetadata",g),t.on("loadStart",N),t.on("playing",R),t.on("waiting",x),t.on("error",S),()=>{t.off("play",n),t.off("pause",r),t.off("resume",a),t.off("restart",l),t.off("ended",u),t.off("seeking",s),t.off("seeked",c),t.off("volumeChange",d),t.off("fullscreenChange",w),t.off("qualityChange",_),t.off("loadedMetadata",g),t.off("loadStart",N),t.off("playing",R),t.off("waiting",x),t.off("error",S)}},[e,t]),null}const Ct=(e,t=0)=>parseInt(Math.max(0,(Date.now()-(e+t*1e3))/1e3).toFixed(0)),_t=(e,t)=>Math.max(0,(Date.now()-e-t*1e3)/1e3),rr=(e,t)=>Math.max(0,(t-e)/1e3),or=(e,t=0)=>{const r=t<0?0:t,a=["bytes","kb","mb","gb","tb","pb","eb","zb","yb"],l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(r))}${a[l]}`};function sr({isAuto:e,level:t,levels:n}){const r=n.length,a=[];return r>1&&a.push({sid:"quality-level-auto",label:"Auto",value:-1,selected:e||t===-1}),n.sort(function(l,u){const s=l.height||l.bitrate||0,c=u.height||u.bitrate||0;return s===c?0:s>c?1:-1}),n.map(l=>{const{bitrate:u,height:s,index:c}=l;a.push({sid:`quality-level-${c}`,label:s?`${s}p`:or(u),value:c,selected:r===1||!e&&c===t})}),a}function ir({callback:e}){const t=H(l=>l.delay),n=H(l=>l.startDate),r=n?n.getTime():0,a=h(l=>l.eventEmitter);return f.useEffect(()=>{const l=()=>e("timeUpdate",{currentTime:_t(r,t),duration:-1});return a.on("timeUpdate",l),()=>{a.off("timeUpdate",l)}},[e,t,a,r]),i.jsx(wt,{callback:e})}function Tt(){const e=h(s=>s.exitFullscreen),t=h(s=>s.isFullscreen),n=h(s=>s.isFullscreenReady),r=h(s=>s.requestFullscreen),a=h(s=>s.setVolume),l=h(s=>s.volume),u=f.useCallback(s=>{let c=!1;if(!(s.target instanceof HTMLInputElement||s.ctrlKey)){switch(s.code){case"ArrowUp":a(l+10<100?l+10:100),c=!0;break;case"ArrowDown":a(l-10>0?l-10:0),c=!0;break;case"KeyM":a(l===0?100:0),c=!0;break;case"KeyF":n&&(t?e():r(),c=!0);break}c&&s.preventDefault()}},[e,t,n,r,a,l]);return f.useEffect(()=>(document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}),[u]),null}function ar(){const e=H(s=>s.delay),t=h(s=>s.isPlaying),n=h(s=>s.pause),r=h(s=>s.getPauseTimeDiff),a=h(s=>s.play),l=H(s=>s.setDelay),u=f.useCallback(s=>{let c=!1;if(!(s.target instanceof HTMLInputElement||s.ctrlKey)){switch(s.code){case"ArrowLeft":l(e+10),c=!0;break;case"ArrowRight":l(e-10>0?e-10:0),c=!0;break;case"Space":if(t)n();else{const d=r();d&&l(e+d),a()}c=!0;break}c&&s.preventDefault()}},[e,r,t,n,a,l]);return f.useEffect(()=>(document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}),[u]),i.jsx(Tt,{})}function xt({children:e}){return i.jsx(Yn,{children:e})}function cr({children:e}){return i.jsx(Kn,{children:i.jsx(xt,{children:e})})}function lr({url:e,isLive:t,messages:n}){const r=f.useRef(null),a=h(p=>p.level),l=h(p=>p.levels),u=h(p=>p.setLevel),s=h(p=>p.setLevels),c=h(p=>p.logLevel),d=h(p=>p.techRef),w=h(p=>p.setError),_=f.useRef(0),g=f.useRef(null),N=50,R=1e4,x=f.useCallback(p=>{if(r.current&&(r.current.nextLevel=p,u(null),l)){const v=l.map(b=>pe(V({},b),{selected:b.value===p}));s(v)}},[l,u,s]),S=f.useCallback(()=>{if(!d.current)return;console.log("[Player][HLS] MEDIA_ATTACHING");const p=document.createElement("source");p.src=e,p.type="application/vnd.apple.mpegurl",p.dataset.id="original-stream",d.current.appendChild(p),d.current.disableRemotePlayback=!1},[e,d]),C=f.useCallback(()=>{if(!r.current)return;console.log("[Player][HLS] MANIFEST_LOADED"),w(null),g.current&&(clearTimeout(g.current),g.current=null),_.current=0;const p=r.current.levels,v=r.current.currentLevel,b=r.current.autoLevelEnabled;s(sr({levels:p.map((I,A)=>{const{bitrate:M,height:Q,width:K}=I;return{bitrate:M,height:Q,index:A,width:K}}),level:v,isAuto:b}))},[w,s]),j=f.useCallback(()=>{if(!r.current)return;console.log("[Player][HLS] LEVEL_SWITCHED");const p=r.current.levels,v=r.current.currentLevel;if(p[v]?JSON.stringify(p[v]):null){let I="";p[v].height?I=`${p[v].height}p`:p[v].bitrate&&(I=`${p[v].bitrate}bps`),c(I)}},[c]),P=f.useCallback((p,v)=>{if(r.current&&v.fatal){let b,I="UNKNOWN_ERROR";switch(v.type){case $.ErrorTypes.NETWORK_ERROR:b=n.unableToPlay,console.log("[Player][HLS] NETWORK_ERROR",v),t?(_.current<N&&(g.current&&clearTimeout(g.current),_.current+=1,g.current=setTimeout(()=>{if(r.current)try{console.log("[Player][HLS] Retrying stream..."),r.current.loadSource(e)}catch(A){console.error("[Player][HLS] Retry failed:",A)}},R)),I="LIVE_MANIFEST_LOAD_ERROR"):(r.current.startLoad(),I="NETWORK_ERROR"),w({message:b,code:I,tech:"hls"});break;case $.ErrorTypes.MEDIA_ERROR:r.current.recoverMediaError();break}}},[t,e,w,n]),B=f.useCallback(()=>{if(!d.current)return;const p={startLevel:-1,maxBufferSize:30*1024*1024};Ln?(p.backBufferLength=-1,p.enableWorker=!1):t?p.backBufferLength=10:p.backBufferLength=60;try{console.log("[Player][HLS] URL",e),console.log("[Player][HLS] Config",JSON.stringify(p)),console.log("[Player][HLS] Version",$.version),r.current=new $(p),r.current.on($.Events.MEDIA_ATTACHING,S),r.current.on($.Events.MANIFEST_LOADED,C),r.current.on($.Events.LEVEL_SWITCHED,j),r.current.on($.Events.ERROR,P),r.current.attachMedia(d.current),r.current.loadSource(e)}catch(v){throw new Error(`Error initializing Hls: ${v}`)}},[S,C,j,P,t,d,e]),U=f.useCallback(()=>{if(r.current&&(r.current.off($.Events.MEDIA_ATTACHING,S),r.current.off($.Events.MANIFEST_LOADED,C),r.current.off($.Events.LEVEL_SWITCHED,j),r.current.off($.Events.ERROR,P),r.current.destroy(),r.current=null),d.current){const p=d.current;Array.from(p.children).filter(b=>{var I;return((I=b.dataset)==null?void 0:I.id)==="original-stream"}).forEach(b=>p.removeChild(b))}g.current&&(clearTimeout(g.current),g.current=null),_.current=0},[S,j,C,P,d]);return f.useEffect(()=>{a!==null&&x(a)},[a,x]),f.useEffect(()=>($.isSupported()&&B(),U),[U,B]),null}const ur={playerVideo:"_playerVideo_wc0sm_1"};function Et({url:e,isLive:t,isMuted:n=!1,messages:r}){const a=h(v=>v.destroy),l=h(v=>v.handleDurationChange),u=h(v=>v.handleEnd),s=h(v=>v.handleLoadedMetadata),c=h(v=>v.handleLoadStart),d=h(v=>v.handlePause),w=h(v=>v.handlePlay),_=h(v=>v.handlePlaying),g=h(v=>v.handleSeeked),N=h(v=>v.handleSeeking),R=h(v=>v.handleTimeUpdate),x=h(v=>v.handleWaiting),S=h(v=>v.handleVolumeChange),C=h(v=>v.handleError),j=h(v=>v.techRef),P=f.useRef(null),B=()=>t?{onTimeUpdate:U}:{onDurationChange:l,onSeeked:g,onSeeking:N,onTimeUpdate:U},U=()=>{(!P.current||Date.now()-P.current>=1e3)&&(R(),P.current=Date.now())},p=B();return f.useEffect(()=>()=>{a()},[a]),i.jsxs(i.Fragment,{children:[i.jsx(lr,{isLive:t,url:e,messages:r}),i.jsx("video",V({ref:j,className:ur.playerVideo,playsInline:!0,controls:!1,muted:n,preload:"auto",crossOrigin:"anonymous",onEnded:u,onError:C,onLoadedMetadata:s,onLoadStart:c,onPause:d,onPlay:w,onPlaying:_,onWaiting:x,onVolumeChange:S,tabIndex:-1},p))]})}function dr({url:e,messages:t}){const[n,r]=f.useState(null),a=H(u=>u.delay),l=f.useCallback(async()=>{r(a?e.replace("-live","-catchup").replace("playlist.m3u8",`playlist_fmp4_dvr_timeshift-${a}.m3u8`):e)},[a,e]);return f.useEffect(()=>{const u=requestAnimationFrame(()=>l());return()=>cancelAnimationFrame(u)},[l]),n?i.jsx(Et,{url:n,isLive:!0,messages:t}):null}function fr({url:e}){return h(n=>n.isStarted)?i.jsx(hr,{url:e}):null}function hr({url:e}){const t=H(l=>l.setViewerCount),n=f.useRef(null),r=l=>{try{return new URL(l).pathname.split("/").filter(d=>d.length>0)[0]||null}catch(u){return console.error("Failed to extract URI from player URL:",u),null}},a=f.useCallback(async()=>{var c;const l=r(e);if(!l){console.error("Could not extract URI from URL:",e);return}n.current&&n.current.abort(),n.current=new AbortController;const s=`https://${e.includes("staging")?"stg":"prd"}-fitnessanny.spectar.tv/analytics-api/v1/token-info/uri/${l}`;try{const d=await fetch(s,{signal:n.current.signal});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);const _=(c=(await d.json()).count)!=null?c:0;t(_)}catch(d){if(d.name==="AbortError")return;console.error("Failed to fetch viewer count:",d),t(null)}},[t,e]);return f.useEffect(()=>(a(),()=>{n.current&&n.current.abort()}),[a,e]),Ce(a,15e3),null}function mr(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=s=>typeof window=="undefined"?t:window.matchMedia(s).matches,[a,l]=f.useState(()=>n?r(e):t);function u(){l(r(e))}return ft(()=>{if(typeof window=="undefined")return;const s=window.matchMedia(e);return u(),s.addListener?s.addListener(u):s.addEventListener("change",u),()=>{s.removeListener?s.removeListener(u):s.removeEventListener("change",u)}},[e]),a}const ue={playbackButton:"_playbackButton_lgsgw_1",seekIndicator:"_seekIndicator_lgsgw_23",seekIndicatorLeft:"_seekIndicatorLeft_lgsgw_49",seekIndicatorRight:"_seekIndicatorRight_lgsgw_53",seekIndicatorVisible:"_seekIndicatorVisible_lgsgw_57"},pr=10;function Rt(s){var c=s,{className:e,onClick:t,onForwardSeek:n,onBackwardSeek:r,maxForwardTime:a,maxBackwardTime:l}=c,u=re(c,["className","onClick","onForwardSeek","onBackwardSeek","maxForwardTime","maxBackwardTime"]);return mr("(pointer: coarse)")?i.jsx(yr,V({className:e,maxForwardTime:a,maxBackwardTime:l,onForwardSeek:n,onBackwardSeek:r},u)):i.jsx(vr,V({className:e,onClick:t},u))}function vr(r){var a=r,{className:e,onClick:t}=a,n=re(a,["className","onClick"]);const l=f.useRef(null),u=h(x=>x.exitFullscreen),s=h(x=>x.isFullscreen),c=h(x=>x.requestFullscreen),d=h(x=>x.resetIdle),w=x=>{N()?(g(),s?u():c()):_(x)},_=x=>{l.current=window.setTimeout(()=>{t==null||t(x),g()},200)},g=()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)},N=()=>l.current!==null,R=()=>{d()};return f.useEffect(()=>()=>{g()},[]),i.jsx("button",V({onClick:w,onMouseMove:R,className:[ue.playbackButton,e].filter(Boolean).join(" "),"aria-label":"Player gestures"},n))}function yr(u){var s=u,{className:e,maxForwardTime:t,maxBackwardTime:n,onForwardSeek:r,onBackwardSeek:a}=s,l=re(s,["className","maxForwardTime","maxBackwardTime","onForwardSeek","onBackwardSeek"]);const c=f.useRef(null),d=f.useRef({single:null,indicator:null,accumulate:null}),w=f.useRef(null),_=f.useRef(0),g=f.useRef(null),[N,R]=f.useState({visible:!1,direction:null,time:0}),x=h(p=>p.isIdle),S=h(p=>p.setIsIdle),C=h(p=>p.resetIdle),j=(p,v)=>p<v/2?"backward":"forward",P=p=>{if(!w.current)return;const v=p.changedTouches[0];if(!v)return;const b=Date.now(),I=w.current.getBoundingClientRect(),A=v.clientX-I.left,M=v.clientY-I.top;if(A<0||A>I.width||M<0||M>I.height)return;const Q=c.current,K=Q?b-Q.time:1/0,G=j(A,I.width),ie=g.current!==null&&g.current===G&&Q!==null&&K<700&&Math.abs(A-Q.x)<100;if(Q!==null&&g.current===null&&K<300&&Math.abs(A-Q.x)<50||ie){p.preventDefault(),p.stopPropagation(),d.current.single&&(window.clearTimeout(d.current.single),d.current.single=null),C(),(g.current===null||g.current!==G)&&(_.current=0,g.current=G);const ne=G==="backward"?n:t;_.current=Math.min(_.current+pr,ne!=null?ne:1/0),B(G,_.current),d.current.accumulate&&window.clearTimeout(d.current.accumulate),d.current.accumulate=window.setTimeout(()=>{const X=_.current;X>0&&(g.current==="backward"?a==null||a(X):r==null||r(X),C()),_.current=0,g.current=null,c.current=null,U(),d.current.accumulate=null},500),c.current={time:b,x:A}}else{c.current={time:b,x:A},d.current.single&&window.clearTimeout(d.current.single);const ne=g.current!==null?700:350;d.current.single=window.setTimeout(()=>{if(g.current===null){d.current.single=null;const X=x;S(!X),X&&C()}c.current=null},ne)}},B=(p,v)=>{v!==0&&(R({visible:!0,direction:p,time:v}),d.current.indicator&&window.clearTimeout(d.current.indicator),d.current.indicator=window.setTimeout(()=>{U()},700))},U=()=>{R({visible:!1,direction:null,time:0}),d.current.indicator&&(window.clearTimeout(d.current.indicator),d.current.indicator=null)};return f.useEffect(()=>{const p=d.current;return()=>{p!=null&&p.single&&window.clearTimeout(p.single),p!=null&&p.indicator&&window.clearTimeout(p.indicator),p!=null&&p.accumulate&&window.clearTimeout(p.accumulate)}},[]),i.jsxs(i.Fragment,{children:[i.jsx("button",V({ref:w,onTouchEnd:P,className:[ue.playbackButton,e].filter(Boolean).join(" "),"aria-label":"Player gestures"},l)),N.visible&&i.jsxs("div",{className:`${ue.seekIndicator} ${ue.seekIndicatorVisible} ${N.direction==="backward"?ue.seekIndicatorLeft:ue.seekIndicatorRight}`,children:[N.direction==="backward"?"-":"+",_e(N.time)]})]})}function gr(){const e=h(c=>c.isPlaying),t=h(c=>c.pause),n=h(c=>c.getPauseTimeDiff),r=h(c=>c.play),a=H(c=>c.delay),l=H(c=>c.setDelay),u=H(c=>c.startDate),s=u?u.getTime():0;return i.jsx(Rt,{onClick:()=>{if(e)t();else{const c=n();c&&l(a+c),r()}},onBackwardSeek:c=>{const d=a+c;l(d)},onForwardSeek:c=>{const d=Math.max(0,a-c);l(d)},maxBackwardTime:Math.floor(s),maxForwardTime:Math.floor(a)})}const St={playerButton:"_playerButton_izwqq_1",playerButtonCircle:"_playerButtonCircle_izwqq_42"},ae=f.forwardRef((a,r)=>{var l=a,{shape:e="circle",className:t}=l,n=re(l,["shape","className"]);const u=e==="circle"?St.playerButtonCircle:"",s=[St.playerButton,u,t].filter(Boolean).join(" ");return i.jsx("button",V({ref:r,className:s},n))});ae.displayName="PlayerButton";const be={liveIndicator:"_liveIndicator_1jczn_1",liveIndicatorHasDelay:"_liveIndicatorHasDelay_1jczn_9",liveIndicatorNoDelay:"_liveIndicatorNoDelay_1jczn_13"};function wr(n){var r=n,{message:e}=r,t=re(r,["message"]);const a=h(d=>d.restart),l=H(d=>d.delay),u=H(d=>d.setDelay),s=()=>{l&&(a(),u(0))},c=l?`${be.liveIndicator} ${be.liveIndicatorHasDelay}`:`${be.liveIndicator} ${be.liveIndicatorNoDelay}`;return i.jsxs(ae,pe(V({onClick:s,shape:"square"},t),{children:[i.jsx("div",{className:c}),e||"Live"]}))}function bt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M6 5H8V19H6V5ZM16 5H18V19H16V5Z"})})}function Pt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z"})})}function Cr(){const e=h(s=>s.isPlaying),t=h(s=>s.pause),n=h(s=>s.getPauseTimeDiff),r=h(s=>s.play),a=H(s=>s.delay),l=H(s=>s.setDelay),u=()=>{if(e)t();else{const s=n();s&&l(a+s),r()}};return i.jsx(ae,{onClick:u,children:e?i.jsx(bt,{}):i.jsx(Pt,{})})}const se={progressSlider:"_progressSlider_hwzgf_1",tipContainer:"_tipContainer_hwzgf_7",tipContainerVisible:"_tipContainerVisible_hwzgf_17",tipContainerHidden:"_tipContainerHidden_hwzgf_22",tipContent:"_tipContent_hwzgf_27"},Pe={sliderRoot:"_sliderRoot_aeak6_1",sliderTrack:"_sliderTrack_aeak6_18",sliderRange:"_sliderRange_aeak6_28",sliderThumb:"_sliderThumb_aeak6_37"},Le=f.forwardRef((l,a)=>{var u=l,{max:e=100,min:t=0,className:n}=u,r=re(u,["max","min","className"]);return i.jsxs(Ee.Root,pe(V({ref:a,min:t,max:e,"aria-label":"Player progress",className:[Pe.sliderRoot,n].filter(Boolean).join(" "),onKeyDown:s=>s.preventDefault()},r),{children:[i.jsx(Ee.Track,{className:Pe.sliderTrack,children:i.jsx(Ee.Range,{className:Pe.sliderRange})}),i.jsx(Ee.Thumb,{className:Pe.sliderThumb})]}))});Le.displayName="PlayerSlider";function je(e){const t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight?{left:t.left*100,right:t.right*100,top:t.top*100,bottom:t.bottom*100,width:t.width*100,height:t.height*100}:t}const Lt="vod-player-progress-bar";function _r(){const e=f.useRef(null),t=f.useRef(null),[n,r]=f.useState(0),[a,l]=f.useState(0),[u,s]=f.useState(!1),[c,d]=f.useState(-1),[w,_]=f.useState(-1),g=H(M=>M.delay),N=H(M=>M.startDate),R=N?N.getTime():0,x=new Date().getTime(),S=H(M=>M.setDelay),C=h(M=>M.isPlaying),j=h(M=>M.addIdleLock),P=h(M=>M.removeIdleLock),B=f.useCallback(()=>{r(_t(R,g)),l(rr(R,x))},[g,x,R]),U=parseFloat((a?(w!==-1?w:n)/a*100:0).toFixed(1)),p=M=>{_(a*(M[0]/100)),j(Lt)},v=()=>{if(w!==-1){const M=Ct(R,w);S(M),_(-1),P(Lt)}},b=()=>s(!0),I=()=>s(!1),A=f.useCallback(M=>{const Q=e.current,K=t.current;if(Q&&K){const G=je(Q),ie=je(K),fe=(M.pageX||M.clientX)-G.left,ne=fe/G.width;if(ne<0)return;let X=fe-ie.width/2;X<0&&(X=0),X>G.width-ie.width&&(X=-1),K.style.left=X>-1?`${X}px`:"auto",K.style.right=X>-1?"auto":"0px";const Te=a-ne*a;d(Te>0?Te:0)}b()},[a]);return Ce(()=>B(),C?1e3:null),f.useEffect(()=>{const M=requestAnimationFrame(()=>B());return()=>cancelAnimationFrame(M)},[B]),i.jsxs("div",{className:se.progressSlider,children:[i.jsx(Le,{ref:e,value:[U],onPointerLeave:I,onPointerDown:I,onPointerMove:A,onValueChange:p,onValueCommit:v,step:.1}),i.jsx("div",{ref:t,className:`${se.tipContainer} ${u?se.tipContainerVisible:se.tipContainerHidden}`,children:i.jsx("p",{className:se.tipContent,children:`-${_e(c)}`})})]})}function Tr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M22 12C22 17.5228 17.5229 22 12 22C6.4772 22 2 17.5228 2 12C2 6.47715 6.4772 2 12 2V4C7.5817 4 4 7.58172 4 12C4 16.4183 7.5817 20 12 20C16.4183 20 20 16.4183 20 12C20 9.53614 18.8862 7.33243 17.1346 5.86492L15 8V2L21 2L18.5535 4.44656C20.6649 6.28002 22 8.9841 22 12Z"})})}function xr(){const e=H(a=>a.startDate),t=H(a=>a.setDelay),n=e?e.getTime():0,r=()=>t(Ct(n));return i.jsx(ae,{onClick:r,children:i.jsx(Tr,{})})}const ke={viewersContainer:"_viewersContainer_z1ihz_1",viewersIndicator:"_viewersIndicator_z1ihz_16",viewersIcon:"_viewersIcon_z1ihz_24",viewersCount:"_viewersCount_z1ihz_28"};function Er(){const e=H(t=>t.viewerCount);return e?i.jsxs("div",{className:ke.viewersContainer,children:[i.jsx("span",{className:ke.viewersIndicator}),i.jsxs("svg",{className:ke.viewersIcon,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("path",{d:"M8 7C9.10457 7 10 6.10457 10 5C10 3.89543 9.10457 3 8 3C6.89543 3 6 3.89543 6 5C6 6.10457 6.89543 7 8 7Z",fill:"currentColor"}),i.jsx("path",{d:"M8 8C5.79086 8 4 9.79086 4 12V13H12V12C12 9.79086 10.2091 8 8 8Z",fill:"currentColor"})]}),i.jsx("span",{className:ke.viewersCount,children:e.toLocaleString()})]}):null}function jt(){const e=h(n=>n.error);if(!e)return null;const t=e.code==="LIVE_MANIFEST_LOAD_ERROR";return i.jsx("div",{className:`${oe.playerNotice} ${t?oe.playerNoticeLowZIndex:""}`,children:i.jsx("h3",{className:oe.playerNoticeTitle,children:e.message})})}const Z={playerContainer:"_playerContainer_146tx_1",controlsTop:"_controlsTop_146tx_12",controlsBottom:"_controlsBottom_146tx_29",controlsContainer:"_controlsContainer_146tx_45",controlsRow:"_controlsRow_146tx_61",controlsSection:"_controlsSection_146tx_68",controlsSectionStart:"_controlsSectionStart_146tx_78",controlsSectionEnd:"_controlsSectionEnd_146tx_82"};function Rr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z"})})}function Sr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"})})}function kt(){const e=h(d=>d.containerRef),t=h(d=>d.exitFullscreen),n=h(d=>d.isFullscreen),r=h(d=>d.requestFullscreen),a=h(d=>d.setIsFullscreen),l=h(d=>d.setIsFullscreenReady),u=h(d=>d.techRef),s=f.useCallback(d=>{d.stopPropagation(),a(jn())},[a]),c=()=>{n?t():r()};return f.useEffect(()=>{const d=mt?u.current:e.current;if(d)return Dn(d,s)},[e,s,u]),f.useEffect(()=>{l(!0)},[l]),i.jsx(ae,{onClick:c,children:n?i.jsx(Sr,{}):i.jsx(Rr,{})})}const Ye={idleCheckContainer:"_idleCheckContainer_crh2s_1",idleCheckContainerIdle:"_idleCheckContainerIdle_crh2s_5",idleCheckContainerActive:"_idleCheckContainerActive_crh2s_11"},br=5*1e3;function It({children:e}){const t=f.useRef(null),n=h(g=>g.isIdle),r=h(g=>g.setIsIdle),a=f.useRef(null),u=h(g=>g.idleLocks).size,s=h(g=>g.eventEmitter),c=f.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null)},[]),d=f.useCallback(()=>{c(),a.current=window.setTimeout(()=>r(!0),br)},[c,r]);f.useEffect(()=>(r(!1),d(),()=>{c()}),[c,r,d]),f.useEffect(()=>{const g=()=>{r(!1),d()};return s.on("resetIdle",g),()=>{s.off("resetIdle",g)}},[s,r,d]);const w=n&&!u,_=`${Ye.idleCheckContainer} ${w?Ye.idleCheckContainerIdle:Ye.idleCheckContainerActive}`;return i.jsx("div",{ref:t,className:_,children:e})}const Pr={spinner:"_spinner_oo4hi_10"};function Lr(e){return i.jsx("div",V({className:Pr.spinner},e))}function jr(e,t=500){const[n,r]=f.useState(e);return f.useEffect(()=>{const a=window.setTimeout(()=>r(e),t);return()=>{window.clearTimeout(a)}},[e,t]),n}const kr={loadingContainer:"_loadingContainer_v9v7r_1"};function Dt(n){var r=n,{style:e}=r,t=re(r,["style"]);const a=h(u=>u.isLoading);return jr(a,100)?i.jsx("div",pe(V({className:kr.loadingContainer,style:e},t),{children:i.jsx(Lr,{})})):null}function Nt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"})})}function Ir(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M4 5V19H20V5H4ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM7.5 11.25H9.5V9H11V15H9.5V12.75H7.5V15H6V9H7.5V11.25ZM14.5 10.5V13.5H16C16.2761 13.5 16.5 13.2761 16.5 13V11C16.5 10.7239 16.2761 10.5 16 10.5H14.5ZM13 9H16C17.1046 9 18 9.89543 18 11V13C18 14.1046 17.1046 15 16 15H13V9Z"})})}const de={dropdownMenuContent:"_dropdownMenuContent_zi433_1",dropdownMenuItem:"_dropdownMenuItem_zi433_77",scrollAreaRoot:"_scrollAreaRoot_zi433_120",scrollAreaViewport:"_scrollAreaViewport_zi433_127",scrollAreaScrollbar:"_scrollAreaScrollbar_zi433_133",scrollAreaThumb:"_scrollAreaThumb_zi433_160"},Mt=ve.Root,Ft=ve.Trigger,Vt=ve.Portal,Ze=f.forwardRef((l,a)=>{var u=l,{sideOffset:e=4,className:t,children:n}=u,r=re(u,["sideOffset","className","children"]);return i.jsx(ve.Content,pe(V({ref:a,sideOffset:e,className:[de.dropdownMenuContent,t].filter(Boolean).join(" "),onOpenAutoFocus:s=>{s.preventDefault()},onCloseAutoFocus:s=>{s.preventDefault()}},r),{children:i.jsxs(Re.Root,{className:de.scrollAreaRoot,type:"always",scrollHideDelay:0,children:[i.jsx(Re.Viewport,{className:de.scrollAreaViewport,children:n}),i.jsx(Re.Scrollbar,{className:de.scrollAreaScrollbar,orientation:"vertical",children:i.jsx(Re.Thumb,{className:de.scrollAreaThumb})})]})}))});Ze.displayName="PlayerMenuContent";const Ke=f.forwardRef((a,r)=>{var l=a,{className:e,onClick:t}=l,n=re(l,["className","onClick"]);const u=c=>{t==null||t(c)},s=c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),t==null||t(c))};return i.jsx(ve.Close,{asChild:!0,children:i.jsx("div",V({ref:r,className:[de.dropdownMenuItem,e].filter(Boolean).join(" "),role:"menuitem",tabIndex:0,onClick:u,onKeyDown:s},n))})});Ke.displayName="PlayerMenuItem";const At="quality";function Ot(){const[e,t]=f.useState(!1),n=h(c=>c.containerRef),r=h(c=>c.addIdleLock),a=h(c=>c.removeIdleLock),l=h(c=>c.levels),u=h(c=>c.setLevel),s=f.useCallback(c=>{t(c),c?r(At):a(At)},[r,a]);return!l||l.length===0?null:i.jsxs(Mt,{open:e,onOpenChange:s,children:[i.jsx(Ft,{asChild:!0,children:i.jsx(ae,{children:i.jsx(Ir,{})})}),i.jsx(Vt,{container:n.current,children:i.jsx(Ze,{side:"top",align:"end",children:l.map(c=>i.jsxs(Ke,{onClick:()=>u(c.value),children:[c.label,c.selected&&i.jsx(Nt,{})]},c.sid))})})]})}function Dr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M6.60282 10.0001L10 7.22056V16.7796L6.60282 14.0001H3V10.0001H6.60282ZM2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"})})}function Nr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M13 7.22056L9.60282 10.0001H6V14.0001H9.60282L13 16.7796V7.22056ZM8.88889 16.0001H5C4.44772 16.0001 4 15.5524 4 15.0001V9.00007C4 8.44778 4.44772 8.00007 5 8.00007H8.88889L14.1834 3.66821C14.3971 3.49335 14.7121 3.52485 14.887 3.73857C14.9601 3.8279 15 3.93977 15 4.05519V19.9449C15 20.2211 14.7761 20.4449 14.5 20.4449C14.3846 20.4449 14.2727 20.405 14.1834 20.3319L8.88889 16.0001ZM18.8631 16.5911L17.4411 15.1691C18.3892 14.4376 19 13.2902 19 12.0001C19 10.5697 18.2493 9.31476 17.1203 8.60766L18.5589 7.16906C20.0396 8.26166 21 10.0187 21 12.0001C21 13.8422 20.1698 15.4905 18.8631 16.5911Z"})})}function Mr(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M10 7.22056L6.60282 10.0001H3V14.0001H6.60282L10 16.7796V7.22056ZM5.88889 16.0001H2C1.44772 16.0001 1 15.5524 1 15.0001V9.00007C1 8.44778 1.44772 8.00007 2 8.00007H5.88889L11.1834 3.66821C11.3971 3.49335 11.7121 3.52485 11.887 3.73857C11.9601 3.8279 12 3.93977 12 4.05519V19.9449C12 20.2211 11.7761 20.4449 11.5 20.4449C11.3846 20.4449 11.2727 20.405 11.1834 20.3319L5.88889 16.0001ZM20.4142 12.0001L23.9497 15.5356L22.5355 16.9498L19 13.4143L15.4645 16.9498L14.0503 15.5356L17.5858 12.0001L14.0503 8.46454L15.4645 7.05032L19 10.5859L22.5355 7.05032L23.9497 8.46454L20.4142 12.0001Z"})})}const Ht={volumeContainer:"_volumeContainer_4d6jg_1",volumeSlider:"_volumeSlider_4d6jg_8"},Ut="volume";function Bt(){const e=h(s=>s.setVolume),t=h(s=>s.volume),n=h(s=>s.addIdleLock),r=h(s=>s.removeIdleLock),a=s=>{e(s[0]),n(Ut)},l=()=>{r(Ut)},u=()=>e(t?0:100);return i.jsxs("div",{className:Ht.volumeContainer,children:[i.jsx(ae,{onClick:u,className:"shrink-0",children:t?t>50?i.jsx(Dr,{}):i.jsx(Nr,{}):i.jsx(Mr,{})}),i.jsx("div",{className:Ht.volumeSlider,children:i.jsx(Le,{value:[t],onValueChange:a,onValueCommit:l})})]})}function Fr(e){return i.jsx(cr,{children:i.jsx(Vr,V({},e))})}function Vr({url:e,messages:t={},onEvent:n}){var l,u,s,c;const r=h(d=>d.containerRef),a={eventNotStarted:"Event has not started yet.",eventStartingSoon:"Starting in few seconds...",unableToPlay:"Unable to play the live stream. Please try again later."};return f.useEffect(()=>{console.log(`[Player][Live] Version: ${Be.version}`)},[]),i.jsxs("div",{ref:r,className:Z.playerContainer,children:[i.jsxs(er,{url:e,messages:{eventNotStarted:(l=t==null?void 0:t.eventNotStarted)!=null?l:a.eventNotStarted,eventStartingSoon:(u=t==null?void 0:t.eventStartingSoon)!=null?u:a.eventStartingSoon,unableToPlay:(s=t==null?void 0:t.unableToPlay)!=null?s:a.unableToPlay},children:[i.jsx(dr,{url:e,messages:{unableToPlay:(c=t==null?void 0:t.unableToPlay)!=null?c:a.unableToPlay}}),i.jsx(jt,{}),i.jsx(Dt,{}),i.jsx(gr,{}),i.jsxs(It,{children:[i.jsx("div",{className:Z.controlsTop,children:i.jsx("div",{className:Z.controlsContainer,children:i.jsx("div",{className:Z.controlsRow,children:i.jsx(Er,{})})})}),i.jsx("div",{className:Z.controlsBottom,children:i.jsxs("div",{className:Z.controlsContainer,children:[i.jsx(_r,{}),i.jsxs("div",{className:Z.controlsRow,children:[i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionStart}`,children:[i.jsx(Cr,{}),i.jsx(xr,{}),i.jsx(Bt,{})]}),i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionEnd}`,children:[i.jsx(wr,{message:t==null?void 0:t.live}),i.jsx(Ot,{}),i.jsx(kt,{})]})]})]})})]}),i.jsx(Gn,{url:e}),i.jsx(ar,{}),i.jsx(fr,{url:e})]}),n&&i.jsx(ir,{callback:n})]})}const Ar=[.5,.75,1,1.25,1.5,1.75,2],zt="playback-rate";function Or(){const[e,t]=f.useState(!1),n=h(c=>c.containerRef),r=h(c=>c.addIdleLock),a=h(c=>c.removeIdleLock),l=h(c=>c.playbackRate),u=h(c=>c.setPlaybackRate),s=f.useCallback(c=>{t(c),c?r(zt):a(zt)},[r,a]);return i.jsxs(Mt,{open:e,onOpenChange:s,children:[i.jsx(Ft,{asChild:!0,children:i.jsxs(ae,{children:[l,"x"]})}),i.jsx(Vt,{container:n.current,children:i.jsx(Ze,{side:"top",align:"end",children:Ar.map(c=>i.jsxs(Ke,{onClick:()=>u(c),children:[c,"x",l===c&&i.jsx(Nt,{})]},c))})})]})}function Hr(){const e=h(u=>u.isPlaying),t=h(u=>u.pause),n=h(u=>u.play),r=h(u=>u.currentTime),a=h(u=>u.duration),l=h(u=>u.seek);return i.jsx(Rt,{onClick:()=>{e?t():n()},onBackwardSeek:u=>{const s=Math.max(0,r-u);l(s)},onForwardSeek:u=>{const s=Math.min(r+u,a);l(s)},maxBackwardTime:Math.floor(r),maxForwardTime:Math.floor(a-r)})}function Ur(){const e=h(a=>a.isPlaying),t=h(a=>a.pause),n=h(a=>a.play),r=()=>{e?t():n()};return i.jsx(ae,{onClick:r,children:e?i.jsx(bt,{}):i.jsx(Pt,{})})}const Wt="vod-player-progress-bar";function Br(){const e=f.useRef(null),t=f.useRef(null),[n,r]=f.useState(!1),[a,l]=f.useState(-1),[u,s]=f.useState(-1),c=h(P=>P.currentTime),d=h(P=>P.duration),w=h(P=>P.seek),_=h(P=>P.addIdleLock),g=h(P=>P.removeIdleLock),N=parseFloat((d?(u!==-1?u:c)/d*100:0).toFixed(1)),R=P=>{s(d*(P[0]/100)),_(Wt)},x=()=>{u!==-1&&(w(u),s(-1),g(Wt))},S=()=>r(!0),C=()=>r(!1),j=f.useCallback(P=>{const B=e.current,U=t.current;if(B&&U){const p=je(B),v=je(U),b=(P.pageX||P.clientX)-p.left,I=b/p.width;if(I<0)return;let A=b-v.width/2;A<0&&(A=0),A>p.width-v.width&&(A=-1),U.style.left=A>-1?`${A}px`:"auto",U.style.right=A>-1?"auto":"0px",l(I*d)}S()},[d]);return i.jsxs("div",{className:se.progressSlider,children:[i.jsx(Le,{ref:e,value:[N],onPointerLeave:C,onPointerDown:C,onPointerMove:j,onValueChange:R,onValueCommit:x,step:.1}),i.jsx("div",{ref:t,className:`${se.tipContainer} ${n?se.tipContainerVisible:se.tipContainerHidden}`,children:i.jsx("p",{className:se.tipContent,children:_e(a)})})]})}const Ie={remainingTimeContainer:"_remainingTimeContainer_1yyhb_1",remainingTime:"_remainingTime_1yyhb_1",remainingSeparator:"_remainingSeparator_1yyhb_17"};function zr(){const e=h(n=>n.currentTime),t=h(n=>n.duration);return i.jsxs("div",{className:Ie.remainingTimeContainer,children:[i.jsx("p",{className:Ie.remainingTime,children:_e(e)}),i.jsx("p",{className:Ie.remainingSeparator}),i.jsx("p",{className:Ie.remainingTime,children:_e(t)})]})}function Wr({url:e}){const{video_id:t}=gt(e),n=t?Number(t):void 0;return n?i.jsx(vt,{kind:"vod",url:e,id:n}):null}function Yr({callback:e}){const t=h(n=>n.eventEmitter);return f.useEffect(()=>{const n=r=>e("timeUpdate",r);return t.on("timeUpdate",n),()=>{t.off("timeUpdate",n)}},[e,t]),i.jsx(wt,{callback:e})}function Zr(){const e=h(s=>s.currentTime),t=h(s=>s.duration),n=h(s=>s.isPlaying),r=h(s=>s.pause),a=h(s=>s.play),l=h(s=>s.seek),u=f.useCallback(s=>{let c=!1;if(!(s.target instanceof HTMLInputElement||s.ctrlKey)){switch(s.code){case"ArrowLeft":l(e-10>=0?e-10:0),c=!0;break;case"ArrowRight":l(e+10<t?e+10:t),c=!0;break;case"Space":n?r():a(),c=!0;break}c&&s.preventDefault()}},[e,t,n,r,a,l]);return f.useEffect(()=>(document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}),[u]),i.jsx(Tt,{})}function Kr(e){return i.jsx(xt,{children:i.jsx(Gr,V({},e))})}function Gr({url:e,messages:t,onEvent:n,startTime:r}){var s;const a=h(c=>c.setStartTime),l=h(c=>c.containerRef),u={unableToPlay:"Unable to play the video. Please try again later."};return f.useEffect(()=>{r&&a(r)},[r,a]),f.useEffect(()=>{console.log(`[Player][VOD] Version: ${Be.version}`)},[]),i.jsxs("div",{ref:l,className:Z.playerContainer,children:[i.jsx(Et,{url:e,isLive:!1,messages:{unableToPlay:(s=t==null?void 0:t.unableToPlay)!=null?s:u.unableToPlay}}),i.jsx(jt,{}),i.jsx(Dt,{}),i.jsx(Hr,{}),i.jsx(It,{children:i.jsx("div",{className:Z.controlsBottom,children:i.jsxs("div",{className:Z.controlsContainer,children:[i.jsx(Br,{}),i.jsxs("div",{className:Z.controlsRow,children:[i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionStart}`,children:[i.jsx(Ur,{}),i.jsx(Bt,{}),i.jsx(zr,{})]}),i.jsxs("div",{className:`${Z.controlsSection} ${Z.controlsSectionEnd}`,children:[i.jsx(Or,{}),i.jsx(Ot,{}),i.jsx(kt,{})]})]})]})})}),i.jsx(Zr,{}),i.jsx(Wr,{url:e}),n&&i.jsx(Yr,{callback:n})]})}k.LivePlayer=Fr,k.VodPlayer=Kr,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|
|
17
17
|
//# sourceMappingURL=react-video-player.umd.js.map
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._playerNotice_x3acc_1{position:absolute;top:0;left:0;width:100%;height:100%;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff;background:#000;pointer-events:none;user-select:none}._playerNoticeTitle_x3acc_19{margin:0;padding:.5rem 0;font-size:1rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500}._playerNoticeText_x3acc_28{margin:0;height:1.25rem;font-size:.875rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500}._playerNoticeLowZIndex_x3acc_37{z-index:5}@media (min-width: 768px){._playerNoticeTitle_x3acc_19{font-size:1.25rem}._playerNoticeText_x3acc_28{font-size:1rem}}._playerVideo_wc0sm_1{position:relative;width:100%;height:100%}@media (min-width: 768px){._playerVideo_wc0sm_1{pointer-events:none}}._playbackButton_lgsgw_1{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;cursor:default;align-items:center;justify-content:center;margin:0;padding:0;outline:none;background:none;border:none;-webkit-tap-highlight-color:transparent}._playbackButton_lgsgw_1:focus{outline:none}._seekIndicator_lgsgw_23{position:absolute;top:50%;width:50%;display:flex;align-items:center;justify-content:center;padding:.25rem .5rem;font-variant-numeric:tabular-nums;font-size:1rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;line-height:1;user-select:none;outline:none;color:#fff;text-shadow:0 0 .5rem rgba(0,0,0,.5);border-radius:1rem;transform:translateY(-50%);pointer-events:none;opacity:0;transition:opacity .2s ease-in-out;-webkit-tap-highlight-color:transparent}._seekIndicatorLeft_lgsgw_49{left:0}._seekIndicatorRight_lgsgw_53{right:0}._seekIndicatorVisible_lgsgw_57{opacity:1}._playerButton_izwqq_1{margin:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;cursor:pointer;color:#fff;background:none;border:none;border-radius:1rem;transition:color .2s ease-in-out;-webkit-tap-highlight-color:transparent}._playerButton_izwqq_1 svg{width:1.25rem;height:1.25rem;flex-shrink:0;pointer-events:none}._playerButton_izwqq_1:hover,._button_izwqq_29:focus{color:#fffc}._playerButton_izwqq_1:focus{outline:none}._playerButton_izwqq_1:disabled{opacity:.5;cursor:not-allowed}._playerButtonCircle_izwqq_42{padding:0;width:2rem;height:2rem}._liveIndicator_1jczn_1{margin-right:.5rem;width:.4rem;height:.4rem;border-radius:.2rem;transition:background-color .2s ease}._liveIndicatorHasDelay_1jczn_9{background:gray}._liveIndicatorNoDelay_1jczn_13{background:red}._progressSlider_hwzgf_1{position:relative;width:100%;margin-bottom:-.25rem}._tipContainer_hwzgf_7{position:absolute;bottom:1.5rem;left:0;z-index:10;pointer-events:none;user-select:none;transition:opacity .2s ease-in-out,transform .2s ease-in-out}._tipContainerVisible_hwzgf_17{opacity:1;transform:translateY(0)}._tipContainerHidden_hwzgf_22{opacity:0;transform:translateY(-.5rem)}._tipContent_hwzgf_27{margin:0;padding:.25rem .5rem;font-variant-numeric:tabular-nums;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;text-align:center;color:#000;background:#fff;border-radius:1rem}._sliderRoot_aeak6_1{position:relative;display:flex;align-items:center;width:100%;height:1rem;touch-action:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent}._sliderRoot_aeak6_1[data-disabled]{cursor:not-allowed;opacity:.5}._sliderTrack_aeak6_18{position:relative;height:.25rem;flex-grow:1;background:#fff3;border-radius:1rem;overflow:hidden;-webkit-tap-highlight-color:transparent}._sliderRange_aeak6_28{position:absolute;height:100%;background:#f7e406;transition:width .2s ease-in-out;border-radius:1rem;-webkit-tap-highlight-color:transparent}._sliderThumb_aeak6_37{display:block;width:.875rem;height:.875rem;cursor:pointer;background:#fff;transition:all .2s ease-in-out;box-shadow:0 .125rem .25rem #0003;border-radius:50%;-webkit-tap-highlight-color:transparent}._sliderThumb_aeak6_37:hover{box-shadow:0 .25rem .5rem #0006}._sliderThumb_aeak6_37:focus{outline:none;box-shadow:0 0 0 .125rem #f7e40680}._sliderThumb_aeak6_37[data-disabled]{cursor:not-allowed;opacity:.5}._viewersContainer_z1ihz_1{display:flex;align-items:center;padding:.25rem .5rem;color:#fff;font-size:.875rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;background:#000c;border-radius:1rem;pointer-events:none;user-select:none}._viewersIndicator_z1ihz_16{width:.4rem;height:.4rem;background-color:red;border-radius:.2rem;margin-right:.15rem}._viewersIcon_z1ihz_24{flex-shrink:0}._viewersCount_z1ihz_28{margin-left:.15rem;line-height:1}._playerContainer_146tx_1{position:absolute;top:0;left:0;width:100%;height:100%;color:#fff;background:#000;overflow:hidden}._controlsTop_146tx_12{position:absolute;left:0;width:100%;top:0;z-index:10;background:linear-gradient(to bottom,rgba(0,0,0,.6),transparent);padding-top:.5rem;padding-bottom:1rem}@media (min-width: 768px){._controlsTop_146tx_12{padding-bottom:2rem}}._controlsBottom_146tx_29{position:absolute;left:0;width:100%;bottom:0;z-index:10;background:linear-gradient(to top,rgba(0,0,0,.6),transparent);padding-top:1rem}@media (min-width: 768px){._controlsBottom_146tx_29{padding-top:2rem}}._controlsContainer_146tx_45{display:flex;flex-direction:column;padding-left:.5rem;padding-right:.5rem;line-height:1;font-size:0}@media (min-width: 768px){._controlsContainer_146tx_45{padding-left:1rem;padding-right:1rem}}._controlsRow_146tx_61{display:flex;padding:.5rem 0;width:100%;align-items:center}._controlsSection_146tx_68{display:flex;flex:1;align-items:center}._controlsSection_146tx_68>:not(:last-child){margin-right:.5rem}._controlsSectionStart_146tx_78{justify-content:flex-start}._controlsSectionEnd_146tx_82{justify-content:flex-end}._idleCheckContainer_crh2s_1{transition:opacity .2s ease-in-out}._idleCheckContainerIdle_crh2s_5{cursor:none;opacity:0;pointer-events:none}._idleCheckContainerActive_crh2s_11{cursor:auto;opacity:1}@keyframes _spin_oo4hi_10{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._spinner_oo4hi_10{width:1.5rem;height:1.5rem;border:2px solid white;border-bottom-color:transparent;border-radius:50%;animation:_spin_oo4hi_10 1s linear infinite}._loadingContainer_v9v7r_1{pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;display:flex;width:100%;height:100%;align-items:center;justify-content:center}._dropdownMenuContent_lqxir_1{display:flex;flex-direction:column;padding:0;width:9rem;height:7rem;max-height:7rem;background:#000c;border-radius:.25rem;animation-duration:.4s;animation-timing-function:cubic-bezier(.16,1,.3,1);will-change:transform,opacity;z-index:1000;overflow:hidden}@media (min-width: 768px){._dropdownMenuContent_lqxir_1{height:12rem}}._dropdownMenuContent_lqxir_1[data-state=open][data-side=top]{animation-name:_slideDownAndFade_lqxir_1}._dropdownMenuContent_lqxir_1[data-state=open][data-side=right]{animation-name:_slideLeftAndFade_lqxir_1}._dropdownMenuContent_lqxir_1[data-state=open][data-side=bottom]{animation-name:_slideUpAndFade_lqxir_1}._dropdownMenuContent_lqxir_1[data-state=open][data-side=left]{animation-name:_slideRightAndFade_lqxir_1}@keyframes _slideUpAndFade_lqxir_1{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes _slideRightAndFade_lqxir_1{0%{opacity:0;transform:translate(-2px)}to{opacity:1;transform:translate(0)}}@keyframes _slideDownAndFade_lqxir_1{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}@keyframes _slideLeftAndFade_lqxir_1{0%{opacity:0;transform:translate(2px)}to{opacity:1;transform:translate(0)}}._dropdownMenuItem_lqxir_83{position:relative;display:flex;align-items:center;justify-content:space-between;height:1.75rem;padding:.5rem;cursor:pointer;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;line-height:1;user-select:none;outline:none;color:#fff;transition:color .2s ease;-webkit-tap-highlight-color:transparent}._dropdownMenuItem_lqxir_83 svg{width:1rem;height:1rem;flex-shrink:0;pointer-events:none}._dropdownMenuItem_lqxir_83:hover,._dropdownMenuItem_lqxir_83:focus{color:#fffc}._dropdownMenuItem_lqxir_83:focus{outline:none}._dropdownMenuItem_lqxir_83[data-disabled]{color:#ffffff80;pointer-events:none}._scrollAreaRoot_lqxir_126{width:100%;flex:1;min-height:0;overflow:hidden}._scrollAreaViewport_lqxir_133{width:100%;height:100%;-webkit-overflow-scrolling:touch}._scrollAreaScrollbar_lqxir_139{display:flex;user-select:none;touch-action:none;padding:.125rem;background:transparent;transition:background-color .2s ease-out;width:.5rem}._scrollAreaScrollbar_lqxir_139[data-orientation=vertical]{width:.5rem}._scrollAreaScrollbar_lqxir_139[data-orientation=horizontal]{flex-direction:column;height:.75rem}._scrollAreaScrollbar_lqxir_139[data-state=visible]{animation:_fadeIn_lqxir_1 .15s ease-out}._scrollAreaScrollbar_lqxir_139[data-state=hidden]{animation:_fadeOut_lqxir_1 .15s ease-out}._scrollAreaThumb_lqxir_166{flex:1;background:#ffffff4d;border-radius:.375rem;position:relative;transition:background-color .2s ease-out}._scrollAreaThumb_lqxir_166:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:2.25rem;min-height:2.25rem}._scrollAreaThumb_lqxir_166:hover{background:#ffffff80}@keyframes _fadeIn_lqxir_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_lqxir_1{0%{opacity:1}to{opacity:0}}._volumeContainer_4d6jg_1{display:flex;align-items:center;width:3rem;transition:all .2s ease-in-out}._volumeSlider_4d6jg_8{margin-left:.25rem;width:0;opacity:0;transition:all .2s ease-in-out}@media (min-width: 768px){._volumeContainer_4d6jg_1:hover{width:6rem}._volumeContainer_4d6jg_1:hover ._volumeSlider_4d6jg_8{width:100%;opacity:1}}._remainingTimeContainer_1yyhb_1{display:flex;align-items:center}._remainingTime_1yyhb_1{margin:0;padding:0;font-variant-numeric:tabular-nums;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;user-select:none}._remainingSeparator_1yyhb_17{margin:0;padding:0 .5rem;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500}._remainingSeparator_1yyhb_17:before{content:"/"}
|
|
1
|
+
._playerNotice_x3acc_1{position:absolute;top:0;left:0;width:100%;height:100%;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff;background:#000;pointer-events:none;user-select:none}._playerNoticeTitle_x3acc_19{margin:0;padding:.5rem 0;font-size:1rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500}._playerNoticeText_x3acc_28{margin:0;height:1.25rem;font-size:.875rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500}._playerNoticeLowZIndex_x3acc_37{z-index:5}@media (min-width: 768px){._playerNoticeTitle_x3acc_19{font-size:1.25rem}._playerNoticeText_x3acc_28{font-size:1rem}}._playerVideo_wc0sm_1{position:relative;width:100%;height:100%}@media (min-width: 768px){._playerVideo_wc0sm_1{pointer-events:none}}._playbackButton_lgsgw_1{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;cursor:default;align-items:center;justify-content:center;margin:0;padding:0;outline:none;background:none;border:none;-webkit-tap-highlight-color:transparent}._playbackButton_lgsgw_1:focus{outline:none}._seekIndicator_lgsgw_23{position:absolute;top:50%;width:50%;display:flex;align-items:center;justify-content:center;padding:.25rem .5rem;font-variant-numeric:tabular-nums;font-size:1rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;line-height:1;user-select:none;outline:none;color:#fff;text-shadow:0 0 .5rem rgba(0,0,0,.5);border-radius:1rem;transform:translateY(-50%);pointer-events:none;opacity:0;transition:opacity .2s ease-in-out;-webkit-tap-highlight-color:transparent}._seekIndicatorLeft_lgsgw_49{left:0}._seekIndicatorRight_lgsgw_53{right:0}._seekIndicatorVisible_lgsgw_57{opacity:1}._playerButton_izwqq_1{margin:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;cursor:pointer;color:#fff;background:none;border:none;border-radius:1rem;transition:color .2s ease-in-out;-webkit-tap-highlight-color:transparent}._playerButton_izwqq_1 svg{width:1.25rem;height:1.25rem;flex-shrink:0;pointer-events:none}._playerButton_izwqq_1:hover,._button_izwqq_29:focus{color:#fffc}._playerButton_izwqq_1:focus{outline:none}._playerButton_izwqq_1:disabled{opacity:.5;cursor:not-allowed}._playerButtonCircle_izwqq_42{padding:0;width:2rem;height:2rem}._liveIndicator_1jczn_1{margin-right:.5rem;width:.4rem;height:.4rem;border-radius:.2rem;transition:background-color .2s ease}._liveIndicatorHasDelay_1jczn_9{background:gray}._liveIndicatorNoDelay_1jczn_13{background:red}._progressSlider_hwzgf_1{position:relative;width:100%;margin-bottom:-.25rem}._tipContainer_hwzgf_7{position:absolute;bottom:1.5rem;left:0;z-index:10;pointer-events:none;user-select:none;transition:opacity .2s ease-in-out,transform .2s ease-in-out}._tipContainerVisible_hwzgf_17{opacity:1;transform:translateY(0)}._tipContainerHidden_hwzgf_22{opacity:0;transform:translateY(-.5rem)}._tipContent_hwzgf_27{margin:0;padding:.25rem .5rem;font-variant-numeric:tabular-nums;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;text-align:center;color:#000;background:#fff;border-radius:1rem}._sliderRoot_aeak6_1{position:relative;display:flex;align-items:center;width:100%;height:1rem;touch-action:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent}._sliderRoot_aeak6_1[data-disabled]{cursor:not-allowed;opacity:.5}._sliderTrack_aeak6_18{position:relative;height:.25rem;flex-grow:1;background:#fff3;border-radius:1rem;overflow:hidden;-webkit-tap-highlight-color:transparent}._sliderRange_aeak6_28{position:absolute;height:100%;background:#f7e406;transition:width .2s ease-in-out;border-radius:1rem;-webkit-tap-highlight-color:transparent}._sliderThumb_aeak6_37{display:block;width:.875rem;height:.875rem;cursor:pointer;background:#fff;transition:all .2s ease-in-out;box-shadow:0 .125rem .25rem #0003;border-radius:50%;-webkit-tap-highlight-color:transparent}._sliderThumb_aeak6_37:hover{box-shadow:0 .25rem .5rem #0006}._sliderThumb_aeak6_37:focus{outline:none;box-shadow:0 0 0 .125rem #f7e40680}._sliderThumb_aeak6_37[data-disabled]{cursor:not-allowed;opacity:.5}._viewersContainer_z1ihz_1{display:flex;align-items:center;padding:.25rem .5rem;color:#fff;font-size:.875rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;background:#000c;border-radius:1rem;pointer-events:none;user-select:none}._viewersIndicator_z1ihz_16{width:.4rem;height:.4rem;background-color:red;border-radius:.2rem;margin-right:.15rem}._viewersIcon_z1ihz_24{flex-shrink:0}._viewersCount_z1ihz_28{margin-left:.15rem;line-height:1}._playerContainer_146tx_1{position:absolute;top:0;left:0;width:100%;height:100%;color:#fff;background:#000;overflow:hidden}._controlsTop_146tx_12{position:absolute;left:0;width:100%;top:0;z-index:10;background:linear-gradient(to bottom,rgba(0,0,0,.6),transparent);padding-top:.5rem;padding-bottom:1rem}@media (min-width: 768px){._controlsTop_146tx_12{padding-bottom:2rem}}._controlsBottom_146tx_29{position:absolute;left:0;width:100%;bottom:0;z-index:10;background:linear-gradient(to top,rgba(0,0,0,.6),transparent);padding-top:1rem}@media (min-width: 768px){._controlsBottom_146tx_29{padding-top:2rem}}._controlsContainer_146tx_45{display:flex;flex-direction:column;padding-left:.5rem;padding-right:.5rem;line-height:1;font-size:0}@media (min-width: 768px){._controlsContainer_146tx_45{padding-left:1rem;padding-right:1rem}}._controlsRow_146tx_61{display:flex;padding:.5rem 0;width:100%;align-items:center}._controlsSection_146tx_68{display:flex;flex:1;align-items:center}._controlsSection_146tx_68>:not(:last-child){margin-right:.5rem}._controlsSectionStart_146tx_78{justify-content:flex-start}._controlsSectionEnd_146tx_82{justify-content:flex-end}._idleCheckContainer_crh2s_1{transition:opacity .2s ease-in-out}._idleCheckContainerIdle_crh2s_5{cursor:none;opacity:0;pointer-events:none}._idleCheckContainerActive_crh2s_11{cursor:auto;opacity:1}@keyframes _spin_oo4hi_10{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._spinner_oo4hi_10{width:1.5rem;height:1.5rem;border:2px solid white;border-bottom-color:transparent;border-radius:50%;animation:_spin_oo4hi_10 1s linear infinite}._loadingContainer_v9v7r_1{pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;display:flex;width:100%;height:100%;align-items:center;justify-content:center}._dropdownMenuContent_zi433_1{display:flex;flex-direction:column;padding:0;width:9rem;height:7rem;max-height:7rem;background:#000c;border-radius:.25rem;animation-duration:.4s;animation-timing-function:cubic-bezier(.16,1,.3,1);will-change:transform,opacity;z-index:1000;overflow:hidden}._dropdownMenuContent_zi433_1[data-state=open][data-side=top]{animation-name:_slideDownAndFade_zi433_1}._dropdownMenuContent_zi433_1[data-state=open][data-side=right]{animation-name:_slideLeftAndFade_zi433_1}._dropdownMenuContent_zi433_1[data-state=open][data-side=bottom]{animation-name:_slideUpAndFade_zi433_1}._dropdownMenuContent_zi433_1[data-state=open][data-side=left]{animation-name:_slideRightAndFade_zi433_1}@keyframes _slideUpAndFade_zi433_1{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes _slideRightAndFade_zi433_1{0%{opacity:0;transform:translate(-2px)}to{opacity:1;transform:translate(0)}}@keyframes _slideDownAndFade_zi433_1{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}@keyframes _slideLeftAndFade_zi433_1{0%{opacity:0;transform:translate(2px)}to{opacity:1;transform:translate(0)}}._dropdownMenuItem_zi433_77{position:relative;display:flex;align-items:center;justify-content:space-between;height:1.75rem;padding:0 .5rem;cursor:pointer;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;line-height:1;user-select:none;outline:none;color:#fff;transition:color .2s ease;-webkit-tap-highlight-color:transparent}._dropdownMenuItem_zi433_77 svg{width:1rem;height:1rem;flex-shrink:0;pointer-events:none}._dropdownMenuItem_zi433_77:hover,._dropdownMenuItem_zi433_77:focus{color:#fffc}._dropdownMenuItem_zi433_77:focus{outline:none}._dropdownMenuItem_zi433_77[data-disabled]{color:#ffffff80;pointer-events:none}._scrollAreaRoot_zi433_120{width:100%;flex:1;min-height:0;overflow:hidden}._scrollAreaViewport_zi433_127{width:100%;height:100%;-webkit-overflow-scrolling:touch}._scrollAreaScrollbar_zi433_133{display:flex;user-select:none;touch-action:none;padding:.125rem;background:transparent;transition:background-color .2s ease-out;width:.5rem}._scrollAreaScrollbar_zi433_133[data-orientation=vertical]{width:.5rem}._scrollAreaScrollbar_zi433_133[data-orientation=horizontal]{flex-direction:column;height:.75rem}._scrollAreaScrollbar_zi433_133[data-state=visible]{animation:_fadeIn_zi433_1 .15s ease-out}._scrollAreaScrollbar_zi433_133[data-state=hidden]{animation:_fadeOut_zi433_1 .15s ease-out}._scrollAreaThumb_zi433_160{flex:1;background:#ffffff4d;border-radius:.375rem;position:relative;transition:background-color .2s ease-out}._scrollAreaThumb_zi433_160:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:2.25rem;min-height:2.25rem}._scrollAreaThumb_zi433_160:hover{background:#ffffff80}@keyframes _fadeIn_zi433_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_zi433_1{0%{opacity:1}to{opacity:0}}._volumeContainer_4d6jg_1{display:flex;align-items:center;width:3rem;transition:all .2s ease-in-out}._volumeSlider_4d6jg_8{margin-left:.25rem;width:0;opacity:0;transition:all .2s ease-in-out}@media (min-width: 768px){._volumeContainer_4d6jg_1:hover{width:6rem}._volumeContainer_4d6jg_1:hover ._volumeSlider_4d6jg_8{width:100%;opacity:1}}._remainingTimeContainer_1yyhb_1{display:flex;align-items:center}._remainingTime_1yyhb_1{margin:0;padding:0;font-variant-numeric:tabular-nums;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500;user-select:none}._remainingSeparator_1yyhb_17{margin:0;padding:0 .5rem;font-size:.8125rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-weight:500}._remainingSeparator_1yyhb_17:before{content:"/"}
|