@devix-technologies/react-gjirafa-vp-player 1.0.3 → 1.0.5
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.
- package/dist/react-gjirafa-vp-player.es.js +485 -515
- package/dist/react-gjirafa-vp-player.umd.js +8 -8
- package/package.json +1 -1
- package/dist/App.d.ts +0 -2
- package/dist/components/Feedback.d.ts +0 -25
- package/dist/components/VPPlayer/index.d.ts +0 -2
- package/dist/components/VPPlayer/ui/index.d.ts +0 -1
- package/dist/components/VPPlayer/ui/styled.d.ts +0 -42
- package/dist/config/index.d.ts +0 -1
- package/dist/config/vpPlayerConfig.d.ts +0 -9
- package/dist/constants/configs.d.ts +0 -22
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/storybook.d.ts +0 -11
- package/dist/constants/styles.d.ts +0 -11
- package/dist/constants/urls.d.ts +0 -18
- package/dist/constants/vpPlayer.d.ts +0 -29
- package/dist/contexts/VPPlayerContext.d.ts +0 -53
- package/dist/contexts/index.d.ts +0 -1
- package/dist/features/VPPlayer.d.ts +0 -27
- package/dist/features/stories/ads/Ads.stories.d.ts +0 -13
- package/dist/features/stories/context/Context.stories.d.ts +0 -10
- package/dist/features/stories/index.d.ts +0 -3
- package/dist/features/stories/playback/Playback.stories.d.ts +0 -15
- package/dist/fixtures/index.d.ts +0 -1
- package/dist/fixtures/playlist.d.ts +0 -11
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/useVPPlayerLogic.d.ts +0 -16
- package/dist/hooks/useVPPlayerScript.d.ts +0 -13
- package/dist/hooks/useVideoData.d.ts +0 -21
- package/dist/index.d.ts +0 -9
- package/dist/interfaces/config.d.ts +0 -303
- package/dist/interfaces/index.d.ts +0 -3
- package/dist/interfaces/instance.d.ts +0 -11
- package/dist/interfaces/props.d.ts +0 -54
- package/dist/main.d.ts +0 -1
- package/dist/types/api.types.d.ts +0 -50
- package/dist/types/index.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/vpPlayerConfigBuilder.d.ts +0 -29
- package/dist/utils/vpPlayerUtils.d.ts +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
var
|
|
1
|
+
import * as H from "react";
|
|
2
|
+
import mt, { forwardRef as yt, useContext as et, useState as D, useEffect as xe, useRef as Me, useMemo as tt, createContext as gt, useCallback as ze } from "react";
|
|
3
|
+
var he = { exports: {} }, se = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -11,28 +11,28 @@ var fe = { exports: {} }, ae = {};
|
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
var De;
|
|
14
|
-
function
|
|
15
|
-
if (De) return
|
|
14
|
+
function vt() {
|
|
15
|
+
if (De) return se;
|
|
16
16
|
De = 1;
|
|
17
17
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
18
18
|
function r(n, a, i) {
|
|
19
|
-
var
|
|
20
|
-
if (i !== void 0 && (
|
|
19
|
+
var s = null;
|
|
20
|
+
if (i !== void 0 && (s = "" + i), a.key !== void 0 && (s = "" + a.key), "key" in a) {
|
|
21
21
|
i = {};
|
|
22
|
-
for (var
|
|
23
|
-
|
|
22
|
+
for (var c in a)
|
|
23
|
+
c !== "key" && (i[c] = a[c]);
|
|
24
24
|
} else i = a;
|
|
25
25
|
return a = i.ref, {
|
|
26
26
|
$$typeof: e,
|
|
27
27
|
type: n,
|
|
28
|
-
key:
|
|
28
|
+
key: s,
|
|
29
29
|
ref: a !== void 0 ? a : null,
|
|
30
30
|
props: i
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return se.Fragment = t, se.jsx = r, se.jsxs = r, se;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var ce = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -43,12 +43,12 @@ var ie = {};
|
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
45
|
var Ue;
|
|
46
|
-
function
|
|
46
|
+
function bt() {
|
|
47
47
|
return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
48
|
function e(o) {
|
|
49
49
|
if (o == null) return null;
|
|
50
50
|
if (typeof o == "function")
|
|
51
|
-
return o.$$typeof ===
|
|
51
|
+
return o.$$typeof === A ? null : o.displayName || o.name || null;
|
|
52
52
|
if (typeof o == "string") return o;
|
|
53
53
|
switch (o) {
|
|
54
54
|
case p:
|
|
@@ -61,7 +61,7 @@ function xt() {
|
|
|
61
61
|
return "Suspense";
|
|
62
62
|
case S:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case F:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof o == "object")
|
|
@@ -74,12 +74,12 @@ function xt() {
|
|
|
74
74
|
return (o.displayName || "Context") + ".Provider";
|
|
75
75
|
case b:
|
|
76
76
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
77
|
+
case O:
|
|
78
78
|
var g = o.render;
|
|
79
79
|
return o = o.displayName, o || (o = g.displayName || g.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
80
80
|
case f:
|
|
81
81
|
return g = o.displayName || null, g !== null ? g : e(o.type) || "Memo";
|
|
82
|
-
case
|
|
82
|
+
case T:
|
|
83
83
|
g = o._payload, o = o._init;
|
|
84
84
|
try {
|
|
85
85
|
return e(o(g));
|
|
@@ -100,17 +100,17 @@ function xt() {
|
|
|
100
100
|
}
|
|
101
101
|
if (g) {
|
|
102
102
|
g = console;
|
|
103
|
-
var R = g.error,
|
|
103
|
+
var R = g.error, j = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
104
104
|
return R.call(
|
|
105
105
|
g,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
107
|
+
j
|
|
108
108
|
), t(o);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function n(o) {
|
|
112
112
|
if (o === p) return "<>";
|
|
113
|
-
if (typeof o == "object" && o !== null && o.$$typeof ===
|
|
113
|
+
if (typeof o == "object" && o !== null && o.$$typeof === T)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
116
|
var g = e(o);
|
|
@@ -120,22 +120,22 @@ function xt() {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function a() {
|
|
123
|
-
var o =
|
|
123
|
+
var o = V.A;
|
|
124
124
|
return o === null ? null : o.getOwner();
|
|
125
125
|
}
|
|
126
126
|
function i() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
129
|
+
function s(o) {
|
|
130
|
+
if (J.call(o, "key")) {
|
|
131
131
|
var g = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
132
132
|
if (g && g.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return o.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function c(o, g) {
|
|
137
137
|
function R() {
|
|
138
|
-
|
|
138
|
+
Z || (Z = !0, console.error(
|
|
139
139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
140
|
g
|
|
141
141
|
));
|
|
@@ -147,17 +147,17 @@ function xt() {
|
|
|
147
147
|
}
|
|
148
148
|
function d() {
|
|
149
149
|
var o = e(this.type);
|
|
150
|
-
return
|
|
150
|
+
return Q[o] || (Q[o] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function m(o, g, R, j, X, U, _e, Se) {
|
|
155
155
|
return R = U.ref, o = {
|
|
156
156
|
$$typeof: w,
|
|
157
157
|
type: o,
|
|
158
158
|
key: g,
|
|
159
159
|
props: U,
|
|
160
|
-
_owner:
|
|
160
|
+
_owner: X
|
|
161
161
|
}, (R !== void 0 ? R : null) !== null ? Object.defineProperty(o, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
163
|
get: d
|
|
@@ -175,132 +175,132 @@ function xt() {
|
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
177
177
|
writable: !0,
|
|
178
|
-
value:
|
|
178
|
+
value: _e
|
|
179
179
|
}), Object.defineProperty(o, "_debugTask", {
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
|
-
value:
|
|
183
|
+
value: Se
|
|
184
184
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
185
185
|
}
|
|
186
|
-
function l(o, g, R,
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (z(
|
|
191
|
-
for (
|
|
192
|
-
u(
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
186
|
+
function l(o, g, R, j, X, U, _e, Se) {
|
|
187
|
+
var L = g.children;
|
|
188
|
+
if (L !== void 0)
|
|
189
|
+
if (j)
|
|
190
|
+
if (z(L)) {
|
|
191
|
+
for (j = 0; j < L.length; j++)
|
|
192
|
+
u(L[j]);
|
|
193
|
+
Object.freeze && Object.freeze(L);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else u(
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
return
|
|
198
|
+
else u(L);
|
|
199
|
+
if (J.call(g, "key")) {
|
|
200
|
+
L = e(o);
|
|
201
|
+
var ee = Object.keys(g).filter(function(ht) {
|
|
202
|
+
return ht !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
j = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", oe[L + j] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
),
|
|
211
|
+
j,
|
|
212
|
+
L,
|
|
213
|
+
ee,
|
|
214
|
+
L
|
|
215
|
+
), oe[L + j] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
217
|
+
if (L = null, R !== void 0 && (r(R), L = "" + R), s(g) && (r(g.key), L = "" + g.key), "key" in g) {
|
|
218
218
|
R = {};
|
|
219
|
-
for (var
|
|
220
|
-
|
|
219
|
+
for (var Re in g)
|
|
220
|
+
Re !== "key" && (R[Re] = g[Re]);
|
|
221
221
|
} else R = g;
|
|
222
|
-
return
|
|
222
|
+
return L && c(
|
|
223
223
|
R,
|
|
224
224
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
225
|
-
),
|
|
225
|
+
), m(
|
|
226
226
|
o,
|
|
227
|
-
|
|
227
|
+
L,
|
|
228
228
|
U,
|
|
229
|
-
|
|
229
|
+
X,
|
|
230
230
|
a(),
|
|
231
231
|
R,
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
_e,
|
|
233
|
+
Se
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
236
|
function u(o) {
|
|
237
237
|
typeof o == "object" && o !== null && o.$$typeof === w && o._store && (o._store.validated = 1);
|
|
238
238
|
}
|
|
239
|
-
var
|
|
239
|
+
var h = mt, w = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), A = Symbol.for("react.client.reference"), V = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, J = Object.prototype.hasOwnProperty, z = Array.isArray, G = console.createTask ? console.createTask : function() {
|
|
240
240
|
return null;
|
|
241
241
|
};
|
|
242
|
-
|
|
242
|
+
h = {
|
|
243
243
|
"react-stack-bottom-frame": function(o) {
|
|
244
244
|
return o();
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
|
-
var
|
|
248
|
-
|
|
247
|
+
var Z, Q = {}, K = h["react-stack-bottom-frame"].bind(
|
|
248
|
+
h,
|
|
249
249
|
i
|
|
250
|
-
)(),
|
|
251
|
-
|
|
252
|
-
var U = 1e4 >
|
|
250
|
+
)(), ie = G(n(i)), oe = {};
|
|
251
|
+
ce.Fragment = p, ce.jsx = function(o, g, R, j, X) {
|
|
252
|
+
var U = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
253
253
|
return l(
|
|
254
254
|
o,
|
|
255
255
|
g,
|
|
256
256
|
R,
|
|
257
257
|
!1,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
U ? Error("react-stack-top-frame") :
|
|
261
|
-
U ?
|
|
258
|
+
j,
|
|
259
|
+
X,
|
|
260
|
+
U ? Error("react-stack-top-frame") : K,
|
|
261
|
+
U ? G(n(o)) : ie
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
var U = 1e4 >
|
|
263
|
+
}, ce.jsxs = function(o, g, R, j, X) {
|
|
264
|
+
var U = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return l(
|
|
266
266
|
o,
|
|
267
267
|
g,
|
|
268
268
|
R,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
U ? Error("react-stack-top-frame") :
|
|
273
|
-
U ?
|
|
270
|
+
j,
|
|
271
|
+
X,
|
|
272
|
+
U ? Error("react-stack-top-frame") : K,
|
|
273
|
+
U ? G(n(o)) : ie
|
|
274
274
|
);
|
|
275
275
|
};
|
|
276
|
-
}()),
|
|
276
|
+
}()), ce;
|
|
277
277
|
}
|
|
278
278
|
var We;
|
|
279
|
-
function
|
|
280
|
-
return We || (We = 1, process.env.NODE_ENV === "production" ?
|
|
279
|
+
function xt() {
|
|
280
|
+
return We || (We = 1, process.env.NODE_ENV === "production" ? he.exports = vt() : he.exports = bt()), he.exports;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
283
|
-
function
|
|
284
|
-
return
|
|
282
|
+
var I = xt();
|
|
283
|
+
function Ie() {
|
|
284
|
+
return Ie = Object.assign ? Object.assign.bind() : function(e) {
|
|
285
285
|
for (var t = 1; t < arguments.length; t++) {
|
|
286
286
|
var r = arguments[t];
|
|
287
287
|
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
288
288
|
}
|
|
289
289
|
return e;
|
|
290
|
-
},
|
|
290
|
+
}, Ie.apply(null, arguments);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function wt(e) {
|
|
293
293
|
if (e.sheet)
|
|
294
294
|
return e.sheet;
|
|
295
295
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
296
296
|
if (document.styleSheets[t].ownerNode === e)
|
|
297
297
|
return document.styleSheets[t];
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function kt(e) {
|
|
300
300
|
var t = document.createElement("style");
|
|
301
301
|
return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
|
|
302
302
|
}
|
|
303
|
-
var
|
|
303
|
+
var Pt = /* @__PURE__ */ function() {
|
|
304
304
|
function e(r) {
|
|
305
305
|
var n = this;
|
|
306
306
|
this._insertTag = function(a) {
|
|
@@ -312,10 +312,10 @@ var Et = /* @__PURE__ */ function() {
|
|
|
312
312
|
return t.hydrate = function(n) {
|
|
313
313
|
n.forEach(this._insertTag);
|
|
314
314
|
}, t.insert = function(n) {
|
|
315
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
315
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(kt(this));
|
|
316
316
|
var a = this.tags[this.tags.length - 1];
|
|
317
317
|
if (this.isSpeedy) {
|
|
318
|
-
var i =
|
|
318
|
+
var i = wt(a);
|
|
319
319
|
try {
|
|
320
320
|
i.insertRule(n, i.cssRules.length);
|
|
321
321
|
} catch {
|
|
@@ -329,66 +329,66 @@ var Et = /* @__PURE__ */ function() {
|
|
|
329
329
|
return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
|
|
330
330
|
}), this.tags = [], this.ctr = 0;
|
|
331
331
|
}, e;
|
|
332
|
-
}(), N = "-ms-",
|
|
332
|
+
}(), N = "-ms-", we = "-moz-", k = "-webkit-", rt = "comm", Ne = "rule", Fe = "decl", Et = "@import", nt = "@keyframes", _t = "@layer", St = Math.abs, ke = String.fromCharCode, Rt = Object.assign;
|
|
333
333
|
function At(e, t) {
|
|
334
|
-
return
|
|
334
|
+
return $(e, 0) ^ 45 ? (((t << 2 ^ $(e, 0)) << 2 ^ $(e, 1)) << 2 ^ $(e, 2)) << 2 ^ $(e, 3) : 0;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function at(e) {
|
|
337
337
|
return e.trim();
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function Tt(e, t) {
|
|
340
340
|
return (e = t.exec(e)) ? e[0] : e;
|
|
341
341
|
}
|
|
342
342
|
function P(e, t, r) {
|
|
343
343
|
return e.replace(t, r);
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function $e(e, t) {
|
|
346
346
|
return e.indexOf(t);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function $(e, t) {
|
|
349
349
|
return e.charCodeAt(t) | 0;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ue(e, t, r) {
|
|
352
352
|
return e.slice(t, r);
|
|
353
353
|
}
|
|
354
354
|
function W(e) {
|
|
355
355
|
return e.length;
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Ve(e) {
|
|
358
358
|
return e.length;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function me(e, t) {
|
|
361
361
|
return t.push(e), e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Ct(e, t) {
|
|
364
364
|
return e.map(t).join("");
|
|
365
365
|
}
|
|
366
|
-
var
|
|
367
|
-
function
|
|
368
|
-
return { value: e, root: t, parent: r, type: n, props: a, children: i, line:
|
|
366
|
+
var Pe = 1, re = 1, it = 0, B = 0, C = 0, ae = "";
|
|
367
|
+
function Ee(e, t, r, n, a, i, s) {
|
|
368
|
+
return { value: e, root: t, parent: r, type: n, props: a, children: i, line: Pe, column: re, length: s, return: "" };
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
return
|
|
370
|
+
function le(e, t) {
|
|
371
|
+
return Rt(Ee("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
373
|
+
function Ot() {
|
|
374
|
+
return C;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
return
|
|
376
|
+
function It() {
|
|
377
|
+
return C = B > 0 ? $(ae, --B) : 0, re--, C === 10 && (re = 1, Pe--), C;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
379
|
+
function M() {
|
|
380
|
+
return C = B < it ? $(ae, B++) : 0, re++, C === 10 && (re = 1, Pe++), C;
|
|
381
381
|
}
|
|
382
382
|
function q() {
|
|
383
|
-
return
|
|
383
|
+
return $(ae, B);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
return
|
|
385
|
+
function ge() {
|
|
386
|
+
return B;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
return
|
|
388
|
+
function pe(e, t) {
|
|
389
|
+
return ue(ae, e, t);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function de(e) {
|
|
392
392
|
switch (e) {
|
|
393
393
|
// \0 \t \n \r \s whitespace token
|
|
394
394
|
case 0:
|
|
@@ -426,75 +426,75 @@ function le(e) {
|
|
|
426
426
|
}
|
|
427
427
|
return 0;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
return
|
|
429
|
+
function ot(e) {
|
|
430
|
+
return Pe = re = 1, it = W(ae = e), B = 0, [];
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
432
|
+
function st(e) {
|
|
433
|
+
return ae = "", e;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
435
|
+
function ve(e) {
|
|
436
|
+
return at(pe(B - 1, je(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
437
437
|
}
|
|
438
438
|
function $t(e) {
|
|
439
|
-
for (; (
|
|
440
|
-
|
|
441
|
-
return
|
|
439
|
+
for (; (C = q()) && C < 33; )
|
|
440
|
+
M();
|
|
441
|
+
return de(e) > 2 || de(C) > 3 ? "" : " ";
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
for (; --t &&
|
|
443
|
+
function jt(e, t) {
|
|
444
|
+
for (; --t && M() && !(C < 48 || C > 102 || C > 57 && C < 65 || C > 70 && C < 97); )
|
|
445
445
|
;
|
|
446
|
-
return
|
|
446
|
+
return pe(e, ge() + (t < 6 && q() == 32 && M() == 32));
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
for (;
|
|
450
|
-
switch (
|
|
448
|
+
function je(e) {
|
|
449
|
+
for (; M(); )
|
|
450
|
+
switch (C) {
|
|
451
451
|
// ] ) " '
|
|
452
452
|
case e:
|
|
453
|
-
return
|
|
453
|
+
return B;
|
|
454
454
|
// " '
|
|
455
455
|
case 34:
|
|
456
456
|
case 39:
|
|
457
|
-
e !== 34 && e !== 39 &&
|
|
457
|
+
e !== 34 && e !== 39 && je(C);
|
|
458
458
|
break;
|
|
459
459
|
// (
|
|
460
460
|
case 40:
|
|
461
|
-
e === 41 &&
|
|
461
|
+
e === 41 && je(e);
|
|
462
462
|
break;
|
|
463
463
|
// \
|
|
464
464
|
case 92:
|
|
465
|
-
|
|
465
|
+
M();
|
|
466
466
|
break;
|
|
467
467
|
}
|
|
468
|
-
return
|
|
468
|
+
return B;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
for (;
|
|
472
|
-
if (e +
|
|
470
|
+
function Lt(e, t) {
|
|
471
|
+
for (; M() && e + C !== 57; )
|
|
472
|
+
if (e + C === 84 && q() === 47)
|
|
473
473
|
break;
|
|
474
|
-
return "/*" +
|
|
474
|
+
return "/*" + pe(t, B - 1) + "*" + ke(e === 47 ? e : M());
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
for (; !
|
|
478
|
-
|
|
479
|
-
return
|
|
476
|
+
function Nt(e) {
|
|
477
|
+
for (; !de(q()); )
|
|
478
|
+
M();
|
|
479
|
+
return pe(e, B);
|
|
480
480
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
481
|
+
function Ft(e) {
|
|
482
|
+
return st(be("", null, null, null, [""], e = ot(e), 0, [0], e));
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
for (var
|
|
486
|
-
switch (x = b, b =
|
|
484
|
+
function be(e, t, r, n, a, i, s, c, d) {
|
|
485
|
+
for (var m = 0, l = 0, u = s, h = 0, w = 0, x = 0, p = 1, y = 1, v = 1, b = 0, _ = "", O = a, E = i, S = n, f = _; y; )
|
|
486
|
+
switch (x = b, b = M()) {
|
|
487
487
|
// (
|
|
488
488
|
case 40:
|
|
489
|
-
if (x != 108 &&
|
|
490
|
-
|
|
489
|
+
if (x != 108 && $(f, u - 1) == 58) {
|
|
490
|
+
$e(f += P(ve(b), "&", "&\f"), "&\f") != -1 && (v = -1);
|
|
491
491
|
break;
|
|
492
492
|
}
|
|
493
493
|
// " ' [
|
|
494
494
|
case 34:
|
|
495
495
|
case 39:
|
|
496
496
|
case 91:
|
|
497
|
-
f +=
|
|
497
|
+
f += ve(b);
|
|
498
498
|
break;
|
|
499
499
|
// \t \n \r \s
|
|
500
500
|
case 9:
|
|
@@ -505,14 +505,14 @@ function ge(e, t, r, n, a, i, c, s, d) {
|
|
|
505
505
|
break;
|
|
506
506
|
// \
|
|
507
507
|
case 92:
|
|
508
|
-
f +=
|
|
508
|
+
f += jt(ge() - 1, 7);
|
|
509
509
|
continue;
|
|
510
510
|
// /
|
|
511
511
|
case 47:
|
|
512
512
|
switch (q()) {
|
|
513
513
|
case 42:
|
|
514
514
|
case 47:
|
|
515
|
-
|
|
515
|
+
me(Vt(Lt(M(), ge()), t, r), d);
|
|
516
516
|
break;
|
|
517
517
|
default:
|
|
518
518
|
f += "/";
|
|
@@ -520,7 +520,7 @@ function ge(e, t, r, n, a, i, c, s, d) {
|
|
|
520
520
|
break;
|
|
521
521
|
// {
|
|
522
522
|
case 123 * p:
|
|
523
|
-
|
|
523
|
+
c[m++] = W(f) * v;
|
|
524
524
|
// } ; \0
|
|
525
525
|
case 125 * p:
|
|
526
526
|
case 59:
|
|
@@ -532,30 +532,30 @@ function ge(e, t, r, n, a, i, c, s, d) {
|
|
|
532
532
|
y = 0;
|
|
533
533
|
// ;
|
|
534
534
|
case 59 + l:
|
|
535
|
-
v == -1 && (f = P(f, /\f/g, "")), w > 0 && W(f) - u &&
|
|
535
|
+
v == -1 && (f = P(f, /\f/g, "")), w > 0 && W(f) - u && me(w > 32 ? qe(f + ";", n, r, u - 1) : qe(P(f, " ", "") + ";", n, r, u - 2), d);
|
|
536
536
|
break;
|
|
537
537
|
// @ ;
|
|
538
538
|
case 59:
|
|
539
539
|
f += ";";
|
|
540
540
|
// { rule/at-rule
|
|
541
541
|
default:
|
|
542
|
-
if (
|
|
542
|
+
if (me(S = Ye(f, t, r, m, l, a, c, _, O = [], E = [], u), i), b === 123)
|
|
543
543
|
if (l === 0)
|
|
544
|
-
|
|
544
|
+
be(f, t, S, S, O, i, u, c, E);
|
|
545
545
|
else
|
|
546
|
-
switch (
|
|
546
|
+
switch (h === 99 && $(f, 3) === 110 ? 100 : h) {
|
|
547
547
|
// d l m s
|
|
548
548
|
case 100:
|
|
549
549
|
case 108:
|
|
550
550
|
case 109:
|
|
551
551
|
case 115:
|
|
552
|
-
|
|
552
|
+
be(e, S, S, n && me(Ye(e, S, S, 0, 0, a, c, _, a, O = [], u), E), a, E, u, c, n ? O : E);
|
|
553
553
|
break;
|
|
554
554
|
default:
|
|
555
|
-
|
|
555
|
+
be(f, S, S, S, [""], E, 0, c, E);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
|
|
558
|
+
m = l = w = 0, p = v = 1, _ = f = "", u = s;
|
|
559
559
|
break;
|
|
560
560
|
// :
|
|
561
561
|
case 58:
|
|
@@ -564,21 +564,21 @@ function ge(e, t, r, n, a, i, c, s, d) {
|
|
|
564
564
|
if (p < 1) {
|
|
565
565
|
if (b == 123)
|
|
566
566
|
--p;
|
|
567
|
-
else if (b == 125 && p++ == 0 &&
|
|
567
|
+
else if (b == 125 && p++ == 0 && It() == 125)
|
|
568
568
|
continue;
|
|
569
569
|
}
|
|
570
|
-
switch (f +=
|
|
570
|
+
switch (f += ke(b), b * p) {
|
|
571
571
|
// &
|
|
572
572
|
case 38:
|
|
573
573
|
v = l > 0 ? 1 : (f += "\f", -1);
|
|
574
574
|
break;
|
|
575
575
|
// ,
|
|
576
576
|
case 44:
|
|
577
|
-
|
|
577
|
+
c[m++] = (W(f) - 1) * v, v = 1;
|
|
578
578
|
break;
|
|
579
579
|
// @
|
|
580
580
|
case 64:
|
|
581
|
-
q() === 45 && (f +=
|
|
581
|
+
q() === 45 && (f += ve(M())), h = q(), l = u = W(_ = f += Nt(ge())), b++;
|
|
582
582
|
break;
|
|
583
583
|
// -
|
|
584
584
|
case 45:
|
|
@@ -587,71 +587,71 @@ function ge(e, t, r, n, a, i, c, s, d) {
|
|
|
587
587
|
}
|
|
588
588
|
return i;
|
|
589
589
|
}
|
|
590
|
-
function Ye(e, t, r, n, a, i,
|
|
591
|
-
for (var u = a - 1,
|
|
592
|
-
for (var v = 0, b =
|
|
593
|
-
(_ =
|
|
594
|
-
return
|
|
590
|
+
function Ye(e, t, r, n, a, i, s, c, d, m, l) {
|
|
591
|
+
for (var u = a - 1, h = a === 0 ? i : [""], w = Ve(h), x = 0, p = 0, y = 0; x < n; ++x)
|
|
592
|
+
for (var v = 0, b = ue(e, u + 1, u = St(p = s[x])), _ = e; v < w; ++v)
|
|
593
|
+
(_ = at(p > 0 ? h[v] + " " + b : P(b, /&\f/g, h[v]))) && (d[y++] = _);
|
|
594
|
+
return Ee(e, t, r, a === 0 ? Ne : c, d, m, l);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
596
|
+
function Vt(e, t, r) {
|
|
597
|
+
return Ee(e, t, r, rt, ke(Ot()), ue(e, 2, -2), 0);
|
|
598
598
|
}
|
|
599
599
|
function qe(e, t, r, n) {
|
|
600
|
-
return
|
|
600
|
+
return Ee(e, t, r, Fe, ue(e, 0, n), ue(e, n + 1, -1), n);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
for (var r = "", n =
|
|
602
|
+
function te(e, t) {
|
|
603
|
+
for (var r = "", n = Ve(e), a = 0; a < n; a++)
|
|
604
604
|
r += t(e[a], a, e, t) || "";
|
|
605
605
|
return r;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function Bt(e, t, r, n) {
|
|
608
608
|
switch (e.type) {
|
|
609
|
-
case St:
|
|
610
|
-
if (e.children.length) break;
|
|
611
609
|
case _t:
|
|
612
|
-
|
|
610
|
+
if (e.children.length) break;
|
|
611
|
+
case Et:
|
|
612
|
+
case Fe:
|
|
613
613
|
return e.return = e.return || e.value;
|
|
614
|
-
case
|
|
614
|
+
case rt:
|
|
615
615
|
return "";
|
|
616
|
-
case
|
|
617
|
-
return e.return = e.value + "{" +
|
|
618
|
-
case
|
|
616
|
+
case nt:
|
|
617
|
+
return e.return = e.value + "{" + te(e.children, n) + "}";
|
|
618
|
+
case Ne:
|
|
619
619
|
e.value = e.props.join(",");
|
|
620
620
|
}
|
|
621
|
-
return W(r =
|
|
621
|
+
return W(r = te(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
var t =
|
|
623
|
+
function Mt(e) {
|
|
624
|
+
var t = Ve(e);
|
|
625
625
|
return function(r, n, a, i) {
|
|
626
|
-
for (var
|
|
627
|
-
|
|
628
|
-
return
|
|
626
|
+
for (var s = "", c = 0; c < t; c++)
|
|
627
|
+
s += e[c](r, n, a, i) || "";
|
|
628
|
+
return s;
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function zt(e) {
|
|
632
632
|
return function(t) {
|
|
633
633
|
t.root || (t = t.return) && e(t);
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function ct(e) {
|
|
637
637
|
var t = /* @__PURE__ */ Object.create(null);
|
|
638
638
|
return function(r) {
|
|
639
639
|
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
|
-
var
|
|
643
|
-
for (var a = 0, i = 0; a = i, i = q(), a === 38 && i === 12 && (r[n] = 1), !
|
|
644
|
-
|
|
645
|
-
return
|
|
646
|
-
},
|
|
642
|
+
var Dt = function(t, r, n) {
|
|
643
|
+
for (var a = 0, i = 0; a = i, i = q(), a === 38 && i === 12 && (r[n] = 1), !de(i); )
|
|
644
|
+
M();
|
|
645
|
+
return pe(t, B);
|
|
646
|
+
}, Ut = function(t, r) {
|
|
647
647
|
var n = -1, a = 44;
|
|
648
648
|
do
|
|
649
|
-
switch (
|
|
649
|
+
switch (de(a)) {
|
|
650
650
|
case 0:
|
|
651
|
-
a === 38 && q() === 12 && (r[n] = 1), t[n] +=
|
|
651
|
+
a === 38 && q() === 12 && (r[n] = 1), t[n] += Dt(B - 1, r, n);
|
|
652
652
|
break;
|
|
653
653
|
case 2:
|
|
654
|
-
t[n] +=
|
|
654
|
+
t[n] += ve(a);
|
|
655
655
|
break;
|
|
656
656
|
case 4:
|
|
657
657
|
if (a === 44) {
|
|
@@ -660,13 +660,13 @@ var Ut = function(t, r, n) {
|
|
|
660
660
|
}
|
|
661
661
|
// fallthrough
|
|
662
662
|
default:
|
|
663
|
-
t[n] +=
|
|
663
|
+
t[n] += ke(a);
|
|
664
664
|
}
|
|
665
|
-
while (a =
|
|
665
|
+
while (a = M());
|
|
666
666
|
return t;
|
|
667
|
-
},
|
|
668
|
-
return
|
|
669
|
-
}, He = /* @__PURE__ */ new WeakMap(),
|
|
667
|
+
}, Wt = function(t, r) {
|
|
668
|
+
return st(Ut(ot(t), r));
|
|
669
|
+
}, He = /* @__PURE__ */ new WeakMap(), Yt = function(t) {
|
|
670
670
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
671
671
|
// negative .length indicates that this rule has been already prefixed
|
|
672
672
|
t.length < 1)) {
|
|
@@ -674,12 +674,12 @@ var Ut = function(t, r, n) {
|
|
|
674
674
|
if (n = n.parent, !n) return;
|
|
675
675
|
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !He.get(n)) && !a) {
|
|
676
676
|
He.set(t, !0);
|
|
677
|
-
for (var i = [],
|
|
678
|
-
for (var l = 0; l <
|
|
679
|
-
t.props[
|
|
677
|
+
for (var i = [], s = Wt(r, i), c = n.props, d = 0, m = 0; d < s.length; d++)
|
|
678
|
+
for (var l = 0; l < c.length; l++, m++)
|
|
679
|
+
t.props[m] = i[d] ? s[d].replace(/&\f/g, c[l]) : c[l] + " " + s[d];
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
},
|
|
682
|
+
}, qt = function(t) {
|
|
683
683
|
if (t.type === "decl") {
|
|
684
684
|
var r = t.value;
|
|
685
685
|
// charcode for l
|
|
@@ -687,7 +687,7 @@ var Ut = function(t, r, n) {
|
|
|
687
687
|
r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
688
688
|
}
|
|
689
689
|
};
|
|
690
|
-
function
|
|
690
|
+
function lt(e, t) {
|
|
691
691
|
switch (At(e, t)) {
|
|
692
692
|
// color-adjust
|
|
693
693
|
case 5103:
|
|
@@ -728,7 +728,7 @@ function ut(e, t) {
|
|
|
728
728
|
case 4810:
|
|
729
729
|
case 6968:
|
|
730
730
|
case 2756:
|
|
731
|
-
return k + e +
|
|
731
|
+
return k + e + we + e + N + e + e;
|
|
732
732
|
// flex, flex-direction
|
|
733
733
|
case 6828:
|
|
734
734
|
case 4268:
|
|
@@ -786,35 +786,35 @@ function ut(e, t) {
|
|
|
786
786
|
case 5789:
|
|
787
787
|
case 5021:
|
|
788
788
|
case 4765:
|
|
789
|
-
if (W(e) - 1 - t > 6) switch (
|
|
789
|
+
if (W(e) - 1 - t > 6) switch ($(e, t + 1)) {
|
|
790
790
|
// (m)ax-content, (m)in-content
|
|
791
791
|
case 109:
|
|
792
|
-
if (
|
|
792
|
+
if ($(e, t + 4) !== 45) break;
|
|
793
793
|
// (f)ill-available, (f)it-content
|
|
794
794
|
case 102:
|
|
795
|
-
return P(e, /(.+:)(.+)-([^]+)/, "$1" + k + "$2-$3$1" +
|
|
795
|
+
return P(e, /(.+:)(.+)-([^]+)/, "$1" + k + "$2-$3$1" + we + ($(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
796
796
|
// (s)tretch
|
|
797
797
|
case 115:
|
|
798
|
-
return
|
|
798
|
+
return ~$e(e, "stretch") ? lt(P(e, "stretch", "fill-available"), t) + e : e;
|
|
799
799
|
}
|
|
800
800
|
break;
|
|
801
801
|
// position: sticky
|
|
802
802
|
case 4949:
|
|
803
|
-
if (
|
|
803
|
+
if ($(e, t + 1) !== 115) break;
|
|
804
804
|
// display: (flex|inline-flex)
|
|
805
805
|
case 6444:
|
|
806
|
-
switch (
|
|
806
|
+
switch ($(e, W(e) - 3 - (~$e(e, "!important") && 10))) {
|
|
807
807
|
// stic(k)y
|
|
808
808
|
case 107:
|
|
809
809
|
return P(e, ":", ":" + k) + e;
|
|
810
810
|
// (inline-)?fl(e)x
|
|
811
811
|
case 101:
|
|
812
|
-
return P(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + k + (
|
|
812
|
+
return P(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + k + ($(e, 14) === 45 ? "inline-" : "") + "box$3$1" + k + "$2$3$1" + N + "$2box$3") + e;
|
|
813
813
|
}
|
|
814
814
|
break;
|
|
815
815
|
// writing-mode
|
|
816
816
|
case 5936:
|
|
817
|
-
switch (
|
|
817
|
+
switch ($(e, t + 11)) {
|
|
818
818
|
// vertical-l(r)
|
|
819
819
|
case 114:
|
|
820
820
|
return k + e + N + P(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
@@ -829,38 +829,38 @@ function ut(e, t) {
|
|
|
829
829
|
}
|
|
830
830
|
return e;
|
|
831
831
|
}
|
|
832
|
-
var
|
|
832
|
+
var Ht = function(t, r, n, a) {
|
|
833
833
|
if (t.length > -1 && !t.return) switch (t.type) {
|
|
834
|
-
case
|
|
835
|
-
t.return =
|
|
834
|
+
case Fe:
|
|
835
|
+
t.return = lt(t.value, t.length);
|
|
836
836
|
break;
|
|
837
|
-
case
|
|
838
|
-
return
|
|
837
|
+
case nt:
|
|
838
|
+
return te([le(t, {
|
|
839
839
|
value: P(t.value, "@", "@" + k)
|
|
840
840
|
})], a);
|
|
841
|
-
case
|
|
842
|
-
if (t.length) return
|
|
843
|
-
switch (
|
|
841
|
+
case Ne:
|
|
842
|
+
if (t.length) return Ct(t.props, function(i) {
|
|
843
|
+
switch (Tt(i, /(::plac\w+|:read-\w+)/)) {
|
|
844
844
|
// :read-(only|write)
|
|
845
845
|
case ":read-only":
|
|
846
846
|
case ":read-write":
|
|
847
|
-
return
|
|
848
|
-
props: [P(i, /:(read-\w+)/, ":" +
|
|
847
|
+
return te([le(t, {
|
|
848
|
+
props: [P(i, /:(read-\w+)/, ":" + we + "$1")]
|
|
849
849
|
})], a);
|
|
850
850
|
// :placeholder
|
|
851
851
|
case "::placeholder":
|
|
852
|
-
return
|
|
852
|
+
return te([le(t, {
|
|
853
853
|
props: [P(i, /:(plac\w+)/, ":" + k + "input-$1")]
|
|
854
|
-
}),
|
|
855
|
-
props: [P(i, /:(plac\w+)/, ":" +
|
|
856
|
-
}),
|
|
854
|
+
}), le(t, {
|
|
855
|
+
props: [P(i, /:(plac\w+)/, ":" + we + "$1")]
|
|
856
|
+
}), le(t, {
|
|
857
857
|
props: [P(i, /:(plac\w+)/, N + "input-$1")]
|
|
858
858
|
})], a);
|
|
859
859
|
}
|
|
860
860
|
return "";
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
|
-
},
|
|
863
|
+
}, Gt = [Ht], Xt = function(t) {
|
|
864
864
|
var r = t.key;
|
|
865
865
|
if (r === "css") {
|
|
866
866
|
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
@@ -869,23 +869,23 @@ var Gt = function(t, r, n, a) {
|
|
|
869
869
|
y.indexOf(" ") !== -1 && (document.head.appendChild(p), p.setAttribute("data-s", ""));
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
|
-
var a = t.stylisPlugins ||
|
|
873
|
-
|
|
872
|
+
var a = t.stylisPlugins || Gt, i = {}, s, c = [];
|
|
873
|
+
s = t.container || document.head, Array.prototype.forEach.call(
|
|
874
874
|
// this means we will ignore elements which don't have a space in them which
|
|
875
875
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
876
876
|
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
877
877
|
function(p) {
|
|
878
878
|
for (var y = p.getAttribute("data-emotion").split(" "), v = 1; v < y.length; v++)
|
|
879
879
|
i[y[v]] = !0;
|
|
880
|
-
|
|
880
|
+
c.push(p);
|
|
881
881
|
}
|
|
882
882
|
);
|
|
883
|
-
var d,
|
|
883
|
+
var d, m = [Yt, qt];
|
|
884
884
|
{
|
|
885
|
-
var l, u = [
|
|
885
|
+
var l, u = [Bt, zt(function(p) {
|
|
886
886
|
l.insert(p);
|
|
887
|
-
})],
|
|
888
|
-
return
|
|
887
|
+
})], h = Mt(m.concat(a, u)), w = function(y) {
|
|
888
|
+
return te(Ft(y), h);
|
|
889
889
|
};
|
|
890
890
|
d = function(y, v, b, _) {
|
|
891
891
|
l = b, w(y ? y + "{" + v.styles + "}" : v.styles), _ && (x.inserted[v.name] = !0);
|
|
@@ -893,9 +893,9 @@ var Gt = function(t, r, n, a) {
|
|
|
893
893
|
}
|
|
894
894
|
var x = {
|
|
895
895
|
key: r,
|
|
896
|
-
sheet: new
|
|
896
|
+
sheet: new Pt({
|
|
897
897
|
key: r,
|
|
898
|
-
container:
|
|
898
|
+
container: s,
|
|
899
899
|
nonce: t.nonce,
|
|
900
900
|
speedy: t.speedy,
|
|
901
901
|
prepend: t.prepend,
|
|
@@ -906,15 +906,15 @@ var Gt = function(t, r, n, a) {
|
|
|
906
906
|
registered: {},
|
|
907
907
|
insert: d
|
|
908
908
|
};
|
|
909
|
-
return x.sheet.hydrate(
|
|
910
|
-
},
|
|
911
|
-
function
|
|
909
|
+
return x.sheet.hydrate(c), x;
|
|
910
|
+
}, Kt = !0;
|
|
911
|
+
function Jt(e, t, r) {
|
|
912
912
|
var n = "";
|
|
913
913
|
return r.split(" ").forEach(function(a) {
|
|
914
914
|
e[a] !== void 0 ? t.push(e[a] + ";") : a && (n += a + " ");
|
|
915
915
|
}), n;
|
|
916
916
|
}
|
|
917
|
-
var
|
|
917
|
+
var ut = function(t, r, n) {
|
|
918
918
|
var a = t.key + "-" + r.name;
|
|
919
919
|
// we only need to add the styles to the registered cache if the
|
|
920
920
|
// class name could be used further down
|
|
@@ -925,9 +925,9 @@ var dt = function(t, r, n) {
|
|
|
925
925
|
// in node since emotion-server relies on whether a style is in
|
|
926
926
|
// the registered cache to know whether a style is global or not
|
|
927
927
|
// also, note that this check will be dead code eliminated in the browser
|
|
928
|
-
|
|
929
|
-
},
|
|
930
|
-
|
|
928
|
+
Kt === !1) && t.registered[a] === void 0 && (t.registered[a] = r.styles);
|
|
929
|
+
}, Zt = function(t, r, n) {
|
|
930
|
+
ut(t, r, n);
|
|
931
931
|
var a = t.key + "-" + r.name;
|
|
932
932
|
if (t.inserted[r.name] === void 0) {
|
|
933
933
|
var i = r;
|
|
@@ -936,7 +936,7 @@ var dt = function(t, r, n) {
|
|
|
936
936
|
while (i !== void 0);
|
|
937
937
|
}
|
|
938
938
|
};
|
|
939
|
-
function
|
|
939
|
+
function Qt(e) {
|
|
940
940
|
for (var t = 0, r, n = 0, a = e.length; a >= 4; ++n, a -= 4)
|
|
941
941
|
r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
|
|
942
942
|
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
|
|
@@ -955,7 +955,7 @@ function er(e) {
|
|
|
955
955
|
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
956
956
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
957
957
|
}
|
|
958
|
-
var
|
|
958
|
+
var er = {
|
|
959
959
|
animationIterationCount: 1,
|
|
960
960
|
aspectRatio: 1,
|
|
961
961
|
borderImageOutset: 1,
|
|
@@ -1004,18 +1004,18 @@ var tr = {
|
|
|
1004
1004
|
strokeMiterlimit: 1,
|
|
1005
1005
|
strokeOpacity: 1,
|
|
1006
1006
|
strokeWidth: 1
|
|
1007
|
-
},
|
|
1007
|
+
}, tr = /[A-Z]|^ms/g, rr = /_EMO_([^_]+?)_([^]*?)_EMO_/g, dt = function(t) {
|
|
1008
1008
|
return t.charCodeAt(1) === 45;
|
|
1009
1009
|
}, Ge = function(t) {
|
|
1010
1010
|
return t != null && typeof t != "boolean";
|
|
1011
|
-
},
|
|
1012
|
-
return
|
|
1011
|
+
}, Ae = /* @__PURE__ */ ct(function(e) {
|
|
1012
|
+
return dt(e) ? e : e.replace(tr, "-$&").toLowerCase();
|
|
1013
1013
|
}), Xe = function(t, r) {
|
|
1014
1014
|
switch (t) {
|
|
1015
1015
|
case "animation":
|
|
1016
1016
|
case "animationName":
|
|
1017
1017
|
if (typeof r == "string")
|
|
1018
|
-
return r.replace(
|
|
1018
|
+
return r.replace(rr, function(n, a, i) {
|
|
1019
1019
|
return Y = {
|
|
1020
1020
|
name: a,
|
|
1021
1021
|
styles: i,
|
|
@@ -1023,9 +1023,9 @@ var tr = {
|
|
|
1023
1023
|
}, a;
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
|
-
return
|
|
1026
|
+
return er[t] !== 1 && !dt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
1027
1027
|
};
|
|
1028
|
-
function
|
|
1028
|
+
function fe(e, t, r) {
|
|
1029
1029
|
if (r == null)
|
|
1030
1030
|
return "";
|
|
1031
1031
|
var n = r;
|
|
@@ -1044,23 +1044,23 @@ function ue(e, t, r) {
|
|
|
1044
1044
|
}, a.name;
|
|
1045
1045
|
var i = r;
|
|
1046
1046
|
if (i.styles !== void 0) {
|
|
1047
|
-
var
|
|
1048
|
-
if (
|
|
1049
|
-
for (;
|
|
1047
|
+
var s = i.next;
|
|
1048
|
+
if (s !== void 0)
|
|
1049
|
+
for (; s !== void 0; )
|
|
1050
1050
|
Y = {
|
|
1051
|
-
name:
|
|
1052
|
-
styles:
|
|
1051
|
+
name: s.name,
|
|
1052
|
+
styles: s.styles,
|
|
1053
1053
|
next: Y
|
|
1054
|
-
},
|
|
1055
|
-
var
|
|
1056
|
-
return
|
|
1054
|
+
}, s = s.next;
|
|
1055
|
+
var c = i.styles + ";";
|
|
1056
|
+
return c;
|
|
1057
1057
|
}
|
|
1058
|
-
return
|
|
1058
|
+
return nr(e, t, r);
|
|
1059
1059
|
}
|
|
1060
1060
|
case "function": {
|
|
1061
1061
|
if (e !== void 0) {
|
|
1062
|
-
var d = Y,
|
|
1063
|
-
return Y = d,
|
|
1062
|
+
var d = Y, m = r(e);
|
|
1063
|
+
return Y = d, fe(e, t, m);
|
|
1064
1064
|
}
|
|
1065
1065
|
break;
|
|
1066
1066
|
}
|
|
@@ -1071,154 +1071,154 @@ function ue(e, t, r) {
|
|
|
1071
1071
|
var u = t[l];
|
|
1072
1072
|
return u !== void 0 ? u : l;
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function nr(e, t, r) {
|
|
1075
1075
|
var n = "";
|
|
1076
1076
|
if (Array.isArray(r))
|
|
1077
1077
|
for (var a = 0; a < r.length; a++)
|
|
1078
|
-
n +=
|
|
1078
|
+
n += fe(e, t, r[a]) + ";";
|
|
1079
1079
|
else
|
|
1080
1080
|
for (var i in r) {
|
|
1081
|
-
var
|
|
1082
|
-
if (typeof
|
|
1083
|
-
var
|
|
1084
|
-
t != null && t[
|
|
1085
|
-
} else if (Array.isArray(
|
|
1086
|
-
for (var d = 0; d <
|
|
1087
|
-
Ge(
|
|
1081
|
+
var s = r[i];
|
|
1082
|
+
if (typeof s != "object") {
|
|
1083
|
+
var c = s;
|
|
1084
|
+
t != null && t[c] !== void 0 ? n += i + "{" + t[c] + "}" : Ge(c) && (n += Ae(i) + ":" + Xe(i, c) + ";");
|
|
1085
|
+
} else if (Array.isArray(s) && typeof s[0] == "string" && (t == null || t[s[0]] === void 0))
|
|
1086
|
+
for (var d = 0; d < s.length; d++)
|
|
1087
|
+
Ge(s[d]) && (n += Ae(i) + ":" + Xe(i, s[d]) + ";");
|
|
1088
1088
|
else {
|
|
1089
|
-
var
|
|
1089
|
+
var m = fe(e, t, s);
|
|
1090
1090
|
switch (i) {
|
|
1091
1091
|
case "animation":
|
|
1092
1092
|
case "animationName": {
|
|
1093
|
-
n +=
|
|
1093
|
+
n += Ae(i) + ":" + m + ";";
|
|
1094
1094
|
break;
|
|
1095
1095
|
}
|
|
1096
1096
|
default:
|
|
1097
|
-
n += i + "{" +
|
|
1097
|
+
n += i + "{" + m + "}";
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
1101
|
return n;
|
|
1102
1102
|
}
|
|
1103
1103
|
var Ke = /label:\s*([^\s;{]+)\s*(;|$)/g, Y;
|
|
1104
|
-
function
|
|
1104
|
+
function ar(e, t, r) {
|
|
1105
1105
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
1106
1106
|
return e[0];
|
|
1107
1107
|
var n = !0, a = "";
|
|
1108
1108
|
Y = void 0;
|
|
1109
1109
|
var i = e[0];
|
|
1110
1110
|
if (i == null || i.raw === void 0)
|
|
1111
|
-
n = !1, a +=
|
|
1111
|
+
n = !1, a += fe(r, t, i);
|
|
1112
1112
|
else {
|
|
1113
|
-
var
|
|
1114
|
-
a +=
|
|
1113
|
+
var s = i;
|
|
1114
|
+
a += s[0];
|
|
1115
1115
|
}
|
|
1116
|
-
for (var
|
|
1117
|
-
if (a +=
|
|
1116
|
+
for (var c = 1; c < e.length; c++)
|
|
1117
|
+
if (a += fe(r, t, e[c]), n) {
|
|
1118
1118
|
var d = i;
|
|
1119
|
-
a += d[
|
|
1119
|
+
a += d[c];
|
|
1120
1120
|
}
|
|
1121
1121
|
Ke.lastIndex = 0;
|
|
1122
|
-
for (var
|
|
1123
|
-
|
|
1124
|
-
var u =
|
|
1122
|
+
for (var m = "", l; (l = Ke.exec(a)) !== null; )
|
|
1123
|
+
m += "-" + l[1];
|
|
1124
|
+
var u = Qt(a) + m;
|
|
1125
1125
|
return {
|
|
1126
1126
|
name: u,
|
|
1127
1127
|
styles: a,
|
|
1128
1128
|
next: Y
|
|
1129
1129
|
};
|
|
1130
1130
|
}
|
|
1131
|
-
var
|
|
1131
|
+
var ir = function(t) {
|
|
1132
1132
|
return t();
|
|
1133
|
-
},
|
|
1133
|
+
}, or = H.useInsertionEffect ? H.useInsertionEffect : !1, sr = or || ir, ft = /* @__PURE__ */ H.createContext(
|
|
1134
1134
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1135
1135
|
// because this module is primarily intended for the browser and node
|
|
1136
1136
|
// but it's also required in react native and similar environments sometimes
|
|
1137
1137
|
// and we could have a special build just for that
|
|
1138
1138
|
// but this is much easier and the native packages
|
|
1139
1139
|
// might use a different theme context in the future anyway
|
|
1140
|
-
typeof HTMLElement < "u" ? /* @__PURE__ */
|
|
1140
|
+
typeof HTMLElement < "u" ? /* @__PURE__ */ Xt({
|
|
1141
1141
|
key: "css"
|
|
1142
1142
|
}) : null
|
|
1143
1143
|
);
|
|
1144
|
-
|
|
1145
|
-
var
|
|
1146
|
-
return /* @__PURE__ */
|
|
1147
|
-
var a =
|
|
1144
|
+
ft.Provider;
|
|
1145
|
+
var cr = function(t) {
|
|
1146
|
+
return /* @__PURE__ */ yt(function(r, n) {
|
|
1147
|
+
var a = et(ft);
|
|
1148
1148
|
return t(r, a, n);
|
|
1149
1149
|
});
|
|
1150
|
-
},
|
|
1150
|
+
}, lr = /* @__PURE__ */ H.createContext({}), ur = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, dr = /* @__PURE__ */ ct(
|
|
1151
1151
|
function(e) {
|
|
1152
|
-
return
|
|
1152
|
+
return ur.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
1153
1153
|
}
|
|
1154
1154
|
/* Z+1 */
|
|
1155
|
-
),
|
|
1155
|
+
), fr = dr, pr = function(t) {
|
|
1156
1156
|
return t !== "theme";
|
|
1157
1157
|
}, Je = function(t) {
|
|
1158
1158
|
return typeof t == "string" && // 96 is one less than the char code
|
|
1159
1159
|
// for "a" so this is checking that
|
|
1160
1160
|
// it's a lowercase character
|
|
1161
|
-
t.charCodeAt(0) > 96 ?
|
|
1161
|
+
t.charCodeAt(0) > 96 ? fr : pr;
|
|
1162
1162
|
}, Ze = function(t, r, n) {
|
|
1163
1163
|
var a;
|
|
1164
1164
|
if (r) {
|
|
1165
1165
|
var i = r.shouldForwardProp;
|
|
1166
|
-
a = t.__emotion_forwardProp && i ? function(
|
|
1167
|
-
return t.__emotion_forwardProp(
|
|
1166
|
+
a = t.__emotion_forwardProp && i ? function(s) {
|
|
1167
|
+
return t.__emotion_forwardProp(s) && i(s);
|
|
1168
1168
|
} : i;
|
|
1169
1169
|
}
|
|
1170
1170
|
return typeof a != "function" && n && (a = t.__emotion_forwardProp), a;
|
|
1171
|
-
},
|
|
1171
|
+
}, hr = function(t) {
|
|
1172
1172
|
var r = t.cache, n = t.serialized, a = t.isStringTag;
|
|
1173
|
-
return
|
|
1174
|
-
return
|
|
1173
|
+
return ut(r, n, a), sr(function() {
|
|
1174
|
+
return Zt(r, n, a);
|
|
1175
1175
|
}), null;
|
|
1176
|
-
},
|
|
1177
|
-
var n = t.__emotion_real === t, a = n && t.__emotion_base || t, i,
|
|
1178
|
-
r !== void 0 && (i = r.label,
|
|
1179
|
-
var
|
|
1176
|
+
}, mr = function e(t, r) {
|
|
1177
|
+
var n = t.__emotion_real === t, a = n && t.__emotion_base || t, i, s;
|
|
1178
|
+
r !== void 0 && (i = r.label, s = r.target);
|
|
1179
|
+
var c = Ze(t, r, n), d = c || Je(a), m = !d("as");
|
|
1180
1180
|
return function() {
|
|
1181
1181
|
var l = arguments, u = n && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
|
|
1182
1182
|
if (i !== void 0 && u.push("label:" + i + ";"), l[0] == null || l[0].raw === void 0)
|
|
1183
1183
|
u.push.apply(u, l);
|
|
1184
1184
|
else {
|
|
1185
|
-
var
|
|
1186
|
-
u.push(
|
|
1185
|
+
var h = l[0];
|
|
1186
|
+
u.push(h[0]);
|
|
1187
1187
|
for (var w = l.length, x = 1; x < w; x++)
|
|
1188
|
-
u.push(l[x],
|
|
1188
|
+
u.push(l[x], h[x]);
|
|
1189
1189
|
}
|
|
1190
|
-
var p =
|
|
1191
|
-
var _ =
|
|
1190
|
+
var p = cr(function(y, v, b) {
|
|
1191
|
+
var _ = m && y.as || a, O = "", E = [], S = y;
|
|
1192
1192
|
if (y.theme == null) {
|
|
1193
1193
|
S = {};
|
|
1194
1194
|
for (var f in y)
|
|
1195
1195
|
S[f] = y[f];
|
|
1196
|
-
S.theme =
|
|
1196
|
+
S.theme = H.useContext(lr);
|
|
1197
1197
|
}
|
|
1198
|
-
typeof y.className == "string" ?
|
|
1199
|
-
var
|
|
1200
|
-
|
|
1201
|
-
var
|
|
1202
|
-
for (var
|
|
1203
|
-
|
|
1204
|
-
return
|
|
1198
|
+
typeof y.className == "string" ? O = Jt(v.registered, E, y.className) : y.className != null && (O = y.className + " ");
|
|
1199
|
+
var T = ar(u.concat(E), v.registered, S);
|
|
1200
|
+
O += v.key + "-" + T.name, s !== void 0 && (O += " " + s);
|
|
1201
|
+
var F = m && c === void 0 ? Je(_) : d, A = {};
|
|
1202
|
+
for (var V in y)
|
|
1203
|
+
m && V === "as" || F(V) && (A[V] = y[V]);
|
|
1204
|
+
return A.className = O, b && (A.ref = b), /* @__PURE__ */ H.createElement(H.Fragment, null, /* @__PURE__ */ H.createElement(hr, {
|
|
1205
1205
|
cache: v,
|
|
1206
|
-
serialized:
|
|
1206
|
+
serialized: T,
|
|
1207
1207
|
isStringTag: typeof _ == "string"
|
|
1208
|
-
}), /* @__PURE__ */
|
|
1208
|
+
}), /* @__PURE__ */ H.createElement(_, A));
|
|
1209
1209
|
});
|
|
1210
|
-
return p.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", p.defaultProps = t.defaultProps, p.__emotion_real = p, p.__emotion_base = a, p.__emotion_styles = u, p.__emotion_forwardProp =
|
|
1210
|
+
return p.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", p.defaultProps = t.defaultProps, p.__emotion_real = p, p.__emotion_base = a, p.__emotion_styles = u, p.__emotion_forwardProp = c, Object.defineProperty(p, "toString", {
|
|
1211
1211
|
value: function() {
|
|
1212
|
-
return "." +
|
|
1212
|
+
return "." + s;
|
|
1213
1213
|
}
|
|
1214
1214
|
}), p.withComponent = function(y, v) {
|
|
1215
|
-
var b = e(y,
|
|
1215
|
+
var b = e(y, Ie({}, r, v, {
|
|
1216
1216
|
shouldForwardProp: Ze(p, v, !0)
|
|
1217
1217
|
}));
|
|
1218
1218
|
return b.apply(void 0, u);
|
|
1219
1219
|
}, p;
|
|
1220
1220
|
};
|
|
1221
|
-
},
|
|
1221
|
+
}, yr = [
|
|
1222
1222
|
"a",
|
|
1223
1223
|
"abbr",
|
|
1224
1224
|
"address",
|
|
@@ -1354,11 +1354,11 @@ var lr = function(t) {
|
|
|
1354
1354
|
"svg",
|
|
1355
1355
|
"text",
|
|
1356
1356
|
"tspan"
|
|
1357
|
-
],
|
|
1358
|
-
|
|
1359
|
-
|
|
1357
|
+
], ne = mr.bind(null);
|
|
1358
|
+
yr.forEach(function(e) {
|
|
1359
|
+
ne[e] = ne(e);
|
|
1360
1360
|
});
|
|
1361
|
-
const
|
|
1361
|
+
const gr = ne.div`
|
|
1362
1362
|
display: flex;
|
|
1363
1363
|
align-items: center;
|
|
1364
1364
|
justify-content: center;
|
|
@@ -1399,7 +1399,7 @@ const vr = te.div`
|
|
|
1399
1399
|
return "";
|
|
1400
1400
|
}
|
|
1401
1401
|
}}
|
|
1402
|
-
`,
|
|
1402
|
+
`, Le = ({ type: e, children: t, className: r, icon: n, action: a }) => I.jsxs(gr, { type: e, className: r, children: [n && I.jsx("span", { children: n }), I.jsx("span", { children: t }), a && I.jsx("span", { children: a })] }), Qe = ne.div`
|
|
1403
1403
|
width: ${({ width: e }) => e || "100%"};
|
|
1404
1404
|
height: ${({ height: e }) => e || "100%"};
|
|
1405
1405
|
border-radius: 8px;
|
|
@@ -1409,7 +1409,7 @@ const vr = te.div`
|
|
|
1409
1409
|
|
|
1410
1410
|
/* Hide specific elements inside the player */
|
|
1411
1411
|
${({ $hiddenClasses: e }) => (e == null ? void 0 : e.length) && e.map((t) => `.${t} { display: none !important; }`).join("")}
|
|
1412
|
-
`,
|
|
1412
|
+
`, vr = ne.div`
|
|
1413
1413
|
position: fixed;
|
|
1414
1414
|
top: 0;
|
|
1415
1415
|
left: 0;
|
|
@@ -1421,7 +1421,7 @@ const vr = te.div`
|
|
|
1421
1421
|
align-items: center;
|
|
1422
1422
|
z-index: 1000;
|
|
1423
1423
|
pointer-events: auto;
|
|
1424
|
-
`,
|
|
1424
|
+
`, br = ne.div`
|
|
1425
1425
|
position: relative;
|
|
1426
1426
|
width: 100%; /* Default for mobile */
|
|
1427
1427
|
max-width: 100%;
|
|
@@ -1433,98 +1433,98 @@ const vr = te.div`
|
|
|
1433
1433
|
@media (min-width: 768px) {
|
|
1434
1434
|
width: min(70vw, 960px); /* Responsive width for desktop, capped at 960px */
|
|
1435
1435
|
}
|
|
1436
|
-
`,
|
|
1436
|
+
`, xr = (e, t) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`, wr = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`, kr = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, Be = (e, t) => `vp-player-${e || "default"}-${t || ""}`, Te = /* @__PURE__ */ new Map(), Pr = (e, t) => {
|
|
1437
1437
|
const [r, n] = D(!1), [a, i] = D(null);
|
|
1438
|
-
return
|
|
1439
|
-
let
|
|
1440
|
-
const
|
|
1438
|
+
return xe(() => {
|
|
1439
|
+
let s = null, c, d = 0;
|
|
1440
|
+
const m = 3;
|
|
1441
1441
|
let l;
|
|
1442
1442
|
try {
|
|
1443
|
-
l = t ||
|
|
1443
|
+
l = t || kr(e || "latest");
|
|
1444
1444
|
} catch (w) {
|
|
1445
1445
|
const x = w instanceof Error ? w.message : String(w);
|
|
1446
1446
|
i(`Failed to resolve script URL: ${x}`), n(!1);
|
|
1447
1447
|
return;
|
|
1448
1448
|
}
|
|
1449
|
-
if (
|
|
1449
|
+
if (Te.get(l)) {
|
|
1450
1450
|
n(!0), i(null);
|
|
1451
1451
|
return;
|
|
1452
1452
|
}
|
|
1453
1453
|
if (document.querySelector(`script[src="${l}"]`)) {
|
|
1454
|
-
|
|
1454
|
+
Te.set(l, !0), n(!0), i(null);
|
|
1455
1455
|
return;
|
|
1456
1456
|
}
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1457
|
+
const h = () => {
|
|
1458
|
+
s = document.createElement("script"), s.src = l, s.async = !0, c = window.setTimeout(() => {
|
|
1459
1459
|
n(!1), i(`Loading script timed out: ${l}`);
|
|
1460
|
-
}, 1e4),
|
|
1461
|
-
clearTimeout(
|
|
1462
|
-
},
|
|
1463
|
-
clearTimeout(
|
|
1464
|
-
}, document.body.appendChild(
|
|
1460
|
+
}, 1e4), s.onload = () => {
|
|
1461
|
+
clearTimeout(c), Te.set(l, !0), n(!0), i(null);
|
|
1462
|
+
}, s.onerror = () => {
|
|
1463
|
+
clearTimeout(c), d++, d < m ? setTimeout(h, 1e3 * d) : (n(!1), i(`Failed to load VP Player script after ${m} attempts: ${l}`));
|
|
1464
|
+
}, document.body.appendChild(s);
|
|
1465
1465
|
};
|
|
1466
|
-
return
|
|
1467
|
-
clearTimeout(
|
|
1466
|
+
return h(), () => {
|
|
1467
|
+
clearTimeout(c), s && document.body.contains(s) && document.body.removeChild(s);
|
|
1468
1468
|
};
|
|
1469
1469
|
}, [e, t]), { isLoaded: r, error: a };
|
|
1470
|
-
},
|
|
1471
|
-
const [i,
|
|
1472
|
-
return
|
|
1470
|
+
}, Er = {}, ye = /* @__PURE__ */ new Map(), _r = 15e3, Ce = 5, Sr = ({ projectId: e, videoId: t, playlistId: r, videoUrl: n, apiKey: a }) => {
|
|
1471
|
+
const [i, s] = D(null), [c, d] = D(null), [m, l] = D(!1), [u, h] = D(null), w = a || (typeof Er < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
|
|
1472
|
+
return xe(() => {
|
|
1473
1473
|
const x = t ? `video:${t}` : r ? `playlist:${r}` : null;
|
|
1474
1474
|
if (!e || n || !t && !r) {
|
|
1475
|
-
|
|
1475
|
+
s(n || null), d(null), l(!1), h(null);
|
|
1476
1476
|
return;
|
|
1477
1477
|
}
|
|
1478
1478
|
if (!w) {
|
|
1479
|
-
l(!1),
|
|
1479
|
+
l(!1), h("No API key provided");
|
|
1480
1480
|
return;
|
|
1481
1481
|
}
|
|
1482
|
-
if (x &&
|
|
1483
|
-
const b =
|
|
1484
|
-
|
|
1482
|
+
if (x && ye.has(x)) {
|
|
1483
|
+
const b = ye.get(x);
|
|
1484
|
+
s(b.url), d(b.playlist), l(!1), h(null);
|
|
1485
1485
|
return;
|
|
1486
1486
|
}
|
|
1487
1487
|
const p = new AbortController(), y = p.signal;
|
|
1488
1488
|
return (async () => {
|
|
1489
|
-
var _,
|
|
1490
|
-
l(!0),
|
|
1489
|
+
var _, O;
|
|
1490
|
+
l(!0), h(null);
|
|
1491
1491
|
let b = 0;
|
|
1492
|
-
for (; b <
|
|
1492
|
+
for (; b < Ce; )
|
|
1493
1493
|
try {
|
|
1494
|
-
const E = t && !r ?
|
|
1494
|
+
const E = t && !r ? xr(e, t) : wr(e, r), S = setTimeout(() => p.abort(), _r), f = await fetch(E, {
|
|
1495
1495
|
method: "GET",
|
|
1496
1496
|
headers: { "api-key": w, Accept: "application/json" },
|
|
1497
1497
|
signal: y
|
|
1498
1498
|
});
|
|
1499
1499
|
if (clearTimeout(S), !f.ok)
|
|
1500
1500
|
throw new Error(`Fetch failed with status ${f.status}`);
|
|
1501
|
-
const
|
|
1501
|
+
const T = await f.json();
|
|
1502
1502
|
if (t && !r) {
|
|
1503
|
-
const
|
|
1504
|
-
if (!(
|
|
1503
|
+
const F = (O = (_ = T.result) == null ? void 0 : _.items) == null ? void 0 : O.find((A) => A.mediaId === t);
|
|
1504
|
+
if (!(F != null && F.playbackUrl))
|
|
1505
1505
|
throw new Error("Invalid video data");
|
|
1506
|
-
|
|
1506
|
+
s(F.playbackUrl), d(null), x && ye.set(x, { url: F.playbackUrl, playlist: null });
|
|
1507
1507
|
} else {
|
|
1508
|
-
if (!Array.isArray(
|
|
1508
|
+
if (!Array.isArray(T.result))
|
|
1509
1509
|
throw new Error("Invalid playlist format");
|
|
1510
|
-
d(
|
|
1510
|
+
d(T.result), s(null), x && ye.set(x, { url: null, playlist: T.result });
|
|
1511
1511
|
}
|
|
1512
1512
|
break;
|
|
1513
1513
|
} catch (E) {
|
|
1514
1514
|
if (y.aborted) {
|
|
1515
|
-
|
|
1515
|
+
h("Request timed out");
|
|
1516
1516
|
break;
|
|
1517
1517
|
}
|
|
1518
|
-
if (b++, b >=
|
|
1518
|
+
if (b++, b >= Ce) {
|
|
1519
1519
|
const S = E instanceof Error ? E.message : String(E);
|
|
1520
|
-
|
|
1520
|
+
h(`Failed after ${Ce} attempts: ${S}`);
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
1523
|
l(!1);
|
|
1524
1524
|
})(), () => {
|
|
1525
1525
|
p.abort();
|
|
1526
1526
|
};
|
|
1527
|
-
}, [w, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist:
|
|
1527
|
+
}, [w, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist: c, isLoading: m, error: u };
|
|
1528
1528
|
}, Rr = {
|
|
1529
1529
|
projectId: "vp-player-projectId",
|
|
1530
1530
|
video: {
|
|
@@ -1577,9 +1577,9 @@ const vr = te.div`
|
|
|
1577
1577
|
// Enabled by default
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
|
-
},
|
|
1581
|
-
var
|
|
1582
|
-
const i = { ...Rr, ...a },
|
|
1580
|
+
}, Ar = ({ videoUrl: e, fetchedPlaybackUrl: t, fetchedPlaylist: r, projectId: n, config: a = {} }) => {
|
|
1581
|
+
var m, l, u;
|
|
1582
|
+
const i = { ...Rr, ...a }, s = { ...i.config, ...a.config };
|
|
1583
1583
|
if (e)
|
|
1584
1584
|
return {
|
|
1585
1585
|
...i,
|
|
@@ -1588,7 +1588,7 @@ const vr = te.div`
|
|
|
1588
1588
|
file: e,
|
|
1589
1589
|
playlist: void 0
|
|
1590
1590
|
},
|
|
1591
|
-
config:
|
|
1591
|
+
config: s
|
|
1592
1592
|
};
|
|
1593
1593
|
if (t)
|
|
1594
1594
|
return {
|
|
@@ -1598,7 +1598,7 @@ const vr = te.div`
|
|
|
1598
1598
|
file: t,
|
|
1599
1599
|
playlist: void 0
|
|
1600
1600
|
},
|
|
1601
|
-
config:
|
|
1601
|
+
config: s
|
|
1602
1602
|
};
|
|
1603
1603
|
if (r && r.length > 0)
|
|
1604
1604
|
return {
|
|
@@ -1606,22 +1606,22 @@ const vr = te.div`
|
|
|
1606
1606
|
projectId: n || "vp-player-projectId",
|
|
1607
1607
|
video: {
|
|
1608
1608
|
...i.video,
|
|
1609
|
-
file: ((
|
|
1609
|
+
file: ((m = r[0]) == null ? void 0 : m.hlsUrl) || "",
|
|
1610
1610
|
playlist: {
|
|
1611
1611
|
state: !0,
|
|
1612
1612
|
playlistVideoIndex: 0,
|
|
1613
|
-
videos: r.map((
|
|
1613
|
+
videos: r.map((h, w) => ({
|
|
1614
1614
|
videoId: String(w),
|
|
1615
|
-
title:
|
|
1616
|
-
file:
|
|
1617
|
-
thumbnailUrl:
|
|
1618
|
-
duration:
|
|
1615
|
+
title: h.title,
|
|
1616
|
+
file: h.hlsUrl,
|
|
1617
|
+
thumbnailUrl: h.thumbnailUrl,
|
|
1618
|
+
duration: h.duration
|
|
1619
1619
|
}))
|
|
1620
1620
|
}
|
|
1621
1621
|
},
|
|
1622
|
-
config:
|
|
1622
|
+
config: s
|
|
1623
1623
|
};
|
|
1624
|
-
const
|
|
1624
|
+
const c = ((l = a == null ? void 0 : a.video) == null ? void 0 : l.playlist) || i.video.playlist, d = (u = a == null ? void 0 : a.video) == null ? void 0 : u.file;
|
|
1625
1625
|
if (d)
|
|
1626
1626
|
return {
|
|
1627
1627
|
...i,
|
|
@@ -1631,20 +1631,20 @@ const vr = te.div`
|
|
|
1631
1631
|
playlist: void 0
|
|
1632
1632
|
// No playlist, just one video
|
|
1633
1633
|
},
|
|
1634
|
-
config:
|
|
1634
|
+
config: s
|
|
1635
1635
|
};
|
|
1636
|
-
if (
|
|
1637
|
-
const
|
|
1636
|
+
if (c != null && c.videos && c.videos.length > 0) {
|
|
1637
|
+
const h = c.videos[c.playlistVideoIndex || 0];
|
|
1638
1638
|
return {
|
|
1639
1639
|
...i,
|
|
1640
1640
|
video: {
|
|
1641
1641
|
...i.video,
|
|
1642
|
-
file: (
|
|
1642
|
+
file: (h == null ? void 0 : h.file) || "",
|
|
1643
1643
|
playlist: {
|
|
1644
|
-
...
|
|
1645
|
-
state:
|
|
1646
|
-
playlistVideoIndex:
|
|
1647
|
-
videos:
|
|
1644
|
+
...c,
|
|
1645
|
+
state: c.state ?? !0,
|
|
1646
|
+
playlistVideoIndex: c.playlistVideoIndex ?? 0,
|
|
1647
|
+
videos: c.videos
|
|
1648
1648
|
}
|
|
1649
1649
|
},
|
|
1650
1650
|
config: {
|
|
@@ -1654,133 +1654,103 @@ const vr = te.div`
|
|
|
1654
1654
|
};
|
|
1655
1655
|
}
|
|
1656
1656
|
throw new Error("No valid video source found. Provide videoUrl, videoId, playlistId, or config with video.file or playlist.");
|
|
1657
|
-
},
|
|
1657
|
+
}, Tr = (e) => {
|
|
1658
1658
|
if (!e)
|
|
1659
1659
|
return;
|
|
1660
1660
|
const t = /https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/, r = e.match(t);
|
|
1661
1661
|
return r ? r[2] : void 0;
|
|
1662
|
-
}, Cr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl:
|
|
1663
|
-
const l =
|
|
1662
|
+
}, Cr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: s, config: c = {}, apiKey: d, isReels: m = !1 }) => {
|
|
1663
|
+
const l = Me(null), u = Me(null), { isLoaded: h, error: w } = Pr(r, s), x = t || Tr(s), [p, y] = D(null), { fetchedPlaybackUrl: v, fetchedPlaylist: b, isLoading: _, error: O } = Sr({
|
|
1664
1664
|
projectId: a,
|
|
1665
1665
|
videoId: x,
|
|
1666
1666
|
playlistId: i,
|
|
1667
1667
|
videoUrl: n,
|
|
1668
1668
|
apiKey: d
|
|
1669
|
-
}), E =
|
|
1670
|
-
|
|
1669
|
+
}), E = Be(e, x), S = tt(() => {
|
|
1670
|
+
const f = c.config || {}, T = m && !f.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : f.size || { sizeType: "FIXED", width: "100%" };
|
|
1671
1671
|
return {
|
|
1672
|
-
...
|
|
1672
|
+
...c,
|
|
1673
1673
|
config: {
|
|
1674
|
-
...
|
|
1675
|
-
|
|
1676
|
-
muted: !1,
|
|
1677
|
-
size: h ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : ((f = s.config) == null ? void 0 : f.size) || { sizeType: "FIXED", width: "100%" },
|
|
1678
|
-
controls: {
|
|
1679
|
-
settingsButton: !0,
|
|
1680
|
-
chromecastButton: !1,
|
|
1681
|
-
nextButton: !0,
|
|
1682
|
-
fullscreenButton: !0,
|
|
1683
|
-
airplayButton: !0,
|
|
1684
|
-
bigPlayButton: !0,
|
|
1685
|
-
autopausePlayButton: !0,
|
|
1686
|
-
pictureInPictureButton: !0,
|
|
1687
|
-
relatedButton: !1,
|
|
1688
|
-
volumeButton: !0,
|
|
1689
|
-
shareButton: !0
|
|
1690
|
-
},
|
|
1691
|
-
socialMedia: ["FACEBOOK", "LINKEDIN", "REDDIT", "TWITTER", "PINTEREST"],
|
|
1692
|
-
skin: {
|
|
1693
|
-
controlBar: {
|
|
1694
|
-
background: "rgba(0, 0, 0, 0.3)",
|
|
1695
|
-
text: "#FFFFFF",
|
|
1696
|
-
icons: { default: "#FFFFFF", hover: "#CC0000" },
|
|
1697
|
-
timeslider: {
|
|
1698
|
-
progress: "#CC0000",
|
|
1699
|
-
rail: "#808080",
|
|
1700
|
-
buffer: "#E2E2E2",
|
|
1701
|
-
dragger: "#CC0000"
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
|
-
},
|
|
1705
|
-
settings: {
|
|
1706
|
-
quality: "Quality",
|
|
1707
|
-
subtitles: "Subtitles",
|
|
1708
|
-
autoplay: "Autoplay",
|
|
1709
|
-
playbackRate: "Speed",
|
|
1710
|
-
auto: "Auto",
|
|
1711
|
-
off: "Off",
|
|
1712
|
-
normal: "Normal",
|
|
1713
|
-
share: "Share Video"
|
|
1714
|
-
}
|
|
1674
|
+
...f,
|
|
1675
|
+
size: T
|
|
1715
1676
|
}
|
|
1716
1677
|
};
|
|
1717
|
-
}, [
|
|
1718
|
-
return
|
|
1678
|
+
}, [c, m]);
|
|
1679
|
+
return xe(() => {
|
|
1719
1680
|
if (w) {
|
|
1720
1681
|
y(w);
|
|
1721
1682
|
return;
|
|
1722
1683
|
}
|
|
1723
|
-
|
|
1724
|
-
if (!m || !l.current || _ && !n)
|
|
1684
|
+
if (!h || _ && !n)
|
|
1725
1685
|
return;
|
|
1726
1686
|
let f = !0;
|
|
1727
|
-
const
|
|
1687
|
+
const F = setTimeout(async () => {
|
|
1728
1688
|
try {
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1689
|
+
const A = s == null ? void 0 : s.includes("vertical-player");
|
|
1690
|
+
if (document.querySelectorAll('[id*="player"]').forEach((Q) => {
|
|
1691
|
+
var ie, oe;
|
|
1692
|
+
const K = Q.id;
|
|
1693
|
+
if (K !== E)
|
|
1694
|
+
try {
|
|
1695
|
+
const o = A ? (ie = window.vpVerticalPlayer) == null ? void 0 : ie.call(window, K) : (oe = window.vpPlayer) == null ? void 0 : oe.call(window, K);
|
|
1696
|
+
o != null && o.destroy && o.destroy();
|
|
1697
|
+
} catch (o) {
|
|
1698
|
+
console.warn(`Failed to destroy existing player ${K}:`, o);
|
|
1699
|
+
}
|
|
1700
|
+
}), await new Promise((Q) => setTimeout(Q, 100)), !f || !l.current)
|
|
1738
1701
|
return;
|
|
1739
1702
|
if (!document.getElementById(E)) {
|
|
1740
1703
|
y("DOM element not found after cleanup.");
|
|
1741
1704
|
return;
|
|
1742
1705
|
}
|
|
1743
|
-
if (!window.vpPlayer) {
|
|
1706
|
+
if (!window.vpPlayer && !window.vpVerticalPlayer) {
|
|
1744
1707
|
y("VP Player script not loaded.");
|
|
1745
1708
|
return;
|
|
1746
1709
|
}
|
|
1747
|
-
const
|
|
1710
|
+
const z = A ? window.vpVerticalPlayer : window.vpPlayer;
|
|
1711
|
+
if (!z) {
|
|
1712
|
+
y(`VP ${A ? "Vertical " : ""}Player script not loaded.`);
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
const G = Ar({
|
|
1748
1716
|
videoUrl: n,
|
|
1749
1717
|
fetchedPlaybackUrl: v,
|
|
1750
1718
|
fetchedPlaylist: b,
|
|
1751
1719
|
projectId: a,
|
|
1752
1720
|
config: S
|
|
1753
|
-
}),
|
|
1754
|
-
if (!
|
|
1755
|
-
y(
|
|
1721
|
+
}), Z = z(E);
|
|
1722
|
+
if (!Z) {
|
|
1723
|
+
y(`Failed to create VP ${A ? "Vertical " : ""}Player instance.`);
|
|
1756
1724
|
return;
|
|
1757
1725
|
}
|
|
1758
|
-
f && l.current && (
|
|
1759
|
-
} catch (
|
|
1726
|
+
f && l.current && (Z.setup(G), u.current = Z, y(null));
|
|
1727
|
+
} catch (A) {
|
|
1760
1728
|
if (f) {
|
|
1761
|
-
const
|
|
1762
|
-
y(
|
|
1729
|
+
const V = A instanceof Error ? A.message : String(A);
|
|
1730
|
+
y(V), console.error("VP Player initialization error:", A);
|
|
1763
1731
|
}
|
|
1764
1732
|
}
|
|
1765
1733
|
}, 150);
|
|
1766
1734
|
return () => {
|
|
1767
|
-
f = !1, clearTimeout(
|
|
1735
|
+
f = !1, clearTimeout(F);
|
|
1768
1736
|
};
|
|
1769
1737
|
}, [
|
|
1770
|
-
|
|
1738
|
+
h,
|
|
1771
1739
|
_,
|
|
1772
1740
|
n,
|
|
1773
1741
|
v,
|
|
1774
1742
|
b,
|
|
1775
1743
|
a,
|
|
1776
1744
|
S,
|
|
1777
|
-
E
|
|
1778
|
-
|
|
1745
|
+
E,
|
|
1746
|
+
w,
|
|
1747
|
+
s
|
|
1748
|
+
]), xe(() => () => {
|
|
1779
1749
|
if (u.current) {
|
|
1780
1750
|
try {
|
|
1781
1751
|
u.current.destroy && u.current.destroy();
|
|
1782
|
-
} catch (
|
|
1783
|
-
console.warn(`Failed to destroy player ${E}:`,
|
|
1752
|
+
} catch (T) {
|
|
1753
|
+
console.warn(`Failed to destroy player ${E}:`, T);
|
|
1784
1754
|
}
|
|
1785
1755
|
u.current = null;
|
|
1786
1756
|
}
|
|
@@ -1789,12 +1759,12 @@ const vr = te.div`
|
|
|
1789
1759
|
}, [E]), {
|
|
1790
1760
|
playerRef: l,
|
|
1791
1761
|
playerInstanceRef: u,
|
|
1792
|
-
isScriptLoaded:
|
|
1762
|
+
isScriptLoaded: h,
|
|
1793
1763
|
isLoading: _,
|
|
1794
|
-
error:
|
|
1764
|
+
error: O || p || w
|
|
1795
1765
|
};
|
|
1796
|
-
}, Or = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl:
|
|
1797
|
-
var
|
|
1766
|
+
}, Or = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: s, config: c = {}, apiKey: d, isReels: m = !1, hiddenClasses: l = [], onClose: u, className: h }) => {
|
|
1767
|
+
var F, A, V, J;
|
|
1798
1768
|
const { playerRef: w, playerInstanceRef: x, isScriptLoaded: p, isLoading: y, error: v } = Cr({
|
|
1799
1769
|
playerId: e,
|
|
1800
1770
|
videoId: t,
|
|
@@ -1802,38 +1772,38 @@ const vr = te.div`
|
|
|
1802
1772
|
videoUrl: n,
|
|
1803
1773
|
projectId: a,
|
|
1804
1774
|
playlistId: i,
|
|
1805
|
-
scriptUrl:
|
|
1806
|
-
config:
|
|
1775
|
+
scriptUrl: s,
|
|
1776
|
+
config: c,
|
|
1807
1777
|
apiKey: d,
|
|
1808
|
-
isReels:
|
|
1809
|
-
}), [b, _] = D(!0),
|
|
1810
|
-
var z,
|
|
1811
|
-
_(!1), (
|
|
1812
|
-
}, S = (
|
|
1813
|
-
return v ?
|
|
1814
|
-
},
|
|
1815
|
-
const [t, r] = D(!1), [n, a] = D(null), [i,
|
|
1778
|
+
isReels: m
|
|
1779
|
+
}), [b, _] = D(!0), O = () => m && _(!0), E = () => {
|
|
1780
|
+
var z, G;
|
|
1781
|
+
_(!1), (G = (z = x.current) == null ? void 0 : z.play) == null || G.call(z), u == null || u();
|
|
1782
|
+
}, S = (A = (F = c == null ? void 0 : c.config) == null ? void 0 : F.size) != null && A.width ? typeof c.config.size.width == "number" ? `${c.config.size.width}px` : c.config.size.width : void 0, f = (J = (V = c == null ? void 0 : c.config) == null ? void 0 : V.size) != null && J.height ? typeof c.config.size.height == "number" ? `${c.config.size.height}px` : c.config.size.height : void 0, T = Be(e, t);
|
|
1783
|
+
return v ? I.jsxs(Le, { type: "error", children: ["An error occurred: ", v] }) : y || !p ? I.jsx(Le, { type: "loading", children: "Loading..." }) : I.jsxs(I.Fragment, { children: [m && !b ? I.jsx("div", { onClick: O }) : null, !m && I.jsx("div", { children: I.jsx(Qe, { id: T, ref: w, width: S || "100%", height: f || "auto", $hiddenClasses: l, className: h }) }, T), m && b && I.jsx(vr, { onClick: E, className: h, children: I.jsx(br, { className: h, onClick: (z) => z.stopPropagation(), children: I.jsx("div", { children: I.jsx(Qe, { id: T, ref: w, width: "100%", height: "auto", $hiddenClasses: l, className: h }) }, T) }) })] });
|
|
1784
|
+
}, pt = gt(void 0), $r = ({ children: e }) => {
|
|
1785
|
+
const [t, r] = D(!1), [n, a] = D(null), [i, s] = D(null), c = ze((l) => {
|
|
1816
1786
|
try {
|
|
1817
|
-
const u =
|
|
1818
|
-
a({ ...l, playerId: u }), r(!0),
|
|
1787
|
+
const u = Be(l.playerId, l.videoId);
|
|
1788
|
+
a({ ...l, playerId: u }), r(!0), s(null);
|
|
1819
1789
|
} catch {
|
|
1820
|
-
|
|
1790
|
+
s("Failed to show player.");
|
|
1821
1791
|
}
|
|
1822
1792
|
}, []), d = ze(() => {
|
|
1823
|
-
r(!1), a(null),
|
|
1824
|
-
}, []),
|
|
1825
|
-
showPlayer:
|
|
1793
|
+
r(!1), a(null), s(null);
|
|
1794
|
+
}, []), m = tt(() => ({
|
|
1795
|
+
showPlayer: c,
|
|
1826
1796
|
hidePlayer: d,
|
|
1827
1797
|
isPlayerVisible: t,
|
|
1828
1798
|
playerParams: n
|
|
1829
|
-
}), [
|
|
1830
|
-
return
|
|
1831
|
-
},
|
|
1832
|
-
const e =
|
|
1799
|
+
}), [c, d, t, n]);
|
|
1800
|
+
return I.jsxs(pt.Provider, { value: m, children: [e, i && I.jsx(Le, { type: "error", children: i }), t && (n == null ? void 0 : n.playerId) && I.jsx(Or, { playerId: n.playerId, videoId: n.videoId, projectId: n.projectId, videoUrl: n.videoUrl, version: n.version, playlistId: n.playlistId, scriptUrl: n.scriptUrl, config: n.config, isReels: n.isReels, thumbnailUrl: n.thumbnailUrl, onClose: d, hiddenClasses: n.hiddenClasses || [], apiKey: n.apiKey, className: n.className })] });
|
|
1801
|
+
}, jr = () => {
|
|
1802
|
+
const e = et(pt);
|
|
1833
1803
|
if (!e)
|
|
1834
1804
|
throw new Error("useVPPlayer must be used within a VPPlayerProvider");
|
|
1835
1805
|
return e;
|
|
1836
|
-
},
|
|
1806
|
+
}, Lr = {
|
|
1837
1807
|
projectId: "vp-player-projectId",
|
|
1838
1808
|
video: {
|
|
1839
1809
|
file: "",
|
|
@@ -1871,12 +1841,12 @@ const vr = te.div`
|
|
|
1871
1841
|
autostartOnLoad: { state: !0, onMobile: !0, onData: !0 },
|
|
1872
1842
|
muted: !0
|
|
1873
1843
|
}
|
|
1874
|
-
},
|
|
1844
|
+
}, Fr = {
|
|
1875
1845
|
config: {
|
|
1876
1846
|
autoplay: !0,
|
|
1877
1847
|
muted: !0
|
|
1878
1848
|
}
|
|
1879
|
-
},
|
|
1849
|
+
}, Oe = {
|
|
1880
1850
|
video: {
|
|
1881
1851
|
advertising: !0,
|
|
1882
1852
|
ads: {
|
|
@@ -1887,14 +1857,14 @@ const vr = te.div`
|
|
|
1887
1857
|
adAnnouncement: { state: !0, timeBeforeAd: 5 },
|
|
1888
1858
|
adsRequireInteraction: !1
|
|
1889
1859
|
}
|
|
1890
|
-
},
|
|
1860
|
+
}, Vr = (e, t, r = "time", n = 0) => {
|
|
1891
1861
|
var a;
|
|
1892
1862
|
return {
|
|
1893
|
-
...
|
|
1863
|
+
...Oe,
|
|
1894
1864
|
video: {
|
|
1895
|
-
...
|
|
1865
|
+
...Oe.video,
|
|
1896
1866
|
ads: {
|
|
1897
|
-
...(a =
|
|
1867
|
+
...(a = Oe.video) == null ? void 0 : a.ads,
|
|
1898
1868
|
adBreaks: [
|
|
1899
1869
|
{
|
|
1900
1870
|
adTagUrl: t,
|
|
@@ -1906,28 +1876,28 @@ const vr = te.div`
|
|
|
1906
1876
|
}
|
|
1907
1877
|
}
|
|
1908
1878
|
};
|
|
1909
|
-
},
|
|
1879
|
+
}, Br = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", Mr = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", zr = "https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4", Dr = "https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600", Ur = "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=", Wr = "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=";
|
|
1910
1880
|
export {
|
|
1911
1881
|
Ur as AD_TAG_LINEAR_URL,
|
|
1912
1882
|
Wr as AD_TAG_SKIPPABLE_LINEAR_URL,
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1883
|
+
Br as BIG_BUCK_BUNNY_URL,
|
|
1884
|
+
Mr as ELEPHANTS_DREAM_URL,
|
|
1885
|
+
vr as Overlay,
|
|
1916
1886
|
Dr as PEXELS_THUMBNAIL_URL,
|
|
1917
1887
|
zr as PEXELS_VERTICAL_VIDEO_URL,
|
|
1918
1888
|
Qe as PlayerContainer,
|
|
1919
|
-
|
|
1889
|
+
br as PlayerWrapper,
|
|
1920
1890
|
Or as VPPlayer,
|
|
1921
|
-
|
|
1891
|
+
$r as VPPlayerProvider,
|
|
1922
1892
|
Nr as baseConfig,
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1893
|
+
Oe as baseConfigWithAds,
|
|
1894
|
+
Fr as baseConfigWithAutoplay,
|
|
1895
|
+
Ar as buildVPPlayerConfig,
|
|
1896
|
+
Lr as defaultVPPlayerConfig,
|
|
1897
|
+
Tr as extractVideoId,
|
|
1898
|
+
Vr as getAdConfig,
|
|
1899
|
+
jr as useVPPlayer,
|
|
1930
1900
|
Cr as useVPPlayerLogic,
|
|
1931
|
-
|
|
1901
|
+
Pr as useVPPlayerScript,
|
|
1932
1902
|
Sr as useVideoData
|
|
1933
1903
|
};
|