@halibegic/react-video-player 0.0.50 → 0.0.52

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,32 +1,32 @@
1
- var Nn = Object.defineProperty, Vn = Object.defineProperties;
2
- var An = Object.getOwnPropertyDescriptors;
3
- var Se = Object.getOwnPropertySymbols;
4
- var vt = Object.prototype.hasOwnProperty, yt = Object.prototype.propertyIsEnumerable;
5
- var pt = (e, t, n) => t in e ? Nn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, P = (e, t) => {
1
+ var $n = Object.defineProperty, Un = Object.defineProperties;
2
+ var Bn = Object.getOwnPropertyDescriptors;
3
+ var Pe = Object.getOwnPropertySymbols;
4
+ var wt = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
5
+ var gt = (e, t, n) => t in e ? $n(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
- vt.call(t, n) && pt(e, n, t[n]);
8
- if (Se)
9
- for (var n of Se(t))
10
- yt.call(t, n) && pt(e, n, t[n]);
7
+ wt.call(t, n) && gt(e, n, t[n]);
8
+ if (Pe)
9
+ for (var n of Pe(t))
10
+ _t.call(t, n) && gt(e, n, t[n]);
11
11
  return e;
12
- }, he = (e, t) => Vn(e, An(t));
13
- var ne = (e, t) => {
12
+ }, he = (e, t) => Un(e, Bn(t));
13
+ var re = (e, t) => {
14
14
  var n = {};
15
- for (var o in e)
16
- vt.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
17
- if (e != null && Se)
18
- for (var o of Se(e))
19
- t.indexOf(o) < 0 && yt.call(e, o) && (n[o] = e[o]);
15
+ for (var r in e)
16
+ wt.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
17
+ if (e != null && Pe)
18
+ for (var r of Pe(e))
19
+ t.indexOf(r) < 0 && _t.call(e, r) && (n[r] = e[r]);
20
20
  return n;
21
21
  };
22
- import St, { useLayoutEffect as On, useEffect as D, useRef as V, useState as X, createContext as jt, useContext as Pt, useCallback as z, forwardRef as Ne } from "react";
23
- import { create as Lt, useStore as It } from "zustand";
24
- import Hn from "mitt";
25
- import re from "hls.js";
26
- import * as je from "@radix-ui/react-slider";
22
+ import jt, { useLayoutEffect as Wn, useEffect as N, useRef as F, createContext as It, useContext as kt, useState as G, useCallback as O, forwardRef as Ve } from "react";
23
+ import { useStore as Dt, create as Mt } from "zustand";
24
+ import zn from "mitt";
25
+ import ee from "hls.js";
26
+ import * as Le from "@radix-ui/react-slider";
27
27
  import * as xe from "@radix-ui/react-popover";
28
- import * as Pe from "@radix-ui/react-scroll-area";
29
- function kt(e) {
28
+ import * as je from "@radix-ui/react-scroll-area";
29
+ function Nt(e) {
30
30
  var t = this.constructor;
31
31
  return this.then(
32
32
  function(n) {
@@ -41,221 +41,221 @@ function kt(e) {
41
41
  }
42
42
  );
43
43
  }
44
- function Dt(e) {
44
+ function Ft(e) {
45
45
  var t = this;
46
- return new t(function(n, o) {
46
+ return new t(function(n, r) {
47
47
  if (!(e && typeof e.length != "undefined"))
48
- return o(
48
+ return r(
49
49
  new TypeError(
50
50
  typeof e + " " + e + " is not iterable(cannot read property Symbol(Symbol.iterator))"
51
51
  )
52
52
  );
53
- var a = Array.prototype.slice.call(e);
54
- if (a.length === 0) return n([]);
55
- var c = a.length;
56
- function u(l, d) {
53
+ var s = Array.prototype.slice.call(e);
54
+ if (s.length === 0) return n([]);
55
+ var l = s.length;
56
+ function u(c, d) {
57
57
  if (d && (typeof d == "object" || typeof d == "function")) {
58
- var v = d.then;
59
- if (typeof v == "function") {
60
- v.call(
58
+ var g = d.then;
59
+ if (typeof g == "function") {
60
+ g.call(
61
61
  d,
62
- function(y) {
63
- u(l, y);
62
+ function(T) {
63
+ u(c, T);
64
64
  },
65
- function(y) {
66
- a[l] = { status: "rejected", reason: y }, --c === 0 && n(a);
65
+ function(T) {
66
+ s[c] = { status: "rejected", reason: T }, --l === 0 && n(s);
67
67
  }
68
68
  );
69
69
  return;
70
70
  }
71
71
  }
72
- a[l] = { status: "fulfilled", value: d }, --c === 0 && n(a);
72
+ s[c] = { status: "fulfilled", value: d }, --l === 0 && n(s);
73
73
  }
74
- for (var i = 0; i < a.length; i++)
75
- u(i, a[i]);
74
+ for (var i = 0; i < s.length; i++)
75
+ u(i, s[i]);
76
76
  });
77
77
  }
78
- function Mt(e, t) {
78
+ function Vt(e, t) {
79
79
  this.name = "AggregateError", this.errors = e, this.message = t || "";
80
80
  }
81
- Mt.prototype = Error.prototype;
82
- function Ft(e) {
81
+ Vt.prototype = Error.prototype;
82
+ function At(e) {
83
83
  var t = this;
84
- return new t(function(n, o) {
84
+ return new t(function(n, r) {
85
85
  if (!(e && typeof e.length != "undefined"))
86
- return o(new TypeError("Promise.any accepts an array"));
87
- var a = Array.prototype.slice.call(e);
88
- if (a.length === 0) return o();
89
- for (var c = [], u = 0; u < a.length; u++)
86
+ return r(new TypeError("Promise.any accepts an array"));
87
+ var s = Array.prototype.slice.call(e);
88
+ if (s.length === 0) return r();
89
+ for (var l = [], u = 0; u < s.length; u++)
90
90
  try {
91
- t.resolve(a[u]).then(n).catch(function(i) {
92
- c.push(i), c.length === a.length && o(
93
- new Mt(
94
- c,
91
+ t.resolve(s[u]).then(n).catch(function(i) {
92
+ l.push(i), l.length === s.length && r(
93
+ new Vt(
94
+ l,
95
95
  "All promises were rejected"
96
96
  )
97
97
  );
98
98
  });
99
99
  } catch (i) {
100
- o(i);
100
+ r(i);
101
101
  }
102
102
  });
103
103
  }
104
- var $n = setTimeout;
105
- function Nt(e) {
104
+ var qn = setTimeout;
105
+ function Ot(e) {
106
106
  return !!(e && typeof e.length != "undefined");
107
107
  }
108
- function Un() {
108
+ function Yn() {
109
109
  }
110
- function Bn(e, t) {
110
+ function Zn(e, t) {
111
111
  return function() {
112
112
  e.apply(t, arguments);
113
113
  };
114
114
  }
115
- function F(e) {
116
- if (!(this instanceof F))
115
+ function H(e) {
116
+ if (!(this instanceof H))
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 = [], At(e, this);
119
+ this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], $t(e, this);
120
120
  }
121
- function Vt(e, t) {
121
+ function Ht(e, t) {
122
122
  for (; e._state === 3; )
123
123
  e = e._value;
124
124
  if (e._state === 0) {
125
125
  e._deferreds.push(t);
126
126
  return;
127
127
  }
128
- e._handled = !0, F._immediateFn(function() {
128
+ e._handled = !0, H._immediateFn(function() {
129
129
  var n = e._state === 1 ? t.onFulfilled : t.onRejected;
130
130
  if (n === null) {
131
- (e._state === 1 ? Ke : Te)(t.promise, e._value);
131
+ (e._state === 1 ? Ge : _e)(t.promise, e._value);
132
132
  return;
133
133
  }
134
- var o;
134
+ var r;
135
135
  try {
136
- o = n(e._value);
137
- } catch (a) {
138
- Te(t.promise, a);
136
+ r = n(e._value);
137
+ } catch (s) {
138
+ _e(t.promise, s);
139
139
  return;
140
140
  }
141
- Ke(t.promise, o);
141
+ Ge(t.promise, r);
142
142
  });
143
143
  }
144
- function Ke(e, t) {
144
+ function Ge(e, t) {
145
145
  try {
146
146
  if (t === e)
147
147
  throw new TypeError("A promise cannot be resolved with itself.");
148
148
  if (t && (typeof t == "object" || typeof t == "function")) {
149
149
  var n = t.then;
150
- if (t instanceof F) {
151
- e._state = 3, e._value = t, Ye(e);
150
+ if (t instanceof H) {
151
+ e._state = 3, e._value = t, Xe(e);
152
152
  return;
153
153
  } else if (typeof n == "function") {
154
- At(Bn(n, t), e);
154
+ $t(Zn(n, t), e);
155
155
  return;
156
156
  }
157
157
  }
158
- e._state = 1, e._value = t, Ye(e);
159
- } catch (o) {
160
- Te(e, o);
158
+ e._state = 1, e._value = t, Xe(e);
159
+ } catch (r) {
160
+ _e(e, r);
161
161
  }
162
162
  }
163
- function Te(e, t) {
164
- e._state = 2, e._value = t, Ye(e);
163
+ function _e(e, t) {
164
+ e._state = 2, e._value = t, Xe(e);
165
165
  }
166
- function Ye(e) {
167
- e._state === 2 && e._deferreds.length === 0 && F._immediateFn(function() {
168
- e._handled || F._unhandledRejectionFn(e._value);
166
+ function Xe(e) {
167
+ e._state === 2 && e._deferreds.length === 0 && H._immediateFn(function() {
168
+ e._handled || H._unhandledRejectionFn(e._value);
169
169
  });
170
170
  for (var t = 0, n = e._deferreds.length; t < n; t++)
171
- Vt(e, e._deferreds[t]);
171
+ Ht(e, e._deferreds[t]);
172
172
  e._deferreds = null;
173
173
  }
174
- function zn(e, t, n) {
174
+ function Kn(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 At(e, t) {
177
+ function $t(e, t) {
178
178
  var n = !1;
179
179
  try {
180
180
  e(
181
- function(o) {
182
- n || (n = !0, Ke(t, o));
181
+ function(r) {
182
+ n || (n = !0, Ge(t, r));
183
183
  },
184
- function(o) {
185
- n || (n = !0, Te(t, o));
184
+ function(r) {
185
+ n || (n = !0, _e(t, r));
186
186
  }
187
187
  );
188
- } catch (o) {
188
+ } catch (r) {
189
189
  if (n) return;
190
- n = !0, Te(t, o);
190
+ n = !0, _e(t, r);
191
191
  }
192
192
  }
193
- F.prototype.catch = function(e) {
193
+ H.prototype.catch = function(e) {
194
194
  return this.then(null, e);
195
195
  };
196
- F.prototype.then = function(e, t) {
197
- var n = new this.constructor(Un);
198
- return Vt(this, new zn(e, t, n)), n;
196
+ H.prototype.then = function(e, t) {
197
+ var n = new this.constructor(Yn);
198
+ return Ht(this, new Kn(e, t, n)), n;
199
199
  };
200
- F.prototype.finally = kt;
201
- F.all = function(e) {
202
- return new F(function(t, n) {
203
- if (!Nt(e))
200
+ H.prototype.finally = Nt;
201
+ H.all = function(e) {
202
+ return new H(function(t, n) {
203
+ if (!Ot(e))
204
204
  return n(new TypeError("Promise.all accepts an array"));
205
- var o = Array.prototype.slice.call(e);
206
- if (o.length === 0) return t([]);
207
- var a = o.length;
208
- function c(i, l) {
205
+ var r = Array.prototype.slice.call(e);
206
+ if (r.length === 0) return t([]);
207
+ var s = r.length;
208
+ function l(i, c) {
209
209
  try {
210
- if (l && (typeof l == "object" || typeof l == "function")) {
211
- var d = l.then;
210
+ if (c && (typeof c == "object" || typeof c == "function")) {
211
+ var d = c.then;
212
212
  if (typeof d == "function") {
213
213
  d.call(
214
- l,
215
- function(v) {
216
- c(i, v);
214
+ c,
215
+ function(g) {
216
+ l(i, g);
217
217
  },
218
218
  n
219
219
  );
220
220
  return;
221
221
  }
222
222
  }
223
- o[i] = l, --a === 0 && t(o);
224
- } catch (v) {
225
- n(v);
223
+ r[i] = c, --s === 0 && t(r);
224
+ } catch (g) {
225
+ n(g);
226
226
  }
227
227
  }
228
- for (var u = 0; u < o.length; u++)
229
- c(u, o[u]);
228
+ for (var u = 0; u < r.length; u++)
229
+ l(u, r[u]);
230
230
  });
231
231
  };
232
- F.any = Ft;
233
- F.allSettled = Dt;
234
- F.resolve = function(e) {
235
- return e && typeof e == "object" && e.constructor === F ? e : new F(function(t) {
232
+ H.any = At;
233
+ H.allSettled = Ft;
234
+ H.resolve = function(e) {
235
+ return e && typeof e == "object" && e.constructor === H ? e : new H(function(t) {
236
236
  t(e);
237
237
  });
238
238
  };
239
- F.reject = function(e) {
240
- return new F(function(t, n) {
239
+ H.reject = function(e) {
240
+ return new H(function(t, n) {
241
241
  n(e);
242
242
  });
243
243
  };
244
- F.race = function(e) {
245
- return new F(function(t, n) {
246
- if (!Nt(e))
244
+ H.race = function(e) {
245
+ return new H(function(t, n) {
246
+ if (!Ot(e))
247
247
  return n(new TypeError("Promise.race accepts an array"));
248
- for (var o = 0, a = e.length; o < a; o++)
249
- F.resolve(e[o]).then(t, n);
248
+ for (var r = 0, s = e.length; r < s; r++)
249
+ H.resolve(e[r]).then(t, n);
250
250
  });
251
251
  };
252
- F._immediateFn = // @ts-ignore
252
+ H._immediateFn = // @ts-ignore
253
253
  typeof setImmediate == "function" && function(e) {
254
254
  setImmediate(e);
255
255
  } || function(e) {
256
- $n(e, 0);
256
+ qn(e, 0);
257
257
  };
258
- F._unhandledRejectionFn = function(t) {
258
+ H._unhandledRejectionFn = function(t) {
259
259
  typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", t);
260
260
  };
261
261
  var ae = (function() {
@@ -267,482 +267,482 @@ var ae = (function() {
267
267
  return global;
268
268
  throw new Error("unable to locate global object");
269
269
  })();
270
- typeof ae.Promise != "function" ? ae.Promise = F : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = kt), ae.Promise.allSettled || (ae.Promise.allSettled = Dt), ae.Promise.any || (ae.Promise.any = Ft));
271
- var Le = { exports: {} }, ge = {};
272
- var gt;
273
- function Wn() {
274
- if (gt) return ge;
275
- gt = 1;
276
- var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
277
- function u(i, l, d) {
278
- var v, y = {}, g = null, L = null;
279
- d !== void 0 && (g = "" + d), l.key !== void 0 && (g = "" + l.key), l.ref !== void 0 && (L = l.ref);
280
- for (v in l) o.call(l, v) && !c.hasOwnProperty(v) && (y[v] = l[v]);
281
- if (i && i.defaultProps) for (v in l = i.defaultProps, l) y[v] === void 0 && (y[v] = l[v]);
282
- return { $$typeof: t, type: i, key: g, ref: L, props: y, _owner: a.current };
270
+ typeof ae.Promise != "function" ? ae.Promise = H : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = Nt), ae.Promise.allSettled || (ae.Promise.allSettled = Ft), ae.Promise.any || (ae.Promise.any = At));
271
+ var Ie = { exports: {} }, ge = {};
272
+ var Tt;
273
+ function Gn() {
274
+ if (Tt) return ge;
275
+ Tt = 1;
276
+ var e = jt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
277
+ function u(i, c, d) {
278
+ var g, T = {}, y = null, x = null;
279
+ d !== void 0 && (y = "" + d), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (x = c.ref);
280
+ for (g in c) r.call(c, g) && !l.hasOwnProperty(g) && (T[g] = c[g]);
281
+ if (i && i.defaultProps) for (g in c = i.defaultProps, c) T[g] === void 0 && (T[g] = c[g]);
282
+ return { $$typeof: t, type: i, key: y, ref: x, props: T, _owner: s.current };
283
283
  }
284
284
  return ge.Fragment = n, ge.jsx = u, ge.jsxs = u, ge;
285
285
  }
286
286
  var we = {};
287
- var wt;
288
- function qn() {
289
- return wt || (wt = 1, process.env.NODE_ENV !== "production" && (function() {
290
- var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), k = Symbol.iterator, _ = "@@iterator";
291
- function j(r) {
292
- if (r === null || typeof r != "object")
287
+ var xt;
288
+ function Xn() {
289
+ return xt || (xt = 1, process.env.NODE_ENV !== "production" && (function() {
290
+ var e = jt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), L = Symbol.iterator, C = "@@iterator";
291
+ function w(o) {
292
+ if (o === null || typeof o != "object")
293
293
  return null;
294
- var h = k && r[k] || r[_];
294
+ var h = L && o[L] || o[C];
295
295
  return typeof h == "function" ? h : null;
296
296
  }
297
- var N = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
298
- function R(r) {
297
+ var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
298
+ function P(o) {
299
299
  {
300
- for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
301
- p[w - 1] = arguments[w];
302
- I("error", r, p);
300
+ for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), _ = 1; _ < h; _++)
301
+ p[_ - 1] = arguments[_];
302
+ R("error", o, p);
303
303
  }
304
304
  }
305
- function I(r, h, p) {
305
+ function R(o, h, p) {
306
306
  {
307
- var w = N.ReactDebugCurrentFrame, E = w.getStackAddendum();
308
- E !== "" && (h += "%s", p = p.concat([E]));
309
- var S = p.map(function(C) {
310
- return String(C);
307
+ var _ = S.ReactDebugCurrentFrame, j = _.getStackAddendum();
308
+ j !== "" && (h += "%s", p = p.concat([j]));
309
+ var D = p.map(function(b) {
310
+ return String(b);
311
311
  });
312
- S.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, S);
312
+ D.unshift("Warning: " + h), Function.prototype.apply.call(console[o], console, D);
313
313
  }
314
314
  }
315
- var T = !1, M = !1, m = !1, O = !1, G = !1, Z;
316
- Z = Symbol.for("react.module.reference");
317
- function H(r) {
318
- return !!(typeof r == "string" || typeof r == "function" || r === o || r === c || G || r === a || r === d || r === v || O || r === L || T || M || m || typeof r == "object" && r !== null && (r.$$typeof === g || r.$$typeof === y || r.$$typeof === u || r.$$typeof === i || r.$$typeof === l || // This needs to include all possible module reference object
315
+ var B = !1, V = !1, m = !1, v = !1, U = !1, I;
316
+ I = Symbol.for("react.module.reference");
317
+ function A(o) {
318
+ return !!(typeof o == "string" || typeof o == "function" || o === r || o === l || U || o === s || o === d || o === g || v || o === x || B || V || m || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === T || o.$$typeof === u || o.$$typeof === i || o.$$typeof === c || // This needs to include all possible module reference object
319
319
  // types supported by any Flight configuration anywhere since
320
320
  // we don't know which Flight build this will end up being used
321
321
  // with.
322
- r.$$typeof === Z || r.getModuleId !== void 0));
322
+ o.$$typeof === I || o.getModuleId !== void 0));
323
323
  }
324
- function b(r, h, p) {
325
- var w = r.displayName;
326
- if (w)
327
- return w;
328
- var E = h.displayName || h.name || "";
329
- return E !== "" ? p + "(" + E + ")" : p;
324
+ function k(o, h, p) {
325
+ var _ = o.displayName;
326
+ if (_)
327
+ return _;
328
+ var j = h.displayName || h.name || "";
329
+ return j !== "" ? p + "(" + j + ")" : p;
330
330
  }
331
- function Q(r) {
332
- return r.displayName || "Context";
331
+ function J(o) {
332
+ return o.displayName || "Context";
333
333
  }
334
- function K(r) {
335
- if (r == null)
334
+ function Y(o) {
335
+ if (o == null)
336
336
  return null;
337
- if (typeof r.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
338
- return r.displayName || r.name || null;
339
- if (typeof r == "string")
340
- return r;
341
- switch (r) {
342
- case o:
337
+ if (typeof o.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
338
+ return o.displayName || o.name || null;
339
+ if (typeof o == "string")
340
+ return o;
341
+ switch (o) {
342
+ case r:
343
343
  return "Fragment";
344
344
  case n:
345
345
  return "Portal";
346
- case c:
346
+ case l:
347
347
  return "Profiler";
348
- case a:
348
+ case s:
349
349
  return "StrictMode";
350
350
  case d:
351
351
  return "Suspense";
352
- case v:
352
+ case g:
353
353
  return "SuspenseList";
354
354
  }
355
- if (typeof r == "object")
356
- switch (r.$$typeof) {
355
+ if (typeof o == "object")
356
+ switch (o.$$typeof) {
357
357
  case i:
358
- var h = r;
359
- return Q(h) + ".Consumer";
358
+ var h = o;
359
+ return J(h) + ".Consumer";
360
360
  case u:
361
- var p = r;
362
- return Q(p._context) + ".Provider";
363
- case l:
364
- return b(r, r.render, "ForwardRef");
365
- case y:
366
- var w = r.displayName || null;
367
- return w !== null ? w : K(r.type) || "Memo";
368
- case g: {
369
- var E = r, S = E._payload, C = E._init;
361
+ var p = o;
362
+ return J(p._context) + ".Provider";
363
+ case c:
364
+ return k(o, o.render, "ForwardRef");
365
+ case T:
366
+ var _ = o.displayName || null;
367
+ return _ !== null ? _ : Y(o.type) || "Memo";
368
+ case y: {
369
+ var j = o, D = j._payload, b = j._init;
370
370
  try {
371
- return K(C(S));
372
- } catch (x) {
371
+ return Y(b(D));
372
+ } catch (E) {
373
373
  return null;
374
374
  }
375
375
  }
376
376
  }
377
377
  return null;
378
378
  }
379
- var W = Object.assign, oe = 0, ue, te, q, ve, Xe, Ge, Je;
380
- function Qe() {
379
+ var Z = Object.assign, oe = 0, ue, ne, K, pe, Qe, et, tt;
380
+ function nt() {
381
381
  }
382
- Qe.__reactDisabledLog = !0;
383
- function cn() {
382
+ nt.__reactDisabledLog = !0;
383
+ function mn() {
384
384
  {
385
385
  if (oe === 0) {
386
- ue = console.log, te = console.info, q = console.warn, ve = console.error, Xe = console.group, Ge = console.groupCollapsed, Je = console.groupEnd;
387
- var r = {
386
+ ue = console.log, ne = console.info, K = console.warn, pe = console.error, Qe = console.group, et = console.groupCollapsed, tt = console.groupEnd;
387
+ var o = {
388
388
  configurable: !0,
389
389
  enumerable: !0,
390
- value: Qe,
390
+ value: nt,
391
391
  writable: !0
392
392
  };
393
393
  Object.defineProperties(console, {
394
- info: r,
395
- log: r,
396
- warn: r,
397
- error: r,
398
- group: r,
399
- groupCollapsed: r,
400
- groupEnd: r
394
+ info: o,
395
+ log: o,
396
+ warn: o,
397
+ error: o,
398
+ group: o,
399
+ groupCollapsed: o,
400
+ groupEnd: o
401
401
  });
402
402
  }
403
403
  oe++;
404
404
  }
405
405
  }
406
- function un() {
406
+ function vn() {
407
407
  {
408
408
  if (oe--, oe === 0) {
409
- var r = {
409
+ var o = {
410
410
  configurable: !0,
411
411
  enumerable: !0,
412
412
  writable: !0
413
413
  };
414
414
  Object.defineProperties(console, {
415
- log: W({}, r, {
415
+ log: Z({}, o, {
416
416
  value: ue
417
417
  }),
418
- info: W({}, r, {
419
- value: te
418
+ info: Z({}, o, {
419
+ value: ne
420
420
  }),
421
- warn: W({}, r, {
422
- value: q
421
+ warn: Z({}, o, {
422
+ value: K
423
423
  }),
424
- error: W({}, r, {
425
- value: ve
424
+ error: Z({}, o, {
425
+ value: pe
426
426
  }),
427
- group: W({}, r, {
428
- value: Xe
427
+ group: Z({}, o, {
428
+ value: Qe
429
429
  }),
430
- groupCollapsed: W({}, r, {
431
- value: Ge
430
+ groupCollapsed: Z({}, o, {
431
+ value: et
432
432
  }),
433
- groupEnd: W({}, r, {
434
- value: Je
433
+ groupEnd: Z({}, o, {
434
+ value: tt
435
435
  })
436
436
  });
437
437
  }
438
- oe < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
438
+ oe < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
439
439
  }
440
440
  }
441
- var Oe = N.ReactCurrentDispatcher, He;
442
- function Ce(r, h, p) {
441
+ var Oe = S.ReactCurrentDispatcher, He;
442
+ function Ee(o, h, p) {
443
443
  {
444
444
  if (He === void 0)
445
445
  try {
446
446
  throw Error();
447
- } catch (E) {
448
- var w = E.stack.trim().match(/\n( *(at )?)/);
449
- He = w && w[1] || "";
447
+ } catch (j) {
448
+ var _ = j.stack.trim().match(/\n( *(at )?)/);
449
+ He = _ && _[1] || "";
450
450
  }
451
451
  return `
452
- ` + He + r;
452
+ ` + He + o;
453
453
  }
454
454
  }
455
- var $e = !1, Ee;
455
+ var $e = !1, Se;
456
456
  {
457
- var dn = typeof WeakMap == "function" ? WeakMap : Map;
458
- Ee = new dn();
457
+ var pn = typeof WeakMap == "function" ? WeakMap : Map;
458
+ Se = new pn();
459
459
  }
460
- function et(r, h) {
461
- if (!r || $e)
460
+ function rt(o, h) {
461
+ if (!o || $e)
462
462
  return "";
463
463
  {
464
- var p = Ee.get(r);
464
+ var p = Se.get(o);
465
465
  if (p !== void 0)
466
466
  return p;
467
467
  }
468
- var w;
468
+ var _;
469
469
  $e = !0;
470
- var E = Error.prepareStackTrace;
470
+ var j = Error.prepareStackTrace;
471
471
  Error.prepareStackTrace = void 0;
472
- var S;
473
- S = Oe.current, Oe.current = null, cn();
472
+ var D;
473
+ D = Oe.current, Oe.current = null, mn();
474
474
  try {
475
475
  if (h) {
476
- var C = function() {
476
+ var b = function() {
477
477
  throw Error();
478
478
  };
479
- if (Object.defineProperty(C.prototype, "props", {
479
+ if (Object.defineProperty(b.prototype, "props", {
480
480
  set: function() {
481
481
  throw Error();
482
482
  }
483
483
  }), typeof Reflect == "object" && Reflect.construct) {
484
484
  try {
485
- Reflect.construct(C, []);
486
- } catch (J) {
487
- w = J;
485
+ Reflect.construct(b, []);
486
+ } catch (Q) {
487
+ _ = Q;
488
488
  }
489
- Reflect.construct(r, [], C);
489
+ Reflect.construct(o, [], b);
490
490
  } else {
491
491
  try {
492
- C.call();
493
- } catch (J) {
494
- w = J;
492
+ b.call();
493
+ } catch (Q) {
494
+ _ = Q;
495
495
  }
496
- r.call(C.prototype);
496
+ o.call(b.prototype);
497
497
  }
498
498
  } else {
499
499
  try {
500
500
  throw Error();
501
- } catch (J) {
502
- w = J;
501
+ } catch (Q) {
502
+ _ = Q;
503
503
  }
504
- r();
504
+ o();
505
505
  }
506
- } catch (J) {
507
- if (J && w && typeof J.stack == "string") {
508
- for (var x = J.stack.split(`
509
- `), Y = w.stack.split(`
510
- `), $ = x.length - 1, U = Y.length - 1; $ >= 1 && U >= 0 && x[$] !== Y[U]; )
511
- U--;
512
- for (; $ >= 1 && U >= 0; $--, U--)
513
- if (x[$] !== Y[U]) {
514
- if ($ !== 1 || U !== 1)
506
+ } catch (Q) {
507
+ if (Q && _ && typeof Q.stack == "string") {
508
+ for (var E = Q.stack.split(`
509
+ `), X = _.stack.split(`
510
+ `), W = E.length - 1, z = X.length - 1; W >= 1 && z >= 0 && E[W] !== X[z]; )
511
+ z--;
512
+ for (; W >= 1 && z >= 0; W--, z--)
513
+ if (E[W] !== X[z]) {
514
+ if (W !== 1 || z !== 1)
515
515
  do
516
- if ($--, U--, U < 0 || x[$] !== Y[U]) {
517
- var ee = `
518
- ` + x[$].replace(" at new ", " at ");
519
- return r.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", r.displayName)), typeof r == "function" && Ee.set(r, ee), ee;
516
+ if (W--, z--, z < 0 || E[W] !== X[z]) {
517
+ var te = `
518
+ ` + E[W].replace(" at new ", " at ");
519
+ return o.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", o.displayName)), typeof o == "function" && Se.set(o, te), te;
520
520
  }
521
- while ($ >= 1 && U >= 0);
521
+ while (W >= 1 && z >= 0);
522
522
  break;
523
523
  }
524
524
  }
525
525
  } finally {
526
- $e = !1, Oe.current = S, un(), Error.prepareStackTrace = E;
526
+ $e = !1, Oe.current = D, vn(), Error.prepareStackTrace = j;
527
527
  }
528
- var fe = r ? r.displayName || r.name : "", ce = fe ? Ce(fe) : "";
529
- return typeof r == "function" && Ee.set(r, ce), ce;
528
+ var fe = o ? o.displayName || o.name : "", ce = fe ? Ee(fe) : "";
529
+ return typeof o == "function" && Se.set(o, ce), ce;
530
530
  }
531
- function fn(r, h, p) {
532
- return et(r, !1);
531
+ function yn(o, h, p) {
532
+ return rt(o, !1);
533
533
  }
534
- function hn(r) {
535
- var h = r.prototype;
534
+ function gn(o) {
535
+ var h = o.prototype;
536
536
  return !!(h && h.isReactComponent);
537
537
  }
538
- function Re(r, h, p) {
539
- if (r == null)
538
+ function Re(o, h, p) {
539
+ if (o == null)
540
540
  return "";
541
- if (typeof r == "function")
542
- return et(r, hn(r));
543
- if (typeof r == "string")
544
- return Ce(r);
545
- switch (r) {
541
+ if (typeof o == "function")
542
+ return rt(o, gn(o));
543
+ if (typeof o == "string")
544
+ return Ee(o);
545
+ switch (o) {
546
546
  case d:
547
- return Ce("Suspense");
548
- case v:
549
- return Ce("SuspenseList");
547
+ return Ee("Suspense");
548
+ case g:
549
+ return Ee("SuspenseList");
550
550
  }
551
- if (typeof r == "object")
552
- switch (r.$$typeof) {
553
- case l:
554
- return fn(r.render);
555
- case y:
556
- return Re(r.type, h, p);
557
- case g: {
558
- var w = r, E = w._payload, S = w._init;
551
+ if (typeof o == "object")
552
+ switch (o.$$typeof) {
553
+ case c:
554
+ return yn(o.render);
555
+ case T:
556
+ return Re(o.type, h, p);
557
+ case y: {
558
+ var _ = o, j = _._payload, D = _._init;
559
559
  try {
560
- return Re(S(E), h, p);
561
- } catch (C) {
560
+ return Re(D(j), h, p);
561
+ } catch (b) {
562
562
  }
563
563
  }
564
564
  }
565
565
  return "";
566
566
  }
567
- var ye = Object.prototype.hasOwnProperty, tt = {}, nt = N.ReactDebugCurrentFrame;
568
- function be(r) {
569
- if (r) {
570
- var h = r._owner, p = Re(r.type, r._source, h ? h.type : null);
571
- nt.setExtraStackFrame(p);
567
+ var ye = Object.prototype.hasOwnProperty, ot = {}, it = S.ReactDebugCurrentFrame;
568
+ function be(o) {
569
+ if (o) {
570
+ var h = o._owner, p = Re(o.type, o._source, h ? h.type : null);
571
+ it.setExtraStackFrame(p);
572
572
  } else
573
- nt.setExtraStackFrame(null);
573
+ it.setExtraStackFrame(null);
574
574
  }
575
- function mn(r, h, p, w, E) {
575
+ function wn(o, h, p, _, j) {
576
576
  {
577
- var S = Function.call.bind(ye);
578
- for (var C in r)
579
- if (S(r, C)) {
580
- var x = void 0;
577
+ var D = Function.call.bind(ye);
578
+ for (var b in o)
579
+ if (D(o, b)) {
580
+ var E = void 0;
581
581
  try {
582
- if (typeof r[C] != "function") {
583
- var Y = Error((w || "React class") + ": " + p + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
584
- throw Y.name = "Invariant Violation", Y;
582
+ if (typeof o[b] != "function") {
583
+ var X = Error((_ || "React class") + ": " + p + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
584
+ throw X.name = "Invariant Violation", X;
585
585
  }
586
- x = r[C](h, C, w, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
587
- } catch ($) {
588
- x = $;
586
+ E = o[b](h, b, _, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
587
+ } catch (W) {
588
+ E = W;
589
589
  }
590
- x && !(x instanceof Error) && (be(E), R("%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).", w || "React class", p, C, typeof x), be(null)), x instanceof Error && !(x.message in tt) && (tt[x.message] = !0, be(E), R("Failed %s type: %s", p, x.message), be(null));
590
+ E && !(E instanceof Error) && (be(j), P("%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).", _ || "React class", p, b, typeof E), be(null)), E instanceof Error && !(E.message in ot) && (ot[E.message] = !0, be(j), P("Failed %s type: %s", p, E.message), be(null));
591
591
  }
592
592
  }
593
593
  }
594
- var pn = Array.isArray;
595
- function Ue(r) {
596
- return pn(r);
594
+ var _n = Array.isArray;
595
+ function Ue(o) {
596
+ return _n(o);
597
597
  }
598
- function vn(r) {
598
+ function Tn(o) {
599
599
  {
600
- var h = typeof Symbol == "function" && Symbol.toStringTag, p = h && r[Symbol.toStringTag] || r.constructor.name || "Object";
600
+ var h = typeof Symbol == "function" && Symbol.toStringTag, p = h && o[Symbol.toStringTag] || o.constructor.name || "Object";
601
601
  return p;
602
602
  }
603
603
  }
604
- function yn(r) {
604
+ function xn(o) {
605
605
  try {
606
- return rt(r), !1;
606
+ return st(o), !1;
607
607
  } catch (h) {
608
608
  return !0;
609
609
  }
610
610
  }
611
- function rt(r) {
612
- return "" + r;
611
+ function st(o) {
612
+ return "" + o;
613
613
  }
614
- function ot(r) {
615
- if (yn(r))
616
- return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vn(r)), rt(r);
614
+ function at(o) {
615
+ if (xn(o))
616
+ return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tn(o)), st(o);
617
617
  }
618
- var it = N.ReactCurrentOwner, gn = {
618
+ var lt = S.ReactCurrentOwner, Cn = {
619
619
  key: !0,
620
620
  ref: !0,
621
621
  __self: !0,
622
622
  __source: !0
623
- }, st, at;
624
- function wn(r) {
625
- if (ye.call(r, "ref")) {
626
- var h = Object.getOwnPropertyDescriptor(r, "ref").get;
623
+ }, ct, ut;
624
+ function En(o) {
625
+ if (ye.call(o, "ref")) {
626
+ var h = Object.getOwnPropertyDescriptor(o, "ref").get;
627
627
  if (h && h.isReactWarning)
628
628
  return !1;
629
629
  }
630
- return r.ref !== void 0;
630
+ return o.ref !== void 0;
631
631
  }
632
- function Tn(r) {
633
- if (ye.call(r, "key")) {
634
- var h = Object.getOwnPropertyDescriptor(r, "key").get;
632
+ function Sn(o) {
633
+ if (ye.call(o, "key")) {
634
+ var h = Object.getOwnPropertyDescriptor(o, "key").get;
635
635
  if (h && h.isReactWarning)
636
636
  return !1;
637
637
  }
638
- return r.key !== void 0;
638
+ return o.key !== void 0;
639
639
  }
640
- function _n(r, h) {
641
- typeof r.ref == "string" && it.current;
640
+ function Rn(o, h) {
641
+ typeof o.ref == "string" && lt.current;
642
642
  }
643
- function xn(r, h) {
643
+ function bn(o, h) {
644
644
  {
645
645
  var p = function() {
646
- st || (st = !0, R("%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)", h));
646
+ ct || (ct = !0, P("%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)", h));
647
647
  };
648
- p.isReactWarning = !0, Object.defineProperty(r, "key", {
648
+ p.isReactWarning = !0, Object.defineProperty(o, "key", {
649
649
  get: p,
650
650
  configurable: !0
651
651
  });
652
652
  }
653
653
  }
654
- function Cn(r, h) {
654
+ function Pn(o, h) {
655
655
  {
656
656
  var p = function() {
657
- at || (at = !0, R("%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)", h));
657
+ ut || (ut = !0, P("%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)", h));
658
658
  };
659
- p.isReactWarning = !0, Object.defineProperty(r, "ref", {
659
+ p.isReactWarning = !0, Object.defineProperty(o, "ref", {
660
660
  get: p,
661
661
  configurable: !0
662
662
  });
663
663
  }
664
664
  }
665
- var En = function(r, h, p, w, E, S, C) {
666
- var x = {
665
+ var Ln = function(o, h, p, _, j, D, b) {
666
+ var E = {
667
667
  // This tag allows us to uniquely identify this as a React Element
668
668
  $$typeof: t,
669
669
  // Built-in properties that belong on the element
670
- type: r,
670
+ type: o,
671
671
  key: h,
672
672
  ref: p,
673
- props: C,
673
+ props: b,
674
674
  // Record the component responsible for creating this element.
675
- _owner: S
675
+ _owner: D
676
676
  };
677
- return x._store = {}, Object.defineProperty(x._store, "validated", {
677
+ return E._store = {}, Object.defineProperty(E._store, "validated", {
678
678
  configurable: !1,
679
679
  enumerable: !1,
680
680
  writable: !0,
681
681
  value: !1
682
- }), Object.defineProperty(x, "_self", {
682
+ }), Object.defineProperty(E, "_self", {
683
683
  configurable: !1,
684
684
  enumerable: !1,
685
685
  writable: !1,
686
- value: w
687
- }), Object.defineProperty(x, "_source", {
686
+ value: _
687
+ }), Object.defineProperty(E, "_source", {
688
688
  configurable: !1,
689
689
  enumerable: !1,
690
690
  writable: !1,
691
- value: E
692
- }), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
691
+ value: j
692
+ }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
693
693
  };
694
- function Rn(r, h, p, w, E) {
694
+ function jn(o, h, p, _, j) {
695
695
  {
696
- var S, C = {}, x = null, Y = null;
697
- p !== void 0 && (ot(p), x = "" + p), Tn(h) && (ot(h.key), x = "" + h.key), wn(h) && (Y = h.ref, _n(h, E));
698
- for (S in h)
699
- ye.call(h, S) && !gn.hasOwnProperty(S) && (C[S] = h[S]);
700
- if (r && r.defaultProps) {
701
- var $ = r.defaultProps;
702
- for (S in $)
703
- C[S] === void 0 && (C[S] = $[S]);
696
+ var D, b = {}, E = null, X = null;
697
+ p !== void 0 && (at(p), E = "" + p), Sn(h) && (at(h.key), E = "" + h.key), En(h) && (X = h.ref, Rn(h, j));
698
+ for (D in h)
699
+ ye.call(h, D) && !Cn.hasOwnProperty(D) && (b[D] = h[D]);
700
+ if (o && o.defaultProps) {
701
+ var W = o.defaultProps;
702
+ for (D in W)
703
+ b[D] === void 0 && (b[D] = W[D]);
704
704
  }
705
- if (x || Y) {
706
- var U = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
707
- x && xn(C, U), Y && Cn(C, U);
705
+ if (E || X) {
706
+ var z = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
707
+ E && bn(b, z), X && Pn(b, z);
708
708
  }
709
- return En(r, x, Y, E, w, it.current, C);
709
+ return Ln(o, E, X, j, _, lt.current, b);
710
710
  }
711
711
  }
712
- var Be = N.ReactCurrentOwner, lt = N.ReactDebugCurrentFrame;
713
- function de(r) {
714
- if (r) {
715
- var h = r._owner, p = Re(r.type, r._source, h ? h.type : null);
716
- lt.setExtraStackFrame(p);
712
+ var Be = S.ReactCurrentOwner, dt = S.ReactDebugCurrentFrame;
713
+ function de(o) {
714
+ if (o) {
715
+ var h = o._owner, p = Re(o.type, o._source, h ? h.type : null);
716
+ dt.setExtraStackFrame(p);
717
717
  } else
718
- lt.setExtraStackFrame(null);
718
+ dt.setExtraStackFrame(null);
719
719
  }
720
- var ze;
721
- ze = !1;
722
- function We(r) {
723
- return typeof r == "object" && r !== null && r.$$typeof === t;
720
+ var We;
721
+ We = !1;
722
+ function ze(o) {
723
+ return typeof o == "object" && o !== null && o.$$typeof === t;
724
724
  }
725
- function ct() {
725
+ function ft() {
726
726
  {
727
727
  if (Be.current) {
728
- var r = K(Be.current.type);
729
- if (r)
728
+ var o = Y(Be.current.type);
729
+ if (o)
730
730
  return `
731
731
 
732
- Check the render method of \`` + r + "`.";
732
+ Check the render method of \`` + o + "`.";
733
733
  }
734
734
  return "";
735
735
  }
736
736
  }
737
- function bn(r) {
737
+ function In(o) {
738
738
  return "";
739
739
  }
740
- var ut = {};
741
- function Sn(r) {
740
+ var ht = {};
741
+ function kn(o) {
742
742
  {
743
- var h = ct();
743
+ var h = ft();
744
744
  if (!h) {
745
- var p = typeof r == "string" ? r : r.displayName || r.name;
745
+ var p = typeof o == "string" ? o : o.displayName || o.name;
746
746
  p && (h = `
747
747
 
748
748
  Check the top-level render call using <` + p + ">.");
@@ -750,200 +750,153 @@ Check the top-level render call using <` + p + ">.");
750
750
  return h;
751
751
  }
752
752
  }
753
- function dt(r, h) {
753
+ function mt(o, h) {
754
754
  {
755
- if (!r._store || r._store.validated || r.key != null)
755
+ if (!o._store || o._store.validated || o.key != null)
756
756
  return;
757
- r._store.validated = !0;
758
- var p = Sn(h);
759
- if (ut[p])
757
+ o._store.validated = !0;
758
+ var p = kn(h);
759
+ if (ht[p])
760
760
  return;
761
- ut[p] = !0;
762
- var w = "";
763
- r && r._owner && r._owner !== Be.current && (w = " It was passed a child from " + K(r._owner.type) + "."), de(r), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, w), de(null);
761
+ ht[p] = !0;
762
+ var _ = "";
763
+ o && o._owner && o._owner !== Be.current && (_ = " It was passed a child from " + Y(o._owner.type) + "."), de(o), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, _), de(null);
764
764
  }
765
765
  }
766
- function ft(r, h) {
766
+ function vt(o, h) {
767
767
  {
768
- if (typeof r != "object")
768
+ if (typeof o != "object")
769
769
  return;
770
- if (Ue(r))
771
- for (var p = 0; p < r.length; p++) {
772
- var w = r[p];
773
- We(w) && dt(w, h);
770
+ if (Ue(o))
771
+ for (var p = 0; p < o.length; p++) {
772
+ var _ = o[p];
773
+ ze(_) && mt(_, h);
774
774
  }
775
- else if (We(r))
776
- r._store && (r._store.validated = !0);
777
- else if (r) {
778
- var E = j(r);
779
- if (typeof E == "function" && E !== r.entries)
780
- for (var S = E.call(r), C; !(C = S.next()).done; )
781
- We(C.value) && dt(C.value, h);
775
+ else if (ze(o))
776
+ o._store && (o._store.validated = !0);
777
+ else if (o) {
778
+ var j = w(o);
779
+ if (typeof j == "function" && j !== o.entries)
780
+ for (var D = j.call(o), b; !(b = D.next()).done; )
781
+ ze(b.value) && mt(b.value, h);
782
782
  }
783
783
  }
784
784
  }
785
- function jn(r) {
785
+ function Dn(o) {
786
786
  {
787
- var h = r.type;
787
+ var h = o.type;
788
788
  if (h == null || typeof h == "string")
789
789
  return;
790
790
  var p;
791
791
  if (typeof h == "function")
792
792
  p = h.propTypes;
793
- else if (typeof h == "object" && (h.$$typeof === l || // Note: Memo only checks outer props here.
793
+ else if (typeof h == "object" && (h.$$typeof === c || // Note: Memo only checks outer props here.
794
794
  // Inner props are checked in the reconciler.
795
- h.$$typeof === y))
795
+ h.$$typeof === T))
796
796
  p = h.propTypes;
797
797
  else
798
798
  return;
799
799
  if (p) {
800
- var w = K(h);
801
- mn(p, r.props, "prop", w, r);
802
- } else if (h.PropTypes !== void 0 && !ze) {
803
- ze = !0;
804
- var E = K(h);
805
- R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
800
+ var _ = Y(h);
801
+ wn(p, o.props, "prop", _, o);
802
+ } else if (h.PropTypes !== void 0 && !We) {
803
+ We = !0;
804
+ var j = Y(h);
805
+ P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
806
806
  }
807
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
807
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
808
808
  }
809
809
  }
810
- function Pn(r) {
810
+ function Mn(o) {
811
811
  {
812
- for (var h = Object.keys(r.props), p = 0; p < h.length; p++) {
813
- var w = h[p];
814
- if (w !== "children" && w !== "key") {
815
- de(r), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), de(null);
812
+ for (var h = Object.keys(o.props), p = 0; p < h.length; p++) {
813
+ var _ = h[p];
814
+ if (_ !== "children" && _ !== "key") {
815
+ de(o), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), de(null);
816
816
  break;
817
817
  }
818
818
  }
819
- r.ref !== null && (de(r), R("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
819
+ o.ref !== null && (de(o), P("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
820
820
  }
821
821
  }
822
- var ht = {};
823
- function mt(r, h, p, w, E, S) {
822
+ var pt = {};
823
+ function yt(o, h, p, _, j, D) {
824
824
  {
825
- var C = H(r);
826
- if (!C) {
827
- var x = "";
828
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (x += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
829
- var Y = bn();
830
- Y ? x += Y : x += ct();
831
- var $;
832
- r === null ? $ = "null" : Ue(r) ? $ = "array" : r !== void 0 && r.$$typeof === t ? ($ = "<" + (K(r.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof r, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, x);
825
+ var b = A(o);
826
+ if (!b) {
827
+ var E = "";
828
+ (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.");
829
+ var X = In();
830
+ X ? E += X : E += ft();
831
+ var W;
832
+ o === null ? W = "null" : Ue(o) ? W = "array" : o !== void 0 && o.$$typeof === t ? (W = "<" + (Y(o.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : W = typeof o, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, E);
833
833
  }
834
- var U = Rn(r, h, p, E, S);
835
- if (U == null)
836
- return U;
837
- if (C) {
838
- var ee = h.children;
839
- if (ee !== void 0)
840
- if (w)
841
- if (Ue(ee)) {
842
- for (var fe = 0; fe < ee.length; fe++)
843
- ft(ee[fe], r);
844
- Object.freeze && Object.freeze(ee);
834
+ var z = jn(o, h, p, j, D);
835
+ if (z == null)
836
+ return z;
837
+ if (b) {
838
+ var te = h.children;
839
+ if (te !== void 0)
840
+ if (_)
841
+ if (Ue(te)) {
842
+ for (var fe = 0; fe < te.length; fe++)
843
+ vt(te[fe], o);
844
+ Object.freeze && Object.freeze(te);
845
845
  } else
846
- R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
846
+ P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
847
847
  else
848
- ft(ee, r);
848
+ vt(te, o);
849
849
  }
850
850
  if (ye.call(h, "key")) {
851
- var ce = K(r), J = Object.keys(h).filter(function(Fn) {
852
- return Fn !== "key";
853
- }), qe = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
854
- if (!ht[ce + qe]) {
855
- var Mn = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
856
- R(`A props object containing a "key" prop is being spread into JSX:
851
+ var ce = Y(o), Q = Object.keys(h).filter(function(Hn) {
852
+ return Hn !== "key";
853
+ }), qe = Q.length > 0 ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}";
854
+ if (!pt[ce + qe]) {
855
+ var On = Q.length > 0 ? "{" + Q.join(": ..., ") + ": ...}" : "{}";
856
+ P(`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} />`, qe, ce, Mn, ce), ht[ce + qe] = !0;
861
+ <%s key={someKey} {...props} />`, qe, ce, On, ce), pt[ce + qe] = !0;
862
862
  }
863
863
  }
864
- return r === o ? Pn(U) : jn(U), U;
864
+ return o === r ? Mn(z) : Dn(z), z;
865
865
  }
866
866
  }
867
- function Ln(r, h, p) {
868
- return mt(r, h, p, !0);
867
+ function Nn(o, h, p) {
868
+ return yt(o, h, p, !0);
869
869
  }
870
- function In(r, h, p) {
871
- return mt(r, h, p, !1);
870
+ function Fn(o, h, p) {
871
+ return yt(o, h, p, !1);
872
872
  }
873
- var kn = In, Dn = Ln;
874
- we.Fragment = o, we.jsx = kn, we.jsxs = Dn;
873
+ var Vn = Fn, An = Nn;
874
+ we.Fragment = r, we.jsx = Vn, we.jsxs = An;
875
875
  })()), we;
876
876
  }
877
- var Tt;
878
- function Zn() {
879
- return Tt || (Tt = 1, process.env.NODE_ENV === "production" ? Le.exports = Wn() : Le.exports = qn()), Le.exports;
880
- }
881
- var s = Zn();
882
- const Kn = "_playerNotice_x3acc_1", Yn = "_playerNoticeTitle_x3acc_19", Xn = "_playerNoticeText_x3acc_28", Gn = "_playerNoticeLowZIndex_x3acc_37", ie = {
883
- playerNotice: Kn,
884
- playerNoticeTitle: Yn,
885
- playerNoticeText: Xn,
886
- playerNoticeLowZIndex: Gn
887
- }, Ot = typeof window != "undefined" ? On : D;
888
- function Ve(e, t) {
889
- const n = V(e);
890
- Ot(() => {
877
+ var Ct;
878
+ function Jn() {
879
+ return Ct || (Ct = 1, process.env.NODE_ENV === "production" ? Ie.exports = Gn() : Ie.exports = Xn()), Ie.exports;
880
+ }
881
+ var a = Jn();
882
+ const Ut = typeof window != "undefined" ? Wn : N;
883
+ function Ce(e, t) {
884
+ const n = F(e);
885
+ Ut(() => {
891
886
  n.current = e;
892
- }, [e]), D(() => {
887
+ }, [e]), N(() => {
893
888
  if (t === null)
894
889
  return;
895
- const o = setInterval(() => {
890
+ const r = setInterval(() => {
896
891
  n.current();
897
892
  }, t);
898
893
  return () => {
899
- clearInterval(o);
894
+ clearInterval(r);
900
895
  };
901
896
  }, [t]);
902
897
  }
903
- function Jn(e) {
904
- const [, t] = X(0);
905
- Ve(() => t((n) => n + 1), e);
906
- }
907
- const Qn = () => Lt((e) => ({
908
- delay: 0,
909
- startDate: null,
910
- viewerCount: null,
911
- setDelay: (t) => e({ delay: t }),
912
- setStartDate: (t) => e({ startDate: t }),
913
- setViewerCount: (t) => e({ viewerCount: t })
914
- })), Ht = jt(
915
- null
916
- ), er = ({ children: e }) => {
917
- const t = V(
918
- null
919
- );
920
- return t.current || (t.current = Qn()), /* @__PURE__ */ s.jsx(Ht.Provider, { value: t.current, children: e });
921
- }, A = (e) => {
922
- const t = Pt(Ht);
923
- if (!t)
924
- throw new Error("usePlayerStore must be used within PlayerStoreProvider");
925
- return It(t, e);
926
- };
927
- function tr(e, t, n) {
928
- const o = {
929
- days: 86400,
930
- hours: 3600,
931
- minutes: 60,
932
- seconds: 1,
933
- milliseconds: 1e-3
934
- };
935
- return e * (o[t] / o[n]);
936
- }
937
- function nr(e) {
938
- return tr(e, "milliseconds", "seconds");
939
- }
940
- const _e = (e) => {
941
- if (isNaN(e) || e === 1 / 0) return "0:00";
942
- const t = (c) => (c < 10 ? "0" : "") + c, n = Math.floor(e / 3600), o = Math.floor(e % 3600 / 60), a = Math.floor(e % 60);
943
- return n === 0 ? `${o}:${t(a)}` : `${n}:${t(o)}:${t(a)}`;
944
- };
945
- function rr(e, t) {
946
- var n, o, a, c, u, i;
898
+ function Qn(e, t) {
899
+ var n, r, s, l, u, i;
947
900
  if (typeof Intl != "undefined" && Intl.DateTimeFormat)
948
901
  try {
949
902
  const d = new Intl.DateTimeFormat("en-US", {
@@ -955,42 +908,92 @@ function rr(e, t) {
955
908
  minute: "2-digit",
956
909
  second: "2-digit",
957
910
  hour12: !1
958
- }).formatToParts(e), v = parseInt(
959
- ((n = d.find((j) => j.type === "year")) == null ? void 0 : n.value) || "0",
911
+ }).formatToParts(e), g = parseInt(
912
+ ((n = d.find((w) => w.type === "year")) == null ? void 0 : n.value) || "0",
960
913
  10
961
- ), y = parseInt(
962
- ((o = d.find((j) => j.type === "month")) == null ? void 0 : o.value) || "0",
914
+ ), T = parseInt(
915
+ ((r = d.find((w) => w.type === "month")) == null ? void 0 : r.value) || "0",
963
916
  10
964
- ) - 1, g = parseInt(
965
- ((a = d.find((j) => j.type === "day")) == null ? void 0 : a.value) || "0",
917
+ ) - 1, y = parseInt(
918
+ ((s = d.find((w) => w.type === "day")) == null ? void 0 : s.value) || "0",
966
919
  10
967
- ), L = parseInt(
968
- ((c = d.find((j) => j.type === "hour")) == null ? void 0 : c.value) || "0",
920
+ ), x = parseInt(
921
+ ((l = d.find((w) => w.type === "hour")) == null ? void 0 : l.value) || "0",
969
922
  10
970
- ), k = parseInt(
971
- ((u = d.find((j) => j.type === "minute")) == null ? void 0 : u.value) || "0",
923
+ ), L = parseInt(
924
+ ((u = d.find((w) => w.type === "minute")) == null ? void 0 : u.value) || "0",
972
925
  10
973
- ), _ = parseInt(
974
- ((i = d.find((j) => j.type === "second")) == null ? void 0 : i.value) || "0",
926
+ ), C = parseInt(
927
+ ((i = d.find((w) => w.type === "second")) == null ? void 0 : i.value) || "0",
975
928
  10
976
929
  );
977
- return new Date(v, y, g, L, k, _);
978
- } catch (l) {
930
+ return new Date(g, T, y, x, L, C);
931
+ } catch (c) {
979
932
  return console.warn(
980
933
  `Failed to convert date to timezone ${t}, returning original date:`,
981
- l
934
+ c
982
935
  ), e;
983
936
  }
984
937
  return console.warn(
985
938
  "Intl.DateTimeFormat not available, timezone conversion may be inaccurate"
986
939
  ), e;
987
940
  }
988
- function $t(e) {
941
+ function er(e, t, n) {
942
+ return Bt(
943
+ t.getTime() - e.getTime(),
944
+ n,
945
+ "milliseconds"
946
+ );
947
+ }
948
+ function tr() {
949
+ const e = /* @__PURE__ */ new Date(), t = "YYYY-MM-DD HH:mm:ss.SSSSSS", n = (s, l = 2) => String(s).padStart(l, "0"), r = {
950
+ YYYY: String(e.getFullYear()),
951
+ MM: n(e.getMonth() + 1),
952
+ DD: n(e.getDate()),
953
+ HH: n(e.getHours()),
954
+ mm: n(e.getMinutes()),
955
+ ss: n(e.getSeconds()),
956
+ SSSSSS: n(e.getMilliseconds(), 3) + "000"
957
+ };
958
+ return Object.entries(r).reduce(
959
+ (s, [l, u]) => s.replace(l, u),
960
+ t
961
+ );
962
+ }
963
+ const Te = (e) => {
964
+ if (isNaN(e) || e === 1 / 0) return "0:00";
965
+ const t = (l) => (l < 10 ? "0" : "") + l, n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = Math.floor(e % 60);
966
+ return n === 0 ? `${r}:${t(s)}` : `${n}:${t(r)}:${t(s)}`;
967
+ };
968
+ function nr() {
969
+ try {
970
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
971
+ } catch (e) {
972
+ return console.warn(
973
+ "Failed to get time zone, returning default time zone:",
974
+ e
975
+ ), "Europe/Sarajevo";
976
+ }
977
+ }
978
+ function rr(e) {
979
+ return Bt(e, "milliseconds", "seconds");
980
+ }
981
+ function Bt(e, t, n) {
982
+ const r = {
983
+ days: 86400,
984
+ hours: 3600,
985
+ minutes: 60,
986
+ seconds: 1,
987
+ milliseconds: 1e-3
988
+ };
989
+ return e * (r[t] / r[n]);
990
+ }
991
+ function Wt(e) {
989
992
  var n;
990
993
  const t = typeof window != "undefined" && ((n = window.navigator) == null ? void 0 : n.userAgent) || "";
991
994
  return e.test(t);
992
995
  }
993
- const Ut = $t(/iPhone|iPad|iPod/i), or = $t(/Tizen/i);
996
+ const zt = Wt(/iPhone|iPad|iPod/i), or = Wt(/Tizen/i);
994
997
  function ir() {
995
998
  const e = document;
996
999
  return !!(e.fullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || e.msFullscreenElement);
@@ -1006,7 +1009,7 @@ function lr(e, t) {
1006
1009
  e.removeEventListener("fullscreenchange", t), e.removeEventListener("webkitfullscreenchange", t), e.removeEventListener("mozfullscreenchange", t), e.removeEventListener("MSFullscreenChange", t);
1007
1010
  };
1008
1011
  }
1009
- const cr = () => Hn(), ur = (e, t) => ({
1012
+ const cr = () => zn(), ur = (e, t) => ({
1010
1013
  currentTime: 0,
1011
1014
  duration: 0,
1012
1015
  isEnded: !1,
@@ -1021,6 +1024,7 @@ const cr = () => Hn(), ur = (e, t) => ({
1021
1024
  startTime: -1,
1022
1025
  volume: 100,
1023
1026
  destroy: () => {
1027
+ t().isStarted && t().eventEmitter.emit("ended");
1024
1028
  },
1025
1029
  handleDurationChange: () => {
1026
1030
  const n = t().techRef.current;
@@ -1072,7 +1076,9 @@ const cr = () => Hn(), ur = (e, t) => ({
1072
1076
  }));
1073
1077
  },
1074
1078
  handlePlay: () => {
1075
- t().techRef.current && (t().eventEmitter.emit("play"), e({
1079
+ t().techRef.current && (t().eventEmitter.emit(
1080
+ t().isStarted && !t().isEnded ? "resume" : "play"
1081
+ ), e({
1076
1082
  isPlaying: !0,
1077
1083
  pauseTime: 0
1078
1084
  }));
@@ -1101,13 +1107,13 @@ const cr = () => Hn(), ur = (e, t) => ({
1101
1107
  n && t().eventEmitter.emit("volumeChange", { volume: n.volume });
1102
1108
  },
1103
1109
  handleError: (n) => {
1104
- const o = t().techRef.current;
1105
- if (!o) return;
1110
+ const r = t().techRef.current;
1111
+ if (!r) return;
1106
1112
  t().eventEmitter.emit("error", n);
1107
- const a = o.error;
1108
- if (!a) return;
1109
- const c = `${a.code}`, u = a.message || "Unknown error occurred";
1110
- e({ error: { message: u, code: c, tech: "native" } });
1113
+ const s = r.error;
1114
+ if (!s) return;
1115
+ const l = `${s.code}`, u = s.message || "Unknown error occurred";
1116
+ e({ error: { message: u, code: l, tech: "native" } });
1111
1117
  },
1112
1118
  pause: () => {
1113
1119
  const n = t().techRef.current;
@@ -1118,7 +1124,7 @@ const cr = () => Hn(), ur = (e, t) => ({
1118
1124
  }));
1119
1125
  },
1120
1126
  getPauseTimeDiff: () => !t().isStarted || !t().pauseTime ? 0 : parseInt(
1121
- nr(Date.now() - t().pauseTime).toFixed(0)
1127
+ rr(Date.now() - t().pauseTime).toFixed(0)
1122
1128
  ),
1123
1129
  play: () => {
1124
1130
  const n = t().techRef.current;
@@ -1139,9 +1145,12 @@ const cr = () => Hn(), ur = (e, t) => ({
1139
1145
  });
1140
1146
  });
1141
1147
  },
1148
+ restart: () => {
1149
+ t().eventEmitter.emit("restart");
1150
+ },
1142
1151
  seek: (n) => {
1143
- const o = t().techRef.current;
1144
- o && (o.currentTime = n, (o.paused || o.ended) && o.play(), e({
1152
+ const r = t().techRef.current;
1153
+ r && (r.currentTime = n, (r.paused || r.ended) && r.play(), e({
1145
1154
  seekTime: -1,
1146
1155
  currentTime: n,
1147
1156
  isStarted: !0,
@@ -1151,13 +1160,13 @@ const cr = () => Hn(), ur = (e, t) => ({
1151
1160
  },
1152
1161
  setIsLoading: (n) => e({ isLoading: n }),
1153
1162
  setIsLoop: (n) => {
1154
- const o = t().techRef.current;
1155
- o && (o.loop = n, e({ isLoop: n }));
1163
+ const r = t().techRef.current;
1164
+ r && (r.loop = n, e({ isLoop: n }));
1156
1165
  },
1157
1166
  setStartTime: (n) => e({ startTime: n }),
1158
1167
  setVolume: (n) => {
1159
- const o = t().techRef.current;
1160
- o && (o.muted = n === 0, o.volume = n / 100, e({ volume: n }));
1168
+ const r = t().techRef.current;
1169
+ r && (r.muted = n === 0, r.volume = n / 100, e({ volume: n }));
1161
1170
  },
1162
1171
  stop: () => {
1163
1172
  t().techRef.current && e({
@@ -1175,15 +1184,16 @@ const cr = () => Hn(), ur = (e, t) => ({
1175
1184
  idleLocks: new Set(n.idleLocks).add(t)
1176
1185
  })),
1177
1186
  removeIdleLock: (t) => e((n) => {
1178
- const o = new Set(n.idleLocks);
1179
- return o.delete(t), { idleLocks: o };
1187
+ const r = new Set(n.idleLocks);
1188
+ return r.delete(t), { idleLocks: r };
1180
1189
  })
1181
1190
  }), hr = (e, t) => ({
1182
1191
  level: null,
1183
1192
  levels: null,
1184
1193
  setLevels: (n) => e({ levels: n }),
1185
- setLevel: (n) => {
1186
- n && t().eventEmitter.emit("qualityChange", { level: n }), e({ level: n });
1194
+ setLevel: (n) => e({ level: n }),
1195
+ logLevel: (n) => {
1196
+ n && t().eventEmitter.emit("qualityChange", { level: n });
1187
1197
  }
1188
1198
  }), mr = (e, t) => ({
1189
1199
  isFullscreen: !1,
@@ -1192,63 +1202,205 @@ const cr = () => Hn(), ur = (e, t) => ({
1192
1202
  t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }), ar(document), e({ isFullscreen: !1 });
1193
1203
  },
1194
1204
  requestFullscreen: () => {
1195
- const n = t().techRef.current, o = t().containerRef.current;
1196
- if (!n || !o) return;
1205
+ const n = t().techRef.current, r = t().containerRef.current;
1206
+ if (!n || !r) return;
1197
1207
  t().eventEmitter.emit("fullscreenChange", { isFullscreen: !0 });
1198
- const a = Ut ? n : o;
1199
- a && sr(a), e({ isFullscreen: !0 });
1208
+ const s = zt ? n : r;
1209
+ s && sr(s), e({ isFullscreen: !0 });
1200
1210
  },
1201
1211
  setIsFullscreen: (n) => e({ isFullscreen: n }),
1202
1212
  setIsFullscreenReady: (n) => e({ isFullscreenReady: n })
1203
- }), pr = (e) => ({
1213
+ }), vr = (e) => ({
1204
1214
  error: null,
1205
1215
  setError: (t) => e({ error: t })
1206
- }), vr = () => ({
1216
+ }), pr = () => ({
1207
1217
  eventEmitter: cr()
1208
- }), yr = (e) => () => P({}, e), gr = (e, t) => Lt()((...n) => P(P(P(P(P(P(P(P({}, ur(...n)), dr(...n)), fr(...n)), mr(...n)), hr(...n)), pr(...n)), vr(...n)), yr({
1218
+ }), yr = (e) => () => M({}, e), gr = (e, t) => Mt()((...n) => M(M(M(M(M(M(M(M({}, ur(...n)), dr(...n)), fr(...n)), mr(...n)), hr(...n)), vr(...n)), pr(...n)), yr({
1209
1219
  techRef: e,
1210
1220
  containerRef: t
1211
- })(...n))), Bt = jt(null);
1221
+ })(...n))), qt = It(null);
1212
1222
  function wr({ children: e }) {
1213
- const t = V(null), n = V(null), o = V(null);
1214
- return t.current || (t.current = gr(n, o)), /* @__PURE__ */ s.jsx(Bt.Provider, { value: t.current, children: e });
1223
+ const t = F(null), n = F(null), r = F(null);
1224
+ return t.current || (t.current = gr(n, r)), /* @__PURE__ */ a.jsx(qt.Provider, { value: t.current, children: e });
1215
1225
  }
1216
1226
  const f = (e) => {
1217
- const t = Pt(Bt);
1227
+ const t = kt(qt);
1218
1228
  if (!t)
1219
1229
  throw new Error("usePlayerStore must be used within PlayerStoreProvider");
1220
- return It(t, e);
1230
+ return Dt(t, e);
1231
+ }, _r = "0.0.52", Je = {
1232
+ version: _r
1233
+ }, Ye = 11e3, Ze = {
1234
+ DEBUG: 2,
1235
+ INFO: 3,
1236
+ WARNING: 4
1237
+ };
1238
+ function Yt({
1239
+ title: e,
1240
+ id: t,
1241
+ kind: n,
1242
+ delay: r,
1243
+ url: s
1244
+ }) {
1245
+ const l = F(null), u = F(!1), [i, c] = G(null), d = f((w) => w.eventEmitter), g = f((w) => w.isPlaying), y = (s.includes("staging") ? "stg" : "prd") === "stg" ? "https://collector-staging.spectar.tv/ingest" : "https://collector.spectar.tv/ingest";
1246
+ u.current = g;
1247
+ const x = O(
1248
+ async ({
1249
+ type: w,
1250
+ message: S,
1251
+ level: P = Ze.INFO,
1252
+ duration: R,
1253
+ valueStr1: B,
1254
+ valueStr2: V
1255
+ }) => {
1256
+ const m = {
1257
+ content_kind: n,
1258
+ datetime: {
1259
+ date: tr(),
1260
+ timezone: nr()
1261
+ },
1262
+ level_num: P,
1263
+ log_source: "fitnessanny_player",
1264
+ capp_version: Je.version,
1265
+ message: S,
1266
+ target_index: w === "client" ? "client_log" : "watching_activity_log"
1267
+ };
1268
+ e && (m.title = e), t && (m.value_int1 = t), B && (m.value_str1 = B), V && (m.value_str2 = V), w === "watch" && (R && (m.interval_duration = R), r && (m.catchup_time = r));
1269
+ const v = await fetch(y, {
1270
+ method: "POST",
1271
+ body: JSON.stringify(m)
1272
+ });
1273
+ if (!v.ok)
1274
+ throw new Error(`HTTP error! status: ${v.status}`);
1275
+ },
1276
+ [y, r, t, n, e]
1277
+ ), L = O((w) => {
1278
+ l.current = w != null ? w : /* @__PURE__ */ new Date();
1279
+ }, []), C = O(
1280
+ async (w) => {
1281
+ !w && l.current && (w = er(l.current, /* @__PURE__ */ new Date(), "milliseconds")), console.log("[Player][Activity]", "Watching", w), await x({ type: "watch", message: "WATCHING", duration: w });
1282
+ },
1283
+ [x]
1284
+ );
1285
+ return Ce(() => {
1286
+ C(i), L();
1287
+ }, i), N(() => {
1288
+ const w = () => {
1289
+ c(Ye), x({ type: "watch", message: "PLAY" }), L();
1290
+ }, S = () => {
1291
+ c(null), x({ type: "watch", message: "PAUSE" }), C(), L();
1292
+ }, P = () => {
1293
+ c(Ye), x({ type: "watch", message: "RESUME" }), L();
1294
+ }, R = () => {
1295
+ c(null), u.current && (x({ type: "watch", message: "STOP" }), C()), c(Ye), x({ type: "watch", message: "PLAY" }), L();
1296
+ }, B = () => {
1297
+ c(null), x({ type: "watch", message: "STOP" }), u.current && C(), L();
1298
+ }, V = ({ level: v }) => {
1299
+ v && x({
1300
+ type: "client",
1301
+ message: "QUALITY_CHANGE",
1302
+ level: Ze.DEBUG,
1303
+ valueStr1: v
1304
+ });
1305
+ }, m = (v) => {
1306
+ let U = "UNKNOWN_ERROR", I = "Unknown error occurred";
1307
+ v instanceof MediaError && (v.code && (U = `${v.code}`), v.message && (I = `${v.message}`)), x({
1308
+ type: "client",
1309
+ message: "ERROR",
1310
+ level: Ze.WARNING,
1311
+ valueStr1: U,
1312
+ valueStr2: I
1313
+ });
1314
+ };
1315
+ return d.on("play", w), d.on("pause", S), d.on("resume", P), d.on("restart", R), d.on("ended", B), d.on("qualityChange", V), d.on("error", m), () => {
1316
+ d.off("play", w), d.off("pause", S), d.off("resume", P), d.off("restart", R), d.off("ended", B), d.off("qualityChange", V), d.off("error", m);
1317
+ };
1318
+ }, [d, x, L, C]), null;
1319
+ }
1320
+ const Tr = () => Mt((e) => ({
1321
+ delay: 0,
1322
+ startDate: null,
1323
+ viewerCount: null,
1324
+ setDelay: (t) => e({ delay: t }),
1325
+ setStartDate: (t) => e({ startDate: t }),
1326
+ setViewerCount: (t) => e({ viewerCount: t })
1327
+ })), Zt = It(
1328
+ null
1329
+ ), xr = ({ children: e }) => {
1330
+ const t = F(
1331
+ null
1332
+ );
1333
+ return t.current || (t.current = Tr()), /* @__PURE__ */ a.jsx(Zt.Provider, { value: t.current, children: e });
1334
+ }, $ = (e) => {
1335
+ const t = kt(Zt);
1336
+ if (!t)
1337
+ throw new Error(
1338
+ "useLivePlayerStore must be used within PlayerStoreProvider"
1339
+ );
1340
+ return Dt(t, e);
1221
1341
  };
1222
- function Tr(e) {
1342
+ function Kt(e) {
1343
+ try {
1344
+ const n = new URL(e).searchParams, r = {};
1345
+ return n.forEach((s, l) => {
1346
+ r[l] = s;
1347
+ }), r;
1348
+ } catch (t) {
1349
+ return console.error("Invalid URL:", t), {};
1350
+ }
1351
+ }
1352
+ function Cr({ url: e }) {
1353
+ const { video_id: t } = Kt(e), n = $((s) => s.delay), r = t ? Number(t) : void 0;
1354
+ return r ? /* @__PURE__ */ a.jsx(
1355
+ Yt,
1356
+ {
1357
+ kind: n ? "catchup" : "live",
1358
+ delay: n,
1359
+ url: e,
1360
+ id: r
1361
+ }
1362
+ ) : null;
1363
+ }
1364
+ const Er = "_playerNotice_x3acc_1", Sr = "_playerNoticeTitle_x3acc_19", Rr = "_playerNoticeText_x3acc_28", br = "_playerNoticeLowZIndex_x3acc_37", ie = {
1365
+ playerNotice: Er,
1366
+ playerNoticeTitle: Sr,
1367
+ playerNoticeText: Rr,
1368
+ playerNoticeLowZIndex: br
1369
+ };
1370
+ function Pr(e) {
1371
+ const [, t] = G(0);
1372
+ Ce(() => t((n) => n + 1), e);
1373
+ }
1374
+ function Lr(e) {
1223
1375
  const t = e.split(`
1224
1376
  `);
1225
1377
  for (const n of t) {
1226
- const o = n.trim();
1227
- if (o.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
1228
- const a = o.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), c = new Date(a);
1229
- if (!isNaN(c.getTime()))
1230
- return rr(c, "Europe/Sarajevo");
1378
+ const r = n.trim();
1379
+ if (r.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
1380
+ const s = r.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), l = new Date(s);
1381
+ if (!isNaN(l.getTime()))
1382
+ return Qn(l, "Europe/Sarajevo");
1231
1383
  }
1232
1384
  }
1233
1385
  return null;
1234
1386
  }
1235
- function _r(e, t) {
1387
+ function jr(e, t) {
1236
1388
  const n = e.split(`
1237
1389
  `);
1238
- let o = !1;
1239
- for (const a of n) {
1240
- const c = a.trim();
1241
- if (c.startsWith("#EXT-X-STREAM-INF:")) {
1242
- o = !0;
1390
+ let r = !1;
1391
+ for (const s of n) {
1392
+ const l = s.trim();
1393
+ if (l.startsWith("#EXT-X-STREAM-INF:")) {
1394
+ r = !0;
1243
1395
  continue;
1244
1396
  }
1245
- if (o && !c.startsWith("#")) {
1246
- if (c.startsWith("http"))
1247
- return c;
1397
+ if (r && !l.startsWith("#")) {
1398
+ if (l.startsWith("http"))
1399
+ return l;
1248
1400
  {
1249
1401
  const u = new URL(t);
1250
1402
  return new URL(
1251
- c,
1403
+ l,
1252
1404
  u.origin + u.pathname.substring(
1253
1405
  0,
1254
1406
  u.pathname.lastIndexOf("/")
@@ -1259,407 +1411,423 @@ function _r(e, t) {
1259
1411
  }
1260
1412
  return null;
1261
1413
  }
1262
- function xr(e) {
1414
+ function Ir(e) {
1263
1415
  return e.replace("playlist.m3u8", "playlist_fmp4_dvr.m3u8");
1264
1416
  }
1265
- async function Cr(e) {
1417
+ async function kr(e) {
1266
1418
  try {
1267
- const t = xr(e);
1419
+ const t = Ir(e);
1268
1420
  console.log("Converting to DVR URL:", t);
1269
1421
  const n = await fetch(t);
1270
1422
  if (!n.ok)
1271
1423
  throw new Error(
1272
1424
  `Failed to fetch master playlist: ${n.status} ${n.statusText}`
1273
1425
  );
1274
- const o = await n.text(), a = _r(
1275
- o,
1426
+ const r = await n.text(), s = jr(
1427
+ r,
1276
1428
  t
1277
1429
  );
1278
- if (!a)
1430
+ if (!s)
1279
1431
  throw new Error("No chunklist URL found in master playlist");
1280
- console.log("Found chunklist URL:", a);
1281
- const c = await fetch(a);
1282
- if (!c.ok)
1432
+ console.log("Found chunklist URL:", s);
1433
+ const l = await fetch(s);
1434
+ if (!l.ok)
1283
1435
  throw new Error(
1284
- `Failed to fetch chunklist: ${c.status} ${c.statusText}`
1436
+ `Failed to fetch chunklist: ${l.status} ${l.statusText}`
1285
1437
  );
1286
- const u = await c.text(), i = Tr(u);
1438
+ const u = await l.text(), i = Lr(u);
1287
1439
  return i ? console.log("Successfully detected start time:", i.toISOString()) : console.log(" No start time found in chunklist"), i;
1288
1440
  } catch (t) {
1289
1441
  return console.error("Error getting start time from HLS URL:", t), null;
1290
1442
  }
1291
1443
  }
1292
- function Er(n) {
1293
- var o = n, { url: e } = o, t = ne(o, ["url"]);
1294
- const [a, c] = X(!0), u = A((d) => d.startDate), i = A((d) => d.setStartDate), l = z(async () => {
1295
- const d = await Cr(e);
1444
+ function Dr(n) {
1445
+ var r = n, { url: e } = r, t = re(r, ["url"]);
1446
+ const [s, l] = G(!0), u = $((d) => d.startDate), i = $((d) => d.setStartDate), c = O(async () => {
1447
+ const d = await kr(e);
1296
1448
  d && i(d);
1297
1449
  }, [e, i]);
1298
- return D(() => {
1450
+ return N(() => {
1299
1451
  (async () => {
1300
- c(!0), await l(), c(!1);
1452
+ l(!0), await c(), l(!1);
1301
1453
  })();
1302
- }, [l]), Ve(l, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(Rr, P({}, t));
1454
+ }, [c]), Ce(c, u ? null : 5e3), s ? null : /* @__PURE__ */ a.jsx(Mr, M({}, t));
1303
1455
  }
1304
- function Rr({
1456
+ function Mr({
1305
1457
  children: e,
1306
1458
  messages: t
1307
1459
  }) {
1308
- const n = A((u) => u.startDate), o = f((u) => u.isStarted);
1309
- return Jn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ s.jsx(
1310
- br,
1460
+ const n = $((u) => u.startDate), r = f((u) => u.isStarted);
1461
+ return Pr(r ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ a.jsx(
1462
+ Nr,
1311
1463
  {
1312
1464
  startDate: n,
1313
1465
  title: t.eventNotStarted,
1314
1466
  message: t.eventStartingSoon
1315
1467
  }
1316
- ) : /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: t.unableToPlay }) });
1468
+ ) : /* @__PURE__ */ a.jsx(a.Fragment, { children: e }) : /* @__PURE__ */ a.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: t.unableToPlay }) });
1317
1469
  }
1318
- function br({ startDate: e, title: t, message: n }) {
1319
- const o = e.getTime() - Date.now(), a = Math.floor(o / (1e3 * 60 * 60)), c = Math.floor(
1320
- o % (1e3 * 60 * 60) / (1e3 * 60)
1470
+ function Nr({ startDate: e, title: t, message: n }) {
1471
+ const r = e.getTime() - Date.now(), s = Math.floor(r / (1e3 * 60 * 60)), l = Math.floor(
1472
+ r % (1e3 * 60 * 60) / (1e3 * 60)
1321
1473
  );
1322
- return a || c ? /* @__PURE__ */ s.jsxs("div", { className: ie.playerNotice, children: [
1323
- /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: t }),
1324
- /* @__PURE__ */ s.jsxs("p", { className: ie.playerNoticeText, children: [
1474
+ return s || l ? /* @__PURE__ */ a.jsxs("div", { className: ie.playerNotice, children: [
1475
+ /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: t }),
1476
+ /* @__PURE__ */ a.jsxs("p", { className: ie.playerNoticeText, children: [
1325
1477
  "(",
1326
- a > 0 ? `${a}h ${c}m` : `${c}m`,
1478
+ s > 0 ? `${s}h ${l}m` : `${l}m`,
1327
1479
  ")"
1328
1480
  ] })
1329
- ] }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: n }) });
1481
+ ] }) : /* @__PURE__ */ a.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: n }) });
1330
1482
  }
1331
- function zt({ callback: e }) {
1483
+ function Gt({ callback: e }) {
1332
1484
  const t = f((n) => n.eventEmitter);
1333
- return D(() => {
1334
- const n = () => e("play", void 0), o = () => e("pause", void 0), a = () => e("ended", void 0), c = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (_) => e("volumeChange", _), l = (_) => e("fullscreenChange", _), d = (_) => e("qualityChange", _), v = (_) => e("loadedMetadata", _), y = () => e("loadStart", void 0), g = () => e("playing", void 0), L = () => e("waiting", void 0), k = () => e("error", void 0);
1335
- return t.on("play", n), t.on("pause", o), t.on("ended", a), t.on("seeking", c), t.on("seeked", u), t.on("volumeChange", i), t.on("fullscreenChange", l), t.on("qualityChange", d), t.on("loadedMetadata", v), t.on("loadStart", y), t.on("playing", g), t.on("waiting", L), t.on("error", k), () => {
1336
- t.off("play", n), t.off("pause", o), t.off("ended", a), t.off("seeking", c), t.off("seeked", u), t.off("volumeChange", i), t.off("fullscreenChange", l), t.off("qualityChange", d), t.off("loadedMetadata", v), t.off("loadStart", y), t.off("playing", g), t.off("waiting", L), t.off("error", k);
1485
+ return N(() => {
1486
+ const n = () => e("play", void 0), r = () => e("pause", void 0), s = () => e("resume", void 0), l = () => e("restart", void 0), u = () => e("ended", void 0), i = () => e("seeking", void 0), c = () => e("seeked", void 0), d = (S) => e("volumeChange", S), g = (S) => e("fullscreenChange", S), T = (S) => e("qualityChange", S), y = (S) => e("loadedMetadata", S), x = () => e("loadStart", void 0), L = () => e("playing", void 0), C = () => e("waiting", void 0), w = () => e("error", void 0);
1487
+ return t.on("play", n), t.on("pause", r), t.on("resume", s), t.on("restart", l), t.on("ended", u), t.on("seeking", i), t.on("seeked", c), t.on("volumeChange", d), t.on("fullscreenChange", g), t.on("qualityChange", T), t.on("loadedMetadata", y), t.on("loadStart", x), t.on("playing", L), t.on("waiting", C), t.on("error", w), () => {
1488
+ t.off("play", n), t.off("pause", r), t.off("resume", s), t.off("restart", l), t.off("ended", u), t.off("seeking", i), t.off("seeked", c), t.off("volumeChange", d), t.off("fullscreenChange", g), t.off("qualityChange", T), t.off("loadedMetadata", y), t.off("loadStart", x), t.off("playing", L), t.off("waiting", C), t.off("error", w);
1337
1489
  };
1338
1490
  }, [e, t]), null;
1339
1491
  }
1340
- const Wt = (e, t = 0) => parseInt(
1492
+ const Xt = (e, t = 0) => parseInt(
1341
1493
  Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(0)
1342
- ), qt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), Sr = (e, t) => Math.max(0, (t - e) / 1e3), jr = (e, t = 0) => {
1343
- const o = t < 0 ? 0 : t, a = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], c = Math.floor(Math.log(e) / Math.log(1024));
1344
- return `${parseFloat((e / Math.pow(1024, c)).toFixed(o))}${a[c]}`;
1494
+ ), Jt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), Fr = (e, t) => Math.max(0, (t - e) / 1e3), Vr = (e, t = 0) => {
1495
+ const r = t < 0 ? 0 : t, s = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], l = Math.floor(Math.log(e) / Math.log(1024));
1496
+ return `${parseFloat((e / Math.pow(1024, l)).toFixed(r))}${s[l]}`;
1345
1497
  };
1346
- function Pr({
1498
+ function Ar({
1347
1499
  isAuto: e,
1348
1500
  level: t,
1349
1501
  levels: n
1350
1502
  }) {
1351
- const o = n.length, a = [];
1352
- return o > 1 && a.push({
1503
+ const r = n.length, s = [];
1504
+ return r > 1 && s.push({
1353
1505
  sid: "quality-level-auto",
1354
1506
  label: "Auto",
1355
1507
  value: -1,
1356
1508
  selected: e || t === -1
1357
- }), n.sort(function(c, u) {
1358
- const i = c.height || c.bitrate || 0, l = u.height || u.bitrate || 0;
1359
- return i === l ? 0 : i > l ? 1 : -1;
1360
- }), n.map((c) => {
1361
- const { bitrate: u, height: i, index: l } = c;
1362
- a.push({
1363
- sid: `quality-level-${l}`,
1364
- label: i ? `${i}p` : jr(u),
1365
- value: l,
1366
- selected: o === 1 || !e && l === t
1509
+ }), n.sort(function(l, u) {
1510
+ const i = l.height || l.bitrate || 0, c = u.height || u.bitrate || 0;
1511
+ return i === c ? 0 : i > c ? 1 : -1;
1512
+ }), n.map((l) => {
1513
+ const { bitrate: u, height: i, index: c } = l;
1514
+ s.push({
1515
+ sid: `quality-level-${c}`,
1516
+ label: i ? `${i}p` : Vr(u),
1517
+ value: c,
1518
+ selected: r === 1 || !e && c === t
1367
1519
  });
1368
- }), a;
1520
+ }), s;
1369
1521
  }
1370
- function Lr({ callback: e }) {
1371
- const t = A((c) => c.delay), n = A((c) => c.startDate), o = n ? n.getTime() : 0, a = f((c) => c.eventEmitter);
1372
- return D(() => {
1373
- const c = () => e("timeUpdate", {
1374
- currentTime: qt(o, t),
1522
+ function Or({ callback: e }) {
1523
+ const t = $((l) => l.delay), n = $((l) => l.startDate), r = n ? n.getTime() : 0, s = f((l) => l.eventEmitter);
1524
+ return N(() => {
1525
+ const l = () => e("timeUpdate", {
1526
+ currentTime: Jt(r, t),
1375
1527
  duration: -1
1376
1528
  });
1377
- return a.on("timeUpdate", c), () => {
1378
- a.off("timeUpdate", c);
1529
+ return s.on("timeUpdate", l), () => {
1530
+ s.off("timeUpdate", l);
1379
1531
  };
1380
- }, [e, t, a, o]), /* @__PURE__ */ s.jsx(zt, { callback: e });
1532
+ }, [e, t, s, r]), /* @__PURE__ */ a.jsx(Gt, { callback: e });
1381
1533
  }
1382
- function Zt() {
1383
- const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), a = f((i) => i.setVolume), c = f((i) => i.volume), u = z(
1534
+ function Qt() {
1535
+ const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), r = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), l = f((i) => i.volume), u = O(
1384
1536
  (i) => {
1385
- let l = !1;
1537
+ let c = !1;
1386
1538
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
1387
1539
  switch (i.code) {
1388
1540
  case "ArrowUp":
1389
- a(c + 10 < 100 ? c + 10 : 100), l = !0;
1541
+ s(l + 10 < 100 ? l + 10 : 100), c = !0;
1390
1542
  break;
1391
1543
  case "ArrowDown":
1392
- a(c - 10 > 0 ? c - 10 : 0), l = !0;
1544
+ s(l - 10 > 0 ? l - 10 : 0), c = !0;
1393
1545
  break;
1394
1546
  case "KeyM":
1395
- a(c === 0 ? 100 : 0), l = !0;
1547
+ s(l === 0 ? 100 : 0), c = !0;
1396
1548
  break;
1397
1549
  case "KeyF":
1398
- n && (t ? e() : o(), l = !0);
1550
+ n && (t ? e() : r(), c = !0);
1399
1551
  break;
1400
1552
  }
1401
- l && i.preventDefault();
1553
+ c && i.preventDefault();
1402
1554
  }
1403
1555
  },
1404
1556
  [
1405
1557
  e,
1406
1558
  t,
1407
1559
  n,
1408
- o,
1409
- a,
1410
- c
1560
+ r,
1561
+ s,
1562
+ l
1411
1563
  ]
1412
1564
  );
1413
- return D(() => (document.addEventListener("keydown", u), () => {
1565
+ return N(() => (document.addEventListener("keydown", u), () => {
1414
1566
  document.removeEventListener("keydown", u);
1415
1567
  }), [u]), null;
1416
1568
  }
1417
- function Ir() {
1418
- const e = A((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), a = f((i) => i.play), c = A((i) => i.setDelay), u = z(
1569
+ function Hr() {
1570
+ const e = $((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), r = f((i) => i.getPauseTimeDiff), s = f((i) => i.play), l = $((i) => i.setDelay), u = O(
1419
1571
  (i) => {
1420
- let l = !1;
1572
+ let c = !1;
1421
1573
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
1422
1574
  switch (i.code) {
1423
1575
  case "ArrowLeft":
1424
- c(e + 10), l = !0;
1576
+ l(e + 10), c = !0;
1425
1577
  break;
1426
1578
  case "ArrowRight":
1427
- c(e - 10 > 0 ? e - 10 : 0), l = !0;
1579
+ l(e - 10 > 0 ? e - 10 : 0), c = !0;
1428
1580
  break;
1429
1581
  case "Space":
1430
1582
  if (t)
1431
1583
  n();
1432
1584
  else {
1433
- const d = o();
1434
- d && c(e + d), a();
1585
+ const d = r();
1586
+ d && l(e + d), s();
1435
1587
  }
1436
- l = !0;
1588
+ c = !0;
1437
1589
  break;
1438
1590
  }
1439
- l && i.preventDefault();
1591
+ c && i.preventDefault();
1440
1592
  }
1441
1593
  },
1442
- [e, o, t, n, a, c]
1594
+ [e, r, t, n, s, l]
1443
1595
  );
1444
- return D(() => (document.addEventListener("keydown", u), () => {
1596
+ return N(() => (document.addEventListener("keydown", u), () => {
1445
1597
  document.removeEventListener("keydown", u);
1446
- }), [u]), /* @__PURE__ */ s.jsx(Zt, {});
1598
+ }), [u]), /* @__PURE__ */ a.jsx(Qt, {});
1447
1599
  }
1448
- function Kt({ children: e }) {
1449
- return /* @__PURE__ */ s.jsx(wr, { children: e });
1600
+ function en({ children: e }) {
1601
+ return /* @__PURE__ */ a.jsx(wr, { children: e });
1450
1602
  }
1451
- function kr({ children: e }) {
1452
- return /* @__PURE__ */ s.jsx(er, { children: /* @__PURE__ */ s.jsx(Kt, { children: e }) });
1603
+ function $r({ children: e }) {
1604
+ return /* @__PURE__ */ a.jsx(xr, { children: /* @__PURE__ */ a.jsx(en, { children: e }) });
1453
1605
  }
1454
- function Dr({ url: e, isLive: t, messages: n }) {
1455
- const o = V(null), a = f((T) => T.level), c = f((T) => T.levels), u = f((T) => T.setLevel), i = f((T) => T.setLevels), l = f((T) => T.techRef), d = f((T) => T.setError), v = V(0), y = V(null), g = 50, L = 1e4, k = z(
1456
- (T) => {
1457
- if (o.current && (o.current.nextLevel = T, u(null), c)) {
1458
- const M = c.map((m) => he(P({}, m), {
1459
- selected: m.value === T
1606
+ function Ur({ url: e, isLive: t, messages: n }) {
1607
+ const r = F(null), s = f((m) => m.level), l = f((m) => m.levels), u = f((m) => m.setLevel), i = f((m) => m.setLevels), c = f((m) => m.logLevel), d = f((m) => m.techRef), g = f((m) => m.setError), T = F(0), y = F(null), x = 50, L = 1e4, C = O(
1608
+ (m) => {
1609
+ if (r.current && (r.current.nextLevel = m, u(null), l)) {
1610
+ const v = l.map((U) => he(M({}, U), {
1611
+ selected: U.value === m
1460
1612
  }));
1461
- i(M);
1613
+ i(v);
1462
1614
  }
1463
1615
  },
1464
- [c, u, i, o]
1465
- ), _ = z(() => {
1466
- o.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), o.current.loadSource(e));
1467
- }, [e]), j = z(() => {
1468
- if (!o.current) return;
1469
- console.log("[Player][HLS] MANIFEST_LOADED"), d(null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
1470
- const T = o.current.levels, M = o.current.currentLevel, m = o.current.autoLevelEnabled;
1616
+ [l, u, i]
1617
+ ), w = O(() => {
1618
+ r.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), r.current.loadSource(e));
1619
+ }, [e]), S = O(() => {
1620
+ if (!r.current) return;
1621
+ console.log("[Player][HLS] MANIFEST_LOADED"), g(null), y.current && (clearTimeout(y.current), y.current = null), T.current = 0;
1622
+ const m = r.current.levels, v = r.current.currentLevel, U = r.current.autoLevelEnabled;
1471
1623
  i(
1472
- Pr({
1473
- levels: T.map((O, G) => {
1474
- const { bitrate: Z, height: H, width: b } = O;
1624
+ Ar({
1625
+ levels: m.map((I, A) => {
1626
+ const { bitrate: k, height: J, width: Y } = I;
1475
1627
  return {
1476
- bitrate: Z,
1477
- height: H,
1478
- index: G,
1479
- width: b
1628
+ bitrate: k,
1629
+ height: J,
1630
+ index: A,
1631
+ width: Y
1480
1632
  };
1481
1633
  }),
1482
- level: M,
1483
- isAuto: m
1634
+ level: v,
1635
+ isAuto: U
1484
1636
  })
1485
1637
  );
1486
- }, [d, i]), N = z(
1638
+ }, [g, i]), P = O(() => {
1639
+ if (!r.current) return;
1640
+ console.log("[Player][HLS] LEVEL_SWITCHED");
1641
+ const m = r.current.levels, v = r.current.currentLevel;
1642
+ if (m[v] ? JSON.stringify(m[v]) : null) {
1643
+ let I = "";
1644
+ m[v].height ? I = `${m[v].height}p` : m[v].bitrate && (I = `${m[v].bitrate}bps`), c(I);
1645
+ }
1646
+ }, [c]), R = O(
1487
1647
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1488
- (T, M) => {
1489
- if (o.current && M.fatal) {
1490
- let m, O = "UNKNOWN_ERROR";
1491
- switch (M.type) {
1492
- case re.ErrorTypes.NETWORK_ERROR:
1493
- m = n.unableToPlay, console.log("[Player][HLS] NETWORK_ERROR", M), t ? (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
1494
- if (o.current)
1648
+ (m, v) => {
1649
+ if (r.current && v.fatal) {
1650
+ let U, I = "UNKNOWN_ERROR";
1651
+ switch (v.type) {
1652
+ case ee.ErrorTypes.NETWORK_ERROR:
1653
+ U = n.unableToPlay, console.log("[Player][HLS] NETWORK_ERROR", v), t ? (T.current < x && (y.current && clearTimeout(y.current), T.current += 1, y.current = setTimeout(() => {
1654
+ if (r.current)
1495
1655
  try {
1496
- console.log("[Player][HLS] Retrying stream..."), o.current.loadSource(e);
1497
- } catch (G) {
1498
- console.error("[Player][HLS] Retry failed:", G);
1656
+ console.log("[Player][HLS] Retrying stream..."), r.current.loadSource(e);
1657
+ } catch (A) {
1658
+ console.error("[Player][HLS] Retry failed:", A);
1499
1659
  }
1500
- }, L)), O = "LIVE_MANIFEST_LOAD_ERROR") : (o.current.startLoad(), O = "NETWORK_ERROR"), d({ message: m, code: O, tech: "hls" });
1660
+ }, L)), I = "LIVE_MANIFEST_LOAD_ERROR") : (r.current.startLoad(), I = "NETWORK_ERROR"), g({ message: U, code: I, tech: "hls" });
1501
1661
  break;
1502
- case re.ErrorTypes.MEDIA_ERROR:
1503
- o.current.recoverMediaError();
1662
+ case ee.ErrorTypes.MEDIA_ERROR:
1663
+ r.current.recoverMediaError();
1504
1664
  break;
1505
1665
  }
1506
1666
  }
1507
1667
  },
1508
- [t, e, d, n]
1509
- ), R = z(() => {
1510
- if (!l.current) return;
1511
- const T = {
1668
+ [t, e, g, n]
1669
+ ), B = O(() => {
1670
+ if (!d.current) return;
1671
+ const m = {
1512
1672
  startLevel: -1,
1513
1673
  maxBufferSize: 30 * 1024 * 1024
1514
1674
  // 30MB
1515
1675
  };
1516
- or ? (T.backBufferLength = -1, T.enableWorker = !1) : t ? T.backBufferLength = 10 : T.backBufferLength = 60;
1676
+ or ? (m.backBufferLength = -1, m.enableWorker = !1) : t ? m.backBufferLength = 10 : m.backBufferLength = 60;
1517
1677
  try {
1518
- console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(T)), console.log("[Player][HLS] Version", re.version), o.current = new re(T), o.current.attachMedia(l.current), o.current.on(re.Events.MEDIA_ATTACHED, _), o.current.on(re.Events.MANIFEST_LOADED, j), o.current.on(re.Events.ERROR, N);
1519
- } catch (M) {
1520
- throw new Error(`Error initializing Hls: ${M}`);
1678
+ console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(m)), console.log("[Player][HLS] Version", ee.version), r.current = new ee(m), r.current.attachMedia(d.current), r.current.on(ee.Events.MEDIA_ATTACHED, w), r.current.on(ee.Events.MANIFEST_LOADED, S), r.current.on(ee.Events.LEVEL_SWITCHED, P), r.current.on(ee.Events.ERROR, R);
1679
+ } catch (v) {
1680
+ throw new Error(`Error initializing Hls: ${v}`);
1521
1681
  }
1522
1682
  }, [
1523
- j,
1524
- _,
1525
- N,
1683
+ S,
1684
+ w,
1685
+ P,
1686
+ R,
1526
1687
  t,
1527
- l,
1688
+ d,
1528
1689
  e
1529
- ]), I = z(() => {
1530
- o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, j), o.current.off(re.Events.ERROR, N), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
1531
- }, [j, _, N]);
1532
- return D(() => {
1533
- a !== null && k(a);
1534
- }, [a, k]), D(() => (re.isSupported() && R(), I), [I, R]), null;
1535
- }
1536
- const Mr = "_playerVideo_wc0sm_1", Fr = {
1537
- playerVideo: Mr
1690
+ ]), V = O(() => {
1691
+ r.current && (r.current.off(ee.Events.MEDIA_ATTACHED, w), r.current.off(ee.Events.MANIFEST_LOADED, S), r.current.off(ee.Events.LEVEL_SWITCHED, P), r.current.off(ee.Events.ERROR, R), r.current.destroy(), r.current = null), y.current && (clearTimeout(y.current), y.current = null), T.current = 0;
1692
+ }, [
1693
+ P,
1694
+ S,
1695
+ w,
1696
+ R
1697
+ ]);
1698
+ return N(() => {
1699
+ s !== null && C(s);
1700
+ }, [s, C]), N(() => (ee.isSupported() && B(), V), [V, B]), null;
1701
+ }
1702
+ const Br = "_playerVideo_wc0sm_1", Wr = {
1703
+ playerVideo: Br
1538
1704
  };
1539
- function Yt({
1705
+ function tn({
1540
1706
  url: e,
1541
1707
  isLive: t,
1542
1708
  isMuted: n = !1,
1543
- messages: o
1709
+ messages: r
1544
1710
  }) {
1545
- const a = f((m) => m.handleDurationChange), c = f((m) => m.handleEnd), u = f((m) => m.handleLoadedMetadata), i = f((m) => m.handleLoadStart), l = f((m) => m.handlePause), d = f((m) => m.handlePlay), v = f((m) => m.handlePlaying), y = f((m) => m.handleSeeked), g = f((m) => m.handleSeeking), L = f((m) => m.handleTimeUpdate), k = f((m) => m.handleWaiting), _ = f((m) => m.handleVolumeChange), j = f((m) => m.handleError), N = f((m) => m.techRef), R = V(null), I = () => t ? {
1546
- onTimeUpdate: T
1711
+ const s = f((v) => v.destroy), l = f((v) => v.handleDurationChange), u = f((v) => v.handleEnd), i = f((v) => v.handleLoadedMetadata), c = f((v) => v.handleLoadStart), d = f((v) => v.handlePause), g = f((v) => v.handlePlay), T = f((v) => v.handlePlaying), y = f((v) => v.handleSeeked), x = f((v) => v.handleSeeking), L = f((v) => v.handleTimeUpdate), C = f((v) => v.handleWaiting), w = f((v) => v.handleVolumeChange), S = f((v) => v.handleError), P = f((v) => v.techRef), R = F(null), B = () => t ? {
1712
+ onTimeUpdate: V
1547
1713
  } : {
1548
- onDurationChange: a,
1714
+ onDurationChange: l,
1549
1715
  onSeeked: y,
1550
- onSeeking: g,
1551
- onTimeUpdate: T
1552
- }, T = () => {
1716
+ onSeeking: x,
1717
+ onTimeUpdate: V
1718
+ }, V = () => {
1553
1719
  (!R.current || Date.now() - R.current >= 1e3) && (L(), R.current = Date.now());
1554
- }, M = I();
1555
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1556
- /* @__PURE__ */ s.jsx(Dr, { isLive: t, url: e, messages: o }),
1557
- /* @__PURE__ */ s.jsx(
1720
+ }, m = B();
1721
+ return N(() => () => {
1722
+ s();
1723
+ }, [s]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1724
+ /* @__PURE__ */ a.jsx(Ur, { isLive: t, url: e, messages: r }),
1725
+ /* @__PURE__ */ a.jsx(
1558
1726
  "video",
1559
- P({
1560
- ref: N,
1561
- className: Fr.playerVideo,
1727
+ M({
1728
+ ref: P,
1729
+ className: Wr.playerVideo,
1562
1730
  playsInline: !0,
1563
1731
  autoPlay: !0,
1564
1732
  controls: !1,
1565
1733
  muted: n,
1566
1734
  preload: "auto",
1567
1735
  crossOrigin: "anonymous",
1568
- onEnded: c,
1569
- onError: j,
1570
- onLoadedMetadata: u,
1571
- onLoadStart: i,
1572
- onPause: l,
1573
- onPlay: d,
1574
- onPlaying: v,
1575
- onWaiting: k,
1576
- onVolumeChange: _,
1736
+ onEnded: u,
1737
+ onError: S,
1738
+ onLoadedMetadata: i,
1739
+ onLoadStart: c,
1740
+ onPause: d,
1741
+ onPlay: g,
1742
+ onPlaying: T,
1743
+ onWaiting: C,
1744
+ onVolumeChange: w,
1577
1745
  tabIndex: -1
1578
- }, M)
1746
+ }, m)
1579
1747
  )
1580
1748
  ] });
1581
1749
  }
1582
- function Nr({ url: e, messages: t }) {
1583
- const [n, o] = X(null), a = A((u) => u.delay), c = z(async () => {
1584
- o(
1585
- a ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${a}.m3u8`) : e
1750
+ function zr({ url: e, messages: t }) {
1751
+ const [n, r] = G(null), s = $((u) => u.delay), l = O(async () => {
1752
+ r(
1753
+ s ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${s}.m3u8`) : e
1586
1754
  );
1587
- }, [a, e]);
1588
- return D(() => {
1589
- const u = requestAnimationFrame(() => c());
1755
+ }, [s, e]);
1756
+ return N(() => {
1757
+ const u = requestAnimationFrame(() => l());
1590
1758
  return () => cancelAnimationFrame(u);
1591
- }, [c]), n ? /* @__PURE__ */ s.jsx(Yt, { url: n, isLive: !0, messages: t }) : null;
1759
+ }, [l]), n ? /* @__PURE__ */ a.jsx(tn, { url: n, isLive: !0, messages: t }) : null;
1592
1760
  }
1593
- function Vr({ url: e }) {
1594
- return f((n) => n.isStarted) ? /* @__PURE__ */ s.jsx(Ar, { url: e }) : null;
1761
+ function qr({ url: e }) {
1762
+ return f((n) => n.isStarted) ? /* @__PURE__ */ a.jsx(Yr, { url: e }) : null;
1595
1763
  }
1596
- function Ar({ url: e }) {
1597
- const t = A((c) => c.setViewerCount), n = V(null), o = (c) => {
1764
+ function Yr({ url: e }) {
1765
+ const t = $((l) => l.setViewerCount), n = F(null), r = (l) => {
1598
1766
  try {
1599
- return new URL(c).pathname.split("/").filter((d) => d.length > 0)[0] || null;
1767
+ return new URL(l).pathname.split("/").filter((d) => d.length > 0)[0] || null;
1600
1768
  } catch (u) {
1601
1769
  return console.error("Failed to extract URI from player URL:", u), null;
1602
1770
  }
1603
- }, a = z(async () => {
1604
- var l;
1605
- const c = o(e);
1606
- if (!c) {
1771
+ }, s = O(async () => {
1772
+ var c;
1773
+ const l = r(e);
1774
+ if (!l) {
1607
1775
  console.error("Could not extract URI from URL:", e);
1608
1776
  return;
1609
1777
  }
1610
1778
  n.current && n.current.abort(), n.current = new AbortController();
1611
- const i = `https://${e.includes("staging") ? "stg" : "prd"}-fitnessanny.spectar.tv/analytics-api/v1/token-info/uri/${c}`;
1779
+ const i = `https://${e.includes("staging") ? "stg" : "prd"}-fitnessanny.spectar.tv/analytics-api/v1/token-info/uri/${l}`;
1612
1780
  try {
1613
1781
  const d = await fetch(i, {
1614
1782
  signal: n.current.signal
1615
1783
  });
1616
1784
  if (!d.ok)
1617
1785
  throw new Error(`HTTP error! status: ${d.status}`);
1618
- const y = (l = (await d.json()).count) != null ? l : 0;
1619
- t(y);
1786
+ const T = (c = (await d.json()).count) != null ? c : 0;
1787
+ t(T);
1620
1788
  } catch (d) {
1621
1789
  if (d.name === "AbortError")
1622
1790
  return;
1623
1791
  console.error("Failed to fetch viewer count:", d), t(null);
1624
1792
  }
1625
1793
  }, [t, e]);
1626
- return D(() => (a(), () => {
1794
+ return N(() => (s(), () => {
1627
1795
  n.current && n.current.abort();
1628
- }), [a, e]), Ve(a, 15e3), null;
1796
+ }), [s, e]), Ce(s, 15e3), null;
1629
1797
  }
1630
- function Or(e, {
1798
+ function Zr(e, {
1631
1799
  defaultValue: t = !1,
1632
1800
  initializeWithValue: n = !0
1633
1801
  } = {}) {
1634
- const o = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [a, c] = X(() => n ? o(e) : t);
1802
+ const r = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [s, l] = G(() => n ? r(e) : t);
1635
1803
  function u() {
1636
- c(o(e));
1804
+ l(r(e));
1637
1805
  }
1638
- return Ot(() => {
1806
+ return Ut(() => {
1639
1807
  if (typeof window == "undefined")
1640
1808
  return;
1641
1809
  const i = window.matchMedia(e);
1642
1810
  return u(), i.addListener ? i.addListener(u) : i.addEventListener("change", u), () => {
1643
1811
  i.removeListener ? i.removeListener(u) : i.removeEventListener("change", u);
1644
1812
  };
1645
- }, [e]), a;
1646
- }
1647
- const Hr = "_playbackButton_lgsgw_1", $r = "_seekIndicator_lgsgw_23", Ur = "_seekIndicatorLeft_lgsgw_49", Br = "_seekIndicatorRight_lgsgw_53", zr = "_seekIndicatorVisible_lgsgw_57", me = {
1648
- playbackButton: Hr,
1649
- seekIndicator: $r,
1650
- seekIndicatorLeft: Ur,
1651
- seekIndicatorRight: Br,
1652
- seekIndicatorVisible: zr
1653
- }, Wr = 10;
1654
- function Xt(i) {
1655
- var l = i, {
1813
+ }, [e]), s;
1814
+ }
1815
+ const Kr = "_playbackButton_lgsgw_1", Gr = "_seekIndicator_lgsgw_23", Xr = "_seekIndicatorLeft_lgsgw_49", Jr = "_seekIndicatorRight_lgsgw_53", Qr = "_seekIndicatorVisible_lgsgw_57", me = {
1816
+ playbackButton: Kr,
1817
+ seekIndicator: Gr,
1818
+ seekIndicatorLeft: Xr,
1819
+ seekIndicatorRight: Jr,
1820
+ seekIndicatorVisible: Qr
1821
+ }, eo = 10;
1822
+ function nn(i) {
1823
+ var c = i, {
1656
1824
  className: e,
1657
1825
  onClick: t,
1658
1826
  onForwardSeek: n,
1659
- onBackwardSeek: o,
1660
- maxForwardTime: a,
1661
- maxBackwardTime: c
1662
- } = l, u = ne(l, [
1827
+ onBackwardSeek: r,
1828
+ maxForwardTime: s,
1829
+ maxBackwardTime: l
1830
+ } = c, u = re(c, [
1663
1831
  "className",
1664
1832
  "onClick",
1665
1833
  "onForwardSeek",
@@ -1667,239 +1835,239 @@ function Xt(i) {
1667
1835
  "maxForwardTime",
1668
1836
  "maxBackwardTime"
1669
1837
  ]);
1670
- return Or("(pointer: coarse)") ? /* @__PURE__ */ s.jsx(
1671
- Zr,
1672
- P({
1838
+ return Zr("(pointer: coarse)") ? /* @__PURE__ */ a.jsx(
1839
+ no,
1840
+ M({
1673
1841
  className: e,
1674
- maxForwardTime: a,
1675
- maxBackwardTime: c,
1842
+ maxForwardTime: s,
1843
+ maxBackwardTime: l,
1676
1844
  onForwardSeek: n,
1677
- onBackwardSeek: o
1845
+ onBackwardSeek: r
1678
1846
  }, u)
1679
- ) : /* @__PURE__ */ s.jsx(qr, P({ className: e, onClick: t }, u));
1680
- }
1681
- function qr(o) {
1682
- var a = o, { className: e, onClick: t } = a, n = ne(a, ["className", "onClick"]);
1683
- const c = V(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), l = f((_) => _.requestFullscreen), d = f((_) => _.resetIdle), v = (_) => {
1684
- L() ? (g(), i ? u() : l()) : y(_);
1685
- }, y = (_) => {
1686
- c.current = window.setTimeout(() => {
1687
- t == null || t(_), g();
1847
+ ) : /* @__PURE__ */ a.jsx(to, M({ className: e, onClick: t }, u));
1848
+ }
1849
+ function to(r) {
1850
+ var s = r, { className: e, onClick: t } = s, n = re(s, ["className", "onClick"]);
1851
+ const l = F(null), u = f((C) => C.exitFullscreen), i = f((C) => C.isFullscreen), c = f((C) => C.requestFullscreen), d = f((C) => C.resetIdle), g = (C) => {
1852
+ x() ? (y(), i ? u() : c()) : T(C);
1853
+ }, T = (C) => {
1854
+ l.current = window.setTimeout(() => {
1855
+ t == null || t(C), y();
1688
1856
  }, 200);
1689
- }, g = () => {
1690
- c.current !== null && (window.clearTimeout(c.current), c.current = null);
1691
- }, L = () => c.current !== null, k = () => {
1857
+ }, y = () => {
1858
+ l.current !== null && (window.clearTimeout(l.current), l.current = null);
1859
+ }, x = () => l.current !== null, L = () => {
1692
1860
  d();
1693
1861
  };
1694
- return D(() => () => {
1695
- g();
1696
- }, []), /* @__PURE__ */ s.jsx(
1862
+ return N(() => () => {
1863
+ y();
1864
+ }, []), /* @__PURE__ */ a.jsx(
1697
1865
  "button",
1698
- P({
1699
- onClick: v,
1700
- onMouseMove: k,
1866
+ M({
1867
+ onClick: g,
1868
+ onMouseMove: L,
1701
1869
  className: [me.playbackButton, e].filter(Boolean).join(" "),
1702
1870
  "aria-label": "Player gestures"
1703
1871
  }, n)
1704
1872
  );
1705
1873
  }
1706
- function Zr(u) {
1874
+ function no(u) {
1707
1875
  var i = u, {
1708
1876
  className: e,
1709
1877
  maxForwardTime: t,
1710
1878
  maxBackwardTime: n,
1711
- onForwardSeek: o,
1712
- onBackwardSeek: a
1713
- } = i, c = ne(i, [
1879
+ onForwardSeek: r,
1880
+ onBackwardSeek: s
1881
+ } = i, l = re(i, [
1714
1882
  "className",
1715
1883
  "maxForwardTime",
1716
1884
  "maxBackwardTime",
1717
1885
  "onForwardSeek",
1718
1886
  "onBackwardSeek"
1719
1887
  ]);
1720
- const l = V(null), d = V({
1888
+ const c = F(null), d = F({
1721
1889
  single: null,
1722
1890
  indicator: null,
1723
1891
  accumulate: null
1724
- }), v = V(null), y = V(0), g = V(null), [L, k] = X({ visible: !1, direction: null, time: 0 }), _ = f((m) => m.isIdle), j = f((m) => m.setIsIdle), N = f((m) => m.resetIdle), R = (m, O) => m < O / 2 ? "backward" : "forward", I = (m) => {
1725
- if (!v.current) return;
1726
- const O = m.changedTouches[0];
1727
- if (!O) return;
1728
- const G = Date.now(), Z = v.current.getBoundingClientRect(), H = O.clientX - Z.left, b = O.clientY - Z.top;
1729
- if (H < 0 || H > Z.width || b < 0 || b > Z.height)
1892
+ }), g = F(null), T = F(0), y = F(null), [x, L] = G({ visible: !1, direction: null, time: 0 }), C = f((m) => m.isIdle), w = f((m) => m.setIsIdle), S = f((m) => m.resetIdle), P = (m, v) => m < v / 2 ? "backward" : "forward", R = (m) => {
1893
+ if (!g.current) return;
1894
+ const v = m.changedTouches[0];
1895
+ if (!v) return;
1896
+ const U = Date.now(), I = g.current.getBoundingClientRect(), A = v.clientX - I.left, k = v.clientY - I.top;
1897
+ if (A < 0 || A > I.width || k < 0 || k > I.height)
1730
1898
  return;
1731
- const Q = l.current, K = Q ? G - Q.time : 1 / 0, W = R(H, Z.width), oe = g.current !== null && g.current === W && Q !== null && K < 700 && Math.abs(H - Q.x) < 100;
1732
- if (Q !== null && g.current === null && K < 300 && Math.abs(H - Q.x) < 50 || oe) {
1733
- m.preventDefault(), m.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), N(), (g.current === null || g.current !== W) && (y.current = 0, g.current = W);
1734
- const te = W === "backward" ? n : t;
1735
- y.current = Math.min(
1736
- y.current + Wr,
1737
- te != null ? te : 1 / 0
1738
- ), T(W, y.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
1739
- const q = y.current;
1740
- q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), N()), y.current = 0, g.current = null, l.current = null, M(), d.current.accumulate = null;
1741
- }, 500), l.current = { time: G, x: H };
1899
+ const J = c.current, Y = J ? U - J.time : 1 / 0, Z = P(A, I.width), oe = y.current !== null && y.current === Z && J !== null && Y < 700 && Math.abs(A - J.x) < 100;
1900
+ if (J !== null && y.current === null && Y < 300 && Math.abs(A - J.x) < 50 || oe) {
1901
+ m.preventDefault(), m.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), S(), (y.current === null || y.current !== Z) && (T.current = 0, y.current = Z);
1902
+ const ne = Z === "backward" ? n : t;
1903
+ T.current = Math.min(
1904
+ T.current + eo,
1905
+ ne != null ? ne : 1 / 0
1906
+ ), B(Z, T.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
1907
+ const K = T.current;
1908
+ K > 0 && (y.current === "backward" ? s == null || s(K) : r == null || r(K), S()), T.current = 0, y.current = null, c.current = null, V(), d.current.accumulate = null;
1909
+ }, 500), c.current = { time: U, x: A };
1742
1910
  } else {
1743
- l.current = { time: G, x: H }, d.current.single && window.clearTimeout(d.current.single);
1744
- const te = g.current !== null ? 700 : 350;
1911
+ c.current = { time: U, x: A }, d.current.single && window.clearTimeout(d.current.single);
1912
+ const ne = y.current !== null ? 700 : 350;
1745
1913
  d.current.single = window.setTimeout(() => {
1746
- if (g.current === null) {
1914
+ if (y.current === null) {
1747
1915
  d.current.single = null;
1748
- const q = _;
1749
- j(!q), q && N();
1916
+ const K = C;
1917
+ w(!K), K && S();
1750
1918
  }
1751
- l.current = null;
1752
- }, te);
1919
+ c.current = null;
1920
+ }, ne);
1753
1921
  }
1754
- }, T = (m, O) => {
1755
- O !== 0 && (k({ visible: !0, direction: m, time: O }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
1756
- M();
1922
+ }, B = (m, v) => {
1923
+ v !== 0 && (L({ visible: !0, direction: m, time: v }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
1924
+ V();
1757
1925
  }, 700));
1758
- }, M = () => {
1759
- k({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
1926
+ }, V = () => {
1927
+ L({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
1760
1928
  };
1761
- return D(() => {
1929
+ return N(() => {
1762
1930
  const m = d.current;
1763
1931
  return () => {
1764
1932
  m != null && m.single && window.clearTimeout(m.single), m != null && m.indicator && window.clearTimeout(m.indicator), m != null && m.accumulate && window.clearTimeout(m.accumulate);
1765
1933
  };
1766
- }, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1767
- /* @__PURE__ */ s.jsx(
1934
+ }, []), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1935
+ /* @__PURE__ */ a.jsx(
1768
1936
  "button",
1769
- P({
1770
- ref: v,
1771
- onTouchEnd: I,
1937
+ M({
1938
+ ref: g,
1939
+ onTouchEnd: R,
1772
1940
  className: [me.playbackButton, e].filter(Boolean).join(" "),
1773
1941
  "aria-label": "Player gestures"
1774
- }, c)
1942
+ }, l)
1775
1943
  ),
1776
- L.visible && /* @__PURE__ */ s.jsxs(
1944
+ x.visible && /* @__PURE__ */ a.jsxs(
1777
1945
  "div",
1778
1946
  {
1779
- className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${L.direction === "backward" ? me.seekIndicatorLeft : me.seekIndicatorRight}`,
1947
+ className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${x.direction === "backward" ? me.seekIndicatorLeft : me.seekIndicatorRight}`,
1780
1948
  children: [
1781
- L.direction === "backward" ? "-" : "+",
1782
- _e(L.time)
1949
+ x.direction === "backward" ? "-" : "+",
1950
+ Te(x.time)
1783
1951
  ]
1784
1952
  }
1785
1953
  )
1786
1954
  ] });
1787
1955
  }
1788
- function Kr() {
1789
- const e = f((l) => l.isPlaying), t = f((l) => l.pause), n = f((l) => l.getPauseTimeDiff), o = f((l) => l.play), a = A((l) => l.delay), c = A((l) => l.setDelay), u = A((l) => l.startDate), i = u ? u.getTime() : 0;
1790
- return /* @__PURE__ */ s.jsx(
1791
- Xt,
1956
+ function ro() {
1957
+ const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), r = f((c) => c.play), s = $((c) => c.delay), l = $((c) => c.setDelay), u = $((c) => c.startDate), i = u ? u.getTime() : 0;
1958
+ return /* @__PURE__ */ a.jsx(
1959
+ nn,
1792
1960
  {
1793
1961
  onClick: () => {
1794
1962
  if (e)
1795
1963
  t();
1796
1964
  else {
1797
- const l = n();
1798
- l && c(a + l), o();
1965
+ const c = n();
1966
+ c && l(s + c), r();
1799
1967
  }
1800
1968
  },
1801
- onBackwardSeek: (l) => {
1802
- const d = a + l;
1803
- c(d);
1969
+ onBackwardSeek: (c) => {
1970
+ const d = s + c;
1971
+ l(d);
1804
1972
  },
1805
- onForwardSeek: (l) => {
1806
- const d = Math.max(0, a - l);
1807
- c(d);
1973
+ onForwardSeek: (c) => {
1974
+ const d = Math.max(0, s - c);
1975
+ l(d);
1808
1976
  },
1809
1977
  maxBackwardTime: Math.floor(i),
1810
- maxForwardTime: Math.floor(a)
1978
+ maxForwardTime: Math.floor(s)
1811
1979
  }
1812
1980
  );
1813
1981
  }
1814
- const Yr = "_playerButton_izwqq_1", Xr = "_playerButtonCircle_izwqq_42", _t = {
1815
- playerButton: Yr,
1816
- playerButtonCircle: Xr
1817
- }, le = Ne(
1818
- (a, o) => {
1819
- var c = a, { shape: e = "circle", className: t } = c, n = ne(c, ["shape", "className"]);
1820
- const u = e === "circle" ? _t.playerButtonCircle : "", i = [_t.playerButton, u, t].filter(Boolean).join(" ");
1821
- return /* @__PURE__ */ s.jsx("button", P({ ref: o, className: i }, n));
1982
+ const oo = "_playerButton_izwqq_1", io = "_playerButtonCircle_izwqq_42", Et = {
1983
+ playerButton: oo,
1984
+ playerButtonCircle: io
1985
+ }, le = Ve(
1986
+ (s, r) => {
1987
+ var l = s, { shape: e = "circle", className: t } = l, n = re(l, ["shape", "className"]);
1988
+ const u = e === "circle" ? Et.playerButtonCircle : "", i = [Et.playerButton, u, t].filter(Boolean).join(" ");
1989
+ return /* @__PURE__ */ a.jsx("button", M({ ref: r, className: i }, n));
1822
1990
  }
1823
1991
  );
1824
1992
  le.displayName = "PlayerButton";
1825
- const Gr = "_liveIndicator_1jczn_1", Jr = "_liveIndicatorHasDelay_1jczn_9", Qr = "_liveIndicatorNoDelay_1jczn_13", Ie = {
1826
- liveIndicator: Gr,
1827
- liveIndicatorHasDelay: Jr,
1828
- liveIndicatorNoDelay: Qr
1993
+ const so = "_liveIndicator_1jczn_1", ao = "_liveIndicatorHasDelay_1jczn_9", lo = "_liveIndicatorNoDelay_1jczn_13", ke = {
1994
+ liveIndicator: so,
1995
+ liveIndicatorHasDelay: ao,
1996
+ liveIndicatorNoDelay: lo
1829
1997
  };
1830
- function eo(n) {
1831
- var o = n, { message: e } = o, t = ne(o, ["message"]);
1832
- const a = A((l) => l.delay), c = A((l) => l.setDelay), u = () => {
1833
- a && c(0);
1834
- }, i = a ? `${Ie.liveIndicator} ${Ie.liveIndicatorHasDelay}` : `${Ie.liveIndicator} ${Ie.liveIndicatorNoDelay}`;
1835
- return /* @__PURE__ */ s.jsxs(le, he(P({ onClick: u, shape: "square" }, t), { children: [
1836
- /* @__PURE__ */ s.jsx("div", { className: i }),
1998
+ function co(n) {
1999
+ var r = n, { message: e } = r, t = re(r, ["message"]);
2000
+ const s = f((d) => d.restart), l = $((d) => d.delay), u = $((d) => d.setDelay), i = () => {
2001
+ l && (s(), u(0));
2002
+ }, c = l ? `${ke.liveIndicator} ${ke.liveIndicatorHasDelay}` : `${ke.liveIndicator} ${ke.liveIndicatorNoDelay}`;
2003
+ return /* @__PURE__ */ a.jsxs(le, he(M({ onClick: i, shape: "square" }, t), { children: [
2004
+ /* @__PURE__ */ a.jsx("div", { className: c }),
1837
2005
  e || "Live"
1838
2006
  ] }));
1839
2007
  }
1840
- function Gt() {
1841
- return /* @__PURE__ */ s.jsx(
2008
+ function rn() {
2009
+ return /* @__PURE__ */ a.jsx(
1842
2010
  "svg",
1843
2011
  {
1844
2012
  xmlns: "http://www.w3.org/2000/svg",
1845
2013
  viewBox: "0 0 24 24",
1846
2014
  fill: "currentColor",
1847
- children: /* @__PURE__ */ s.jsx("path", { d: "M6 5H8V19H6V5ZM16 5H18V19H16V5Z" })
2015
+ children: /* @__PURE__ */ a.jsx("path", { d: "M6 5H8V19H6V5ZM16 5H18V19H16V5Z" })
1848
2016
  }
1849
2017
  );
1850
2018
  }
1851
- function Jt() {
1852
- return /* @__PURE__ */ s.jsx(
2019
+ function on() {
2020
+ return /* @__PURE__ */ a.jsx(
1853
2021
  "svg",
1854
2022
  {
1855
2023
  xmlns: "http://www.w3.org/2000/svg",
1856
2024
  viewBox: "0 0 24 24",
1857
2025
  fill: "currentColor",
1858
- children: /* @__PURE__ */ s.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" })
2026
+ children: /* @__PURE__ */ a.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" })
1859
2027
  }
1860
2028
  );
1861
2029
  }
1862
- function to() {
1863
- const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), a = A((i) => i.delay), c = A((i) => i.setDelay), u = () => {
2030
+ function uo() {
2031
+ const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), r = f((i) => i.play), s = $((i) => i.delay), l = $((i) => i.setDelay), u = () => {
1864
2032
  if (e)
1865
2033
  t();
1866
2034
  else {
1867
2035
  const i = n();
1868
- i && c(a + i), o();
2036
+ i && l(s + i), r();
1869
2037
  }
1870
2038
  };
1871
- return /* @__PURE__ */ s.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
1872
- }
1873
- const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipContainerVisible_hwzgf_17", io = "_tipContainerHidden_hwzgf_22", so = "_tipContent_hwzgf_27", se = {
1874
- progressSlider: no,
1875
- tipContainer: ro,
1876
- tipContainerVisible: oo,
1877
- tipContainerHidden: io,
1878
- tipContent: so
1879
- }, ao = "_sliderRoot_aeak6_1", lo = "_sliderTrack_aeak6_18", co = "_sliderRange_aeak6_28", uo = "_sliderThumb_aeak6_37", ke = {
1880
- sliderRoot: ao,
1881
- sliderTrack: lo,
1882
- sliderRange: co,
1883
- sliderThumb: uo
1884
- }, Ae = Ne((c, a) => {
1885
- var u = c, { max: e = 100, min: t = 0, className: n } = u, o = ne(u, ["max", "min", "className"]);
1886
- return /* @__PURE__ */ s.jsxs(
1887
- je.Root,
1888
- he(P({
1889
- ref: a,
2039
+ return /* @__PURE__ */ a.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ a.jsx(rn, {}) : /* @__PURE__ */ a.jsx(on, {}) });
2040
+ }
2041
+ const fo = "_progressSlider_hwzgf_1", ho = "_tipContainer_hwzgf_7", mo = "_tipContainerVisible_hwzgf_17", vo = "_tipContainerHidden_hwzgf_22", po = "_tipContent_hwzgf_27", se = {
2042
+ progressSlider: fo,
2043
+ tipContainer: ho,
2044
+ tipContainerVisible: mo,
2045
+ tipContainerHidden: vo,
2046
+ tipContent: po
2047
+ }, yo = "_sliderRoot_aeak6_1", go = "_sliderTrack_aeak6_18", wo = "_sliderRange_aeak6_28", _o = "_sliderThumb_aeak6_37", De = {
2048
+ sliderRoot: yo,
2049
+ sliderTrack: go,
2050
+ sliderRange: wo,
2051
+ sliderThumb: _o
2052
+ }, Ae = Ve((l, s) => {
2053
+ var u = l, { max: e = 100, min: t = 0, className: n } = u, r = re(u, ["max", "min", "className"]);
2054
+ return /* @__PURE__ */ a.jsxs(
2055
+ Le.Root,
2056
+ he(M({
2057
+ ref: s,
1890
2058
  min: t,
1891
2059
  max: e,
1892
2060
  "aria-label": "Player progress",
1893
- className: [ke.sliderRoot, n].filter(Boolean).join(" "),
2061
+ className: [De.sliderRoot, n].filter(Boolean).join(" "),
1894
2062
  onKeyDown: (i) => (
1895
2063
  // Prevent the slider from being controlled by the keyboard
1896
2064
  // when the slider is focused by a click
1897
2065
  i.preventDefault()
1898
2066
  )
1899
- }, o), {
2067
+ }, r), {
1900
2068
  children: [
1901
- /* @__PURE__ */ s.jsx(je.Track, { className: ke.sliderTrack, children: /* @__PURE__ */ s.jsx(je.Range, { className: ke.sliderRange }) }),
1902
- /* @__PURE__ */ s.jsx(je.Thumb, { className: ke.sliderThumb })
2069
+ /* @__PURE__ */ a.jsx(Le.Track, { className: De.sliderTrack, children: /* @__PURE__ */ a.jsx(Le.Range, { className: De.sliderRange }) }),
2070
+ /* @__PURE__ */ a.jsx(Le.Thumb, { className: De.sliderThumb })
1903
2071
  ]
1904
2072
  })
1905
2073
  );
@@ -1916,104 +2084,104 @@ function Fe(e) {
1916
2084
  height: t.height * 100
1917
2085
  } : t;
1918
2086
  }
1919
- const xt = "vod-player-progress-bar";
1920
- function fo() {
1921
- const e = V(null), t = V(null), [n, o] = X(0), [a, c] = X(0), [u, i] = X(!1), [l, d] = X(-1), [v, y] = X(-1), g = A((b) => b.delay), L = A((b) => b.startDate), k = L ? L.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(), j = A((b) => b.setDelay), N = f((b) => b.isPlaying), R = f((b) => b.addIdleLock), I = f((b) => b.removeIdleLock), T = z(() => {
1922
- o(qt(k, g)), c(Sr(k, _));
1923
- }, [g, _, k]), M = parseFloat(
1924
- (a ? (v !== -1 ? v : n) / a * 100 : 0).toFixed(1)
1925
- ), m = (b) => {
1926
- y(a * (b[0] / 100)), R(xt);
1927
- }, O = () => {
1928
- if (v !== -1) {
1929
- const b = Wt(k, v);
1930
- j(b), y(-1), I(xt);
1931
- }
1932
- }, G = () => i(!0), Z = () => i(!1), H = z(
1933
- (b) => {
1934
- const Q = e.current, K = t.current;
1935
- if (Q && K) {
1936
- const W = Fe(Q), oe = Fe(K), ue = (b.pageX || b.clientX) - W.left, te = ue / W.width;
1937
- if (te < 0) return;
1938
- let q = ue - oe.width / 2;
1939
- q < 0 && (q = 0), q > W.width - oe.width && (q = -1), K.style.left = q > -1 ? `${q}px` : "auto", K.style.right = q > -1 ? "auto" : "0px";
1940
- const ve = a - te * a;
1941
- d(ve > 0 ? ve : 0);
2087
+ const St = "vod-player-progress-bar";
2088
+ function To() {
2089
+ const e = F(null), t = F(null), [n, r] = G(0), [s, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [g, T] = G(-1), y = $((k) => k.delay), x = $((k) => k.startDate), L = x ? x.getTime() : 0, C = (/* @__PURE__ */ new Date()).getTime(), w = $((k) => k.setDelay), S = f((k) => k.isPlaying), P = f((k) => k.addIdleLock), R = f((k) => k.removeIdleLock), B = O(() => {
2090
+ r(Jt(L, y)), l(Fr(L, C));
2091
+ }, [y, C, L]), V = parseFloat(
2092
+ (s ? (g !== -1 ? g : n) / s * 100 : 0).toFixed(1)
2093
+ ), m = (k) => {
2094
+ T(s * (k[0] / 100)), P(St);
2095
+ }, v = () => {
2096
+ if (g !== -1) {
2097
+ const k = Xt(L, g);
2098
+ w(k), T(-1), R(St);
2099
+ }
2100
+ }, U = () => i(!0), I = () => i(!1), A = O(
2101
+ (k) => {
2102
+ const J = e.current, Y = t.current;
2103
+ if (J && Y) {
2104
+ const Z = Fe(J), oe = Fe(Y), ue = (k.pageX || k.clientX) - Z.left, ne = ue / Z.width;
2105
+ if (ne < 0) return;
2106
+ let K = ue - oe.width / 2;
2107
+ K < 0 && (K = 0), K > Z.width - oe.width && (K = -1), Y.style.left = K > -1 ? `${K}px` : "auto", Y.style.right = K > -1 ? "auto" : "0px";
2108
+ const pe = s - ne * s;
2109
+ d(pe > 0 ? pe : 0);
1942
2110
  }
1943
- G();
2111
+ U();
1944
2112
  },
1945
- [a]
2113
+ [s]
1946
2114
  );
1947
- return Ve(() => T(), N ? 1e3 : null), D(() => {
1948
- const b = requestAnimationFrame(() => T());
1949
- return () => cancelAnimationFrame(b);
1950
- }, [T]), /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
1951
- /* @__PURE__ */ s.jsx(
2115
+ return Ce(() => B(), S ? 1e3 : null), N(() => {
2116
+ const k = requestAnimationFrame(() => B());
2117
+ return () => cancelAnimationFrame(k);
2118
+ }, [B]), /* @__PURE__ */ a.jsxs("div", { className: se.progressSlider, children: [
2119
+ /* @__PURE__ */ a.jsx(
1952
2120
  Ae,
1953
2121
  {
1954
2122
  ref: e,
1955
- value: [M],
1956
- onPointerLeave: Z,
1957
- onPointerDown: Z,
1958
- onPointerMove: H,
2123
+ value: [V],
2124
+ onPointerLeave: I,
2125
+ onPointerDown: I,
2126
+ onPointerMove: A,
1959
2127
  onValueChange: m,
1960
- onValueCommit: O,
2128
+ onValueCommit: v,
1961
2129
  step: 0.1
1962
2130
  }
1963
2131
  ),
1964
- /* @__PURE__ */ s.jsx(
2132
+ /* @__PURE__ */ a.jsx(
1965
2133
  "div",
1966
2134
  {
1967
2135
  ref: t,
1968
2136
  className: `${se.tipContainer} ${u ? se.tipContainerVisible : se.tipContainerHidden}`,
1969
- children: /* @__PURE__ */ s.jsx("p", { className: se.tipContent, children: `-${_e(l)}` })
2137
+ children: /* @__PURE__ */ a.jsx("p", { className: se.tipContent, children: `-${Te(c)}` })
1970
2138
  }
1971
2139
  )
1972
2140
  ] });
1973
2141
  }
1974
- function ho() {
1975
- return /* @__PURE__ */ s.jsx(
2142
+ function xo() {
2143
+ return /* @__PURE__ */ a.jsx(
1976
2144
  "svg",
1977
2145
  {
1978
2146
  xmlns: "http://www.w3.org/2000/svg",
1979
2147
  viewBox: "0 0 24 24",
1980
2148
  fill: "currentColor",
1981
- children: /* @__PURE__ */ s.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" })
2149
+ children: /* @__PURE__ */ a.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" })
1982
2150
  }
1983
2151
  );
1984
2152
  }
1985
- function mo() {
1986
- const e = A((a) => a.startDate), t = A((a) => a.setDelay), n = e ? e.getTime() : 0, o = () => t(Wt(n));
1987
- return /* @__PURE__ */ s.jsx(le, { onClick: o, children: /* @__PURE__ */ s.jsx(ho, {}) });
2153
+ function Co() {
2154
+ const e = $((s) => s.startDate), t = $((s) => s.setDelay), n = e ? e.getTime() : 0, r = () => t(Xt(n));
2155
+ return /* @__PURE__ */ a.jsx(le, { onClick: r, children: /* @__PURE__ */ a.jsx(xo, {}) });
1988
2156
  }
1989
- const po = "_viewersContainer_z1ihz_1", vo = "_viewersIndicator_z1ihz_16", yo = "_viewersIcon_z1ihz_24", go = "_viewersCount_z1ihz_28", De = {
1990
- viewersContainer: po,
1991
- viewersIndicator: vo,
1992
- viewersIcon: yo,
1993
- viewersCount: go
2157
+ const Eo = "_viewersContainer_z1ihz_1", So = "_viewersIndicator_z1ihz_16", Ro = "_viewersIcon_z1ihz_24", bo = "_viewersCount_z1ihz_28", Me = {
2158
+ viewersContainer: Eo,
2159
+ viewersIndicator: So,
2160
+ viewersIcon: Ro,
2161
+ viewersCount: bo
1994
2162
  };
1995
- function wo() {
1996
- const e = A((t) => t.viewerCount);
1997
- return e ? /* @__PURE__ */ s.jsxs("div", { className: De.viewersContainer, children: [
1998
- /* @__PURE__ */ s.jsx("span", { className: De.viewersIndicator }),
1999
- /* @__PURE__ */ s.jsxs(
2163
+ function Po() {
2164
+ const e = $((t) => t.viewerCount);
2165
+ return e ? /* @__PURE__ */ a.jsxs("div", { className: Me.viewersContainer, children: [
2166
+ /* @__PURE__ */ a.jsx("span", { className: Me.viewersIndicator }),
2167
+ /* @__PURE__ */ a.jsxs(
2000
2168
  "svg",
2001
2169
  {
2002
- className: De.viewersIcon,
2170
+ className: Me.viewersIcon,
2003
2171
  width: "16",
2004
2172
  height: "16",
2005
2173
  viewBox: "0 0 16 16",
2006
2174
  fill: "none",
2007
2175
  xmlns: "http://www.w3.org/2000/svg",
2008
2176
  children: [
2009
- /* @__PURE__ */ s.jsx(
2177
+ /* @__PURE__ */ a.jsx(
2010
2178
  "path",
2011
2179
  {
2012
2180
  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",
2013
2181
  fill: "currentColor"
2014
2182
  }
2015
2183
  ),
2016
- /* @__PURE__ */ s.jsx(
2184
+ /* @__PURE__ */ a.jsx(
2017
2185
  "path",
2018
2186
  {
2019
2187
  d: "M8 8C5.79086 8 4 9.79086 4 12V13H12V12C12 9.79086 10.2091 8 8 8Z",
@@ -2023,175 +2191,175 @@ function wo() {
2023
2191
  ]
2024
2192
  }
2025
2193
  ),
2026
- /* @__PURE__ */ s.jsx("span", { className: De.viewersCount, children: e.toLocaleString() })
2194
+ /* @__PURE__ */ a.jsx("span", { className: Me.viewersCount, children: e.toLocaleString() })
2027
2195
  ] }) : null;
2028
2196
  }
2029
- function Qt() {
2197
+ function sn() {
2030
2198
  const e = f((n) => n.error);
2031
2199
  if (!e) return null;
2032
2200
  const t = e.code === "LIVE_MANIFEST_LOAD_ERROR";
2033
- return /* @__PURE__ */ s.jsx(
2201
+ return /* @__PURE__ */ a.jsx(
2034
2202
  "div",
2035
2203
  {
2036
2204
  className: `${ie.playerNotice} ${t ? ie.playerNoticeLowZIndex : ""}`,
2037
- children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: e.message })
2205
+ children: /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: e.message })
2038
2206
  }
2039
2207
  );
2040
2208
  }
2041
- const To = "_playerContainer_146tx_1", _o = "_controlsTop_146tx_12", xo = "_controlsBottom_146tx_29", Co = "_controlsContainer_146tx_45", Eo = "_controlsRow_146tx_61", Ro = "_controlsSection_146tx_68", bo = "_controlsSectionStart_146tx_78", So = "_controlsSectionEnd_146tx_82", B = {
2042
- playerContainer: To,
2043
- controlsTop: _o,
2044
- controlsBottom: xo,
2045
- controlsContainer: Co,
2046
- controlsRow: Eo,
2047
- controlsSection: Ro,
2048
- controlsSectionStart: bo,
2049
- controlsSectionEnd: So
2209
+ const Lo = "_playerContainer_146tx_1", jo = "_controlsTop_146tx_12", Io = "_controlsBottom_146tx_29", ko = "_controlsContainer_146tx_45", Do = "_controlsRow_146tx_61", Mo = "_controlsSection_146tx_68", No = "_controlsSectionStart_146tx_78", Fo = "_controlsSectionEnd_146tx_82", q = {
2210
+ playerContainer: Lo,
2211
+ controlsTop: jo,
2212
+ controlsBottom: Io,
2213
+ controlsContainer: ko,
2214
+ controlsRow: Do,
2215
+ controlsSection: Mo,
2216
+ controlsSectionStart: No,
2217
+ controlsSectionEnd: Fo
2050
2218
  };
2051
- function jo() {
2052
- return /* @__PURE__ */ s.jsx(
2219
+ function Vo() {
2220
+ return /* @__PURE__ */ a.jsx(
2053
2221
  "svg",
2054
2222
  {
2055
2223
  xmlns: "http://www.w3.org/2000/svg",
2056
2224
  viewBox: "0 0 24 24",
2057
2225
  fill: "currentColor",
2058
- children: /* @__PURE__ */ s.jsx("path", { d: "M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z" })
2226
+ children: /* @__PURE__ */ a.jsx("path", { d: "M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z" })
2059
2227
  }
2060
2228
  );
2061
2229
  }
2062
- function Po() {
2063
- return /* @__PURE__ */ s.jsx(
2230
+ function Ao() {
2231
+ return /* @__PURE__ */ a.jsx(
2064
2232
  "svg",
2065
2233
  {
2066
2234
  xmlns: "http://www.w3.org/2000/svg",
2067
2235
  viewBox: "0 0 24 24",
2068
2236
  fill: "currentColor",
2069
- children: /* @__PURE__ */ s.jsx("path", { d: "M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z" })
2237
+ children: /* @__PURE__ */ a.jsx("path", { d: "M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z" })
2070
2238
  }
2071
2239
  );
2072
2240
  }
2073
- function en() {
2074
- const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), o = f((d) => d.requestFullscreen), a = f((d) => d.setIsFullscreen), c = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = z(
2241
+ function an() {
2242
+ const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), r = f((d) => d.requestFullscreen), s = f((d) => d.setIsFullscreen), l = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = O(
2075
2243
  (d) => {
2076
- d.stopPropagation(), a(ir());
2244
+ d.stopPropagation(), s(ir());
2077
2245
  },
2078
- [a]
2079
- ), l = () => {
2080
- n ? t() : o();
2246
+ [s]
2247
+ ), c = () => {
2248
+ n ? t() : r();
2081
2249
  };
2082
- return D(() => {
2083
- const d = Ut ? u.current : e.current;
2250
+ return N(() => {
2251
+ const d = zt ? u.current : e.current;
2084
2252
  if (d)
2085
2253
  return lr(d, i);
2086
- }, [e, i, u]), D(() => {
2087
- c(!0);
2088
- }, [c]), /* @__PURE__ */ s.jsx(le, { onClick: l, children: n ? /* @__PURE__ */ s.jsx(Po, {}) : /* @__PURE__ */ s.jsx(jo, {}) });
2089
- }
2090
- const Lo = "_idleCheckContainer_crh2s_1", Io = "_idleCheckContainerIdle_crh2s_5", ko = "_idleCheckContainerActive_crh2s_11", Ze = {
2091
- idleCheckContainer: Lo,
2092
- idleCheckContainerIdle: Io,
2093
- idleCheckContainerActive: ko
2094
- }, Do = 5 * 1e3;
2095
- function tn({ children: e }) {
2096
- const t = V(null), n = f((g) => g.isIdle), o = f((g) => g.setIsIdle), a = V(null), u = f((g) => g.idleLocks).size, i = f((g) => g.eventEmitter), l = z(() => {
2097
- a.current !== null && (window.clearTimeout(a.current), a.current = null);
2098
- }, []), d = z(() => {
2099
- l(), a.current = window.setTimeout(() => o(!0), Do);
2100
- }, [l, o]);
2101
- D(() => (o(!1), d(), () => {
2102
- l();
2103
- }), [l, o, d]), D(() => {
2104
- const g = () => {
2105
- o(!1), d();
2254
+ }, [e, i, u]), N(() => {
2255
+ l(!0);
2256
+ }, [l]), /* @__PURE__ */ a.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ a.jsx(Ao, {}) : /* @__PURE__ */ a.jsx(Vo, {}) });
2257
+ }
2258
+ const Oo = "_idleCheckContainer_crh2s_1", Ho = "_idleCheckContainerIdle_crh2s_5", $o = "_idleCheckContainerActive_crh2s_11", Ke = {
2259
+ idleCheckContainer: Oo,
2260
+ idleCheckContainerIdle: Ho,
2261
+ idleCheckContainerActive: $o
2262
+ }, Uo = 5 * 1e3;
2263
+ function ln({ children: e }) {
2264
+ const t = F(null), n = f((y) => y.isIdle), r = f((y) => y.setIsIdle), s = F(null), u = f((y) => y.idleLocks).size, i = f((y) => y.eventEmitter), c = O(() => {
2265
+ s.current !== null && (window.clearTimeout(s.current), s.current = null);
2266
+ }, []), d = O(() => {
2267
+ c(), s.current = window.setTimeout(() => r(!0), Uo);
2268
+ }, [c, r]);
2269
+ N(() => (r(!1), d(), () => {
2270
+ c();
2271
+ }), [c, r, d]), N(() => {
2272
+ const y = () => {
2273
+ r(!1), d();
2106
2274
  };
2107
- return i.on("resetIdle", g), () => {
2108
- i.off("resetIdle", g);
2275
+ return i.on("resetIdle", y), () => {
2276
+ i.off("resetIdle", y);
2109
2277
  };
2110
- }, [i, o, d]);
2111
- const v = n && !u, y = `${Ze.idleCheckContainer} ${v ? Ze.idleCheckContainerIdle : Ze.idleCheckContainerActive}`;
2112
- return /* @__PURE__ */ s.jsx("div", { ref: t, className: y, children: e });
2278
+ }, [i, r, d]);
2279
+ const g = n && !u, T = `${Ke.idleCheckContainer} ${g ? Ke.idleCheckContainerIdle : Ke.idleCheckContainerActive}`;
2280
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: T, children: e });
2113
2281
  }
2114
- const Mo = "_spinner_oo4hi_10", Fo = {
2115
- spinner: Mo
2282
+ const Bo = "_spinner_oo4hi_10", Wo = {
2283
+ spinner: Bo
2116
2284
  };
2117
- function No(e) {
2118
- return /* @__PURE__ */ s.jsx("div", P({ className: Fo.spinner }, e));
2285
+ function zo(e) {
2286
+ return /* @__PURE__ */ a.jsx("div", M({ className: Wo.spinner }, e));
2119
2287
  }
2120
- function Vo(e, t = 500) {
2121
- const [n, o] = X(e);
2122
- return D(() => {
2123
- const a = window.setTimeout(() => o(e), t);
2288
+ function qo(e, t = 500) {
2289
+ const [n, r] = G(e);
2290
+ return N(() => {
2291
+ const s = window.setTimeout(() => r(e), t);
2124
2292
  return () => {
2125
- window.clearTimeout(a);
2293
+ window.clearTimeout(s);
2126
2294
  };
2127
2295
  }, [e, t]), n;
2128
2296
  }
2129
- const Ao = "_loadingContainer_v9v7r_1", Oo = {
2130
- loadingContainer: Ao
2297
+ const Yo = "_loadingContainer_v9v7r_1", Zo = {
2298
+ loadingContainer: Yo
2131
2299
  };
2132
- function nn(n) {
2133
- var o = n, { style: e } = o, t = ne(o, ["style"]);
2134
- const a = f((u) => u.isLoading);
2135
- return Vo(a, 100) ? /* @__PURE__ */ s.jsx("div", he(P({ className: Oo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ s.jsx(No, {}) })) : null;
2300
+ function cn(n) {
2301
+ var r = n, { style: e } = r, t = re(r, ["style"]);
2302
+ const s = f((u) => u.isLoading);
2303
+ return qo(s, 100) ? /* @__PURE__ */ a.jsx("div", he(M({ className: Zo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ a.jsx(zo, {}) })) : null;
2136
2304
  }
2137
- function Ho() {
2138
- return /* @__PURE__ */ s.jsx(
2305
+ function Ko() {
2306
+ return /* @__PURE__ */ a.jsx(
2139
2307
  "svg",
2140
2308
  {
2141
2309
  xmlns: "http://www.w3.org/2000/svg",
2142
2310
  viewBox: "0 0 24 24",
2143
2311
  fill: "currentColor",
2144
- children: /* @__PURE__ */ s.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" })
2312
+ children: /* @__PURE__ */ a.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" })
2145
2313
  }
2146
2314
  );
2147
2315
  }
2148
- function $o() {
2149
- return /* @__PURE__ */ s.jsx(
2316
+ function Go() {
2317
+ return /* @__PURE__ */ a.jsx(
2150
2318
  "svg",
2151
2319
  {
2152
2320
  xmlns: "http://www.w3.org/2000/svg",
2153
2321
  viewBox: "0 0 24 24",
2154
2322
  fill: "currentColor",
2155
- children: /* @__PURE__ */ s.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" })
2323
+ children: /* @__PURE__ */ a.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" })
2156
2324
  }
2157
2325
  );
2158
2326
  }
2159
- const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo = "_scrollAreaRoot_b7j6b_125", Wo = "_scrollAreaViewport_b7j6b_133", qo = "_scrollAreaScrollbar_b7j6b_141", Zo = "_scrollAreaThumb_b7j6b_168", pe = {
2160
- dropdownMenuContent: Uo,
2161
- dropdownMenuItem: Bo,
2162
- scrollAreaRoot: zo,
2163
- scrollAreaViewport: Wo,
2164
- scrollAreaScrollbar: qo,
2165
- scrollAreaThumb: Zo
2166
- }, Ko = xe.Root, Yo = xe.Trigger, Xo = xe.Portal, rn = Ne((c, a) => {
2167
- var u = c, { sideOffset: e = 4, className: t, children: n } = u, o = ne(u, ["sideOffset", "className", "children"]);
2168
- return /* @__PURE__ */ s.jsx(
2327
+ const Xo = "_dropdownMenuContent_b7j6b_1", Jo = "_dropdownMenuItem_b7j6b_83", Qo = "_scrollAreaRoot_b7j6b_125", ei = "_scrollAreaViewport_b7j6b_133", ti = "_scrollAreaScrollbar_b7j6b_141", ni = "_scrollAreaThumb_b7j6b_168", ve = {
2328
+ dropdownMenuContent: Xo,
2329
+ dropdownMenuItem: Jo,
2330
+ scrollAreaRoot: Qo,
2331
+ scrollAreaViewport: ei,
2332
+ scrollAreaScrollbar: ti,
2333
+ scrollAreaThumb: ni
2334
+ }, ri = xe.Root, oi = xe.Trigger, ii = xe.Portal, un = Ve((l, s) => {
2335
+ var u = l, { sideOffset: e = 4, className: t, children: n } = u, r = re(u, ["sideOffset", "className", "children"]);
2336
+ return /* @__PURE__ */ a.jsx(
2169
2337
  xe.Content,
2170
- he(P({
2171
- ref: a,
2338
+ he(M({
2339
+ ref: s,
2172
2340
  sideOffset: e,
2173
- className: [pe.dropdownMenuContent, t].filter(Boolean).join(" "),
2341
+ className: [ve.dropdownMenuContent, t].filter(Boolean).join(" "),
2174
2342
  onOpenAutoFocus: (i) => {
2175
2343
  i.preventDefault();
2176
2344
  },
2177
2345
  onCloseAutoFocus: (i) => {
2178
2346
  i.preventDefault();
2179
2347
  }
2180
- }, o), {
2181
- children: /* @__PURE__ */ s.jsxs(
2182
- Pe.Root,
2348
+ }, r), {
2349
+ children: /* @__PURE__ */ a.jsxs(
2350
+ je.Root,
2183
2351
  {
2184
- className: pe.scrollAreaRoot,
2352
+ className: ve.scrollAreaRoot,
2185
2353
  type: "always",
2186
2354
  scrollHideDelay: 0,
2187
2355
  children: [
2188
- /* @__PURE__ */ s.jsx(Pe.Viewport, { className: pe.scrollAreaViewport, children: n }),
2189
- /* @__PURE__ */ s.jsx(
2190
- Pe.Scrollbar,
2356
+ /* @__PURE__ */ a.jsx(je.Viewport, { className: ve.scrollAreaViewport, children: n }),
2357
+ /* @__PURE__ */ a.jsx(
2358
+ je.Scrollbar,
2191
2359
  {
2192
- className: pe.scrollAreaScrollbar,
2360
+ className: ve.scrollAreaScrollbar,
2193
2361
  orientation: "vertical",
2194
- children: /* @__PURE__ */ s.jsx(Pe.Thumb, { className: pe.scrollAreaThumb })
2362
+ children: /* @__PURE__ */ a.jsx(je.Thumb, { className: ve.scrollAreaThumb })
2195
2363
  }
2196
2364
  )
2197
2365
  ]
@@ -2200,19 +2368,19 @@ const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo
2200
2368
  })
2201
2369
  );
2202
2370
  });
2203
- rn.displayName = "PlayerMenuContent";
2204
- const on = Ne((a, o) => {
2205
- var c = a, { className: e, onClick: t } = c, n = ne(c, ["className", "onClick"]);
2206
- const u = (l) => {
2207
- t == null || t(l);
2208
- }, i = (l) => {
2209
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), t == null || t(l));
2371
+ un.displayName = "PlayerMenuContent";
2372
+ const dn = Ve((s, r) => {
2373
+ var l = s, { className: e, onClick: t } = l, n = re(l, ["className", "onClick"]);
2374
+ const u = (c) => {
2375
+ t == null || t(c);
2376
+ }, i = (c) => {
2377
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), t == null || t(c));
2210
2378
  };
2211
- return /* @__PURE__ */ s.jsx(xe.Close, { asChild: !0, children: /* @__PURE__ */ s.jsx(
2379
+ return /* @__PURE__ */ a.jsx(xe.Close, { asChild: !0, children: /* @__PURE__ */ a.jsx(
2212
2380
  "div",
2213
- P({
2214
- ref: o,
2215
- className: [pe.dropdownMenuItem, e].filter(Boolean).join(" "),
2381
+ M({
2382
+ ref: r,
2383
+ className: [ve.dropdownMenuItem, e].filter(Boolean).join(" "),
2216
2384
  role: "menuitem",
2217
2385
  tabIndex: 0,
2218
2386
  onClick: u,
@@ -2220,307 +2388,309 @@ const on = Ne((a, o) => {
2220
2388
  }, n)
2221
2389
  ) });
2222
2390
  });
2223
- on.displayName = "PlayerMenuItem";
2224
- const Ct = "settings";
2225
- function sn() {
2226
- const [e, t] = X(!1), n = f((l) => l.containerRef), o = f((l) => l.addIdleLock), a = f((l) => l.removeIdleLock), c = f((l) => l.levels), u = f((l) => l.setLevel), i = z(
2227
- (l) => {
2228
- t(l), l ? o(Ct) : a(Ct);
2391
+ dn.displayName = "PlayerMenuItem";
2392
+ const Rt = "settings";
2393
+ function fn() {
2394
+ const [e, t] = G(!1), n = f((c) => c.containerRef), r = f((c) => c.addIdleLock), s = f((c) => c.removeIdleLock), l = f((c) => c.levels), u = f((c) => c.setLevel), i = O(
2395
+ (c) => {
2396
+ t(c), c ? r(Rt) : s(Rt);
2229
2397
  },
2230
- [o, a]
2398
+ [r, s]
2231
2399
  );
2232
- return /* @__PURE__ */ s.jsxs(Ko, { open: e, onOpenChange: i, children: [
2233
- /* @__PURE__ */ s.jsx(Yo, { asChild: !0, children: /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx($o, {}) }) }),
2234
- /* @__PURE__ */ s.jsx(Xo, { container: n.current, children: /* @__PURE__ */ s.jsx(rn, { side: "top", align: "end", children: c == null ? void 0 : c.map((l) => /* @__PURE__ */ s.jsxs(
2235
- on,
2400
+ return /* @__PURE__ */ a.jsxs(ri, { open: e, onOpenChange: i, children: [
2401
+ /* @__PURE__ */ a.jsx(oi, { asChild: !0, children: /* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsx(Go, {}) }) }),
2402
+ /* @__PURE__ */ a.jsx(ii, { container: n.current, children: /* @__PURE__ */ a.jsx(un, { side: "top", align: "end", children: l == null ? void 0 : l.map((c) => /* @__PURE__ */ a.jsxs(
2403
+ dn,
2236
2404
  {
2237
- onClick: () => u(l.value),
2405
+ onClick: () => u(c.value),
2238
2406
  children: [
2239
- l.label,
2240
- l.selected && /* @__PURE__ */ s.jsx(Ho, {})
2407
+ c.label,
2408
+ c.selected && /* @__PURE__ */ a.jsx(Ko, {})
2241
2409
  ]
2242
2410
  },
2243
- l.sid
2411
+ c.sid
2244
2412
  )) }) })
2245
2413
  ] });
2246
2414
  }
2247
- function Go() {
2248
- return /* @__PURE__ */ s.jsx(
2415
+ function si() {
2416
+ return /* @__PURE__ */ a.jsx(
2249
2417
  "svg",
2250
2418
  {
2251
2419
  xmlns: "http://www.w3.org/2000/svg",
2252
2420
  viewBox: "0 0 24 24",
2253
2421
  fill: "currentColor",
2254
- children: /* @__PURE__ */ s.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" })
2422
+ children: /* @__PURE__ */ a.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" })
2255
2423
  }
2256
2424
  );
2257
2425
  }
2258
- function Jo() {
2259
- return /* @__PURE__ */ s.jsx(
2426
+ function ai() {
2427
+ return /* @__PURE__ */ a.jsx(
2260
2428
  "svg",
2261
2429
  {
2262
2430
  xmlns: "http://www.w3.org/2000/svg",
2263
2431
  viewBox: "0 0 24 24",
2264
2432
  fill: "currentColor",
2265
- children: /* @__PURE__ */ s.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" })
2433
+ children: /* @__PURE__ */ a.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" })
2266
2434
  }
2267
2435
  );
2268
2436
  }
2269
- function Qo() {
2270
- return /* @__PURE__ */ s.jsx(
2437
+ function li() {
2438
+ return /* @__PURE__ */ a.jsx(
2271
2439
  "svg",
2272
2440
  {
2273
2441
  xmlns: "http://www.w3.org/2000/svg",
2274
2442
  viewBox: "0 0 24 24",
2275
2443
  fill: "currentColor",
2276
- children: /* @__PURE__ */ s.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" })
2444
+ children: /* @__PURE__ */ a.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" })
2277
2445
  }
2278
2446
  );
2279
2447
  }
2280
- const ei = "_volumeContainer_4d6jg_1", ti = "_volumeSlider_4d6jg_8", Et = {
2281
- volumeContainer: ei,
2282
- volumeSlider: ti
2283
- }, Rt = "volume";
2284
- function an() {
2285
- const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), o = f((i) => i.removeIdleLock), a = (i) => {
2286
- e(i[0]), n(Rt);
2287
- }, c = () => {
2288
- o(Rt);
2448
+ const ci = "_volumeContainer_4d6jg_1", ui = "_volumeSlider_4d6jg_8", bt = {
2449
+ volumeContainer: ci,
2450
+ volumeSlider: ui
2451
+ }, Pt = "volume";
2452
+ function hn() {
2453
+ const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), r = f((i) => i.removeIdleLock), s = (i) => {
2454
+ e(i[0]), n(Pt);
2455
+ }, l = () => {
2456
+ r(Pt);
2289
2457
  }, u = () => e(t ? 0 : 100);
2290
- return /* @__PURE__ */ s.jsxs("div", { className: Et.volumeContainer, children: [
2291
- /* @__PURE__ */ s.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ s.jsx(Go, {}) : /* @__PURE__ */ s.jsx(Jo, {}) : /* @__PURE__ */ s.jsx(Qo, {}) }),
2292
- /* @__PURE__ */ s.jsx("div", { className: Et.volumeSlider, children: /* @__PURE__ */ s.jsx(
2458
+ return /* @__PURE__ */ a.jsxs("div", { className: bt.volumeContainer, children: [
2459
+ /* @__PURE__ */ a.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ a.jsx(si, {}) : /* @__PURE__ */ a.jsx(ai, {}) : /* @__PURE__ */ a.jsx(li, {}) }),
2460
+ /* @__PURE__ */ a.jsx("div", { className: bt.volumeSlider, children: /* @__PURE__ */ a.jsx(
2293
2461
  Ae,
2294
2462
  {
2295
2463
  value: [t],
2296
- onValueChange: a,
2297
- onValueCommit: c
2464
+ onValueChange: s,
2465
+ onValueCommit: l
2298
2466
  }
2299
2467
  ) })
2300
2468
  ] });
2301
2469
  }
2302
- const ni = "0.0.50", ln = {
2303
- version: ni
2304
- };
2305
- function wi(e) {
2306
- return /* @__PURE__ */ s.jsx(kr, { children: /* @__PURE__ */ s.jsx(ri, P({}, e)) });
2470
+ function Pi(e) {
2471
+ return /* @__PURE__ */ a.jsx($r, { children: /* @__PURE__ */ a.jsx(di, M({}, e)) });
2307
2472
  }
2308
- function ri({ url: e, messages: t = {}, onEvent: n }) {
2309
- var c, u, i, l;
2310
- const o = f((d) => d.containerRef), a = {
2473
+ function di({ url: e, messages: t = {}, onEvent: n }) {
2474
+ var l, u, i, c;
2475
+ const r = f((d) => d.containerRef), s = {
2311
2476
  eventNotStarted: "Event has not started yet.",
2312
2477
  eventStartingSoon: "Starting in few seconds...",
2313
2478
  unableToPlay: "Unable to play the live stream. Please try again later."
2314
2479
  };
2315
- return D(() => {
2316
- console.log(`[Player][Live] Version: ${ln.version}`);
2317
- }, []), /* @__PURE__ */ s.jsxs(
2480
+ return N(() => {
2481
+ console.log(`[Player][Live] Version: ${Je.version}`);
2482
+ }, []), /* @__PURE__ */ a.jsxs(
2318
2483
  "div",
2319
2484
  {
2320
- ref: o,
2321
- className: B.playerContainer,
2485
+ ref: r,
2486
+ className: q.playerContainer,
2322
2487
  children: [
2323
- /* @__PURE__ */ s.jsxs(
2324
- Er,
2488
+ /* @__PURE__ */ a.jsxs(
2489
+ Dr,
2325
2490
  {
2326
2491
  url: e,
2327
2492
  messages: {
2328
- eventNotStarted: (c = t == null ? void 0 : t.eventNotStarted) != null ? c : a.eventNotStarted,
2329
- eventStartingSoon: (u = t == null ? void 0 : t.eventStartingSoon) != null ? u : a.eventStartingSoon,
2330
- unableToPlay: (i = t == null ? void 0 : t.unableToPlay) != null ? i : a.unableToPlay
2493
+ eventNotStarted: (l = t == null ? void 0 : t.eventNotStarted) != null ? l : s.eventNotStarted,
2494
+ eventStartingSoon: (u = t == null ? void 0 : t.eventStartingSoon) != null ? u : s.eventStartingSoon,
2495
+ unableToPlay: (i = t == null ? void 0 : t.unableToPlay) != null ? i : s.unableToPlay
2331
2496
  },
2332
2497
  children: [
2333
- /* @__PURE__ */ s.jsx(
2334
- Nr,
2498
+ /* @__PURE__ */ a.jsx(
2499
+ zr,
2335
2500
  {
2336
2501
  url: e,
2337
2502
  messages: {
2338
- unableToPlay: (l = t == null ? void 0 : t.unableToPlay) != null ? l : a.unableToPlay
2503
+ unableToPlay: (c = t == null ? void 0 : t.unableToPlay) != null ? c : s.unableToPlay
2339
2504
  }
2340
2505
  }
2341
2506
  ),
2342
- /* @__PURE__ */ s.jsx(Qt, {}),
2343
- /* @__PURE__ */ s.jsx(nn, {}),
2344
- /* @__PURE__ */ s.jsx(Kr, {}),
2345
- /* @__PURE__ */ s.jsxs(tn, { children: [
2346
- /* @__PURE__ */ s.jsx("div", { className: B.controlsTop, children: /* @__PURE__ */ s.jsx("div", { className: B.controlsContainer, children: /* @__PURE__ */ s.jsx("div", { className: B.controlsRow, children: /* @__PURE__ */ s.jsx(wo, {}) }) }) }),
2347
- /* @__PURE__ */ s.jsx("div", { className: B.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: B.controlsContainer, children: [
2348
- /* @__PURE__ */ s.jsx(fo, {}),
2349
- /* @__PURE__ */ s.jsxs("div", { className: B.controlsRow, children: [
2350
- /* @__PURE__ */ s.jsxs(
2507
+ /* @__PURE__ */ a.jsx(sn, {}),
2508
+ /* @__PURE__ */ a.jsx(cn, {}),
2509
+ /* @__PURE__ */ a.jsx(ro, {}),
2510
+ /* @__PURE__ */ a.jsxs(ln, { children: [
2511
+ /* @__PURE__ */ a.jsx("div", { className: q.controlsTop, children: /* @__PURE__ */ a.jsx("div", { className: q.controlsContainer, children: /* @__PURE__ */ a.jsx("div", { className: q.controlsRow, children: /* @__PURE__ */ a.jsx(Po, {}) }) }) }),
2512
+ /* @__PURE__ */ a.jsx("div", { className: q.controlsBottom, children: /* @__PURE__ */ a.jsxs("div", { className: q.controlsContainer, children: [
2513
+ /* @__PURE__ */ a.jsx(To, {}),
2514
+ /* @__PURE__ */ a.jsxs("div", { className: q.controlsRow, children: [
2515
+ /* @__PURE__ */ a.jsxs(
2351
2516
  "div",
2352
2517
  {
2353
- className: `${B.controlsSection} ${B.controlsSectionStart}`,
2518
+ className: `${q.controlsSection} ${q.controlsSectionStart}`,
2354
2519
  children: [
2355
- /* @__PURE__ */ s.jsx(to, {}),
2356
- /* @__PURE__ */ s.jsx(mo, {}),
2357
- /* @__PURE__ */ s.jsx(an, {})
2520
+ /* @__PURE__ */ a.jsx(uo, {}),
2521
+ /* @__PURE__ */ a.jsx(Co, {}),
2522
+ /* @__PURE__ */ a.jsx(hn, {})
2358
2523
  ]
2359
2524
  }
2360
2525
  ),
2361
- /* @__PURE__ */ s.jsxs(
2526
+ /* @__PURE__ */ a.jsxs(
2362
2527
  "div",
2363
2528
  {
2364
- className: `${B.controlsSection} ${B.controlsSectionEnd}`,
2529
+ className: `${q.controlsSection} ${q.controlsSectionEnd}`,
2365
2530
  children: [
2366
- /* @__PURE__ */ s.jsx(eo, { message: t == null ? void 0 : t.live }),
2367
- /* @__PURE__ */ s.jsx(sn, {}),
2368
- /* @__PURE__ */ s.jsx(en, {})
2531
+ /* @__PURE__ */ a.jsx(co, { message: t == null ? void 0 : t.live }),
2532
+ /* @__PURE__ */ a.jsx(fn, {}),
2533
+ /* @__PURE__ */ a.jsx(an, {})
2369
2534
  ]
2370
2535
  }
2371
2536
  )
2372
2537
  ] })
2373
2538
  ] }) })
2374
- ] })
2539
+ ] }),
2540
+ /* @__PURE__ */ a.jsx(Cr, { url: e }),
2541
+ /* @__PURE__ */ a.jsx(Hr, {}),
2542
+ /* @__PURE__ */ a.jsx(qr, { url: e })
2375
2543
  ]
2376
2544
  }
2377
2545
  ),
2378
- /* @__PURE__ */ s.jsx(Ir, {}),
2379
- /* @__PURE__ */ s.jsx(Vr, { url: e }),
2380
- n && /* @__PURE__ */ s.jsx(Lr, { callback: n })
2546
+ n && /* @__PURE__ */ a.jsx(Or, { callback: n })
2381
2547
  ]
2382
2548
  }
2383
2549
  );
2384
2550
  }
2385
- function oi() {
2386
- const e = f((u) => u.isPlaying), t = f((u) => u.pause), n = f((u) => u.play), o = f((u) => u.currentTime), a = f((u) => u.duration), c = f((u) => u.seek);
2387
- return /* @__PURE__ */ s.jsx(
2388
- Xt,
2551
+ function fi() {
2552
+ const e = f((u) => u.isPlaying), t = f((u) => u.pause), n = f((u) => u.play), r = f((u) => u.currentTime), s = f((u) => u.duration), l = f((u) => u.seek);
2553
+ return /* @__PURE__ */ a.jsx(
2554
+ nn,
2389
2555
  {
2390
2556
  onClick: () => {
2391
2557
  e ? t() : n();
2392
2558
  },
2393
2559
  onBackwardSeek: (u) => {
2394
- const i = Math.max(0, o - u);
2395
- c(i);
2560
+ const i = Math.max(0, r - u);
2561
+ l(i);
2396
2562
  },
2397
2563
  onForwardSeek: (u) => {
2398
- const i = Math.min(o + u, a);
2399
- c(i);
2564
+ const i = Math.min(r + u, s);
2565
+ l(i);
2400
2566
  },
2401
- maxBackwardTime: Math.floor(o),
2402
- maxForwardTime: Math.floor(a - o)
2567
+ maxBackwardTime: Math.floor(r),
2568
+ maxForwardTime: Math.floor(s - r)
2403
2569
  }
2404
2570
  );
2405
2571
  }
2406
- function ii() {
2407
- const e = f((a) => a.isPlaying), t = f((a) => a.pause), n = f((a) => a.play), o = () => {
2572
+ function hi() {
2573
+ const e = f((s) => s.isPlaying), t = f((s) => s.pause), n = f((s) => s.play), r = () => {
2408
2574
  e ? t() : n();
2409
2575
  };
2410
- return /* @__PURE__ */ s.jsx(le, { onClick: o, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
2411
- }
2412
- const bt = "vod-player-progress-bar";
2413
- function si() {
2414
- const e = V(null), t = V(null), [n, o] = X(!1), [a, c] = X(-1), [u, i] = X(-1), l = f((I) => I.currentTime), d = f((I) => I.duration), v = f((I) => I.seek), y = f((I) => I.addIdleLock), g = f((I) => I.removeIdleLock), L = parseFloat(
2415
- (d ? (u !== -1 ? u : l) / d * 100 : 0).toFixed(1)
2416
- ), k = (I) => {
2417
- i(d * (I[0] / 100)), y(bt);
2418
- }, _ = () => {
2419
- u !== -1 && (v(u), i(-1), g(bt));
2420
- }, j = () => o(!0), N = () => o(!1), R = z(
2421
- (I) => {
2422
- const T = e.current, M = t.current;
2423
- if (T && M) {
2424
- const m = Fe(T), O = Fe(M), G = (I.pageX || I.clientX) - m.left, Z = G / m.width;
2425
- if (Z < 0) return;
2426
- let H = G - O.width / 2;
2427
- H < 0 && (H = 0), H > m.width - O.width && (H = -1), M.style.left = H > -1 ? `${H}px` : "auto", M.style.right = H > -1 ? "auto" : "0px", c(Z * d);
2576
+ return /* @__PURE__ */ a.jsx(le, { onClick: r, children: e ? /* @__PURE__ */ a.jsx(rn, {}) : /* @__PURE__ */ a.jsx(on, {}) });
2577
+ }
2578
+ const Lt = "vod-player-progress-bar";
2579
+ function mi() {
2580
+ const e = F(null), t = F(null), [n, r] = G(!1), [s, l] = G(-1), [u, i] = G(-1), c = f((R) => R.currentTime), d = f((R) => R.duration), g = f((R) => R.seek), T = f((R) => R.addIdleLock), y = f((R) => R.removeIdleLock), x = parseFloat(
2581
+ (d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
2582
+ ), L = (R) => {
2583
+ i(d * (R[0] / 100)), T(Lt);
2584
+ }, C = () => {
2585
+ u !== -1 && (g(u), i(-1), y(Lt));
2586
+ }, w = () => r(!0), S = () => r(!1), P = O(
2587
+ (R) => {
2588
+ const B = e.current, V = t.current;
2589
+ if (B && V) {
2590
+ const m = Fe(B), v = Fe(V), U = (R.pageX || R.clientX) - m.left, I = U / m.width;
2591
+ if (I < 0) return;
2592
+ let A = U - v.width / 2;
2593
+ A < 0 && (A = 0), A > m.width - v.width && (A = -1), V.style.left = A > -1 ? `${A}px` : "auto", V.style.right = A > -1 ? "auto" : "0px", l(I * d);
2428
2594
  }
2429
- j();
2595
+ w();
2430
2596
  },
2431
2597
  [d]
2432
2598
  );
2433
- return /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
2434
- /* @__PURE__ */ s.jsx(
2599
+ return /* @__PURE__ */ a.jsxs("div", { className: se.progressSlider, children: [
2600
+ /* @__PURE__ */ a.jsx(
2435
2601
  Ae,
2436
2602
  {
2437
2603
  ref: e,
2438
- value: [L],
2439
- onPointerLeave: N,
2440
- onPointerDown: N,
2441
- onPointerMove: R,
2442
- onValueChange: k,
2443
- onValueCommit: _,
2604
+ value: [x],
2605
+ onPointerLeave: S,
2606
+ onPointerDown: S,
2607
+ onPointerMove: P,
2608
+ onValueChange: L,
2609
+ onValueCommit: C,
2444
2610
  step: 0.1
2445
2611
  }
2446
2612
  ),
2447
- /* @__PURE__ */ s.jsx(
2613
+ /* @__PURE__ */ a.jsx(
2448
2614
  "div",
2449
2615
  {
2450
2616
  ref: t,
2451
2617
  className: `${se.tipContainer} ${n ? se.tipContainerVisible : se.tipContainerHidden}`,
2452
- children: /* @__PURE__ */ s.jsx("p", { className: se.tipContent, children: _e(a) })
2618
+ children: /* @__PURE__ */ a.jsx("p", { className: se.tipContent, children: Te(s) })
2453
2619
  }
2454
2620
  )
2455
2621
  ] });
2456
2622
  }
2457
- const ai = "_remainingTimeContainer_1yyhb_1", li = "_remainingTime_1yyhb_1", ci = "_remainingSeparator_1yyhb_17", Me = {
2458
- remainingTimeContainer: ai,
2459
- remainingTime: li,
2460
- remainingSeparator: ci
2623
+ const vi = "_remainingTimeContainer_1yyhb_1", pi = "_remainingTime_1yyhb_1", yi = "_remainingSeparator_1yyhb_17", Ne = {
2624
+ remainingTimeContainer: vi,
2625
+ remainingTime: pi,
2626
+ remainingSeparator: yi
2461
2627
  };
2462
- function ui() {
2628
+ function gi() {
2463
2629
  const e = f((n) => n.currentTime), t = f((n) => n.duration);
2464
- return /* @__PURE__ */ s.jsxs("div", { className: Me.remainingTimeContainer, children: [
2465
- /* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: _e(e) }),
2466
- /* @__PURE__ */ s.jsx("p", { className: Me.remainingSeparator }),
2467
- /* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: _e(t) })
2630
+ return /* @__PURE__ */ a.jsxs("div", { className: Ne.remainingTimeContainer, children: [
2631
+ /* @__PURE__ */ a.jsx("p", { className: Ne.remainingTime, children: Te(e) }),
2632
+ /* @__PURE__ */ a.jsx("p", { className: Ne.remainingSeparator }),
2633
+ /* @__PURE__ */ a.jsx("p", { className: Ne.remainingTime, children: Te(t) })
2468
2634
  ] });
2469
2635
  }
2470
- function di({ callback: e }) {
2636
+ function wi({ url: e }) {
2637
+ const { video_id: t } = Kt(e), n = t ? Number(t) : void 0;
2638
+ return n ? /* @__PURE__ */ a.jsx(Yt, { kind: "vod", url: e, id: n }) : null;
2639
+ }
2640
+ function _i({ callback: e }) {
2471
2641
  const t = f((n) => n.eventEmitter);
2472
- return D(() => {
2473
- const n = (o) => e("timeUpdate", o);
2642
+ return N(() => {
2643
+ const n = (r) => e("timeUpdate", r);
2474
2644
  return t.on("timeUpdate", n), () => {
2475
2645
  t.off("timeUpdate", n);
2476
2646
  };
2477
- }, [e, t]), /* @__PURE__ */ s.jsx(zt, { callback: e });
2647
+ }, [e, t]), /* @__PURE__ */ a.jsx(Gt, { callback: e });
2478
2648
  }
2479
- function fi() {
2480
- const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), a = f((i) => i.play), c = f((i) => i.seek), u = z(
2649
+ function Ti() {
2650
+ const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), r = f((i) => i.pause), s = f((i) => i.play), l = f((i) => i.seek), u = O(
2481
2651
  (i) => {
2482
- let l = !1;
2652
+ let c = !1;
2483
2653
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
2484
2654
  switch (i.code) {
2485
2655
  case "ArrowLeft":
2486
- c(e - 10 >= 0 ? e - 10 : 0), l = !0;
2656
+ l(e - 10 >= 0 ? e - 10 : 0), c = !0;
2487
2657
  break;
2488
2658
  case "ArrowRight":
2489
- c(e + 10 < t ? e + 10 : t), l = !0;
2659
+ l(e + 10 < t ? e + 10 : t), c = !0;
2490
2660
  break;
2491
2661
  case "Space":
2492
- n ? o() : a(), l = !0;
2662
+ n ? r() : s(), c = !0;
2493
2663
  break;
2494
2664
  }
2495
- l && i.preventDefault();
2665
+ c && i.preventDefault();
2496
2666
  }
2497
2667
  },
2498
- [e, t, n, o, a, c]
2668
+ [e, t, n, r, s, l]
2499
2669
  );
2500
- return D(() => (document.addEventListener("keydown", u), () => {
2670
+ return N(() => (document.addEventListener("keydown", u), () => {
2501
2671
  document.removeEventListener("keydown", u);
2502
- }), [u]), /* @__PURE__ */ s.jsx(Zt, {});
2672
+ }), [u]), /* @__PURE__ */ a.jsx(Qt, {});
2503
2673
  }
2504
- function Ti(e) {
2505
- return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(hi, P({}, e)) });
2674
+ function Li(e) {
2675
+ return /* @__PURE__ */ a.jsx(en, { children: /* @__PURE__ */ a.jsx(xi, M({}, e)) });
2506
2676
  }
2507
- function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
2677
+ function xi({ url: e, messages: t, onEvent: n, startTime: r }) {
2508
2678
  var i;
2509
- const a = f((l) => l.setStartTime), c = f((l) => l.containerRef), u = {
2679
+ const s = f((c) => c.setStartTime), l = f((c) => c.containerRef), u = {
2510
2680
  unableToPlay: "Unable to play the video. Please try again later."
2511
2681
  };
2512
- return D(() => {
2513
- o && a(o);
2514
- }, [o, a]), D(() => {
2515
- console.log(`[Player][VOD] Version: ${ln.version}`);
2516
- }, []), /* @__PURE__ */ s.jsxs(
2682
+ return N(() => {
2683
+ r && s(r);
2684
+ }, [r, s]), N(() => {
2685
+ console.log(`[Player][VOD] Version: ${Je.version}`);
2686
+ }, []), /* @__PURE__ */ a.jsxs(
2517
2687
  "div",
2518
2688
  {
2519
- ref: c,
2520
- className: B.playerContainer,
2689
+ ref: l,
2690
+ className: q.playerContainer,
2521
2691
  children: [
2522
- /* @__PURE__ */ s.jsx(
2523
- Yt,
2692
+ /* @__PURE__ */ a.jsx(
2693
+ tn,
2524
2694
  {
2525
2695
  url: e,
2526
2696
  isLive: !1,
@@ -2529,43 +2699,44 @@ function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
2529
2699
  }
2530
2700
  }
2531
2701
  ),
2532
- /* @__PURE__ */ s.jsx(Qt, {}),
2533
- /* @__PURE__ */ s.jsx(nn, {}),
2534
- /* @__PURE__ */ s.jsx(oi, {}),
2535
- /* @__PURE__ */ s.jsx(tn, { children: /* @__PURE__ */ s.jsx("div", { className: B.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: B.controlsContainer, children: [
2536
- /* @__PURE__ */ s.jsx(si, {}),
2537
- /* @__PURE__ */ s.jsxs("div", { className: B.controlsRow, children: [
2538
- /* @__PURE__ */ s.jsxs(
2702
+ /* @__PURE__ */ a.jsx(sn, {}),
2703
+ /* @__PURE__ */ a.jsx(cn, {}),
2704
+ /* @__PURE__ */ a.jsx(fi, {}),
2705
+ /* @__PURE__ */ a.jsx(ln, { children: /* @__PURE__ */ a.jsx("div", { className: q.controlsBottom, children: /* @__PURE__ */ a.jsxs("div", { className: q.controlsContainer, children: [
2706
+ /* @__PURE__ */ a.jsx(mi, {}),
2707
+ /* @__PURE__ */ a.jsxs("div", { className: q.controlsRow, children: [
2708
+ /* @__PURE__ */ a.jsxs(
2539
2709
  "div",
2540
2710
  {
2541
- className: `${B.controlsSection} ${B.controlsSectionStart}`,
2711
+ className: `${q.controlsSection} ${q.controlsSectionStart}`,
2542
2712
  children: [
2543
- /* @__PURE__ */ s.jsx(ii, {}),
2544
- /* @__PURE__ */ s.jsx(an, {}),
2545
- /* @__PURE__ */ s.jsx(ui, {})
2713
+ /* @__PURE__ */ a.jsx(hi, {}),
2714
+ /* @__PURE__ */ a.jsx(hn, {}),
2715
+ /* @__PURE__ */ a.jsx(gi, {})
2546
2716
  ]
2547
2717
  }
2548
2718
  ),
2549
- /* @__PURE__ */ s.jsxs(
2719
+ /* @__PURE__ */ a.jsxs(
2550
2720
  "div",
2551
2721
  {
2552
- className: `${B.controlsSection} ${B.controlsSectionEnd}`,
2722
+ className: `${q.controlsSection} ${q.controlsSectionEnd}`,
2553
2723
  children: [
2554
- /* @__PURE__ */ s.jsx(sn, {}),
2555
- /* @__PURE__ */ s.jsx(en, {})
2724
+ /* @__PURE__ */ a.jsx(fn, {}),
2725
+ /* @__PURE__ */ a.jsx(an, {})
2556
2726
  ]
2557
2727
  }
2558
2728
  )
2559
2729
  ] })
2560
2730
  ] }) }) }),
2561
- /* @__PURE__ */ s.jsx(fi, {}),
2562
- n && /* @__PURE__ */ s.jsx(di, { callback: n })
2731
+ /* @__PURE__ */ a.jsx(Ti, {}),
2732
+ /* @__PURE__ */ a.jsx(wi, { url: e }),
2733
+ n && /* @__PURE__ */ a.jsx(_i, { callback: n })
2563
2734
  ]
2564
2735
  }
2565
2736
  );
2566
2737
  }
2567
2738
  export {
2568
- wi as LivePlayer,
2569
- Ti as VodPlayer
2739
+ Pi as LivePlayer,
2740
+ Li as VodPlayer
2570
2741
  };
2571
2742
  //# sourceMappingURL=react-video-player.es.js.map