@devix-technologies/react-gjirafa-vp-player 1.0.31-beta.0 → 1.0.31-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as ne from "react";
2
- import xr, { forwardRef as Pr, useContext as ar, useState as ce, useEffect as Fe, useRef as he, useId as _r, useMemo as ir, createContext as wr, useCallback as qe } from "react";
3
- var Ee = { exports: {} }, ye = {};
2
+ import hr, { forwardRef as mr, useContext as gr, useState as Re, useEffect as je, useRef as be, useId as yr, useMemo as ve } from "react";
3
+ var xe = { exports: {} }, fe = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var Ee = { exports: {} }, ye = {};
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 Ye;
14
- function Er() {
15
- if (Ye) return ye;
16
- Ye = 1;
13
+ var We;
14
+ function br() {
15
+ if (We) return fe;
16
+ We = 1;
17
17
  var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
18
- function t(n, a, i) {
18
+ function t(a, n, o) {
19
19
  var s = null;
20
- if (i !== void 0 && (s = "" + i), a.key !== void 0 && (s = "" + 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, {
20
+ if (o !== void 0 && (s = "" + o), n.key !== void 0 && (s = "" + n.key), "key" in n) {
21
+ o = {};
22
+ for (var l in n)
23
+ l !== "key" && (o[l] = n[l]);
24
+ } else o = n;
25
+ return n = o.ref, {
26
26
  $$typeof: e,
27
- type: n,
27
+ type: a,
28
28
  key: s,
29
- ref: a !== void 0 ? a : null,
30
- props: i
29
+ ref: n !== void 0 ? n : null,
30
+ props: o
31
31
  };
32
32
  }
33
- return ye.Fragment = r, ye.jsx = t, ye.jsxs = t, ye;
33
+ return fe.Fragment = r, fe.jsx = t, fe.jsxs = t, fe;
34
34
  }
35
- var me = {};
35
+ var de = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,351 +42,351 @@ var me = {};
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 Ge;
46
- function kr() {
47
- return Ge || (Ge = 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 === T ? null : o.displayName || o.name || null;
52
- if (typeof o == "string") return o;
53
- switch (o) {
54
- case m:
45
+ var Ye;
46
+ function vr() {
47
+ return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && (function() {
48
+ function e(i) {
49
+ if (i == null) return null;
50
+ if (typeof i == "function")
51
+ return i.$$typeof === G ? null : i.displayName || i.name || null;
52
+ if (typeof i == "string") return i;
53
+ switch (i) {
54
+ case y:
55
55
  return "Fragment";
56
- case x:
56
+ case P:
57
57
  return "Profiler";
58
- case v:
58
+ case b:
59
59
  return "StrictMode";
60
- case A:
60
+ case C:
61
61
  return "Suspense";
62
- case g:
62
+ case x:
63
63
  return "SuspenseList";
64
- case q:
64
+ case L:
65
65
  return "Activity";
66
66
  }
67
- if (typeof o == "object")
68
- switch (typeof o.tag == "number" && console.error(
67
+ if (typeof i == "object")
68
+ switch (typeof i.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), o.$$typeof) {
71
- case y:
70
+ ), i.$$typeof) {
71
+ case g:
72
72
  return "Portal";
73
- case z:
74
- return o.displayName || "Context";
75
- case O:
76
- return (o._context.displayName || "Context") + ".Consumer";
77
- case N:
78
- var p = o.render;
79
- return o = o.displayName, o || (o = p.displayName || p.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
80
- case K:
81
- return p = o.displayName || null, p !== null ? p : e(o.type) || "Memo";
82
73
  case M:
83
- p = o._payload, o = o._init;
74
+ return i.displayName || "Context";
75
+ case O:
76
+ return (i._context.displayName || "Context") + ".Consumer";
77
+ case F:
78
+ var c = i.render;
79
+ return i = i.displayName, i || (i = c.displayName || c.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
80
+ case Y:
81
+ return c = i.displayName || null, c !== null ? c : e(i.type) || "Memo";
82
+ case J:
83
+ c = i._payload, i = i._init;
84
84
  try {
85
- return e(o(p));
85
+ return e(i(c));
86
86
  } catch {
87
87
  }
88
88
  }
89
89
  return null;
90
90
  }
91
- function r(o) {
92
- return "" + o;
91
+ function r(i) {
92
+ return "" + i;
93
93
  }
94
- function t(o) {
94
+ function t(i) {
95
95
  try {
96
- r(o);
97
- var p = !1;
96
+ r(i);
97
+ var c = !1;
98
98
  } catch {
99
- p = !0;
99
+ c = !0;
100
100
  }
101
- if (p) {
102
- p = console;
103
- var R = p.error, P = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
104
- return R.call(
105
- p,
101
+ if (c) {
102
+ c = console;
103
+ var _ = c.error, T = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
104
+ return _.call(
105
+ c,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- P
108
- ), r(o);
107
+ T
108
+ ), r(i);
109
109
  }
110
110
  }
111
- function n(o) {
112
- if (o === m) return "<>";
113
- if (typeof o == "object" && o !== null && o.$$typeof === M)
111
+ function a(i) {
112
+ if (i === y) return "<>";
113
+ if (typeof i == "object" && i !== null && i.$$typeof === J)
114
114
  return "<...>";
115
115
  try {
116
- var p = e(o);
117
- return p ? "<" + p + ">" : "<...>";
116
+ var c = e(i);
117
+ return c ? "<" + c + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
- function a() {
123
- var o = j.A;
124
- return o === null ? null : o.getOwner();
122
+ function n() {
123
+ var i = z.A;
124
+ return i === null ? null : i.getOwner();
125
125
  }
126
- function i() {
126
+ function o() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
- function s(o) {
130
- if (S.call(o, "key")) {
131
- var p = Object.getOwnPropertyDescriptor(o, "key").get;
132
- if (p && p.isReactWarning) return !1;
129
+ function s(i) {
130
+ if ($.call(i, "key")) {
131
+ var c = Object.getOwnPropertyDescriptor(i, "key").get;
132
+ if (c && c.isReactWarning) return !1;
133
133
  }
134
- return o.key !== void 0;
134
+ return i.key !== void 0;
135
135
  }
136
- function c(o, p) {
137
- function R() {
138
- ae || (ae = !0, console.error(
136
+ function l(i, c) {
137
+ function _() {
138
+ D || (D = !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
- p
140
+ c
141
141
  ));
142
142
  }
143
- R.isReactWarning = !0, Object.defineProperty(o, "key", {
144
- get: R,
143
+ _.isReactWarning = !0, Object.defineProperty(i, "key", {
144
+ get: _,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function f() {
149
- var o = e(this.type);
150
- return H[o] || (H[o] = !0, console.error(
148
+ function d() {
149
+ var i = e(this.type);
150
+ return Q[i] || (Q[i] = !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
- )), o = this.props.ref, o !== void 0 ? o : null;
152
+ )), i = this.props.ref, i !== void 0 ? i : null;
153
153
  }
154
- function u(o, p, R, P, Y, Z) {
155
- var I = R.ref;
156
- return o = {
157
- $$typeof: k,
158
- type: o,
159
- key: p,
160
- props: R,
161
- _owner: P
162
- }, (I !== void 0 ? I : null) !== null ? Object.defineProperty(o, "ref", {
154
+ function h(i, c, _, T, q, oe) {
155
+ var v = _.ref;
156
+ return i = {
157
+ $$typeof: R,
158
+ type: i,
159
+ key: c,
160
+ props: _,
161
+ _owner: T
162
+ }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(i, "ref", {
163
163
  enumerable: !1,
164
- get: f
165
- }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
164
+ get: d
165
+ }) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
168
168
  writable: !0,
169
169
  value: 0
170
- }), Object.defineProperty(o, "_debugInfo", {
170
+ }), Object.defineProperty(i, "_debugInfo", {
171
171
  configurable: !1,
172
172
  enumerable: !1,
173
173
  writable: !0,
174
174
  value: null
175
- }), Object.defineProperty(o, "_debugStack", {
175
+ }), Object.defineProperty(i, "_debugStack", {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
- value: Y
180
- }), Object.defineProperty(o, "_debugTask", {
179
+ value: q
180
+ }), Object.defineProperty(i, "_debugTask", {
181
181
  configurable: !1,
182
182
  enumerable: !1,
183
183
  writable: !0,
184
- value: Z
185
- }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
184
+ value: oe
185
+ }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
186
186
  }
187
- function d(o, p, R, P, Y, Z) {
188
- var I = p.children;
189
- if (I !== void 0)
190
- if (P)
191
- if (G(I)) {
192
- for (P = 0; P < I.length; P++)
193
- h(I[P]);
194
- Object.freeze && Object.freeze(I);
187
+ function p(i, c, _, T, q, oe) {
188
+ var v = c.children;
189
+ if (v !== void 0)
190
+ if (T)
191
+ if (Z(v)) {
192
+ for (T = 0; T < v.length; T++)
193
+ m(v[T]);
194
+ Object.freeze && Object.freeze(v);
195
195
  } else
196
196
  console.error(
197
197
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
198
  );
199
- else h(I);
200
- if (S.call(p, "key")) {
201
- I = e(o);
202
- var b = Object.keys(p).filter(function($) {
203
- return $ !== "key";
199
+ else m(v);
200
+ if ($.call(c, "key")) {
201
+ v = e(i);
202
+ var E = Object.keys(c).filter(function(u) {
203
+ return u !== "key";
204
204
  });
205
- P = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", ie[I + P] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ T = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", ae[v + T] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
206
206
  `A props object containing a "key" prop is being spread into JSX:
207
207
  let props = %s;
208
208
  <%s {...props} />
209
209
  React keys must be passed directly to JSX without using spread:
210
210
  let props = %s;
211
211
  <%s key={someKey} {...props} />`,
212
- P,
213
- I,
214
- b,
215
- I
216
- ), ie[I + P] = !0);
212
+ T,
213
+ v,
214
+ E,
215
+ v
216
+ ), ae[v + T] = !0);
217
217
  }
218
- if (I = null, R !== void 0 && (t(R), I = "" + R), s(p) && (t(p.key), I = "" + p.key), "key" in p) {
219
- R = {};
220
- for (var oe in p)
221
- oe !== "key" && (R[oe] = p[oe]);
222
- } else R = p;
223
- return I && c(
224
- R,
225
- typeof o == "function" ? o.displayName || o.name || "Unknown" : o
226
- ), u(
227
- o,
228
- I,
229
- R,
230
- a(),
231
- Y,
232
- Z
218
+ if (v = null, _ !== void 0 && (t(_), v = "" + _), s(c) && (t(c.key), v = "" + c.key), "key" in c) {
219
+ _ = {};
220
+ for (var f in c)
221
+ f !== "key" && (_[f] = c[f]);
222
+ } else _ = c;
223
+ return v && l(
224
+ _,
225
+ typeof i == "function" ? i.displayName || i.name || "Unknown" : i
226
+ ), h(
227
+ i,
228
+ v,
229
+ _,
230
+ n(),
231
+ q,
232
+ oe
233
233
  );
234
234
  }
235
- function h(o) {
236
- C(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === M && (o._payload.status === "fulfilled" ? C(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
235
+ function m(i) {
236
+ A(i) ? i._store && (i._store.validated = 1) : typeof i == "object" && i !== null && i.$$typeof === J && (i._payload.status === "fulfilled" ? A(i._payload.value) && i._payload.value._store && (i._payload.value._store.validated = 1) : i._store && (i._store.validated = 1));
237
237
  }
238
- function C(o) {
239
- return typeof o == "object" && o !== null && o.$$typeof === k;
238
+ function A(i) {
239
+ return typeof i == "object" && i !== null && i.$$typeof === R;
240
240
  }
241
- var E = xr, k = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), O = Symbol.for("react.consumer"), z = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), K = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), T = Symbol.for("react.client.reference"), j = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, G = Array.isArray, V = console.createTask ? console.createTask : function() {
241
+ var S = hr, R = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), O = Symbol.for("react.consumer"), M = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), Y = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), L = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), z = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, Z = Array.isArray, U = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- E = {
245
- react_stack_bottom_frame: function(o) {
246
- return o();
244
+ S = {
245
+ react_stack_bottom_frame: function(i) {
246
+ return i();
247
247
  }
248
248
  };
249
- var ae, H = {}, U = E.react_stack_bottom_frame.bind(
250
- E,
251
- i
252
- )(), J = V(n(i)), ie = {};
253
- me.Fragment = m, me.jsx = function(o, p, R) {
254
- var P = 1e4 > j.recentlyCreatedOwnerStacks++;
255
- return d(
256
- o,
257
- p,
258
- R,
249
+ var D, Q = {}, B = S.react_stack_bottom_frame.bind(
250
+ S,
251
+ o
252
+ )(), te = U(a(o)), ae = {};
253
+ de.Fragment = y, de.jsx = function(i, c, _) {
254
+ var T = 1e4 > z.recentlyCreatedOwnerStacks++;
255
+ return p(
256
+ i,
257
+ c,
258
+ _,
259
259
  !1,
260
- P ? Error("react-stack-top-frame") : U,
261
- P ? V(n(o)) : J
260
+ T ? Error("react-stack-top-frame") : B,
261
+ T ? U(a(i)) : te
262
262
  );
263
- }, me.jsxs = function(o, p, R) {
264
- var P = 1e4 > j.recentlyCreatedOwnerStacks++;
265
- return d(
266
- o,
267
- p,
268
- R,
263
+ }, de.jsxs = function(i, c, _) {
264
+ var T = 1e4 > z.recentlyCreatedOwnerStacks++;
265
+ return p(
266
+ i,
267
+ c,
268
+ _,
269
269
  !0,
270
- P ? Error("react-stack-top-frame") : U,
271
- P ? V(n(o)) : J
270
+ T ? Error("react-stack-top-frame") : B,
271
+ T ? U(a(i)) : te
272
272
  );
273
273
  };
274
- })()), me;
274
+ })()), de;
275
275
  }
276
- var He;
277
- function Sr() {
278
- return He || (He = 1, process.env.NODE_ENV === "production" ? Ee.exports = Er() : Ee.exports = kr()), Ee.exports;
276
+ var qe;
277
+ function xr() {
278
+ return qe || (qe = 1, process.env.NODE_ENV === "production" ? xe.exports = br() : xe.exports = vr()), xe.exports;
279
279
  }
280
- var L = Sr();
281
- function Me() {
282
- return Me = Object.assign ? Object.assign.bind() : function(e) {
280
+ var I = xr();
281
+ function Ie() {
282
+ return Ie = Object.assign ? Object.assign.bind() : function(e) {
283
283
  for (var r = 1; r < arguments.length; r++) {
284
284
  var t = arguments[r];
285
- for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
285
+ for (var a in t) ({}).hasOwnProperty.call(t, a) && (e[a] = t[a]);
286
286
  }
287
287
  return e;
288
- }, Me.apply(null, arguments);
288
+ }, Ie.apply(null, arguments);
289
289
  }
290
- function Rr(e) {
290
+ function wr(e) {
291
291
  if (e.sheet)
292
292
  return e.sheet;
293
293
  for (var r = 0; r < document.styleSheets.length; r++)
294
294
  if (document.styleSheets[r].ownerNode === e)
295
295
  return document.styleSheets[r];
296
296
  }
297
- function Cr(e) {
297
+ function kr(e) {
298
298
  var r = document.createElement("style");
299
299
  return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r;
300
300
  }
301
- var Ar = /* @__PURE__ */ (function() {
301
+ var Pr = /* @__PURE__ */ (function() {
302
302
  function e(t) {
303
- var n = this;
304
- this._insertTag = function(a) {
305
- var i;
306
- 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);
303
+ var a = this;
304
+ this._insertTag = function(n) {
305
+ var o;
306
+ a.tags.length === 0 ? a.insertionPoint ? o = a.insertionPoint.nextSibling : a.prepend ? o = a.container.firstChild : o = a.before : o = a.tags[a.tags.length - 1].nextSibling, a.container.insertBefore(n, o), a.tags.push(n);
307
307
  }, this.isSpeedy = t.speedy === void 0 ? !0 : t.speedy, this.tags = [], this.ctr = 0, this.nonce = t.nonce, this.key = t.key, this.container = t.container, this.prepend = t.prepend, this.insertionPoint = t.insertionPoint, this.before = null;
308
308
  }
309
309
  var r = e.prototype;
310
- return r.hydrate = function(n) {
311
- n.forEach(this._insertTag);
312
- }, r.insert = function(n) {
313
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Cr(this));
314
- var a = this.tags[this.tags.length - 1];
310
+ return r.hydrate = function(a) {
311
+ a.forEach(this._insertTag);
312
+ }, r.insert = function(a) {
313
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(kr(this));
314
+ var n = this.tags[this.tags.length - 1];
315
315
  if (this.isSpeedy) {
316
- var i = Rr(a);
316
+ var o = wr(n);
317
317
  try {
318
- i.insertRule(n, i.cssRules.length);
318
+ o.insertRule(a, o.cssRules.length);
319
319
  } catch {
320
320
  }
321
321
  } else
322
- a.appendChild(document.createTextNode(n));
322
+ n.appendChild(document.createTextNode(a));
323
323
  this.ctr++;
324
324
  }, r.flush = function() {
325
- this.tags.forEach(function(n) {
326
- var a;
327
- return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
325
+ this.tags.forEach(function(a) {
326
+ var n;
327
+ return (n = a.parentNode) == null ? void 0 : n.removeChild(a);
328
328
  }), this.tags = [], this.ctr = 0;
329
329
  }, e;
330
- })(), W = "-ms-", Oe = "-moz-", _ = "-webkit-", or = "comm", Be = "rule", Ue = "decl", Tr = "@import", sr = "@keyframes", Ir = "@layer", Or = Math.abs, je = String.fromCharCode, jr = Object.assign;
331
- function $r(e, r) {
332
- return B(e, 0) ^ 45 ? (((r << 2 ^ B(e, 0)) << 2 ^ B(e, 1)) << 2 ^ B(e, 2)) << 2 ^ B(e, 3) : 0;
330
+ })(), V = "-ms-", _e = "-moz-", w = "-webkit-", nr = "comm", Le = "rule", Ne = "decl", Er = "@import", ar = "@keyframes", Sr = "@layer", Rr = Math.abs, Te = String.fromCharCode, _r = Object.assign;
331
+ function Tr(e, r) {
332
+ return N(e, 0) ^ 45 ? (((r << 2 ^ N(e, 0)) << 2 ^ N(e, 1)) << 2 ^ N(e, 2)) << 2 ^ N(e, 3) : 0;
333
333
  }
334
- function cr(e) {
334
+ function ir(e) {
335
335
  return e.trim();
336
336
  }
337
- function Lr(e, r) {
337
+ function Ar(e, r) {
338
338
  return (e = r.exec(e)) ? e[0] : e;
339
339
  }
340
- function w(e, r, t) {
340
+ function k(e, r, t) {
341
341
  return e.replace(r, t);
342
342
  }
343
- function Ve(e, r) {
343
+ function Me(e, r) {
344
344
  return e.indexOf(r);
345
345
  }
346
- function B(e, r) {
346
+ function N(e, r) {
347
347
  return e.charCodeAt(r) | 0;
348
348
  }
349
- function ge(e, r, t) {
349
+ function he(e, r, t) {
350
350
  return e.slice(r, t);
351
351
  }
352
- function ee(e) {
352
+ function K(e) {
353
353
  return e.length;
354
354
  }
355
- function We(e) {
355
+ function Ve(e) {
356
356
  return e.length;
357
357
  }
358
- function ke(e, r) {
358
+ function we(e, r) {
359
359
  return r.push(e), e;
360
360
  }
361
- function zr(e, r) {
361
+ function Cr(e, r) {
362
362
  return e.map(r).join("");
363
363
  }
364
- var $e = 1, ue = 1, lr = 0, X = 0, F = 0, fe = "";
365
- function Le(e, r, t, n, a, i, s) {
366
- return { value: e, root: r, parent: t, type: n, props: a, children: i, line: $e, column: ue, length: s, return: "" };
364
+ var Ae = 1, ce = 1, or = 0, W = 0, j = 0, ue = "";
365
+ function Ce(e, r, t, a, n, o, s) {
366
+ return { value: e, root: r, parent: t, type: a, props: n, children: o, line: Ae, column: ce, length: s, return: "" };
367
367
  }
368
- function ve(e, r) {
369
- return jr(Le("", null, null, "", null, null, 0), e, { length: -e.length }, r);
368
+ function pe(e, r) {
369
+ return _r(Ce("", null, null, "", null, null, 0), e, { length: -e.length }, r);
370
370
  }
371
- function Nr() {
372
- return F;
371
+ function Or() {
372
+ return j;
373
373
  }
374
- function Fr() {
375
- return F = X > 0 ? B(fe, --X) : 0, ue--, F === 10 && (ue = 1, $e--), F;
374
+ function $r() {
375
+ return j = W > 0 ? N(ue, --W) : 0, ce--, j === 10 && (ce = 1, Ae--), j;
376
376
  }
377
- function Q() {
378
- return F = X < lr ? B(fe, X++) : 0, ue++, F === 10 && (ue = 1, $e++), F;
377
+ function H() {
378
+ return j = W < or ? N(ue, W++) : 0, ce++, j === 10 && (ce = 1, Ae++), j;
379
379
  }
380
- function te() {
381
- return B(fe, X);
380
+ function re() {
381
+ return N(ue, W);
382
382
  }
383
- function Ce() {
384
- return X;
383
+ function Pe() {
384
+ return W;
385
385
  }
386
- function Pe(e, r) {
387
- return ge(fe, e, r);
386
+ function ye(e, r) {
387
+ return he(ue, e, r);
388
388
  }
389
- function be(e) {
389
+ function me(e) {
390
390
  switch (e) {
391
391
  // \0 \t \n \r \s whitespace token
392
392
  case 0:
@@ -424,260 +424,260 @@ function be(e) {
424
424
  }
425
425
  return 0;
426
426
  }
427
- function ur(e) {
428
- return $e = ue = 1, lr = ee(fe = e), X = 0, [];
427
+ function sr(e) {
428
+ return Ae = ce = 1, or = K(ue = e), W = 0, [];
429
429
  }
430
- function dr(e) {
431
- return fe = "", e;
430
+ function cr(e) {
431
+ return ue = "", e;
432
432
  }
433
- function Ae(e) {
434
- return cr(Pe(X - 1, De(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
433
+ function Ee(e) {
434
+ return ir(ye(W - 1, Fe(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
435
435
  }
436
- function Mr(e) {
437
- for (; (F = te()) && F < 33; )
438
- Q();
439
- return be(e) > 2 || be(F) > 3 ? "" : " ";
436
+ function jr(e) {
437
+ for (; (j = re()) && j < 33; )
438
+ H();
439
+ return me(e) > 2 || me(j) > 3 ? "" : " ";
440
440
  }
441
- function Vr(e, r) {
442
- for (; --r && Q() && !(F < 48 || F > 102 || F > 57 && F < 65 || F > 70 && F < 97); )
441
+ function Ir(e, r) {
442
+ for (; --r && H() && !(j < 48 || j > 102 || j > 57 && j < 65 || j > 70 && j < 97); )
443
443
  ;
444
- return Pe(e, Ce() + (r < 6 && te() == 32 && Q() == 32));
444
+ return ye(e, Pe() + (r < 6 && re() == 32 && H() == 32));
445
445
  }
446
- function De(e) {
447
- for (; Q(); )
448
- switch (F) {
446
+ function Fe(e) {
447
+ for (; H(); )
448
+ switch (j) {
449
449
  // ] ) " '
450
450
  case e:
451
- return X;
451
+ return W;
452
452
  // " '
453
453
  case 34:
454
454
  case 39:
455
- e !== 34 && e !== 39 && De(F);
455
+ e !== 34 && e !== 39 && Fe(j);
456
456
  break;
457
457
  // (
458
458
  case 40:
459
- e === 41 && De(e);
459
+ e === 41 && Fe(e);
460
460
  break;
461
461
  // \
462
462
  case 92:
463
- Q();
463
+ H();
464
464
  break;
465
465
  }
466
- return X;
466
+ return W;
467
467
  }
468
- function Dr(e, r) {
469
- for (; Q() && e + F !== 57; )
470
- if (e + F === 84 && te() === 47)
468
+ function Mr(e, r) {
469
+ for (; H() && e + j !== 57; )
470
+ if (e + j === 84 && re() === 47)
471
471
  break;
472
- return "/*" + Pe(r, X - 1) + "*" + je(e === 47 ? e : Q());
472
+ return "/*" + ye(r, W - 1) + "*" + Te(e === 47 ? e : H());
473
473
  }
474
- function Br(e) {
475
- for (; !be(te()); )
476
- Q();
477
- return Pe(e, X);
474
+ function Fr(e) {
475
+ for (; !me(re()); )
476
+ H();
477
+ return ye(e, W);
478
478
  }
479
- function Ur(e) {
480
- return dr(Te("", null, null, null, [""], e = ur(e), 0, [0], e));
479
+ function Lr(e) {
480
+ return cr(Se("", null, null, null, [""], e = sr(e), 0, [0], e));
481
481
  }
482
- function Te(e, r, t, n, a, i, s, c, f) {
483
- for (var u = 0, d = 0, h = s, C = 0, E = 0, k = 0, y = 1, m = 1, v = 1, x = 0, O = "", z = a, N = i, A = n, g = O; m; )
484
- switch (k = x, x = Q()) {
482
+ function Se(e, r, t, a, n, o, s, l, d) {
483
+ for (var h = 0, p = 0, m = s, A = 0, S = 0, R = 0, g = 1, y = 1, b = 1, P = 0, O = "", M = n, F = o, C = a, x = O; y; )
484
+ switch (R = P, P = H()) {
485
485
  // (
486
486
  case 40:
487
- if (k != 108 && B(g, h - 1) == 58) {
488
- Ve(g += w(Ae(x), "&", "&\f"), "&\f") != -1 && (v = -1);
487
+ if (R != 108 && N(x, m - 1) == 58) {
488
+ Me(x += k(Ee(P), "&", "&\f"), "&\f") != -1 && (b = -1);
489
489
  break;
490
490
  }
491
491
  // " ' [
492
492
  case 34:
493
493
  case 39:
494
494
  case 91:
495
- g += Ae(x);
495
+ x += Ee(P);
496
496
  break;
497
497
  // \t \n \r \s
498
498
  case 9:
499
499
  case 10:
500
500
  case 13:
501
501
  case 32:
502
- g += Mr(k);
502
+ x += jr(R);
503
503
  break;
504
504
  // \
505
505
  case 92:
506
- g += Vr(Ce() - 1, 7);
506
+ x += Ir(Pe() - 1, 7);
507
507
  continue;
508
508
  // /
509
509
  case 47:
510
- switch (te()) {
510
+ switch (re()) {
511
511
  case 42:
512
512
  case 47:
513
- ke(Wr(Dr(Q(), Ce()), r, t), f);
513
+ we(Nr(Mr(H(), Pe()), r, t), d);
514
514
  break;
515
515
  default:
516
- g += "/";
516
+ x += "/";
517
517
  }
518
518
  break;
519
519
  // {
520
- case 123 * y:
521
- c[u++] = ee(g) * v;
520
+ case 123 * g:
521
+ l[h++] = K(x) * b;
522
522
  // } ; \0
523
- case 125 * y:
523
+ case 125 * g:
524
524
  case 59:
525
525
  case 0:
526
- switch (x) {
526
+ switch (P) {
527
527
  // \0 }
528
528
  case 0:
529
529
  case 125:
530
- m = 0;
530
+ y = 0;
531
531
  // ;
532
- case 59 + d:
533
- v == -1 && (g = w(g, /\f/g, "")), E > 0 && ee(g) - h && ke(E > 32 ? Je(g + ";", n, t, h - 1) : Je(w(g, " ", "") + ";", n, t, h - 2), f);
532
+ case 59 + p:
533
+ b == -1 && (x = k(x, /\f/g, "")), S > 0 && K(x) - m && we(S > 32 ? Ge(x + ";", a, t, m - 1) : Ge(k(x, " ", "") + ";", a, t, m - 2), d);
534
534
  break;
535
535
  // @ ;
536
536
  case 59:
537
- g += ";";
537
+ x += ";";
538
538
  // { rule/at-rule
539
539
  default:
540
- if (ke(A = Xe(g, r, t, u, d, a, c, O, z = [], N = [], h), i), x === 123)
541
- if (d === 0)
542
- Te(g, r, A, A, z, i, h, c, N);
540
+ if (we(C = He(x, r, t, h, p, n, l, O, M = [], F = [], m), o), P === 123)
541
+ if (p === 0)
542
+ Se(x, r, C, C, M, o, m, l, F);
543
543
  else
544
- switch (C === 99 && B(g, 3) === 110 ? 100 : C) {
544
+ switch (A === 99 && N(x, 3) === 110 ? 100 : A) {
545
545
  // d l m s
546
546
  case 100:
547
547
  case 108:
548
548
  case 109:
549
549
  case 115:
550
- Te(e, A, A, n && ke(Xe(e, A, A, 0, 0, a, c, O, a, z = [], h), N), a, N, h, c, n ? z : N);
550
+ Se(e, C, C, a && we(He(e, C, C, 0, 0, n, l, O, n, M = [], m), F), n, F, m, l, a ? M : F);
551
551
  break;
552
552
  default:
553
- Te(g, A, A, A, [""], N, 0, c, N);
553
+ Se(x, C, C, C, [""], F, 0, l, F);
554
554
  }
555
555
  }
556
- u = d = E = 0, y = v = 1, O = g = "", h = s;
556
+ h = p = S = 0, g = b = 1, O = x = "", m = s;
557
557
  break;
558
558
  // :
559
559
  case 58:
560
- h = 1 + ee(g), E = k;
560
+ m = 1 + K(x), S = R;
561
561
  default:
562
- if (y < 1) {
563
- if (x == 123)
564
- --y;
565
- else if (x == 125 && y++ == 0 && Fr() == 125)
562
+ if (g < 1) {
563
+ if (P == 123)
564
+ --g;
565
+ else if (P == 125 && g++ == 0 && $r() == 125)
566
566
  continue;
567
567
  }
568
- switch (g += je(x), x * y) {
568
+ switch (x += Te(P), P * g) {
569
569
  // &
570
570
  case 38:
571
- v = d > 0 ? 1 : (g += "\f", -1);
571
+ b = p > 0 ? 1 : (x += "\f", -1);
572
572
  break;
573
573
  // ,
574
574
  case 44:
575
- c[u++] = (ee(g) - 1) * v, v = 1;
575
+ l[h++] = (K(x) - 1) * b, b = 1;
576
576
  break;
577
577
  // @
578
578
  case 64:
579
- te() === 45 && (g += Ae(Q())), C = te(), d = h = ee(O = g += Br(Ce())), x++;
579
+ re() === 45 && (x += Ee(H())), A = re(), p = m = K(O = x += Fr(Pe())), P++;
580
580
  break;
581
581
  // -
582
582
  case 45:
583
- k === 45 && ee(g) == 2 && (y = 0);
583
+ R === 45 && K(x) == 2 && (g = 0);
584
584
  }
585
585
  }
586
- return i;
586
+ return o;
587
587
  }
588
- function Xe(e, r, t, n, a, i, s, c, f, u, d) {
589
- for (var h = a - 1, C = a === 0 ? i : [""], E = We(C), k = 0, y = 0, m = 0; k < n; ++k)
590
- for (var v = 0, x = ge(e, h + 1, h = Or(y = s[k])), O = e; v < E; ++v)
591
- (O = cr(y > 0 ? C[v] + " " + x : w(x, /&\f/g, C[v]))) && (f[m++] = O);
592
- return Le(e, r, t, a === 0 ? Be : c, f, u, d);
588
+ function He(e, r, t, a, n, o, s, l, d, h, p) {
589
+ for (var m = n - 1, A = n === 0 ? o : [""], S = Ve(A), R = 0, g = 0, y = 0; R < a; ++R)
590
+ for (var b = 0, P = he(e, m + 1, m = Rr(g = s[R])), O = e; b < S; ++b)
591
+ (O = ir(g > 0 ? A[b] + " " + P : k(P, /&\f/g, A[b]))) && (d[y++] = O);
592
+ return Ce(e, r, t, n === 0 ? Le : l, d, h, p);
593
593
  }
594
- function Wr(e, r, t) {
595
- return Le(e, r, t, or, je(Nr()), ge(e, 2, -2), 0);
594
+ function Nr(e, r, t) {
595
+ return Ce(e, r, t, nr, Te(Or()), he(e, 2, -2), 0);
596
596
  }
597
- function Je(e, r, t, n) {
598
- return Le(e, r, t, Ue, ge(e, 0, n), ge(e, n + 1, -1), n);
597
+ function Ge(e, r, t, a) {
598
+ return Ce(e, r, t, Ne, he(e, 0, a), he(e, a + 1, -1), a);
599
599
  }
600
- function le(e, r) {
601
- for (var t = "", n = We(e), a = 0; a < n; a++)
602
- t += r(e[a], a, e, r) || "";
600
+ function se(e, r) {
601
+ for (var t = "", a = Ve(e), n = 0; n < a; n++)
602
+ t += r(e[n], n, e, r) || "";
603
603
  return t;
604
604
  }
605
- function qr(e, r, t, n) {
605
+ function Vr(e, r, t, a) {
606
606
  switch (e.type) {
607
- case Ir:
607
+ case Sr:
608
608
  if (e.children.length) break;
609
- case Tr:
610
- case Ue:
609
+ case Er:
610
+ case Ne:
611
611
  return e.return = e.return || e.value;
612
- case or:
612
+ case nr:
613
613
  return "";
614
- case sr:
615
- return e.return = e.value + "{" + le(e.children, n) + "}";
616
- case Be:
614
+ case ar:
615
+ return e.return = e.value + "{" + se(e.children, a) + "}";
616
+ case Le:
617
617
  e.value = e.props.join(",");
618
618
  }
619
- return ee(t = le(e.children, n)) ? e.return = e.value + "{" + t + "}" : "";
619
+ return K(t = se(e.children, a)) ? e.return = e.value + "{" + t + "}" : "";
620
620
  }
621
- function Yr(e) {
622
- var r = We(e);
623
- return function(t, n, a, i) {
624
- for (var s = "", c = 0; c < r; c++)
625
- s += e[c](t, n, a, i) || "";
621
+ function zr(e) {
622
+ var r = Ve(e);
623
+ return function(t, a, n, o) {
624
+ for (var s = "", l = 0; l < r; l++)
625
+ s += e[l](t, a, n, o) || "";
626
626
  return s;
627
627
  };
628
628
  }
629
- function Gr(e) {
629
+ function Ur(e) {
630
630
  return function(r) {
631
631
  r.root || (r = r.return) && e(r);
632
632
  };
633
633
  }
634
- function fr(e) {
634
+ function lr(e) {
635
635
  var r = /* @__PURE__ */ Object.create(null);
636
636
  return function(t) {
637
637
  return r[t] === void 0 && (r[t] = e(t)), r[t];
638
638
  };
639
639
  }
640
- var Hr = function(r, t, n) {
641
- for (var a = 0, i = 0; a = i, i = te(), a === 38 && i === 12 && (t[n] = 1), !be(i); )
642
- Q();
643
- return Pe(r, X);
644
- }, Xr = function(r, t) {
645
- var n = -1, a = 44;
640
+ var Dr = function(r, t, a) {
641
+ for (var n = 0, o = 0; n = o, o = re(), n === 38 && o === 12 && (t[a] = 1), !me(o); )
642
+ H();
643
+ return ye(r, W);
644
+ }, Wr = function(r, t) {
645
+ var a = -1, n = 44;
646
646
  do
647
- switch (be(a)) {
647
+ switch (me(n)) {
648
648
  case 0:
649
- a === 38 && te() === 12 && (t[n] = 1), r[n] += Hr(X - 1, t, n);
649
+ n === 38 && re() === 12 && (t[a] = 1), r[a] += Dr(W - 1, t, a);
650
650
  break;
651
651
  case 2:
652
- r[n] += Ae(a);
652
+ r[a] += Ee(n);
653
653
  break;
654
654
  case 4:
655
- if (a === 44) {
656
- r[++n] = te() === 58 ? "&\f" : "", t[n] = r[n].length;
655
+ if (n === 44) {
656
+ r[++a] = re() === 58 ? "&\f" : "", t[a] = r[a].length;
657
657
  break;
658
658
  }
659
659
  // fallthrough
660
660
  default:
661
- r[n] += je(a);
661
+ r[a] += Te(n);
662
662
  }
663
- while (a = Q());
663
+ while (n = H());
664
664
  return r;
665
- }, Jr = function(r, t) {
666
- return dr(Xr(ur(r), t));
667
- }, Qe = /* @__PURE__ */ new WeakMap(), Qr = function(r) {
665
+ }, Yr = function(r, t) {
666
+ return cr(Wr(sr(r), t));
667
+ }, Be = /* @__PURE__ */ new WeakMap(), qr = function(r) {
668
668
  if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo
669
669
  // negative .length indicates that this rule has been already prefixed
670
670
  r.length < 1)) {
671
- for (var t = r.value, n = r.parent, a = r.column === n.column && r.line === n.line; n.type !== "rule"; )
672
- if (n = n.parent, !n) return;
673
- if (!(r.props.length === 1 && t.charCodeAt(0) !== 58 && !Qe.get(n)) && !a) {
674
- Qe.set(r, !0);
675
- for (var i = [], s = Jr(t, i), c = n.props, f = 0, u = 0; f < s.length; f++)
676
- for (var d = 0; d < c.length; d++, u++)
677
- r.props[u] = i[f] ? s[f].replace(/&\f/g, c[d]) : c[d] + " " + s[f];
671
+ for (var t = r.value, a = r.parent, n = r.column === a.column && r.line === a.line; a.type !== "rule"; )
672
+ if (a = a.parent, !a) return;
673
+ if (!(r.props.length === 1 && t.charCodeAt(0) !== 58 && !Be.get(a)) && !n) {
674
+ Be.set(r, !0);
675
+ for (var o = [], s = Yr(t, o), l = a.props, d = 0, h = 0; d < s.length; d++)
676
+ for (var p = 0; p < l.length; p++, h++)
677
+ r.props[h] = o[d] ? s[d].replace(/&\f/g, l[p]) : l[p] + " " + s[d];
678
678
  }
679
679
  }
680
- }, Kr = function(r) {
680
+ }, Hr = function(r) {
681
681
  if (r.type === "decl") {
682
682
  var t = r.value;
683
683
  // charcode for l
@@ -685,11 +685,11 @@ var Hr = function(r, t, n) {
685
685
  t.charCodeAt(2) === 98 && (r.return = "", r.value = "");
686
686
  }
687
687
  };
688
- function pr(e, r) {
689
- switch ($r(e, r)) {
688
+ function ur(e, r) {
689
+ switch (Tr(e, r)) {
690
690
  // color-adjust
691
691
  case 5103:
692
- return _ + "print-" + e + e;
692
+ return w + "print-" + e + e;
693
693
  // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
694
694
  case 5737:
695
695
  case 4201:
@@ -719,58 +719,58 @@ function pr(e, r) {
719
719
  case 5365:
720
720
  case 5621:
721
721
  case 3829:
722
- return _ + e + e;
722
+ return w + e + e;
723
723
  // appearance, user-select, transform, hyphens, text-size-adjust
724
724
  case 5349:
725
725
  case 4246:
726
726
  case 4810:
727
727
  case 6968:
728
728
  case 2756:
729
- return _ + e + Oe + e + W + e + e;
729
+ return w + e + _e + e + V + e + e;
730
730
  // flex, flex-direction
731
731
  case 6828:
732
732
  case 4268:
733
- return _ + e + W + e + e;
733
+ return w + e + V + e + e;
734
734
  // order
735
735
  case 6165:
736
- return _ + e + W + "flex-" + e + e;
736
+ return w + e + V + "flex-" + e + e;
737
737
  // align-items
738
738
  case 5187:
739
- return _ + e + w(e, /(\w+).+(:[^]+)/, _ + "box-$1$2" + W + "flex-$1$2") + e;
739
+ return w + e + k(e, /(\w+).+(:[^]+)/, w + "box-$1$2" + V + "flex-$1$2") + e;
740
740
  // align-self
741
741
  case 5443:
742
- return _ + e + W + "flex-item-" + w(e, /flex-|-self/, "") + e;
742
+ return w + e + V + "flex-item-" + k(e, /flex-|-self/, "") + e;
743
743
  // align-content
744
744
  case 4675:
745
- return _ + e + W + "flex-line-pack" + w(e, /align-content|flex-|-self/, "") + e;
745
+ return w + e + V + "flex-line-pack" + k(e, /align-content|flex-|-self/, "") + e;
746
746
  // flex-shrink
747
747
  case 5548:
748
- return _ + e + W + w(e, "shrink", "negative") + e;
748
+ return w + e + V + k(e, "shrink", "negative") + e;
749
749
  // flex-basis
750
750
  case 5292:
751
- return _ + e + W + w(e, "basis", "preferred-size") + e;
751
+ return w + e + V + k(e, "basis", "preferred-size") + e;
752
752
  // flex-grow
753
753
  case 6060:
754
- return _ + "box-" + w(e, "-grow", "") + _ + e + W + w(e, "grow", "positive") + e;
754
+ return w + "box-" + k(e, "-grow", "") + w + e + V + k(e, "grow", "positive") + e;
755
755
  // transition
756
756
  case 4554:
757
- return _ + w(e, /([^-])(transform)/g, "$1" + _ + "$2") + e;
757
+ return w + k(e, /([^-])(transform)/g, "$1" + w + "$2") + e;
758
758
  // cursor
759
759
  case 6187:
760
- return w(w(w(e, /(zoom-|grab)/, _ + "$1"), /(image-set)/, _ + "$1"), e, "") + e;
760
+ return k(k(k(e, /(zoom-|grab)/, w + "$1"), /(image-set)/, w + "$1"), e, "") + e;
761
761
  // background, background-image
762
762
  case 5495:
763
763
  case 3959:
764
- return w(e, /(image-set\([^]*)/, _ + "$1$`$1");
764
+ return k(e, /(image-set\([^]*)/, w + "$1$`$1");
765
765
  // justify-content
766
766
  case 4968:
767
- return w(w(e, /(.+:)(flex-)?(.*)/, _ + "box-pack:$3" + W + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + _ + e + e;
767
+ return k(k(e, /(.+:)(flex-)?(.*)/, w + "box-pack:$3" + V + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + w + e + e;
768
768
  // (margin|padding)-inline-(start|end)
769
769
  case 4095:
770
770
  case 3583:
771
771
  case 4068:
772
772
  case 2532:
773
- return w(e, /(.+)-inline(.+)/, _ + "$1$2") + e;
773
+ return k(e, /(.+)-inline(.+)/, w + "$1$2") + e;
774
774
  // (min|max)?(width|height|inline-size|block-size)
775
775
  case 8116:
776
776
  case 7059:
@@ -784,114 +784,114 @@ function pr(e, r) {
784
784
  case 5789:
785
785
  case 5021:
786
786
  case 4765:
787
- if (ee(e) - 1 - r > 6) switch (B(e, r + 1)) {
787
+ if (K(e) - 1 - r > 6) switch (N(e, r + 1)) {
788
788
  // (m)ax-content, (m)in-content
789
789
  case 109:
790
- if (B(e, r + 4) !== 45) break;
790
+ if (N(e, r + 4) !== 45) break;
791
791
  // (f)ill-available, (f)it-content
792
792
  case 102:
793
- return w(e, /(.+:)(.+)-([^]+)/, "$1" + _ + "$2-$3$1" + Oe + (B(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
793
+ return k(e, /(.+:)(.+)-([^]+)/, "$1" + w + "$2-$3$1" + _e + (N(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
794
794
  // (s)tretch
795
795
  case 115:
796
- return ~Ve(e, "stretch") ? pr(w(e, "stretch", "fill-available"), r) + e : e;
796
+ return ~Me(e, "stretch") ? ur(k(e, "stretch", "fill-available"), r) + e : e;
797
797
  }
798
798
  break;
799
799
  // position: sticky
800
800
  case 4949:
801
- if (B(e, r + 1) !== 115) break;
801
+ if (N(e, r + 1) !== 115) break;
802
802
  // display: (flex|inline-flex)
803
803
  case 6444:
804
- switch (B(e, ee(e) - 3 - (~Ve(e, "!important") && 10))) {
804
+ switch (N(e, K(e) - 3 - (~Me(e, "!important") && 10))) {
805
805
  // stic(k)y
806
806
  case 107:
807
- return w(e, ":", ":" + _) + e;
807
+ return k(e, ":", ":" + w) + e;
808
808
  // (inline-)?fl(e)x
809
809
  case 101:
810
- return w(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + _ + (B(e, 14) === 45 ? "inline-" : "") + "box$3$1" + _ + "$2$3$1" + W + "$2box$3") + e;
810
+ return k(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + w + (N(e, 14) === 45 ? "inline-" : "") + "box$3$1" + w + "$2$3$1" + V + "$2box$3") + e;
811
811
  }
812
812
  break;
813
813
  // writing-mode
814
814
  case 5936:
815
- switch (B(e, r + 11)) {
815
+ switch (N(e, r + 11)) {
816
816
  // vertical-l(r)
817
817
  case 114:
818
- return _ + e + W + w(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
818
+ return w + e + V + k(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
819
819
  // vertical-r(l)
820
820
  case 108:
821
- return _ + e + W + w(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
821
+ return w + e + V + k(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
822
822
  // horizontal(-)tb
823
823
  case 45:
824
- return _ + e + W + w(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
824
+ return w + e + V + k(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
825
825
  }
826
- return _ + e + W + e + e;
826
+ return w + e + V + e + e;
827
827
  }
828
828
  return e;
829
829
  }
830
- var Zr = function(r, t, n, a) {
830
+ var Gr = function(r, t, a, n) {
831
831
  if (r.length > -1 && !r.return) switch (r.type) {
832
- case Ue:
833
- r.return = pr(r.value, r.length);
832
+ case Ne:
833
+ r.return = ur(r.value, r.length);
834
834
  break;
835
- case sr:
836
- return le([ve(r, {
837
- value: w(r.value, "@", "@" + _)
838
- })], a);
839
- case Be:
840
- if (r.length) return zr(r.props, function(i) {
841
- switch (Lr(i, /(::plac\w+|:read-\w+)/)) {
835
+ case ar:
836
+ return se([pe(r, {
837
+ value: k(r.value, "@", "@" + w)
838
+ })], n);
839
+ case Le:
840
+ if (r.length) return Cr(r.props, function(o) {
841
+ switch (Ar(o, /(::plac\w+|:read-\w+)/)) {
842
842
  // :read-(only|write)
843
843
  case ":read-only":
844
844
  case ":read-write":
845
- return le([ve(r, {
846
- props: [w(i, /:(read-\w+)/, ":" + Oe + "$1")]
847
- })], a);
845
+ return se([pe(r, {
846
+ props: [k(o, /:(read-\w+)/, ":" + _e + "$1")]
847
+ })], n);
848
848
  // :placeholder
849
849
  case "::placeholder":
850
- return le([ve(r, {
851
- props: [w(i, /:(plac\w+)/, ":" + _ + "input-$1")]
852
- }), ve(r, {
853
- props: [w(i, /:(plac\w+)/, ":" + Oe + "$1")]
854
- }), ve(r, {
855
- props: [w(i, /:(plac\w+)/, W + "input-$1")]
856
- })], a);
850
+ return se([pe(r, {
851
+ props: [k(o, /:(plac\w+)/, ":" + w + "input-$1")]
852
+ }), pe(r, {
853
+ props: [k(o, /:(plac\w+)/, ":" + _e + "$1")]
854
+ }), pe(r, {
855
+ props: [k(o, /:(plac\w+)/, V + "input-$1")]
856
+ })], n);
857
857
  }
858
858
  return "";
859
859
  });
860
860
  }
861
- }, et = [Zr], rt = function(r) {
861
+ }, Br = [Gr], Xr = function(r) {
862
862
  var t = r.key;
863
863
  if (t === "css") {
864
- var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
865
- Array.prototype.forEach.call(n, function(y) {
866
- var m = y.getAttribute("data-emotion");
867
- m.indexOf(" ") !== -1 && (document.head.appendChild(y), y.setAttribute("data-s", ""));
864
+ var a = document.querySelectorAll("style[data-emotion]:not([data-s])");
865
+ Array.prototype.forEach.call(a, function(g) {
866
+ var y = g.getAttribute("data-emotion");
867
+ y.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
868
868
  });
869
869
  }
870
- var a = r.stylisPlugins || et, i = {}, s, c = [];
870
+ var n = r.stylisPlugins || Br, o = {}, s, l = [];
871
871
  s = r.container || document.head, Array.prototype.forEach.call(
872
872
  // this means we will ignore elements which don't have a space in them which
873
873
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
874
874
  document.querySelectorAll('style[data-emotion^="' + t + ' "]'),
875
- function(y) {
876
- for (var m = y.getAttribute("data-emotion").split(" "), v = 1; v < m.length; v++)
877
- i[m[v]] = !0;
878
- c.push(y);
875
+ function(g) {
876
+ for (var y = g.getAttribute("data-emotion").split(" "), b = 1; b < y.length; b++)
877
+ o[y[b]] = !0;
878
+ l.push(g);
879
879
  }
880
880
  );
881
- var f, u = [Qr, Kr];
881
+ var d, h = [qr, Hr];
882
882
  {
883
- var d, h = [qr, Gr(function(y) {
884
- d.insert(y);
885
- })], C = Yr(u.concat(a, h)), E = function(m) {
886
- return le(Ur(m), C);
883
+ var p, m = [Vr, Ur(function(g) {
884
+ p.insert(g);
885
+ })], A = zr(h.concat(n, m)), S = function(y) {
886
+ return se(Lr(y), A);
887
887
  };
888
- f = function(m, v, x, O) {
889
- d = x, E(m ? m + "{" + v.styles + "}" : v.styles), O && (k.inserted[v.name] = !0);
888
+ d = function(y, b, P, O) {
889
+ p = P, S(y ? y + "{" + b.styles + "}" : b.styles), O && (R.inserted[b.name] = !0);
890
890
  };
891
891
  }
892
- var k = {
892
+ var R = {
893
893
  key: t,
894
- sheet: new Ar({
894
+ sheet: new Pr({
895
895
  key: t,
896
896
  container: s,
897
897
  nonce: r.nonce,
@@ -900,60 +900,60 @@ var Zr = function(r, t, n, a) {
900
900
  insertionPoint: r.insertionPoint
901
901
  }),
902
902
  nonce: r.nonce,
903
- inserted: i,
903
+ inserted: o,
904
904
  registered: {},
905
- insert: f
905
+ insert: d
906
906
  };
907
- return k.sheet.hydrate(c), k;
908
- }, tt = !0;
909
- function nt(e, r, t) {
910
- var n = "";
911
- return t.split(" ").forEach(function(a) {
912
- e[a] !== void 0 ? r.push(e[a] + ";") : a && (n += a + " ");
913
- }), n;
907
+ return R.sheet.hydrate(l), R;
908
+ }, Jr = !0;
909
+ function Zr(e, r, t) {
910
+ var a = "";
911
+ return t.split(" ").forEach(function(n) {
912
+ e[n] !== void 0 ? r.push(e[n] + ";") : n && (a += n + " ");
913
+ }), a;
914
914
  }
915
- var hr = function(r, t, n) {
916
- var a = r.key + "-" + t.name;
915
+ var fr = function(r, t, a) {
916
+ var n = r.key + "-" + t.name;
917
917
  // we only need to add the styles to the registered cache if the
918
918
  // class name could be used further down
919
919
  // the tree but if it's a string tag, we know it won't
920
920
  // so we don't have to add it to registered cache.
921
921
  // this improves memory usage since we can avoid storing the whole style string
922
- (n === !1 || // we need to always store it if we're in compat mode and
922
+ (a === !1 || // we need to always store it if we're in compat mode and
923
923
  // in node since emotion-server relies on whether a style is in
924
924
  // the registered cache to know whether a style is global or not
925
925
  // also, note that this check will be dead code eliminated in the browser
926
- tt === !1) && r.registered[a] === void 0 && (r.registered[a] = t.styles);
927
- }, at = function(r, t, n) {
928
- hr(r, t, n);
929
- var a = r.key + "-" + t.name;
926
+ Jr === !1) && r.registered[n] === void 0 && (r.registered[n] = t.styles);
927
+ }, Qr = function(r, t, a) {
928
+ fr(r, t, a);
929
+ var n = r.key + "-" + t.name;
930
930
  if (r.inserted[t.name] === void 0) {
931
- var i = t;
931
+ var o = t;
932
932
  do
933
- r.insert(t === i ? "." + a : "", i, r.sheet, !0), i = i.next;
934
- while (i !== void 0);
933
+ r.insert(t === o ? "." + n : "", o, r.sheet, !0), o = o.next;
934
+ while (o !== void 0);
935
935
  }
936
936
  };
937
- function it(e) {
938
- for (var r = 0, t, n = 0, a = e.length; a >= 4; ++n, a -= 4)
939
- t = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, t = /* Math.imul(k, m): */
937
+ function Kr(e) {
938
+ for (var r = 0, t, a = 0, n = e.length; n >= 4; ++a, n -= 4)
939
+ t = e.charCodeAt(a) & 255 | (e.charCodeAt(++a) & 255) << 8 | (e.charCodeAt(++a) & 255) << 16 | (e.charCodeAt(++a) & 255) << 24, t = /* Math.imul(k, m): */
940
940
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */
941
941
  t >>> 24, r = /* Math.imul(k, m): */
942
942
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
943
943
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
944
- switch (a) {
944
+ switch (n) {
945
945
  case 3:
946
- r ^= (e.charCodeAt(n + 2) & 255) << 16;
946
+ r ^= (e.charCodeAt(a + 2) & 255) << 16;
947
947
  case 2:
948
- r ^= (e.charCodeAt(n + 1) & 255) << 8;
948
+ r ^= (e.charCodeAt(a + 1) & 255) << 8;
949
949
  case 1:
950
- r ^= e.charCodeAt(n) & 255, r = /* Math.imul(h, m): */
950
+ r ^= e.charCodeAt(a) & 255, r = /* Math.imul(h, m): */
951
951
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
952
952
  }
953
953
  return r ^= r >>> 13, r = /* Math.imul(h, m): */
954
954
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36);
955
955
  }
956
- var ot = {
956
+ var et = {
957
957
  animationIterationCount: 1,
958
958
  aspectRatio: 1,
959
959
  borderImageOutset: 1,
@@ -1002,221 +1002,221 @@ var ot = {
1002
1002
  strokeMiterlimit: 1,
1003
1003
  strokeOpacity: 1,
1004
1004
  strokeWidth: 1
1005
- }, st = /[A-Z]|^ms/g, ct = /_EMO_([^_]+?)_([^]*?)_EMO_/g, yr = function(r) {
1005
+ }, rt = /[A-Z]|^ms/g, tt = /_EMO_([^_]+?)_([^]*?)_EMO_/g, dr = function(r) {
1006
1006
  return r.charCodeAt(1) === 45;
1007
- }, Ke = function(r) {
1007
+ }, Xe = function(r) {
1008
1008
  return r != null && typeof r != "boolean";
1009
- }, ze = /* @__PURE__ */ fr(function(e) {
1010
- return yr(e) ? e : e.replace(st, "-$&").toLowerCase();
1011
- }), Ze = function(r, t) {
1009
+ }, $e = /* @__PURE__ */ lr(function(e) {
1010
+ return dr(e) ? e : e.replace(rt, "-$&").toLowerCase();
1011
+ }), Je = function(r, t) {
1012
1012
  switch (r) {
1013
1013
  case "animation":
1014
1014
  case "animationName":
1015
1015
  if (typeof t == "string")
1016
- return t.replace(ct, function(n, a, i) {
1017
- return re = {
1018
- name: a,
1019
- styles: i,
1020
- next: re
1021
- }, a;
1016
+ return t.replace(tt, function(a, n, o) {
1017
+ return ee = {
1018
+ name: n,
1019
+ styles: o,
1020
+ next: ee
1021
+ }, n;
1022
1022
  });
1023
1023
  }
1024
- return ot[r] !== 1 && !yr(r) && typeof t == "number" && t !== 0 ? t + "px" : t;
1024
+ return et[r] !== 1 && !dr(r) && typeof t == "number" && t !== 0 ? t + "px" : t;
1025
1025
  };
1026
- function xe(e, r, t) {
1026
+ function ge(e, r, t) {
1027
1027
  if (t == null)
1028
1028
  return "";
1029
- var n = t;
1030
- if (n.__emotion_styles !== void 0)
1031
- return n;
1029
+ var a = t;
1030
+ if (a.__emotion_styles !== void 0)
1031
+ return a;
1032
1032
  switch (typeof t) {
1033
1033
  case "boolean":
1034
1034
  return "";
1035
1035
  case "object": {
1036
- var a = t;
1037
- if (a.anim === 1)
1038
- return re = {
1039
- name: a.name,
1040
- styles: a.styles,
1041
- next: re
1042
- }, a.name;
1043
- var i = t;
1044
- if (i.styles !== void 0) {
1045
- var s = i.next;
1036
+ var n = t;
1037
+ if (n.anim === 1)
1038
+ return ee = {
1039
+ name: n.name,
1040
+ styles: n.styles,
1041
+ next: ee
1042
+ }, n.name;
1043
+ var o = t;
1044
+ if (o.styles !== void 0) {
1045
+ var s = o.next;
1046
1046
  if (s !== void 0)
1047
1047
  for (; s !== void 0; )
1048
- re = {
1048
+ ee = {
1049
1049
  name: s.name,
1050
1050
  styles: s.styles,
1051
- next: re
1051
+ next: ee
1052
1052
  }, s = s.next;
1053
- var c = i.styles + ";";
1054
- return c;
1053
+ var l = o.styles + ";";
1054
+ return l;
1055
1055
  }
1056
- return lt(e, r, t);
1056
+ return nt(e, r, t);
1057
1057
  }
1058
1058
  case "function": {
1059
1059
  if (e !== void 0) {
1060
- var f = re, u = t(e);
1061
- return re = f, xe(e, r, u);
1060
+ var d = ee, h = t(e);
1061
+ return ee = d, ge(e, r, h);
1062
1062
  }
1063
1063
  break;
1064
1064
  }
1065
1065
  }
1066
- var d = t;
1066
+ var p = t;
1067
1067
  if (r == null)
1068
- return d;
1069
- var h = r[d];
1070
- return h !== void 0 ? h : d;
1068
+ return p;
1069
+ var m = r[p];
1070
+ return m !== void 0 ? m : p;
1071
1071
  }
1072
- function lt(e, r, t) {
1073
- var n = "";
1072
+ function nt(e, r, t) {
1073
+ var a = "";
1074
1074
  if (Array.isArray(t))
1075
- for (var a = 0; a < t.length; a++)
1076
- n += xe(e, r, t[a]) + ";";
1075
+ for (var n = 0; n < t.length; n++)
1076
+ a += ge(e, r, t[n]) + ";";
1077
1077
  else
1078
- for (var i in t) {
1079
- var s = t[i];
1078
+ for (var o in t) {
1079
+ var s = t[o];
1080
1080
  if (typeof s != "object") {
1081
- var c = s;
1082
- r != null && r[c] !== void 0 ? n += i + "{" + r[c] + "}" : Ke(c) && (n += ze(i) + ":" + Ze(i, c) + ";");
1081
+ var l = s;
1082
+ r != null && r[l] !== void 0 ? a += o + "{" + r[l] + "}" : Xe(l) && (a += $e(o) + ":" + Je(o, l) + ";");
1083
1083
  } else if (Array.isArray(s) && typeof s[0] == "string" && (r == null || r[s[0]] === void 0))
1084
- for (var f = 0; f < s.length; f++)
1085
- Ke(s[f]) && (n += ze(i) + ":" + Ze(i, s[f]) + ";");
1084
+ for (var d = 0; d < s.length; d++)
1085
+ Xe(s[d]) && (a += $e(o) + ":" + Je(o, s[d]) + ";");
1086
1086
  else {
1087
- var u = xe(e, r, s);
1088
- switch (i) {
1087
+ var h = ge(e, r, s);
1088
+ switch (o) {
1089
1089
  case "animation":
1090
1090
  case "animationName": {
1091
- n += ze(i) + ":" + u + ";";
1091
+ a += $e(o) + ":" + h + ";";
1092
1092
  break;
1093
1093
  }
1094
1094
  default:
1095
- n += i + "{" + u + "}";
1095
+ a += o + "{" + h + "}";
1096
1096
  }
1097
1097
  }
1098
1098
  }
1099
- return n;
1099
+ return a;
1100
1100
  }
1101
- var er = /label:\s*([^\s;{]+)\s*(;|$)/g, re;
1102
- function ut(e, r, t) {
1101
+ var Ze = /label:\s*([^\s;{]+)\s*(;|$)/g, ee;
1102
+ function at(e, r, t) {
1103
1103
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
1104
1104
  return e[0];
1105
- var n = !0, a = "";
1106
- re = void 0;
1107
- var i = e[0];
1108
- if (i == null || i.raw === void 0)
1109
- n = !1, a += xe(t, r, i);
1105
+ var a = !0, n = "";
1106
+ ee = void 0;
1107
+ var o = e[0];
1108
+ if (o == null || o.raw === void 0)
1109
+ a = !1, n += ge(t, r, o);
1110
1110
  else {
1111
- var s = i;
1112
- a += s[0];
1111
+ var s = o;
1112
+ n += s[0];
1113
1113
  }
1114
- for (var c = 1; c < e.length; c++)
1115
- if (a += xe(t, r, e[c]), n) {
1116
- var f = i;
1117
- a += f[c];
1114
+ for (var l = 1; l < e.length; l++)
1115
+ if (n += ge(t, r, e[l]), a) {
1116
+ var d = o;
1117
+ n += d[l];
1118
1118
  }
1119
- er.lastIndex = 0;
1120
- for (var u = "", d; (d = er.exec(a)) !== null; )
1121
- u += "-" + d[1];
1122
- var h = it(a) + u;
1119
+ Ze.lastIndex = 0;
1120
+ for (var h = "", p; (p = Ze.exec(n)) !== null; )
1121
+ h += "-" + p[1];
1122
+ var m = Kr(n) + h;
1123
1123
  return {
1124
- name: h,
1125
- styles: a,
1126
- next: re
1124
+ name: m,
1125
+ styles: n,
1126
+ next: ee
1127
1127
  };
1128
1128
  }
1129
- var dt = function(r) {
1129
+ var it = function(r) {
1130
1130
  return r();
1131
- }, ft = ne.useInsertionEffect ? ne.useInsertionEffect : !1, pt = ft || dt, mr = /* @__PURE__ */ ne.createContext(
1131
+ }, ot = ne.useInsertionEffect ? ne.useInsertionEffect : !1, st = ot || it, pr = /* @__PURE__ */ ne.createContext(
1132
1132
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1133
1133
  // because this module is primarily intended for the browser and node
1134
1134
  // but it's also required in react native and similar environments sometimes
1135
1135
  // and we could have a special build just for that
1136
1136
  // but this is much easier and the native packages
1137
1137
  // might use a different theme context in the future anyway
1138
- typeof HTMLElement < "u" ? /* @__PURE__ */ rt({
1138
+ typeof HTMLElement < "u" ? /* @__PURE__ */ Xr({
1139
1139
  key: "css"
1140
1140
  }) : null
1141
1141
  );
1142
- mr.Provider;
1143
- var ht = function(r) {
1144
- return /* @__PURE__ */ Pr(function(t, n) {
1145
- var a = ar(mr);
1146
- return r(t, a, n);
1142
+ pr.Provider;
1143
+ var ct = function(r) {
1144
+ return /* @__PURE__ */ mr(function(t, a) {
1145
+ var n = gr(pr);
1146
+ return r(t, n, a);
1147
1147
  });
1148
- }, yt = /* @__PURE__ */ ne.createContext({}), mt = /^((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|popover|popoverTarget|popoverTargetAction|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)-.*))$/, vt = /* @__PURE__ */ fr(
1148
+ }, lt = /* @__PURE__ */ ne.createContext({}), ut = /^((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|popover|popoverTarget|popoverTargetAction|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)-.*))$/, ft = /* @__PURE__ */ lr(
1149
1149
  function(e) {
1150
- return mt.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
1150
+ return ut.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
1151
1151
  }
1152
1152
  /* Z+1 */
1153
- ), gt = vt, bt = function(r) {
1153
+ ), dt = ft, pt = function(r) {
1154
1154
  return r !== "theme";
1155
- }, rr = function(r) {
1155
+ }, Qe = function(r) {
1156
1156
  return typeof r == "string" && // 96 is one less than the char code
1157
1157
  // for "a" so this is checking that
1158
1158
  // it's a lowercase character
1159
- r.charCodeAt(0) > 96 ? gt : bt;
1160
- }, tr = function(r, t, n) {
1161
- var a;
1159
+ r.charCodeAt(0) > 96 ? dt : pt;
1160
+ }, Ke = function(r, t, a) {
1161
+ var n;
1162
1162
  if (t) {
1163
- var i = t.shouldForwardProp;
1164
- a = r.__emotion_forwardProp && i ? function(s) {
1165
- return r.__emotion_forwardProp(s) && i(s);
1166
- } : i;
1163
+ var o = t.shouldForwardProp;
1164
+ n = r.__emotion_forwardProp && o ? function(s) {
1165
+ return r.__emotion_forwardProp(s) && o(s);
1166
+ } : o;
1167
1167
  }
1168
- return typeof a != "function" && n && (a = r.__emotion_forwardProp), a;
1169
- }, xt = function(r) {
1170
- var t = r.cache, n = r.serialized, a = r.isStringTag;
1171
- return hr(t, n, a), pt(function() {
1172
- return at(t, n, a);
1168
+ return typeof n != "function" && a && (n = r.__emotion_forwardProp), n;
1169
+ }, ht = function(r) {
1170
+ var t = r.cache, a = r.serialized, n = r.isStringTag;
1171
+ return fr(t, a, n), st(function() {
1172
+ return Qr(t, a, n);
1173
1173
  }), null;
1174
- }, Pt = function e(r, t) {
1175
- var n = r.__emotion_real === r, a = n && r.__emotion_base || r, i, s;
1176
- t !== void 0 && (i = t.label, s = t.target);
1177
- var c = tr(r, t, n), f = c || rr(a), u = !f("as");
1174
+ }, mt = function e(r, t) {
1175
+ var a = r.__emotion_real === r, n = a && r.__emotion_base || r, o, s;
1176
+ t !== void 0 && (o = t.label, s = t.target);
1177
+ var l = Ke(r, t, a), d = l || Qe(n), h = !d("as");
1178
1178
  return function() {
1179
- var d = arguments, h = n && r.__emotion_styles !== void 0 ? r.__emotion_styles.slice(0) : [];
1180
- if (i !== void 0 && h.push("label:" + i + ";"), d[0] == null || d[0].raw === void 0)
1181
- h.push.apply(h, d);
1179
+ var p = arguments, m = a && r.__emotion_styles !== void 0 ? r.__emotion_styles.slice(0) : [];
1180
+ if (o !== void 0 && m.push("label:" + o + ";"), p[0] == null || p[0].raw === void 0)
1181
+ m.push.apply(m, p);
1182
1182
  else {
1183
- var C = d[0];
1184
- h.push(C[0]);
1185
- for (var E = d.length, k = 1; k < E; k++)
1186
- h.push(d[k], C[k]);
1183
+ var A = p[0];
1184
+ m.push(A[0]);
1185
+ for (var S = p.length, R = 1; R < S; R++)
1186
+ m.push(p[R], A[R]);
1187
1187
  }
1188
- var y = ht(function(m, v, x) {
1189
- var O = u && m.as || a, z = "", N = [], A = m;
1190
- if (m.theme == null) {
1191
- A = {};
1192
- for (var g in m)
1193
- A[g] = m[g];
1194
- A.theme = ne.useContext(yt);
1188
+ var g = ct(function(y, b, P) {
1189
+ var O = h && y.as || n, M = "", F = [], C = y;
1190
+ if (y.theme == null) {
1191
+ C = {};
1192
+ for (var x in y)
1193
+ C[x] = y[x];
1194
+ C.theme = ne.useContext(lt);
1195
1195
  }
1196
- typeof m.className == "string" ? z = nt(v.registered, N, m.className) : m.className != null && (z = m.className + " ");
1197
- var K = ut(h.concat(N), v.registered, A);
1198
- z += v.key + "-" + K.name, s !== void 0 && (z += " " + s);
1199
- var M = u && c === void 0 ? rr(O) : f, q = {};
1200
- for (var T in m)
1201
- u && T === "as" || M(T) && (q[T] = m[T]);
1202
- return q.className = z, x && (q.ref = x), /* @__PURE__ */ ne.createElement(ne.Fragment, null, /* @__PURE__ */ ne.createElement(xt, {
1203
- cache: v,
1204
- serialized: K,
1196
+ typeof y.className == "string" ? M = Zr(b.registered, F, y.className) : y.className != null && (M = y.className + " ");
1197
+ var Y = at(m.concat(F), b.registered, C);
1198
+ M += b.key + "-" + Y.name, s !== void 0 && (M += " " + s);
1199
+ var J = h && l === void 0 ? Qe(O) : d, L = {};
1200
+ for (var G in y)
1201
+ h && G === "as" || J(G) && (L[G] = y[G]);
1202
+ return L.className = M, P && (L.ref = P), /* @__PURE__ */ ne.createElement(ne.Fragment, null, /* @__PURE__ */ ne.createElement(ht, {
1203
+ cache: b,
1204
+ serialized: Y,
1205
1205
  isStringTag: typeof O == "string"
1206
- }), /* @__PURE__ */ ne.createElement(O, q));
1206
+ }), /* @__PURE__ */ ne.createElement(O, L));
1207
1207
  });
1208
- return y.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", y.defaultProps = r.defaultProps, y.__emotion_real = y, y.__emotion_base = a, y.__emotion_styles = h, y.__emotion_forwardProp = c, Object.defineProperty(y, "toString", {
1208
+ return g.displayName = o !== void 0 ? o : "Styled(" + (typeof n == "string" ? n : n.displayName || n.name || "Component") + ")", g.defaultProps = r.defaultProps, g.__emotion_real = g, g.__emotion_base = n, g.__emotion_styles = m, g.__emotion_forwardProp = l, Object.defineProperty(g, "toString", {
1209
1209
  value: function() {
1210
1210
  return "." + s;
1211
1211
  }
1212
- }), y.withComponent = function(m, v) {
1213
- var x = e(m, Me({}, t, v, {
1214
- shouldForwardProp: tr(y, v, !0)
1212
+ }), g.withComponent = function(y, b) {
1213
+ var P = e(y, Ie({}, t, b, {
1214
+ shouldForwardProp: Ke(g, b, !0)
1215
1215
  }));
1216
- return x.apply(void 0, h);
1217
- }, y;
1216
+ return P.apply(void 0, m);
1217
+ }, g;
1218
1218
  };
1219
- }, _t = [
1219
+ }, gt = [
1220
1220
  "a",
1221
1221
  "abbr",
1222
1222
  "address",
@@ -1352,11 +1352,11 @@ var ht = function(r) {
1352
1352
  "svg",
1353
1353
  "text",
1354
1354
  "tspan"
1355
- ], de = Pt.bind(null);
1356
- _t.forEach(function(e) {
1357
- de[e] = de(e);
1355
+ ], le = mt.bind(null);
1356
+ gt.forEach(function(e) {
1357
+ le[e] = le(e);
1358
1358
  });
1359
- const wt = de.div`
1359
+ const yt = le.div`
1360
1360
  display: flex;
1361
1361
  align-items: center;
1362
1362
  justify-content: center;
@@ -1397,11 +1397,11 @@ const wt = de.div`
1397
1397
  return "";
1398
1398
  }
1399
1399
  }}
1400
- `, Ie = ({ type: e, children: r, className: t, icon: n, action: a }) => /* @__PURE__ */ L.jsxs(wt, { type: e, className: t, children: [
1401
- n && /* @__PURE__ */ L.jsx("span", { children: n }),
1402
- /* @__PURE__ */ L.jsx("span", { children: r }),
1403
- a && /* @__PURE__ */ L.jsx("span", { children: a })
1404
- ] }), nr = de.div`
1400
+ `, er = ({ type: e, children: r, className: t, icon: a, action: n }) => /* @__PURE__ */ I.jsxs(yt, { type: e, className: t, children: [
1401
+ a && /* @__PURE__ */ I.jsx("span", { children: a }),
1402
+ /* @__PURE__ */ I.jsx("span", { children: r }),
1403
+ n && /* @__PURE__ */ I.jsx("span", { children: n })
1404
+ ] }), rr = le.div`
1405
1405
  width: ${({ width: e }) => e || "100%"};
1406
1406
  height: ${({ height: e }) => e || "100%"};
1407
1407
  border-radius: 0px !important; /* Force remove rounded corners on container */
@@ -1413,7 +1413,7 @@ const wt = de.div`
1413
1413
 
1414
1414
  /* Hide specific elements inside the player */
1415
1415
  ${({ $hiddenClasses: e }) => (e == null ? void 0 : e.length) && e.map((r) => `.${r} { display: none !important; }`).join("")}
1416
- `, Et = de.div`
1416
+ `, bt = le.div`
1417
1417
  position: fixed;
1418
1418
  top: 0;
1419
1419
  left: 0;
@@ -1425,7 +1425,7 @@ const wt = de.div`
1425
1425
  align-items: center;
1426
1426
  z-index: 1000;
1427
1427
  pointer-events: auto;
1428
- `, kt = de.div`
1428
+ `, vt = le.div`
1429
1429
  position: relative;
1430
1430
  height: 80vh;
1431
1431
  width: auto;
@@ -1433,751 +1433,481 @@ const wt = de.div`
1433
1433
  max-width: 90vw;
1434
1434
  max-height: 90vh;
1435
1435
  z-index: 1001;
1436
- `, vr = "https://host.vpplayer.tech", St = (e) => `${vr}/player/${e}/vpplayer.js`, gr = (e, r) => e ? `vp-player-${e}` : r ? `vp-player-default-${r}` : "vp-player-default", Se = /* @__PURE__ */ new Map(), Rt = (e, r) => {
1437
- const [t, n] = ce(!1), [a, i] = ce(null);
1438
- return Fe(() => {
1436
+ `, Oe = "https://host.vpplayer.tech", xt = (e) => `${Oe}/player/${e}/vpplayer.js`, Tt = (e) => `${Oe}/player/${e}.js`, wt = (e, r) => `${Oe}/player/${e}/${r}.js`, tr = (e) => `${Oe}/vertical-player/${e}.js`, kt = (e, r) => e ? `vp-player-${e}` : r ? `vp-player-default-${r}` : "vp-player-default", Pt = (e, r) => {
1437
+ const t = new URL(e);
1438
+ return t.searchParams.set("divId", r), t.toString();
1439
+ }, ke = /* @__PURE__ */ new Map(), Et = (e, r) => {
1440
+ const [t, a] = Re(!1), [n, o] = Re(null);
1441
+ return je(() => {
1439
1442
  let s;
1440
1443
  try {
1441
- s = r || St(e || "latest");
1442
- } catch (u) {
1443
- const d = u instanceof Error ? u.message : String(u);
1444
- i(`Failed to resolve script URL: ${d}`);
1444
+ s = r || xt(e || "latest");
1445
+ } catch (h) {
1446
+ const p = h instanceof Error ? h.message : String(h);
1447
+ o(`Failed to resolve script URL: ${p}`);
1445
1448
  return;
1446
1449
  }
1447
- if (!Se.has(s))
1450
+ if (!ke.has(s))
1448
1451
  if (document.querySelector(
1449
1452
  `script[src="${s}"]`
1450
1453
  ))
1451
- Se.set(s, Promise.resolve());
1454
+ ke.set(s, Promise.resolve());
1452
1455
  else {
1453
- const d = new Promise((h, C) => {
1454
- const E = document.createElement("script");
1455
- E.src = s, E.async = !0, E.onload = () => h(), E.onerror = () => C(new Error(`Failed to load script: ${s}`)), document.body.appendChild(E);
1456
+ const p = new Promise((m, A) => {
1457
+ const S = document.createElement("script");
1458
+ S.src = s, S.async = !0, S.onload = () => m(), S.onerror = () => A(new Error(`Failed to load script: ${s}`)), document.body.appendChild(S);
1456
1459
  });
1457
- Se.set(s, d);
1460
+ ke.set(s, p);
1458
1461
  }
1459
- let c = !0;
1460
- const f = Se.get(s);
1461
- return f && f.then(() => {
1462
- c && (n(!0), i(null));
1463
- }).catch((u) => {
1464
- c && (n(!1), i(u instanceof Error ? u.message : String(u)));
1462
+ let l = !0;
1463
+ const d = ke.get(s);
1464
+ return d && d.then(() => {
1465
+ l && (a(!0), o(null));
1466
+ }).catch((h) => {
1467
+ l && (a(!1), o(h instanceof Error ? h.message : String(h)));
1465
1468
  }), () => {
1466
- c = !1;
1469
+ l = !1;
1467
1470
  };
1468
- }, [e, r]), { isLoaded: t, error: a };
1469
- }, Re = {
1470
- projectId: void 0,
1471
- // Set via props or config
1472
- video: {
1473
- // NOTE: Do NOT set file: '' here - it interferes with managed mode
1474
- // where the SDK resolves the video URL from videoId + projectId
1475
- },
1476
- config: {
1477
- autoplay: !0,
1478
- // Start playing automatically
1479
- muted: !0,
1480
- // Start muted (required for browser autoplay policy)
1481
- loop: !1,
1482
- // No loop by default
1483
- size: {
1484
- width: "100%",
1485
- height: "30vh"
1486
- }
1487
- // NOTE: Do NOT set controls here - let the SDK/managed script
1488
- // use what's configured in the Gjirafa admin panel (projectId config)
1489
- }
1490
- }, Ct = (e) => e ? {
1491
- play: e.bigPlayButton ?? e.autopausePlayButton ?? !0,
1492
- fullscreen: e.fullscreenButton ?? !0,
1493
- share: e.shareButton ?? !0,
1494
- seekbar: !0,
1495
- settings: e.settingsButton ?? !0,
1496
- time: !0
1497
- } : {
1498
- play: !0,
1499
- fullscreen: !0,
1500
- share: !0,
1501
- seekbar: !0,
1502
- settings: !0,
1503
- time: !0
1504
- }, At = ({
1505
- videoUrl: e,
1506
- projectId: r,
1507
- config: t = {},
1508
- isVerticalPlayer: n = !1
1509
- }) => {
1510
- var h, C, E, k, y, m, v, x, O, z, N, A, g, K, M, q, T;
1511
- const a = { ...Re };
1512
- a.video = { ...Re.video, ...t.video };
1513
- let i = {
1514
- ...Re.config,
1515
- ...t.config,
1516
- // Only include controls if explicitly provided by user config
1517
- // Otherwise, let SDK use what's configured in the admin panel (projectId config)
1518
- ...((h = t.config) == null ? void 0 : h.controls) && {
1519
- controls: t.config.controls
1471
+ }, [e, r]), { isLoaded: t, error: n };
1472
+ };
1473
+ function St(e, r, t = !1) {
1474
+ const a = e.startIndex ?? 0, n = e.videos[a] || e.videos[0];
1475
+ if (!n)
1476
+ throw new Error("Manual playlist must have at least one video");
1477
+ const o = n.file || n.hlsUrl;
1478
+ if (!o)
1479
+ throw new Error(
1480
+ "Each video in manual playlist must have a 'file' or 'hlsUrl' property"
1481
+ );
1482
+ const s = e.videos.map((d) => ({
1483
+ videoId: d.videoId || "",
1484
+ title: d.title || "",
1485
+ file: d.file || d.hlsUrl || "",
1486
+ thumbnailUrl: d.thumbnailUrl || d.thumbnail || "",
1487
+ duration: d.duration || 0
1488
+ }));
1489
+ return {
1490
+ projectId: r || "",
1491
+ video: {
1492
+ videoId: n.videoId || "",
1493
+ file: o,
1494
+ // REQUIRED for VP Vertical Player SDK!
1495
+ title: n.title || "",
1496
+ thumbnail: n.thumbnailUrl || n.thumbnail || "",
1497
+ playlist: {
1498
+ state: !0,
1499
+ playlistId: "",
1500
+ // Empty string for manual playlist mode
1501
+ playlistVideoIndex: a,
1502
+ videos: s
1503
+ }
1520
1504
  },
1521
- // Ensure size is merged
1522
- size: {
1523
- ...Re.config.size,
1524
- ...(C = t.config) == null ? void 0 : C.size
1505
+ config: {
1506
+ autoplay: !0,
1507
+ muted: !0,
1508
+ // For vertical player, use responsive sizing
1509
+ ...t && {
1510
+ size: {
1511
+ sizeType: "RESPONSIVE",
1512
+ aspectRatio: "9:16"
1513
+ }
1514
+ }
1525
1515
  }
1526
1516
  };
1527
- if (r && (a.projectId = r), t.projectId && (a.projectId = t.projectId), n && i.controls) {
1528
- const j = Ct(
1529
- i.controls
1530
- );
1531
- i = {
1532
- ...i,
1533
- controls: j
1534
- };
1535
- }
1536
- const s = !!((k = (E = t == null ? void 0 : t.video) == null ? void 0 : E.playlist) != null && k.playlistId), c = !!((v = (m = (y = t == null ? void 0 : t.video) == null ? void 0 : y.playlist) == null ? void 0 : m.videos) != null && v.length), f = s || c, u = (x = t == null ? void 0 : t.video) == null ? void 0 : x.playlist;
1537
- if (n && f) {
1538
- const j = Number((u == null ? void 0 : u.playlistVideoIndex) || 0);
1539
- if ((O = u == null ? void 0 : u.videos) != null && O.length) {
1540
- const S = u.videos[j] || u.videos[0], G = e || ((z = t == null ? void 0 : t.video) == null ? void 0 : z.file) || (S == null ? void 0 : S.file) || (S == null ? void 0 : S.hlsUrl), V = u.videos.map((H) => {
1541
- const U = H;
1542
- return {
1543
- videoId: U.videoId || "",
1544
- title: U.title || "",
1545
- file: U.file || U.hlsUrl || "",
1546
- thumbnailUrl: U.thumbnailUrl || U.thumbnail || "",
1547
- duration: U.duration || 0
1548
- };
1549
- });
1550
- return {
1551
- ...a,
1552
- projectId: r || t.projectId || "",
1553
- // Use top-level projectId if available
1554
- video: {
1555
- ...a.video,
1556
- videoId: (S == null ? void 0 : S.videoId) || "",
1557
- file: G,
1558
- title: ((N = t.video) == null ? void 0 : N.title) || (S == null ? void 0 : S.title),
1559
- thumbnail: ((A = t.video) == null ? void 0 : A.thumbnail) || (S == null ? void 0 : S.thumbnailUrl),
1560
- playlist: {
1561
- state: !0,
1562
- playlistId: "",
1563
- // Empty string - required for manual playlist mode
1564
- playlistVideoIndex: j,
1565
- videos: V
1566
- }
1567
- },
1568
- config: i
1569
- };
1570
- }
1571
- return {
1572
- ...a,
1573
- projectId: r || t.projectId || "",
1574
- // Use top-level projectId if available
1575
- video: {
1576
- ...a.video,
1577
- file: e || ((g = t.video) == null ? void 0 : g.file),
1578
- // Use provided videoUrl as fallback/primary file
1579
- playlist: {
1580
- state: !0,
1581
- playlistId: u == null ? void 0 : u.playlistId,
1582
- playlistVideoIndex: j
1583
- }
1584
- },
1585
- config: i
1586
- };
1587
- }
1588
- if (e && !f)
1589
- return {
1590
- ...a,
1591
- video: {
1592
- ...a.video,
1593
- ...t.video,
1594
- file: e,
1595
- playlist: void 0
1596
- },
1597
- config: i
1598
- };
1599
- if (f && u)
1600
- return {
1601
- ...a,
1602
- video: {
1603
- ...a.video,
1604
- ...t.video,
1605
- // For horizontal player, file can be omitted - SDK handles it
1606
- file: (K = t.video) == null ? void 0 : K.file,
1607
- playlist: {
1608
- ...a.video.playlist,
1609
- ...u,
1610
- state: !0,
1611
- playlistVideoIndex: Number(u.playlistVideoIndex || 0)
1612
- }
1613
- },
1614
- config: i
1615
- };
1616
- const d = ((M = t == null ? void 0 : t.video) == null ? void 0 : M.videoId) || (t == null ? void 0 : t.videoId);
1617
- if (d) {
1618
- const j = (q = t.video) == null ? void 0 : q.file, S = j && j.trim() !== "", G = r || t.projectId || a.projectId;
1619
- let V;
1620
- return S ? V = j : G && d && (V = `https://cdn.vpplayer.tech/${G}/encode/${d}/hls/master_file.m3u8`), {
1621
- projectId: G,
1622
- videoId: d,
1623
- video: {
1624
- ...t.video,
1625
- // Only user's explicit video config
1626
- videoId: d,
1627
- file: V
1628
- },
1629
- // Only include config if user explicitly provided overrides
1630
- ...t.config && { config: t.config }
1631
- };
1632
- }
1633
- if ((T = t == null ? void 0 : t.video) != null && T.file)
1634
- return {
1635
- ...a,
1636
- video: {
1637
- ...a.video,
1638
- ...t.video,
1639
- file: t.video.file,
1640
- playlist: void 0
1641
- },
1642
- config: i
1643
- };
1644
- throw new Error(
1645
- "No valid video source found. Provide videoUrl, videoId, playlistId, or config with video.file or playlist."
1646
- );
1647
- }, Tt = (e) => {
1648
- if (!e || e.includes("vertical-player") || e.includes("vpverticalplayer"))
1649
- return;
1650
- const r = vr.replace(
1651
- /[.*+?^${}()|[\]\\]/g,
1652
- "\\$&"
1653
- ), t = new RegExp(
1654
- `${r}\\/player\\/([^/]+)\\/([^/]+)(?:\\/[^/]+)?\\.js`
1655
- ), n = e.match(t);
1656
- if (n)
1657
- return n[2];
1658
- }, It = ({
1659
- playerId: e,
1517
+ }
1518
+ const Rt = ({
1519
+ scriptId: e,
1660
1520
  videoId: r,
1661
- version: t,
1662
- videoUrl: n,
1521
+ scriptUrl: t,
1663
1522
  projectId: a,
1664
- playlistId: i,
1665
- scriptUrl: s,
1666
- config: c = {},
1667
- isReels: f = !1,
1668
- onPlaylistData: u,
1669
- onVideoStarted: d,
1670
- onPlayerStart: h,
1671
- onPlayerPlay: C,
1672
- onPlayerPause: E,
1673
- onPlayerResume: k,
1674
- onPlayerEnd: y,
1675
- onPlayerProgressEvery10Seconds: m,
1676
- onPlayerProgressAt20Seconds: v,
1677
- onPlayerQuartile25: x,
1678
- onPlayerQuartile50: O,
1679
- onPlayerQuartile75: z,
1680
- onPlayerNext: N,
1681
- onPlayerPrevious: A,
1682
- onPlayerEvent: g
1523
+ playlist: n,
1524
+ playerId: o,
1525
+ isVertical: s = !1,
1526
+ isReels: l = !1,
1527
+ onReady: d,
1528
+ onPlay: h,
1529
+ onPause: p,
1530
+ onResume: m,
1531
+ onComplete: A,
1532
+ onError: S,
1533
+ onVideoStarted: R,
1534
+ onTimeUpdate: g,
1535
+ onQuartile25: y,
1536
+ onQuartile50: b,
1537
+ onQuartile75: P,
1538
+ onNext: O,
1539
+ onPrevious: M,
1540
+ onProgress10s: F,
1541
+ onProgress20s: C
1683
1542
  }) => {
1684
- var o;
1685
- const K = he(null), M = he(null), q = he(!1), T = he({
1686
- onVideoStarted: d,
1687
- onPlaylistData: u,
1688
- onPlayerStart: h,
1689
- onPlayerPlay: C,
1690
- onPlayerPause: E,
1691
- onPlayerResume: k,
1692
- onPlayerEnd: y,
1693
- onPlayerProgressEvery10Seconds: m,
1694
- onPlayerProgressAt20Seconds: v,
1695
- onPlayerQuartile25: x,
1696
- onPlayerQuartile50: O,
1697
- onPlayerQuartile75: z,
1698
- onPlayerNext: N,
1699
- onPlayerPrevious: A,
1700
- onPlayerEvent: g
1543
+ var i;
1544
+ const x = be(null), Y = be(null), [J, L] = Re(null), G = yr().replace(/:/g, ""), z = ve(
1545
+ () => kt(o || `auto-${G}`, r),
1546
+ [o, G, r]
1547
+ ), $ = be({
1548
+ onReady: d,
1549
+ onPlay: h,
1550
+ onPause: p,
1551
+ onResume: m,
1552
+ onComplete: A,
1553
+ onError: S,
1554
+ onVideoStarted: R,
1555
+ onTimeUpdate: g,
1556
+ onQuartile25: y,
1557
+ onQuartile50: b,
1558
+ onQuartile75: P,
1559
+ onNext: O,
1560
+ onPrevious: M,
1561
+ onProgress10s: F,
1562
+ onProgress20s: C
1701
1563
  });
1702
- Fe(() => {
1703
- T.current = {
1704
- onVideoStarted: d,
1705
- onPlaylistData: u,
1706
- onPlayerStart: h,
1707
- onPlayerPlay: C,
1708
- onPlayerPause: E,
1709
- onPlayerResume: k,
1710
- onPlayerEnd: y,
1711
- onPlayerProgressEvery10Seconds: m,
1712
- onPlayerProgressAt20Seconds: v,
1713
- onPlayerQuartile25: x,
1714
- onPlayerQuartile50: O,
1715
- onPlayerQuartile75: z,
1716
- onPlayerNext: N,
1717
- onPlayerPrevious: A,
1718
- onPlayerEvent: g
1564
+ je(() => {
1565
+ $.current = {
1566
+ onReady: d,
1567
+ onPlay: h,
1568
+ onPause: p,
1569
+ onResume: m,
1570
+ onComplete: A,
1571
+ onError: S,
1572
+ onVideoStarted: R,
1573
+ onTimeUpdate: g,
1574
+ onQuartile25: y,
1575
+ onQuartile50: b,
1576
+ onQuartile75: P,
1577
+ onNext: O,
1578
+ onPrevious: M,
1579
+ onProgress10s: F,
1580
+ onProgress20s: C
1719
1581
  };
1720
1582
  });
1721
- const j = he(!1), { isLoaded: S, error: G } = Rt(
1583
+ const Z = be(!1), U = !!((i = n == null ? void 0 : n.videos) != null && i.length), D = ve(() => s || l ? !0 : t ? t.includes("vertical-player") || t.includes("vpverticalplayer") : !1, [s, l, t]), Q = ve(() => {
1584
+ let c;
1585
+ if (t)
1586
+ c = t;
1587
+ else if (e && r && !U)
1588
+ c = D ? tr(e) : wt(e, r);
1589
+ else if (e)
1590
+ c = D ? tr(e) : `https://host.vpplayer.tech/player/${e}.js`;
1591
+ else
1592
+ return null;
1593
+ return Pt(c, z);
1594
+ }, [
1722
1595
  t,
1723
- s
1724
- ), V = r || Tt(s) || ((o = c == null ? void 0 : c.video) == null ? void 0 : o.videoId), [ae, H] = ce(null), U = _r().replace(/:/g, ""), J = gr(
1725
- e || `auto-${U}`,
1726
- V
1727
- ), ie = ir(() => {
1728
- var P;
1729
- const p = c.config || {}, R = f && !p.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : p.size || { sizeType: "FIXED", width: "100%" };
1730
- return {
1731
- ...c,
1732
- video: {
1733
- ...c.video,
1734
- videoId: V,
1735
- playlist: i ? {
1736
- playlistId: i,
1737
- state: !0,
1738
- playlistVideoIndex: 0
1739
- } : (P = c.video) == null ? void 0 : P.playlist
1740
- },
1741
- config: {
1742
- ...p,
1743
- size: R
1744
- }
1745
- };
1746
- }, [c, f, V, i]);
1747
- return Fe(() => {
1748
- if (G) {
1749
- H(G);
1596
+ e,
1597
+ r,
1598
+ D,
1599
+ z,
1600
+ U
1601
+ ]), B = ve(() => {
1602
+ if (!U || !n) return null;
1603
+ try {
1604
+ return St(n, a, D);
1605
+ } catch (c) {
1606
+ return console.error("Failed to build manual playlist config:", c), null;
1607
+ }
1608
+ }, [U, n, a, D]), { isLoaded: te, error: ae } = Et(
1609
+ null,
1610
+ // No version needed - we're using full URL
1611
+ Q || void 0
1612
+ );
1613
+ return je(() => {
1614
+ if (!Q) {
1615
+ L(
1616
+ "VPPlayer: Provide scriptUrl OR (scriptId + videoId) OR (scriptId + playlist) to initialize the player."
1617
+ );
1618
+ return;
1619
+ }
1620
+ if (ae) {
1621
+ L(ae);
1622
+ return;
1623
+ }
1624
+ if (!te) return;
1625
+ if (U && !B) {
1626
+ L("VPPlayer: Failed to build manual playlist configuration.");
1750
1627
  return;
1751
1628
  }
1752
- if (!S) return;
1753
- let p = !0;
1629
+ let c = !0;
1754
1630
  return (async () => {
1755
- var P;
1631
+ var T;
1756
1632
  try {
1757
- const Y = (s == null ? void 0 : s.includes("vertical-player")) || (s == null ? void 0 : s.includes("vpverticalplayer")) || f, Z = Y ? window.vpVerticalPlayer : window.vpPlayer;
1758
- if (!Z) {
1759
- H("VP Player script loaded but global function not found.");
1760
- return;
1761
- }
1762
- M.current = null, K.current;
1763
- const I = At({
1764
- videoUrl: n,
1765
- projectId: a,
1766
- config: ie,
1767
- isVerticalPlayer: Y
1768
- }), b = Z(J);
1769
- if (!b) {
1770
- H("Failed to create player instance.");
1633
+ const q = D ? window.vpVerticalPlayer : window.vpPlayer;
1634
+ if (!q) {
1635
+ L(
1636
+ `VP Player: Script loaded but global function not found. Expected ${D ? "vpVerticalPlayer" : "vpPlayer"}.`
1637
+ );
1771
1638
  return;
1772
1639
  }
1773
- if (await new Promise(($) => setTimeout($, 0)), !document.getElementById(J)) {
1640
+ if (await new Promise((E) => setTimeout(E, 0)), !document.getElementById(z)) {
1774
1641
  console.error(
1775
- `VP Player: Container element with ID '${J}' not found in DOM.`
1642
+ `VP Player: Container element with ID '${z}' not found in DOM.`
1776
1643
  );
1777
1644
  return;
1778
1645
  }
1779
- if (p) {
1780
- try {
1781
- if (!document.getElementById(J))
1782
- return;
1783
- b.setup(I);
1784
- } catch ($) {
1785
- const _e = $ instanceof Error ? $.message : String($);
1786
- if (_e.includes("already initialized")) {
1787
- console.warn(
1788
- "VP Player: Player already initialized, attempting to destroy and retry."
1789
- );
1790
- try {
1791
- (P = b.destroy) == null || P.call(b), await new Promise((l) => setTimeout(l, 50)), p && document.getElementById(J) && b.setup(I);
1792
- } catch (l) {
1793
- console.error(
1794
- "VP Player: Failed to recover from initialization error",
1795
- l
1796
- );
1797
- }
1798
- } else
1799
- console.error("VP Player: Setup error", $), H(`Player setup failed: ${_e}`);
1800
- }
1801
- if (M.current = b, q.current = !0, H(null), j.current = !1, b.on) {
1802
- const $ = b.on.bind(b), _e = () => {
1803
- $("ready", () => {
1804
- const l = T.current;
1805
- l.onPlayerStart && l.onPlayerStart("player_start"), l.onPlayerEvent && l.onPlayerEvent("player_start");
1806
- }), $("play", () => {
1807
- const l = T.current;
1808
- l.onPlayerPlay && l.onPlayerPlay("player_play"), l.onPlayerEvent && l.onPlayerEvent("player_play");
1809
- }), $("video-started", (l) => {
1810
- const D = T.current;
1811
- D.onVideoStarted && D.onVideoStarted(l);
1812
- }), $("resume", () => {
1813
- const l = T.current;
1814
- l.onPlayerResume && l.onPlayerResume("player_resume"), l.onPlayerEvent && l.onPlayerEvent("player_resume");
1815
- }), $("pause", () => {
1816
- const l = T.current;
1817
- l.onPlayerPause && l.onPlayerPause("player_pause"), l.onPlayerEvent && l.onPlayerEvent("player_pause");
1818
- }), $("complete", () => {
1819
- const l = T.current;
1820
- l.onPlayerEnd && l.onPlayerEnd("player_end"), l.onPlayerEvent && l.onPlayerEvent("player_end"), j.current = !1;
1821
- }), $("firstQuartile", () => {
1822
- const l = T.current;
1823
- l.onPlayerQuartile25 && l.onPlayerQuartile25("player_quartile_25", 0), l.onPlayerEvent && l.onPlayerEvent("player_quartile_25", 0);
1824
- }), $("secondQuartile", () => {
1825
- const l = T.current;
1826
- l.onPlayerQuartile50 && l.onPlayerQuartile50("player_quartile_50", 0), l.onPlayerEvent && l.onPlayerEvent("player_quartile_50", 0);
1827
- }), $("thirdQuartile", () => {
1828
- const l = T.current;
1829
- l.onPlayerQuartile75 && l.onPlayerQuartile75("player_quartile_75", 0), l.onPlayerEvent && l.onPlayerEvent("player_quartile_75", 0);
1830
- }), $("video-state", (l) => {
1831
- var pe;
1832
- const D = ((pe = b.getPosition) == null ? void 0 : pe.call(b)) ?? (l == null ? void 0 : l.position) ?? 0, se = T.current;
1833
- se.onPlayerProgressEvery10Seconds && se.onPlayerProgressEvery10Seconds(
1834
- "player_progress_every_10_seconds",
1835
- Math.floor(D)
1836
- ), se.onPlayerEvent && se.onPlayerEvent(
1837
- "player_progress_every_10_seconds",
1838
- Math.floor(D)
1646
+ const v = q(z);
1647
+ if (!v) {
1648
+ L("VP Player: Failed to get player instance.");
1649
+ return;
1650
+ }
1651
+ if (c) {
1652
+ if (Y.current = v, L(null), Z.current = !1, U && B) {
1653
+ console.log(
1654
+ "VP Player: Manual playlist mode - calling setup() with config:",
1655
+ B
1656
+ );
1657
+ try {
1658
+ v.setup(B);
1659
+ } catch (E) {
1660
+ const f = E instanceof Error ? E.message : String(E);
1661
+ if (f.includes("already initialized")) {
1662
+ console.warn(
1663
+ "VP Player: Player already initialized, attempting to destroy and retry."
1839
1664
  );
1840
- }), $("time", (l) => {
1841
- var se;
1842
- if (j.current) return;
1843
- let D = 0;
1844
- if (typeof l == "number" ? D = l : l && typeof l == "object" && "position" in l ? D = l.position : D = ((se = b.getPosition) == null ? void 0 : se.call(b)) ?? 0, D >= 20) {
1845
- j.current = !0;
1846
- const pe = Math.floor(D), we = T.current;
1847
- we.onPlayerProgressAt20Seconds && we.onPlayerProgressAt20Seconds(
1848
- "player_progress_at_20_seconds",
1849
- pe
1850
- ), we.onPlayerEvent && we.onPlayerEvent("player_progress_at_20_seconds", pe);
1665
+ try {
1666
+ if ((T = v.destroy) == null || T.call(v), await new Promise((u) => setTimeout(u, 50)), c && document.getElementById(z)) {
1667
+ const u = q(z);
1668
+ u && (u.setup(B), Y.current = u);
1669
+ }
1670
+ } catch (u) {
1671
+ console.error(
1672
+ "VP Player: Failed to recover from initialization error",
1673
+ u
1674
+ );
1851
1675
  }
1852
- }), $("playlistItem", (l) => {
1853
- const D = T.current;
1854
- D.onPlayerNext && D.onPlayerNext("player_next"), D.onPlayerEvent && D.onPlayerEvent("player_next"), D.onPlaylistData, j.current = !1;
1855
- });
1856
- };
1857
- try {
1858
- _e();
1859
- } catch (l) {
1860
- console.warn("VP Player: Failed to attach event listeners", l);
1676
+ } else {
1677
+ console.error("VP Player: Setup error", E), L(`Player setup failed: ${f}`);
1678
+ return;
1679
+ }
1861
1680
  }
1862
1681
  }
1863
- !n && b.play && setTimeout(() => {
1864
- if (p && b.play)
1865
- try {
1866
- b.play();
1867
- } catch {
1868
- }
1869
- }, 100);
1682
+ if (v.on) {
1683
+ const E = v.on.bind(v);
1684
+ E("ready", () => {
1685
+ var f, u;
1686
+ (u = (f = $.current).onReady) == null || u.call(f);
1687
+ }), E("play", () => {
1688
+ var f, u;
1689
+ (u = (f = $.current).onPlay) == null || u.call(f);
1690
+ }), E("pause", () => {
1691
+ var f, u;
1692
+ (u = (f = $.current).onPause) == null || u.call(f);
1693
+ }), E("resume", () => {
1694
+ var f, u;
1695
+ (u = (f = $.current).onResume) == null || u.call(f);
1696
+ }), E("complete", () => {
1697
+ var f, u;
1698
+ (u = (f = $.current).onComplete) == null || u.call(f), Z.current = !1;
1699
+ }), E("video-started", (f) => {
1700
+ var u, X;
1701
+ (X = (u = $.current).onVideoStarted) == null || X.call(u, f);
1702
+ }), E("firstQuartile", () => {
1703
+ var f, u;
1704
+ (u = (f = $.current).onQuartile25) == null || u.call(f);
1705
+ }), E("secondQuartile", () => {
1706
+ var f, u;
1707
+ (u = (f = $.current).onQuartile50) == null || u.call(f);
1708
+ }), E("thirdQuartile", () => {
1709
+ var f, u;
1710
+ (u = (f = $.current).onQuartile75) == null || u.call(f);
1711
+ }), E("video-state", () => {
1712
+ var u, X, ie;
1713
+ const f = ((u = v.getPosition) == null ? void 0 : u.call(v)) ?? 0;
1714
+ (ie = (X = $.current).onProgress10s) == null || ie.call(X, Math.floor(f));
1715
+ }), E("time", (f) => {
1716
+ var X, ie, ze, Ue, De;
1717
+ let u = 0;
1718
+ typeof f == "number" ? u = f : f && typeof f == "object" && "position" in f ? u = f.position : u = ((X = v.getPosition) == null ? void 0 : X.call(v)) ?? 0, (ze = (ie = $.current).onTimeUpdate) == null || ze.call(ie, u), !Z.current && u >= 20 && (Z.current = !0, (De = (Ue = $.current).onProgress20s) == null || De.call(Ue, Math.floor(u)));
1719
+ }), E("playlistItem", () => {
1720
+ var f, u;
1721
+ (u = (f = $.current).onNext) == null || u.call(f), Z.current = !1;
1722
+ }), E("error", (f) => {
1723
+ var X, ie;
1724
+ const u = typeof f == "string" ? f : (f == null ? void 0 : f.message) || "Unknown error";
1725
+ (ie = (X = $.current).onError) == null || ie.call(X, u);
1726
+ });
1727
+ }
1870
1728
  }
1871
- } catch (Y) {
1872
- if (p) {
1873
- const Z = Y instanceof Error ? Y.message : String(Y);
1874
- H(Z), console.error("VP Player initialization error:", Y);
1729
+ } catch (q) {
1730
+ if (c) {
1731
+ const oe = q instanceof Error ? q.message : String(q);
1732
+ L(oe), console.error("VP Player initialization error:", q);
1875
1733
  }
1876
1734
  }
1877
1735
  })(), () => {
1878
- var P;
1879
- if (p = !1, (P = M.current) != null && P.destroy) {
1736
+ var T;
1737
+ if (c = !1, (T = Y.current) != null && T.destroy) {
1880
1738
  try {
1881
- M.current.destroy();
1739
+ Y.current.destroy();
1882
1740
  } catch {
1883
1741
  }
1884
- M.current = null;
1742
+ Y.current = null;
1885
1743
  }
1886
- q.current = !1;
1887
1744
  };
1888
1745
  }, [
1889
- S,
1890
- J,
1891
- G,
1892
- s,
1893
- V,
1894
- i,
1895
- n,
1896
- a,
1897
- ie,
1898
- f
1746
+ te,
1747
+ z,
1748
+ ae,
1749
+ Q,
1750
+ D,
1751
+ U,
1752
+ B
1899
1753
  ]), {
1900
- playerRef: K,
1901
- playerInstanceRef: M,
1902
- isScriptLoaded: S,
1903
- isLoading: !S && !q.current,
1904
- error: ae,
1905
- generatedPlayerId: J
1754
+ playerRef: x,
1755
+ playerInstanceRef: Y,
1756
+ isScriptLoaded: te,
1757
+ isLoading: !te && !J,
1758
+ error: J,
1759
+ generatedPlayerId: z
1906
1760
  };
1907
- }, Ot = ({
1908
- playerId: e,
1761
+ }, At = ({
1762
+ scriptId: e,
1909
1763
  videoId: r,
1910
- version: t,
1911
- videoUrl: n,
1764
+ scriptUrl: t,
1912
1765
  projectId: a,
1913
- playlistId: i,
1914
- scriptUrl: s,
1915
- config: c = {},
1916
- isReels: f = !1,
1917
- hiddenClasses: u = [],
1918
- onClose: d,
1919
- className: h,
1920
- onPlaylistData: C,
1921
- onVideoStarted: E,
1922
- trackingMetadata: k,
1923
- onPlayerStart: y,
1924
- onPlayerPlay: m,
1925
- onPlayerPause: v,
1926
- onPlayerResume: x,
1927
- onPlayerEnd: O,
1928
- onPlayerProgressEvery10Seconds: z,
1929
- onPlayerProgressAt20Seconds: N,
1930
- onPlayerQuartile25: A,
1931
- onPlayerQuartile50: g,
1932
- onPlayerQuartile75: K,
1933
- onPlayerNext: M,
1934
- onPlayerPrevious: q,
1935
- onPlayerEvent: T
1766
+ playlist: n,
1767
+ playerId: o,
1768
+ isVertical: s = !1,
1769
+ isReels: l = !1,
1770
+ thumbnailUrl: d,
1771
+ onClose: h,
1772
+ className: p,
1773
+ hiddenClasses: m = [],
1774
+ onReady: A,
1775
+ onPlay: S,
1776
+ onPause: R,
1777
+ onResume: g,
1778
+ onComplete: y,
1779
+ onError: b,
1780
+ onVideoStarted: P,
1781
+ onTimeUpdate: O,
1782
+ onQuartile25: M,
1783
+ onQuartile50: F,
1784
+ onQuartile75: C,
1785
+ onNext: x,
1786
+ onPrevious: Y,
1787
+ onProgress10s: J,
1788
+ onProgress20s: L
1936
1789
  }) => {
1937
- var P, Y, Z, I;
1938
1790
  const {
1939
- playerRef: j,
1940
- playerInstanceRef: S,
1941
- isScriptLoaded: G,
1942
- isLoading: V,
1943
- error: ae,
1944
- generatedPlayerId: H
1945
- } = It({
1946
- playerId: e,
1791
+ playerRef: G,
1792
+ playerInstanceRef: z,
1793
+ isScriptLoaded: $,
1794
+ isLoading: Z,
1795
+ error: U,
1796
+ generatedPlayerId: D
1797
+ } = Rt({
1798
+ scriptId: e,
1947
1799
  videoId: r,
1948
- version: t,
1949
- videoUrl: n,
1800
+ scriptUrl: t,
1950
1801
  projectId: a,
1951
- playlistId: i,
1952
- scriptUrl: s,
1953
- config: c,
1954
- isReels: f,
1955
- onPlaylistData: C,
1956
- onVideoStarted: E,
1957
- onPlayerStart: y,
1958
- onPlayerPlay: m,
1959
- onPlayerPause: v,
1960
- onPlayerResume: x,
1961
- onPlayerEnd: O,
1962
- onPlayerProgressEvery10Seconds: z,
1963
- onPlayerProgressAt20Seconds: N,
1964
- onPlayerQuartile25: A,
1965
- onPlayerQuartile50: g,
1966
- onPlayerQuartile75: K,
1967
- onPlayerNext: M,
1968
- onPlayerPrevious: q,
1969
- onPlayerEvent: T
1970
- }), [U, J] = ce(!0), ie = () => f && J(!0), o = () => {
1971
- var b, oe;
1972
- !f || !U || (J(!1), (oe = (b = S.current) == null ? void 0 : b.pause) == null || oe.call(b), d == null || d());
1973
- }, p = (Y = (P = c == null ? void 0 : c.config) == null ? void 0 : P.size) != null && Y.width ? typeof c.config.size.width == "number" ? `${c.config.size.width}px` : c.config.size.width : void 0, R = (I = (Z = c == null ? void 0 : c.config) == null ? void 0 : Z.size) != null && I.height ? typeof c.config.size.height == "number" ? `${c.config.size.height}px` : c.config.size.height : void 0;
1974
- return ae ? /* @__PURE__ */ L.jsxs(Ie, { type: "error", children: [
1975
- "An error occurred: ",
1976
- ae
1977
- ] }) : /* @__PURE__ */ L.jsxs(L.Fragment, { children: [
1978
- f && !U ? /* @__PURE__ */ L.jsx(
1802
+ playlist: n,
1803
+ playerId: o,
1804
+ isVertical: s,
1805
+ isReels: l,
1806
+ onReady: A,
1807
+ onPlay: S,
1808
+ onPause: R,
1809
+ onResume: g,
1810
+ onComplete: y,
1811
+ onError: b,
1812
+ onVideoStarted: P,
1813
+ onTimeUpdate: O,
1814
+ onQuartile25: M,
1815
+ onQuartile50: F,
1816
+ onQuartile75: C,
1817
+ onNext: x,
1818
+ onPrevious: Y,
1819
+ onProgress10s: J,
1820
+ onProgress20s: L
1821
+ }), [Q, B] = Re(!0), te = () => l && B(!0), ae = () => {
1822
+ var c, _;
1823
+ !l || !Q || (B(!1), (_ = (c = z.current) == null ? void 0 : c.pause) == null || _.call(c), h == null || h());
1824
+ };
1825
+ if (U)
1826
+ return /* @__PURE__ */ I.jsxs(er, { type: "error", children: [
1827
+ "An error occurred: ",
1828
+ U
1829
+ ] });
1830
+ const i = () => /* @__PURE__ */ I.jsx(
1831
+ "div",
1832
+ {
1833
+ style: {
1834
+ position: "absolute",
1835
+ top: 0,
1836
+ left: 0,
1837
+ right: 0,
1838
+ bottom: 0,
1839
+ display: "flex",
1840
+ alignItems: "center",
1841
+ justifyContent: "center",
1842
+ background: "rgba(0,0,0,0.8)",
1843
+ zIndex: 10
1844
+ },
1845
+ children: /* @__PURE__ */ I.jsx(er, { type: "loading", children: "Loading..." })
1846
+ }
1847
+ );
1848
+ return l ? /* @__PURE__ */ I.jsxs(I.Fragment, { children: [
1849
+ !Q && /* @__PURE__ */ I.jsx(
1979
1850
  "div",
1980
1851
  {
1981
- onClick: ie,
1982
- style: { cursor: "pointer", width: "100%", height: "100%" }
1983
- }
1984
- ) : null,
1985
- !f && /* @__PURE__ */ L.jsxs("div", { style: { position: "relative" }, children: [
1986
- /* @__PURE__ */ L.jsx(
1987
- nr,
1988
- {
1989
- id: H,
1990
- ref: j,
1991
- width: p || "100%",
1992
- height: R || "auto",
1993
- $hiddenClasses: u,
1994
- className: h
1852
+ onClick: te,
1853
+ style: {
1854
+ cursor: "pointer",
1855
+ width: "100%",
1856
+ height: "100%",
1857
+ backgroundImage: d ? `url(${d})` : void 0,
1858
+ backgroundSize: "cover",
1859
+ backgroundPosition: "center"
1995
1860
  }
1996
- ),
1997
- (V || !G) && /* @__PURE__ */ L.jsx(
1998
- "div",
1999
- {
2000
- style: {
2001
- position: "absolute",
2002
- top: 0,
2003
- left: 0,
2004
- right: 0,
2005
- bottom: 0,
2006
- display: "flex",
2007
- alignItems: "center",
2008
- justifyContent: "center",
2009
- background: "rgba(0,0,0,0.8)",
2010
- zIndex: 10
2011
- },
2012
- children: /* @__PURE__ */ L.jsx(Ie, { type: "loading", children: "Loading..." })
2013
- }
2014
- )
2015
- ] }),
2016
- f && U && /* @__PURE__ */ L.jsx(Et, { onClick: o, className: h, children: /* @__PURE__ */ L.jsx(
2017
- kt,
1861
+ }
1862
+ ),
1863
+ Q && /* @__PURE__ */ I.jsx(bt, { onClick: ae, className: p, children: /* @__PURE__ */ I.jsx(
1864
+ vt,
2018
1865
  {
2019
- className: h,
2020
- onClick: (b) => {
2021
- b.stopPropagation();
2022
- },
2023
- children: /* @__PURE__ */ L.jsxs("div", { style: { position: "relative" }, children: [
2024
- /* @__PURE__ */ L.jsx(
2025
- nr,
1866
+ className: p,
1867
+ onClick: (c) => c.stopPropagation(),
1868
+ children: /* @__PURE__ */ I.jsxs("div", { style: { position: "relative", width: "100%", height: "100%" }, children: [
1869
+ /* @__PURE__ */ I.jsx(
1870
+ rr,
2026
1871
  {
2027
- id: H,
2028
- ref: j,
1872
+ id: D,
1873
+ ref: G,
2029
1874
  width: "100%",
2030
1875
  height: "100%",
2031
- $hiddenClasses: u,
2032
- className: h
1876
+ $hiddenClasses: m,
1877
+ className: p
2033
1878
  }
2034
1879
  ),
2035
- (V || !G) && /* @__PURE__ */ L.jsx(
2036
- "div",
2037
- {
2038
- style: {
2039
- position: "absolute",
2040
- top: 0,
2041
- left: 0,
2042
- right: 0,
2043
- bottom: 0,
2044
- display: "flex",
2045
- alignItems: "center",
2046
- justifyContent: "center",
2047
- background: "rgba(0,0,0,0.8)",
2048
- zIndex: 10
2049
- },
2050
- children: /* @__PURE__ */ L.jsx(Ie, { type: "loading", children: "Loading..." })
2051
- }
2052
- )
1880
+ (Z || !$) && /* @__PURE__ */ I.jsx(i, {})
2053
1881
  ] })
2054
1882
  }
2055
1883
  ) })
2056
- ] });
2057
- }, br = wr(void 0), $t = ({ children: e }) => {
2058
- const [r, t] = ce(!1), [n, a] = ce(null), [i, s] = ce(null), c = qe((d) => {
2059
- try {
2060
- const h = gr(d.playerId, d.videoId);
2061
- a({ ...d, playerId: h }), t(!0), s(null);
2062
- } catch {
2063
- s("Failed to show player.");
2064
- }
2065
- }, []), f = qe(() => {
2066
- t(!1), a(null), s(null);
2067
- }, []), u = ir(
2068
- () => ({
2069
- showPlayer: c,
2070
- hidePlayer: f,
2071
- isPlayerVisible: r,
2072
- playerParams: n
2073
- }),
2074
- [c, f, r, n]
2075
- );
2076
- return /* @__PURE__ */ L.jsxs(br.Provider, { value: u, children: [
2077
- e,
2078
- i && /* @__PURE__ */ L.jsx(Ie, { type: "error", children: i }),
2079
- r && (n == null ? void 0 : n.playerId) && /* @__PURE__ */ L.jsx(
2080
- Ot,
1884
+ ] }) : /* @__PURE__ */ I.jsxs("div", { style: { position: "relative", width: "100%", height: "100%" }, children: [
1885
+ /* @__PURE__ */ I.jsx(
1886
+ rr,
2081
1887
  {
2082
- playerId: n.playerId,
2083
- videoId: n.videoId,
2084
- projectId: n.projectId,
2085
- videoUrl: n.videoUrl,
2086
- version: n.version,
2087
- playlistId: n.playlistId,
2088
- scriptUrl: n.scriptUrl,
2089
- config: n.config,
2090
- isReels: n.isReels,
2091
- thumbnailUrl: n.thumbnailUrl,
2092
- onClose: f,
2093
- hiddenClasses: n.hiddenClasses || [],
2094
- className: n.className
1888
+ id: D,
1889
+ ref: G,
1890
+ width: "100%",
1891
+ height: "100%",
1892
+ $hiddenClasses: m,
1893
+ className: p
2095
1894
  }
2096
- )
1895
+ ),
1896
+ (Z || !$) && /* @__PURE__ */ I.jsx(i, {})
2097
1897
  ] });
2098
- }, Lt = () => {
2099
- const e = ar(br);
2100
- if (!e) throw new Error("useVPPlayer must be used within a VPPlayerProvider");
2101
- return e;
2102
- }, zt = {
2103
- projectId: void 0,
2104
- video: {
2105
- // NOTE: Do NOT set file: '' here - it interferes with managed mode
2106
- // where the SDK resolves the video URL from videoId + projectId
2107
- },
2108
- config: {
2109
- autoplay: !0,
2110
- muted: !0,
2111
- // Required for browser autoplay policy
2112
- loop: !1,
2113
- size: {
2114
- width: "100%",
2115
- height: "30vh"
2116
- }
2117
- // NOTE: Do NOT set controls here - let the SDK/managed script
2118
- // use what's configured in the Gjirafa admin panel (projectId config)
2119
- }
2120
- }, Nt = {
2121
- config: {
2122
- autostartOnLoad: { state: !0, onMobile: !0, onData: !0 },
2123
- muted: !0
2124
- }
2125
- }, Ft = {
2126
- config: {
2127
- autoplay: !0,
2128
- muted: !0
2129
- }
2130
- }, Ne = {
2131
- video: {
2132
- advertising: !0,
2133
- ads: {
2134
- skipAd: { state: !0, skipFrom: 5 }
2135
- }
2136
- },
2137
- config: {
2138
- adAnnouncement: { state: !0, timeBeforeAd: 5 },
2139
- adsRequireInteraction: !1
2140
- }
2141
- }, Mt = (e, r, t = "time", n = 0) => {
2142
- var a;
2143
- return {
2144
- ...Ne,
2145
- video: {
2146
- ...Ne.video,
2147
- ads: {
2148
- ...(a = Ne.video) == null ? void 0 : a.ads,
2149
- adBreaks: [
2150
- {
2151
- adTagUrl: r,
2152
- breakType: e,
2153
- breakTimingType: t,
2154
- breakTimingValue: n
2155
- }
2156
- ]
2157
- }
2158
- }
2159
- };
2160
- }, Vt = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", Dt = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", Bt = "https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4", Ut = "https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600", Wt = "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=", qt = "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=";
1898
+ };
2161
1899
  export {
2162
- Wt as AD_TAG_LINEAR_URL,
2163
- qt as AD_TAG_SKIPPABLE_LINEAR_URL,
2164
- Vt as BIG_BUCK_BUNNY_URL,
2165
- Dt as ELEPHANTS_DREAM_URL,
2166
- Et as Overlay,
2167
- Ut as PEXELS_THUMBNAIL_URL,
2168
- Bt as PEXELS_VERTICAL_VIDEO_URL,
2169
- nr as PlayerContainer,
2170
- kt as PlayerWrapper,
2171
- Ot as VPPlayer,
2172
- $t as VPPlayerProvider,
2173
- Nt as baseConfig,
2174
- Ne as baseConfigWithAds,
2175
- Ft as baseConfigWithAutoplay,
2176
- At as buildVPPlayerConfig,
2177
- zt as defaultVPPlayerConfig,
2178
- Tt as extractVideoId,
2179
- Mt as getAdConfig,
2180
- Lt as useVPPlayer,
2181
- It as useVPPlayerLogic,
2182
- Rt as useVPPlayerScript
1900
+ bt as Overlay,
1901
+ rr as PlayerContainer,
1902
+ vt as PlayerWrapper,
1903
+ At as VPPlayer,
1904
+ Oe as VP_PLAYER_BASE_URL,
1905
+ Pt as appendDivIdToUrl,
1906
+ kt as generatePlayerId,
1907
+ wt as getFullyManagedPlayerScriptUrl,
1908
+ Tt as getManagedPlayerScriptUrl,
1909
+ xt as getPlayerScriptUrl,
1910
+ tr as getVerticalPlayerScriptUrl,
1911
+ Rt as useVPPlayerLogic,
1912
+ Et as useVPPlayerScript
2183
1913
  };