@devix-technologies/react-gjirafa-vp-player 1.0.20 → 1.0.22

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,6 +1,6 @@
1
1
  import * as le from "react";
2
2
  import wt, { forwardRef as kt, useContext as st, useState as ne, useEffect as we, useRef as de, useMemo as ct, createContext as Et, useCallback as Ge } from "react";
3
- var Se = { exports: {} }, ve = {};
3
+ var Ie = { exports: {} }, ve = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -48,20 +48,20 @@ function _t() {
48
48
  function e(s) {
49
49
  if (s == null) return null;
50
50
  if (typeof s == "function")
51
- return s.$$typeof === N ? null : s.displayName || s.name || null;
51
+ return s.$$typeof === P ? null : s.displayName || s.name || null;
52
52
  if (typeof s == "string") return s;
53
53
  switch (s) {
54
54
  case d:
55
55
  return "Fragment";
56
56
  case v:
57
57
  return "Profiler";
58
- case y:
58
+ case m:
59
59
  return "StrictMode";
60
- case O:
61
- return "Suspense";
62
60
  case j:
61
+ return "Suspense";
62
+ case $:
63
63
  return "SuspenseList";
64
- case P:
64
+ case V:
65
65
  return "Activity";
66
66
  }
67
67
  if (typeof s == "object")
@@ -70,14 +70,14 @@ function _t() {
70
70
  ), s.$$typeof) {
71
71
  case g:
72
72
  return "Portal";
73
- case A:
73
+ case O:
74
74
  return (s.displayName || "Context") + ".Provider";
75
75
  case E:
76
76
  return (s._context.displayName || "Context") + ".Consumer";
77
77
  case T:
78
78
  var x = s.render;
79
79
  return s = s.displayName, s || (s = x.displayName || x.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
80
- case f:
80
+ case y:
81
81
  return x = s.displayName || null, x !== null ? x : e(s.type) || "Memo";
82
82
  case G:
83
83
  x = s._payload, s = s._init;
@@ -100,11 +100,11 @@ function _t() {
100
100
  }
101
101
  if (x) {
102
102
  x = console;
103
- var $ = x.error, F = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
104
- return $.call(
103
+ var N = x.error, B = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
104
+ return N.call(
105
105
  x,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- F
107
+ B
108
108
  ), t(s);
109
109
  }
110
110
  }
@@ -120,28 +120,28 @@ function _t() {
120
120
  }
121
121
  }
122
122
  function a() {
123
- var s = z.A;
123
+ var s = U.A;
124
124
  return s === null ? null : s.getOwner();
125
125
  }
126
126
  function i() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
129
  function o(s) {
130
- if (B.call(s, "key")) {
130
+ if (_.call(s, "key")) {
131
131
  var x = Object.getOwnPropertyDescriptor(s, "key").get;
132
132
  if (x && x.isReactWarning) return !1;
133
133
  }
134
134
  return s.key !== void 0;
135
135
  }
136
136
  function c(s, x) {
137
- function $() {
138
- U || (U = !0, console.error(
137
+ function N() {
138
+ z || (z = !0, console.error(
139
139
  "%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://react.dev/link/special-props)",
140
140
  x
141
141
  ));
142
142
  }
143
- $.isReactWarning = !0, Object.defineProperty(s, "key", {
144
- get: $,
143
+ N.isReactWarning = !0, Object.defineProperty(s, "key", {
144
+ get: N,
145
145
  configurable: !0
146
146
  });
147
147
  }
@@ -151,14 +151,14 @@ function _t() {
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
152
  )), s = this.props.ref, s !== void 0 ? s : null;
153
153
  }
154
- function m(s, x, $, F, I, V, ee, ae) {
155
- return $ = V.ref, s = {
154
+ function h(s, x, N, B, A, L, ee, ae) {
155
+ return N = L.ref, s = {
156
156
  $$typeof: k,
157
157
  type: s,
158
158
  key: x,
159
- props: V,
160
- _owner: I
161
- }, ($ !== void 0 ? $ : null) !== null ? Object.defineProperty(s, "ref", {
159
+ props: L,
160
+ _owner: A
161
+ }, (N !== void 0 ? N : null) !== null ? Object.defineProperty(s, "ref", {
162
162
  enumerable: !1,
163
163
  get: u
164
164
  }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
@@ -183,60 +183,60 @@ function _t() {
183
183
  value: ae
184
184
  }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
185
185
  }
186
- function l(s, x, $, F, I, V, ee, ae) {
187
- var h = x.children;
188
- if (h !== void 0)
189
- if (F)
190
- if (X(h)) {
191
- for (F = 0; F < h.length; F++)
192
- p(h[F]);
193
- Object.freeze && Object.freeze(h);
186
+ function l(s, x, N, B, A, L, ee, ae) {
187
+ var p = x.children;
188
+ if (p !== void 0)
189
+ if (B)
190
+ if (M(p)) {
191
+ for (B = 0; B < p.length; B++)
192
+ f(p[B]);
193
+ Object.freeze && Object.freeze(p);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else p(h);
199
- if (B.call(x, "key")) {
200
- h = e(s);
198
+ else f(p);
199
+ if (_.call(x, "key")) {
200
+ p = e(s);
201
201
  var b = Object.keys(x).filter(function(C) {
202
202
  return C !== "key";
203
203
  });
204
- F = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", re[h + F] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ B = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", re[p + B] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
208
208
  React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
- F,
212
- h,
211
+ B,
212
+ p,
213
213
  b,
214
- h
215
- ), re[h + F] = !0);
214
+ p
215
+ ), re[p + B] = !0);
216
216
  }
217
- if (h = null, $ !== void 0 && (r($), h = "" + $), o(x) && (r(x.key), h = "" + x.key), "key" in x) {
218
- $ = {};
217
+ if (p = null, N !== void 0 && (r(N), p = "" + N), o(x) && (r(x.key), p = "" + x.key), "key" in x) {
218
+ N = {};
219
219
  for (var R in x)
220
- R !== "key" && ($[R] = x[R]);
221
- } else $ = x;
222
- return h && c(
223
- $,
220
+ R !== "key" && (N[R] = x[R]);
221
+ } else N = x;
222
+ return p && c(
223
+ N,
224
224
  typeof s == "function" ? s.displayName || s.name || "Unknown" : s
225
- ), m(
225
+ ), h(
226
226
  s,
227
- h,
228
- V,
229
- I,
227
+ p,
228
+ L,
229
+ A,
230
230
  a(),
231
- $,
231
+ N,
232
232
  ee,
233
233
  ae
234
234
  );
235
235
  }
236
- function p(s) {
236
+ function f(s) {
237
237
  typeof s == "object" && s !== null && s.$$typeof === k && s._store && (s._store.validated = 1);
238
238
  }
239
- var w = wt, k = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), A = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), z = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, B = Object.prototype.hasOwnProperty, X = Array.isArray, L = console.createTask ? console.createTask : function() {
239
+ var w = wt, k = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), O = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), U = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _ = Object.prototype.hasOwnProperty, M = Array.isArray, F = console.createTask ? console.createTask : function() {
240
240
  return null;
241
241
  };
242
242
  w = {
@@ -244,42 +244,42 @@ React keys must be passed directly to JSX without using spread:
244
244
  return s();
245
245
  }
246
246
  };
247
- var U, Q = {}, H = w["react-stack-bottom-frame"].bind(
247
+ var z, Q = {}, X = w["react-stack-bottom-frame"].bind(
248
248
  w,
249
249
  i
250
- )(), te = L(n(i)), re = {};
251
- ge.Fragment = d, ge.jsx = function(s, x, $, F, I) {
252
- var V = 1e4 > z.recentlyCreatedOwnerStacks++;
250
+ )(), te = F(n(i)), re = {};
251
+ ge.Fragment = d, ge.jsx = function(s, x, N, B, A) {
252
+ var L = 1e4 > U.recentlyCreatedOwnerStacks++;
253
253
  return l(
254
254
  s,
255
255
  x,
256
- $,
256
+ N,
257
257
  !1,
258
- F,
259
- I,
260
- V ? Error("react-stack-top-frame") : H,
261
- V ? L(n(s)) : te
258
+ B,
259
+ A,
260
+ L ? Error("react-stack-top-frame") : X,
261
+ L ? F(n(s)) : te
262
262
  );
263
- }, ge.jsxs = function(s, x, $, F, I) {
264
- var V = 1e4 > z.recentlyCreatedOwnerStacks++;
263
+ }, ge.jsxs = function(s, x, N, B, A) {
264
+ var L = 1e4 > U.recentlyCreatedOwnerStacks++;
265
265
  return l(
266
266
  s,
267
267
  x,
268
- $,
268
+ N,
269
269
  !0,
270
- F,
271
- I,
272
- V ? Error("react-stack-top-frame") : H,
273
- V ? L(n(s)) : te
270
+ B,
271
+ A,
272
+ L ? Error("react-stack-top-frame") : X,
273
+ L ? F(n(s)) : te
274
274
  );
275
275
  };
276
276
  }()), ge;
277
277
  }
278
278
  var Je;
279
- function St() {
280
- return Je || (Je = 1, process.env.NODE_ENV === "production" ? Se.exports = Pt() : Se.exports = _t()), Se.exports;
279
+ function It() {
280
+ return Je || (Je = 1, process.env.NODE_ENV === "production" ? Ie.exports = Pt() : Ie.exports = _t()), Ie.exports;
281
281
  }
282
- var M = St();
282
+ var W = It();
283
283
  function Be() {
284
284
  return Be = Object.assign ? Object.assign.bind() : function(e) {
285
285
  for (var t = 1; t < arguments.length; t++) {
@@ -289,18 +289,18 @@ function Be() {
289
289
  return e;
290
290
  }, Be.apply(null, arguments);
291
291
  }
292
- function Tt(e) {
292
+ function St(e) {
293
293
  if (e.sheet)
294
294
  return e.sheet;
295
295
  for (var t = 0; t < document.styleSheets.length; t++)
296
296
  if (document.styleSheets[t].ownerNode === e)
297
297
  return document.styleSheets[t];
298
298
  }
299
- function Rt(e) {
299
+ function Tt(e) {
300
300
  var t = document.createElement("style");
301
301
  return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
302
302
  }
303
- var Ct = /* @__PURE__ */ function() {
303
+ var Rt = /* @__PURE__ */ function() {
304
304
  function e(r) {
305
305
  var n = this;
306
306
  this._insertTag = function(a) {
@@ -312,10 +312,10 @@ var Ct = /* @__PURE__ */ function() {
312
312
  return t.hydrate = function(n) {
313
313
  n.forEach(this._insertTag);
314
314
  }, t.insert = function(n) {
315
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Rt(this));
315
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Tt(this));
316
316
  var a = this.tags[this.tags.length - 1];
317
317
  if (this.isSpeedy) {
318
- var i = Tt(a);
318
+ var i = St(a);
319
319
  try {
320
320
  i.insertRule(n, i.cssRules.length);
321
321
  } catch {
@@ -329,9 +329,9 @@ var Ct = /* @__PURE__ */ function() {
329
329
  return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
330
330
  }), this.tags = [], this.ctr = 0;
331
331
  }, e;
332
- }(), q = "-ms-", Ae = "-moz-", _ = "-webkit-", lt = "comm", ze = "rule", We = "decl", It = "@import", ut = "@keyframes", At = "@layer", Ot = Math.abs, Oe = String.fromCharCode, jt = Object.assign;
332
+ }(), H = "-ms-", Ae = "-moz-", I = "-webkit-", lt = "comm", ze = "rule", We = "decl", Ct = "@import", ut = "@keyframes", At = "@layer", Ot = Math.abs, Oe = String.fromCharCode, jt = Object.assign;
333
333
  function $t(e, t) {
334
- return Y(e, 0) ^ 45 ? (((t << 2 ^ Y(e, 0)) << 2 ^ Y(e, 1)) << 2 ^ Y(e, 2)) << 2 ^ Y(e, 3) : 0;
334
+ return q(e, 0) ^ 45 ? (((t << 2 ^ q(e, 0)) << 2 ^ q(e, 1)) << 2 ^ q(e, 2)) << 2 ^ q(e, 3) : 0;
335
335
  }
336
336
  function dt(e) {
337
337
  return e.trim();
@@ -345,7 +345,7 @@ function S(e, t, r) {
345
345
  function De(e, t) {
346
346
  return e.indexOf(t);
347
347
  }
348
- function Y(e, t) {
348
+ function q(e, t) {
349
349
  return e.charCodeAt(t) | 0;
350
350
  }
351
351
  function ke(e, t, r) {
@@ -357,7 +357,7 @@ function ie(e) {
357
357
  function Ye(e) {
358
358
  return e.length;
359
359
  }
360
- function Te(e, t) {
360
+ function Se(e, t) {
361
361
  return t.push(e), e;
362
362
  }
363
363
  function Vt(e, t) {
@@ -374,15 +374,15 @@ function Lt() {
374
374
  return D;
375
375
  }
376
376
  function Ft() {
377
- return D = J > 0 ? Y(ye, --J) : 0, he--, D === 10 && (he = 1, je--), D;
377
+ return D = J > 0 ? q(ye, --J) : 0, he--, D === 10 && (he = 1, je--), D;
378
378
  }
379
379
  function Z() {
380
- return D = J < ft ? Y(ye, J++) : 0, he++, D === 10 && (he = 1, je++), D;
380
+ return D = J < ft ? q(ye, J++) : 0, he++, D === 10 && (he = 1, je++), D;
381
381
  }
382
382
  function se() {
383
- return Y(ye, J);
383
+ return q(ye, J);
384
384
  }
385
- function Re() {
385
+ function Te() {
386
386
  return J;
387
387
  }
388
388
  function _e(e, t) {
@@ -432,7 +432,7 @@ function pt(e) {
432
432
  function ht(e) {
433
433
  return ye = "", e;
434
434
  }
435
- function Ce(e) {
435
+ function Re(e) {
436
436
  return dt(_e(J - 1, Ue(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
437
437
  }
438
438
  function Bt(e) {
@@ -443,7 +443,7 @@ function Bt(e) {
443
443
  function Dt(e, t) {
444
444
  for (; --t && Z() && !(D < 48 || D > 102 || D > 57 && D < 65 || D > 70 && D < 97); )
445
445
  ;
446
- return _e(e, Re() + (t < 6 && se() == 32 && Z() == 32));
446
+ return _e(e, Te() + (t < 6 && se() == 32 && Z() == 32));
447
447
  }
448
448
  function Ue(e) {
449
449
  for (; Z(); )
@@ -479,48 +479,48 @@ function Mt(e) {
479
479
  return _e(e, J);
480
480
  }
481
481
  function zt(e) {
482
- return ht(Ie("", null, null, null, [""], e = pt(e), 0, [0], e));
482
+ return ht(Ce("", null, null, null, [""], e = pt(e), 0, [0], e));
483
483
  }
484
- function Ie(e, t, r, n, a, i, o, c, u) {
485
- for (var m = 0, l = 0, p = o, w = 0, k = 0, g = 0, d = 1, y = 1, v = 1, E = 0, A = "", T = a, O = i, j = n, f = A; y; )
484
+ function Ce(e, t, r, n, a, i, o, c, u) {
485
+ for (var h = 0, l = 0, f = o, w = 0, k = 0, g = 0, d = 1, m = 1, v = 1, E = 0, O = "", T = a, j = i, $ = n, y = O; m; )
486
486
  switch (g = E, E = Z()) {
487
487
  // (
488
488
  case 40:
489
- if (g != 108 && Y(f, p - 1) == 58) {
490
- De(f += S(Ce(E), "&", "&\f"), "&\f") != -1 && (v = -1);
489
+ if (g != 108 && q(y, f - 1) == 58) {
490
+ De(y += S(Re(E), "&", "&\f"), "&\f") != -1 && (v = -1);
491
491
  break;
492
492
  }
493
493
  // " ' [
494
494
  case 34:
495
495
  case 39:
496
496
  case 91:
497
- f += Ce(E);
497
+ y += Re(E);
498
498
  break;
499
499
  // \t \n \r \s
500
500
  case 9:
501
501
  case 10:
502
502
  case 13:
503
503
  case 32:
504
- f += Bt(g);
504
+ y += Bt(g);
505
505
  break;
506
506
  // \
507
507
  case 92:
508
- f += Dt(Re() - 1, 7);
508
+ y += Dt(Te() - 1, 7);
509
509
  continue;
510
510
  // /
511
511
  case 47:
512
512
  switch (se()) {
513
513
  case 42:
514
514
  case 47:
515
- Te(Wt(Ut(Z(), Re()), t, r), u);
515
+ Se(Wt(Ut(Z(), Te()), t, r), u);
516
516
  break;
517
517
  default:
518
- f += "/";
518
+ y += "/";
519
519
  }
520
520
  break;
521
521
  // {
522
522
  case 123 * d:
523
- c[m++] = ie(f) * v;
523
+ c[h++] = ie(y) * v;
524
524
  // } ; \0
525
525
  case 125 * d:
526
526
  case 59:
@@ -529,37 +529,37 @@ function Ie(e, t, r, n, a, i, o, c, u) {
529
529
  // \0 }
530
530
  case 0:
531
531
  case 125:
532
- y = 0;
532
+ m = 0;
533
533
  // ;
534
534
  case 59 + l:
535
- v == -1 && (f = S(f, /\f/g, "")), k > 0 && ie(f) - p && Te(k > 32 ? Ze(f + ";", n, r, p - 1) : Ze(S(f, " ", "") + ";", n, r, p - 2), u);
535
+ v == -1 && (y = S(y, /\f/g, "")), k > 0 && ie(y) - f && Se(k > 32 ? Ze(y + ";", n, r, f - 1) : Ze(S(y, " ", "") + ";", n, r, f - 2), u);
536
536
  break;
537
537
  // @ ;
538
538
  case 59:
539
- f += ";";
539
+ y += ";";
540
540
  // { rule/at-rule
541
541
  default:
542
- if (Te(j = Ke(f, t, r, m, l, a, c, A, T = [], O = [], p), i), E === 123)
542
+ if (Se($ = Ke(y, t, r, h, l, a, c, O, T = [], j = [], f), i), E === 123)
543
543
  if (l === 0)
544
- Ie(f, t, j, j, T, i, p, c, O);
544
+ Ce(y, t, $, $, T, i, f, c, j);
545
545
  else
546
- switch (w === 99 && Y(f, 3) === 110 ? 100 : w) {
546
+ switch (w === 99 && q(y, 3) === 110 ? 100 : w) {
547
547
  // d l m s
548
548
  case 100:
549
549
  case 108:
550
550
  case 109:
551
551
  case 115:
552
- Ie(e, j, j, n && Te(Ke(e, j, j, 0, 0, a, c, A, a, T = [], p), O), a, O, p, c, n ? T : O);
552
+ Ce(e, $, $, n && Se(Ke(e, $, $, 0, 0, a, c, O, a, T = [], f), j), a, j, f, c, n ? T : j);
553
553
  break;
554
554
  default:
555
- Ie(f, j, j, j, [""], O, 0, c, O);
555
+ Ce(y, $, $, $, [""], j, 0, c, j);
556
556
  }
557
557
  }
558
- m = l = k = 0, d = v = 1, A = f = "", p = o;
558
+ h = l = k = 0, d = v = 1, O = y = "", f = o;
559
559
  break;
560
560
  // :
561
561
  case 58:
562
- p = 1 + ie(f), k = g;
562
+ f = 1 + ie(y), k = g;
563
563
  default:
564
564
  if (d < 1) {
565
565
  if (E == 123)
@@ -567,31 +567,31 @@ function Ie(e, t, r, n, a, i, o, c, u) {
567
567
  else if (E == 125 && d++ == 0 && Ft() == 125)
568
568
  continue;
569
569
  }
570
- switch (f += Oe(E), E * d) {
570
+ switch (y += Oe(E), E * d) {
571
571
  // &
572
572
  case 38:
573
- v = l > 0 ? 1 : (f += "\f", -1);
573
+ v = l > 0 ? 1 : (y += "\f", -1);
574
574
  break;
575
575
  // ,
576
576
  case 44:
577
- c[m++] = (ie(f) - 1) * v, v = 1;
577
+ c[h++] = (ie(y) - 1) * v, v = 1;
578
578
  break;
579
579
  // @
580
580
  case 64:
581
- se() === 45 && (f += Ce(Z())), w = se(), l = p = ie(A = f += Mt(Re())), E++;
581
+ se() === 45 && (y += Re(Z())), w = se(), l = f = ie(O = y += Mt(Te())), E++;
582
582
  break;
583
583
  // -
584
584
  case 45:
585
- g === 45 && ie(f) == 2 && (d = 0);
585
+ g === 45 && ie(y) == 2 && (d = 0);
586
586
  }
587
587
  }
588
588
  return i;
589
589
  }
590
- function Ke(e, t, r, n, a, i, o, c, u, m, l) {
591
- for (var p = a - 1, w = a === 0 ? i : [""], k = Ye(w), g = 0, d = 0, y = 0; g < n; ++g)
592
- for (var v = 0, E = ke(e, p + 1, p = Ot(d = o[g])), A = e; v < k; ++v)
593
- (A = dt(d > 0 ? w[v] + " " + E : S(E, /&\f/g, w[v]))) && (u[y++] = A);
594
- return $e(e, t, r, a === 0 ? ze : c, u, m, l);
590
+ function Ke(e, t, r, n, a, i, o, c, u, h, l) {
591
+ for (var f = a - 1, w = a === 0 ? i : [""], k = Ye(w), g = 0, d = 0, m = 0; g < n; ++g)
592
+ for (var v = 0, E = ke(e, f + 1, f = Ot(d = o[g])), O = e; v < k; ++v)
593
+ (O = dt(d > 0 ? w[v] + " " + E : S(E, /&\f/g, w[v]))) && (u[m++] = O);
594
+ return $e(e, t, r, a === 0 ? ze : c, u, h, l);
595
595
  }
596
596
  function Wt(e, t, r) {
597
597
  return $e(e, t, r, lt, Oe(Lt()), ke(e, 2, -2), 0);
@@ -608,7 +608,7 @@ function Yt(e, t, r, n) {
608
608
  switch (e.type) {
609
609
  case At:
610
610
  if (e.children.length) break;
611
- case It:
611
+ case Ct:
612
612
  case We:
613
613
  return e.return = e.return || e.value;
614
614
  case lt:
@@ -651,7 +651,7 @@ var Ht = function(t, r, n) {
651
651
  a === 38 && se() === 12 && (r[n] = 1), t[n] += Ht(J - 1, r, n);
652
652
  break;
653
653
  case 2:
654
- t[n] += Ce(a);
654
+ t[n] += Re(a);
655
655
  break;
656
656
  case 4:
657
657
  if (a === 44) {
@@ -674,9 +674,9 @@ var Ht = function(t, r, n) {
674
674
  if (n = n.parent, !n) return;
675
675
  if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !Qe.get(n)) && !a) {
676
676
  Qe.set(t, !0);
677
- for (var i = [], o = Jt(r, i), c = n.props, u = 0, m = 0; u < o.length; u++)
678
- for (var l = 0; l < c.length; l++, m++)
679
- t.props[m] = i[u] ? o[u].replace(/&\f/g, c[l]) : c[l] + " " + o[u];
677
+ for (var i = [], o = Jt(r, i), c = n.props, u = 0, h = 0; u < o.length; u++)
678
+ for (var l = 0; l < c.length; l++, h++)
679
+ t.props[h] = i[u] ? o[u].replace(/&\f/g, c[l]) : c[l] + " " + o[u];
680
680
  }
681
681
  }
682
682
  }, Zt = function(t) {
@@ -691,7 +691,7 @@ function yt(e, t) {
691
691
  switch ($t(e, t)) {
692
692
  // color-adjust
693
693
  case 5103:
694
- return _ + "print-" + e + e;
694
+ return I + "print-" + e + e;
695
695
  // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
696
696
  case 5737:
697
697
  case 4201:
@@ -721,58 +721,58 @@ function yt(e, t) {
721
721
  case 5365:
722
722
  case 5621:
723
723
  case 3829:
724
- return _ + e + e;
724
+ return I + e + e;
725
725
  // appearance, user-select, transform, hyphens, text-size-adjust
726
726
  case 5349:
727
727
  case 4246:
728
728
  case 4810:
729
729
  case 6968:
730
730
  case 2756:
731
- return _ + e + Ae + e + q + e + e;
731
+ return I + e + Ae + e + H + e + e;
732
732
  // flex, flex-direction
733
733
  case 6828:
734
734
  case 4268:
735
- return _ + e + q + e + e;
735
+ return I + e + H + e + e;
736
736
  // order
737
737
  case 6165:
738
- return _ + e + q + "flex-" + e + e;
738
+ return I + e + H + "flex-" + e + e;
739
739
  // align-items
740
740
  case 5187:
741
- return _ + e + S(e, /(\w+).+(:[^]+)/, _ + "box-$1$2" + q + "flex-$1$2") + e;
741
+ return I + e + S(e, /(\w+).+(:[^]+)/, I + "box-$1$2" + H + "flex-$1$2") + e;
742
742
  // align-self
743
743
  case 5443:
744
- return _ + e + q + "flex-item-" + S(e, /flex-|-self/, "") + e;
744
+ return I + e + H + "flex-item-" + S(e, /flex-|-self/, "") + e;
745
745
  // align-content
746
746
  case 4675:
747
- return _ + e + q + "flex-line-pack" + S(e, /align-content|flex-|-self/, "") + e;
747
+ return I + e + H + "flex-line-pack" + S(e, /align-content|flex-|-self/, "") + e;
748
748
  // flex-shrink
749
749
  case 5548:
750
- return _ + e + q + S(e, "shrink", "negative") + e;
750
+ return I + e + H + S(e, "shrink", "negative") + e;
751
751
  // flex-basis
752
752
  case 5292:
753
- return _ + e + q + S(e, "basis", "preferred-size") + e;
753
+ return I + e + H + S(e, "basis", "preferred-size") + e;
754
754
  // flex-grow
755
755
  case 6060:
756
- return _ + "box-" + S(e, "-grow", "") + _ + e + q + S(e, "grow", "positive") + e;
756
+ return I + "box-" + S(e, "-grow", "") + I + e + H + S(e, "grow", "positive") + e;
757
757
  // transition
758
758
  case 4554:
759
- return _ + S(e, /([^-])(transform)/g, "$1" + _ + "$2") + e;
759
+ return I + S(e, /([^-])(transform)/g, "$1" + I + "$2") + e;
760
760
  // cursor
761
761
  case 6187:
762
- return S(S(S(e, /(zoom-|grab)/, _ + "$1"), /(image-set)/, _ + "$1"), e, "") + e;
762
+ return S(S(S(e, /(zoom-|grab)/, I + "$1"), /(image-set)/, I + "$1"), e, "") + e;
763
763
  // background, background-image
764
764
  case 5495:
765
765
  case 3959:
766
- return S(e, /(image-set\([^]*)/, _ + "$1$`$1");
766
+ return S(e, /(image-set\([^]*)/, I + "$1$`$1");
767
767
  // justify-content
768
768
  case 4968:
769
- return S(S(e, /(.+:)(flex-)?(.*)/, _ + "box-pack:$3" + q + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + _ + e + e;
769
+ return S(S(e, /(.+:)(flex-)?(.*)/, I + "box-pack:$3" + H + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + I + e + e;
770
770
  // (margin|padding)-inline-(start|end)
771
771
  case 4095:
772
772
  case 3583:
773
773
  case 4068:
774
774
  case 2532:
775
- return S(e, /(.+)-inline(.+)/, _ + "$1$2") + e;
775
+ return S(e, /(.+)-inline(.+)/, I + "$1$2") + e;
776
776
  // (min|max)?(width|height|inline-size|block-size)
777
777
  case 8116:
778
778
  case 7059:
@@ -786,13 +786,13 @@ function yt(e, t) {
786
786
  case 5789:
787
787
  case 5021:
788
788
  case 4765:
789
- if (ie(e) - 1 - t > 6) switch (Y(e, t + 1)) {
789
+ if (ie(e) - 1 - t > 6) switch (q(e, t + 1)) {
790
790
  // (m)ax-content, (m)in-content
791
791
  case 109:
792
- if (Y(e, t + 4) !== 45) break;
792
+ if (q(e, t + 4) !== 45) break;
793
793
  // (f)ill-available, (f)it-content
794
794
  case 102:
795
- return S(e, /(.+:)(.+)-([^]+)/, "$1" + _ + "$2-$3$1" + Ae + (Y(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
795
+ return S(e, /(.+:)(.+)-([^]+)/, "$1" + I + "$2-$3$1" + Ae + (q(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
796
796
  // (s)tretch
797
797
  case 115:
798
798
  return ~De(e, "stretch") ? yt(S(e, "stretch", "fill-available"), t) + e : e;
@@ -800,32 +800,32 @@ function yt(e, t) {
800
800
  break;
801
801
  // position: sticky
802
802
  case 4949:
803
- if (Y(e, t + 1) !== 115) break;
803
+ if (q(e, t + 1) !== 115) break;
804
804
  // display: (flex|inline-flex)
805
805
  case 6444:
806
- switch (Y(e, ie(e) - 3 - (~De(e, "!important") && 10))) {
806
+ switch (q(e, ie(e) - 3 - (~De(e, "!important") && 10))) {
807
807
  // stic(k)y
808
808
  case 107:
809
- return S(e, ":", ":" + _) + e;
809
+ return S(e, ":", ":" + I) + e;
810
810
  // (inline-)?fl(e)x
811
811
  case 101:
812
- return S(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + _ + (Y(e, 14) === 45 ? "inline-" : "") + "box$3$1" + _ + "$2$3$1" + q + "$2box$3") + e;
812
+ return S(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + I + (q(e, 14) === 45 ? "inline-" : "") + "box$3$1" + I + "$2$3$1" + H + "$2box$3") + e;
813
813
  }
814
814
  break;
815
815
  // writing-mode
816
816
  case 5936:
817
- switch (Y(e, t + 11)) {
817
+ switch (q(e, t + 11)) {
818
818
  // vertical-l(r)
819
819
  case 114:
820
- return _ + e + q + S(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
820
+ return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
821
821
  // vertical-r(l)
822
822
  case 108:
823
- return _ + e + q + S(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
823
+ return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
824
824
  // horizontal(-)tb
825
825
  case 45:
826
- return _ + e + q + S(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
826
+ return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
827
827
  }
828
- return _ + e + q + e + e;
828
+ return I + e + H + e + e;
829
829
  }
830
830
  return e;
831
831
  }
@@ -836,7 +836,7 @@ var Qt = function(t, r, n, a) {
836
836
  break;
837
837
  case ut:
838
838
  return pe([be(t, {
839
- value: S(t.value, "@", "@" + _)
839
+ value: S(t.value, "@", "@" + I)
840
840
  })], a);
841
841
  case ze:
842
842
  if (t.length) return Vt(t.props, function(i) {
@@ -850,11 +850,11 @@ var Qt = function(t, r, n, a) {
850
850
  // :placeholder
851
851
  case "::placeholder":
852
852
  return pe([be(t, {
853
- props: [S(i, /:(plac\w+)/, ":" + _ + "input-$1")]
853
+ props: [S(i, /:(plac\w+)/, ":" + I + "input-$1")]
854
854
  }), be(t, {
855
855
  props: [S(i, /:(plac\w+)/, ":" + Ae + "$1")]
856
856
  }), be(t, {
857
- props: [S(i, /:(plac\w+)/, q + "input-$1")]
857
+ props: [S(i, /:(plac\w+)/, H + "input-$1")]
858
858
  })], a);
859
859
  }
860
860
  return "";
@@ -865,8 +865,8 @@ var Qt = function(t, r, n, a) {
865
865
  if (r === "css") {
866
866
  var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
867
867
  Array.prototype.forEach.call(n, function(d) {
868
- var y = d.getAttribute("data-emotion");
869
- y.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
868
+ var m = d.getAttribute("data-emotion");
869
+ m.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
870
870
  });
871
871
  }
872
872
  var a = t.stylisPlugins || er, i = {}, o, c = [];
@@ -875,25 +875,25 @@ var Qt = function(t, r, n, a) {
875
875
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
876
876
  document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
877
877
  function(d) {
878
- for (var y = d.getAttribute("data-emotion").split(" "), v = 1; v < y.length; v++)
879
- i[y[v]] = !0;
878
+ for (var m = d.getAttribute("data-emotion").split(" "), v = 1; v < m.length; v++)
879
+ i[m[v]] = !0;
880
880
  c.push(d);
881
881
  }
882
882
  );
883
- var u, m = [Kt, Zt];
883
+ var u, h = [Kt, Zt];
884
884
  {
885
- var l, p = [Yt, Gt(function(d) {
885
+ var l, f = [Yt, Gt(function(d) {
886
886
  l.insert(d);
887
- })], w = qt(m.concat(a, p)), k = function(y) {
888
- return pe(zt(y), w);
887
+ })], w = qt(h.concat(a, f)), k = function(m) {
888
+ return pe(zt(m), w);
889
889
  };
890
- u = function(y, v, E, A) {
891
- l = E, k(y ? y + "{" + v.styles + "}" : v.styles), A && (g.inserted[v.name] = !0);
890
+ u = function(m, v, E, O) {
891
+ l = E, k(m ? m + "{" + v.styles + "}" : v.styles), O && (g.inserted[v.name] = !0);
892
892
  };
893
893
  }
894
894
  var g = {
895
895
  key: r,
896
- sheet: new Ct({
896
+ sheet: new Rt({
897
897
  key: r,
898
898
  container: o,
899
899
  nonce: t.nonce,
@@ -1059,8 +1059,8 @@ function Pe(e, t, r) {
1059
1059
  }
1060
1060
  case "function": {
1061
1061
  if (e !== void 0) {
1062
- var u = oe, m = r(e);
1063
- return oe = u, Pe(e, t, m);
1062
+ var u = oe, h = r(e);
1063
+ return oe = u, Pe(e, t, h);
1064
1064
  }
1065
1065
  break;
1066
1066
  }
@@ -1068,8 +1068,8 @@ function Pe(e, t, r) {
1068
1068
  var l = r;
1069
1069
  if (t == null)
1070
1070
  return l;
1071
- var p = t[l];
1072
- return p !== void 0 ? p : l;
1071
+ var f = t[l];
1072
+ return f !== void 0 ? f : l;
1073
1073
  }
1074
1074
  function lr(e, t, r) {
1075
1075
  var n = "";
@@ -1086,15 +1086,15 @@ function lr(e, t, r) {
1086
1086
  for (var u = 0; u < o.length; u++)
1087
1087
  et(o[u]) && (n += Ne(i) + ":" + tt(i, o[u]) + ";");
1088
1088
  else {
1089
- var m = Pe(e, t, o);
1089
+ var h = Pe(e, t, o);
1090
1090
  switch (i) {
1091
1091
  case "animation":
1092
1092
  case "animationName": {
1093
- n += Ne(i) + ":" + m + ";";
1093
+ n += Ne(i) + ":" + h + ";";
1094
1094
  break;
1095
1095
  }
1096
1096
  default:
1097
- n += i + "{" + m + "}";
1097
+ n += i + "{" + h + "}";
1098
1098
  }
1099
1099
  }
1100
1100
  }
@@ -1119,11 +1119,11 @@ function ur(e, t, r) {
1119
1119
  a += u[c];
1120
1120
  }
1121
1121
  rt.lastIndex = 0;
1122
- for (var m = "", l; (l = rt.exec(a)) !== null; )
1123
- m += "-" + l[1];
1124
- var p = ir(a) + m;
1122
+ for (var h = "", l; (l = rt.exec(a)) !== null; )
1123
+ h += "-" + l[1];
1124
+ var f = ir(a) + h;
1125
1125
  return {
1126
- name: p,
1126
+ name: f,
1127
1127
  styles: a,
1128
1128
  next: oe
1129
1129
  };
@@ -1176,46 +1176,46 @@ var hr = function(t) {
1176
1176
  }, wr = function e(t, r) {
1177
1177
  var n = t.__emotion_real === t, a = n && t.__emotion_base || t, i, o;
1178
1178
  r !== void 0 && (i = r.label, o = r.target);
1179
- var c = at(t, r, n), u = c || nt(a), m = !u("as");
1179
+ var c = at(t, r, n), u = c || nt(a), h = !u("as");
1180
1180
  return function() {
1181
- var l = arguments, p = n && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
1182
- if (i !== void 0 && p.push("label:" + i + ";"), l[0] == null || l[0].raw === void 0)
1183
- p.push.apply(p, l);
1181
+ var l = arguments, f = n && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
1182
+ if (i !== void 0 && f.push("label:" + i + ";"), l[0] == null || l[0].raw === void 0)
1183
+ f.push.apply(f, l);
1184
1184
  else {
1185
1185
  var w = l[0];
1186
- p.push(w[0]);
1186
+ f.push(w[0]);
1187
1187
  for (var k = l.length, g = 1; g < k; g++)
1188
- p.push(l[g], w[g]);
1188
+ f.push(l[g], w[g]);
1189
1189
  }
1190
- var d = hr(function(y, v, E) {
1191
- var A = m && y.as || a, T = "", O = [], j = y;
1192
- if (y.theme == null) {
1193
- j = {};
1194
- for (var f in y)
1195
- j[f] = y[f];
1196
- j.theme = le.useContext(mr);
1190
+ var d = hr(function(m, v, E) {
1191
+ var O = h && m.as || a, T = "", j = [], $ = m;
1192
+ if (m.theme == null) {
1193
+ $ = {};
1194
+ for (var y in m)
1195
+ $[y] = m[y];
1196
+ $.theme = le.useContext(mr);
1197
1197
  }
1198
- typeof y.className == "string" ? T = nr(v.registered, O, y.className) : y.className != null && (T = y.className + " ");
1199
- var G = ur(p.concat(O), v.registered, j);
1198
+ typeof m.className == "string" ? T = nr(v.registered, j, m.className) : m.className != null && (T = m.className + " ");
1199
+ var G = ur(f.concat(j), v.registered, $);
1200
1200
  T += v.key + "-" + G.name, o !== void 0 && (T += " " + o);
1201
- var P = m && c === void 0 ? nt(A) : u, N = {};
1202
- for (var z in y)
1203
- m && z === "as" || P(z) && (N[z] = y[z]);
1204
- return N.className = T, E && (N.ref = E), /* @__PURE__ */ le.createElement(le.Fragment, null, /* @__PURE__ */ le.createElement(xr, {
1201
+ var V = h && c === void 0 ? nt(O) : u, P = {};
1202
+ for (var U in m)
1203
+ h && U === "as" || V(U) && (P[U] = m[U]);
1204
+ return P.className = T, E && (P.ref = E), /* @__PURE__ */ le.createElement(le.Fragment, null, /* @__PURE__ */ le.createElement(xr, {
1205
1205
  cache: v,
1206
1206
  serialized: G,
1207
- isStringTag: typeof A == "string"
1208
- }), /* @__PURE__ */ le.createElement(A, N));
1207
+ isStringTag: typeof O == "string"
1208
+ }), /* @__PURE__ */ le.createElement(O, P));
1209
1209
  });
1210
- return d.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", d.defaultProps = t.defaultProps, d.__emotion_real = d, d.__emotion_base = a, d.__emotion_styles = p, d.__emotion_forwardProp = c, Object.defineProperty(d, "toString", {
1210
+ return d.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", d.defaultProps = t.defaultProps, d.__emotion_real = d, d.__emotion_base = a, d.__emotion_styles = f, d.__emotion_forwardProp = c, Object.defineProperty(d, "toString", {
1211
1211
  value: function() {
1212
1212
  return "." + o;
1213
1213
  }
1214
- }), d.withComponent = function(y, v) {
1215
- var E = e(y, Be({}, r, v, {
1214
+ }), d.withComponent = function(m, v) {
1215
+ var E = e(m, Be({}, r, v, {
1216
1216
  shouldForwardProp: at(d, v, !0)
1217
1217
  }));
1218
- return E.apply(void 0, p);
1218
+ return E.apply(void 0, f);
1219
1219
  }, d;
1220
1220
  };
1221
1221
  }, kr = [
@@ -1399,7 +1399,7 @@ const Er = me.div`
1399
1399
  return "";
1400
1400
  }
1401
1401
  }}
1402
- `, Me = ({ type: e, children: t, className: r, icon: n, action: a }) => M.jsxs(Er, { type: e, className: r, children: [n && M.jsx("span", { children: n }), M.jsx("span", { children: t }), a && M.jsx("span", { children: a })] }), it = me.div`
1402
+ `, Me = ({ type: e, children: t, className: r, icon: n, action: a }) => W.jsxs(Er, { type: e, className: r, children: [n && W.jsx("span", { children: n }), W.jsx("span", { children: t }), a && W.jsx("span", { children: a })] }), it = me.div`
1403
1403
  width: ${({ width: e }) => e || "100%"};
1404
1404
  height: ${({ height: e }) => e || "100%"};
1405
1405
  border-radius: 0px !important; /* Force remove rounded corners on container */
@@ -1425,24 +1425,19 @@ const Er = me.div`
1425
1425
  pointer-events: auto;
1426
1426
  `, _r = me.div`
1427
1427
  position: relative;
1428
- width: min(360px, 100%);
1429
- max-width: 360px;
1428
+ max-width: 100vw;
1430
1429
  aspect-ratio: 9 / 16;
1431
1430
  height: auto;
1432
1431
  z-index: 1001;
1433
-
1434
- @media (max-width: 420px) {
1435
- width: 100%;
1436
- max-width: 100%;
1437
- }
1438
- `, Sr = (e, t) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`, ot = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`, Tr = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`, Rr = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, qe = (e, t) => `vp-player-${e || "default"}-${t || ""}`, Ve = /* @__PURE__ */ new Map(), Cr = (e, t) => {
1432
+ max-height: 100vh;
1433
+ `, Ir = (e, t) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`, ot = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`, Sr = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`, Tr = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, qe = (e, t) => `vp-player-${e || "default"}-${t || ""}`, Ve = /* @__PURE__ */ new Map(), Rr = (e, t) => {
1439
1434
  const [r, n] = ne(!1), [a, i] = ne(null);
1440
1435
  return we(() => {
1441
1436
  let o = null, c, u = 0;
1442
- const m = 3;
1437
+ const h = 3;
1443
1438
  let l;
1444
1439
  try {
1445
- l = t || Rr(e || "latest");
1440
+ l = t || Tr(e || "latest");
1446
1441
  } catch (k) {
1447
1442
  const g = k instanceof Error ? k.message : String(k);
1448
1443
  i(`Failed to resolve script URL: ${g}`), n(!1);
@@ -1462,15 +1457,15 @@ const Er = me.div`
1462
1457
  }, 1e4), o.onload = () => {
1463
1458
  clearTimeout(c), Ve.set(l, !0), n(!0), i(null);
1464
1459
  }, o.onerror = () => {
1465
- clearTimeout(c), u++, u < m ? setTimeout(w, 1e3 * u) : (n(!1), i(`Failed to load VP Player script after ${m} attempts: ${l}`));
1460
+ clearTimeout(c), u++, u < h ? setTimeout(w, 1e3 * u) : (n(!1), i(`Failed to load VP Player script after ${h} attempts: ${l}`));
1466
1461
  }, document.body.appendChild(o);
1467
1462
  };
1468
1463
  return w(), () => {
1469
1464
  clearTimeout(c), o && document.body.contains(o) && document.body.removeChild(o);
1470
1465
  };
1471
1466
  }, [e, t]), { isLoaded: r, error: a };
1472
- }, Ir = {}, xe = /* @__PURE__ */ new Map(), Ar = 3e4, Le = 5, Or = ({ projectId: e, videoId: t, playlistId: r, videoUrl: n, apiKey: a }) => {
1473
- const [i, o] = ne(null), [c, u] = ne(null), [m, l] = ne(!1), [p, w] = ne(null), k = a || (typeof Ir < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
1467
+ }, Cr = {}, xe = /* @__PURE__ */ new Map(), Ar = 3e4, Le = 5, Or = ({ projectId: e, videoId: t, playlistId: r, videoUrl: n, apiKey: a }) => {
1468
+ const [i, o] = ne(null), [c, u] = ne(null), [h, l] = ne(!1), [f, w] = ne(null), k = a || (typeof Cr < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
1474
1469
  return we(() => {
1475
1470
  const g = t ? `video:${t}` : r ? `playlist:${r}` : null;
1476
1471
  if (!e || n || !t && !r) {
@@ -1487,15 +1482,15 @@ const Er = me.div`
1487
1482
  return;
1488
1483
  }
1489
1484
  let d = !0;
1490
- const y = new AbortController(), v = y.signal, A = setTimeout(async () => {
1491
- var O, j, f, G;
1485
+ const m = new AbortController(), v = m.signal, O = setTimeout(async () => {
1486
+ var j, $, y, G;
1492
1487
  if (!d)
1493
1488
  return;
1494
1489
  l(!0), w(null);
1495
1490
  let T = 0;
1496
1491
  for (; T < Le && d; )
1497
1492
  try {
1498
- const P = t && !r ? Sr(e, t) : ot(e, r), N = setTimeout(() => y.abort(), Ar), z = await fetch(P, {
1493
+ const V = t && !r ? Ir(e, t) : ot(e, r), P = setTimeout(() => m.abort(), Ar), U = await fetch(V, {
1499
1494
  method: "GET",
1500
1495
  headers: {
1501
1496
  "api-key": k,
@@ -1505,20 +1500,20 @@ const Er = me.div`
1505
1500
  },
1506
1501
  signal: v
1507
1502
  });
1508
- if (clearTimeout(N), !z.ok)
1509
- throw new Error(`Fetch failed with status ${z.status}`);
1510
- const B = await z.json();
1503
+ if (clearTimeout(P), !U.ok)
1504
+ throw new Error(`Fetch failed with status ${U.status}`);
1505
+ const _ = await U.json();
1511
1506
  if (!d)
1512
1507
  return;
1513
1508
  if (t && !r) {
1514
- const X = (j = (O = B.result) == null ? void 0 : O.items) == null ? void 0 : j.find((L) => L.mediaId === t);
1515
- if (!(X != null && X.playbackUrl))
1509
+ const M = ($ = (j = _.result) == null ? void 0 : j.items) == null ? void 0 : $.find((F) => F.mediaId === t);
1510
+ if (!(M != null && M.playbackUrl))
1516
1511
  throw new Error("Invalid video data");
1517
- o(X.playbackUrl), u(null), g && xe.set(g, { url: X.playbackUrl, playlist: null });
1512
+ o(M.playbackUrl), u(null), g && xe.set(g, { url: M.playbackUrl, playlist: null });
1518
1513
  } else {
1519
- if (!Array.isArray(B.result))
1514
+ if (!Array.isArray(_.result))
1520
1515
  throw new Error("Invalid playlist format");
1521
- const X = Tr(e, r), L = await fetch(X, {
1516
+ const M = Sr(e, r), F = await fetch(M, {
1522
1517
  method: "GET",
1523
1518
  headers: {
1524
1519
  "api-key": k,
@@ -1527,11 +1522,11 @@ const Er = me.div`
1527
1522
  },
1528
1523
  signal: v
1529
1524
  });
1530
- if (L.ok) {
1531
- const U = await L.json();
1532
- let Q = [...B.result];
1533
- if ((f = U.result) != null && f.playlistBackupState && ((G = U.result) != null && G.playlistBackupId)) {
1534
- const H = ot(e, U.result.playlistBackupId), te = await fetch(H, {
1525
+ if (F.ok) {
1526
+ const z = await F.json();
1527
+ let Q = [..._.result];
1528
+ if ((y = z.result) != null && y.playlistBackupState && ((G = z.result) != null && G.playlistBackupId)) {
1529
+ const X = ot(e, z.result.playlistBackupId), te = await fetch(X, {
1535
1530
  method: "GET",
1536
1531
  headers: {
1537
1532
  "api-key": k,
@@ -1553,26 +1548,26 @@ const Er = me.div`
1553
1548
  }
1554
1549
  u(Q), o(null), g && xe.set(g, { url: null, playlist: Q });
1555
1550
  } else
1556
- u(B.result), o(null), g && xe.set(g, { url: null, playlist: B.result });
1551
+ u(_.result), o(null), g && xe.set(g, { url: null, playlist: _.result });
1557
1552
  }
1558
1553
  break;
1559
- } catch (P) {
1554
+ } catch (V) {
1560
1555
  if (v.aborted) {
1561
1556
  d && w("Request timed out");
1562
1557
  break;
1563
1558
  }
1564
1559
  if (T++, T >= Le) {
1565
- const N = P instanceof Error ? P.message : String(P);
1566
- d && w(`Failed after ${Le} attempts: ${N}`);
1560
+ const P = V instanceof Error ? V.message : String(V);
1561
+ d && w(`Failed after ${Le} attempts: ${P}`);
1567
1562
  } else
1568
- await new Promise((N) => setTimeout(N, 2e3));
1563
+ await new Promise((P) => setTimeout(P, 2e3));
1569
1564
  }
1570
1565
  d && l(!1);
1571
1566
  }, 100);
1572
1567
  return () => {
1573
- d = !1, clearTimeout(A), y.abort();
1568
+ d = !1, clearTimeout(O), m.abort();
1574
1569
  };
1575
- }, [k, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist: c, isLoading: m, error: p };
1570
+ }, [k, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist: c, isLoading: h, error: f };
1576
1571
  }, jr = {
1577
1572
  projectId: "vp-player-projectId",
1578
1573
  video: {
@@ -1629,14 +1624,13 @@ const Er = me.div`
1629
1624
  }, $r = ({
1630
1625
  videoUrl: e,
1631
1626
  fetchedPlaybackUrl: t,
1632
- // fetchedPlaylist,
1633
1627
  fetchedPlaylist: r,
1634
1628
  projectId: n,
1635
1629
  config: a = {},
1636
1630
  isVerticalPlayer: i
1637
1631
  // Distinguish between VP Player types
1638
1632
  }) => {
1639
- var l, p, w, k, g, d, y, v, E, A, T, O, j;
1633
+ var l, f, w, k, g, d, m, v, E, O, T, j, $, y, G, V;
1640
1634
  const o = { ...jr, ...a }, c = { ...o.config, ...a.config };
1641
1635
  if (e)
1642
1636
  return {
@@ -1659,30 +1653,32 @@ const Er = me.div`
1659
1653
  config: c
1660
1654
  };
1661
1655
  if (r && r.length > 0) {
1662
- const f = ((p = (l = a == null ? void 0 : a.video) == null ? void 0 : l.playlist) == null ? void 0 : p.playlistVideoIndex) ?? ((w = a == null ? void 0 : a.config) == null ? void 0 : w.playlistVideoIndex) ?? 0;
1656
+ const P = ((f = (l = a == null ? void 0 : a.video) == null ? void 0 : l.playlist) == null ? void 0 : f.playlistVideoIndex) ?? ((w = a == null ? void 0 : a.config) == null ? void 0 : w.playlistVideoIndex) ?? 0;
1663
1657
  return i ? {
1664
1658
  ...o,
1665
1659
  projectId: n || "vp-player-projectId",
1666
1660
  video: {
1667
1661
  ...o.video,
1668
1662
  // Set first video file (index 0) to avoid VP Player duplication
1669
- file: (k = r[0]) == null ? void 0 : k.hlsUrl,
1670
- title: (g = r[0]) == null ? void 0 : g.title,
1663
+ videoId: (k = r[0]) == null ? void 0 : k.mediaId,
1664
+ // Add videoId for tracking
1665
+ file: (g = r[0]) == null ? void 0 : g.hlsUrl,
1666
+ title: (d = r[0]) == null ? void 0 : d.title,
1671
1667
  // thumbnail: fetchedPlaylist[0]?.thumbnailUrl,
1672
1668
  playlist: {
1673
1669
  state: !0,
1674
1670
  playlistId: "",
1675
1671
  // Will be set by API
1676
1672
  // Use original playlistVideoIndex - VP Player will navigate to it
1677
- playlistVideoIndex: Number(f),
1673
+ playlistVideoIndex: Number(P),
1678
1674
  // Remove first video from playlist to avoid duplication (already in file)
1679
- videos: r.slice(1).map((P, N) => ({
1680
- videoId: String(N + 1),
1681
- // Keep original IDs
1682
- title: P.title,
1683
- file: P.hlsUrl,
1684
- thumbnailUrl: P.thumbnailUrl,
1685
- duration: P.duration
1675
+ videos: r.slice(1).map((_, M) => ({
1676
+ videoId: _.mediaId || String(M + 1),
1677
+ // Use mediaId if available
1678
+ title: _.title,
1679
+ file: _.hlsUrl,
1680
+ thumbnailUrl: _.thumbnailUrl,
1681
+ duration: _.duration
1686
1682
  }))
1687
1683
  }
1688
1684
  },
@@ -1692,44 +1688,47 @@ const Er = me.div`
1692
1688
  projectId: n || "vp-player-projectId",
1693
1689
  video: {
1694
1690
  ...o.video,
1695
- file: ((d = r[Number(f)]) == null ? void 0 : d.hlsUrl) || ((y = r[0]) == null ? void 0 : y.hlsUrl) || "",
1696
- title: ((v = r[Number(f)]) == null ? void 0 : v.title) || ((E = r[0]) == null ? void 0 : E.title),
1697
- thumbnail: ((A = r[Number(f)]) == null ? void 0 : A.thumbnailUrl) || ((T = r[0]) == null ? void 0 : T.thumbnailUrl),
1691
+ videoId: ((m = r[Number(P)]) == null ? void 0 : m.mediaId) || ((v = r[0]) == null ? void 0 : v.mediaId),
1692
+ // Add videoId for tracking
1693
+ file: ((E = r[Number(P)]) == null ? void 0 : E.hlsUrl) || ((O = r[0]) == null ? void 0 : O.hlsUrl) || "",
1694
+ title: ((T = r[Number(P)]) == null ? void 0 : T.title) || ((j = r[0]) == null ? void 0 : j.title),
1695
+ thumbnail: (($ = r[Number(P)]) == null ? void 0 : $.thumbnailUrl) || ((y = r[0]) == null ? void 0 : y.thumbnailUrl),
1698
1696
  playlist: {
1699
1697
  state: !0,
1700
1698
  // playlistVideoIndex: String(userPlaylistVideoIndex), this has been bug, fixed, now int
1701
- playlistVideoIndex: Number(f),
1702
- videos: r.map((P, N) => ({
1703
- videoId: String(N),
1704
- title: P.title,
1705
- file: P.hlsUrl,
1706
- thumbnailUrl: P.thumbnailUrl,
1707
- duration: P.duration
1699
+ playlistVideoIndex: Number(P),
1700
+ videos: r.map((_, M) => ({
1701
+ videoId: _.mediaId || String(M),
1702
+ // Use mediaId if available
1703
+ title: _.title,
1704
+ file: _.hlsUrl,
1705
+ thumbnailUrl: _.thumbnailUrl,
1706
+ duration: _.duration
1708
1707
  }))
1709
1708
  }
1710
1709
  },
1711
1710
  config: c
1712
1711
  };
1713
1712
  }
1714
- const u = ((O = a == null ? void 0 : a.video) == null ? void 0 : O.playlist) || o.video.playlist, m = (j = a == null ? void 0 : a.video) == null ? void 0 : j.file;
1715
- if (m)
1713
+ const u = ((G = a == null ? void 0 : a.video) == null ? void 0 : G.playlist) || o.video.playlist, h = (V = a == null ? void 0 : a.video) == null ? void 0 : V.file;
1714
+ if (h)
1716
1715
  return {
1717
1716
  ...o,
1718
1717
  video: {
1719
1718
  ...o.video,
1720
- file: m,
1719
+ file: h,
1721
1720
  playlist: void 0
1722
1721
  // No playlist, just one video
1723
1722
  },
1724
1723
  config: c
1725
1724
  };
1726
1725
  if (u != null && u.videos && u.videos.length > 0) {
1727
- const f = u.videos[Number(u.playlistVideoIndex) || 0];
1726
+ const P = u.videos[Number(u.playlistVideoIndex) || 0];
1728
1727
  return {
1729
1728
  ...o,
1730
1729
  video: {
1731
1730
  ...o.video,
1732
- file: (f == null ? void 0 : f.file) || "",
1731
+ file: (P == null ? void 0 : P.file) || "",
1733
1732
  playlist: {
1734
1733
  ...u,
1735
1734
  state: u.state ?? !0,
@@ -1750,179 +1749,179 @@ const Er = me.div`
1750
1749
  return;
1751
1750
  const t = /https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/, r = e.match(t);
1752
1751
  return r ? r[2] : void 0;
1753
- }, Vr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels: m = !1, onPlaylistData: l, onVideoStarted: p }) => {
1754
- const w = de(null), k = de(null), g = de(!1), d = de(""), y = de([]), v = de([]), E = de(null), { isLoaded: A, error: T } = Cr(r, o), O = t || Nr(o), [j, f] = ne(null), { fetchedPlaybackUrl: G, fetchedPlaylist: P, isLoading: N, error: z } = Or({
1752
+ }, Vr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels: h = !1, onPlaylistData: l, onVideoStarted: f }) => {
1753
+ const w = de(null), k = de(null), g = de(!1), d = de(""), m = de([]), v = de([]), E = de(null), { isLoaded: O, error: T } = Rr(r, o), j = t || Nr(o), [$, y] = ne(null), { fetchedPlaybackUrl: G, fetchedPlaylist: V, isLoading: P, error: U } = Or({
1755
1754
  projectId: a,
1756
- videoId: O,
1755
+ videoId: j,
1757
1756
  playlistId: i,
1758
1757
  videoUrl: n,
1759
1758
  apiKey: u
1760
- }), B = qe(e, O);
1759
+ }), _ = qe(e, j);
1761
1760
  we(() => {
1762
- P && l && l(P);
1763
- }, [P, l]);
1764
- const X = ct(() => {
1765
- const L = c.config || {}, U = m && !L.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : L.size || { sizeType: "FIXED", width: "100%" };
1761
+ V && l && l(V);
1762
+ }, [V, l]);
1763
+ const M = ct(() => {
1764
+ const F = c.config || {}, z = h && !F.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : F.size || { sizeType: "FIXED", width: "100%" };
1766
1765
  return {
1767
1766
  ...c,
1768
1767
  config: {
1769
- ...L,
1770
- size: U
1768
+ ...F,
1769
+ size: z
1771
1770
  }
1772
1771
  };
1773
- }, [c, m]);
1772
+ }, [c, h]);
1774
1773
  return we(() => {
1775
1774
  if (T) {
1776
- f(T);
1775
+ y(T);
1777
1776
  return;
1778
1777
  }
1779
- if (!A || N && !n)
1778
+ if (!O || P && !n)
1780
1779
  return;
1781
- let L = !0;
1780
+ let F = !0;
1782
1781
  const Q = setTimeout(async () => {
1783
1782
  try {
1784
- y.current.forEach((V) => clearInterval(V)), y.current = [], v.current.forEach((V) => clearTimeout(V)), v.current = [], E.current = null;
1785
- const H = (P == null ? void 0 : P.length) ?? 0, te = JSON.stringify({
1786
- playerId: B,
1787
- videoId: t || O,
1783
+ m.current.forEach((L) => clearInterval(L)), m.current = [], v.current.forEach((L) => clearTimeout(L)), v.current = [], E.current = null;
1784
+ const X = (V == null ? void 0 : V.length) ?? 0, te = JSON.stringify({
1785
+ playerId: _,
1786
+ videoId: t || j,
1788
1787
  playlistId: i,
1789
1788
  videoUrl: n,
1790
1789
  fetchedPlaybackUrl: G,
1791
1790
  scriptUrl: o,
1792
- isReels: m,
1791
+ isReels: h,
1793
1792
  projectId: a,
1794
- playlistLength: H
1793
+ playlistLength: X
1795
1794
  });
1796
1795
  if (g.current && k.current && d.current === te)
1797
1796
  return;
1798
1797
  d.current !== te && (g.current = !1, d.current = te);
1799
1798
  const re = o == null ? void 0 : o.includes("vertical-player");
1800
- if (document.querySelectorAll('[id*="player"]').forEach((V) => {
1801
- var ae, h;
1802
- const ee = V.id;
1803
- if (ee !== B)
1799
+ if (document.querySelectorAll('[id*="player"]').forEach((L) => {
1800
+ var ae, p;
1801
+ const ee = L.id;
1802
+ if (ee !== _)
1804
1803
  try {
1805
- const b = re ? (ae = window.vpVerticalPlayer) == null ? void 0 : ae.call(window, ee) : (h = window.vpPlayer) == null ? void 0 : h.call(window, ee);
1804
+ const b = re ? (ae = window.vpVerticalPlayer) == null ? void 0 : ae.call(window, ee) : (p = window.vpPlayer) == null ? void 0 : p.call(window, ee);
1806
1805
  b != null && b.destroy && b.destroy();
1807
1806
  } catch (b) {
1808
1807
  console.warn(`Failed to destroy existing player ${ee}:`, b);
1809
1808
  }
1810
- }), await new Promise((V) => setTimeout(V, 100)), !L || !w.current)
1809
+ }), await new Promise((L) => setTimeout(L, 100)), !F || !w.current)
1811
1810
  return;
1812
- if (!document.getElementById(B)) {
1813
- f("DOM element not found after cleanup.");
1811
+ if (!document.getElementById(_)) {
1812
+ y("DOM element not found after cleanup.");
1814
1813
  return;
1815
1814
  }
1816
1815
  if (!window.vpPlayer && !window.vpVerticalPlayer) {
1817
- f("VP Player script not loaded.");
1816
+ y("VP Player script not loaded.");
1818
1817
  return;
1819
1818
  }
1820
- const $ = re ? window.vpVerticalPlayer : window.vpPlayer;
1821
- if (!$) {
1822
- f(`VP ${re ? "Vertical " : ""}Player script not loaded.`);
1819
+ const N = re ? window.vpVerticalPlayer : window.vpPlayer;
1820
+ if (!N) {
1821
+ y(`VP ${re ? "Vertical " : ""}Player script not loaded.`);
1823
1822
  return;
1824
1823
  }
1825
- const F = $r({
1824
+ const B = $r({
1826
1825
  videoUrl: n,
1827
1826
  fetchedPlaybackUrl: G ?? void 0,
1828
- fetchedPlaylist: P ?? void 0,
1827
+ fetchedPlaylist: V ?? void 0,
1829
1828
  projectId: a,
1830
- config: X,
1829
+ config: M,
1831
1830
  isVerticalPlayer: re
1832
1831
  // Pass player type to config builder
1833
- }), I = $(B);
1834
- if (!I) {
1835
- f(`Failed to create VP ${re ? "Vertical " : ""}Player instance.`);
1832
+ }), A = N(_);
1833
+ if (!A) {
1834
+ y(`Failed to create VP ${re ? "Vertical " : ""}Player instance.`);
1836
1835
  return;
1837
1836
  }
1838
- if (L && w.current && (I.setup(F), k.current = I, g.current = !0, f(null), p && I.on)) {
1839
- const V = () => {
1837
+ if (F && w.current && (A.setup(B), k.current = A, g.current = !0, y(null), f && A.on)) {
1838
+ const L = () => {
1840
1839
  var b;
1841
- const h = {};
1842
- if (P && P.length > 0) {
1843
- const R = I.videoIndex ?? ((b = I.playlist) == null ? void 0 : b.playlistVideoIndex) ?? 0, C = P[R];
1844
- C && (h.title = C.title, h.hlsUrl = C.hlsUrl, h.file = C.hlsUrl, h.thumbnailUrl = C.thumbnailUrl, h.duration = C.duration, h.videoIndex = R, h.playlistVideoIndex = R, h.isBackupPlaylist = C.isBackupPlaylist, h.mediaId = C.mediaId, h.videoId = C.mediaId || C.videoId);
1845
- } else F.video && (h.title = F.video.title, h.file = F.video.file, h.hlsUrl = F.video.file, h.thumbnailUrl = F.video.thumbnail, h.videoId = t || O, h.videoIndex = 0, h.playlistVideoIndex = 0, I.getDuration && (h.duration = I.getDuration()));
1846
- return h;
1840
+ const p = {};
1841
+ if (V && V.length > 0) {
1842
+ const R = A.videoIndex ?? ((b = A.playlist) == null ? void 0 : b.playlistVideoIndex) ?? 0, C = V[R];
1843
+ C && (p.title = C.title, p.hlsUrl = C.hlsUrl, p.file = C.hlsUrl, p.thumbnailUrl = C.thumbnailUrl, p.duration = C.duration, p.videoIndex = R, p.playlistVideoIndex = R, p.isBackupPlaylist = C.isBackupPlaylist, p.mediaId = C.mediaId, p.videoId = C.mediaId || C.videoId);
1844
+ } else B.video && (p.title = B.video.title, p.file = B.video.file, p.hlsUrl = B.video.file, p.thumbnailUrl = B.video.thumbnail, p.videoId = t || j, p.videoIndex = 0, p.playlistVideoIndex = 0, A.getDuration && (p.duration = A.getDuration()));
1845
+ return p;
1847
1846
  };
1848
1847
  let ee = null;
1849
1848
  const ae = async () => {
1850
- var h;
1849
+ var p;
1851
1850
  try {
1852
1851
  ee && clearTimeout(ee), await new Promise((C) => setTimeout(C, 100));
1853
- let b = V();
1852
+ let b = L();
1854
1853
  const R = b.videoId || b.mediaId;
1855
1854
  if (R && R === E.current)
1856
1855
  return;
1857
1856
  if (ee = window.setTimeout(() => {
1858
1857
  E.current = null;
1859
- }, 500), m && R)
1858
+ }, 500), h && R)
1860
1859
  try {
1861
1860
  const ce = `https://host.vpplayer.tech/player/ptkzurnx/${R}.json`, ue = await fetch(ce);
1862
1861
  if (ue.ok) {
1863
- const W = await ue.json();
1864
- W && W.video && (b = {
1862
+ const Y = await ue.json();
1863
+ Y && Y.video && (b = {
1865
1864
  ...b,
1866
- title: W.video.title || b.title,
1867
- description: W.video.description,
1868
- publishDate: W.video.publishDate,
1869
- projectId: W.projectId || b.projectId,
1870
- premium: ((h = W.video.videoLocking) == null ? void 0 : h.isEnabled) || !1,
1871
- author: W.video.author,
1872
- tags: W.video.tags || []
1865
+ title: Y.video.title || b.title,
1866
+ description: Y.video.description,
1867
+ publishDate: Y.video.publishDate,
1868
+ projectId: Y.projectId || b.projectId,
1869
+ premium: ((p = Y.video.videoLocking) == null ? void 0 : p.isEnabled) || !1,
1870
+ author: Y.video.author,
1871
+ tags: Y.video.tags || []
1873
1872
  });
1874
1873
  }
1875
1874
  } catch {
1876
1875
  }
1877
- E.current = R || null, p(b);
1876
+ E.current = R || null, f(b);
1878
1877
  } catch (b) {
1879
1878
  console.warn("Error in video-started handler:", b);
1880
1879
  }
1881
1880
  };
1882
- if (m) {
1883
- let h = !1, b = -1;
1881
+ if (h) {
1882
+ let p = !1, b = -1;
1884
1883
  const R = () => {
1885
- if (!h) {
1886
- h = !0;
1884
+ if (!p) {
1885
+ p = !0;
1887
1886
  try {
1888
- I.on && I.on("vp-video-started", ae), setTimeout(() => {
1889
- ae(), b = I.videoIndex ?? 0;
1887
+ A.on && A.on("vp-video-started", ae), setTimeout(() => {
1888
+ ae(), b = A.videoIndex ?? 0;
1890
1889
  }, 500);
1891
- } catch (W) {
1892
- console.error("Error setting up event listeners:", W);
1890
+ } catch (Y) {
1891
+ console.error("Error setting up event listeners:", Y);
1893
1892
  }
1894
1893
  }
1895
1894
  };
1896
1895
  let C = 0;
1897
1896
  const ce = 15, ue = setInterval(() => {
1898
1897
  try {
1899
- const W = I.videoIndex !== void 0 || I.playlist;
1900
- if (!h)
1901
- C++, (W || C >= ce) && R();
1898
+ const Y = A.videoIndex !== void 0 || A.playlist;
1899
+ if (!p)
1900
+ C++, (Y || C >= ce) && R();
1902
1901
  else {
1903
- const fe = I.videoIndex ?? 0;
1902
+ const fe = A.videoIndex ?? 0;
1904
1903
  fe !== b && b !== -1 && (b = fe, ae());
1905
1904
  }
1906
1905
  } catch {
1907
1906
  }
1908
1907
  }, 200);
1909
- y.current.push(ue);
1908
+ m.current.push(ue);
1910
1909
  try {
1911
- I.on && I.on("vp-listen-ready", R);
1910
+ A.on && A.on("vp-listen-ready", R);
1912
1911
  } catch {
1913
1912
  }
1914
1913
  } else {
1915
- const h = async (b) => {
1914
+ const p = async (b) => {
1916
1915
  var R, C;
1917
1916
  try {
1918
1917
  const ce = o == null ? void 0 : o.match(/player\/([^/.]+)/), ue = ce == null ? void 0 : ce[1];
1919
1918
  if (!ue || !b)
1920
- return V();
1921
- const W = `https://host.vpplayer.tech/player/${ue}/${b}.json`, fe = await fetch(W);
1919
+ return L();
1920
+ const Y = `https://host.vpplayer.tech/player/${ue}/${b}.json`, fe = await fetch(Y);
1922
1921
  if (!fe.ok)
1923
- return console.warn("Failed to fetch full video config:", fe.status), V();
1922
+ return console.warn("Failed to fetch full video config:", fe.status), L();
1924
1923
  const K = await fe.json();
1925
- return !K || !K.video ? V() : {
1924
+ return !K || !K.video ? L() : {
1926
1925
  videoId: b,
1927
1926
  title: K.video.title,
1928
1927
  description: K.video.description,
@@ -1935,32 +1934,32 @@ const Er = me.div`
1935
1934
  premium: ((R = K.video.videoLocking) == null ? void 0 : R.isEnabled) || !1,
1936
1935
  author: K.video.author,
1937
1936
  tags: K.video.tags || [],
1938
- videoIndex: I.videoIndex ?? 0,
1939
- playlistVideoIndex: ((C = I.playlist) == null ? void 0 : C.playlistVideoIndex) ?? 0
1937
+ videoIndex: A.videoIndex ?? 0,
1938
+ playlistVideoIndex: ((C = A.playlist) == null ? void 0 : C.playlistVideoIndex) ?? 0
1940
1939
  };
1941
1940
  } catch (ce) {
1942
- return console.warn("Error fetching full video data:", ce), V();
1941
+ return console.warn("Error fetching full video data:", ce), L();
1943
1942
  }
1944
1943
  };
1945
- I.on("ready", async (b) => {
1944
+ A.on("ready", async (b) => {
1946
1945
  try {
1947
- const R = (b == null ? void 0 : b.id) || t || O;
1946
+ const R = (b == null ? void 0 : b.id) || t || j;
1948
1947
  if (R) {
1949
- const C = await h(R);
1950
- p(C);
1948
+ const C = await p(R);
1949
+ f(C);
1951
1950
  } else {
1952
- const C = V();
1953
- (C.title || C.file) && p(C);
1951
+ const C = L();
1952
+ (C.title || C.file) && f(C);
1954
1953
  }
1955
1954
  } catch (R) {
1956
1955
  console.warn("Error in ready handler:", R);
1957
1956
  }
1958
- }), I.on("playlistItem", async (b) => {
1957
+ }), A.on("playlistItem", async (b) => {
1959
1958
  try {
1960
1959
  const R = b == null ? void 0 : b.id;
1961
1960
  if (R) {
1962
- const C = await h(R);
1963
- p(C);
1961
+ const C = await p(R);
1962
+ f(C);
1964
1963
  }
1965
1964
  } catch (R) {
1966
1965
  console.warn("Error in playlistItem handler:", R);
@@ -1968,44 +1967,44 @@ const Er = me.div`
1968
1967
  });
1969
1968
  }
1970
1969
  }
1971
- } catch (H) {
1972
- if (L) {
1973
- const te = H instanceof Error ? H.message : String(H);
1974
- f(te), console.error("VP Player initialization error:", H);
1970
+ } catch (X) {
1971
+ if (F) {
1972
+ const te = X instanceof Error ? X.message : String(X);
1973
+ y(te), console.error("VP Player initialization error:", X);
1975
1974
  }
1976
1975
  }
1977
1976
  }, 150);
1978
1977
  return () => {
1979
- L = !1, clearTimeout(Q), y.current.forEach((H) => clearInterval(H)), y.current = [], v.current.forEach((H) => clearTimeout(H)), v.current = [], g.current = !1;
1978
+ F = !1, clearTimeout(Q), m.current.forEach((X) => clearInterval(X)), m.current = [], v.current.forEach((X) => clearTimeout(X)), v.current = [], g.current = !1;
1980
1979
  };
1981
1980
  }, [
1982
- A,
1983
- N,
1984
- B,
1981
+ O,
1982
+ P,
1983
+ _,
1985
1984
  T,
1986
1985
  o
1987
1986
  ]), we(() => () => {
1988
1987
  if (k.current) {
1989
1988
  try {
1990
1989
  k.current.destroy && k.current.destroy();
1991
- } catch (U) {
1992
- console.warn(`Failed to destroy player ${B}:`, U);
1990
+ } catch (z) {
1991
+ console.warn(`Failed to destroy player ${_}:`, z);
1993
1992
  }
1994
1993
  k.current = null;
1995
1994
  }
1996
1995
  g.current = !1;
1997
- const L = document.getElementById(B);
1998
- L && (L.innerHTML = "");
1999
- }, [B]), {
1996
+ const F = document.getElementById(_);
1997
+ F && (F.innerHTML = "");
1998
+ }, [_]), {
2000
1999
  playerRef: w,
2001
2000
  playerInstanceRef: k,
2002
- isScriptLoaded: A,
2003
- isLoading: N,
2004
- error: z || j || T
2001
+ isScriptLoaded: O,
2002
+ isLoading: P,
2003
+ error: U || $ || T
2005
2004
  };
2006
- }, Lr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels: m = !1, hiddenClasses: l = [], onClose: p, className: w, onPlaylistData: k, onVideoStarted: g }) => {
2007
- var z, B, X, L;
2008
- const { playerRef: d, playerInstanceRef: y, isScriptLoaded: v, isLoading: E, error: A } = Vr({
2005
+ }, Lr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels: h = !1, hiddenClasses: l = [], onClose: f, className: w, onPlaylistData: k, onVideoStarted: g }) => {
2006
+ var U, _, M, F;
2007
+ const { playerRef: d, playerInstanceRef: m, isScriptLoaded: v, isLoading: E, error: O } = Vr({
2009
2008
  playerId: e,
2010
2009
  videoId: t,
2011
2010
  version: r,
@@ -2015,31 +2014,31 @@ const Er = me.div`
2015
2014
  scriptUrl: o,
2016
2015
  config: c,
2017
2016
  apiKey: u,
2018
- isReels: m,
2017
+ isReels: h,
2019
2018
  onPlaylistData: k,
2020
2019
  onVideoStarted: g
2021
- }), [T, O] = ne(!0), j = () => m && O(!0), f = () => {
2022
- var U, Q;
2023
- O(!1), (Q = (U = y.current) == null ? void 0 : U.play) == null || Q.call(U), p == null || p();
2024
- }, G = (B = (z = c == null ? void 0 : c.config) == null ? void 0 : z.size) != null && B.width ? typeof c.config.size.width == "number" ? `${c.config.size.width}px` : c.config.size.width : void 0, P = (L = (X = c == null ? void 0 : c.config) == null ? void 0 : X.size) != null && L.height ? typeof c.config.size.height == "number" ? `${c.config.size.height}px` : c.config.size.height : void 0, N = qe(e, t);
2025
- return A ? M.jsxs(Me, { type: "error", children: ["An error occurred: ", A] }) : E || !v ? M.jsx(Me, { type: "loading", children: "Loading..." }) : M.jsxs(M.Fragment, { children: [m && !T ? M.jsx("div", { onClick: j }) : null, !m && M.jsx("div", { children: M.jsx(it, { id: N, ref: d, width: G || "100%", height: P || "auto", $hiddenClasses: l, className: w }) }, N), m && T && M.jsx(Pr, { onClick: f, className: w, children: M.jsx(_r, { className: w, onClick: (U) => U.stopPropagation(), children: M.jsx("div", { children: M.jsx(it, { id: N, ref: d, width: "100%", height: "auto", $hiddenClasses: l, className: w }) }, N) }) })] });
2020
+ }), [T, j] = ne(!0), $ = () => h && j(!0), y = () => {
2021
+ var z, Q;
2022
+ j(!1), (Q = (z = m.current) == null ? void 0 : z.play) == null || Q.call(z), f == null || f();
2023
+ }, G = (_ = (U = c == null ? void 0 : c.config) == null ? void 0 : U.size) != null && _.width ? typeof c.config.size.width == "number" ? `${c.config.size.width}px` : c.config.size.width : void 0, V = (F = (M = c == null ? void 0 : c.config) == null ? void 0 : M.size) != null && F.height ? typeof c.config.size.height == "number" ? `${c.config.size.height}px` : c.config.size.height : void 0, P = qe(e, t);
2024
+ return O ? W.jsxs(Me, { type: "error", children: ["An error occurred: ", O] }) : E || !v ? W.jsx(Me, { type: "loading", children: "Loading..." }) : W.jsxs(W.Fragment, { children: [h && !T ? W.jsx("div", { onClick: $ }) : null, !h && W.jsx("div", { children: W.jsx(it, { id: P, ref: d, width: G || "100%", height: V || "auto", $hiddenClasses: l, className: w }) }, P), h && T && W.jsx(Pr, { onClick: y, className: w, children: W.jsx(_r, { className: w, onClick: (z) => z.stopPropagation(), children: W.jsx("div", { children: W.jsx(it, { id: P, ref: d, width: "100%", height: "auto", $hiddenClasses: l, className: w }) }, P) }) })] });
2026
2025
  }, xt = Et(void 0), Br = ({ children: e }) => {
2027
2026
  const [t, r] = ne(!1), [n, a] = ne(null), [i, o] = ne(null), c = Ge((l) => {
2028
2027
  try {
2029
- const p = qe(l.playerId, l.videoId);
2030
- a({ ...l, playerId: p }), r(!0), o(null);
2028
+ const f = qe(l.playerId, l.videoId);
2029
+ a({ ...l, playerId: f }), r(!0), o(null);
2031
2030
  } catch {
2032
2031
  o("Failed to show player.");
2033
2032
  }
2034
2033
  }, []), u = Ge(() => {
2035
2034
  r(!1), a(null), o(null);
2036
- }, []), m = ct(() => ({
2035
+ }, []), h = ct(() => ({
2037
2036
  showPlayer: c,
2038
2037
  hidePlayer: u,
2039
2038
  isPlayerVisible: t,
2040
2039
  playerParams: n
2041
2040
  }), [c, u, t, n]);
2042
- return M.jsxs(xt.Provider, { value: m, children: [e, i && M.jsx(Me, { type: "error", children: i }), t && (n == null ? void 0 : n.playerId) && M.jsx(Lr, { playerId: n.playerId, videoId: n.videoId, projectId: n.projectId, videoUrl: n.videoUrl, version: n.version, playlistId: n.playlistId, scriptUrl: n.scriptUrl, config: n.config, isReels: n.isReels, thumbnailUrl: n.thumbnailUrl, onClose: u, hiddenClasses: n.hiddenClasses || [], apiKey: n.apiKey, className: n.className })] });
2041
+ return W.jsxs(xt.Provider, { value: h, children: [e, i && W.jsx(Me, { type: "error", children: i }), t && (n == null ? void 0 : n.playerId) && W.jsx(Lr, { playerId: n.playerId, videoId: n.videoId, projectId: n.projectId, videoUrl: n.videoUrl, version: n.version, playlistId: n.playlistId, scriptUrl: n.scriptUrl, config: n.config, isReels: n.isReels, thumbnailUrl: n.thumbnailUrl, onClose: u, hiddenClasses: n.hiddenClasses || [], apiKey: n.apiKey, className: n.className })] });
2043
2042
  }, Dr = () => {
2044
2043
  const e = st(xt);
2045
2044
  if (!e)
@@ -2140,6 +2139,6 @@ export {
2140
2139
  Wr as getAdConfig,
2141
2140
  Dr as useVPPlayer,
2142
2141
  Vr as useVPPlayerLogic,
2143
- Cr as useVPPlayerScript,
2142
+ Rr as useVPPlayerScript,
2144
2143
  Or as useVideoData
2145
2144
  };