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

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
- import * as le from "react";
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 Ie = { exports: {} }, ve = {};
1
+ import * as ve from "react";
2
+ import $t, { forwardRef as Nt, useContext as Et, useState as ce, useEffect as Se, useRef as te, useMemo as Pt, createContext as Ft, useCallback as lt } from "react";
3
+ var De = { exports: {} }, ke = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var Ie = { exports: {} }, ve = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var He;
14
- function Pt() {
15
- if (He) return ve;
16
- He = 1;
13
+ var ut;
14
+ function Bt() {
15
+ if (ut) return ke;
16
+ ut = 1;
17
17
  var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
- function r(n, a, i) {
19
- var o = null;
20
- if (i !== void 0 && (o = "" + i), a.key !== void 0 && (o = "" + a.key), "key" in a) {
21
- i = {};
22
- for (var c in a)
23
- c !== "key" && (i[c] = a[c]);
24
- } else i = a;
25
- return a = i.ref, {
18
+ function r(a, i, n) {
19
+ var s = null;
20
+ if (n !== void 0 && (s = "" + n), i.key !== void 0 && (s = "" + i.key), "key" in i) {
21
+ n = {};
22
+ for (var l in i)
23
+ l !== "key" && (n[l] = i[l]);
24
+ } else n = i;
25
+ return i = n.ref, {
26
26
  $$typeof: e,
27
- type: n,
28
- key: o,
29
- ref: a !== void 0 ? a : null,
30
- props: i
27
+ type: a,
28
+ key: s,
29
+ ref: i !== void 0 ? i : null,
30
+ props: n
31
31
  };
32
32
  }
33
- return ve.Fragment = t, ve.jsx = r, ve.jsxs = r, ve;
33
+ return ke.Fragment = t, ke.jsx = r, ke.jsxs = r, ke;
34
34
  }
35
- var ge = {};
35
+ var Oe = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,353 +42,353 @@ var ge = {};
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
44
  */
45
- var Xe;
46
- function _t() {
47
- return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && function() {
48
- function e(s) {
49
- if (s == null) return null;
50
- if (typeof s == "function")
51
- return s.$$typeof === P ? null : s.displayName || s.name || null;
52
- if (typeof s == "string") return s;
53
- switch (s) {
45
+ var ct;
46
+ function Dt() {
47
+ return ct || (ct = 1, process.env.NODE_ENV !== "production" && function() {
48
+ function e(o) {
49
+ if (o == null) return null;
50
+ if (typeof o == "function")
51
+ return o.$$typeof === f ? null : o.displayName || o.name || null;
52
+ if (typeof o == "string") return o;
53
+ switch (o) {
54
54
  case d:
55
55
  return "Fragment";
56
- case v:
56
+ case w:
57
57
  return "Profiler";
58
- case m:
58
+ case x:
59
59
  return "StrictMode";
60
- case j:
60
+ case B:
61
61
  return "Suspense";
62
- case $:
63
- return "SuspenseList";
64
62
  case V:
63
+ return "SuspenseList";
64
+ case q:
65
65
  return "Activity";
66
66
  }
67
- if (typeof s == "object")
68
- switch (typeof s.tag == "number" && console.error(
67
+ if (typeof o == "object")
68
+ switch (typeof o.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), s.$$typeof) {
71
- case g:
72
- return "Portal";
73
- case O:
74
- return (s.displayName || "Context") + ".Provider";
70
+ ), o.$$typeof) {
75
71
  case E:
76
- return (s._context.displayName || "Context") + ".Consumer";
72
+ return "Portal";
73
+ case L:
74
+ return (o.displayName || "Context") + ".Provider";
75
+ case I:
76
+ return (o._context.displayName || "Context") + ".Consumer";
77
77
  case T:
78
- var x = s.render;
79
- return s = s.displayName, s || (s = x.displayName || x.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
80
- case y:
81
- return x = s.displayName || null, x !== null ? x : e(s.type) || "Memo";
82
- case G:
83
- x = s._payload, s = s._init;
78
+ var m = o.render;
79
+ return o = o.displayName, o || (o = m.displayName || m.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
80
+ case b:
81
+ return m = o.displayName || null, m !== null ? m : e(o.type) || "Memo";
82
+ case Q:
83
+ m = o._payload, o = o._init;
84
84
  try {
85
- return e(s(x));
85
+ return e(o(m));
86
86
  } catch {
87
87
  }
88
88
  }
89
89
  return null;
90
90
  }
91
- function t(s) {
92
- return "" + s;
91
+ function t(o) {
92
+ return "" + o;
93
93
  }
94
- function r(s) {
94
+ function r(o) {
95
95
  try {
96
- t(s);
97
- var x = !1;
96
+ t(o);
97
+ var m = !1;
98
98
  } catch {
99
- x = !0;
99
+ m = !0;
100
100
  }
101
- if (x) {
102
- x = console;
103
- var N = x.error, B = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
104
- return N.call(
105
- x,
101
+ if (m) {
102
+ m = console;
103
+ var A = m.error, C = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
104
+ return A.call(
105
+ m,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- B
108
- ), t(s);
107
+ C
108
+ ), t(o);
109
109
  }
110
110
  }
111
- function n(s) {
112
- if (s === d) return "<>";
113
- if (typeof s == "object" && s !== null && s.$$typeof === G)
111
+ function a(o) {
112
+ if (o === d) return "<>";
113
+ if (typeof o == "object" && o !== null && o.$$typeof === Q)
114
114
  return "<...>";
115
115
  try {
116
- var x = e(s);
117
- return x ? "<" + x + ">" : "<...>";
116
+ var m = e(o);
117
+ return m ? "<" + m + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
- function a() {
123
- var s = U.A;
124
- return s === null ? null : s.getOwner();
125
- }
126
122
  function i() {
123
+ var o = v.A;
124
+ return o === null ? null : o.getOwner();
125
+ }
126
+ function n() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
- function o(s) {
130
- if (_.call(s, "key")) {
131
- var x = Object.getOwnPropertyDescriptor(s, "key").get;
132
- if (x && x.isReactWarning) return !1;
129
+ function s(o) {
130
+ if (P.call(o, "key")) {
131
+ var m = Object.getOwnPropertyDescriptor(o, "key").get;
132
+ if (m && m.isReactWarning) return !1;
133
133
  }
134
- return s.key !== void 0;
134
+ return o.key !== void 0;
135
135
  }
136
- function c(s, x) {
137
- function N() {
138
- z || (z = !0, console.error(
136
+ function l(o, m) {
137
+ function A() {
138
+ U || (U = !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
- x
140
+ m
141
141
  ));
142
142
  }
143
- N.isReactWarning = !0, Object.defineProperty(s, "key", {
144
- get: N,
143
+ A.isReactWarning = !0, Object.defineProperty(o, "key", {
144
+ get: A,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function u() {
149
- var s = e(this.type);
150
- return Q[s] || (Q[s] = !0, console.error(
148
+ function c() {
149
+ var o = e(this.type);
150
+ return M[o] || (M[o] = !0, console.error(
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
- )), s = this.props.ref, s !== void 0 ? s : null;
152
+ )), o = this.props.ref, o !== void 0 ? o : null;
153
153
  }
154
- function h(s, x, N, B, A, L, ee, ae) {
155
- return N = L.ref, s = {
156
- $$typeof: k,
157
- type: s,
158
- key: x,
159
- props: L,
160
- _owner: A
161
- }, (N !== void 0 ? N : null) !== null ? Object.defineProperty(s, "ref", {
154
+ function y(o, m, A, C, Y, J, X, de) {
155
+ return A = J.ref, o = {
156
+ $$typeof: _,
157
+ type: o,
158
+ key: m,
159
+ props: J,
160
+ _owner: Y
161
+ }, (A !== void 0 ? A : null) !== null ? Object.defineProperty(o, "ref", {
162
162
  enumerable: !1,
163
- get: u
164
- }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
163
+ get: c
164
+ }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
165
165
  configurable: !1,
166
166
  enumerable: !1,
167
167
  writable: !0,
168
168
  value: 0
169
- }), Object.defineProperty(s, "_debugInfo", {
169
+ }), Object.defineProperty(o, "_debugInfo", {
170
170
  configurable: !1,
171
171
  enumerable: !1,
172
172
  writable: !0,
173
173
  value: null
174
- }), Object.defineProperty(s, "_debugStack", {
174
+ }), Object.defineProperty(o, "_debugStack", {
175
175
  configurable: !1,
176
176
  enumerable: !1,
177
177
  writable: !0,
178
- value: ee
179
- }), Object.defineProperty(s, "_debugTask", {
178
+ value: X
179
+ }), Object.defineProperty(o, "_debugTask", {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: ae
184
- }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
183
+ value: de
184
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
185
185
  }
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);
186
+ function u(o, m, A, C, Y, J, X, de) {
187
+ var N = m.children;
188
+ if (N !== void 0)
189
+ if (C)
190
+ if ($(N)) {
191
+ for (C = 0; C < N.length; C++)
192
+ h(N[C]);
193
+ Object.freeze && Object.freeze(N);
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 f(p);
199
- if (_.call(x, "key")) {
200
- p = e(s);
201
- var b = Object.keys(x).filter(function(C) {
202
- return C !== "key";
198
+ else h(N);
199
+ if (P.call(m, "key")) {
200
+ N = e(o);
201
+ var Z = Object.keys(m).filter(function(ne) {
202
+ return ne !== "key";
203
203
  });
204
- B = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", re[p + B] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ C = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", p[N + C] || (Z = 0 < Z.length ? "{" + Z.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
- B,
212
- p,
213
- b,
214
- p
215
- ), re[p + B] = !0);
211
+ C,
212
+ N,
213
+ Z,
214
+ N
215
+ ), p[N + C] = !0);
216
216
  }
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
- for (var R in x)
220
- R !== "key" && (N[R] = x[R]);
221
- } else N = x;
222
- return p && c(
223
- N,
224
- typeof s == "function" ? s.displayName || s.name || "Unknown" : s
225
- ), h(
226
- s,
227
- p,
228
- L,
217
+ if (N = null, A !== void 0 && (r(A), N = "" + A), s(m) && (r(m.key), N = "" + m.key), "key" in m) {
218
+ A = {};
219
+ for (var fe in m)
220
+ fe !== "key" && (A[fe] = m[fe]);
221
+ } else A = m;
222
+ return N && l(
229
223
  A,
230
- a(),
224
+ typeof o == "function" ? o.displayName || o.name || "Unknown" : o
225
+ ), y(
226
+ o,
231
227
  N,
232
- ee,
233
- ae
228
+ J,
229
+ Y,
230
+ i(),
231
+ A,
232
+ X,
233
+ de
234
234
  );
235
235
  }
236
- function f(s) {
237
- typeof s == "object" && s !== null && s.$$typeof === k && s._store && (s._store.validated = 1);
236
+ function h(o) {
237
+ typeof o == "object" && o !== null && o.$$typeof === _ && o._store && (o._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"), 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() {
239
+ var g = $t, _ = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), L = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), V = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), Q = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), f = Symbol.for("react.client.reference"), v = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, $ = Array.isArray, D = console.createTask ? console.createTask : function() {
240
240
  return null;
241
241
  };
242
- w = {
243
- "react-stack-bottom-frame": function(s) {
244
- return s();
242
+ g = {
243
+ "react-stack-bottom-frame": function(o) {
244
+ return o();
245
245
  }
246
246
  };
247
- var z, Q = {}, X = w["react-stack-bottom-frame"].bind(
248
- w,
249
- i
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
- return l(
254
- s,
255
- x,
256
- N,
257
- !1,
258
- B,
247
+ var U, M = {}, W = g["react-stack-bottom-frame"].bind(
248
+ g,
249
+ n
250
+ )(), z = D(a(n)), p = {};
251
+ Oe.Fragment = d, Oe.jsx = function(o, m, A, C, Y) {
252
+ var J = 1e4 > v.recentlyCreatedOwnerStacks++;
253
+ return u(
254
+ o,
255
+ m,
259
256
  A,
260
- L ? Error("react-stack-top-frame") : X,
261
- L ? F(n(s)) : te
257
+ !1,
258
+ C,
259
+ Y,
260
+ J ? Error("react-stack-top-frame") : W,
261
+ J ? D(a(o)) : z
262
262
  );
263
- }, ge.jsxs = function(s, x, N, B, A) {
264
- var L = 1e4 > U.recentlyCreatedOwnerStacks++;
265
- return l(
266
- s,
267
- x,
268
- N,
269
- !0,
270
- B,
263
+ }, Oe.jsxs = function(o, m, A, C, Y) {
264
+ var J = 1e4 > v.recentlyCreatedOwnerStacks++;
265
+ return u(
266
+ o,
267
+ m,
271
268
  A,
272
- L ? Error("react-stack-top-frame") : X,
273
- L ? F(n(s)) : te
269
+ !0,
270
+ C,
271
+ Y,
272
+ J ? Error("react-stack-top-frame") : W,
273
+ J ? D(a(o)) : z
274
274
  );
275
275
  };
276
- }()), ge;
276
+ }()), Oe;
277
277
  }
278
- var Je;
279
- function It() {
280
- return Je || (Je = 1, process.env.NODE_ENV === "production" ? Ie.exports = Pt() : Ie.exports = _t()), Ie.exports;
278
+ var dt;
279
+ function Mt() {
280
+ return dt || (dt = 1, process.env.NODE_ENV === "production" ? De.exports = Bt() : De.exports = Dt()), De.exports;
281
281
  }
282
- var W = It();
283
- function Be() {
284
- return Be = Object.assign ? Object.assign.bind() : function(e) {
282
+ var K = Mt();
283
+ function Ze() {
284
+ return Ze = Object.assign ? Object.assign.bind() : function(e) {
285
285
  for (var t = 1; t < arguments.length; t++) {
286
286
  var r = arguments[t];
287
- for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
287
+ for (var a in r) ({}).hasOwnProperty.call(r, a) && (e[a] = r[a]);
288
288
  }
289
289
  return e;
290
- }, Be.apply(null, arguments);
290
+ }, Ze.apply(null, arguments);
291
291
  }
292
- function St(e) {
292
+ function Ut(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 Tt(e) {
299
+ function zt(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 Rt = /* @__PURE__ */ function() {
303
+ var qt = /* @__PURE__ */ function() {
304
304
  function e(r) {
305
- var n = this;
306
- this._insertTag = function(a) {
307
- var i;
308
- n.tags.length === 0 ? n.insertionPoint ? i = n.insertionPoint.nextSibling : n.prepend ? i = n.container.firstChild : i = n.before : i = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(a, i), n.tags.push(a);
305
+ var a = this;
306
+ this._insertTag = function(i) {
307
+ var n;
308
+ a.tags.length === 0 ? a.insertionPoint ? n = a.insertionPoint.nextSibling : a.prepend ? n = a.container.firstChild : n = a.before : n = a.tags[a.tags.length - 1].nextSibling, a.container.insertBefore(i, n), a.tags.push(i);
309
309
  }, this.isSpeedy = r.speedy === void 0 ? !0 : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
310
310
  }
311
311
  var t = e.prototype;
312
- return t.hydrate = function(n) {
313
- n.forEach(this._insertTag);
314
- }, t.insert = function(n) {
315
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Tt(this));
316
- var a = this.tags[this.tags.length - 1];
312
+ return t.hydrate = function(a) {
313
+ a.forEach(this._insertTag);
314
+ }, t.insert = function(a) {
315
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(zt(this));
316
+ var i = this.tags[this.tags.length - 1];
317
317
  if (this.isSpeedy) {
318
- var i = St(a);
318
+ var n = Ut(i);
319
319
  try {
320
- i.insertRule(n, i.cssRules.length);
320
+ n.insertRule(a, n.cssRules.length);
321
321
  } catch {
322
322
  }
323
323
  } else
324
- a.appendChild(document.createTextNode(n));
324
+ i.appendChild(document.createTextNode(a));
325
325
  this.ctr++;
326
326
  }, t.flush = function() {
327
- this.tags.forEach(function(n) {
328
- var a;
329
- return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
327
+ this.tags.forEach(function(a) {
328
+ var i;
329
+ return (i = a.parentNode) == null ? void 0 : i.removeChild(a);
330
330
  }), this.tags = [], this.ctr = 0;
331
331
  }, e;
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
- function $t(e, t) {
334
- return q(e, 0) ^ 45 ? (((t << 2 ^ q(e, 0)) << 2 ^ q(e, 1)) << 2 ^ q(e, 2)) << 2 ^ q(e, 3) : 0;
332
+ }(), ae = "-ms-", We = "-moz-", O = "-webkit-", _t = "comm", nt = "rule", at = "decl", Wt = "@import", St = "@keyframes", Yt = "@layer", Gt = Math.abs, Ye = String.fromCharCode, Ht = Object.assign;
333
+ function Xt(e, t) {
334
+ return re(e, 0) ^ 45 ? (((t << 2 ^ re(e, 0)) << 2 ^ re(e, 1)) << 2 ^ re(e, 2)) << 2 ^ re(e, 3) : 0;
335
335
  }
336
- function dt(e) {
336
+ function It(e) {
337
337
  return e.trim();
338
338
  }
339
- function Nt(e, t) {
339
+ function Jt(e, t) {
340
340
  return (e = t.exec(e)) ? e[0] : e;
341
341
  }
342
- function S(e, t, r) {
342
+ function j(e, t, r) {
343
343
  return e.replace(t, r);
344
344
  }
345
- function De(e, t) {
345
+ function et(e, t) {
346
346
  return e.indexOf(t);
347
347
  }
348
- function q(e, t) {
348
+ function re(e, t) {
349
349
  return e.charCodeAt(t) | 0;
350
350
  }
351
- function ke(e, t, r) {
351
+ function Le(e, t, r) {
352
352
  return e.slice(t, r);
353
353
  }
354
- function ie(e) {
354
+ function pe(e) {
355
355
  return e.length;
356
356
  }
357
- function Ye(e) {
357
+ function it(e) {
358
358
  return e.length;
359
359
  }
360
- function Se(e, t) {
360
+ function Me(e, t) {
361
361
  return t.push(e), e;
362
362
  }
363
- function Vt(e, t) {
363
+ function Kt(e, t) {
364
364
  return e.map(t).join("");
365
365
  }
366
- var je = 1, he = 1, ft = 0, J = 0, D = 0, ye = "";
367
- function $e(e, t, r, n, a, i, o) {
368
- return { value: e, root: t, parent: r, type: n, props: a, children: i, line: je, column: he, length: o, return: "" };
366
+ var Ge = 1, Ce = 1, Ct = 0, oe = 0, H = 0, Te = "";
367
+ function He(e, t, r, a, i, n, s) {
368
+ return { value: e, root: t, parent: r, type: a, props: i, children: n, line: Ge, column: Ce, length: s, return: "" };
369
369
  }
370
- function be(e, t) {
371
- return jt($e("", null, null, "", null, null, 0), e, { length: -e.length }, t);
370
+ function je(e, t) {
371
+ return Ht(He("", null, null, "", null, null, 0), e, { length: -e.length }, t);
372
372
  }
373
- function Lt() {
374
- return D;
373
+ function Qt() {
374
+ return H;
375
375
  }
376
- function Ft() {
377
- return D = J > 0 ? q(ye, --J) : 0, he--, D === 10 && (he = 1, je--), D;
376
+ function Zt() {
377
+ return H = oe > 0 ? re(Te, --oe) : 0, Ce--, H === 10 && (Ce = 1, Ge--), H;
378
378
  }
379
- function Z() {
380
- return D = J < ft ? q(ye, J++) : 0, he++, D === 10 && (he = 1, je++), D;
379
+ function ue() {
380
+ return H = oe < Ct ? re(Te, oe++) : 0, Ce++, H === 10 && (Ce = 1, Ge++), H;
381
381
  }
382
- function se() {
383
- return q(ye, J);
382
+ function me() {
383
+ return re(Te, oe);
384
384
  }
385
- function Te() {
386
- return J;
385
+ function Ue() {
386
+ return oe;
387
387
  }
388
- function _e(e, t) {
389
- return ke(ye, e, t);
388
+ function Fe(e, t) {
389
+ return Le(Te, e, t);
390
390
  }
391
- function Ee(e) {
391
+ function $e(e) {
392
392
  switch (e) {
393
393
  // \0 \t \n \r \s whitespace token
394
394
  case 0:
@@ -426,260 +426,260 @@ function Ee(e) {
426
426
  }
427
427
  return 0;
428
428
  }
429
- function pt(e) {
430
- return je = he = 1, ft = ie(ye = e), J = 0, [];
429
+ function Rt(e) {
430
+ return Ge = Ce = 1, Ct = pe(Te = e), oe = 0, [];
431
431
  }
432
- function ht(e) {
433
- return ye = "", e;
432
+ function Tt(e) {
433
+ return Te = "", e;
434
434
  }
435
- function Re(e) {
436
- return dt(_e(J - 1, Ue(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
435
+ function ze(e) {
436
+ return It(Fe(oe - 1, tt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
437
437
  }
438
- function Bt(e) {
439
- for (; (D = se()) && D < 33; )
440
- Z();
441
- return Ee(e) > 2 || Ee(D) > 3 ? "" : " ";
438
+ function er(e) {
439
+ for (; (H = me()) && H < 33; )
440
+ ue();
441
+ return $e(e) > 2 || $e(H) > 3 ? "" : " ";
442
442
  }
443
- function Dt(e, t) {
444
- for (; --t && Z() && !(D < 48 || D > 102 || D > 57 && D < 65 || D > 70 && D < 97); )
443
+ function tr(e, t) {
444
+ for (; --t && ue() && !(H < 48 || H > 102 || H > 57 && H < 65 || H > 70 && H < 97); )
445
445
  ;
446
- return _e(e, Te() + (t < 6 && se() == 32 && Z() == 32));
446
+ return Fe(e, Ue() + (t < 6 && me() == 32 && ue() == 32));
447
447
  }
448
- function Ue(e) {
449
- for (; Z(); )
450
- switch (D) {
448
+ function tt(e) {
449
+ for (; ue(); )
450
+ switch (H) {
451
451
  // ] ) " '
452
452
  case e:
453
- return J;
453
+ return oe;
454
454
  // " '
455
455
  case 34:
456
456
  case 39:
457
- e !== 34 && e !== 39 && Ue(D);
457
+ e !== 34 && e !== 39 && tt(H);
458
458
  break;
459
459
  // (
460
460
  case 40:
461
- e === 41 && Ue(e);
461
+ e === 41 && tt(e);
462
462
  break;
463
463
  // \
464
464
  case 92:
465
- Z();
465
+ ue();
466
466
  break;
467
467
  }
468
- return J;
468
+ return oe;
469
469
  }
470
- function Ut(e, t) {
471
- for (; Z() && e + D !== 57; )
472
- if (e + D === 84 && se() === 47)
470
+ function rr(e, t) {
471
+ for (; ue() && e + H !== 57; )
472
+ if (e + H === 84 && me() === 47)
473
473
  break;
474
- return "/*" + _e(t, J - 1) + "*" + Oe(e === 47 ? e : Z());
474
+ return "/*" + Fe(t, oe - 1) + "*" + Ye(e === 47 ? e : ue());
475
475
  }
476
- function Mt(e) {
477
- for (; !Ee(se()); )
478
- Z();
479
- return _e(e, J);
476
+ function nr(e) {
477
+ for (; !$e(me()); )
478
+ ue();
479
+ return Fe(e, oe);
480
480
  }
481
- function zt(e) {
482
- return ht(Ce("", null, null, null, [""], e = pt(e), 0, [0], e));
481
+ function ar(e) {
482
+ return Tt(qe("", null, null, null, [""], e = Rt(e), 0, [0], e));
483
483
  }
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
- switch (g = E, E = Z()) {
484
+ function qe(e, t, r, a, i, n, s, l, c) {
485
+ for (var y = 0, u = 0, h = s, g = 0, _ = 0, E = 0, d = 1, x = 1, w = 1, I = 0, L = "", T = i, B = n, V = a, b = L; x; )
486
+ switch (E = I, I = ue()) {
487
487
  // (
488
488
  case 40:
489
- if (g != 108 && q(y, f - 1) == 58) {
490
- De(y += S(Re(E), "&", "&\f"), "&\f") != -1 && (v = -1);
489
+ if (E != 108 && re(b, h - 1) == 58) {
490
+ et(b += j(ze(I), "&", "&\f"), "&\f") != -1 && (w = -1);
491
491
  break;
492
492
  }
493
493
  // " ' [
494
494
  case 34:
495
495
  case 39:
496
496
  case 91:
497
- y += Re(E);
497
+ b += ze(I);
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
- y += Bt(g);
504
+ b += er(E);
505
505
  break;
506
506
  // \
507
507
  case 92:
508
- y += Dt(Te() - 1, 7);
508
+ b += tr(Ue() - 1, 7);
509
509
  continue;
510
510
  // /
511
511
  case 47:
512
- switch (se()) {
512
+ switch (me()) {
513
513
  case 42:
514
514
  case 47:
515
- Se(Wt(Ut(Z(), Te()), t, r), u);
515
+ Me(ir(rr(ue(), Ue()), t, r), c);
516
516
  break;
517
517
  default:
518
- y += "/";
518
+ b += "/";
519
519
  }
520
520
  break;
521
521
  // {
522
522
  case 123 * d:
523
- c[h++] = ie(y) * v;
523
+ l[y++] = pe(b) * w;
524
524
  // } ; \0
525
525
  case 125 * d:
526
526
  case 59:
527
527
  case 0:
528
- switch (E) {
528
+ switch (I) {
529
529
  // \0 }
530
530
  case 0:
531
531
  case 125:
532
- m = 0;
532
+ x = 0;
533
533
  // ;
534
- case 59 + l:
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);
534
+ case 59 + u:
535
+ w == -1 && (b = j(b, /\f/g, "")), _ > 0 && pe(b) - h && Me(_ > 32 ? pt(b + ";", a, r, h - 1) : pt(j(b, " ", "") + ";", a, r, h - 2), c);
536
536
  break;
537
537
  // @ ;
538
538
  case 59:
539
- y += ";";
539
+ b += ";";
540
540
  // { rule/at-rule
541
541
  default:
542
- if (Se($ = Ke(y, t, r, h, l, a, c, O, T = [], j = [], f), i), E === 123)
543
- if (l === 0)
544
- Ce(y, t, $, $, T, i, f, c, j);
542
+ if (Me(V = ft(b, t, r, y, u, i, l, L, T = [], B = [], h), n), I === 123)
543
+ if (u === 0)
544
+ qe(b, t, V, V, T, n, h, l, B);
545
545
  else
546
- switch (w === 99 && q(y, 3) === 110 ? 100 : w) {
546
+ switch (g === 99 && re(b, 3) === 110 ? 100 : g) {
547
547
  // d l m s
548
548
  case 100:
549
549
  case 108:
550
550
  case 109:
551
551
  case 115:
552
- Ce(e, $, $, n && Se(Ke(e, $, $, 0, 0, a, c, O, a, T = [], f), j), a, j, f, c, n ? T : j);
552
+ qe(e, V, V, a && Me(ft(e, V, V, 0, 0, i, l, L, i, T = [], h), B), i, B, h, l, a ? T : B);
553
553
  break;
554
554
  default:
555
- Ce(y, $, $, $, [""], j, 0, c, j);
555
+ qe(b, V, V, V, [""], B, 0, l, B);
556
556
  }
557
557
  }
558
- h = l = k = 0, d = v = 1, O = y = "", f = o;
558
+ y = u = _ = 0, d = w = 1, L = b = "", h = s;
559
559
  break;
560
560
  // :
561
561
  case 58:
562
- f = 1 + ie(y), k = g;
562
+ h = 1 + pe(b), _ = E;
563
563
  default:
564
564
  if (d < 1) {
565
- if (E == 123)
565
+ if (I == 123)
566
566
  --d;
567
- else if (E == 125 && d++ == 0 && Ft() == 125)
567
+ else if (I == 125 && d++ == 0 && Zt() == 125)
568
568
  continue;
569
569
  }
570
- switch (y += Oe(E), E * d) {
570
+ switch (b += Ye(I), I * d) {
571
571
  // &
572
572
  case 38:
573
- v = l > 0 ? 1 : (y += "\f", -1);
573
+ w = u > 0 ? 1 : (b += "\f", -1);
574
574
  break;
575
575
  // ,
576
576
  case 44:
577
- c[h++] = (ie(y) - 1) * v, v = 1;
577
+ l[y++] = (pe(b) - 1) * w, w = 1;
578
578
  break;
579
579
  // @
580
580
  case 64:
581
- se() === 45 && (y += Re(Z())), w = se(), l = f = ie(O = y += Mt(Te())), E++;
581
+ me() === 45 && (b += ze(ue())), g = me(), u = h = pe(L = b += nr(Ue())), I++;
582
582
  break;
583
583
  // -
584
584
  case 45:
585
- g === 45 && ie(y) == 2 && (d = 0);
585
+ E === 45 && pe(b) == 2 && (d = 0);
586
586
  }
587
587
  }
588
- return i;
588
+ return n;
589
589
  }
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);
590
+ function ft(e, t, r, a, i, n, s, l, c, y, u) {
591
+ for (var h = i - 1, g = i === 0 ? n : [""], _ = it(g), E = 0, d = 0, x = 0; E < a; ++E)
592
+ for (var w = 0, I = Le(e, h + 1, h = Gt(d = s[E])), L = e; w < _; ++w)
593
+ (L = It(d > 0 ? g[w] + " " + I : j(I, /&\f/g, g[w]))) && (c[x++] = L);
594
+ return He(e, t, r, i === 0 ? nt : l, c, y, u);
595
595
  }
596
- function Wt(e, t, r) {
597
- return $e(e, t, r, lt, Oe(Lt()), ke(e, 2, -2), 0);
596
+ function ir(e, t, r) {
597
+ return He(e, t, r, _t, Ye(Qt()), Le(e, 2, -2), 0);
598
598
  }
599
- function Ze(e, t, r, n) {
600
- return $e(e, t, r, We, ke(e, 0, n), ke(e, n + 1, -1), n);
599
+ function pt(e, t, r, a) {
600
+ return He(e, t, r, at, Le(e, 0, a), Le(e, a + 1, -1), a);
601
601
  }
602
- function pe(e, t) {
603
- for (var r = "", n = Ye(e), a = 0; a < n; a++)
604
- r += t(e[a], a, e, t) || "";
602
+ function Ie(e, t) {
603
+ for (var r = "", a = it(e), i = 0; i < a; i++)
604
+ r += t(e[i], i, e, t) || "";
605
605
  return r;
606
606
  }
607
- function Yt(e, t, r, n) {
607
+ function or(e, t, r, a) {
608
608
  switch (e.type) {
609
- case At:
609
+ case Yt:
610
610
  if (e.children.length) break;
611
- case Ct:
612
- case We:
611
+ case Wt:
612
+ case at:
613
613
  return e.return = e.return || e.value;
614
- case lt:
614
+ case _t:
615
615
  return "";
616
- case ut:
617
- return e.return = e.value + "{" + pe(e.children, n) + "}";
618
- case ze:
616
+ case St:
617
+ return e.return = e.value + "{" + Ie(e.children, a) + "}";
618
+ case nt:
619
619
  e.value = e.props.join(",");
620
620
  }
621
- return ie(r = pe(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
621
+ return pe(r = Ie(e.children, a)) ? e.return = e.value + "{" + r + "}" : "";
622
622
  }
623
- function qt(e) {
624
- var t = Ye(e);
625
- return function(r, n, a, i) {
626
- for (var o = "", c = 0; c < t; c++)
627
- o += e[c](r, n, a, i) || "";
628
- return o;
623
+ function sr(e) {
624
+ var t = it(e);
625
+ return function(r, a, i, n) {
626
+ for (var s = "", l = 0; l < t; l++)
627
+ s += e[l](r, a, i, n) || "";
628
+ return s;
629
629
  };
630
630
  }
631
- function Gt(e) {
631
+ function lr(e) {
632
632
  return function(t) {
633
633
  t.root || (t = t.return) && e(t);
634
634
  };
635
635
  }
636
- function mt(e) {
636
+ function At(e) {
637
637
  var t = /* @__PURE__ */ Object.create(null);
638
638
  return function(r) {
639
639
  return t[r] === void 0 && (t[r] = e(r)), t[r];
640
640
  };
641
641
  }
642
- var Ht = function(t, r, n) {
643
- for (var a = 0, i = 0; a = i, i = se(), a === 38 && i === 12 && (r[n] = 1), !Ee(i); )
644
- Z();
645
- return _e(t, J);
646
- }, Xt = function(t, r) {
647
- var n = -1, a = 44;
642
+ var ur = function(t, r, a) {
643
+ for (var i = 0, n = 0; i = n, n = me(), i === 38 && n === 12 && (r[a] = 1), !$e(n); )
644
+ ue();
645
+ return Fe(t, oe);
646
+ }, cr = function(t, r) {
647
+ var a = -1, i = 44;
648
648
  do
649
- switch (Ee(a)) {
649
+ switch ($e(i)) {
650
650
  case 0:
651
- a === 38 && se() === 12 && (r[n] = 1), t[n] += Ht(J - 1, r, n);
651
+ i === 38 && me() === 12 && (r[a] = 1), t[a] += ur(oe - 1, r, a);
652
652
  break;
653
653
  case 2:
654
- t[n] += Re(a);
654
+ t[a] += ze(i);
655
655
  break;
656
656
  case 4:
657
- if (a === 44) {
658
- t[++n] = se() === 58 ? "&\f" : "", r[n] = t[n].length;
657
+ if (i === 44) {
658
+ t[++a] = me() === 58 ? "&\f" : "", r[a] = t[a].length;
659
659
  break;
660
660
  }
661
661
  // fallthrough
662
662
  default:
663
- t[n] += Oe(a);
663
+ t[a] += Ye(i);
664
664
  }
665
- while (a = Z());
665
+ while (i = ue());
666
666
  return t;
667
- }, Jt = function(t, r) {
668
- return ht(Xt(pt(t), r));
669
- }, Qe = /* @__PURE__ */ new WeakMap(), Kt = function(t) {
667
+ }, dr = function(t, r) {
668
+ return Tt(cr(Rt(t), r));
669
+ }, ht = /* @__PURE__ */ new WeakMap(), fr = function(t) {
670
670
  if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
671
671
  // negative .length indicates that this rule has been already prefixed
672
672
  t.length < 1)) {
673
- for (var r = t.value, n = t.parent, a = t.column === n.column && t.line === n.line; n.type !== "rule"; )
674
- if (n = n.parent, !n) return;
675
- if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !Qe.get(n)) && !a) {
676
- Qe.set(t, !0);
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];
673
+ for (var r = t.value, a = t.parent, i = t.column === a.column && t.line === a.line; a.type !== "rule"; )
674
+ if (a = a.parent, !a) return;
675
+ if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !ht.get(a)) && !i) {
676
+ ht.set(t, !0);
677
+ for (var n = [], s = dr(r, n), l = a.props, c = 0, y = 0; c < s.length; c++)
678
+ for (var u = 0; u < l.length; u++, y++)
679
+ t.props[y] = n[c] ? s[c].replace(/&\f/g, l[u]) : l[u] + " " + s[c];
680
680
  }
681
681
  }
682
- }, Zt = function(t) {
682
+ }, pr = function(t) {
683
683
  if (t.type === "decl") {
684
684
  var r = t.value;
685
685
  // charcode for l
@@ -687,11 +687,11 @@ var Ht = function(t, r, n) {
687
687
  r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
688
688
  }
689
689
  };
690
- function yt(e, t) {
691
- switch ($t(e, t)) {
690
+ function kt(e, t) {
691
+ switch (Xt(e, t)) {
692
692
  // color-adjust
693
693
  case 5103:
694
- return I + "print-" + e + e;
694
+ return O + "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 I + e + e;
724
+ return O + 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 I + e + Ae + e + H + e + e;
731
+ return O + e + We + e + ae + e + e;
732
732
  // flex, flex-direction
733
733
  case 6828:
734
734
  case 4268:
735
- return I + e + H + e + e;
735
+ return O + e + ae + e + e;
736
736
  // order
737
737
  case 6165:
738
- return I + e + H + "flex-" + e + e;
738
+ return O + e + ae + "flex-" + e + e;
739
739
  // align-items
740
740
  case 5187:
741
- return I + e + S(e, /(\w+).+(:[^]+)/, I + "box-$1$2" + H + "flex-$1$2") + e;
741
+ return O + e + j(e, /(\w+).+(:[^]+)/, O + "box-$1$2" + ae + "flex-$1$2") + e;
742
742
  // align-self
743
743
  case 5443:
744
- return I + e + H + "flex-item-" + S(e, /flex-|-self/, "") + e;
744
+ return O + e + ae + "flex-item-" + j(e, /flex-|-self/, "") + e;
745
745
  // align-content
746
746
  case 4675:
747
- return I + e + H + "flex-line-pack" + S(e, /align-content|flex-|-self/, "") + e;
747
+ return O + e + ae + "flex-line-pack" + j(e, /align-content|flex-|-self/, "") + e;
748
748
  // flex-shrink
749
749
  case 5548:
750
- return I + e + H + S(e, "shrink", "negative") + e;
750
+ return O + e + ae + j(e, "shrink", "negative") + e;
751
751
  // flex-basis
752
752
  case 5292:
753
- return I + e + H + S(e, "basis", "preferred-size") + e;
753
+ return O + e + ae + j(e, "basis", "preferred-size") + e;
754
754
  // flex-grow
755
755
  case 6060:
756
- return I + "box-" + S(e, "-grow", "") + I + e + H + S(e, "grow", "positive") + e;
756
+ return O + "box-" + j(e, "-grow", "") + O + e + ae + j(e, "grow", "positive") + e;
757
757
  // transition
758
758
  case 4554:
759
- return I + S(e, /([^-])(transform)/g, "$1" + I + "$2") + e;
759
+ return O + j(e, /([^-])(transform)/g, "$1" + O + "$2") + e;
760
760
  // cursor
761
761
  case 6187:
762
- return S(S(S(e, /(zoom-|grab)/, I + "$1"), /(image-set)/, I + "$1"), e, "") + e;
762
+ return j(j(j(e, /(zoom-|grab)/, O + "$1"), /(image-set)/, O + "$1"), e, "") + e;
763
763
  // background, background-image
764
764
  case 5495:
765
765
  case 3959:
766
- return S(e, /(image-set\([^]*)/, I + "$1$`$1");
766
+ return j(e, /(image-set\([^]*)/, O + "$1$`$1");
767
767
  // justify-content
768
768
  case 4968:
769
- return S(S(e, /(.+:)(flex-)?(.*)/, I + "box-pack:$3" + H + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + I + e + e;
769
+ return j(j(e, /(.+:)(flex-)?(.*)/, O + "box-pack:$3" + ae + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + O + 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(.+)/, I + "$1$2") + e;
775
+ return j(e, /(.+)-inline(.+)/, O + "$1$2") + e;
776
776
  // (min|max)?(width|height|inline-size|block-size)
777
777
  case 8116:
778
778
  case 7059:
@@ -786,176 +786,176 @@ function yt(e, t) {
786
786
  case 5789:
787
787
  case 5021:
788
788
  case 4765:
789
- if (ie(e) - 1 - t > 6) switch (q(e, t + 1)) {
789
+ if (pe(e) - 1 - t > 6) switch (re(e, t + 1)) {
790
790
  // (m)ax-content, (m)in-content
791
791
  case 109:
792
- if (q(e, t + 4) !== 45) break;
792
+ if (re(e, t + 4) !== 45) break;
793
793
  // (f)ill-available, (f)it-content
794
794
  case 102:
795
- return S(e, /(.+:)(.+)-([^]+)/, "$1" + I + "$2-$3$1" + Ae + (q(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
795
+ return j(e, /(.+:)(.+)-([^]+)/, "$1" + O + "$2-$3$1" + We + (re(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
796
796
  // (s)tretch
797
797
  case 115:
798
- return ~De(e, "stretch") ? yt(S(e, "stretch", "fill-available"), t) + e : e;
798
+ return ~et(e, "stretch") ? kt(j(e, "stretch", "fill-available"), t) + e : e;
799
799
  }
800
800
  break;
801
801
  // position: sticky
802
802
  case 4949:
803
- if (q(e, t + 1) !== 115) break;
803
+ if (re(e, t + 1) !== 115) break;
804
804
  // display: (flex|inline-flex)
805
805
  case 6444:
806
- switch (q(e, ie(e) - 3 - (~De(e, "!important") && 10))) {
806
+ switch (re(e, pe(e) - 3 - (~et(e, "!important") && 10))) {
807
807
  // stic(k)y
808
808
  case 107:
809
- return S(e, ":", ":" + I) + e;
809
+ return j(e, ":", ":" + O) + e;
810
810
  // (inline-)?fl(e)x
811
811
  case 101:
812
- return S(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + I + (q(e, 14) === 45 ? "inline-" : "") + "box$3$1" + I + "$2$3$1" + H + "$2box$3") + e;
812
+ return j(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + O + (re(e, 14) === 45 ? "inline-" : "") + "box$3$1" + O + "$2$3$1" + ae + "$2box$3") + e;
813
813
  }
814
814
  break;
815
815
  // writing-mode
816
816
  case 5936:
817
- switch (q(e, t + 11)) {
817
+ switch (re(e, t + 11)) {
818
818
  // vertical-l(r)
819
819
  case 114:
820
- return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
820
+ return O + e + ae + j(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
821
821
  // vertical-r(l)
822
822
  case 108:
823
- return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
823
+ return O + e + ae + j(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
824
824
  // horizontal(-)tb
825
825
  case 45:
826
- return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
826
+ return O + e + ae + j(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
827
827
  }
828
- return I + e + H + e + e;
828
+ return O + e + ae + e + e;
829
829
  }
830
830
  return e;
831
831
  }
832
- var Qt = function(t, r, n, a) {
832
+ var hr = function(t, r, a, i) {
833
833
  if (t.length > -1 && !t.return) switch (t.type) {
834
- case We:
835
- t.return = yt(t.value, t.length);
834
+ case at:
835
+ t.return = kt(t.value, t.length);
836
836
  break;
837
- case ut:
838
- return pe([be(t, {
839
- value: S(t.value, "@", "@" + I)
840
- })], a);
841
- case ze:
842
- if (t.length) return Vt(t.props, function(i) {
843
- switch (Nt(i, /(::plac\w+|:read-\w+)/)) {
837
+ case St:
838
+ return Ie([je(t, {
839
+ value: j(t.value, "@", "@" + O)
840
+ })], i);
841
+ case nt:
842
+ if (t.length) return Kt(t.props, function(n) {
843
+ switch (Jt(n, /(::plac\w+|:read-\w+)/)) {
844
844
  // :read-(only|write)
845
845
  case ":read-only":
846
846
  case ":read-write":
847
- return pe([be(t, {
848
- props: [S(i, /:(read-\w+)/, ":" + Ae + "$1")]
849
- })], a);
847
+ return Ie([je(t, {
848
+ props: [j(n, /:(read-\w+)/, ":" + We + "$1")]
849
+ })], i);
850
850
  // :placeholder
851
851
  case "::placeholder":
852
- return pe([be(t, {
853
- props: [S(i, /:(plac\w+)/, ":" + I + "input-$1")]
854
- }), be(t, {
855
- props: [S(i, /:(plac\w+)/, ":" + Ae + "$1")]
856
- }), be(t, {
857
- props: [S(i, /:(plac\w+)/, H + "input-$1")]
858
- })], a);
852
+ return Ie([je(t, {
853
+ props: [j(n, /:(plac\w+)/, ":" + O + "input-$1")]
854
+ }), je(t, {
855
+ props: [j(n, /:(plac\w+)/, ":" + We + "$1")]
856
+ }), je(t, {
857
+ props: [j(n, /:(plac\w+)/, ae + "input-$1")]
858
+ })], i);
859
859
  }
860
860
  return "";
861
861
  });
862
862
  }
863
- }, er = [Qt], tr = function(t) {
863
+ }, mr = [hr], yr = function(t) {
864
864
  var r = t.key;
865
865
  if (r === "css") {
866
- var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
867
- Array.prototype.forEach.call(n, function(d) {
868
- var m = d.getAttribute("data-emotion");
869
- m.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
866
+ var a = document.querySelectorAll("style[data-emotion]:not([data-s])");
867
+ Array.prototype.forEach.call(a, function(d) {
868
+ var x = d.getAttribute("data-emotion");
869
+ x.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
870
870
  });
871
871
  }
872
- var a = t.stylisPlugins || er, i = {}, o, c = [];
873
- o = t.container || document.head, Array.prototype.forEach.call(
872
+ var i = t.stylisPlugins || mr, n = {}, s, l = [];
873
+ s = t.container || document.head, Array.prototype.forEach.call(
874
874
  // this means we will ignore elements which don't have a space in them which
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 m = d.getAttribute("data-emotion").split(" "), v = 1; v < m.length; v++)
879
- i[m[v]] = !0;
880
- c.push(d);
878
+ for (var x = d.getAttribute("data-emotion").split(" "), w = 1; w < x.length; w++)
879
+ n[x[w]] = !0;
880
+ l.push(d);
881
881
  }
882
882
  );
883
- var u, h = [Kt, Zt];
883
+ var c, y = [fr, pr];
884
884
  {
885
- var l, f = [Yt, Gt(function(d) {
886
- l.insert(d);
887
- })], w = qt(h.concat(a, f)), k = function(m) {
888
- return pe(zt(m), w);
885
+ var u, h = [or, lr(function(d) {
886
+ u.insert(d);
887
+ })], g = sr(y.concat(i, h)), _ = function(x) {
888
+ return Ie(ar(x), g);
889
889
  };
890
- u = function(m, v, E, O) {
891
- l = E, k(m ? m + "{" + v.styles + "}" : v.styles), O && (g.inserted[v.name] = !0);
890
+ c = function(x, w, I, L) {
891
+ u = I, _(x ? x + "{" + w.styles + "}" : w.styles), L && (E.inserted[w.name] = !0);
892
892
  };
893
893
  }
894
- var g = {
894
+ var E = {
895
895
  key: r,
896
- sheet: new Rt({
896
+ sheet: new qt({
897
897
  key: r,
898
- container: o,
898
+ container: s,
899
899
  nonce: t.nonce,
900
900
  speedy: t.speedy,
901
901
  prepend: t.prepend,
902
902
  insertionPoint: t.insertionPoint
903
903
  }),
904
904
  nonce: t.nonce,
905
- inserted: i,
905
+ inserted: n,
906
906
  registered: {},
907
- insert: u
907
+ insert: c
908
908
  };
909
- return g.sheet.hydrate(c), g;
910
- }, rr = !0;
911
- function nr(e, t, r) {
912
- var n = "";
913
- return r.split(" ").forEach(function(a) {
914
- e[a] !== void 0 ? t.push(e[a] + ";") : a && (n += a + " ");
915
- }), n;
909
+ return E.sheet.hydrate(l), E;
910
+ }, vr = !0;
911
+ function gr(e, t, r) {
912
+ var a = "";
913
+ return r.split(" ").forEach(function(i) {
914
+ e[i] !== void 0 ? t.push(e[i] + ";") : i && (a += i + " ");
915
+ }), a;
916
916
  }
917
- var vt = function(t, r, n) {
918
- var a = t.key + "-" + r.name;
917
+ var Ot = function(t, r, a) {
918
+ var i = t.key + "-" + r.name;
919
919
  // we only need to add the styles to the registered cache if the
920
920
  // class name could be used further down
921
921
  // the tree but if it's a string tag, we know it won't
922
922
  // so we don't have to add it to registered cache.
923
923
  // this improves memory usage since we can avoid storing the whole style string
924
- (n === !1 || // we need to always store it if we're in compat mode and
924
+ (a === !1 || // we need to always store it if we're in compat mode and
925
925
  // in node since emotion-server relies on whether a style is in
926
926
  // the registered cache to know whether a style is global or not
927
927
  // also, note that this check will be dead code eliminated in the browser
928
- rr === !1) && t.registered[a] === void 0 && (t.registered[a] = r.styles);
929
- }, ar = function(t, r, n) {
930
- vt(t, r, n);
931
- var a = t.key + "-" + r.name;
928
+ vr === !1) && t.registered[i] === void 0 && (t.registered[i] = r.styles);
929
+ }, xr = function(t, r, a) {
930
+ Ot(t, r, a);
931
+ var i = t.key + "-" + r.name;
932
932
  if (t.inserted[r.name] === void 0) {
933
- var i = r;
933
+ var n = r;
934
934
  do
935
- t.insert(r === i ? "." + a : "", i, t.sheet, !0), i = i.next;
936
- while (i !== void 0);
935
+ t.insert(r === n ? "." + i : "", n, t.sheet, !0), n = n.next;
936
+ while (n !== void 0);
937
937
  }
938
938
  };
939
- function ir(e) {
940
- for (var t = 0, r, n = 0, a = e.length; a >= 4; ++n, a -= 4)
941
- r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
939
+ function wr(e) {
940
+ for (var t = 0, r, a = 0, i = e.length; i >= 4; ++a, i -= 4)
941
+ r = e.charCodeAt(a) & 255 | (e.charCodeAt(++a) & 255) << 8 | (e.charCodeAt(++a) & 255) << 16 | (e.charCodeAt(++a) & 255) << 24, r = /* Math.imul(k, m): */
942
942
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
943
943
  r >>> 24, t = /* Math.imul(k, m): */
944
944
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
945
945
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
946
- switch (a) {
946
+ switch (i) {
947
947
  case 3:
948
- t ^= (e.charCodeAt(n + 2) & 255) << 16;
948
+ t ^= (e.charCodeAt(a + 2) & 255) << 16;
949
949
  case 2:
950
- t ^= (e.charCodeAt(n + 1) & 255) << 8;
950
+ t ^= (e.charCodeAt(a + 1) & 255) << 8;
951
951
  case 1:
952
- t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
952
+ t ^= e.charCodeAt(a) & 255, t = /* Math.imul(h, m): */
953
953
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
954
954
  }
955
955
  return t ^= t >>> 13, t = /* Math.imul(h, m): */
956
956
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
957
957
  }
958
- var or = {
958
+ var br = {
959
959
  animationIterationCount: 1,
960
960
  aspectRatio: 1,
961
961
  borderImageOutset: 1,
@@ -1004,221 +1004,221 @@ var or = {
1004
1004
  strokeMiterlimit: 1,
1005
1005
  strokeOpacity: 1,
1006
1006
  strokeWidth: 1
1007
- }, sr = /[A-Z]|^ms/g, cr = /_EMO_([^_]+?)_([^]*?)_EMO_/g, gt = function(t) {
1007
+ }, Er = /[A-Z]|^ms/g, Pr = /_EMO_([^_]+?)_([^]*?)_EMO_/g, jt = function(t) {
1008
1008
  return t.charCodeAt(1) === 45;
1009
- }, et = function(t) {
1009
+ }, mt = function(t) {
1010
1010
  return t != null && typeof t != "boolean";
1011
- }, Ne = /* @__PURE__ */ mt(function(e) {
1012
- return gt(e) ? e : e.replace(sr, "-$&").toLowerCase();
1013
- }), tt = function(t, r) {
1011
+ }, Xe = /* @__PURE__ */ At(function(e) {
1012
+ return jt(e) ? e : e.replace(Er, "-$&").toLowerCase();
1013
+ }), yt = function(t, r) {
1014
1014
  switch (t) {
1015
1015
  case "animation":
1016
1016
  case "animationName":
1017
1017
  if (typeof r == "string")
1018
- return r.replace(cr, function(n, a, i) {
1019
- return oe = {
1020
- name: a,
1021
- styles: i,
1022
- next: oe
1023
- }, a;
1018
+ return r.replace(Pr, function(a, i, n) {
1019
+ return he = {
1020
+ name: i,
1021
+ styles: n,
1022
+ next: he
1023
+ }, i;
1024
1024
  });
1025
1025
  }
1026
- return or[t] !== 1 && !gt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
1026
+ return br[t] !== 1 && !jt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
1027
1027
  };
1028
- function Pe(e, t, r) {
1028
+ function Ne(e, t, r) {
1029
1029
  if (r == null)
1030
1030
  return "";
1031
- var n = r;
1032
- if (n.__emotion_styles !== void 0)
1033
- return n;
1031
+ var a = r;
1032
+ if (a.__emotion_styles !== void 0)
1033
+ return a;
1034
1034
  switch (typeof r) {
1035
1035
  case "boolean":
1036
1036
  return "";
1037
1037
  case "object": {
1038
- var a = r;
1039
- if (a.anim === 1)
1040
- return oe = {
1041
- name: a.name,
1042
- styles: a.styles,
1043
- next: oe
1044
- }, a.name;
1045
1038
  var i = r;
1046
- if (i.styles !== void 0) {
1047
- var o = i.next;
1048
- if (o !== void 0)
1049
- for (; o !== void 0; )
1050
- oe = {
1051
- name: o.name,
1052
- styles: o.styles,
1053
- next: oe
1054
- }, o = o.next;
1055
- var c = i.styles + ";";
1056
- return c;
1039
+ if (i.anim === 1)
1040
+ return he = {
1041
+ name: i.name,
1042
+ styles: i.styles,
1043
+ next: he
1044
+ }, i.name;
1045
+ var n = r;
1046
+ if (n.styles !== void 0) {
1047
+ var s = n.next;
1048
+ if (s !== void 0)
1049
+ for (; s !== void 0; )
1050
+ he = {
1051
+ name: s.name,
1052
+ styles: s.styles,
1053
+ next: he
1054
+ }, s = s.next;
1055
+ var l = n.styles + ";";
1056
+ return l;
1057
1057
  }
1058
- return lr(e, t, r);
1058
+ return _r(e, t, r);
1059
1059
  }
1060
1060
  case "function": {
1061
1061
  if (e !== void 0) {
1062
- var u = oe, h = r(e);
1063
- return oe = u, Pe(e, t, h);
1062
+ var c = he, y = r(e);
1063
+ return he = c, Ne(e, t, y);
1064
1064
  }
1065
1065
  break;
1066
1066
  }
1067
1067
  }
1068
- var l = r;
1068
+ var u = r;
1069
1069
  if (t == null)
1070
- return l;
1071
- var f = t[l];
1072
- return f !== void 0 ? f : l;
1070
+ return u;
1071
+ var h = t[u];
1072
+ return h !== void 0 ? h : u;
1073
1073
  }
1074
- function lr(e, t, r) {
1075
- var n = "";
1074
+ function _r(e, t, r) {
1075
+ var a = "";
1076
1076
  if (Array.isArray(r))
1077
- for (var a = 0; a < r.length; a++)
1078
- n += Pe(e, t, r[a]) + ";";
1077
+ for (var i = 0; i < r.length; i++)
1078
+ a += Ne(e, t, r[i]) + ";";
1079
1079
  else
1080
- for (var i in r) {
1081
- var o = r[i];
1082
- if (typeof o != "object") {
1083
- var c = o;
1084
- t != null && t[c] !== void 0 ? n += i + "{" + t[c] + "}" : et(c) && (n += Ne(i) + ":" + tt(i, c) + ";");
1085
- } else if (Array.isArray(o) && typeof o[0] == "string" && (t == null || t[o[0]] === void 0))
1086
- for (var u = 0; u < o.length; u++)
1087
- et(o[u]) && (n += Ne(i) + ":" + tt(i, o[u]) + ";");
1080
+ for (var n in r) {
1081
+ var s = r[n];
1082
+ if (typeof s != "object") {
1083
+ var l = s;
1084
+ t != null && t[l] !== void 0 ? a += n + "{" + t[l] + "}" : mt(l) && (a += Xe(n) + ":" + yt(n, l) + ";");
1085
+ } else if (Array.isArray(s) && typeof s[0] == "string" && (t == null || t[s[0]] === void 0))
1086
+ for (var c = 0; c < s.length; c++)
1087
+ mt(s[c]) && (a += Xe(n) + ":" + yt(n, s[c]) + ";");
1088
1088
  else {
1089
- var h = Pe(e, t, o);
1090
- switch (i) {
1089
+ var y = Ne(e, t, s);
1090
+ switch (n) {
1091
1091
  case "animation":
1092
1092
  case "animationName": {
1093
- n += Ne(i) + ":" + h + ";";
1093
+ a += Xe(n) + ":" + y + ";";
1094
1094
  break;
1095
1095
  }
1096
1096
  default:
1097
- n += i + "{" + h + "}";
1097
+ a += n + "{" + y + "}";
1098
1098
  }
1099
1099
  }
1100
1100
  }
1101
- return n;
1101
+ return a;
1102
1102
  }
1103
- var rt = /label:\s*([^\s;{]+)\s*(;|$)/g, oe;
1104
- function ur(e, t, r) {
1103
+ var vt = /label:\s*([^\s;{]+)\s*(;|$)/g, he;
1104
+ function Sr(e, t, r) {
1105
1105
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
1106
1106
  return e[0];
1107
- var n = !0, a = "";
1108
- oe = void 0;
1109
- var i = e[0];
1110
- if (i == null || i.raw === void 0)
1111
- n = !1, a += Pe(r, t, i);
1107
+ var a = !0, i = "";
1108
+ he = void 0;
1109
+ var n = e[0];
1110
+ if (n == null || n.raw === void 0)
1111
+ a = !1, i += Ne(r, t, n);
1112
1112
  else {
1113
- var o = i;
1114
- a += o[0];
1113
+ var s = n;
1114
+ i += s[0];
1115
1115
  }
1116
- for (var c = 1; c < e.length; c++)
1117
- if (a += Pe(r, t, e[c]), n) {
1118
- var u = i;
1119
- a += u[c];
1116
+ for (var l = 1; l < e.length; l++)
1117
+ if (i += Ne(r, t, e[l]), a) {
1118
+ var c = n;
1119
+ i += c[l];
1120
1120
  }
1121
- rt.lastIndex = 0;
1122
- for (var h = "", l; (l = rt.exec(a)) !== null; )
1123
- h += "-" + l[1];
1124
- var f = ir(a) + h;
1121
+ vt.lastIndex = 0;
1122
+ for (var y = "", u; (u = vt.exec(i)) !== null; )
1123
+ y += "-" + u[1];
1124
+ var h = wr(i) + y;
1125
1125
  return {
1126
- name: f,
1127
- styles: a,
1128
- next: oe
1126
+ name: h,
1127
+ styles: i,
1128
+ next: he
1129
1129
  };
1130
1130
  }
1131
- var dr = function(t) {
1131
+ var Ir = function(t) {
1132
1132
  return t();
1133
- }, fr = le.useInsertionEffect ? le.useInsertionEffect : !1, pr = fr || dr, bt = /* @__PURE__ */ le.createContext(
1133
+ }, Cr = ve.useInsertionEffect ? ve.useInsertionEffect : !1, Rr = Cr || Ir, Vt = /* @__PURE__ */ ve.createContext(
1134
1134
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1135
1135
  // because this module is primarily intended for the browser and node
1136
1136
  // but it's also required in react native and similar environments sometimes
1137
1137
  // and we could have a special build just for that
1138
1138
  // but this is much easier and the native packages
1139
1139
  // might use a different theme context in the future anyway
1140
- typeof HTMLElement < "u" ? /* @__PURE__ */ tr({
1140
+ typeof HTMLElement < "u" ? /* @__PURE__ */ yr({
1141
1141
  key: "css"
1142
1142
  }) : null
1143
1143
  );
1144
- bt.Provider;
1145
- var hr = function(t) {
1146
- return /* @__PURE__ */ kt(function(r, n) {
1147
- var a = st(bt);
1148
- return t(r, a, n);
1144
+ Vt.Provider;
1145
+ var Tr = function(t) {
1146
+ return /* @__PURE__ */ Nt(function(r, a) {
1147
+ var i = Et(Vt);
1148
+ return t(r, i, a);
1149
1149
  });
1150
- }, mr = /* @__PURE__ */ le.createContext({}), yr = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, vr = /* @__PURE__ */ mt(
1150
+ }, Ar = /* @__PURE__ */ ve.createContext({}), kr = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Or = /* @__PURE__ */ At(
1151
1151
  function(e) {
1152
- return yr.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
1152
+ return kr.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
1153
1153
  }
1154
1154
  /* Z+1 */
1155
- ), gr = vr, br = function(t) {
1155
+ ), jr = Or, Vr = function(t) {
1156
1156
  return t !== "theme";
1157
- }, nt = function(t) {
1157
+ }, gt = function(t) {
1158
1158
  return typeof t == "string" && // 96 is one less than the char code
1159
1159
  // for "a" so this is checking that
1160
1160
  // it's a lowercase character
1161
- t.charCodeAt(0) > 96 ? gr : br;
1162
- }, at = function(t, r, n) {
1163
- var a;
1161
+ t.charCodeAt(0) > 96 ? jr : Vr;
1162
+ }, xt = function(t, r, a) {
1163
+ var i;
1164
1164
  if (r) {
1165
- var i = r.shouldForwardProp;
1166
- a = t.__emotion_forwardProp && i ? function(o) {
1167
- return t.__emotion_forwardProp(o) && i(o);
1168
- } : i;
1165
+ var n = r.shouldForwardProp;
1166
+ i = t.__emotion_forwardProp && n ? function(s) {
1167
+ return t.__emotion_forwardProp(s) && n(s);
1168
+ } : n;
1169
1169
  }
1170
- return typeof a != "function" && n && (a = t.__emotion_forwardProp), a;
1171
- }, xr = function(t) {
1172
- var r = t.cache, n = t.serialized, a = t.isStringTag;
1173
- return vt(r, n, a), pr(function() {
1174
- return ar(r, n, a);
1170
+ return typeof i != "function" && a && (i = t.__emotion_forwardProp), i;
1171
+ }, Lr = function(t) {
1172
+ var r = t.cache, a = t.serialized, i = t.isStringTag;
1173
+ return Ot(r, a, i), Rr(function() {
1174
+ return xr(r, a, i);
1175
1175
  }), null;
1176
- }, wr = function e(t, r) {
1177
- var n = t.__emotion_real === t, a = n && t.__emotion_base || t, i, o;
1178
- r !== void 0 && (i = r.label, o = r.target);
1179
- var c = at(t, r, n), u = c || nt(a), h = !u("as");
1176
+ }, $r = function e(t, r) {
1177
+ var a = t.__emotion_real === t, i = a && t.__emotion_base || t, n, s;
1178
+ r !== void 0 && (n = r.label, s = r.target);
1179
+ var l = xt(t, r, a), c = l || gt(i), y = !c("as");
1180
1180
  return function() {
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);
1181
+ var u = arguments, h = a && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
1182
+ if (n !== void 0 && h.push("label:" + n + ";"), u[0] == null || u[0].raw === void 0)
1183
+ h.push.apply(h, u);
1184
1184
  else {
1185
- var w = l[0];
1186
- f.push(w[0]);
1187
- for (var k = l.length, g = 1; g < k; g++)
1188
- f.push(l[g], w[g]);
1185
+ var g = u[0];
1186
+ h.push(g[0]);
1187
+ for (var _ = u.length, E = 1; E < _; E++)
1188
+ h.push(u[E], g[E]);
1189
1189
  }
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);
1190
+ var d = Tr(function(x, w, I) {
1191
+ var L = y && x.as || i, T = "", B = [], V = x;
1192
+ if (x.theme == null) {
1193
+ V = {};
1194
+ for (var b in x)
1195
+ V[b] = x[b];
1196
+ V.theme = ve.useContext(Ar);
1197
1197
  }
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
- T += v.key + "-" + G.name, o !== void 0 && (T += " " + o);
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
- cache: v,
1206
- serialized: G,
1207
- isStringTag: typeof O == "string"
1208
- }), /* @__PURE__ */ le.createElement(O, P));
1198
+ typeof x.className == "string" ? T = gr(w.registered, B, x.className) : x.className != null && (T = x.className + " ");
1199
+ var Q = Sr(h.concat(B), w.registered, V);
1200
+ T += w.key + "-" + Q.name, s !== void 0 && (T += " " + s);
1201
+ var q = y && l === void 0 ? gt(L) : c, f = {};
1202
+ for (var v in x)
1203
+ y && v === "as" || q(v) && (f[v] = x[v]);
1204
+ return f.className = T, I && (f.ref = I), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement(Lr, {
1205
+ cache: w,
1206
+ serialized: Q,
1207
+ isStringTag: typeof L == "string"
1208
+ }), /* @__PURE__ */ ve.createElement(L, f));
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 = f, d.__emotion_forwardProp = c, Object.defineProperty(d, "toString", {
1210
+ return d.displayName = n !== void 0 ? n : "Styled(" + (typeof i == "string" ? i : i.displayName || i.name || "Component") + ")", d.defaultProps = t.defaultProps, d.__emotion_real = d, d.__emotion_base = i, d.__emotion_styles = h, d.__emotion_forwardProp = l, Object.defineProperty(d, "toString", {
1211
1211
  value: function() {
1212
- return "." + o;
1212
+ return "." + s;
1213
1213
  }
1214
- }), d.withComponent = function(m, v) {
1215
- var E = e(m, Be({}, r, v, {
1216
- shouldForwardProp: at(d, v, !0)
1214
+ }), d.withComponent = function(x, w) {
1215
+ var I = e(x, Ze({}, r, w, {
1216
+ shouldForwardProp: xt(d, w, !0)
1217
1217
  }));
1218
- return E.apply(void 0, f);
1218
+ return I.apply(void 0, h);
1219
1219
  }, d;
1220
1220
  };
1221
- }, kr = [
1221
+ }, Nr = [
1222
1222
  "a",
1223
1223
  "abbr",
1224
1224
  "address",
@@ -1354,11 +1354,11 @@ var hr = function(t) {
1354
1354
  "svg",
1355
1355
  "text",
1356
1356
  "tspan"
1357
- ], me = wr.bind(null);
1358
- kr.forEach(function(e) {
1359
- me[e] = me(e);
1357
+ ], Re = $r.bind(null);
1358
+ Nr.forEach(function(e) {
1359
+ Re[e] = Re(e);
1360
1360
  });
1361
- const Er = me.div`
1361
+ const Fr = Re.div`
1362
1362
  display: flex;
1363
1363
  align-items: center;
1364
1364
  justify-content: center;
@@ -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 }) => 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`
1402
+ `, rt = ({ type: e, children: t, className: r, icon: a, action: i }) => K.jsxs(Fr, { type: e, className: r, children: [a && K.jsx("span", { children: a }), K.jsx("span", { children: t }), i && K.jsx("span", { children: i })] }), wt = Re.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 */
@@ -1411,7 +1411,7 @@ const Er = me.div`
1411
1411
 
1412
1412
  /* Hide specific elements inside the player */
1413
1413
  ${({ $hiddenClasses: e }) => (e == null ? void 0 : e.length) && e.map((t) => `.${t} { display: none !important; }`).join("")}
1414
- `, Pr = me.div`
1414
+ `, Br = Re.div`
1415
1415
  position: fixed;
1416
1416
  top: 0;
1417
1417
  left: 0;
@@ -1423,153 +1423,306 @@ const Er = me.div`
1423
1423
  align-items: center;
1424
1424
  z-index: 1000;
1425
1425
  pointer-events: auto;
1426
- `, _r = me.div`
1426
+ `, Dr = Re.div`
1427
1427
  position: relative;
1428
1428
  max-width: 100vw;
1429
1429
  aspect-ratio: 9 / 16;
1430
1430
  height: auto;
1431
1431
  z-index: 1001;
1432
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) => {
1434
- const [r, n] = ne(!1), [a, i] = ne(null);
1435
- return we(() => {
1436
- let o = null, c, u = 0;
1437
- const h = 3;
1438
- let l;
1433
+ `, Mr = (e, t) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`, bt = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`, Ur = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`, zr = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, ot = (e, t) => `vp-player-${e || "default"}-${t || ""}`, Je = /* @__PURE__ */ new Map(), qr = (e, t) => {
1434
+ const [r, a] = ce(!1), [i, n] = ce(null);
1435
+ return Se(() => {
1436
+ let s = null, l, c = 0;
1437
+ const y = 3;
1438
+ let u;
1439
1439
  try {
1440
- l = t || Tr(e || "latest");
1441
- } catch (k) {
1442
- const g = k instanceof Error ? k.message : String(k);
1443
- i(`Failed to resolve script URL: ${g}`), n(!1);
1440
+ u = t || zr(e || "latest");
1441
+ } catch (_) {
1442
+ const E = _ instanceof Error ? _.message : String(_);
1443
+ n(`Failed to resolve script URL: ${E}`), a(!1);
1444
1444
  return;
1445
1445
  }
1446
- if (Ve.get(l)) {
1447
- n(!0), i(null);
1446
+ if (Je.get(u)) {
1447
+ a(!0), n(null);
1448
1448
  return;
1449
1449
  }
1450
- if (document.querySelector(`script[src="${l}"]`)) {
1451
- Ve.set(l, !0), n(!0), i(null);
1450
+ if (document.querySelector(`script[src="${u}"]`)) {
1451
+ Je.set(u, !0), a(!0), n(null);
1452
1452
  return;
1453
1453
  }
1454
- const w = () => {
1455
- o = document.createElement("script"), o.src = l, o.async = !0, c = window.setTimeout(() => {
1456
- n(!1), i(`Loading script timed out: ${l}`);
1457
- }, 1e4), o.onload = () => {
1458
- clearTimeout(c), Ve.set(l, !0), n(!0), i(null);
1459
- }, o.onerror = () => {
1460
- clearTimeout(c), u++, u < h ? setTimeout(w, 1e3 * u) : (n(!1), i(`Failed to load VP Player script after ${h} attempts: ${l}`));
1461
- }, document.body.appendChild(o);
1454
+ const g = () => {
1455
+ s = document.createElement("script"), s.src = u, s.async = !0, l = window.setTimeout(() => {
1456
+ a(!1), n(`Loading script timed out: ${u}`);
1457
+ }, 1e4), s.onload = () => {
1458
+ clearTimeout(l), Je.set(u, !0), a(!0), n(null);
1459
+ }, s.onerror = () => {
1460
+ clearTimeout(l), c++, c < y ? setTimeout(g, 1e3 * c) : (a(!1), n(`Failed to load VP Player script after ${y} attempts: ${u}`));
1461
+ }, document.body.appendChild(s);
1462
1462
  };
1463
- return w(), () => {
1464
- clearTimeout(c), o && document.body.contains(o) && document.body.removeChild(o);
1463
+ return g(), () => {
1464
+ clearTimeout(l), s && document.body.contains(s) && document.body.removeChild(s);
1465
1465
  };
1466
- }, [e, t]), { isLoaded: r, error: a };
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);
1469
- return we(() => {
1470
- const g = t ? `video:${t}` : r ? `playlist:${r}` : null;
1471
- if (!e || n || !t && !r) {
1472
- o(n || null), u(null), l(!1), w(null);
1466
+ }, [e, t]), { isLoaded: r, error: i };
1467
+ }, Wr = {}, Ve = /* @__PURE__ */ new Map(), Yr = 3e4, Ke = 5, Gr = ({ projectId: e, videoId: t, playlistId: r, videoUrl: a, apiKey: i }) => {
1468
+ const [n, s] = ce(null), [l, c] = ce(null), [y, u] = ce(!1), [h, g] = ce(null), _ = i || (typeof Wr < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
1469
+ return Se(() => {
1470
+ const E = t ? `video:${t}` : r ? `playlist:${r}` : null;
1471
+ if (!e || a || !t && !r) {
1472
+ s(a || null), c(null), u(!1), g(null);
1473
1473
  return;
1474
1474
  }
1475
- if (!k) {
1476
- l(!1), w("No API key provided");
1475
+ if (!_) {
1476
+ u(!1), g("No API key provided");
1477
1477
  return;
1478
1478
  }
1479
- if (g && xe.has(g)) {
1480
- const T = xe.get(g);
1481
- o(T.url), u(T.playlist), l(!1), w(null);
1479
+ if (E && Ve.has(E)) {
1480
+ const T = Ve.get(E);
1481
+ s(T.url), c(T.playlist), u(!1), g(null);
1482
1482
  return;
1483
1483
  }
1484
1484
  let d = !0;
1485
- const m = new AbortController(), v = m.signal, O = setTimeout(async () => {
1486
- var j, $, y, G;
1485
+ const x = new AbortController(), w = x.signal, L = setTimeout(async () => {
1486
+ var B, V, b, Q;
1487
1487
  if (!d)
1488
1488
  return;
1489
- l(!0), w(null);
1489
+ u(!0), g(null);
1490
1490
  let T = 0;
1491
- for (; T < Le && d; )
1491
+ for (; T < Ke && d; )
1492
1492
  try {
1493
- const V = t && !r ? Ir(e, t) : ot(e, r), P = setTimeout(() => m.abort(), Ar), U = await fetch(V, {
1493
+ const q = t && !r ? Mr(e, t) : bt(e, r), f = setTimeout(() => x.abort(), Yr), v = await fetch(q, {
1494
1494
  method: "GET",
1495
1495
  headers: {
1496
- "api-key": k,
1496
+ "api-key": _,
1497
1497
  Accept: "application/json",
1498
1498
  "Cache-Control": "no-cache"
1499
1499
  // Prevent caching issues
1500
1500
  },
1501
- signal: v
1501
+ signal: w
1502
1502
  });
1503
- if (clearTimeout(P), !U.ok)
1504
- throw new Error(`Fetch failed with status ${U.status}`);
1505
- const _ = await U.json();
1503
+ if (clearTimeout(f), !v.ok)
1504
+ throw new Error(`Fetch failed with status ${v.status}`);
1505
+ const P = await v.json();
1506
1506
  if (!d)
1507
1507
  return;
1508
1508
  if (t && !r) {
1509
- const M = ($ = (j = _.result) == null ? void 0 : j.items) == null ? void 0 : $.find((F) => F.mediaId === t);
1510
- if (!(M != null && M.playbackUrl))
1509
+ const $ = (V = (B = P.result) == null ? void 0 : B.items) == null ? void 0 : V.find((D) => D.mediaId === t);
1510
+ if (!($ != null && $.playbackUrl))
1511
1511
  throw new Error("Invalid video data");
1512
- o(M.playbackUrl), u(null), g && xe.set(g, { url: M.playbackUrl, playlist: null });
1512
+ s($.playbackUrl), c(null), E && Ve.set(E, { url: $.playbackUrl, playlist: null });
1513
1513
  } else {
1514
- if (!Array.isArray(_.result))
1514
+ if (!Array.isArray(P.result))
1515
1515
  throw new Error("Invalid playlist format");
1516
- const M = Sr(e, r), F = await fetch(M, {
1516
+ const $ = Ur(e, r), D = await fetch($, {
1517
1517
  method: "GET",
1518
1518
  headers: {
1519
- "api-key": k,
1519
+ "api-key": _,
1520
1520
  Accept: "application/json",
1521
1521
  "Cache-Control": "no-cache"
1522
1522
  },
1523
- signal: v
1523
+ signal: w
1524
1524
  });
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, {
1525
+ if (D.ok) {
1526
+ const U = await D.json();
1527
+ let M = [...P.result];
1528
+ if ((b = U.result) != null && b.playlistBackupState && ((Q = U.result) != null && Q.playlistBackupId)) {
1529
+ const W = bt(e, U.result.playlistBackupId), z = await fetch(W, {
1530
1530
  method: "GET",
1531
1531
  headers: {
1532
- "api-key": k,
1532
+ "api-key": _,
1533
1533
  Accept: "application/json",
1534
1534
  "Cache-Control": "no-cache"
1535
1535
  },
1536
- signal: v
1536
+ signal: w
1537
1537
  });
1538
- if (te.ok) {
1539
- const re = await te.json();
1540
- if (Array.isArray(re.result)) {
1541
- const s = re.result.map((x) => ({
1542
- ...x,
1538
+ if (z.ok) {
1539
+ const p = await z.json();
1540
+ if (Array.isArray(p.result)) {
1541
+ const o = p.result.map((m) => ({
1542
+ ...m,
1543
1543
  isBackupPlaylist: !0
1544
1544
  }));
1545
- Q = [...Q, ...s];
1545
+ M = [...M, ...o];
1546
1546
  }
1547
1547
  }
1548
1548
  }
1549
- u(Q), o(null), g && xe.set(g, { url: null, playlist: Q });
1549
+ c(M), s(null), E && Ve.set(E, { url: null, playlist: M });
1550
1550
  } else
1551
- u(_.result), o(null), g && xe.set(g, { url: null, playlist: _.result });
1551
+ c(P.result), s(null), E && Ve.set(E, { url: null, playlist: P.result });
1552
1552
  }
1553
1553
  break;
1554
- } catch (V) {
1555
- if (v.aborted) {
1556
- d && w("Request timed out");
1554
+ } catch (q) {
1555
+ if (w.aborted) {
1556
+ d && g("Request timed out");
1557
1557
  break;
1558
1558
  }
1559
- if (T++, T >= Le) {
1560
- const P = V instanceof Error ? V.message : String(V);
1561
- d && w(`Failed after ${Le} attempts: ${P}`);
1559
+ if (T++, T >= Ke) {
1560
+ const f = q instanceof Error ? q.message : String(q);
1561
+ d && g(`Failed after ${Ke} attempts: ${f}`);
1562
1562
  } else
1563
- await new Promise((P) => setTimeout(P, 2e3));
1563
+ await new Promise((f) => setTimeout(f, 2e3));
1564
1564
  }
1565
- d && l(!1);
1565
+ d && u(!1);
1566
1566
  }, 100);
1567
1567
  return () => {
1568
- d = !1, clearTimeout(O), m.abort();
1568
+ d = !1, clearTimeout(L), x.abort();
1569
+ };
1570
+ }, [_, e, t, r, a]), { fetchedPlaybackUrl: n, fetchedPlaylist: l, isLoading: y, error: h };
1571
+ }, Hr = ({ playerId: e, playerInstanceRef: t, playerRef: r, videoData: a, trackingMetadata: i, callbacks: n }) => {
1572
+ const s = te(!1), l = te(!1), c = te(!1), y = te(0), u = te({}), h = te(null), g = te(null), _ = te(null), E = te(null), d = te(!1);
1573
+ Se(() => {
1574
+ if (!(n && (n.onPlayerStart || n.onPlayerPlay || n.onPlayerPause || n.onPlayerResume || n.onPlayerEnd || n.onPlayerProgressEvery10Seconds || n.onPlayerProgressAt20Seconds || n.onPlayerQuartile25 || n.onPlayerQuartile50 || n.onPlayerQuartile75 || n.onPlayerNext || n.onPlayerPrevious || n.onPlayerEvent)))
1575
+ return;
1576
+ (() => {
1577
+ s.current = !1, l.current = !1, c.current = !1, y.current = 0, u.current = {};
1578
+ })();
1579
+ const I = () => {
1580
+ var P;
1581
+ const f = document.getElementById(e);
1582
+ if (!f)
1583
+ return null;
1584
+ if (f.querySelectorAll("video").length > 1 && t.current) {
1585
+ const $ = t.current, D = $.videoIndex ?? ((P = $.playlist) == null ? void 0 : P.playlistVideoIndex) ?? 0, U = f.querySelector(`video[id="${D}"]`);
1586
+ if (U)
1587
+ return U;
1588
+ const M = f.querySelector("video.active");
1589
+ if (M)
1590
+ return M;
1591
+ }
1592
+ return f.querySelector("video");
1593
+ }, L = () => {
1594
+ const f = I();
1595
+ if (!f)
1596
+ return !1;
1597
+ const v = (p, o) => {
1598
+ var A, C, Y, J, X, de, N, Z, fe, ne, we, Be, se, ge;
1599
+ const m = Date.now();
1600
+ if (!(p === "player_start" && s.current)) {
1601
+ switch (E.current = { type: p, time: m }, p) {
1602
+ case "player_start":
1603
+ (A = n.onPlayerStart) == null || A.call(n, p);
1604
+ break;
1605
+ case "player_play":
1606
+ (C = n.onPlayerPlay) == null || C.call(n, p);
1607
+ break;
1608
+ case "player_pause":
1609
+ (Y = n.onPlayerPause) == null || Y.call(n, p);
1610
+ break;
1611
+ case "player_resume":
1612
+ (J = n.onPlayerResume) == null || J.call(n, p);
1613
+ break;
1614
+ case "player_end":
1615
+ (X = n.onPlayerEnd) == null || X.call(n, p);
1616
+ break;
1617
+ case "player_progress_every_10_seconds":
1618
+ o !== void 0 && ((de = n.onPlayerProgressEvery10Seconds) == null || de.call(n, p, o));
1619
+ break;
1620
+ case "player_progress_at_20_seconds":
1621
+ o !== void 0 && ((N = n.onPlayerProgressAt20Seconds) == null || N.call(n, p, o));
1622
+ break;
1623
+ case "player_quartile_25":
1624
+ o !== void 0 && ((Z = n.onPlayerQuartile25) == null || Z.call(n, p, o));
1625
+ break;
1626
+ case "player_quartile_50":
1627
+ o !== void 0 && ((fe = n.onPlayerQuartile50) == null || fe.call(n, p, o));
1628
+ break;
1629
+ case "player_quartile_75":
1630
+ o !== void 0 && ((ne = n.onPlayerQuartile75) == null || ne.call(n, p, o));
1631
+ break;
1632
+ case "player_next":
1633
+ (we = n.onPlayerNext) == null || we.call(n, p);
1634
+ break;
1635
+ case "player_previous":
1636
+ (Be = n.onPlayerPrevious) == null || Be.call(n, p);
1637
+ break;
1638
+ }
1639
+ o !== void 0 && (p === "player_progress_every_10_seconds" || p === "player_progress_at_20_seconds" || p === "player_quartile_25" || p === "player_quartile_50" || p === "player_quartile_75") ? (se = n.onPlayerEvent) == null || se.call(n, p, o) : (ge = n.onPlayerEvent) == null || ge.call(n, p);
1640
+ }
1641
+ }, P = () => {
1642
+ s.current || (v("player_start"), s.current = !0, f.readyState >= 2 && !f.paused && setTimeout(() => {
1643
+ !l.current && !f.paused && (v("player_play"), l.current = !0, c.current = !1);
1644
+ }, 100));
1645
+ }, $ = () => {
1646
+ c.current ? v("player_resume") : l.current ? v("player_play") : (v("player_play"), l.current = !0), c.current = !1;
1647
+ }, D = () => {
1648
+ f.ended || d.current || setTimeout(() => {
1649
+ var p;
1650
+ if (!d.current) {
1651
+ if (t.current && g.current !== null) {
1652
+ const o = t.current;
1653
+ if ((o.videoIndex ?? ((p = o.playlist) == null ? void 0 : p.playlistVideoIndex) ?? 0) !== g.current)
1654
+ return;
1655
+ }
1656
+ v("player_pause"), c.current = !0;
1657
+ }
1658
+ }, 200);
1659
+ }, U = () => {
1660
+ v("player_end");
1661
+ }, M = () => {
1662
+ s.current && !l.current && f.currentTime >= 1 && f.currentTime < 1.5 && !f.paused && (v("player_play"), l.current = !0, c.current = !1);
1663
+ const p = f.duration > 0 ? f.currentTime / f.duration * 100 : 0, o = Math.floor(f.currentTime);
1664
+ o - y.current >= 10 && (y.current = o, v("player_progress_every_10_seconds", o)), o >= 20 && !u.current[20] && (u.current[20] = !0, v("player_progress_at_20_seconds", o)), p >= 25 && !u.current[25] && (u.current[25] = !0, v("player_quartile_25", o)), p >= 50 && !u.current[50] && (u.current[50] = !0, v("player_quartile_50", o)), p >= 75 && !u.current[75] && (u.current[75] = !0, v("player_quartile_75", o));
1665
+ };
1666
+ if (_.current && _.current !== f) {
1667
+ const p = _.current;
1668
+ p.removeEventListener("loadedmetadata", P), p.removeEventListener("play", $), p.removeEventListener("pause", D), p.removeEventListener("ended", U), p.removeEventListener("timeupdate", M);
1669
+ }
1670
+ _.current = f, f.addEventListener("loadedmetadata", P), f.addEventListener("play", $), f.addEventListener("pause", D), f.addEventListener("ended", U), f.addEventListener("timeupdate", M), f.readyState >= 1 && P();
1671
+ const W = document.getElementById(e), z = (p) => {
1672
+ const o = p.target;
1673
+ (o.closest(".vp-next") || o.closest(".vrt-icon-down") || o.closest(".vrt-arrow.vrt-icon-down")) && (d.current = !0, v("player_next"), setTimeout(() => {
1674
+ d.current = !1;
1675
+ }, 500)), (o.closest(".vp-prev") || o.closest(".vp-previous") || o.closest(".vrt-icon-up") || o.closest(".vrt-arrow.vrt-icon-up")) && (d.current = !0, v("player_previous"), setTimeout(() => {
1676
+ d.current = !1;
1677
+ }, 500));
1678
+ };
1679
+ return W && W.addEventListener("click", z, !0), h.current = () => {
1680
+ const p = _.current || f;
1681
+ p.removeEventListener("loadedmetadata", P), p.removeEventListener("play", $), p.removeEventListener("pause", D), p.removeEventListener("ended", U), p.removeEventListener("timeupdate", M), W == null || W.removeEventListener("click", z, !0), _.current = null;
1682
+ }, !0;
1683
+ };
1684
+ let T = null, B = !1;
1685
+ const V = () => {
1686
+ if (!t.current)
1687
+ return;
1688
+ const f = t.current, v = document.getElementById(e), P = v == null ? void 0 : v.querySelectorAll("video");
1689
+ P && P.length > 1 && f.videoIndex !== void 0 && (T = window.setInterval(() => {
1690
+ var D, U, M, W;
1691
+ try {
1692
+ const z = f.videoIndex ?? ((D = f.playlist) == null ? void 0 : D.playlistVideoIndex) ?? 0;
1693
+ if (g.current !== null && z !== g.current) {
1694
+ const p = z > g.current, o = p ? "player_next" : "player_previous";
1695
+ n && !d.current && (p ? (U = n.onPlayerNext) == null || U.call(n, o) : (M = n.onPlayerPrevious) == null || M.call(n, o), (W = n.onPlayerEvent) == null || W.call(n, o)), d.current = !0, h.current && (h.current(), h.current = null), s.current = !1, l.current = !1, c.current = !1, y.current = 0, u.current = {}, _.current = null, setTimeout(() => {
1696
+ L(), setTimeout(() => {
1697
+ d.current = !1;
1698
+ }, 200);
1699
+ }, 100);
1700
+ }
1701
+ g.current = z;
1702
+ } catch {
1703
+ }
1704
+ }, 500));
1705
+ };
1706
+ let b = 0;
1707
+ const Q = 20, q = setInterval(() => {
1708
+ b++, L() && !B ? (B = !0, clearInterval(q), setTimeout(() => {
1709
+ V();
1710
+ }, 1e3)) : b >= Q && clearInterval(q);
1711
+ }, 500);
1712
+ return () => {
1713
+ clearInterval(q), T !== null && (clearInterval(T), T = null), h.current && (h.current(), h.current = null);
1569
1714
  };
1570
- }, [k, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist: c, isLoading: h, error: f };
1571
- }, jr = {
1715
+ }, [
1716
+ e,
1717
+ a,
1718
+ i,
1719
+ n,
1720
+ t,
1721
+ r
1722
+ ]);
1723
+ }, Xr = {
1572
1724
  projectId: "vp-player-projectId",
1725
+ // this is used only if prop projectId is not provided
1573
1726
  video: {
1574
1727
  file: "",
1575
1728
  // Will be set dynamically if no playlist
@@ -1621,48 +1774,48 @@ const Er = me.div`
1621
1774
  // Enabled by default
1622
1775
  }
1623
1776
  }
1624
- }, $r = ({
1777
+ }, Jr = ({
1625
1778
  videoUrl: e,
1626
1779
  fetchedPlaybackUrl: t,
1627
1780
  fetchedPlaylist: r,
1628
- projectId: n,
1629
- config: a = {},
1630
- isVerticalPlayer: i
1781
+ projectId: a,
1782
+ config: i = {},
1783
+ isVerticalPlayer: n
1631
1784
  // Distinguish between VP Player types
1632
1785
  }) => {
1633
- var l, f, w, k, g, d, m, v, E, O, T, j, $, y, G, V;
1634
- const o = { ...jr, ...a }, c = { ...o.config, ...a.config };
1786
+ var u, h, g, _, E, d, x, w, I, L, T, B, V, b, Q, q;
1787
+ const s = { ...Xr, ...i }, l = { ...s.config, ...i.config };
1635
1788
  if (e)
1636
1789
  return {
1637
- ...o,
1790
+ ...s,
1638
1791
  video: {
1639
- ...o.video,
1792
+ ...s.video,
1640
1793
  file: e,
1641
1794
  playlist: void 0
1642
1795
  },
1643
- config: c
1796
+ config: l
1644
1797
  };
1645
1798
  if (t)
1646
1799
  return {
1647
- ...o,
1800
+ ...s,
1648
1801
  video: {
1649
- ...o.video,
1802
+ ...s.video,
1650
1803
  file: t,
1651
1804
  playlist: void 0
1652
1805
  },
1653
- config: c
1806
+ config: l
1654
1807
  };
1655
1808
  if (r && r.length > 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;
1657
- return i ? {
1658
- ...o,
1659
- projectId: n || "vp-player-projectId",
1809
+ const f = ((h = (u = i == null ? void 0 : i.video) == null ? void 0 : u.playlist) == null ? void 0 : h.playlistVideoIndex) ?? ((g = i == null ? void 0 : i.config) == null ? void 0 : g.playlistVideoIndex) ?? 0;
1810
+ return n ? {
1811
+ ...s,
1812
+ projectId: a || "vp-player-projectId",
1660
1813
  video: {
1661
- ...o.video,
1814
+ ...s.video,
1662
1815
  // Set first video file (index 0) to avoid VP Player duplication
1663
- videoId: (k = r[0]) == null ? void 0 : k.mediaId,
1816
+ videoId: (_ = r[0]) == null ? void 0 : _.mediaId,
1664
1817
  // Add videoId for tracking
1665
- file: (g = r[0]) == null ? void 0 : g.hlsUrl,
1818
+ file: (E = r[0]) == null ? void 0 : E.hlsUrl,
1666
1819
  title: (d = r[0]) == null ? void 0 : d.title,
1667
1820
  // thumbnail: fetchedPlaylist[0]?.thumbnailUrl,
1668
1821
  playlist: {
@@ -1670,381 +1823,416 @@ const Er = me.div`
1670
1823
  playlistId: "",
1671
1824
  // Will be set by API
1672
1825
  // Use original playlistVideoIndex - VP Player will navigate to it
1673
- playlistVideoIndex: Number(P),
1826
+ playlistVideoIndex: Number(f),
1674
1827
  // Remove first video from playlist to avoid duplication (already in file)
1675
- videos: r.slice(1).map((_, M) => ({
1676
- videoId: _.mediaId || String(M + 1),
1828
+ videos: r.slice(1).map((P, $) => ({
1829
+ videoId: P.mediaId || String($ + 1),
1677
1830
  // Use mediaId if available
1678
- title: _.title,
1679
- file: _.hlsUrl,
1680
- thumbnailUrl: _.thumbnailUrl,
1681
- duration: _.duration
1831
+ title: P.title,
1832
+ file: P.hlsUrl,
1833
+ thumbnailUrl: P.thumbnailUrl,
1834
+ duration: P.duration
1682
1835
  }))
1683
1836
  }
1684
1837
  },
1685
- config: c
1838
+ config: l
1686
1839
  } : {
1687
- ...o,
1688
- projectId: n || "vp-player-projectId",
1840
+ ...s,
1841
+ projectId: a || "vp-player-projectId",
1689
1842
  video: {
1690
- ...o.video,
1691
- videoId: ((m = r[Number(P)]) == null ? void 0 : m.mediaId) || ((v = r[0]) == null ? void 0 : v.mediaId),
1843
+ ...s.video,
1844
+ videoId: ((x = r[Number(f)]) == null ? void 0 : x.mediaId) || ((w = r[0]) == null ? void 0 : w.mediaId),
1692
1845
  // 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),
1846
+ file: ((I = r[Number(f)]) == null ? void 0 : I.hlsUrl) || ((L = r[0]) == null ? void 0 : L.hlsUrl) || "",
1847
+ title: ((T = r[Number(f)]) == null ? void 0 : T.title) || ((B = r[0]) == null ? void 0 : B.title),
1848
+ thumbnail: ((V = r[Number(f)]) == null ? void 0 : V.thumbnailUrl) || ((b = r[0]) == null ? void 0 : b.thumbnailUrl),
1696
1849
  playlist: {
1697
1850
  state: !0,
1698
1851
  // playlistVideoIndex: String(userPlaylistVideoIndex), this has been bug, fixed, now int
1699
- playlistVideoIndex: Number(P),
1700
- videos: r.map((_, M) => ({
1701
- videoId: _.mediaId || String(M),
1852
+ playlistVideoIndex: Number(f),
1853
+ videos: r.map((P, $) => ({
1854
+ videoId: P.mediaId || String($),
1702
1855
  // Use mediaId if available
1703
- title: _.title,
1704
- file: _.hlsUrl,
1705
- thumbnailUrl: _.thumbnailUrl,
1706
- duration: _.duration
1856
+ title: P.title,
1857
+ file: P.hlsUrl,
1858
+ thumbnailUrl: P.thumbnailUrl,
1859
+ duration: P.duration
1707
1860
  }))
1708
1861
  }
1709
1862
  },
1710
- config: c
1863
+ config: l
1711
1864
  };
1712
1865
  }
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)
1866
+ const c = ((Q = i == null ? void 0 : i.video) == null ? void 0 : Q.playlist) || s.video.playlist, y = (q = i == null ? void 0 : i.video) == null ? void 0 : q.file;
1867
+ if (y)
1715
1868
  return {
1716
- ...o,
1869
+ ...s,
1717
1870
  video: {
1718
- ...o.video,
1719
- file: h,
1871
+ ...s.video,
1872
+ file: y,
1720
1873
  playlist: void 0
1721
1874
  // No playlist, just one video
1722
1875
  },
1723
- config: c
1876
+ config: l
1724
1877
  };
1725
- if (u != null && u.videos && u.videos.length > 0) {
1726
- const P = u.videos[Number(u.playlistVideoIndex) || 0];
1878
+ if (c != null && c.videos && c.videos.length > 0) {
1879
+ const f = c.videos[Number(c.playlistVideoIndex) || 0];
1727
1880
  return {
1728
- ...o,
1881
+ ...s,
1729
1882
  video: {
1730
- ...o.video,
1731
- file: (P == null ? void 0 : P.file) || "",
1883
+ ...s.video,
1884
+ file: (f == null ? void 0 : f.file) || "",
1732
1885
  playlist: {
1733
- ...u,
1734
- state: u.state ?? !0,
1886
+ ...c,
1887
+ state: c.state ?? !0,
1735
1888
  // playlistVideoIndex: playlist.playlistVideoIndex ?? 0, this has been bug, fixed, now int
1736
- playlistVideoIndex: Number(u.playlistVideoIndex || 0),
1737
- videos: u.videos
1889
+ playlistVideoIndex: Number(c.playlistVideoIndex || 0),
1890
+ videos: c.videos
1738
1891
  }
1739
1892
  },
1740
1893
  config: {
1741
- ...o.config,
1742
- ...a == null ? void 0 : a.config
1894
+ ...s.config,
1895
+ ...i == null ? void 0 : i.config
1743
1896
  }
1744
1897
  };
1745
1898
  }
1746
1899
  throw new Error("No valid video source found. Provide videoUrl, videoId, playlistId, or config with video.file or playlist.");
1747
- }, Nr = (e) => {
1900
+ }, Kr = (e) => {
1748
1901
  if (!e)
1749
1902
  return;
1750
1903
  const t = /https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/, r = e.match(t);
1751
1904
  return r ? r[2] : void 0;
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({
1754
- projectId: a,
1755
- videoId: j,
1756
- playlistId: i,
1757
- videoUrl: n,
1758
- apiKey: u
1759
- }), _ = qe(e, j);
1760
- we(() => {
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%" };
1905
+ }, Qr = ({ playerId: e, videoId: t, version: r, videoUrl: a, projectId: i, playlistId: n, scriptUrl: s, config: l = {}, apiKey: c, isReels: y = !1, onPlaylistData: u, onVideoStarted: h, trackingMetadata: g, onPlayerStart: _, onPlayerPlay: E, onPlayerPause: d, onPlayerResume: x, onPlayerEnd: w, onPlayerProgressEvery10Seconds: I, onPlayerProgressAt20Seconds: L, onPlayerQuartile25: T, onPlayerQuartile50: B, onPlayerQuartile75: V, onPlayerNext: b, onPlayerPrevious: Q, onPlayerEvent: q }) => {
1906
+ const f = te(null), v = te(null), P = te(!1), $ = te(""), D = te([]), U = te([]), M = te(null), { isLoaded: W, error: z } = qr(r, s), p = t || Kr(s), [o, m] = ce(null), { fetchedPlaybackUrl: A, fetchedPlaylist: C, isLoading: Y, error: J } = Gr({
1907
+ projectId: i,
1908
+ videoId: p,
1909
+ playlistId: n,
1910
+ videoUrl: a,
1911
+ apiKey: c
1912
+ }), X = ot(e, p), [de, N] = ce(void 0);
1913
+ Se(() => {
1914
+ C && u && u(C);
1915
+ }, [C, u]), Hr({
1916
+ playerId: X,
1917
+ playerInstanceRef: v,
1918
+ playerRef: f,
1919
+ videoData: de,
1920
+ trackingMetadata: g,
1921
+ callbacks: {
1922
+ onPlayerStart: _,
1923
+ onPlayerPlay: E,
1924
+ onPlayerPause: d,
1925
+ onPlayerResume: x,
1926
+ onPlayerEnd: w,
1927
+ onPlayerProgressEvery10Seconds: I,
1928
+ onPlayerProgressAt20Seconds: L,
1929
+ onPlayerQuartile25: T,
1930
+ onPlayerQuartile50: B,
1931
+ onPlayerQuartile75: V,
1932
+ onPlayerNext: b,
1933
+ onPlayerPrevious: Q,
1934
+ onPlayerEvent: q
1935
+ }
1936
+ });
1937
+ const fe = Pt(() => {
1938
+ const ne = l.config || {}, we = y && !ne.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : ne.size || { sizeType: "FIXED", width: "100%" };
1765
1939
  return {
1766
- ...c,
1940
+ ...l,
1767
1941
  config: {
1768
- ...F,
1769
- size: z
1942
+ ...ne,
1943
+ size: we
1770
1944
  }
1771
1945
  };
1772
- }, [c, h]);
1773
- return we(() => {
1774
- if (T) {
1775
- y(T);
1946
+ }, [l, y]);
1947
+ return Se(() => {
1948
+ if (z) {
1949
+ m(z);
1776
1950
  return;
1777
1951
  }
1778
- if (!O || P && !n)
1952
+ if (!W || Y && !a)
1779
1953
  return;
1780
- let F = !0;
1781
- const Q = setTimeout(async () => {
1954
+ let ne = !0;
1955
+ const Be = setTimeout(async () => {
1782
1956
  try {
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,
1787
- playlistId: i,
1788
- videoUrl: n,
1789
- fetchedPlaybackUrl: G,
1790
- scriptUrl: o,
1791
- isReels: h,
1792
- projectId: a,
1793
- playlistLength: X
1957
+ D.current.forEach((ie) => clearInterval(ie)), D.current = [], U.current.forEach((ie) => clearTimeout(ie)), U.current = [], M.current = null;
1958
+ const se = (C == null ? void 0 : C.length) ?? 0, ge = JSON.stringify({
1959
+ playerId: X,
1960
+ videoId: t || p,
1961
+ playlistId: n,
1962
+ videoUrl: a,
1963
+ fetchedPlaybackUrl: A,
1964
+ scriptUrl: s,
1965
+ isReels: y,
1966
+ projectId: i,
1967
+ playlistLength: se
1794
1968
  });
1795
- if (g.current && k.current && d.current === te)
1969
+ if (P.current && v.current && $.current === ge)
1796
1970
  return;
1797
- d.current !== te && (g.current = !1, d.current = te);
1798
- const re = o == null ? void 0 : o.includes("vertical-player");
1799
- if (document.querySelectorAll('[id*="player"]').forEach((L) => {
1800
- var ae, p;
1801
- const ee = L.id;
1802
- if (ee !== _)
1971
+ $.current !== ge && (P.current = !1, $.current = ge);
1972
+ const Ae = s == null ? void 0 : s.includes("vertical-player");
1973
+ if (document.querySelectorAll('[id*="player"]').forEach((ie) => {
1974
+ var Pe, R;
1975
+ const xe = ie.id;
1976
+ if (xe !== X)
1803
1977
  try {
1804
- const b = re ? (ae = window.vpVerticalPlayer) == null ? void 0 : ae.call(window, ee) : (p = window.vpPlayer) == null ? void 0 : p.call(window, ee);
1805
- b != null && b.destroy && b.destroy();
1806
- } catch (b) {
1807
- console.warn(`Failed to destroy existing player ${ee}:`, b);
1978
+ const S = Ae ? (Pe = window.vpVerticalPlayer) == null ? void 0 : Pe.call(window, xe) : (R = window.vpPlayer) == null ? void 0 : R.call(window, xe);
1979
+ S != null && S.destroy && S.destroy();
1980
+ } catch (S) {
1981
+ console.warn(`Failed to destroy existing player ${xe}:`, S);
1808
1982
  }
1809
- }), await new Promise((L) => setTimeout(L, 100)), !F || !w.current)
1983
+ }), await new Promise((ie) => setTimeout(ie, 100)), !ne || !f.current)
1810
1984
  return;
1811
- if (!document.getElementById(_)) {
1812
- y("DOM element not found after cleanup.");
1985
+ if (!document.getElementById(X)) {
1986
+ m("DOM element not found after cleanup.");
1813
1987
  return;
1814
1988
  }
1815
1989
  if (!window.vpPlayer && !window.vpVerticalPlayer) {
1816
- y("VP Player script not loaded.");
1990
+ m("VP Player script not loaded.");
1817
1991
  return;
1818
1992
  }
1819
- const N = re ? window.vpVerticalPlayer : window.vpPlayer;
1820
- if (!N) {
1821
- y(`VP ${re ? "Vertical " : ""}Player script not loaded.`);
1993
+ const st = Ae ? window.vpVerticalPlayer : window.vpPlayer;
1994
+ if (!st) {
1995
+ m(`VP ${Ae ? "Vertical " : ""}Player script not loaded.`);
1822
1996
  return;
1823
1997
  }
1824
- const B = $r({
1825
- videoUrl: n,
1826
- fetchedPlaybackUrl: G ?? void 0,
1827
- fetchedPlaylist: V ?? void 0,
1828
- projectId: a,
1829
- config: M,
1830
- isVerticalPlayer: re
1998
+ const Ee = Jr({
1999
+ videoUrl: a,
2000
+ fetchedPlaybackUrl: A ?? void 0,
2001
+ fetchedPlaylist: C ?? void 0,
2002
+ projectId: i,
2003
+ config: fe,
2004
+ isVerticalPlayer: Ae
1831
2005
  // Pass player type to config builder
1832
- }), A = N(_);
1833
- if (!A) {
1834
- y(`Failed to create VP ${re ? "Vertical " : ""}Player instance.`);
2006
+ }), G = st(X);
2007
+ if (!G) {
2008
+ m(`Failed to create VP ${Ae ? "Vertical " : ""}Player instance.`);
1835
2009
  return;
1836
2010
  }
1837
- if (F && w.current && (A.setup(B), k.current = A, g.current = !0, y(null), f && A.on)) {
1838
- const L = () => {
1839
- var b;
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;
2011
+ if (ne && f.current && (G.setup(Ee), v.current = G, P.current = !0, m(null), h && G.on)) {
2012
+ const ie = () => {
2013
+ var S;
2014
+ const R = {};
2015
+ if (C && C.length > 0) {
2016
+ const F = G.videoIndex ?? ((S = G.playlist) == null ? void 0 : S.playlistVideoIndex) ?? 0, k = C[F];
2017
+ k && (R.title = k.title, R.hlsUrl = k.hlsUrl, R.file = k.hlsUrl, R.thumbnailUrl = k.thumbnailUrl, R.duration = k.duration, R.videoIndex = F, R.playlistVideoIndex = F, R.isBackupPlaylist = k.isBackupPlaylist, R.mediaId = k.mediaId, R.videoId = k.mediaId || k.videoId);
2018
+ } else Ee.video && (R.title = Ee.video.title, R.file = Ee.video.file, R.hlsUrl = Ee.video.file, R.thumbnailUrl = Ee.video.thumbnail, R.videoId = t || p, R.videoIndex = 0, R.playlistVideoIndex = 0, G.getDuration && (R.duration = G.getDuration()));
2019
+ return R;
1846
2020
  };
1847
- let ee = null;
1848
- const ae = async () => {
1849
- var p;
2021
+ let xe = null;
2022
+ const Pe = async () => {
2023
+ var R;
1850
2024
  try {
1851
- ee && clearTimeout(ee), await new Promise((C) => setTimeout(C, 100));
1852
- let b = L();
1853
- const R = b.videoId || b.mediaId;
1854
- if (R && R === E.current)
2025
+ xe && clearTimeout(xe), await new Promise((k) => setTimeout(k, 100));
2026
+ let S = ie();
2027
+ const F = S.videoId || S.mediaId;
2028
+ if (F && F === M.current)
1855
2029
  return;
1856
- if (ee = window.setTimeout(() => {
1857
- E.current = null;
1858
- }, 500), h && R)
2030
+ if (xe = window.setTimeout(() => {
2031
+ M.current = null;
2032
+ }, 500), y && F)
1859
2033
  try {
1860
- const ce = `https://host.vpplayer.tech/player/ptkzurnx/${R}.json`, ue = await fetch(ce);
1861
- if (ue.ok) {
1862
- const Y = await ue.json();
1863
- Y && Y.video && (b = {
1864
- ...b,
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 || []
2034
+ const ye = `https://host.vpplayer.tech/player/ptkzurnx/${F}.json`, be = await fetch(ye);
2035
+ if (be.ok) {
2036
+ const ee = await be.json();
2037
+ ee && ee.video && (S = {
2038
+ ...S,
2039
+ title: ee.video.title || S.title,
2040
+ description: ee.video.description,
2041
+ publishDate: ee.video.publishDate,
2042
+ projectId: ee.projectId || S.projectId,
2043
+ premium: ((R = ee.video.videoLocking) == null ? void 0 : R.isEnabled) || !1,
2044
+ author: ee.video.author,
2045
+ tags: ee.video.tags || []
1872
2046
  });
1873
2047
  }
1874
2048
  } catch {
1875
2049
  }
1876
- E.current = R || null, f(b);
1877
- } catch (b) {
1878
- console.warn("Error in video-started handler:", b);
2050
+ M.current = F || null, N(S), h(S);
2051
+ } catch (S) {
2052
+ console.warn("Error in video-started handler:", S);
1879
2053
  }
1880
2054
  };
1881
- if (h) {
1882
- let p = !1, b = -1;
1883
- const R = () => {
1884
- if (!p) {
1885
- p = !0;
2055
+ if (y) {
2056
+ let R = !1, S = -1;
2057
+ const F = () => {
2058
+ if (!R) {
2059
+ R = !0;
1886
2060
  try {
1887
- A.on && A.on("vp-video-started", ae), setTimeout(() => {
1888
- ae(), b = A.videoIndex ?? 0;
2061
+ G.on && G.on("vp-video-started", Pe), setTimeout(() => {
2062
+ Pe(), S = G.videoIndex ?? 0;
1889
2063
  }, 500);
1890
- } catch (Y) {
1891
- console.error("Error setting up event listeners:", Y);
2064
+ } catch (ee) {
2065
+ console.error("Error setting up event listeners:", ee);
1892
2066
  }
1893
2067
  }
1894
2068
  };
1895
- let C = 0;
1896
- const ce = 15, ue = setInterval(() => {
2069
+ let k = 0;
2070
+ const ye = 15, be = setInterval(() => {
1897
2071
  try {
1898
- const Y = A.videoIndex !== void 0 || A.playlist;
1899
- if (!p)
1900
- C++, (Y || C >= ce) && R();
2072
+ const ee = G.videoIndex !== void 0 || G.playlist;
2073
+ if (!R)
2074
+ k++, (ee || k >= ye) && F();
1901
2075
  else {
1902
- const fe = A.videoIndex ?? 0;
1903
- fe !== b && b !== -1 && (b = fe, ae());
2076
+ const _e = G.videoIndex ?? 0;
2077
+ _e !== S && S !== -1 && (S = _e, Pe());
1904
2078
  }
1905
2079
  } catch {
1906
2080
  }
1907
2081
  }, 200);
1908
- m.current.push(ue);
2082
+ D.current.push(be);
1909
2083
  try {
1910
- A.on && A.on("vp-listen-ready", R);
2084
+ G.on && G.on("vp-listen-ready", F);
1911
2085
  } catch {
1912
2086
  }
1913
2087
  } else {
1914
- const p = async (b) => {
1915
- var R, C;
2088
+ const R = async (S) => {
2089
+ var F, k;
1916
2090
  try {
1917
- const ce = o == null ? void 0 : o.match(/player\/([^/.]+)/), ue = ce == null ? void 0 : ce[1];
1918
- if (!ue || !b)
1919
- return L();
1920
- const Y = `https://host.vpplayer.tech/player/${ue}/${b}.json`, fe = await fetch(Y);
1921
- if (!fe.ok)
1922
- return console.warn("Failed to fetch full video config:", fe.status), L();
1923
- const K = await fe.json();
1924
- return !K || !K.video ? L() : {
1925
- videoId: b,
1926
- title: K.video.title,
1927
- description: K.video.description,
1928
- file: K.video.file,
1929
- hlsUrl: K.video.file,
1930
- thumbnailUrl: K.video.thumbnail,
1931
- duration: K.video.duration,
1932
- publishDate: K.video.publishDate,
1933
- projectId: K.projectId,
1934
- premium: ((R = K.video.videoLocking) == null ? void 0 : R.isEnabled) || !1,
1935
- author: K.video.author,
1936
- tags: K.video.tags || [],
1937
- videoIndex: A.videoIndex ?? 0,
1938
- playlistVideoIndex: ((C = A.playlist) == null ? void 0 : C.playlistVideoIndex) ?? 0
2091
+ const ye = s == null ? void 0 : s.match(/player\/([^/.]+)/), be = ye == null ? void 0 : ye[1];
2092
+ if (!be || !S)
2093
+ return ie();
2094
+ const ee = `https://host.vpplayer.tech/player/${be}/${S}.json`, _e = await fetch(ee);
2095
+ if (!_e.ok)
2096
+ return console.warn("Failed to fetch full video config:", _e.status), ie();
2097
+ const le = await _e.json();
2098
+ return !le || !le.video ? ie() : {
2099
+ videoId: S,
2100
+ title: le.video.title,
2101
+ description: le.video.description,
2102
+ file: le.video.file,
2103
+ hlsUrl: le.video.file,
2104
+ thumbnailUrl: le.video.thumbnail,
2105
+ duration: le.video.duration,
2106
+ publishDate: le.video.publishDate,
2107
+ projectId: le.projectId,
2108
+ premium: ((F = le.video.videoLocking) == null ? void 0 : F.isEnabled) || !1,
2109
+ author: le.video.author,
2110
+ tags: le.video.tags || [],
2111
+ videoIndex: G.videoIndex ?? 0,
2112
+ playlistVideoIndex: ((k = G.playlist) == null ? void 0 : k.playlistVideoIndex) ?? 0
1939
2113
  };
1940
- } catch (ce) {
1941
- return console.warn("Error fetching full video data:", ce), L();
2114
+ } catch (ye) {
2115
+ return console.warn("Error fetching full video data:", ye), ie();
1942
2116
  }
1943
2117
  };
1944
- A.on("ready", async (b) => {
2118
+ G.on("ready", async (S) => {
1945
2119
  try {
1946
- const R = (b == null ? void 0 : b.id) || t || j;
1947
- if (R) {
1948
- const C = await p(R);
1949
- f(C);
2120
+ const F = (S == null ? void 0 : S.id) || t || p;
2121
+ if (F) {
2122
+ const k = await R(F);
2123
+ N(k), h(k);
1950
2124
  } else {
1951
- const C = L();
1952
- (C.title || C.file) && f(C);
2125
+ const k = ie();
2126
+ (k.title || k.file) && (N(k), h(k));
1953
2127
  }
1954
- } catch (R) {
1955
- console.warn("Error in ready handler:", R);
2128
+ } catch (F) {
2129
+ console.warn("Error in ready handler:", F);
1956
2130
  }
1957
- }), A.on("playlistItem", async (b) => {
2131
+ }), G.on("playlistItem", async (S) => {
1958
2132
  try {
1959
- const R = b == null ? void 0 : b.id;
1960
- if (R) {
1961
- const C = await p(R);
1962
- f(C);
2133
+ const F = S == null ? void 0 : S.id;
2134
+ if (F) {
2135
+ const k = await R(F);
2136
+ N(k), h(k);
1963
2137
  }
1964
- } catch (R) {
1965
- console.warn("Error in playlistItem handler:", R);
2138
+ } catch (F) {
2139
+ console.warn("Error in playlistItem handler:", F);
1966
2140
  }
1967
2141
  });
1968
2142
  }
1969
2143
  }
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);
2144
+ } catch (se) {
2145
+ if (ne) {
2146
+ const ge = se instanceof Error ? se.message : String(se);
2147
+ m(ge), console.error("VP Player initialization error:", se);
1974
2148
  }
1975
2149
  }
1976
2150
  }, 150);
1977
2151
  return () => {
1978
- F = !1, clearTimeout(Q), m.current.forEach((X) => clearInterval(X)), m.current = [], v.current.forEach((X) => clearTimeout(X)), v.current = [], g.current = !1;
2152
+ ne = !1, clearTimeout(Be), D.current.forEach((se) => clearInterval(se)), D.current = [], U.current.forEach((se) => clearTimeout(se)), U.current = [], P.current = !1;
1979
2153
  };
1980
2154
  }, [
1981
- O,
1982
- P,
1983
- _,
1984
- T,
1985
- o
1986
- ]), we(() => () => {
1987
- if (k.current) {
2155
+ W,
2156
+ Y,
2157
+ X,
2158
+ z,
2159
+ s
2160
+ ]), Se(() => () => {
2161
+ if (v.current) {
1988
2162
  try {
1989
- k.current.destroy && k.current.destroy();
1990
- } catch (z) {
1991
- console.warn(`Failed to destroy player ${_}:`, z);
2163
+ v.current.destroy && v.current.destroy();
2164
+ } catch (we) {
2165
+ console.warn(`Failed to destroy player ${X}:`, we);
1992
2166
  }
1993
- k.current = null;
2167
+ v.current = null;
1994
2168
  }
1995
- g.current = !1;
1996
- const F = document.getElementById(_);
1997
- F && (F.innerHTML = "");
1998
- }, [_]), {
1999
- playerRef: w,
2000
- playerInstanceRef: k,
2001
- isScriptLoaded: O,
2002
- isLoading: P,
2003
- error: U || $ || T
2169
+ P.current = !1;
2170
+ const ne = document.getElementById(X);
2171
+ ne && (ne.innerHTML = "");
2172
+ }, [X]), {
2173
+ playerRef: f,
2174
+ playerInstanceRef: v,
2175
+ isScriptLoaded: W,
2176
+ isLoading: Y,
2177
+ error: J || o || z
2004
2178
  };
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({
2179
+ }, Zr = ({ playerId: e, videoId: t, version: r, videoUrl: a, projectId: i, playlistId: n, scriptUrl: s, config: l = {}, apiKey: c, isReels: y = !1, hiddenClasses: u = [], onClose: h, className: g, onPlaylistData: _, onVideoStarted: E, trackingMetadata: d, onPlayerStart: x, onPlayerPlay: w, onPlayerPause: I, onPlayerResume: L, onPlayerEnd: T, onPlayerProgressEvery10Seconds: B, onPlayerProgressAt20Seconds: V, onPlayerQuartile25: b, onPlayerQuartile50: Q, onPlayerQuartile75: q, onPlayerNext: f, onPlayerPrevious: v, onPlayerEvent: P }) => {
2180
+ var J, X, de, N;
2181
+ const { playerRef: $, playerInstanceRef: D, isScriptLoaded: U, isLoading: M, error: W } = Qr({
2008
2182
  playerId: e,
2009
2183
  videoId: t,
2010
2184
  version: r,
2011
- videoUrl: n,
2012
- projectId: a,
2013
- playlistId: i,
2014
- scriptUrl: o,
2015
- config: c,
2016
- apiKey: u,
2017
- isReels: h,
2018
- onPlaylistData: k,
2019
- onVideoStarted: g
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) }) })] });
2025
- }, xt = Et(void 0), Br = ({ children: e }) => {
2026
- const [t, r] = ne(!1), [n, a] = ne(null), [i, o] = ne(null), c = Ge((l) => {
2185
+ videoUrl: a,
2186
+ projectId: i,
2187
+ playlistId: n,
2188
+ scriptUrl: s,
2189
+ config: l,
2190
+ apiKey: c,
2191
+ isReels: y,
2192
+ onPlaylistData: _,
2193
+ onVideoStarted: E,
2194
+ trackingMetadata: d,
2195
+ onPlayerStart: x,
2196
+ onPlayerPlay: w,
2197
+ onPlayerPause: I,
2198
+ onPlayerResume: L,
2199
+ onPlayerEnd: T,
2200
+ onPlayerProgressEvery10Seconds: B,
2201
+ onPlayerProgressAt20Seconds: V,
2202
+ onPlayerQuartile25: b,
2203
+ onPlayerQuartile50: Q,
2204
+ onPlayerQuartile75: q,
2205
+ onPlayerNext: f,
2206
+ onPlayerPrevious: v,
2207
+ onPlayerEvent: P
2208
+ }), [z, p] = ce(!0), o = () => y && p(!0), m = () => {
2209
+ var Z, fe;
2210
+ p(!1), (fe = (Z = D.current) == null ? void 0 : Z.play) == null || fe.call(Z), h == null || h();
2211
+ }, A = (X = (J = l == null ? void 0 : l.config) == null ? void 0 : J.size) != null && X.width ? typeof l.config.size.width == "number" ? `${l.config.size.width}px` : l.config.size.width : void 0, C = (N = (de = l == null ? void 0 : l.config) == null ? void 0 : de.size) != null && N.height ? typeof l.config.size.height == "number" ? `${l.config.size.height}px` : l.config.size.height : void 0, Y = ot(e, t);
2212
+ return W ? K.jsxs(rt, { type: "error", children: ["An error occurred: ", W] }) : M || !U ? K.jsx(rt, { type: "loading", children: "Loading..." }) : K.jsxs(K.Fragment, { children: [y && !z ? K.jsx("div", { onClick: o }) : null, !y && K.jsx("div", { children: K.jsx(wt, { id: Y, ref: $, width: A || "100%", height: C || "auto", $hiddenClasses: u, className: g }) }, Y), y && z && K.jsx(Br, { onClick: m, className: g, children: K.jsx(Dr, { className: g, onClick: (Z) => Z.stopPropagation(), children: K.jsx("div", { children: K.jsx(wt, { id: Y, ref: $, width: "100%", height: "auto", $hiddenClasses: u, className: g }) }, Y) }) })] });
2213
+ }, Lt = Ft(void 0), nn = ({ children: e }) => {
2214
+ const [t, r] = ce(!1), [a, i] = ce(null), [n, s] = ce(null), l = lt((u) => {
2027
2215
  try {
2028
- const f = qe(l.playerId, l.videoId);
2029
- a({ ...l, playerId: f }), r(!0), o(null);
2216
+ const h = ot(u.playerId, u.videoId);
2217
+ i({ ...u, playerId: h }), r(!0), s(null);
2030
2218
  } catch {
2031
- o("Failed to show player.");
2219
+ s("Failed to show player.");
2032
2220
  }
2033
- }, []), u = Ge(() => {
2034
- r(!1), a(null), o(null);
2035
- }, []), h = ct(() => ({
2036
- showPlayer: c,
2037
- hidePlayer: u,
2221
+ }, []), c = lt(() => {
2222
+ r(!1), i(null), s(null);
2223
+ }, []), y = Pt(() => ({
2224
+ showPlayer: l,
2225
+ hidePlayer: c,
2038
2226
  isPlayerVisible: t,
2039
- playerParams: n
2040
- }), [c, u, t, n]);
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 })] });
2042
- }, Dr = () => {
2043
- const e = st(xt);
2227
+ playerParams: a
2228
+ }), [l, c, t, a]);
2229
+ return K.jsxs(Lt.Provider, { value: y, children: [e, n && K.jsx(rt, { type: "error", children: n }), t && (a == null ? void 0 : a.playerId) && K.jsx(Zr, { playerId: a.playerId, videoId: a.videoId, projectId: a.projectId, videoUrl: a.videoUrl, version: a.version, playlistId: a.playlistId, scriptUrl: a.scriptUrl, config: a.config, isReels: a.isReels, thumbnailUrl: a.thumbnailUrl, onClose: c, hiddenClasses: a.hiddenClasses || [], apiKey: a.apiKey, className: a.className })] });
2230
+ }, an = () => {
2231
+ const e = Et(Lt);
2044
2232
  if (!e)
2045
2233
  throw new Error("useVPPlayer must be used within a VPPlayerProvider");
2046
2234
  return e;
2047
- }, Ur = {
2235
+ }, on = {
2048
2236
  projectId: "vp-player-projectId",
2049
2237
  video: {
2050
2238
  file: "",
@@ -2077,17 +2265,17 @@ const Er = me.div`
2077
2265
  shareButton: !0
2078
2266
  }
2079
2267
  }
2080
- }, Mr = {
2268
+ }, sn = {
2081
2269
  config: {
2082
2270
  autostartOnLoad: { state: !0, onMobile: !0, onData: !0 },
2083
2271
  muted: !0
2084
2272
  }
2085
- }, zr = {
2273
+ }, ln = {
2086
2274
  config: {
2087
2275
  autoplay: !0,
2088
2276
  muted: !0
2089
2277
  }
2090
- }, Fe = {
2278
+ }, Qe = {
2091
2279
  video: {
2092
2280
  advertising: !0,
2093
2281
  ads: {
@@ -2098,47 +2286,48 @@ const Er = me.div`
2098
2286
  adAnnouncement: { state: !0, timeBeforeAd: 5 },
2099
2287
  adsRequireInteraction: !1
2100
2288
  }
2101
- }, Wr = (e, t, r = "time", n = 0) => {
2102
- var a;
2289
+ }, un = (e, t, r = "time", a = 0) => {
2290
+ var i;
2103
2291
  return {
2104
- ...Fe,
2292
+ ...Qe,
2105
2293
  video: {
2106
- ...Fe.video,
2294
+ ...Qe.video,
2107
2295
  ads: {
2108
- ...(a = Fe.video) == null ? void 0 : a.ads,
2296
+ ...(i = Qe.video) == null ? void 0 : i.ads,
2109
2297
  adBreaks: [
2110
2298
  {
2111
2299
  adTagUrl: t,
2112
2300
  breakType: e,
2113
2301
  breakTimingType: r,
2114
- breakTimingValue: n
2302
+ breakTimingValue: a
2115
2303
  }
2116
2304
  ]
2117
2305
  }
2118
2306
  }
2119
2307
  };
2120
- }, Yr = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", qr = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", Gr = "https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4", Hr = "https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600", Xr = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=", Jr = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=";
2308
+ }, cn = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", dn = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", fn = "https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4", pn = "https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600", hn = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=", mn = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=";
2121
2309
  export {
2122
- Xr as AD_TAG_LINEAR_URL,
2123
- Jr as AD_TAG_SKIPPABLE_LINEAR_URL,
2124
- Yr as BIG_BUCK_BUNNY_URL,
2125
- qr as ELEPHANTS_DREAM_URL,
2126
- Pr as Overlay,
2127
- Hr as PEXELS_THUMBNAIL_URL,
2128
- Gr as PEXELS_VERTICAL_VIDEO_URL,
2129
- it as PlayerContainer,
2130
- _r as PlayerWrapper,
2131
- Lr as VPPlayer,
2132
- Br as VPPlayerProvider,
2133
- Mr as baseConfig,
2134
- Fe as baseConfigWithAds,
2135
- zr as baseConfigWithAutoplay,
2136
- $r as buildVPPlayerConfig,
2137
- Ur as defaultVPPlayerConfig,
2138
- Nr as extractVideoId,
2139
- Wr as getAdConfig,
2140
- Dr as useVPPlayer,
2141
- Vr as useVPPlayerLogic,
2142
- Rr as useVPPlayerScript,
2143
- Or as useVideoData
2310
+ hn as AD_TAG_LINEAR_URL,
2311
+ mn as AD_TAG_SKIPPABLE_LINEAR_URL,
2312
+ cn as BIG_BUCK_BUNNY_URL,
2313
+ dn as ELEPHANTS_DREAM_URL,
2314
+ Br as Overlay,
2315
+ pn as PEXELS_THUMBNAIL_URL,
2316
+ fn as PEXELS_VERTICAL_VIDEO_URL,
2317
+ wt as PlayerContainer,
2318
+ Dr as PlayerWrapper,
2319
+ Zr as VPPlayer,
2320
+ nn as VPPlayerProvider,
2321
+ sn as baseConfig,
2322
+ Qe as baseConfigWithAds,
2323
+ ln as baseConfigWithAutoplay,
2324
+ Jr as buildVPPlayerConfig,
2325
+ on as defaultVPPlayerConfig,
2326
+ Kr as extractVideoId,
2327
+ un as getAdConfig,
2328
+ an as useVPPlayer,
2329
+ Hr as useVPPlayerEvents,
2330
+ Qr as useVPPlayerLogic,
2331
+ qr as useVPPlayerScript,
2332
+ Gr as useVideoData
2144
2333
  };