@devix-technologies/react-gjirafa-vp-player 1.0.30 → 1.0.31-beta.1
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/README.md +95 -707
- package/dist/index.d.ts +919 -9
- package/dist/react-gjirafa-vp-player.es.js +1224 -1383
- package/dist/react-gjirafa-vp-player.umd.js +13 -12
- package/package.json +19 -24
- 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 -9
- package/dist/constants/styles.d.ts +0 -11
- package/dist/constants/urls.d.ts +0 -18
- package/dist/constants/vpPlayer.d.ts +0 -47
- package/dist/contexts/VPPlayerContext.d.ts +0 -52
- package/dist/contexts/index.d.ts +0 -1
- package/dist/features/VPPlayer.d.ts +0 -41
- package/dist/features/stories/ads/Ads.stories.d.ts +0 -20
- 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 -38
- package/dist/fixtures/index.d.ts +0 -1
- package/dist/fixtures/playlist.d.ts +0 -11
- package/dist/hooks/index.d.ts +0 -4
- package/dist/hooks/useVPPlayerEvents.d.ts +0 -24
- package/dist/hooks/useVPPlayerLogic.d.ts +0 -22
- package/dist/hooks/useVPPlayerScript.d.ts +0 -13
- package/dist/hooks/useVideoData.d.ts +0 -19
- package/dist/interfaces/config.d.ts +0 -314
- package/dist/interfaces/index.d.ts +0 -3
- package/dist/interfaces/instance.d.ts +0 -73
- package/dist/interfaces/props.d.ts +0 -77
- package/dist/main.d.ts +0 -0
- package/dist/types/api.types.d.ts +0 -81
- package/dist/types/index.d.ts +0 -2
- package/dist/types/playerEvents.types.d.ts +0 -67
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/vpPlayerConfigBuilder.d.ts +0 -30
- package/dist/utils/vpPlayerUtils.d.ts +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
var
|
|
1
|
+
import * as ie from "react";
|
|
2
|
+
import _r, { forwardRef as wr, useContext as ir, useState as le, useEffect as Me, useRef as ye, useId as Er, useMemo as or, createContext as kr, useCallback as Ye } from "react";
|
|
3
|
+
var ke = { exports: {} }, me = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,29 +10,29 @@ var Me = { exports: {} }, Oe = {};
|
|
|
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
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
13
|
+
var Ge;
|
|
14
|
+
function Sr() {
|
|
15
|
+
if (Ge) return me;
|
|
16
|
+
Ge = 1;
|
|
17
17
|
var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
18
|
-
function n
|
|
18
|
+
function t(n, a, i) {
|
|
19
19
|
var s = null;
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var
|
|
23
|
-
|
|
24
|
-
} else
|
|
25
|
-
return a =
|
|
20
|
+
if (i !== void 0 && (s = "" + i), a.key !== void 0 && (s = "" + a.key), "key" in a) {
|
|
21
|
+
i = {};
|
|
22
|
+
for (var l in a)
|
|
23
|
+
l !== "key" && (i[l] = a[l]);
|
|
24
|
+
} else i = a;
|
|
25
|
+
return a = i.ref, {
|
|
26
26
|
$$typeof: e,
|
|
27
|
-
type:
|
|
27
|
+
type: n,
|
|
28
28
|
key: s,
|
|
29
29
|
ref: a !== void 0 ? a : null,
|
|
30
|
-
props:
|
|
30
|
+
props: i
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return me.Fragment = r, me.jsx = t, me.jsxs = t, me;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var ve = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,26 +42,26 @@ var Ve = {};
|
|
|
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
|
|
46
|
-
function
|
|
47
|
-
return
|
|
45
|
+
var He;
|
|
46
|
+
function Ir() {
|
|
47
|
+
return He || (He = 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
|
-
case
|
|
54
|
+
case y:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case g:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case v:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case R:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case b:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case C:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof o == "object")
|
|
@@ -70,19 +70,19 @@ function zr() {
|
|
|
70
70
|
), o.$$typeof) {
|
|
71
71
|
case h:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case
|
|
73
|
+
case N:
|
|
74
74
|
return o.displayName || "Context";
|
|
75
|
-
case
|
|
75
|
+
case T:
|
|
76
76
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
78
|
-
var
|
|
79
|
-
return o = o.displayName, o || (o =
|
|
77
|
+
case z:
|
|
78
|
+
var m = o.render;
|
|
79
|
+
return o = o.displayName, o || (o = m.displayName || m.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
80
80
|
case J:
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
|
|
81
|
+
return m = o.displayName || null, m !== null ? m : e(o.type) || "Memo";
|
|
82
|
+
case q:
|
|
83
|
+
m = o._payload, o = o._init;
|
|
84
84
|
try {
|
|
85
|
-
return e(o(
|
|
85
|
+
return e(o(m));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -91,77 +91,77 @@ function zr() {
|
|
|
91
91
|
function r(o) {
|
|
92
92
|
return "" + o;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function t(o) {
|
|
95
95
|
try {
|
|
96
96
|
r(o);
|
|
97
|
-
var
|
|
97
|
+
var m = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
m = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
return
|
|
105
|
-
|
|
101
|
+
if (m) {
|
|
102
|
+
m = console;
|
|
103
|
+
var P = m.error, L = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
104
|
+
return P.call(
|
|
105
|
+
m,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
107
|
+
L
|
|
108
108
|
), r(o);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (o ===
|
|
113
|
-
if (typeof o == "object" && o !== null && o.$$typeof ===
|
|
111
|
+
function n(o) {
|
|
112
|
+
if (o === y) return "<>";
|
|
113
|
+
if (typeof o == "object" && o !== null && o.$$typeof === q)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var m = e(o);
|
|
117
|
+
return m ? "<" + m + ">" : "<...>";
|
|
118
118
|
} catch {
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function a() {
|
|
123
|
-
var o =
|
|
123
|
+
var o = $.A;
|
|
124
124
|
return o === null ? null : o.getOwner();
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function i() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
129
|
function s(o) {
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
130
|
+
if (j.call(o, "key")) {
|
|
131
|
+
var m = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
132
|
+
if (m && m.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return o.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
function
|
|
138
|
-
|
|
136
|
+
function l(o, m) {
|
|
137
|
+
function P() {
|
|
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
|
-
|
|
140
|
+
m
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
143
|
+
P.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
144
|
+
get: P,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function p() {
|
|
149
149
|
var o = e(this.type);
|
|
150
|
-
return
|
|
150
|
+
return oe[o] || (oe[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
|
|
155
|
-
var
|
|
154
|
+
function f(o, m, P, L, H, B) {
|
|
155
|
+
var O = P.ref;
|
|
156
156
|
return o = {
|
|
157
|
-
$$typeof:
|
|
157
|
+
$$typeof: w,
|
|
158
158
|
type: o,
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
159
|
+
key: m,
|
|
160
|
+
props: P,
|
|
161
|
+
_owner: L
|
|
162
|
+
}, (O !== void 0 ? O : null) !== null ? Object.defineProperty(o, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: p
|
|
165
165
|
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
@@ -181,212 +181,212 @@ function zr() {
|
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
183
183
|
writable: !0,
|
|
184
|
-
value:
|
|
184
|
+
value: B
|
|
185
185
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function c(o, m, P, L, H, B) {
|
|
188
|
+
var O = m.children;
|
|
189
|
+
if (O !== void 0)
|
|
190
|
+
if (L)
|
|
191
|
+
if (x(O)) {
|
|
192
|
+
for (L = 0; L < O.length; L++)
|
|
193
|
+
u(O[L]);
|
|
194
|
+
Object.freeze && Object.freeze(O);
|
|
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
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
199
|
+
else u(O);
|
|
200
|
+
if (j.call(m, "key")) {
|
|
201
|
+
O = e(o);
|
|
202
|
+
var re = Object.keys(m).filter(function(pe) {
|
|
203
|
+
return pe !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
L = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", Z[O + L] || (re = 0 < re.length ? "{" + re.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
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
),
|
|
212
|
+
L,
|
|
213
|
+
O,
|
|
214
|
+
re,
|
|
215
|
+
O
|
|
216
|
+
), Z[O + L] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
218
|
+
if (O = null, P !== void 0 && (t(P), O = "" + P), s(m) && (t(m.key), O = "" + m.key), "key" in m) {
|
|
219
|
+
P = {};
|
|
220
|
+
for (var S in m)
|
|
221
|
+
S !== "key" && (P[S] = m[S]);
|
|
222
|
+
} else P = m;
|
|
223
|
+
return O && l(
|
|
224
|
+
P,
|
|
225
225
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
226
|
-
),
|
|
226
|
+
), f(
|
|
227
227
|
o,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
O,
|
|
229
|
+
P,
|
|
230
230
|
a(),
|
|
231
231
|
H,
|
|
232
|
-
|
|
232
|
+
B
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
|
|
235
|
+
function u(o) {
|
|
236
|
+
I(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === q && (o._payload.status === "fulfilled" ? I(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
return typeof o == "object" && o !== null && o.$$typeof ===
|
|
238
|
+
function I(o) {
|
|
239
|
+
return typeof o == "object" && o !== null && o.$$typeof === w;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var _ = _r, w = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), N = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), J = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), A = Symbol.for("react.client.reference"), $ = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, x = Array.isArray, Y = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
_ = {
|
|
245
245
|
react_stack_bottom_frame: function(o) {
|
|
246
246
|
return o();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
return
|
|
249
|
+
var D, oe = {}, Q = _.react_stack_bottom_frame.bind(
|
|
250
|
+
_,
|
|
251
|
+
i
|
|
252
|
+
)(), G = Y(n(i)), Z = {};
|
|
253
|
+
ve.Fragment = y, ve.jsx = function(o, m, P) {
|
|
254
|
+
var L = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return c(
|
|
256
256
|
o,
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
m,
|
|
258
|
+
P,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
L ? Error("react-stack-top-frame") : Q,
|
|
261
|
+
L ? Y(n(o)) : G
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
var
|
|
265
|
-
return
|
|
263
|
+
}, ve.jsxs = function(o, m, P) {
|
|
264
|
+
var L = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return c(
|
|
266
266
|
o,
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
m,
|
|
268
|
+
P,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
L ? Error("react-stack-top-frame") : Q,
|
|
271
|
+
L ? Y(n(o)) : G
|
|
272
272
|
);
|
|
273
273
|
};
|
|
274
|
-
})()),
|
|
274
|
+
})()), ve;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
277
|
-
function
|
|
278
|
-
return
|
|
276
|
+
var Xe;
|
|
277
|
+
function Rr() {
|
|
278
|
+
return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? ke.exports = Sr() : ke.exports = Ir()), ke.exports;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var F = Rr();
|
|
281
|
+
function Ve() {
|
|
282
|
+
return Ve = Object.assign ? Object.assign.bind() : function(e) {
|
|
283
283
|
for (var r = 1; r < arguments.length; r++) {
|
|
284
|
-
var
|
|
285
|
-
for (var
|
|
284
|
+
var t = arguments[r];
|
|
285
|
+
for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
286
286
|
}
|
|
287
287
|
return e;
|
|
288
|
-
},
|
|
288
|
+
}, Ve.apply(null, arguments);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Cr(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
|
|
297
|
+
function Ar(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
|
|
302
|
-
function e(
|
|
303
|
-
var
|
|
301
|
+
var Tr = /* @__PURE__ */ (function() {
|
|
302
|
+
function e(t) {
|
|
303
|
+
var n = this;
|
|
304
304
|
this._insertTag = function(a) {
|
|
305
|
-
var
|
|
306
|
-
|
|
307
|
-
}, this.isSpeedy =
|
|
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);
|
|
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(
|
|
311
|
-
|
|
312
|
-
}, r.insert = function(
|
|
313
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
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(Ar(this));
|
|
314
314
|
var a = this.tags[this.tags.length - 1];
|
|
315
315
|
if (this.isSpeedy) {
|
|
316
|
-
var
|
|
316
|
+
var i = Cr(a);
|
|
317
317
|
try {
|
|
318
|
-
|
|
318
|
+
i.insertRule(n, i.cssRules.length);
|
|
319
319
|
} catch {
|
|
320
320
|
}
|
|
321
321
|
} else
|
|
322
|
-
a.appendChild(document.createTextNode(
|
|
322
|
+
a.appendChild(document.createTextNode(n));
|
|
323
323
|
this.ctr++;
|
|
324
324
|
}, r.flush = function() {
|
|
325
|
-
this.tags.forEach(function(
|
|
325
|
+
this.tags.forEach(function(n) {
|
|
326
326
|
var a;
|
|
327
|
-
return (a =
|
|
327
|
+
return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
|
|
328
328
|
}), this.tags = [], this.ctr = 0;
|
|
329
329
|
}, e;
|
|
330
|
-
})(),
|
|
331
|
-
function
|
|
332
|
-
return
|
|
330
|
+
})(), X = "-ms-", je = "-moz-", E = "-webkit-", sr = "comm", Ue = "rule", We = "decl", Or = "@import", lr = "@keyframes", jr = "@layer", $r = Math.abs, $e = String.fromCharCode, Lr = Object.assign;
|
|
331
|
+
function Nr(e, r) {
|
|
332
|
+
return W(e, 0) ^ 45 ? (((r << 2 ^ W(e, 0)) << 2 ^ W(e, 1)) << 2 ^ W(e, 2)) << 2 ^ W(e, 3) : 0;
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function cr(e) {
|
|
335
335
|
return e.trim();
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function zr(e, r) {
|
|
338
338
|
return (e = r.exec(e)) ? e[0] : e;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
return e.replace(r,
|
|
340
|
+
function k(e, r, t) {
|
|
341
|
+
return e.replace(r, t);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function De(e, r) {
|
|
344
344
|
return e.indexOf(r);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function W(e, r) {
|
|
347
347
|
return e.charCodeAt(r) | 0;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
return e.slice(r,
|
|
349
|
+
function ge(e, r, t) {
|
|
350
|
+
return e.slice(r, t);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function te(e) {
|
|
353
353
|
return e.length;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function qe(e) {
|
|
356
356
|
return e.length;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Se(e, r) {
|
|
359
359
|
return r.push(e), e;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Fr(e, r) {
|
|
362
362
|
return e.map(r).join("");
|
|
363
363
|
}
|
|
364
|
-
var
|
|
365
|
-
function
|
|
366
|
-
return { value: e, root: r, parent:
|
|
364
|
+
var Le = 1, ue = 1, ur = 0, K = 0, M = 0, fe = "";
|
|
365
|
+
function Ne(e, r, t, n, a, i, s) {
|
|
366
|
+
return { value: e, root: r, parent: t, type: n, props: a, children: i, line: Le, column: ue, length: s, return: "" };
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
return
|
|
368
|
+
function be(e, r) {
|
|
369
|
+
return Lr(Ne("", null, null, "", null, null, 0), e, { length: -e.length }, r);
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
return
|
|
371
|
+
function Mr() {
|
|
372
|
+
return M;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
return
|
|
374
|
+
function Vr() {
|
|
375
|
+
return M = K > 0 ? W(fe, --K) : 0, ue--, M === 10 && (ue = 1, Le--), M;
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
return
|
|
377
|
+
function ee() {
|
|
378
|
+
return M = K < ur ? W(fe, K++) : 0, ue++, M === 10 && (ue = 1, Le++), M;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
380
|
+
function ae() {
|
|
381
|
+
return W(fe, K);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
383
|
+
function Ce() {
|
|
384
|
+
return K;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
386
|
+
function _e(e, r) {
|
|
387
|
+
return ge(fe, e, r);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function xe(e) {
|
|
390
390
|
switch (e) {
|
|
391
391
|
// \0 \t \n \r \s whitespace token
|
|
392
392
|
case 0:
|
|
@@ -424,272 +424,272 @@ function $e(e) {
|
|
|
424
424
|
}
|
|
425
425
|
return 0;
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
return
|
|
427
|
+
function dr(e) {
|
|
428
|
+
return Le = ue = 1, ur = te(fe = e), K = 0, [];
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
return
|
|
430
|
+
function fr(e) {
|
|
431
|
+
return fe = "", e;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
return
|
|
433
|
+
function Ae(e) {
|
|
434
|
+
return cr(_e(K - 1, Be(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
for (; (
|
|
438
|
-
|
|
439
|
-
return
|
|
436
|
+
function Dr(e) {
|
|
437
|
+
for (; (M = ae()) && M < 33; )
|
|
438
|
+
ee();
|
|
439
|
+
return xe(e) > 2 || xe(M) > 3 ? "" : " ";
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
for (; --r &&
|
|
441
|
+
function Br(e, r) {
|
|
442
|
+
for (; --r && ee() && !(M < 48 || M > 102 || M > 57 && M < 65 || M > 70 && M < 97); )
|
|
443
443
|
;
|
|
444
|
-
return
|
|
444
|
+
return _e(e, Ce() + (r < 6 && ae() == 32 && ee() == 32));
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
for (;
|
|
448
|
-
switch (
|
|
446
|
+
function Be(e) {
|
|
447
|
+
for (; ee(); )
|
|
448
|
+
switch (M) {
|
|
449
449
|
// ] ) " '
|
|
450
450
|
case e:
|
|
451
|
-
return
|
|
451
|
+
return K;
|
|
452
452
|
// " '
|
|
453
453
|
case 34:
|
|
454
454
|
case 39:
|
|
455
|
-
e !== 34 && e !== 39 &&
|
|
455
|
+
e !== 34 && e !== 39 && Be(M);
|
|
456
456
|
break;
|
|
457
457
|
// (
|
|
458
458
|
case 40:
|
|
459
|
-
e === 41 &&
|
|
459
|
+
e === 41 && Be(e);
|
|
460
460
|
break;
|
|
461
461
|
// \
|
|
462
462
|
case 92:
|
|
463
|
-
|
|
463
|
+
ee();
|
|
464
464
|
break;
|
|
465
465
|
}
|
|
466
|
-
return
|
|
466
|
+
return K;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
for (;
|
|
470
|
-
if (e +
|
|
468
|
+
function Ur(e, r) {
|
|
469
|
+
for (; ee() && e + M !== 57; )
|
|
470
|
+
if (e + M === 84 && ae() === 47)
|
|
471
471
|
break;
|
|
472
|
-
return "/*" +
|
|
472
|
+
return "/*" + _e(r, K - 1) + "*" + $e(e === 47 ? e : ee());
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
for (;
|
|
476
|
-
|
|
477
|
-
return
|
|
474
|
+
function Wr(e) {
|
|
475
|
+
for (; !xe(ae()); )
|
|
476
|
+
ee();
|
|
477
|
+
return _e(e, K);
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
479
|
+
function qr(e) {
|
|
480
|
+
return fr(Te("", null, null, null, [""], e = dr(e), 0, [0], e));
|
|
481
481
|
}
|
|
482
|
-
function
|
|
483
|
-
for (var
|
|
484
|
-
switch (
|
|
482
|
+
function Te(e, r, t, n, a, i, s, l, p) {
|
|
483
|
+
for (var f = 0, c = 0, u = s, I = 0, _ = 0, w = 0, h = 1, y = 1, v = 1, g = 0, T = "", N = a, z = i, R = n, b = T; y; )
|
|
484
|
+
switch (w = g, g = ee()) {
|
|
485
485
|
// (
|
|
486
486
|
case 40:
|
|
487
|
-
if (
|
|
488
|
-
|
|
487
|
+
if (w != 108 && W(b, u - 1) == 58) {
|
|
488
|
+
De(b += k(Ae(g), "&", "&\f"), "&\f") != -1 && (v = -1);
|
|
489
489
|
break;
|
|
490
490
|
}
|
|
491
491
|
// " ' [
|
|
492
492
|
case 34:
|
|
493
493
|
case 39:
|
|
494
494
|
case 91:
|
|
495
|
-
|
|
495
|
+
b += Ae(g);
|
|
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
|
-
|
|
502
|
+
b += Dr(w);
|
|
503
503
|
break;
|
|
504
504
|
// \
|
|
505
505
|
case 92:
|
|
506
|
-
|
|
506
|
+
b += Br(Ce() - 1, 7);
|
|
507
507
|
continue;
|
|
508
508
|
// /
|
|
509
509
|
case 47:
|
|
510
|
-
switch (
|
|
510
|
+
switch (ae()) {
|
|
511
511
|
case 42:
|
|
512
512
|
case 47:
|
|
513
|
-
|
|
513
|
+
Se(Yr(Ur(ee(), Ce()), r, t), p);
|
|
514
514
|
break;
|
|
515
515
|
default:
|
|
516
|
-
|
|
516
|
+
b += "/";
|
|
517
517
|
}
|
|
518
518
|
break;
|
|
519
519
|
// {
|
|
520
520
|
case 123 * h:
|
|
521
|
-
|
|
521
|
+
l[f++] = te(b) * v;
|
|
522
522
|
// } ; \0
|
|
523
523
|
case 125 * h:
|
|
524
524
|
case 59:
|
|
525
525
|
case 0:
|
|
526
|
-
switch (
|
|
526
|
+
switch (g) {
|
|
527
527
|
// \0 }
|
|
528
528
|
case 0:
|
|
529
529
|
case 125:
|
|
530
|
-
|
|
530
|
+
y = 0;
|
|
531
531
|
// ;
|
|
532
|
-
case 59 +
|
|
533
|
-
|
|
532
|
+
case 59 + c:
|
|
533
|
+
v == -1 && (b = k(b, /\f/g, "")), _ > 0 && te(b) - u && Se(_ > 32 ? Qe(b + ";", n, t, u - 1) : Qe(k(b, " ", "") + ";", n, t, u - 2), p);
|
|
534
534
|
break;
|
|
535
535
|
// @ ;
|
|
536
536
|
case 59:
|
|
537
|
-
|
|
537
|
+
b += ";";
|
|
538
538
|
// { rule/at-rule
|
|
539
539
|
default:
|
|
540
|
-
if (
|
|
541
|
-
if (
|
|
542
|
-
|
|
540
|
+
if (Se(R = Je(b, r, t, f, c, a, l, T, N = [], z = [], u), i), g === 123)
|
|
541
|
+
if (c === 0)
|
|
542
|
+
Te(b, r, R, R, N, i, u, l, z);
|
|
543
543
|
else
|
|
544
|
-
switch (
|
|
544
|
+
switch (I === 99 && W(b, 3) === 110 ? 100 : I) {
|
|
545
545
|
// d l m s
|
|
546
546
|
case 100:
|
|
547
547
|
case 108:
|
|
548
548
|
case 109:
|
|
549
549
|
case 115:
|
|
550
|
-
|
|
550
|
+
Te(e, R, R, n && Se(Je(e, R, R, 0, 0, a, l, T, a, N = [], u), z), a, z, u, l, n ? N : z);
|
|
551
551
|
break;
|
|
552
552
|
default:
|
|
553
|
-
|
|
553
|
+
Te(b, R, R, R, [""], z, 0, l, z);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
|
|
556
|
+
f = c = _ = 0, h = v = 1, T = b = "", u = s;
|
|
557
557
|
break;
|
|
558
558
|
// :
|
|
559
559
|
case 58:
|
|
560
|
-
|
|
560
|
+
u = 1 + te(b), _ = w;
|
|
561
561
|
default:
|
|
562
562
|
if (h < 1) {
|
|
563
|
-
if (
|
|
563
|
+
if (g == 123)
|
|
564
564
|
--h;
|
|
565
|
-
else if (
|
|
565
|
+
else if (g == 125 && h++ == 0 && Vr() == 125)
|
|
566
566
|
continue;
|
|
567
567
|
}
|
|
568
|
-
switch (
|
|
568
|
+
switch (b += $e(g), g * h) {
|
|
569
569
|
// &
|
|
570
570
|
case 38:
|
|
571
|
-
|
|
571
|
+
v = c > 0 ? 1 : (b += "\f", -1);
|
|
572
572
|
break;
|
|
573
573
|
// ,
|
|
574
574
|
case 44:
|
|
575
|
-
|
|
575
|
+
l[f++] = (te(b) - 1) * v, v = 1;
|
|
576
576
|
break;
|
|
577
577
|
// @
|
|
578
578
|
case 64:
|
|
579
|
-
|
|
579
|
+
ae() === 45 && (b += Ae(ee())), I = ae(), c = u = te(T = b += Wr(Ce())), g++;
|
|
580
580
|
break;
|
|
581
581
|
// -
|
|
582
582
|
case 45:
|
|
583
|
-
|
|
583
|
+
w === 45 && te(b) == 2 && (h = 0);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
return
|
|
586
|
+
return i;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
for (var
|
|
590
|
-
for (var
|
|
591
|
-
(
|
|
592
|
-
return
|
|
588
|
+
function Je(e, r, t, n, a, i, s, l, p, f, c) {
|
|
589
|
+
for (var u = a - 1, I = a === 0 ? i : [""], _ = qe(I), w = 0, h = 0, y = 0; w < n; ++w)
|
|
590
|
+
for (var v = 0, g = ge(e, u + 1, u = $r(h = s[w])), T = e; v < _; ++v)
|
|
591
|
+
(T = cr(h > 0 ? I[v] + " " + g : k(g, /&\f/g, I[v]))) && (p[y++] = T);
|
|
592
|
+
return Ne(e, r, t, a === 0 ? Ue : l, p, f, c);
|
|
593
593
|
}
|
|
594
|
-
function
|
|
595
|
-
return
|
|
594
|
+
function Yr(e, r, t) {
|
|
595
|
+
return Ne(e, r, t, sr, $e(Mr()), ge(e, 2, -2), 0);
|
|
596
596
|
}
|
|
597
|
-
function
|
|
598
|
-
return
|
|
597
|
+
function Qe(e, r, t, n) {
|
|
598
|
+
return Ne(e, r, t, We, ge(e, 0, n), ge(e, n + 1, -1), n);
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
for (var
|
|
602
|
-
|
|
603
|
-
return
|
|
600
|
+
function ce(e, r) {
|
|
601
|
+
for (var t = "", n = qe(e), a = 0; a < n; a++)
|
|
602
|
+
t += r(e[a], a, e, r) || "";
|
|
603
|
+
return t;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Gr(e, r, t, n) {
|
|
606
606
|
switch (e.type) {
|
|
607
|
-
case
|
|
607
|
+
case jr:
|
|
608
608
|
if (e.children.length) break;
|
|
609
|
-
case
|
|
610
|
-
case
|
|
609
|
+
case Or:
|
|
610
|
+
case We:
|
|
611
611
|
return e.return = e.return || e.value;
|
|
612
|
-
case
|
|
612
|
+
case sr:
|
|
613
613
|
return "";
|
|
614
|
-
case
|
|
615
|
-
return e.return = e.value + "{" +
|
|
616
|
-
case
|
|
614
|
+
case lr:
|
|
615
|
+
return e.return = e.value + "{" + ce(e.children, n) + "}";
|
|
616
|
+
case Ue:
|
|
617
617
|
e.value = e.props.join(",");
|
|
618
618
|
}
|
|
619
|
-
return
|
|
619
|
+
return te(t = ce(e.children, n)) ? e.return = e.value + "{" + t + "}" : "";
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
var r =
|
|
623
|
-
return function(
|
|
624
|
-
for (var s = "",
|
|
625
|
-
s += e[
|
|
621
|
+
function Hr(e) {
|
|
622
|
+
var r = qe(e);
|
|
623
|
+
return function(t, n, a, i) {
|
|
624
|
+
for (var s = "", l = 0; l < r; l++)
|
|
625
|
+
s += e[l](t, n, a, i) || "";
|
|
626
626
|
return s;
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function Xr(e) {
|
|
630
630
|
return function(r) {
|
|
631
631
|
r.root || (r = r.return) && e(r);
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function pr(e) {
|
|
635
635
|
var r = /* @__PURE__ */ Object.create(null);
|
|
636
|
-
return function(
|
|
637
|
-
return r[
|
|
636
|
+
return function(t) {
|
|
637
|
+
return r[t] === void 0 && (r[t] = e(t)), r[t];
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
var
|
|
641
|
-
for (var a = 0,
|
|
642
|
-
|
|
643
|
-
return
|
|
644
|
-
},
|
|
645
|
-
var
|
|
640
|
+
var Jr = function(r, t, n) {
|
|
641
|
+
for (var a = 0, i = 0; a = i, i = ae(), a === 38 && i === 12 && (t[n] = 1), !xe(i); )
|
|
642
|
+
ee();
|
|
643
|
+
return _e(r, K);
|
|
644
|
+
}, Qr = function(r, t) {
|
|
645
|
+
var n = -1, a = 44;
|
|
646
646
|
do
|
|
647
|
-
switch (
|
|
647
|
+
switch (xe(a)) {
|
|
648
648
|
case 0:
|
|
649
|
-
a === 38 &&
|
|
649
|
+
a === 38 && ae() === 12 && (t[n] = 1), r[n] += Jr(K - 1, t, n);
|
|
650
650
|
break;
|
|
651
651
|
case 2:
|
|
652
|
-
r[
|
|
652
|
+
r[n] += Ae(a);
|
|
653
653
|
break;
|
|
654
654
|
case 4:
|
|
655
655
|
if (a === 44) {
|
|
656
|
-
r[++
|
|
656
|
+
r[++n] = ae() === 58 ? "&\f" : "", t[n] = r[n].length;
|
|
657
657
|
break;
|
|
658
658
|
}
|
|
659
659
|
// fallthrough
|
|
660
660
|
default:
|
|
661
|
-
r[
|
|
661
|
+
r[n] += $e(a);
|
|
662
662
|
}
|
|
663
|
-
while (a =
|
|
663
|
+
while (a = ee());
|
|
664
664
|
return r;
|
|
665
|
-
},
|
|
666
|
-
return
|
|
667
|
-
},
|
|
665
|
+
}, Kr = function(r, t) {
|
|
666
|
+
return fr(Qr(dr(r), t));
|
|
667
|
+
}, Ke = /* @__PURE__ */ new WeakMap(), Zr = 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
|
|
672
|
-
if (
|
|
673
|
-
if (!(r.props.length === 1 &&
|
|
674
|
-
|
|
675
|
-
for (var
|
|
676
|
-
for (var
|
|
677
|
-
r.props[
|
|
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 && !Ke.get(n)) && !a) {
|
|
674
|
+
Ke.set(r, !0);
|
|
675
|
+
for (var i = [], s = Kr(t, i), l = n.props, p = 0, f = 0; p < s.length; p++)
|
|
676
|
+
for (var c = 0; c < l.length; c++, f++)
|
|
677
|
+
r.props[f] = i[p] ? s[p].replace(/&\f/g, l[c]) : l[c] + " " + s[p];
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
},
|
|
680
|
+
}, et = function(r) {
|
|
681
681
|
if (r.type === "decl") {
|
|
682
|
-
var
|
|
682
|
+
var t = r.value;
|
|
683
683
|
// charcode for l
|
|
684
|
-
|
|
685
|
-
|
|
684
|
+
t.charCodeAt(0) === 108 && // charcode for b
|
|
685
|
+
t.charCodeAt(2) === 98 && (r.return = "", r.value = "");
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
|
-
function
|
|
689
|
-
switch (
|
|
688
|
+
function hr(e, r) {
|
|
689
|
+
switch (Nr(e, r)) {
|
|
690
690
|
// color-adjust
|
|
691
691
|
case 5103:
|
|
692
|
-
return
|
|
692
|
+
return E + "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 Or(e, r) {
|
|
|
719
719
|
case 5365:
|
|
720
720
|
case 5621:
|
|
721
721
|
case 3829:
|
|
722
|
-
return
|
|
722
|
+
return E + 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
|
|
729
|
+
return E + e + je + e + X + e + e;
|
|
730
730
|
// flex, flex-direction
|
|
731
731
|
case 6828:
|
|
732
732
|
case 4268:
|
|
733
|
-
return
|
|
733
|
+
return E + e + X + e + e;
|
|
734
734
|
// order
|
|
735
735
|
case 6165:
|
|
736
|
-
return
|
|
736
|
+
return E + e + X + "flex-" + e + e;
|
|
737
737
|
// align-items
|
|
738
738
|
case 5187:
|
|
739
|
-
return
|
|
739
|
+
return E + e + k(e, /(\w+).+(:[^]+)/, E + "box-$1$2" + X + "flex-$1$2") + e;
|
|
740
740
|
// align-self
|
|
741
741
|
case 5443:
|
|
742
|
-
return
|
|
742
|
+
return E + e + X + "flex-item-" + k(e, /flex-|-self/, "") + e;
|
|
743
743
|
// align-content
|
|
744
744
|
case 4675:
|
|
745
|
-
return
|
|
745
|
+
return E + e + X + "flex-line-pack" + k(e, /align-content|flex-|-self/, "") + e;
|
|
746
746
|
// flex-shrink
|
|
747
747
|
case 5548:
|
|
748
|
-
return
|
|
748
|
+
return E + e + X + k(e, "shrink", "negative") + e;
|
|
749
749
|
// flex-basis
|
|
750
750
|
case 5292:
|
|
751
|
-
return
|
|
751
|
+
return E + e + X + k(e, "basis", "preferred-size") + e;
|
|
752
752
|
// flex-grow
|
|
753
753
|
case 6060:
|
|
754
|
-
return
|
|
754
|
+
return E + "box-" + k(e, "-grow", "") + E + e + X + k(e, "grow", "positive") + e;
|
|
755
755
|
// transition
|
|
756
756
|
case 4554:
|
|
757
|
-
return
|
|
757
|
+
return E + k(e, /([^-])(transform)/g, "$1" + E + "$2") + e;
|
|
758
758
|
// cursor
|
|
759
759
|
case 6187:
|
|
760
|
-
return
|
|
760
|
+
return k(k(k(e, /(zoom-|grab)/, E + "$1"), /(image-set)/, E + "$1"), e, "") + e;
|
|
761
761
|
// background, background-image
|
|
762
762
|
case 5495:
|
|
763
763
|
case 3959:
|
|
764
|
-
return
|
|
764
|
+
return k(e, /(image-set\([^]*)/, E + "$1$`$1");
|
|
765
765
|
// justify-content
|
|
766
766
|
case 4968:
|
|
767
|
-
return
|
|
767
|
+
return k(k(e, /(.+:)(flex-)?(.*)/, E + "box-pack:$3" + X + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + E + 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
|
|
773
|
+
return k(e, /(.+)-inline(.+)/, E + "$1$2") + e;
|
|
774
774
|
// (min|max)?(width|height|inline-size|block-size)
|
|
775
775
|
case 8116:
|
|
776
776
|
case 7059:
|
|
@@ -784,115 +784,115 @@ function Or(e, r) {
|
|
|
784
784
|
case 5789:
|
|
785
785
|
case 5021:
|
|
786
786
|
case 4765:
|
|
787
|
-
if (
|
|
787
|
+
if (te(e) - 1 - r > 6) switch (W(e, r + 1)) {
|
|
788
788
|
// (m)ax-content, (m)in-content
|
|
789
789
|
case 109:
|
|
790
|
-
if (
|
|
790
|
+
if (W(e, r + 4) !== 45) break;
|
|
791
791
|
// (f)ill-available, (f)it-content
|
|
792
792
|
case 102:
|
|
793
|
-
return
|
|
793
|
+
return k(e, /(.+:)(.+)-([^]+)/, "$1" + E + "$2-$3$1" + je + (W(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
794
794
|
// (s)tretch
|
|
795
795
|
case 115:
|
|
796
|
-
return ~
|
|
796
|
+
return ~De(e, "stretch") ? hr(k(e, "stretch", "fill-available"), r) + e : e;
|
|
797
797
|
}
|
|
798
798
|
break;
|
|
799
799
|
// position: sticky
|
|
800
800
|
case 4949:
|
|
801
|
-
if (
|
|
801
|
+
if (W(e, r + 1) !== 115) break;
|
|
802
802
|
// display: (flex|inline-flex)
|
|
803
803
|
case 6444:
|
|
804
|
-
switch (
|
|
804
|
+
switch (W(e, te(e) - 3 - (~De(e, "!important") && 10))) {
|
|
805
805
|
// stic(k)y
|
|
806
806
|
case 107:
|
|
807
|
-
return
|
|
807
|
+
return k(e, ":", ":" + E) + e;
|
|
808
808
|
// (inline-)?fl(e)x
|
|
809
809
|
case 101:
|
|
810
|
-
return
|
|
810
|
+
return k(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + E + (W(e, 14) === 45 ? "inline-" : "") + "box$3$1" + E + "$2$3$1" + X + "$2box$3") + e;
|
|
811
811
|
}
|
|
812
812
|
break;
|
|
813
813
|
// writing-mode
|
|
814
814
|
case 5936:
|
|
815
|
-
switch (
|
|
815
|
+
switch (W(e, r + 11)) {
|
|
816
816
|
// vertical-l(r)
|
|
817
817
|
case 114:
|
|
818
|
-
return
|
|
818
|
+
return E + e + X + k(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
819
819
|
// vertical-r(l)
|
|
820
820
|
case 108:
|
|
821
|
-
return
|
|
821
|
+
return E + e + X + k(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
822
822
|
// horizontal(-)tb
|
|
823
823
|
case 45:
|
|
824
|
-
return
|
|
824
|
+
return E + e + X + k(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
825
825
|
}
|
|
826
|
-
return
|
|
826
|
+
return E + e + X + e + e;
|
|
827
827
|
}
|
|
828
828
|
return e;
|
|
829
829
|
}
|
|
830
|
-
var
|
|
830
|
+
var rt = function(r, t, n, a) {
|
|
831
831
|
if (r.length > -1 && !r.return) switch (r.type) {
|
|
832
|
-
case
|
|
833
|
-
r.return =
|
|
832
|
+
case We:
|
|
833
|
+
r.return = hr(r.value, r.length);
|
|
834
834
|
break;
|
|
835
|
-
case
|
|
836
|
-
return
|
|
837
|
-
value:
|
|
835
|
+
case lr:
|
|
836
|
+
return ce([be(r, {
|
|
837
|
+
value: k(r.value, "@", "@" + E)
|
|
838
838
|
})], a);
|
|
839
|
-
case
|
|
840
|
-
if (r.length) return
|
|
841
|
-
switch (
|
|
839
|
+
case Ue:
|
|
840
|
+
if (r.length) return Fr(r.props, function(i) {
|
|
841
|
+
switch (zr(i, /(::plac\w+|:read-\w+)/)) {
|
|
842
842
|
// :read-(only|write)
|
|
843
843
|
case ":read-only":
|
|
844
844
|
case ":read-write":
|
|
845
|
-
return
|
|
846
|
-
props: [
|
|
845
|
+
return ce([be(r, {
|
|
846
|
+
props: [k(i, /:(read-\w+)/, ":" + je + "$1")]
|
|
847
847
|
})], a);
|
|
848
848
|
// :placeholder
|
|
849
849
|
case "::placeholder":
|
|
850
|
-
return
|
|
851
|
-
props: [
|
|
852
|
-
}),
|
|
853
|
-
props: [
|
|
854
|
-
}),
|
|
855
|
-
props: [
|
|
850
|
+
return ce([be(r, {
|
|
851
|
+
props: [k(i, /:(plac\w+)/, ":" + E + "input-$1")]
|
|
852
|
+
}), be(r, {
|
|
853
|
+
props: [k(i, /:(plac\w+)/, ":" + je + "$1")]
|
|
854
|
+
}), be(r, {
|
|
855
|
+
props: [k(i, /:(plac\w+)/, X + "input-$1")]
|
|
856
856
|
})], a);
|
|
857
857
|
}
|
|
858
858
|
return "";
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
|
-
},
|
|
862
|
-
var
|
|
863
|
-
if (
|
|
864
|
-
var
|
|
865
|
-
Array.prototype.forEach.call(
|
|
866
|
-
var
|
|
867
|
-
|
|
861
|
+
}, tt = [rt], nt = function(r) {
|
|
862
|
+
var t = r.key;
|
|
863
|
+
if (t === "css") {
|
|
864
|
+
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
865
|
+
Array.prototype.forEach.call(n, function(h) {
|
|
866
|
+
var y = h.getAttribute("data-emotion");
|
|
867
|
+
y.indexOf(" ") !== -1 && (document.head.appendChild(h), h.setAttribute("data-s", ""));
|
|
868
868
|
});
|
|
869
869
|
}
|
|
870
|
-
var a = r.stylisPlugins ||
|
|
870
|
+
var a = r.stylisPlugins || tt, i = {}, 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
|
-
document.querySelectorAll('style[data-emotion^="' +
|
|
874
|
+
document.querySelectorAll('style[data-emotion^="' + t + ' "]'),
|
|
875
875
|
function(h) {
|
|
876
|
-
for (var
|
|
877
|
-
|
|
878
|
-
|
|
876
|
+
for (var y = h.getAttribute("data-emotion").split(" "), v = 1; v < y.length; v++)
|
|
877
|
+
i[y[v]] = !0;
|
|
878
|
+
l.push(h);
|
|
879
879
|
}
|
|
880
880
|
);
|
|
881
|
-
var
|
|
881
|
+
var p, f = [Zr, et];
|
|
882
882
|
{
|
|
883
|
-
var
|
|
884
|
-
|
|
885
|
-
})],
|
|
886
|
-
return
|
|
883
|
+
var c, u = [Gr, Xr(function(h) {
|
|
884
|
+
c.insert(h);
|
|
885
|
+
})], I = Hr(f.concat(a, u)), _ = function(y) {
|
|
886
|
+
return ce(qr(y), I);
|
|
887
887
|
};
|
|
888
|
-
|
|
889
|
-
|
|
888
|
+
p = function(y, v, g, T) {
|
|
889
|
+
c = g, _(y ? y + "{" + v.styles + "}" : v.styles), T && (w.inserted[v.name] = !0);
|
|
890
890
|
};
|
|
891
891
|
}
|
|
892
|
-
var
|
|
893
|
-
key:
|
|
894
|
-
sheet: new
|
|
895
|
-
key:
|
|
892
|
+
var w = {
|
|
893
|
+
key: t,
|
|
894
|
+
sheet: new Tr({
|
|
895
|
+
key: t,
|
|
896
896
|
container: s,
|
|
897
897
|
nonce: r.nonce,
|
|
898
898
|
speedy: r.speedy,
|
|
@@ -900,60 +900,60 @@ var mt = function(r, n, i, a) {
|
|
|
900
900
|
insertionPoint: r.insertionPoint
|
|
901
901
|
}),
|
|
902
902
|
nonce: r.nonce,
|
|
903
|
-
inserted:
|
|
903
|
+
inserted: i,
|
|
904
904
|
registered: {},
|
|
905
|
-
insert:
|
|
905
|
+
insert: p
|
|
906
906
|
};
|
|
907
|
-
return
|
|
908
|
-
},
|
|
909
|
-
function
|
|
910
|
-
var
|
|
911
|
-
return
|
|
912
|
-
e[a] !== void 0 ? r.push(e[a] + ";") : a && (
|
|
913
|
-
}),
|
|
907
|
+
return w.sheet.hydrate(l), w;
|
|
908
|
+
}, at = !0;
|
|
909
|
+
function it(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;
|
|
914
914
|
}
|
|
915
|
-
var
|
|
916
|
-
var a = r.key + "-" +
|
|
915
|
+
var yr = function(r, t, n) {
|
|
916
|
+
var a = 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
|
-
(
|
|
922
|
+
(n === !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
|
-
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
var a = r.key + "-" +
|
|
930
|
-
if (r.inserted[
|
|
931
|
-
var
|
|
926
|
+
at === !1) && r.registered[a] === void 0 && (r.registered[a] = t.styles);
|
|
927
|
+
}, ot = function(r, t, n) {
|
|
928
|
+
yr(r, t, n);
|
|
929
|
+
var a = r.key + "-" + t.name;
|
|
930
|
+
if (r.inserted[t.name] === void 0) {
|
|
931
|
+
var i = t;
|
|
932
932
|
do
|
|
933
|
-
r.insert(
|
|
934
|
-
while (
|
|
933
|
+
r.insert(t === i ? "." + a : "", i, r.sheet, !0), i = i.next;
|
|
934
|
+
while (i !== void 0);
|
|
935
935
|
}
|
|
936
936
|
};
|
|
937
|
-
function
|
|
938
|
-
for (var r = 0,
|
|
939
|
-
|
|
940
|
-
(
|
|
941
|
-
|
|
942
|
-
(
|
|
937
|
+
function st(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): */
|
|
940
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */
|
|
941
|
+
t >>> 24, r = /* Math.imul(k, m): */
|
|
942
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
943
943
|
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
|
|
944
944
|
switch (a) {
|
|
945
945
|
case 3:
|
|
946
|
-
r ^= (e.charCodeAt(
|
|
946
|
+
r ^= (e.charCodeAt(n + 2) & 255) << 16;
|
|
947
947
|
case 2:
|
|
948
|
-
r ^= (e.charCodeAt(
|
|
948
|
+
r ^= (e.charCodeAt(n + 1) & 255) << 8;
|
|
949
949
|
case 1:
|
|
950
|
-
r ^= e.charCodeAt(
|
|
950
|
+
r ^= e.charCodeAt(n) & 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
|
|
956
|
+
var lt = {
|
|
957
957
|
animationIterationCount: 1,
|
|
958
958
|
aspectRatio: 1,
|
|
959
959
|
borderImageOutset: 1,
|
|
@@ -1002,221 +1002,221 @@ var _t = {
|
|
|
1002
1002
|
strokeMiterlimit: 1,
|
|
1003
1003
|
strokeOpacity: 1,
|
|
1004
1004
|
strokeWidth: 1
|
|
1005
|
-
},
|
|
1005
|
+
}, ct = /[A-Z]|^ms/g, ut = /_EMO_([^_]+?)_([^]*?)_EMO_/g, mr = function(r) {
|
|
1006
1006
|
return r.charCodeAt(1) === 45;
|
|
1007
|
-
},
|
|
1007
|
+
}, Ze = function(r) {
|
|
1008
1008
|
return r != null && typeof r != "boolean";
|
|
1009
|
-
},
|
|
1010
|
-
return
|
|
1011
|
-
}),
|
|
1009
|
+
}, ze = /* @__PURE__ */ pr(function(e) {
|
|
1010
|
+
return mr(e) ? e : e.replace(ct, "-$&").toLowerCase();
|
|
1011
|
+
}), er = function(r, t) {
|
|
1012
1012
|
switch (r) {
|
|
1013
1013
|
case "animation":
|
|
1014
1014
|
case "animationName":
|
|
1015
|
-
if (typeof
|
|
1016
|
-
return
|
|
1017
|
-
return
|
|
1015
|
+
if (typeof t == "string")
|
|
1016
|
+
return t.replace(ut, function(n, a, i) {
|
|
1017
|
+
return ne = {
|
|
1018
1018
|
name: a,
|
|
1019
|
-
styles:
|
|
1020
|
-
next:
|
|
1019
|
+
styles: i,
|
|
1020
|
+
next: ne
|
|
1021
1021
|
}, a;
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
|
-
return
|
|
1024
|
+
return lt[r] !== 1 && !mr(r) && typeof t == "number" && t !== 0 ? t + "px" : t;
|
|
1025
1025
|
};
|
|
1026
|
-
function
|
|
1027
|
-
if (
|
|
1026
|
+
function Pe(e, r, t) {
|
|
1027
|
+
if (t == null)
|
|
1028
1028
|
return "";
|
|
1029
|
-
var
|
|
1030
|
-
if (
|
|
1031
|
-
return
|
|
1032
|
-
switch (typeof
|
|
1029
|
+
var n = t;
|
|
1030
|
+
if (n.__emotion_styles !== void 0)
|
|
1031
|
+
return n;
|
|
1032
|
+
switch (typeof t) {
|
|
1033
1033
|
case "boolean":
|
|
1034
1034
|
return "";
|
|
1035
1035
|
case "object": {
|
|
1036
|
-
var a =
|
|
1036
|
+
var a = t;
|
|
1037
1037
|
if (a.anim === 1)
|
|
1038
|
-
return
|
|
1038
|
+
return ne = {
|
|
1039
1039
|
name: a.name,
|
|
1040
1040
|
styles: a.styles,
|
|
1041
|
-
next:
|
|
1041
|
+
next: ne
|
|
1042
1042
|
}, a.name;
|
|
1043
|
-
var
|
|
1044
|
-
if (
|
|
1045
|
-
var s =
|
|
1043
|
+
var i = t;
|
|
1044
|
+
if (i.styles !== void 0) {
|
|
1045
|
+
var s = i.next;
|
|
1046
1046
|
if (s !== void 0)
|
|
1047
1047
|
for (; s !== void 0; )
|
|
1048
|
-
|
|
1048
|
+
ne = {
|
|
1049
1049
|
name: s.name,
|
|
1050
1050
|
styles: s.styles,
|
|
1051
|
-
next:
|
|
1051
|
+
next: ne
|
|
1052
1052
|
}, s = s.next;
|
|
1053
|
-
var
|
|
1054
|
-
return
|
|
1053
|
+
var l = i.styles + ";";
|
|
1054
|
+
return l;
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return dt(e, r, t);
|
|
1057
1057
|
}
|
|
1058
1058
|
case "function": {
|
|
1059
1059
|
if (e !== void 0) {
|
|
1060
|
-
var
|
|
1061
|
-
return
|
|
1060
|
+
var p = ne, f = t(e);
|
|
1061
|
+
return ne = p, Pe(e, r, f);
|
|
1062
1062
|
}
|
|
1063
1063
|
break;
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
|
-
var
|
|
1066
|
+
var c = t;
|
|
1067
1067
|
if (r == null)
|
|
1068
|
-
return
|
|
1069
|
-
var
|
|
1070
|
-
return
|
|
1068
|
+
return c;
|
|
1069
|
+
var u = r[c];
|
|
1070
|
+
return u !== void 0 ? u : c;
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
var
|
|
1074
|
-
if (Array.isArray(
|
|
1075
|
-
for (var a = 0; a <
|
|
1076
|
-
|
|
1072
|
+
function dt(e, r, t) {
|
|
1073
|
+
var n = "";
|
|
1074
|
+
if (Array.isArray(t))
|
|
1075
|
+
for (var a = 0; a < t.length; a++)
|
|
1076
|
+
n += Pe(e, r, t[a]) + ";";
|
|
1077
1077
|
else
|
|
1078
|
-
for (var
|
|
1079
|
-
var s =
|
|
1078
|
+
for (var i in t) {
|
|
1079
|
+
var s = t[i];
|
|
1080
1080
|
if (typeof s != "object") {
|
|
1081
|
-
var
|
|
1082
|
-
r != null && r[
|
|
1081
|
+
var l = s;
|
|
1082
|
+
r != null && r[l] !== void 0 ? n += i + "{" + r[l] + "}" : Ze(l) && (n += ze(i) + ":" + er(i, l) + ";");
|
|
1083
1083
|
} else if (Array.isArray(s) && typeof s[0] == "string" && (r == null || r[s[0]] === void 0))
|
|
1084
|
-
for (var
|
|
1085
|
-
|
|
1084
|
+
for (var p = 0; p < s.length; p++)
|
|
1085
|
+
Ze(s[p]) && (n += ze(i) + ":" + er(i, s[p]) + ";");
|
|
1086
1086
|
else {
|
|
1087
|
-
var
|
|
1088
|
-
switch (
|
|
1087
|
+
var f = Pe(e, r, s);
|
|
1088
|
+
switch (i) {
|
|
1089
1089
|
case "animation":
|
|
1090
1090
|
case "animationName": {
|
|
1091
|
-
|
|
1091
|
+
n += ze(i) + ":" + f + ";";
|
|
1092
1092
|
break;
|
|
1093
1093
|
}
|
|
1094
1094
|
default:
|
|
1095
|
-
|
|
1095
|
+
n += i + "{" + f + "}";
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
|
-
return
|
|
1099
|
+
return n;
|
|
1100
1100
|
}
|
|
1101
|
-
var
|
|
1102
|
-
function
|
|
1101
|
+
var rr = /label:\s*([^\s;{]+)\s*(;|$)/g, ne;
|
|
1102
|
+
function ft(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
|
|
1106
|
-
|
|
1107
|
-
var
|
|
1108
|
-
if (
|
|
1109
|
-
|
|
1105
|
+
var n = !0, a = "";
|
|
1106
|
+
ne = void 0;
|
|
1107
|
+
var i = e[0];
|
|
1108
|
+
if (i == null || i.raw === void 0)
|
|
1109
|
+
n = !1, a += Pe(t, r, i);
|
|
1110
1110
|
else {
|
|
1111
|
-
var s =
|
|
1111
|
+
var s = i;
|
|
1112
1112
|
a += s[0];
|
|
1113
1113
|
}
|
|
1114
|
-
for (var
|
|
1115
|
-
if (a +=
|
|
1116
|
-
var
|
|
1117
|
-
a +=
|
|
1114
|
+
for (var l = 1; l < e.length; l++)
|
|
1115
|
+
if (a += Pe(t, r, e[l]), n) {
|
|
1116
|
+
var p = i;
|
|
1117
|
+
a += p[l];
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1120
|
-
for (var
|
|
1121
|
-
|
|
1122
|
-
var
|
|
1119
|
+
rr.lastIndex = 0;
|
|
1120
|
+
for (var f = "", c; (c = rr.exec(a)) !== null; )
|
|
1121
|
+
f += "-" + c[1];
|
|
1122
|
+
var u = st(a) + f;
|
|
1123
1123
|
return {
|
|
1124
|
-
name:
|
|
1124
|
+
name: u,
|
|
1125
1125
|
styles: a,
|
|
1126
|
-
next:
|
|
1126
|
+
next: ne
|
|
1127
1127
|
};
|
|
1128
1128
|
}
|
|
1129
|
-
var
|
|
1129
|
+
var pt = function(r) {
|
|
1130
1130
|
return r();
|
|
1131
|
-
},
|
|
1131
|
+
}, ht = ie.useInsertionEffect ? ie.useInsertionEffect : !1, yt = ht || pt, vr = /* @__PURE__ */ ie.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__ */
|
|
1138
|
+
typeof HTMLElement < "u" ? /* @__PURE__ */ nt({
|
|
1139
1139
|
key: "css"
|
|
1140
1140
|
}) : null
|
|
1141
1141
|
);
|
|
1142
|
-
|
|
1143
|
-
var
|
|
1144
|
-
return /* @__PURE__ */
|
|
1145
|
-
var a =
|
|
1146
|
-
return r(
|
|
1142
|
+
vr.Provider;
|
|
1143
|
+
var mt = function(r) {
|
|
1144
|
+
return /* @__PURE__ */ wr(function(t, n) {
|
|
1145
|
+
var a = ir(vr);
|
|
1146
|
+
return r(t, a, n);
|
|
1147
1147
|
});
|
|
1148
|
-
},
|
|
1148
|
+
}, vt = /* @__PURE__ */ ie.createContext({}), bt = /^((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)-.*))$/, gt = /* @__PURE__ */ pr(
|
|
1149
1149
|
function(e) {
|
|
1150
|
-
return
|
|
1150
|
+
return bt.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
1151
1151
|
}
|
|
1152
1152
|
/* Z+1 */
|
|
1153
|
-
),
|
|
1153
|
+
), xt = gt, Pt = function(r) {
|
|
1154
1154
|
return r !== "theme";
|
|
1155
|
-
},
|
|
1155
|
+
}, tr = 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 ?
|
|
1160
|
-
},
|
|
1159
|
+
r.charCodeAt(0) > 96 ? xt : Pt;
|
|
1160
|
+
}, nr = function(r, t, n) {
|
|
1161
1161
|
var a;
|
|
1162
|
-
if (
|
|
1163
|
-
var
|
|
1164
|
-
a = r.__emotion_forwardProp &&
|
|
1165
|
-
return r.__emotion_forwardProp(s) &&
|
|
1166
|
-
} :
|
|
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;
|
|
1167
1167
|
}
|
|
1168
|
-
return typeof a != "function" &&
|
|
1169
|
-
},
|
|
1170
|
-
var
|
|
1171
|
-
return
|
|
1172
|
-
return
|
|
1168
|
+
return typeof a != "function" && n && (a = r.__emotion_forwardProp), a;
|
|
1169
|
+
}, _t = function(r) {
|
|
1170
|
+
var t = r.cache, n = r.serialized, a = r.isStringTag;
|
|
1171
|
+
return yr(t, n, a), yt(function() {
|
|
1172
|
+
return ot(t, n, a);
|
|
1173
1173
|
}), null;
|
|
1174
|
-
},
|
|
1175
|
-
var
|
|
1176
|
-
|
|
1177
|
-
var
|
|
1174
|
+
}, wt = 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 l = nr(r, t, n), p = l || tr(a), f = !p("as");
|
|
1178
1178
|
return function() {
|
|
1179
|
-
var
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1179
|
+
var c = arguments, u = n && r.__emotion_styles !== void 0 ? r.__emotion_styles.slice(0) : [];
|
|
1180
|
+
if (i !== void 0 && u.push("label:" + i + ";"), c[0] == null || c[0].raw === void 0)
|
|
1181
|
+
u.push.apply(u, c);
|
|
1182
1182
|
else {
|
|
1183
|
-
var
|
|
1184
|
-
|
|
1185
|
-
for (var
|
|
1186
|
-
|
|
1183
|
+
var I = c[0];
|
|
1184
|
+
u.push(I[0]);
|
|
1185
|
+
for (var _ = c.length, w = 1; w < _; w++)
|
|
1186
|
+
u.push(c[w], I[w]);
|
|
1187
1187
|
}
|
|
1188
|
-
var h =
|
|
1189
|
-
var
|
|
1190
|
-
if (
|
|
1191
|
-
|
|
1192
|
-
for (var
|
|
1193
|
-
|
|
1194
|
-
|
|
1188
|
+
var h = mt(function(y, v, g) {
|
|
1189
|
+
var T = f && y.as || a, N = "", z = [], R = y;
|
|
1190
|
+
if (y.theme == null) {
|
|
1191
|
+
R = {};
|
|
1192
|
+
for (var b in y)
|
|
1193
|
+
R[b] = y[b];
|
|
1194
|
+
R.theme = ie.useContext(vt);
|
|
1195
1195
|
}
|
|
1196
|
-
typeof
|
|
1197
|
-
var J =
|
|
1198
|
-
|
|
1199
|
-
var
|
|
1200
|
-
for (var
|
|
1201
|
-
|
|
1202
|
-
return
|
|
1203
|
-
cache:
|
|
1196
|
+
typeof y.className == "string" ? N = it(v.registered, z, y.className) : y.className != null && (N = y.className + " ");
|
|
1197
|
+
var J = ft(u.concat(z), v.registered, R);
|
|
1198
|
+
N += v.key + "-" + J.name, s !== void 0 && (N += " " + s);
|
|
1199
|
+
var q = f && l === void 0 ? tr(T) : p, C = {};
|
|
1200
|
+
for (var A in y)
|
|
1201
|
+
f && A === "as" || q(A) && (C[A] = y[A]);
|
|
1202
|
+
return C.className = N, g && (C.ref = g), /* @__PURE__ */ ie.createElement(ie.Fragment, null, /* @__PURE__ */ ie.createElement(_t, {
|
|
1203
|
+
cache: v,
|
|
1204
1204
|
serialized: J,
|
|
1205
|
-
isStringTag: typeof
|
|
1206
|
-
}), /* @__PURE__ */
|
|
1205
|
+
isStringTag: typeof T == "string"
|
|
1206
|
+
}), /* @__PURE__ */ ie.createElement(T, C));
|
|
1207
1207
|
});
|
|
1208
|
-
return h.displayName =
|
|
1208
|
+
return h.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", h.defaultProps = r.defaultProps, h.__emotion_real = h, h.__emotion_base = a, h.__emotion_styles = u, h.__emotion_forwardProp = l, Object.defineProperty(h, "toString", {
|
|
1209
1209
|
value: function() {
|
|
1210
1210
|
return "." + s;
|
|
1211
1211
|
}
|
|
1212
|
-
}), h.withComponent = function(
|
|
1213
|
-
var
|
|
1214
|
-
shouldForwardProp:
|
|
1212
|
+
}), h.withComponent = function(y, v) {
|
|
1213
|
+
var g = e(y, Ve({}, t, v, {
|
|
1214
|
+
shouldForwardProp: nr(h, v, !0)
|
|
1215
1215
|
}));
|
|
1216
|
-
return
|
|
1216
|
+
return g.apply(void 0, u);
|
|
1217
1217
|
}, h;
|
|
1218
1218
|
};
|
|
1219
|
-
},
|
|
1219
|
+
}, Et = [
|
|
1220
1220
|
"a",
|
|
1221
1221
|
"abbr",
|
|
1222
1222
|
"address",
|
|
@@ -1352,11 +1352,11 @@ var Ct = function(r) {
|
|
|
1352
1352
|
"svg",
|
|
1353
1353
|
"text",
|
|
1354
1354
|
"tspan"
|
|
1355
|
-
],
|
|
1356
|
-
|
|
1357
|
-
|
|
1355
|
+
], de = wt.bind(null);
|
|
1356
|
+
Et.forEach(function(e) {
|
|
1357
|
+
de[e] = de(e);
|
|
1358
1358
|
});
|
|
1359
|
-
const
|
|
1359
|
+
const kt = de.div`
|
|
1360
1360
|
display: flex;
|
|
1361
1361
|
align-items: center;
|
|
1362
1362
|
justify-content: center;
|
|
@@ -1397,11 +1397,11 @@ const Dt = Ae.div`
|
|
|
1397
1397
|
return "";
|
|
1398
1398
|
}
|
|
1399
1399
|
}}
|
|
1400
|
-
`,
|
|
1401
|
-
|
|
1402
|
-
/* @__PURE__ */
|
|
1403
|
-
a && /* @__PURE__ */
|
|
1404
|
-
] }),
|
|
1400
|
+
`, Oe = ({ type: e, children: r, className: t, icon: n, action: a }) => /* @__PURE__ */ F.jsxs(kt, { type: e, className: t, children: [
|
|
1401
|
+
n && /* @__PURE__ */ F.jsx("span", { children: n }),
|
|
1402
|
+
/* @__PURE__ */ F.jsx("span", { children: r }),
|
|
1403
|
+
a && /* @__PURE__ */ F.jsx("span", { children: a })
|
|
1404
|
+
] }), ar = de.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 Dt = Ae.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
|
-
`,
|
|
1416
|
+
`, St = de.div`
|
|
1417
1417
|
position: fixed;
|
|
1418
1418
|
top: 0;
|
|
1419
1419
|
left: 0;
|
|
@@ -1425,949 +1425,792 @@ const Dt = Ae.div`
|
|
|
1425
1425
|
align-items: center;
|
|
1426
1426
|
z-index: 1000;
|
|
1427
1427
|
pointer-events: auto;
|
|
1428
|
-
`,
|
|
1428
|
+
`, It = de.div`
|
|
1429
1429
|
position: relative;
|
|
1430
|
-
|
|
1430
|
+
height: 80vh;
|
|
1431
|
+
width: auto;
|
|
1431
1432
|
aspect-ratio: 9 / 16;
|
|
1432
|
-
|
|
1433
|
+
max-width: 90vw;
|
|
1434
|
+
max-height: 90vh;
|
|
1433
1435
|
z-index: 1001;
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
let s = null, c, f = 0;
|
|
1439
|
-
const m = 3;
|
|
1440
|
-
let u;
|
|
1436
|
+
`, br = "https://host.vpplayer.tech", Rt = (e) => `${br}/player/${e}/vpplayer.js`, gr = (e, r) => e ? `vp-player-${e}` : r ? `vp-player-default-${r}` : "vp-player-default", Ie = /* @__PURE__ */ new Map(), Ct = (e, r) => {
|
|
1437
|
+
const [t, n] = le(!1), [a, i] = le(null);
|
|
1438
|
+
return Me(() => {
|
|
1439
|
+
let s;
|
|
1441
1440
|
try {
|
|
1442
|
-
|
|
1443
|
-
} catch (
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1441
|
+
s = r || Rt(e || "latest");
|
|
1442
|
+
} catch (f) {
|
|
1443
|
+
const c = f instanceof Error ? f.message : String(f);
|
|
1444
|
+
i(`Failed to resolve script URL: ${c}`);
|
|
1446
1445
|
return;
|
|
1447
1446
|
}
|
|
1448
|
-
if (
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
}, 1e4), s.onload = () => {
|
|
1460
|
-
clearTimeout(c), Ze.set(u, !0), i(!0), t(null);
|
|
1461
|
-
}, s.onerror = () => {
|
|
1462
|
-
clearTimeout(c), f++, f < m ? setTimeout(x, 1e3 * f) : (i(!1), t(`Failed to load VP Player script after ${m} attempts: ${u}`));
|
|
1463
|
-
}, document.body.appendChild(s);
|
|
1464
|
-
};
|
|
1465
|
-
return x(), () => {
|
|
1466
|
-
clearTimeout(c), s && document.body.contains(s) && document.body.removeChild(s);
|
|
1467
|
-
};
|
|
1468
|
-
}, [e, r]), { isLoaded: n, error: a };
|
|
1469
|
-
}, Be = /* @__PURE__ */ new Map(), Yt = 3e4, er = 5, Ht = ({
|
|
1470
|
-
projectId: e,
|
|
1471
|
-
videoId: r,
|
|
1472
|
-
playlistId: n,
|
|
1473
|
-
videoUrl: i
|
|
1474
|
-
}) => {
|
|
1475
|
-
const [a, t] = de(null), [s, c] = de(null), [f, m] = de(!1), [u, p] = de(null);
|
|
1476
|
-
return Se(() => {
|
|
1477
|
-
const x = r ? `video:${r}` : n ? `playlist:${n}` : null;
|
|
1478
|
-
if (i || !r && !n) {
|
|
1479
|
-
t(i || null), c(null), m(!1), p(null);
|
|
1480
|
-
return;
|
|
1481
|
-
}
|
|
1482
|
-
if (r && !e) {
|
|
1483
|
-
m(!1), p("projectId is required for single video fetch");
|
|
1484
|
-
return;
|
|
1485
|
-
}
|
|
1486
|
-
if (x && Be.has(x)) {
|
|
1487
|
-
const b = Be.get(x);
|
|
1488
|
-
t(b.url), c(b.playlist), m(!1), p(null);
|
|
1489
|
-
return;
|
|
1490
|
-
}
|
|
1491
|
-
let g = !0;
|
|
1492
|
-
const E = new AbortController(), h = E.signal, w = setTimeout(async () => {
|
|
1493
|
-
var L, F;
|
|
1494
|
-
if (!g)
|
|
1495
|
-
return;
|
|
1496
|
-
m(!0), p(null);
|
|
1497
|
-
let b = 0;
|
|
1498
|
-
for (; b < er && g; )
|
|
1499
|
-
try {
|
|
1500
|
-
const k = r && !n ? Bt(e, r) : Ut(n), I = setTimeout(() => E.abort(), Yt), J = await fetch(k, {
|
|
1501
|
-
method: "GET",
|
|
1502
|
-
headers: {
|
|
1503
|
-
Accept: "application/json",
|
|
1504
|
-
"Cache-Control": "no-cache"
|
|
1505
|
-
},
|
|
1506
|
-
signal: h
|
|
1507
|
-
});
|
|
1508
|
-
if (clearTimeout(I), !J.ok)
|
|
1509
|
-
throw new Error(`Fetch failed with status ${J.status}`);
|
|
1510
|
-
const Y = await J.json();
|
|
1511
|
-
if (!g)
|
|
1512
|
-
return;
|
|
1513
|
-
if (r && !n) {
|
|
1514
|
-
const P = (F = (L = Y.result) == null ? void 0 : L.items) == null ? void 0 : F.find((y) => y.mediaId === r);
|
|
1515
|
-
if (!(P != null && P.playbackUrl)) throw new Error("Invalid video data");
|
|
1516
|
-
t(P.playbackUrl), c(null), x && Be.set(x, { url: P.playbackUrl, playlist: null });
|
|
1517
|
-
} else {
|
|
1518
|
-
const P = Y.videos;
|
|
1519
|
-
if (!Array.isArray(P))
|
|
1520
|
-
throw new Error("Invalid playlist format");
|
|
1521
|
-
c(P), t(null), x && Be.set(x, { url: null, playlist: P });
|
|
1522
|
-
}
|
|
1523
|
-
break;
|
|
1524
|
-
} catch (k) {
|
|
1525
|
-
if (h.aborted) {
|
|
1526
|
-
g && p("Request timed out");
|
|
1527
|
-
break;
|
|
1528
|
-
}
|
|
1529
|
-
if (b++, b >= er) {
|
|
1530
|
-
const I = k instanceof Error ? k.message : String(k);
|
|
1531
|
-
g && p(`Failed after ${er} attempts: ${I}`);
|
|
1532
|
-
} else
|
|
1533
|
-
await new Promise((I) => setTimeout(I, 2e3));
|
|
1534
|
-
}
|
|
1535
|
-
g && m(!1);
|
|
1536
|
-
}, 100);
|
|
1537
|
-
return () => {
|
|
1538
|
-
g = !1, clearTimeout(w), E.abort();
|
|
1539
|
-
};
|
|
1540
|
-
}, [e, r, n, i]), { fetchedPlaybackUrl: a, fetchedPlaylist: s, isLoading: f, error: u };
|
|
1541
|
-
}, Gt = ({
|
|
1542
|
-
playerId: e,
|
|
1543
|
-
playerInstanceRef: r,
|
|
1544
|
-
playerRef: n,
|
|
1545
|
-
videoData: i,
|
|
1546
|
-
trackingMetadata: a,
|
|
1547
|
-
callbacks: t
|
|
1548
|
-
}) => {
|
|
1549
|
-
const s = K(!1), c = K(!1), f = K(!1), m = K(0), u = K({}), p = K(null), x = K(null), g = K(null), E = K(null), h = K(!1), v = K(!1);
|
|
1550
|
-
Se(() => {
|
|
1551
|
-
if (!(t && (t.onPlayerStart || t.onPlayerPlay || t.onPlayerPause || t.onPlayerResume || t.onPlayerEnd || t.onPlayerProgressEvery10Seconds || t.onPlayerProgressAt20Seconds || t.onPlayerQuartile25 || t.onPlayerQuartile50 || t.onPlayerQuartile75 || t.onPlayerNext || t.onPlayerPrevious || t.onPlayerEvent)))
|
|
1552
|
-
return;
|
|
1553
|
-
const b = () => {
|
|
1554
|
-
s.current = !1, c.current = !1, f.current = !1, m.current = 0, u.current = {};
|
|
1555
|
-
}, L = () => {
|
|
1556
|
-
var B;
|
|
1557
|
-
const y = document.getElementById(e);
|
|
1558
|
-
if (!y) return null;
|
|
1559
|
-
if (y.querySelectorAll("video").length > 1 && r.current) {
|
|
1560
|
-
const U = r.current, M = U.videoIndex ?? ((B = U.playlist) == null ? void 0 : B.playlistVideoIndex) ?? 0, j = y.querySelector(`video[id="${M}"]`);
|
|
1561
|
-
if (j)
|
|
1562
|
-
return j;
|
|
1563
|
-
const z = y.querySelector("video.active");
|
|
1564
|
-
if (z)
|
|
1565
|
-
return z;
|
|
1566
|
-
}
|
|
1567
|
-
return y.querySelector("video");
|
|
1568
|
-
}, F = () => {
|
|
1569
|
-
const y = L();
|
|
1570
|
-
if (!y)
|
|
1571
|
-
return !1;
|
|
1572
|
-
const S = (l, d) => {
|
|
1573
|
-
var H, fe, V, ee, pe, ne, _e, De, ce, we, ve, Je, Qe, ke;
|
|
1574
|
-
const $ = Date.now();
|
|
1575
|
-
if (!(l === "player_start" && s.current)) {
|
|
1576
|
-
switch (E.current = { type: l, time: $ }, l) {
|
|
1577
|
-
case "player_start":
|
|
1578
|
-
(H = t.onPlayerStart) == null || H.call(t, l);
|
|
1579
|
-
break;
|
|
1580
|
-
case "player_play":
|
|
1581
|
-
(fe = t.onPlayerPlay) == null || fe.call(t, l);
|
|
1582
|
-
break;
|
|
1583
|
-
case "player_pause":
|
|
1584
|
-
(V = t.onPlayerPause) == null || V.call(t, l);
|
|
1585
|
-
break;
|
|
1586
|
-
case "player_resume":
|
|
1587
|
-
(ee = t.onPlayerResume) == null || ee.call(t, l);
|
|
1588
|
-
break;
|
|
1589
|
-
case "player_end":
|
|
1590
|
-
(pe = t.onPlayerEnd) == null || pe.call(t, l);
|
|
1591
|
-
break;
|
|
1592
|
-
case "player_progress_every_10_seconds":
|
|
1593
|
-
d !== void 0 && ((ne = t.onPlayerProgressEvery10Seconds) == null || ne.call(t, l, d));
|
|
1594
|
-
break;
|
|
1595
|
-
case "player_progress_at_20_seconds":
|
|
1596
|
-
d !== void 0 && ((_e = t.onPlayerProgressAt20Seconds) == null || _e.call(t, l, d));
|
|
1597
|
-
break;
|
|
1598
|
-
case "player_quartile_25":
|
|
1599
|
-
d !== void 0 && ((De = t.onPlayerQuartile25) == null || De.call(t, l, d));
|
|
1600
|
-
break;
|
|
1601
|
-
case "player_quartile_50":
|
|
1602
|
-
d !== void 0 && ((ce = t.onPlayerQuartile50) == null || ce.call(t, l, d));
|
|
1603
|
-
break;
|
|
1604
|
-
case "player_quartile_75":
|
|
1605
|
-
d !== void 0 && ((we = t.onPlayerQuartile75) == null || we.call(t, l, d));
|
|
1606
|
-
break;
|
|
1607
|
-
case "player_next":
|
|
1608
|
-
(ve = t.onPlayerNext) == null || ve.call(t, l);
|
|
1609
|
-
break;
|
|
1610
|
-
case "player_previous":
|
|
1611
|
-
(Je = t.onPlayerPrevious) == null || Je.call(t, l);
|
|
1612
|
-
break;
|
|
1613
|
-
}
|
|
1614
|
-
d !== void 0 && (l === "player_progress_every_10_seconds" || l === "player_progress_at_20_seconds" || l === "player_quartile_25" || l === "player_quartile_50" || l === "player_quartile_75") ? (Qe = t.onPlayerEvent) == null || Qe.call(t, l, d) : (ke = t.onPlayerEvent) == null || ke.call(t, l);
|
|
1615
|
-
}
|
|
1616
|
-
}, B = () => L() === y, U = () => {
|
|
1617
|
-
h.current || B() && (s.current || (S("player_start"), s.current = !0));
|
|
1618
|
-
}, M = () => {
|
|
1619
|
-
h.current || B() && (s.current || (S("player_start"), s.current = !0), f.current ? S("player_resume") : c.current && v.current ? (S("player_play"), v.current = !1) : c.current || (S("player_play"), c.current = !0), f.current = !1);
|
|
1620
|
-
}, j = () => {
|
|
1621
|
-
y.ended || h.current || setTimeout(() => {
|
|
1622
|
-
var l;
|
|
1623
|
-
if (!h.current) {
|
|
1624
|
-
if (r.current && x.current !== null) {
|
|
1625
|
-
const d = r.current;
|
|
1626
|
-
if ((d.videoIndex ?? ((l = d.playlist) == null ? void 0 : l.playlistVideoIndex) ?? 0) !== x.current)
|
|
1627
|
-
return;
|
|
1628
|
-
}
|
|
1629
|
-
S("player_pause"), f.current = !0;
|
|
1630
|
-
}
|
|
1631
|
-
}, 200);
|
|
1632
|
-
}, z = () => {
|
|
1633
|
-
S("player_end");
|
|
1634
|
-
}, O = () => {
|
|
1635
|
-
if (h.current) return;
|
|
1636
|
-
const l = y.duration > 0 ? y.currentTime / y.duration * 100 : 0, d = Math.floor(y.currentTime);
|
|
1637
|
-
d - m.current >= 10 && (m.current = d, S("player_progress_every_10_seconds", d)), d >= 20 && !u.current[20] && (u.current[20] = !0, S("player_progress_at_20_seconds", d)), l >= 25 && !u.current[25] && (u.current[25] = !0, S("player_quartile_25", d)), l >= 50 && !u.current[50] && (u.current[50] = !0, S("player_quartile_50", d)), l >= 75 && !u.current[75] && (u.current[75] = !0, S("player_quartile_75", d));
|
|
1638
|
-
}, Q = () => {
|
|
1639
|
-
v.current = !0;
|
|
1640
|
-
};
|
|
1641
|
-
if (g.current && g.current !== y) {
|
|
1642
|
-
const l = g.current;
|
|
1643
|
-
l.removeEventListener("loadedmetadata", U), l.removeEventListener("play", M), l.removeEventListener("pause", j), l.removeEventListener("ended", z), l.removeEventListener("timeupdate", O), l.removeEventListener("seeking", Q);
|
|
1447
|
+
if (!Ie.has(s))
|
|
1448
|
+
if (document.querySelector(
|
|
1449
|
+
`script[src="${s}"]`
|
|
1450
|
+
))
|
|
1451
|
+
Ie.set(s, Promise.resolve());
|
|
1452
|
+
else {
|
|
1453
|
+
const c = new Promise((u, I) => {
|
|
1454
|
+
const _ = document.createElement("script");
|
|
1455
|
+
_.src = s, _.async = !0, _.onload = () => u(), _.onerror = () => I(new Error(`Failed to load script: ${s}`)), document.body.appendChild(_);
|
|
1456
|
+
});
|
|
1457
|
+
Ie.set(s, c);
|
|
1644
1458
|
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
};
|
|
1654
|
-
return q && q.addEventListener("click", o, !0), p.current = () => {
|
|
1655
|
-
const l = g.current || y;
|
|
1656
|
-
l.removeEventListener("loadedmetadata", U), l.removeEventListener("play", M), l.removeEventListener("pause", j), l.removeEventListener("ended", z), l.removeEventListener("timeupdate", O), l.removeEventListener("seeking", Q), q == null || q.removeEventListener("click", o, !0), g.current = null;
|
|
1657
|
-
}, !0;
|
|
1459
|
+
let l = !0;
|
|
1460
|
+
const p = Ie.get(s);
|
|
1461
|
+
return p && p.then(() => {
|
|
1462
|
+
l && (n(!0), i(null));
|
|
1463
|
+
}).catch((f) => {
|
|
1464
|
+
l && (n(!1), i(f instanceof Error ? f.message : String(f)));
|
|
1465
|
+
}), () => {
|
|
1466
|
+
l = !1;
|
|
1658
1467
|
};
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
B && B.length > 1 && y.videoIndex !== void 0 && (k = window.setInterval(() => {
|
|
1664
|
-
var M, j, z, O;
|
|
1665
|
-
try {
|
|
1666
|
-
const Q = y.videoIndex ?? ((M = y.playlist) == null ? void 0 : M.playlistVideoIndex) ?? 0;
|
|
1667
|
-
if (x.current !== null && Q !== x.current) {
|
|
1668
|
-
const q = Q > x.current, o = q ? "player_next" : "player_previous";
|
|
1669
|
-
t && !h.current && (q ? (j = t.onPlayerNext) == null || j.call(t, o) : (z = t.onPlayerPrevious) == null || z.call(t, o), (O = t.onPlayerEvent) == null || O.call(t, o)), h.current = !0, p.current && (p.current(), p.current = null), s.current = !1, c.current = !1, f.current = !1, m.current = 0, u.current = {}, g.current = null, v.current = !1, setTimeout(() => {
|
|
1670
|
-
F(), setTimeout(() => {
|
|
1671
|
-
h.current = !1;
|
|
1672
|
-
}, 200);
|
|
1673
|
-
}, 100);
|
|
1674
|
-
}
|
|
1675
|
-
x.current = Q;
|
|
1676
|
-
} catch {
|
|
1677
|
-
}
|
|
1678
|
-
}, 500));
|
|
1679
|
-
};
|
|
1680
|
-
let J = 0;
|
|
1681
|
-
const Y = 20, P = setInterval(() => {
|
|
1682
|
-
J++, F() && !I ? (I = !0, clearInterval(P), setTimeout(() => {
|
|
1683
|
-
_();
|
|
1684
|
-
}, 1e3)) : J >= Y && clearInterval(P);
|
|
1685
|
-
}, 500);
|
|
1686
|
-
return () => {
|
|
1687
|
-
clearInterval(P), k !== null && (clearInterval(k), k = null), p.current && (p.current(), p.current = null);
|
|
1688
|
-
};
|
|
1689
|
-
}, [
|
|
1690
|
-
e,
|
|
1691
|
-
i,
|
|
1692
|
-
a,
|
|
1693
|
-
t,
|
|
1694
|
-
r,
|
|
1695
|
-
n
|
|
1696
|
-
]);
|
|
1697
|
-
}, Xt = {
|
|
1698
|
-
projectId: "vp-player-projectId",
|
|
1699
|
-
// this is used only if prop projectId is not provided
|
|
1468
|
+
}, [e, r]), { isLoaded: t, error: a };
|
|
1469
|
+
}, Re = {
|
|
1470
|
+
projectId: void 0,
|
|
1471
|
+
// Set via props or config
|
|
1700
1472
|
video: {
|
|
1701
|
-
file:
|
|
1702
|
-
//
|
|
1703
|
-
playlist: {
|
|
1704
|
-
state: !0,
|
|
1705
|
-
// Enable playlist by default
|
|
1706
|
-
// If we have a playlist, we start with the first video, if any issue check value, should
|
|
1707
|
-
playlistVideoIndex: 0,
|
|
1708
|
-
// Start with the first video
|
|
1709
|
-
videos: []
|
|
1710
|
-
// Empty by default, populated via props
|
|
1711
|
-
}
|
|
1473
|
+
// NOTE: Do NOT set file: '' here - it interferes with managed mode
|
|
1474
|
+
// where the SDK resolves the video URL from videoId + projectId
|
|
1712
1475
|
},
|
|
1713
1476
|
config: {
|
|
1714
1477
|
autoplay: !0,
|
|
1715
1478
|
// Start playing automatically
|
|
1716
1479
|
muted: !0,
|
|
1717
|
-
// Start muted
|
|
1480
|
+
// Start muted (required for browser autoplay policy)
|
|
1718
1481
|
loop: !1,
|
|
1719
1482
|
// No loop by default
|
|
1720
1483
|
size: {
|
|
1721
1484
|
width: "100%",
|
|
1722
|
-
// Width
|
|
1723
1485
|
height: "30vh"
|
|
1724
|
-
// Height
|
|
1725
|
-
},
|
|
1726
|
-
controls: {
|
|
1727
|
-
settingsButton: !0,
|
|
1728
|
-
// Settings button
|
|
1729
|
-
chromecastButton: !1,
|
|
1730
|
-
// Chromecast button, false by default
|
|
1731
|
-
nextButton: !0,
|
|
1732
|
-
// False by default (single video, no playlist)
|
|
1733
|
-
fullscreenButton: !0,
|
|
1734
|
-
// Fullscreen option
|
|
1735
|
-
airplayButton: !1,
|
|
1736
|
-
// False by default
|
|
1737
|
-
bigPlayButton: !1,
|
|
1738
|
-
// False by default
|
|
1739
|
-
autopausePlayButton: !0,
|
|
1740
|
-
// Basic play/pause control enabled
|
|
1741
|
-
pictureInPictureButton: !1,
|
|
1742
|
-
// False by default
|
|
1743
|
-
relatedButton: !1,
|
|
1744
|
-
// False by default (single video)
|
|
1745
|
-
volumeButton: !0,
|
|
1746
|
-
// Volume control
|
|
1747
|
-
shareButton: !0
|
|
1748
|
-
// Enabled by default
|
|
1749
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)
|
|
1750
1489
|
}
|
|
1751
|
-
},
|
|
1490
|
+
}, xr = (e, r) => {
|
|
1491
|
+
if (!(r && !e))
|
|
1492
|
+
return e ? {
|
|
1493
|
+
play: e.bigPlayButton ?? e.autopausePlayButton ?? !0,
|
|
1494
|
+
fullscreen: e.fullscreenButton ?? !0,
|
|
1495
|
+
share: e.shareButton ?? !0,
|
|
1496
|
+
seekbar: !0,
|
|
1497
|
+
settings: e.settingsButton ?? !0,
|
|
1498
|
+
time: !0
|
|
1499
|
+
} : {
|
|
1500
|
+
play: !0,
|
|
1501
|
+
fullscreen: !0,
|
|
1502
|
+
share: !0,
|
|
1503
|
+
seekbar: !0,
|
|
1504
|
+
settings: !0,
|
|
1505
|
+
time: !0
|
|
1506
|
+
};
|
|
1507
|
+
}, At = ({
|
|
1752
1508
|
videoUrl: e,
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
isVerticalPlayer: t
|
|
1758
|
-
// Distinguish between VP Player types
|
|
1509
|
+
projectId: r,
|
|
1510
|
+
config: t = {},
|
|
1511
|
+
isVerticalPlayer: n = !1,
|
|
1512
|
+
pureMode: a = !0
|
|
1759
1513
|
}) => {
|
|
1760
|
-
var
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1514
|
+
var I, _, w, h, y, v, g, T, N, z, R, b, J, q, C, A, $;
|
|
1515
|
+
if (a)
|
|
1516
|
+
return Tt({ videoUrl: e, projectId: r, config: t, isVerticalPlayer: n });
|
|
1517
|
+
const i = { ...Re };
|
|
1518
|
+
i.video = { ...Re.video, ...t.video };
|
|
1519
|
+
let s = {
|
|
1520
|
+
...Re.config,
|
|
1521
|
+
...t.config,
|
|
1522
|
+
// Only include controls if explicitly provided by user config
|
|
1523
|
+
// Otherwise, let SDK use what's configured in the admin panel (projectId config)
|
|
1524
|
+
...((I = t.config) == null ? void 0 : I.controls) && {
|
|
1525
|
+
controls: t.config.controls
|
|
1526
|
+
},
|
|
1527
|
+
// Ensure size is merged
|
|
1528
|
+
size: {
|
|
1529
|
+
...Re.config.size,
|
|
1530
|
+
...(_ = t.config) == null ? void 0 : _.size
|
|
1531
|
+
}
|
|
1532
|
+
};
|
|
1533
|
+
if (r && (i.projectId = r), t.projectId && (i.projectId = t.projectId), n && s.controls) {
|
|
1534
|
+
const j = xr(
|
|
1535
|
+
s.controls
|
|
1536
|
+
);
|
|
1537
|
+
s = {
|
|
1764
1538
|
...s,
|
|
1765
|
-
|
|
1766
|
-
video: {
|
|
1767
|
-
...s.video,
|
|
1768
|
-
file: e,
|
|
1769
|
-
playlist: void 0
|
|
1770
|
-
},
|
|
1771
|
-
config: c
|
|
1539
|
+
controls: j
|
|
1772
1540
|
};
|
|
1773
|
-
|
|
1541
|
+
}
|
|
1542
|
+
const l = !!((h = (w = t == null ? void 0 : t.video) == null ? void 0 : w.playlist) != null && h.playlistId), p = !!((g = (v = (y = t == null ? void 0 : t.video) == null ? void 0 : y.playlist) == null ? void 0 : v.videos) != null && g.length), f = l || p, c = (T = t == null ? void 0 : t.video) == null ? void 0 : T.playlist;
|
|
1543
|
+
if (n && f) {
|
|
1544
|
+
const j = Number((c == null ? void 0 : c.playlistVideoIndex) || 0);
|
|
1545
|
+
if ((N = c == null ? void 0 : c.videos) != null && N.length) {
|
|
1546
|
+
const x = c.videos[j] || c.videos[0], Y = e || ((z = t == null ? void 0 : t.video) == null ? void 0 : z.file) || (x == null ? void 0 : x.file) || (x == null ? void 0 : x.hlsUrl), D = c.videos.map((Q) => {
|
|
1547
|
+
const G = Q;
|
|
1548
|
+
return {
|
|
1549
|
+
videoId: G.videoId || "",
|
|
1550
|
+
title: G.title || "",
|
|
1551
|
+
file: G.file || G.hlsUrl || "",
|
|
1552
|
+
thumbnailUrl: G.thumbnailUrl || G.thumbnail || "",
|
|
1553
|
+
duration: G.duration || 0
|
|
1554
|
+
};
|
|
1555
|
+
});
|
|
1556
|
+
return {
|
|
1557
|
+
...i,
|
|
1558
|
+
projectId: r || t.projectId || "",
|
|
1559
|
+
// Use top-level projectId if available
|
|
1560
|
+
video: {
|
|
1561
|
+
...i.video,
|
|
1562
|
+
videoId: (x == null ? void 0 : x.videoId) || "",
|
|
1563
|
+
file: Y,
|
|
1564
|
+
title: ((R = t.video) == null ? void 0 : R.title) || (x == null ? void 0 : x.title),
|
|
1565
|
+
thumbnail: ((b = t.video) == null ? void 0 : b.thumbnail) || (x == null ? void 0 : x.thumbnailUrl),
|
|
1566
|
+
playlist: {
|
|
1567
|
+
state: !0,
|
|
1568
|
+
playlistId: "",
|
|
1569
|
+
// Empty string - required for manual playlist mode
|
|
1570
|
+
playlistVideoIndex: j,
|
|
1571
|
+
videos: D
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1574
|
+
config: s
|
|
1575
|
+
};
|
|
1576
|
+
}
|
|
1774
1577
|
return {
|
|
1775
|
-
...
|
|
1776
|
-
projectId:
|
|
1777
|
-
|
|
1778
|
-
...s.video,
|
|
1779
|
-
file: r,
|
|
1780
|
-
playlist: void 0
|
|
1781
|
-
},
|
|
1782
|
-
config: c
|
|
1783
|
-
};
|
|
1784
|
-
if (n && n.length > 0) {
|
|
1785
|
-
const j = ((p = (u = a == null ? void 0 : a.video) == null ? void 0 : u.playlist) == null ? void 0 : p.playlistVideoIndex) ?? ((x = a == null ? void 0 : a.config) == null ? void 0 : x.playlistVideoIndex) ?? 0;
|
|
1786
|
-
return t ? {
|
|
1787
|
-
...s,
|
|
1788
|
-
projectId: i || Ie,
|
|
1789
|
-
video: {
|
|
1790
|
-
...s.video,
|
|
1791
|
-
// Set first video file (index 0) to avoid VP Player duplication
|
|
1792
|
-
videoId: (g = n[0]) == null ? void 0 : g.mediaId,
|
|
1793
|
-
// Add videoId for tracking
|
|
1794
|
-
file: (E = n[0]) == null ? void 0 : E.hlsUrl,
|
|
1795
|
-
title: (h = n[0]) == null ? void 0 : h.title,
|
|
1796
|
-
// thumbnail: fetchedPlaylist[0]?.thumbnailUrl,
|
|
1797
|
-
playlist: {
|
|
1798
|
-
state: !0,
|
|
1799
|
-
playlistId: "",
|
|
1800
|
-
// Will be set by API
|
|
1801
|
-
// Use original playlistVideoIndex - VP Player will navigate to it
|
|
1802
|
-
playlistVideoIndex: Number(j),
|
|
1803
|
-
// Remove first video from playlist to avoid duplication (already in file)
|
|
1804
|
-
videos: n.slice(1).map((O, Q) => ({
|
|
1805
|
-
videoId: O.mediaId || String(Q + 1),
|
|
1806
|
-
// Use mediaId if available
|
|
1807
|
-
title: O.title,
|
|
1808
|
-
file: O.hlsUrl,
|
|
1809
|
-
thumbnailUrl: O.thumbnailUrl,
|
|
1810
|
-
duration: O.duration
|
|
1811
|
-
}))
|
|
1812
|
-
}
|
|
1813
|
-
},
|
|
1814
|
-
config: c
|
|
1815
|
-
} : {
|
|
1816
|
-
...s,
|
|
1817
|
-
projectId: i || Ie,
|
|
1578
|
+
...i,
|
|
1579
|
+
projectId: r || t.projectId || "",
|
|
1580
|
+
// Use top-level projectId if available
|
|
1818
1581
|
video: {
|
|
1819
|
-
...
|
|
1820
|
-
|
|
1821
|
-
//
|
|
1822
|
-
file: ((b = n[Number(j)]) == null ? void 0 : b.hlsUrl) || ((L = n[0]) == null ? void 0 : L.hlsUrl) || "",
|
|
1823
|
-
title: ((F = n[Number(j)]) == null ? void 0 : F.title) || ((k = n[0]) == null ? void 0 : k.title),
|
|
1824
|
-
thumbnail: ((I = n[Number(j)]) == null ? void 0 : I.thumbnailUrl) || ((_ = n[0]) == null ? void 0 : _.thumbnailUrl),
|
|
1582
|
+
...i.video,
|
|
1583
|
+
file: e || ((J = t.video) == null ? void 0 : J.file),
|
|
1584
|
+
// Use provided videoUrl as fallback/primary file
|
|
1825
1585
|
playlist: {
|
|
1826
1586
|
state: !0,
|
|
1827
|
-
|
|
1828
|
-
playlistVideoIndex:
|
|
1829
|
-
videos: n.map((O, Q) => ({
|
|
1830
|
-
videoId: O.mediaId || String(Q),
|
|
1831
|
-
// Use mediaId if available
|
|
1832
|
-
title: O.title,
|
|
1833
|
-
file: O.hlsUrl,
|
|
1834
|
-
thumbnailUrl: O.thumbnailUrl,
|
|
1835
|
-
duration: O.duration
|
|
1836
|
-
}))
|
|
1587
|
+
playlistId: c == null ? void 0 : c.playlistId,
|
|
1588
|
+
playlistVideoIndex: j
|
|
1837
1589
|
}
|
|
1838
1590
|
},
|
|
1839
|
-
config:
|
|
1591
|
+
config: s
|
|
1840
1592
|
};
|
|
1841
1593
|
}
|
|
1842
|
-
|
|
1843
|
-
if (m)
|
|
1594
|
+
if (e && !f)
|
|
1844
1595
|
return {
|
|
1845
|
-
...
|
|
1846
|
-
projectId: i || Ie,
|
|
1596
|
+
...i,
|
|
1847
1597
|
video: {
|
|
1848
|
-
...
|
|
1849
|
-
|
|
1598
|
+
...i.video,
|
|
1599
|
+
...t.video,
|
|
1600
|
+
file: e,
|
|
1850
1601
|
playlist: void 0
|
|
1851
|
-
// No playlist, just one video
|
|
1852
1602
|
},
|
|
1853
|
-
config:
|
|
1603
|
+
config: s
|
|
1854
1604
|
};
|
|
1855
|
-
if (f
|
|
1856
|
-
const j = ((y = (P = a == null ? void 0 : a.video) == null ? void 0 : P.playlist) == null ? void 0 : y.playlistVideoIndex) ?? ((S = a == null ? void 0 : a.config) == null ? void 0 : S.playlistVideoIndex) ?? 0;
|
|
1605
|
+
if (f && c)
|
|
1857
1606
|
return {
|
|
1858
|
-
...
|
|
1859
|
-
projectId: i || Ie,
|
|
1607
|
+
...i,
|
|
1860
1608
|
video: {
|
|
1861
|
-
...
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1609
|
+
...i.video,
|
|
1610
|
+
...t.video,
|
|
1611
|
+
// For horizontal player, file can be omitted - SDK handles it
|
|
1612
|
+
file: (q = t.video) == null ? void 0 : q.file,
|
|
1865
1613
|
playlist: {
|
|
1614
|
+
...i.video.playlist,
|
|
1615
|
+
...c,
|
|
1866
1616
|
state: !0,
|
|
1867
|
-
|
|
1868
|
-
playlistVideoIndex: Number(j),
|
|
1869
|
-
videos: f.videos
|
|
1617
|
+
playlistVideoIndex: Number(c.playlistVideoIndex || 0)
|
|
1870
1618
|
}
|
|
1871
1619
|
},
|
|
1872
|
-
config:
|
|
1620
|
+
config: s
|
|
1621
|
+
};
|
|
1622
|
+
const u = ((C = t == null ? void 0 : t.video) == null ? void 0 : C.videoId) || (t == null ? void 0 : t.videoId);
|
|
1623
|
+
if (u) {
|
|
1624
|
+
const j = (A = t.video) == null ? void 0 : A.file, x = j && j.trim() !== "", Y = r || t.projectId || i.projectId;
|
|
1625
|
+
let D;
|
|
1626
|
+
return x ? D = j : Y && u && (D = `https://cdn.vpplayer.tech/${Y}/encode/${u}/hls/master_file.m3u8`), {
|
|
1627
|
+
projectId: Y,
|
|
1628
|
+
videoId: u,
|
|
1629
|
+
video: {
|
|
1630
|
+
...t.video,
|
|
1631
|
+
// Only user's explicit video config
|
|
1632
|
+
videoId: u,
|
|
1633
|
+
file: D
|
|
1634
|
+
},
|
|
1635
|
+
// Only include config if user explicitly provided overrides
|
|
1636
|
+
...t.config && { config: t.config }
|
|
1873
1637
|
};
|
|
1874
1638
|
}
|
|
1639
|
+
if (($ = t == null ? void 0 : t.video) != null && $.file)
|
|
1640
|
+
return {
|
|
1641
|
+
...i,
|
|
1642
|
+
video: {
|
|
1643
|
+
...i.video,
|
|
1644
|
+
...t.video,
|
|
1645
|
+
file: t.video.file,
|
|
1646
|
+
playlist: void 0
|
|
1647
|
+
},
|
|
1648
|
+
config: s
|
|
1649
|
+
};
|
|
1875
1650
|
throw new Error(
|
|
1876
1651
|
"No valid video source found. Provide videoUrl, videoId, playlistId, or config with video.file or playlist."
|
|
1877
1652
|
);
|
|
1878
|
-
},
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1653
|
+
}, Tt = ({
|
|
1654
|
+
videoUrl: e,
|
|
1655
|
+
projectId: r,
|
|
1656
|
+
config: t = {},
|
|
1657
|
+
isVerticalPlayer: n = !1
|
|
1658
|
+
}) => {
|
|
1659
|
+
var _, w, h, y, v, g, T, N, z, R, b, J, q;
|
|
1660
|
+
const a = r || t.projectId, i = ((_ = t == null ? void 0 : t.video) == null ? void 0 : _.videoId) || (t == null ? void 0 : t.videoId), s = !!((h = (w = t == null ? void 0 : t.video) == null ? void 0 : w.playlist) != null && h.playlistId), l = !!((g = (v = (y = t == null ? void 0 : t.video) == null ? void 0 : y.playlist) == null ? void 0 : v.videos) != null && g.length), p = s || l, f = (T = t == null ? void 0 : t.video) == null ? void 0 : T.playlist, c = {};
|
|
1661
|
+
a && (c.projectId = a), i && (c.videoId = i);
|
|
1662
|
+
const u = {};
|
|
1663
|
+
if (i && (u.videoId = i), e ? u.file = e : (N = t == null ? void 0 : t.video) != null && N.file ? u.file = t.video.file : a && i && !p && (u.file = `https://cdn.vpplayer.tech/${a}/encode/${i}/hls/master_file.m3u8`), p && f) {
|
|
1664
|
+
const C = Number(f.playlistVideoIndex || 0);
|
|
1665
|
+
if ((z = f.videos) != null && z.length) {
|
|
1666
|
+
const A = f.videos[C] || f.videos[0];
|
|
1667
|
+
if (n) {
|
|
1668
|
+
const j = e || ((R = t == null ? void 0 : t.video) == null ? void 0 : R.file) || (A == null ? void 0 : A.file) || (A == null ? void 0 : A.hlsUrl);
|
|
1669
|
+
j && (u.file = j), u.videoId = (A == null ? void 0 : A.videoId) || "";
|
|
1670
|
+
}
|
|
1671
|
+
const $ = f.videos.map((j) => {
|
|
1672
|
+
const x = j;
|
|
1673
|
+
return {
|
|
1674
|
+
videoId: x.videoId || "",
|
|
1675
|
+
title: x.title || "",
|
|
1676
|
+
file: x.file || x.hlsUrl || "",
|
|
1677
|
+
thumbnailUrl: x.thumbnailUrl || x.thumbnail || "",
|
|
1678
|
+
duration: x.duration || 0
|
|
1679
|
+
};
|
|
1680
|
+
});
|
|
1681
|
+
u.playlist = {
|
|
1682
|
+
state: !0,
|
|
1683
|
+
playlistId: f.playlistId || "",
|
|
1684
|
+
playlistVideoIndex: C,
|
|
1685
|
+
videos: $
|
|
1686
|
+
};
|
|
1687
|
+
} else f.playlistId && (u.playlist = {
|
|
1688
|
+
state: !0,
|
|
1689
|
+
playlistId: f.playlistId,
|
|
1690
|
+
playlistVideoIndex: C
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
if (Object.keys(u).length > 0 && (c.video = u), t.config) {
|
|
1694
|
+
const C = { ...t.config };
|
|
1695
|
+
if (n && C.controls) {
|
|
1696
|
+
const A = xr(
|
|
1697
|
+
C.controls,
|
|
1698
|
+
!0
|
|
1699
|
+
// pureMode flag
|
|
1700
|
+
);
|
|
1701
|
+
A && (C.controls = A);
|
|
1702
|
+
}
|
|
1703
|
+
Object.keys(C).length > 0 && (c.config = C);
|
|
1704
|
+
}
|
|
1705
|
+
if (!(u.file || u.videoId || ((b = u.playlist) == null ? void 0 : b.playlistId) || ((q = (J = u.playlist) == null ? void 0 : J.videos) == null ? void 0 : q.length)))
|
|
1706
|
+
throw new Error(
|
|
1707
|
+
"No valid video source found in pure mode. Provide videoUrl, videoId, playlistId, or config with video.file or playlist."
|
|
1708
|
+
);
|
|
1709
|
+
return c;
|
|
1710
|
+
}, Ot = (e) => {
|
|
1711
|
+
if (!e || e.includes("vertical-player") || e.includes("vpverticalplayer"))
|
|
1712
|
+
return;
|
|
1713
|
+
const r = br.replace(
|
|
1714
|
+
/[.*+?^${}()|[\]\\]/g,
|
|
1715
|
+
"\\$&"
|
|
1716
|
+
), t = new RegExp(
|
|
1717
|
+
`${r}\\/player\\/([^/]+)\\/([^/]+)(?:\\/[^/]+)?\\.js`
|
|
1718
|
+
), n = e.match(t);
|
|
1719
|
+
if (n)
|
|
1720
|
+
return n[2];
|
|
1721
|
+
}, jt = ({
|
|
1883
1722
|
playerId: e,
|
|
1884
1723
|
videoId: r,
|
|
1885
|
-
version:
|
|
1886
|
-
videoUrl:
|
|
1724
|
+
version: t,
|
|
1725
|
+
videoUrl: n,
|
|
1887
1726
|
projectId: a,
|
|
1888
|
-
playlistId:
|
|
1727
|
+
playlistId: i,
|
|
1889
1728
|
scriptUrl: s,
|
|
1890
|
-
config:
|
|
1891
|
-
isReels:
|
|
1892
|
-
|
|
1729
|
+
config: l = {},
|
|
1730
|
+
isReels: p = !1,
|
|
1731
|
+
pureMode: f = !0,
|
|
1732
|
+
onPlaylistData: c,
|
|
1893
1733
|
onVideoStarted: u,
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
onPlayerPause: E,
|
|
1734
|
+
onPlayerStart: I,
|
|
1735
|
+
onPlayerPlay: _,
|
|
1736
|
+
onPlayerPause: w,
|
|
1898
1737
|
onPlayerResume: h,
|
|
1899
|
-
onPlayerEnd:
|
|
1900
|
-
onPlayerProgressEvery10Seconds:
|
|
1901
|
-
onPlayerProgressAt20Seconds:
|
|
1902
|
-
onPlayerQuartile25:
|
|
1903
|
-
onPlayerQuartile50:
|
|
1904
|
-
onPlayerQuartile75:
|
|
1905
|
-
onPlayerNext:
|
|
1906
|
-
onPlayerPrevious:
|
|
1738
|
+
onPlayerEnd: y,
|
|
1739
|
+
onPlayerProgressEvery10Seconds: v,
|
|
1740
|
+
onPlayerProgressAt20Seconds: g,
|
|
1741
|
+
onPlayerQuartile25: T,
|
|
1742
|
+
onPlayerQuartile50: N,
|
|
1743
|
+
onPlayerQuartile75: z,
|
|
1744
|
+
onPlayerNext: R,
|
|
1745
|
+
onPlayerPrevious: b,
|
|
1907
1746
|
onPlayerEvent: J
|
|
1908
1747
|
}) => {
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
onPlayerPause: E,
|
|
1748
|
+
var m;
|
|
1749
|
+
const q = ye(null), C = ye(null), A = ye(!1), $ = ye({
|
|
1750
|
+
onVideoStarted: u,
|
|
1751
|
+
onPlaylistData: c,
|
|
1752
|
+
onPlayerStart: I,
|
|
1753
|
+
onPlayerPlay: _,
|
|
1754
|
+
onPlayerPause: w,
|
|
1755
|
+
onPlayerResume: h,
|
|
1756
|
+
onPlayerEnd: y,
|
|
1757
|
+
onPlayerProgressEvery10Seconds: v,
|
|
1758
|
+
onPlayerProgressAt20Seconds: g,
|
|
1759
|
+
onPlayerQuartile25: T,
|
|
1760
|
+
onPlayerQuartile50: N,
|
|
1761
|
+
onPlayerQuartile75: z,
|
|
1762
|
+
onPlayerNext: R,
|
|
1763
|
+
onPlayerPrevious: b,
|
|
1764
|
+
onPlayerEvent: J
|
|
1765
|
+
});
|
|
1766
|
+
Me(() => {
|
|
1767
|
+
$.current = {
|
|
1768
|
+
onVideoStarted: u,
|
|
1769
|
+
onPlaylistData: c,
|
|
1770
|
+
onPlayerStart: I,
|
|
1771
|
+
onPlayerPlay: _,
|
|
1772
|
+
onPlayerPause: w,
|
|
1935
1773
|
onPlayerResume: h,
|
|
1936
|
-
onPlayerEnd:
|
|
1937
|
-
onPlayerProgressEvery10Seconds:
|
|
1938
|
-
onPlayerProgressAt20Seconds:
|
|
1939
|
-
onPlayerQuartile25:
|
|
1940
|
-
onPlayerQuartile50:
|
|
1941
|
-
onPlayerQuartile75:
|
|
1942
|
-
onPlayerNext:
|
|
1943
|
-
onPlayerPrevious:
|
|
1774
|
+
onPlayerEnd: y,
|
|
1775
|
+
onPlayerProgressEvery10Seconds: v,
|
|
1776
|
+
onPlayerProgressAt20Seconds: g,
|
|
1777
|
+
onPlayerQuartile25: T,
|
|
1778
|
+
onPlayerQuartile50: N,
|
|
1779
|
+
onPlayerQuartile75: z,
|
|
1780
|
+
onPlayerNext: R,
|
|
1781
|
+
onPlayerPrevious: b,
|
|
1944
1782
|
onPlayerEvent: J
|
|
1945
|
-
}
|
|
1783
|
+
};
|
|
1946
1784
|
});
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1785
|
+
const j = ye(!1), { isLoaded: x, error: Y } = Ct(
|
|
1786
|
+
t,
|
|
1787
|
+
s
|
|
1788
|
+
), D = r || Ot(s) || ((m = l == null ? void 0 : l.video) == null ? void 0 : m.videoId), [oe, Q] = le(null), G = Er().replace(/:/g, ""), Z = gr(
|
|
1789
|
+
e || `auto-${G}`,
|
|
1790
|
+
D
|
|
1791
|
+
), o = or(() => {
|
|
1792
|
+
var H, B;
|
|
1793
|
+
if (f)
|
|
1794
|
+
return {
|
|
1795
|
+
...l,
|
|
1796
|
+
video: {
|
|
1797
|
+
...l.video,
|
|
1798
|
+
videoId: D,
|
|
1799
|
+
playlist: i ? {
|
|
1800
|
+
playlistId: i,
|
|
1801
|
+
state: !0,
|
|
1802
|
+
playlistVideoIndex: 0
|
|
1803
|
+
} : (H = l.video) == null ? void 0 : H.playlist
|
|
1804
|
+
},
|
|
1805
|
+
// Only include config if user explicitly provided it
|
|
1806
|
+
...l.config && { config: l.config }
|
|
1807
|
+
};
|
|
1808
|
+
const P = l.config || {}, L = p && !P.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : P.size || { sizeType: "FIXED", width: "100%" };
|
|
1949
1809
|
return {
|
|
1950
|
-
...
|
|
1810
|
+
...l,
|
|
1811
|
+
video: {
|
|
1812
|
+
...l.video,
|
|
1813
|
+
videoId: D,
|
|
1814
|
+
playlist: i ? {
|
|
1815
|
+
playlistId: i,
|
|
1816
|
+
state: !0,
|
|
1817
|
+
playlistVideoIndex: 0
|
|
1818
|
+
} : (B = l.video) == null ? void 0 : B.playlist
|
|
1819
|
+
},
|
|
1951
1820
|
config: {
|
|
1952
|
-
...
|
|
1953
|
-
size:
|
|
1821
|
+
...P,
|
|
1822
|
+
size: L
|
|
1954
1823
|
}
|
|
1955
1824
|
};
|
|
1956
|
-
}, [
|
|
1957
|
-
return
|
|
1958
|
-
if (
|
|
1959
|
-
|
|
1825
|
+
}, [l, p, D, i, f]);
|
|
1826
|
+
return Me(() => {
|
|
1827
|
+
if (Y) {
|
|
1828
|
+
Q(Y);
|
|
1960
1829
|
return;
|
|
1961
1830
|
}
|
|
1962
|
-
if (!
|
|
1963
|
-
let
|
|
1964
|
-
|
|
1831
|
+
if (!x) return;
|
|
1832
|
+
let P = !0;
|
|
1833
|
+
return (async () => {
|
|
1834
|
+
var H;
|
|
1965
1835
|
try {
|
|
1966
|
-
B.
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
const ce = (l == null ? void 0 : l.length) ?? 0, we = JSON.stringify({
|
|
1970
|
-
playerId: H,
|
|
1971
|
-
videoId: r || O,
|
|
1972
|
-
playlistId: t,
|
|
1973
|
-
videoUrl: i,
|
|
1974
|
-
fetchedPlaybackUrl: o,
|
|
1975
|
-
scriptUrl: s,
|
|
1976
|
-
isReels: f,
|
|
1977
|
-
projectId: a,
|
|
1978
|
-
playlistLength: ce
|
|
1979
|
-
});
|
|
1980
|
-
if (y.current && P.current && S.current === we)
|
|
1981
|
-
return;
|
|
1982
|
-
S.current !== we && (y.current = !1, S.current = we);
|
|
1983
|
-
const ve = s == null ? void 0 : s.includes("vertical-player");
|
|
1984
|
-
if (document.querySelectorAll('[id*="player"]').forEach((oe) => {
|
|
1985
|
-
var Pe, T;
|
|
1986
|
-
const be = oe.id;
|
|
1987
|
-
if (be !== H)
|
|
1988
|
-
try {
|
|
1989
|
-
const R = ve ? (Pe = window.vpVerticalPlayer) == null ? void 0 : Pe.call(window, be) : (T = window.vpPlayer) == null ? void 0 : T.call(window, be);
|
|
1990
|
-
R != null && R.destroy && R.destroy();
|
|
1991
|
-
} catch (R) {
|
|
1992
|
-
console.warn(
|
|
1993
|
-
`Failed to destroy existing player ${be}:`,
|
|
1994
|
-
R
|
|
1995
|
-
);
|
|
1996
|
-
}
|
|
1997
|
-
}), await new Promise((oe) => setTimeout(oe, 100)), !ne || !Y.current) return;
|
|
1998
|
-
if (!document.getElementById(H)) {
|
|
1999
|
-
q("DOM element not found after cleanup.");
|
|
2000
|
-
return;
|
|
2001
|
-
}
|
|
2002
|
-
if (!window.vpPlayer && !window.vpVerticalPlayer) {
|
|
2003
|
-
q("VP Player script not loaded.");
|
|
1836
|
+
const B = (s == null ? void 0 : s.includes("vertical-player")) || (s == null ? void 0 : s.includes("vpverticalplayer")) || p, O = B ? window.vpVerticalPlayer : window.vpPlayer;
|
|
1837
|
+
if (!O) {
|
|
1838
|
+
Q("VP Player script loaded but global function not found.");
|
|
2004
1839
|
return;
|
|
2005
1840
|
}
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1841
|
+
C.current = null, q.current;
|
|
1842
|
+
const re = At({
|
|
1843
|
+
videoUrl: n,
|
|
1844
|
+
projectId: a,
|
|
1845
|
+
config: o,
|
|
1846
|
+
isVerticalPlayer: B,
|
|
1847
|
+
pureMode: f
|
|
1848
|
+
}), S = O(Z);
|
|
1849
|
+
if (!S) {
|
|
1850
|
+
Q("Failed to create player instance.");
|
|
2011
1851
|
return;
|
|
2012
1852
|
}
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
fetchedPlaylist: l ?? void 0,
|
|
2017
|
-
projectId: a,
|
|
2018
|
-
config: pe,
|
|
2019
|
-
isVerticalPlayer: ve
|
|
2020
|
-
// Pass player type to config builder
|
|
2021
|
-
}), G = ke(H);
|
|
2022
|
-
if (!G) {
|
|
2023
|
-
q(
|
|
2024
|
-
`Failed to create VP ${ve ? "Vertical " : ""}Player instance.`
|
|
1853
|
+
if (await new Promise((V) => setTimeout(V, 0)), !document.getElementById(Z)) {
|
|
1854
|
+
console.error(
|
|
1855
|
+
`VP Player: Container element with ID '${Z}' not found in DOM.`
|
|
2025
1856
|
);
|
|
2026
1857
|
return;
|
|
2027
1858
|
}
|
|
2028
|
-
if (
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
const Pe = async () => {
|
|
2040
|
-
var T;
|
|
2041
|
-
try {
|
|
2042
|
-
be && clearTimeout(be), await new Promise((D) => setTimeout(D, 100));
|
|
2043
|
-
let R = oe();
|
|
2044
|
-
const N = R.videoId || R.mediaId;
|
|
2045
|
-
if (N && N === M.current)
|
|
2046
|
-
return;
|
|
2047
|
-
if (be = window.setTimeout(() => {
|
|
2048
|
-
M.current = null;
|
|
2049
|
-
}, 500), (s == null ? void 0 : s.includes("vertical-player")) && N)
|
|
2050
|
-
try {
|
|
2051
|
-
const Ee = `https://host.vpplayer.tech/player/ptkzurnx/${N}.json`, W = await fetch(Ee);
|
|
2052
|
-
if (W.ok) {
|
|
2053
|
-
const re = await W.json();
|
|
2054
|
-
re != null && re.video && (R = {
|
|
2055
|
-
...R,
|
|
2056
|
-
title: re.video.title || R.title,
|
|
2057
|
-
description: re.video.description,
|
|
2058
|
-
publishDate: re.video.publishDate,
|
|
2059
|
-
projectId: re.projectId || R.projectId,
|
|
2060
|
-
premium: ((T = re.video.videoLocking) == null ? void 0 : T.isEnabled) || !1,
|
|
2061
|
-
author: re.video.author,
|
|
2062
|
-
tags: re.video.tags || []
|
|
2063
|
-
});
|
|
2064
|
-
}
|
|
2065
|
-
} catch {
|
|
2066
|
-
}
|
|
2067
|
-
M.current = N || null, V(R), u(R);
|
|
2068
|
-
} catch (R) {
|
|
2069
|
-
console.warn("Error in video-started handler:", R);
|
|
2070
|
-
}
|
|
2071
|
-
};
|
|
2072
|
-
if (ve) {
|
|
2073
|
-
let T = !1, R = -1;
|
|
2074
|
-
const N = () => {
|
|
2075
|
-
if (!T) {
|
|
2076
|
-
T = !0;
|
|
2077
|
-
try {
|
|
2078
|
-
G.on && G.on("vp-video-started", Pe), setTimeout(() => {
|
|
2079
|
-
Pe(), R = G.videoIndex ?? 0;
|
|
2080
|
-
}, 500);
|
|
2081
|
-
} catch (W) {
|
|
2082
|
-
console.error("Error setting up event listeners:", W);
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
};
|
|
2086
|
-
let ae = 0;
|
|
2087
|
-
const D = 15, Ee = setInterval(() => {
|
|
1859
|
+
if (P) {
|
|
1860
|
+
try {
|
|
1861
|
+
if (!document.getElementById(Z))
|
|
1862
|
+
return;
|
|
1863
|
+
S.setup(re);
|
|
1864
|
+
} catch (V) {
|
|
1865
|
+
const we = V instanceof Error ? V.message : String(V);
|
|
1866
|
+
if (we.includes("already initialized")) {
|
|
1867
|
+
console.warn(
|
|
1868
|
+
"VP Player: Player already initialized, attempting to destroy and retry."
|
|
1869
|
+
);
|
|
2088
1870
|
try {
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
}
|
|
2096
|
-
} catch {
|
|
1871
|
+
(H = S.destroy) == null || H.call(S), await new Promise((d) => setTimeout(d, 50)), P && document.getElementById(Z) && S.setup(re);
|
|
1872
|
+
} catch (d) {
|
|
1873
|
+
console.error(
|
|
1874
|
+
"VP Player: Failed to recover from initialization error",
|
|
1875
|
+
d
|
|
1876
|
+
);
|
|
2097
1877
|
}
|
|
2098
|
-
}
|
|
2099
|
-
|
|
1878
|
+
} else
|
|
1879
|
+
console.error("VP Player: Setup error", V), Q(`Player setup failed: ${we}`);
|
|
1880
|
+
}
|
|
1881
|
+
if (C.current = S, A.current = !0, Q(null), j.current = !1, S.on) {
|
|
1882
|
+
const V = S.on.bind(S), we = () => {
|
|
1883
|
+
V("ready", () => {
|
|
1884
|
+
const d = $.current;
|
|
1885
|
+
d.onPlayerStart && d.onPlayerStart("player_start"), d.onPlayerEvent && d.onPlayerEvent("player_start");
|
|
1886
|
+
}), V("play", () => {
|
|
1887
|
+
const d = $.current;
|
|
1888
|
+
d.onPlayerPlay && d.onPlayerPlay("player_play"), d.onPlayerEvent && d.onPlayerEvent("player_play");
|
|
1889
|
+
}), V("video-started", (d) => {
|
|
1890
|
+
const U = $.current;
|
|
1891
|
+
U.onVideoStarted && U.onVideoStarted(d);
|
|
1892
|
+
}), V("resume", () => {
|
|
1893
|
+
const d = $.current;
|
|
1894
|
+
d.onPlayerResume && d.onPlayerResume("player_resume"), d.onPlayerEvent && d.onPlayerEvent("player_resume");
|
|
1895
|
+
}), V("pause", () => {
|
|
1896
|
+
const d = $.current;
|
|
1897
|
+
d.onPlayerPause && d.onPlayerPause("player_pause"), d.onPlayerEvent && d.onPlayerEvent("player_pause");
|
|
1898
|
+
}), V("complete", () => {
|
|
1899
|
+
const d = $.current;
|
|
1900
|
+
d.onPlayerEnd && d.onPlayerEnd("player_end"), d.onPlayerEvent && d.onPlayerEvent("player_end"), j.current = !1;
|
|
1901
|
+
}), V("firstQuartile", () => {
|
|
1902
|
+
const d = $.current;
|
|
1903
|
+
d.onPlayerQuartile25 && d.onPlayerQuartile25("player_quartile_25", 0), d.onPlayerEvent && d.onPlayerEvent("player_quartile_25", 0);
|
|
1904
|
+
}), V("secondQuartile", () => {
|
|
1905
|
+
const d = $.current;
|
|
1906
|
+
d.onPlayerQuartile50 && d.onPlayerQuartile50("player_quartile_50", 0), d.onPlayerEvent && d.onPlayerEvent("player_quartile_50", 0);
|
|
1907
|
+
}), V("thirdQuartile", () => {
|
|
1908
|
+
const d = $.current;
|
|
1909
|
+
d.onPlayerQuartile75 && d.onPlayerQuartile75("player_quartile_75", 0), d.onPlayerEvent && d.onPlayerEvent("player_quartile_75", 0);
|
|
1910
|
+
}), V("video-state", (d) => {
|
|
1911
|
+
var he;
|
|
1912
|
+
const U = ((he = S.getPosition) == null ? void 0 : he.call(S)) ?? (d == null ? void 0 : d.position) ?? 0, se = $.current;
|
|
1913
|
+
se.onPlayerProgressEvery10Seconds && se.onPlayerProgressEvery10Seconds(
|
|
1914
|
+
"player_progress_every_10_seconds",
|
|
1915
|
+
Math.floor(U)
|
|
1916
|
+
), se.onPlayerEvent && se.onPlayerEvent(
|
|
1917
|
+
"player_progress_every_10_seconds",
|
|
1918
|
+
Math.floor(U)
|
|
1919
|
+
);
|
|
1920
|
+
}), V("time", (d) => {
|
|
1921
|
+
var se;
|
|
1922
|
+
if (j.current) return;
|
|
1923
|
+
let U = 0;
|
|
1924
|
+
if (typeof d == "number" ? U = d : d && typeof d == "object" && "position" in d ? U = d.position : U = ((se = S.getPosition) == null ? void 0 : se.call(S)) ?? 0, U >= 20) {
|
|
1925
|
+
j.current = !0;
|
|
1926
|
+
const he = Math.floor(U), Ee = $.current;
|
|
1927
|
+
Ee.onPlayerProgressAt20Seconds && Ee.onPlayerProgressAt20Seconds(
|
|
1928
|
+
"player_progress_at_20_seconds",
|
|
1929
|
+
he
|
|
1930
|
+
), Ee.onPlayerEvent && Ee.onPlayerEvent("player_progress_at_20_seconds", he);
|
|
1931
|
+
}
|
|
1932
|
+
}), V("playlistItem", (d) => {
|
|
1933
|
+
const U = $.current;
|
|
1934
|
+
U.onPlayerNext && U.onPlayerNext("player_next"), U.onPlayerEvent && U.onPlayerEvent("player_next"), U.onPlaylistData, j.current = !1;
|
|
1935
|
+
});
|
|
1936
|
+
};
|
|
2100
1937
|
try {
|
|
2101
|
-
|
|
2102
|
-
} catch {
|
|
1938
|
+
we();
|
|
1939
|
+
} catch (d) {
|
|
1940
|
+
console.warn("VP Player: Failed to attach event listeners", d);
|
|
2103
1941
|
}
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
try {
|
|
2108
|
-
const D = s == null ? void 0 : s.match(/player\/([^/.]+)/), Ee = D == null ? void 0 : D[1];
|
|
2109
|
-
if (!Ee || !R)
|
|
2110
|
-
return oe();
|
|
2111
|
-
const W = `https://host.vpplayer.tech/player/${Ee}/${R}.json`, re = await fetch(W);
|
|
2112
|
-
if (!re.ok)
|
|
2113
|
-
return console.warn(
|
|
2114
|
-
"Failed to fetch full video config:",
|
|
2115
|
-
re.status
|
|
2116
|
-
), oe();
|
|
2117
|
-
const se = await re.json();
|
|
2118
|
-
return se != null && se.video ? {
|
|
2119
|
-
videoId: R,
|
|
2120
|
-
title: se.video.title,
|
|
2121
|
-
description: se.video.description,
|
|
2122
|
-
file: se.video.file,
|
|
2123
|
-
hlsUrl: se.video.file,
|
|
2124
|
-
thumbnailUrl: se.video.thumbnail,
|
|
2125
|
-
duration: se.video.duration,
|
|
2126
|
-
publishDate: se.video.publishDate,
|
|
2127
|
-
projectId: se.projectId,
|
|
2128
|
-
premium: ((N = se.video.videoLocking) == null ? void 0 : N.isEnabled) || !1,
|
|
2129
|
-
author: se.video.author,
|
|
2130
|
-
tags: se.video.tags || [],
|
|
2131
|
-
videoIndex: G.videoIndex ?? 0,
|
|
2132
|
-
playlistVideoIndex: ((ae = G.playlist) == null ? void 0 : ae.playlistVideoIndex) ?? 0
|
|
2133
|
-
} : oe();
|
|
2134
|
-
} catch (D) {
|
|
2135
|
-
return console.warn("Error fetching full video data:", D), oe();
|
|
2136
|
-
}
|
|
2137
|
-
};
|
|
2138
|
-
G.on("ready", async (R) => {
|
|
2139
|
-
try {
|
|
2140
|
-
const N = R, ae = (N == null ? void 0 : N.id) || r || O;
|
|
2141
|
-
if (ae) {
|
|
2142
|
-
const D = await T(ae);
|
|
2143
|
-
V(D), u(D);
|
|
2144
|
-
} else {
|
|
2145
|
-
const D = oe();
|
|
2146
|
-
(D.title || D.file) && (V(D), u(D));
|
|
2147
|
-
}
|
|
2148
|
-
} catch (N) {
|
|
2149
|
-
console.warn("Error in ready handler:", N);
|
|
2150
|
-
}
|
|
2151
|
-
}), G.on("playlistItem", async (R) => {
|
|
1942
|
+
}
|
|
1943
|
+
!n && S.play && setTimeout(() => {
|
|
1944
|
+
if (P && S.play)
|
|
2152
1945
|
try {
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
const D = await T(ae);
|
|
2156
|
-
V(D), u(D);
|
|
2157
|
-
}
|
|
2158
|
-
} catch (N) {
|
|
2159
|
-
console.warn("Error in playlistItem handler:", N);
|
|
1946
|
+
S.play();
|
|
1947
|
+
} catch {
|
|
2160
1948
|
}
|
|
2161
|
-
|
|
2162
|
-
}
|
|
1949
|
+
}, 100);
|
|
2163
1950
|
}
|
|
2164
|
-
} catch (
|
|
2165
|
-
if (
|
|
2166
|
-
const
|
|
2167
|
-
|
|
1951
|
+
} catch (B) {
|
|
1952
|
+
if (P) {
|
|
1953
|
+
const O = B instanceof Error ? B.message : String(B);
|
|
1954
|
+
Q(O), console.error("VP Player initialization error:", B);
|
|
2168
1955
|
}
|
|
2169
1956
|
}
|
|
2170
|
-
},
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
} catch (_e) {
|
|
2179
|
-
console.warn(`Failed to destroy player ${H}:`, _e);
|
|
1957
|
+
})(), () => {
|
|
1958
|
+
var H;
|
|
1959
|
+
if (P = !1, (H = C.current) != null && H.destroy) {
|
|
1960
|
+
try {
|
|
1961
|
+
C.current.destroy();
|
|
1962
|
+
} catch {
|
|
1963
|
+
}
|
|
1964
|
+
C.current = null;
|
|
2180
1965
|
}
|
|
2181
|
-
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
1966
|
+
A.current = !1;
|
|
1967
|
+
};
|
|
1968
|
+
}, [
|
|
1969
|
+
x,
|
|
1970
|
+
Z,
|
|
1971
|
+
Y,
|
|
1972
|
+
s,
|
|
1973
|
+
D,
|
|
1974
|
+
i,
|
|
1975
|
+
n,
|
|
1976
|
+
a,
|
|
1977
|
+
o,
|
|
1978
|
+
p,
|
|
1979
|
+
f
|
|
1980
|
+
]), {
|
|
1981
|
+
playerRef: q,
|
|
1982
|
+
playerInstanceRef: C,
|
|
1983
|
+
isScriptLoaded: x,
|
|
1984
|
+
isLoading: !x && !A.current,
|
|
1985
|
+
error: oe,
|
|
1986
|
+
generatedPlayerId: Z
|
|
2192
1987
|
};
|
|
2193
|
-
},
|
|
1988
|
+
}, $t = ({
|
|
2194
1989
|
playerId: e,
|
|
2195
1990
|
videoId: r,
|
|
2196
|
-
version:
|
|
2197
|
-
videoUrl:
|
|
1991
|
+
version: t,
|
|
1992
|
+
videoUrl: n,
|
|
2198
1993
|
projectId: a,
|
|
2199
|
-
playlistId:
|
|
1994
|
+
playlistId: i,
|
|
2200
1995
|
scriptUrl: s,
|
|
2201
|
-
config:
|
|
2202
|
-
isReels:
|
|
2203
|
-
|
|
1996
|
+
config: l = {},
|
|
1997
|
+
isReels: p = !1,
|
|
1998
|
+
pureMode: f = !0,
|
|
1999
|
+
hiddenClasses: c = [],
|
|
2204
2000
|
onClose: u,
|
|
2205
|
-
className:
|
|
2206
|
-
onPlaylistData:
|
|
2207
|
-
onVideoStarted:
|
|
2208
|
-
trackingMetadata:
|
|
2209
|
-
onPlayerStart:
|
|
2001
|
+
className: I,
|
|
2002
|
+
onPlaylistData: _,
|
|
2003
|
+
onVideoStarted: w,
|
|
2004
|
+
trackingMetadata: h,
|
|
2005
|
+
onPlayerStart: y,
|
|
2210
2006
|
onPlayerPlay: v,
|
|
2211
|
-
onPlayerPause:
|
|
2212
|
-
onPlayerResume:
|
|
2213
|
-
onPlayerEnd:
|
|
2214
|
-
onPlayerProgressEvery10Seconds:
|
|
2215
|
-
onPlayerProgressAt20Seconds:
|
|
2216
|
-
onPlayerQuartile25:
|
|
2217
|
-
onPlayerQuartile50:
|
|
2218
|
-
onPlayerQuartile75:
|
|
2219
|
-
onPlayerNext:
|
|
2220
|
-
onPlayerPrevious:
|
|
2221
|
-
onPlayerEvent:
|
|
2007
|
+
onPlayerPause: g,
|
|
2008
|
+
onPlayerResume: T,
|
|
2009
|
+
onPlayerEnd: N,
|
|
2010
|
+
onPlayerProgressEvery10Seconds: z,
|
|
2011
|
+
onPlayerProgressAt20Seconds: R,
|
|
2012
|
+
onPlayerQuartile25: b,
|
|
2013
|
+
onPlayerQuartile50: J,
|
|
2014
|
+
onPlayerQuartile75: q,
|
|
2015
|
+
onPlayerNext: C,
|
|
2016
|
+
onPlayerPrevious: A,
|
|
2017
|
+
onPlayerEvent: $
|
|
2222
2018
|
}) => {
|
|
2223
|
-
var
|
|
2224
|
-
const {
|
|
2019
|
+
var H, B, O, re;
|
|
2020
|
+
const {
|
|
2021
|
+
playerRef: j,
|
|
2022
|
+
playerInstanceRef: x,
|
|
2023
|
+
isScriptLoaded: Y,
|
|
2024
|
+
isLoading: D,
|
|
2025
|
+
error: oe,
|
|
2026
|
+
generatedPlayerId: Q
|
|
2027
|
+
} = jt({
|
|
2225
2028
|
playerId: e,
|
|
2226
2029
|
videoId: r,
|
|
2227
|
-
version:
|
|
2228
|
-
videoUrl:
|
|
2030
|
+
version: t,
|
|
2031
|
+
videoUrl: n,
|
|
2229
2032
|
projectId: a,
|
|
2230
|
-
playlistId:
|
|
2033
|
+
playlistId: i,
|
|
2231
2034
|
scriptUrl: s,
|
|
2232
|
-
config:
|
|
2233
|
-
isReels:
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
onPlayerStart:
|
|
2035
|
+
config: l,
|
|
2036
|
+
isReels: p,
|
|
2037
|
+
pureMode: f,
|
|
2038
|
+
onPlaylistData: _,
|
|
2039
|
+
onVideoStarted: w,
|
|
2040
|
+
onPlayerStart: y,
|
|
2238
2041
|
onPlayerPlay: v,
|
|
2239
|
-
onPlayerPause:
|
|
2240
|
-
onPlayerResume:
|
|
2241
|
-
onPlayerEnd:
|
|
2242
|
-
onPlayerProgressEvery10Seconds:
|
|
2243
|
-
onPlayerProgressAt20Seconds:
|
|
2244
|
-
onPlayerQuartile25:
|
|
2245
|
-
onPlayerQuartile50:
|
|
2246
|
-
onPlayerQuartile75:
|
|
2247
|
-
onPlayerNext:
|
|
2248
|
-
onPlayerPrevious:
|
|
2249
|
-
onPlayerEvent:
|
|
2250
|
-
}), [
|
|
2251
|
-
var
|
|
2252
|
-
|
|
2253
|
-
},
|
|
2254
|
-
return
|
|
2042
|
+
onPlayerPause: g,
|
|
2043
|
+
onPlayerResume: T,
|
|
2044
|
+
onPlayerEnd: N,
|
|
2045
|
+
onPlayerProgressEvery10Seconds: z,
|
|
2046
|
+
onPlayerProgressAt20Seconds: R,
|
|
2047
|
+
onPlayerQuartile25: b,
|
|
2048
|
+
onPlayerQuartile50: J,
|
|
2049
|
+
onPlayerQuartile75: q,
|
|
2050
|
+
onPlayerNext: C,
|
|
2051
|
+
onPlayerPrevious: A,
|
|
2052
|
+
onPlayerEvent: $
|
|
2053
|
+
}), [G, Z] = le(!0), o = () => p && Z(!0), m = () => {
|
|
2054
|
+
var S, pe;
|
|
2055
|
+
!p || !G || (Z(!1), (pe = (S = x.current) == null ? void 0 : S.pause) == null || pe.call(S), u == null || u());
|
|
2056
|
+
}, P = (B = (H = l == null ? void 0 : l.config) == null ? void 0 : H.size) != null && B.width ? typeof l.config.size.width == "number" ? `${l.config.size.width}px` : l.config.size.width : void 0, L = (re = (O = l == null ? void 0 : l.config) == null ? void 0 : O.size) != null && re.height ? typeof l.config.size.height == "number" ? `${l.config.size.height}px` : l.config.size.height : void 0;
|
|
2057
|
+
return oe ? /* @__PURE__ */ F.jsxs(Oe, { type: "error", children: [
|
|
2255
2058
|
"An error occurred: ",
|
|
2256
|
-
|
|
2257
|
-
] }) :
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
_r,
|
|
2059
|
+
oe
|
|
2060
|
+
] }) : /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
|
|
2061
|
+
p && !G ? /* @__PURE__ */ F.jsx(
|
|
2062
|
+
"div",
|
|
2261
2063
|
{
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
width: o || "100%",
|
|
2265
|
-
height: l || "auto",
|
|
2266
|
-
$hiddenClasses: m,
|
|
2267
|
-
className: p
|
|
2064
|
+
onClick: o,
|
|
2065
|
+
style: { cursor: "pointer", width: "100%", height: "100%" }
|
|
2268
2066
|
}
|
|
2269
|
-
)
|
|
2270
|
-
|
|
2271
|
-
|
|
2067
|
+
) : null,
|
|
2068
|
+
!p && /* @__PURE__ */ F.jsxs("div", { style: { position: "relative" }, children: [
|
|
2069
|
+
/* @__PURE__ */ F.jsx(
|
|
2070
|
+
ar,
|
|
2071
|
+
{
|
|
2072
|
+
id: Q,
|
|
2073
|
+
ref: j,
|
|
2074
|
+
width: P || "100%",
|
|
2075
|
+
height: L || "auto",
|
|
2076
|
+
$hiddenClasses: c,
|
|
2077
|
+
className: I
|
|
2078
|
+
}
|
|
2079
|
+
),
|
|
2080
|
+
(D || !Y) && /* @__PURE__ */ F.jsx(
|
|
2081
|
+
"div",
|
|
2082
|
+
{
|
|
2083
|
+
style: {
|
|
2084
|
+
position: "absolute",
|
|
2085
|
+
top: 0,
|
|
2086
|
+
left: 0,
|
|
2087
|
+
right: 0,
|
|
2088
|
+
bottom: 0,
|
|
2089
|
+
display: "flex",
|
|
2090
|
+
alignItems: "center",
|
|
2091
|
+
justifyContent: "center",
|
|
2092
|
+
background: "rgba(0,0,0,0.8)",
|
|
2093
|
+
zIndex: 10
|
|
2094
|
+
},
|
|
2095
|
+
children: /* @__PURE__ */ F.jsx(Oe, { type: "loading", children: "Loading..." })
|
|
2096
|
+
}
|
|
2097
|
+
)
|
|
2098
|
+
] }),
|
|
2099
|
+
p && G && /* @__PURE__ */ F.jsx(St, { onClick: m, className: I, children: /* @__PURE__ */ F.jsx(
|
|
2100
|
+
It,
|
|
2272
2101
|
{
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2102
|
+
className: I,
|
|
2103
|
+
onClick: (S) => {
|
|
2104
|
+
S.stopPropagation();
|
|
2105
|
+
},
|
|
2106
|
+
children: /* @__PURE__ */ F.jsxs("div", { style: { position: "relative" }, children: [
|
|
2107
|
+
/* @__PURE__ */ F.jsx(
|
|
2108
|
+
ar,
|
|
2109
|
+
{
|
|
2110
|
+
id: Q,
|
|
2111
|
+
ref: j,
|
|
2112
|
+
width: "100%",
|
|
2113
|
+
height: "100%",
|
|
2114
|
+
$hiddenClasses: c,
|
|
2115
|
+
className: I
|
|
2116
|
+
}
|
|
2117
|
+
),
|
|
2118
|
+
(D || !Y) && /* @__PURE__ */ F.jsx(
|
|
2119
|
+
"div",
|
|
2120
|
+
{
|
|
2121
|
+
style: {
|
|
2122
|
+
position: "absolute",
|
|
2123
|
+
top: 0,
|
|
2124
|
+
left: 0,
|
|
2125
|
+
right: 0,
|
|
2126
|
+
bottom: 0,
|
|
2127
|
+
display: "flex",
|
|
2128
|
+
alignItems: "center",
|
|
2129
|
+
justifyContent: "center",
|
|
2130
|
+
background: "rgba(0,0,0,0.8)",
|
|
2131
|
+
zIndex: 10
|
|
2132
|
+
},
|
|
2133
|
+
children: /* @__PURE__ */ F.jsx(Oe, { type: "loading", children: "Loading..." })
|
|
2134
|
+
}
|
|
2135
|
+
)
|
|
2136
|
+
] })
|
|
2279
2137
|
}
|
|
2280
|
-
) }
|
|
2138
|
+
) })
|
|
2281
2139
|
] });
|
|
2282
|
-
},
|
|
2283
|
-
const [r,
|
|
2140
|
+
}, Pr = kr(void 0), Nt = ({ children: e }) => {
|
|
2141
|
+
const [r, t] = le(!1), [n, a] = le(null), [i, s] = le(null), l = Ye((c) => {
|
|
2284
2142
|
try {
|
|
2285
|
-
const
|
|
2286
|
-
a({ ...
|
|
2143
|
+
const u = gr(c.playerId, c.videoId);
|
|
2144
|
+
a({ ...c, playerId: u }), t(!0), s(null);
|
|
2287
2145
|
} catch {
|
|
2288
2146
|
s("Failed to show player.");
|
|
2289
2147
|
}
|
|
2290
|
-
}, []),
|
|
2291
|
-
|
|
2292
|
-
}, []),
|
|
2148
|
+
}, []), p = Ye(() => {
|
|
2149
|
+
t(!1), a(null), s(null);
|
|
2150
|
+
}, []), f = or(
|
|
2293
2151
|
() => ({
|
|
2294
|
-
showPlayer:
|
|
2295
|
-
hidePlayer:
|
|
2152
|
+
showPlayer: l,
|
|
2153
|
+
hidePlayer: p,
|
|
2296
2154
|
isPlayerVisible: r,
|
|
2297
|
-
playerParams:
|
|
2155
|
+
playerParams: n
|
|
2298
2156
|
}),
|
|
2299
|
-
[
|
|
2157
|
+
[l, p, r, n]
|
|
2300
2158
|
);
|
|
2301
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ F.jsxs(Pr.Provider, { value: f, children: [
|
|
2302
2160
|
e,
|
|
2303
|
-
|
|
2304
|
-
r && (
|
|
2305
|
-
|
|
2161
|
+
i && /* @__PURE__ */ F.jsx(Oe, { type: "error", children: i }),
|
|
2162
|
+
r && (n == null ? void 0 : n.playerId) && /* @__PURE__ */ F.jsx(
|
|
2163
|
+
$t,
|
|
2306
2164
|
{
|
|
2307
|
-
playerId:
|
|
2308
|
-
videoId:
|
|
2309
|
-
projectId:
|
|
2310
|
-
videoUrl:
|
|
2311
|
-
version:
|
|
2312
|
-
playlistId:
|
|
2313
|
-
scriptUrl:
|
|
2314
|
-
config:
|
|
2315
|
-
isReels:
|
|
2316
|
-
thumbnailUrl:
|
|
2317
|
-
onClose:
|
|
2318
|
-
hiddenClasses:
|
|
2319
|
-
className:
|
|
2165
|
+
playerId: n.playerId,
|
|
2166
|
+
videoId: n.videoId,
|
|
2167
|
+
projectId: n.projectId,
|
|
2168
|
+
videoUrl: n.videoUrl,
|
|
2169
|
+
version: n.version,
|
|
2170
|
+
playlistId: n.playlistId,
|
|
2171
|
+
scriptUrl: n.scriptUrl,
|
|
2172
|
+
config: n.config,
|
|
2173
|
+
isReels: n.isReels,
|
|
2174
|
+
thumbnailUrl: n.thumbnailUrl,
|
|
2175
|
+
onClose: p,
|
|
2176
|
+
hiddenClasses: n.hiddenClasses || [],
|
|
2177
|
+
className: n.className
|
|
2320
2178
|
}
|
|
2321
2179
|
)
|
|
2322
2180
|
] });
|
|
2323
|
-
},
|
|
2324
|
-
const e =
|
|
2181
|
+
}, zt = () => {
|
|
2182
|
+
const e = ir(Pr);
|
|
2325
2183
|
if (!e) throw new Error("useVPPlayer must be used within a VPPlayerProvider");
|
|
2326
2184
|
return e;
|
|
2327
|
-
},
|
|
2328
|
-
projectId:
|
|
2185
|
+
}, Ft = {
|
|
2186
|
+
projectId: void 0,
|
|
2329
2187
|
video: {
|
|
2330
|
-
file:
|
|
2331
|
-
|
|
2332
|
-
state: !0,
|
|
2333
|
-
playlistVideoIndex: 0,
|
|
2334
|
-
videos: []
|
|
2335
|
-
}
|
|
2188
|
+
// NOTE: Do NOT set file: '' here - it interferes with managed mode
|
|
2189
|
+
// where the SDK resolves the video URL from videoId + projectId
|
|
2336
2190
|
},
|
|
2337
2191
|
config: {
|
|
2338
2192
|
autoplay: !0,
|
|
2339
|
-
pauseOtherVideos: !0,
|
|
2340
|
-
focusOnAutostart: !1,
|
|
2341
2193
|
muted: !0,
|
|
2194
|
+
// Required for browser autoplay policy
|
|
2342
2195
|
loop: !1,
|
|
2343
2196
|
size: {
|
|
2344
|
-
width: "100%"
|
|
2345
|
-
|
|
2346
|
-
controls: {
|
|
2347
|
-
settingsButton: !0,
|
|
2348
|
-
chromecastButton: !1,
|
|
2349
|
-
nextButton: !1,
|
|
2350
|
-
fullscreenButton: !0,
|
|
2351
|
-
airplayButton: !1,
|
|
2352
|
-
bigPlayButton: !1,
|
|
2353
|
-
autopausePlayButton: !0,
|
|
2354
|
-
pictureInPictureButton: !1,
|
|
2355
|
-
relatedButton: !1,
|
|
2356
|
-
volumeButton: !0,
|
|
2357
|
-
shareButton: !0
|
|
2197
|
+
width: "100%",
|
|
2198
|
+
height: "30vh"
|
|
2358
2199
|
}
|
|
2200
|
+
// NOTE: Do NOT set controls here - let the SDK/managed script
|
|
2201
|
+
// use what's configured in the Gjirafa admin panel (projectId config)
|
|
2359
2202
|
}
|
|
2360
|
-
},
|
|
2203
|
+
}, Mt = {
|
|
2361
2204
|
config: {
|
|
2362
2205
|
autostartOnLoad: { state: !0, onMobile: !0, onData: !0 },
|
|
2363
2206
|
muted: !0
|
|
2364
2207
|
}
|
|
2365
|
-
},
|
|
2208
|
+
}, Vt = {
|
|
2366
2209
|
config: {
|
|
2367
2210
|
autoplay: !0,
|
|
2368
2211
|
muted: !0
|
|
2369
2212
|
}
|
|
2370
|
-
},
|
|
2213
|
+
}, Fe = {
|
|
2371
2214
|
video: {
|
|
2372
2215
|
advertising: !0,
|
|
2373
2216
|
ads: {
|
|
@@ -2378,48 +2221,46 @@ const Dt = Ae.div`
|
|
|
2378
2221
|
adAnnouncement: { state: !0, timeBeforeAd: 5 },
|
|
2379
2222
|
adsRequireInteraction: !1
|
|
2380
2223
|
}
|
|
2381
|
-
},
|
|
2224
|
+
}, Dt = (e, r, t = "time", n = 0) => {
|
|
2382
2225
|
var a;
|
|
2383
2226
|
return {
|
|
2384
|
-
...
|
|
2227
|
+
...Fe,
|
|
2385
2228
|
video: {
|
|
2386
|
-
...
|
|
2229
|
+
...Fe.video,
|
|
2387
2230
|
ads: {
|
|
2388
|
-
...(a =
|
|
2231
|
+
...(a = Fe.video) == null ? void 0 : a.ads,
|
|
2389
2232
|
adBreaks: [
|
|
2390
2233
|
{
|
|
2391
2234
|
adTagUrl: r,
|
|
2392
2235
|
breakType: e,
|
|
2393
|
-
breakTimingType:
|
|
2394
|
-
breakTimingValue:
|
|
2236
|
+
breakTimingType: t,
|
|
2237
|
+
breakTimingValue: n
|
|
2395
2238
|
}
|
|
2396
2239
|
]
|
|
2397
2240
|
}
|
|
2398
2241
|
}
|
|
2399
2242
|
};
|
|
2400
|
-
},
|
|
2243
|
+
}, Bt = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", Ut = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", Wt = "https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4", qt = "https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600", Yt = "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=", Gt = "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=";
|
|
2401
2244
|
export {
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
Wt as useVPPlayerScript,
|
|
2424
|
-
Ht as useVideoData
|
|
2245
|
+
Yt as AD_TAG_LINEAR_URL,
|
|
2246
|
+
Gt as AD_TAG_SKIPPABLE_LINEAR_URL,
|
|
2247
|
+
Bt as BIG_BUCK_BUNNY_URL,
|
|
2248
|
+
Ut as ELEPHANTS_DREAM_URL,
|
|
2249
|
+
St as Overlay,
|
|
2250
|
+
qt as PEXELS_THUMBNAIL_URL,
|
|
2251
|
+
Wt as PEXELS_VERTICAL_VIDEO_URL,
|
|
2252
|
+
ar as PlayerContainer,
|
|
2253
|
+
It as PlayerWrapper,
|
|
2254
|
+
$t as VPPlayer,
|
|
2255
|
+
Nt as VPPlayerProvider,
|
|
2256
|
+
Mt as baseConfig,
|
|
2257
|
+
Fe as baseConfigWithAds,
|
|
2258
|
+
Vt as baseConfigWithAutoplay,
|
|
2259
|
+
At as buildVPPlayerConfig,
|
|
2260
|
+
Ft as defaultVPPlayerConfig,
|
|
2261
|
+
Ot as extractVideoId,
|
|
2262
|
+
Dt as getAdConfig,
|
|
2263
|
+
zt as useVPPlayer,
|
|
2264
|
+
jt as useVPPlayerLogic,
|
|
2265
|
+
Ct as useVPPlayerScript
|
|
2425
2266
|
};
|