@therealtinhtute/baroiplayer 1.2.0 → 1.2.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.
Files changed (97) hide show
  1. package/README.md +1 -2
  2. package/dist/context/media.js +1 -2
  3. package/dist/context/media.mjs +3 -15
  4. package/dist/context/store.js +1 -2
  5. package/dist/context/store.mjs +3 -5
  6. package/dist/context-Bzd5QCKM.cjs +7 -0
  7. package/dist/context-Bzd5QCKM.cjs.map +1 -0
  8. package/dist/context-DD_SH4tT.js +1053 -0
  9. package/dist/context-DD_SH4tT.js.map +1 -0
  10. package/dist/core-events-BRnLMB7s.cjs +2 -0
  11. package/dist/core-events-BRnLMB7s.cjs.map +1 -0
  12. package/dist/core-events-v_mKdj5p.js +417 -0
  13. package/dist/core-events-v_mKdj5p.js.map +1 -0
  14. package/dist/core-plugins-CMBv-yVh.cjs +2 -0
  15. package/dist/core-plugins-CMBv-yVh.cjs.map +1 -0
  16. package/dist/core-plugins-CqCxLkbd.js +754 -0
  17. package/dist/core-plugins-CqCxLkbd.js.map +1 -0
  18. package/dist/core.js +7 -29
  19. package/dist/core.js.map +1 -1
  20. package/dist/core.mjs +947 -1220
  21. package/dist/core.mjs.map +1 -1
  22. package/dist/enhanced-components-BwjBqSA1.js +2858 -0
  23. package/dist/enhanced-components-BwjBqSA1.js.map +1 -0
  24. package/dist/enhanced-components-C-ka-XLp.cjs +2 -0
  25. package/dist/enhanced-components-C-ka-XLp.cjs.map +1 -0
  26. package/dist/hooks-B-IIWPJr.js +1842 -0
  27. package/dist/hooks-B-IIWPJr.js.map +1 -0
  28. package/dist/hooks-DcHzmBwA.cjs +4 -0
  29. package/dist/hooks-DcHzmBwA.cjs.map +1 -0
  30. package/dist/index.js +27 -97
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.mjs +5613 -6208
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/minimal-components-BYsMQde5.js +1610 -0
  35. package/dist/minimal-components-BYsMQde5.js.map +1 -0
  36. package/dist/minimal-components-CsxQbDp7.cjs +2 -0
  37. package/dist/minimal-components-CsxQbDp7.cjs.map +1 -0
  38. package/dist/performance-monitor-DCSijLJg.js +312 -0
  39. package/dist/performance-monitor-DCSijLJg.js.map +1 -0
  40. package/dist/performance-monitor-wNFKmqMr.cjs +2 -0
  41. package/dist/performance-monitor-wNFKmqMr.cjs.map +1 -0
  42. package/dist/rolldown-runtime-BmowowmI.js +14 -0
  43. package/dist/rolldown-runtime-mLOUI7ql.cjs +1 -0
  44. package/dist/utils-D2gQ7c2R.js +64 -0
  45. package/dist/utils-D2gQ7c2R.js.map +1 -0
  46. package/dist/utils-DJaAwiZ9.cjs +2 -0
  47. package/dist/utils-DJaAwiZ9.cjs.map +1 -0
  48. package/dist/utils.js +1 -2
  49. package/dist/utils.mjs +3 -11
  50. package/package.json +28 -22
  51. package/src/components/AnimateLoading.tsx +14 -10
  52. package/src/components/examples/loading-states-demo.tsx +1 -2
  53. package/src/components/examples/react-19-demo.tsx +6 -10
  54. package/src/components/examples/volume-orientation-demo.tsx +1 -2
  55. package/src/components/ui/blur-poster.tsx +18 -15
  56. package/src/components/variants/minimal/components/VideoElement.tsx +3 -1
  57. package/src/core/performance/media-loading-optimizer.ts +2 -1
  58. package/src/hooks/useScreenshot.ts +60 -44
  59. package/src/types/assets.d.ts +29 -0
  60. package/dist/context/media.js.map +0 -1
  61. package/dist/context/media.mjs.map +0 -1
  62. package/dist/context/store.js.map +0 -1
  63. package/dist/context/store.mjs.map +0 -1
  64. package/dist/context-BYwDoSRX.js +0 -1172
  65. package/dist/context-BYwDoSRX.js.map +0 -1
  66. package/dist/context-eNS62_ac.cjs +0 -23
  67. package/dist/context-eNS62_ac.cjs.map +0 -1
  68. package/dist/core-events-B1iM2F46.cjs +0 -2
  69. package/dist/core-events-B1iM2F46.cjs.map +0 -1
  70. package/dist/core-events-DunPHKRE.js +0 -484
  71. package/dist/core-events-DunPHKRE.js.map +0 -1
  72. package/dist/core-plugins-By-4-kGs.cjs +0 -2
  73. package/dist/core-plugins-By-4-kGs.cjs.map +0 -1
  74. package/dist/core-plugins-DSBWcTuX.js +0 -821
  75. package/dist/core-plugins-DSBWcTuX.js.map +0 -1
  76. package/dist/enhanced-components-B_l3cist.js +0 -1142
  77. package/dist/enhanced-components-B_l3cist.js.map +0 -1
  78. package/dist/enhanced-components-BspFs9OO.cjs +0 -2
  79. package/dist/enhanced-components-BspFs9OO.cjs.map +0 -1
  80. package/dist/hooks-BXwI8QG6.cjs +0 -4
  81. package/dist/hooks-BXwI8QG6.cjs.map +0 -1
  82. package/dist/hooks-Bpi-jDiO.js +0 -1816
  83. package/dist/hooks-Bpi-jDiO.js.map +0 -1
  84. package/dist/minimal-components-C4z900Ro.js +0 -1926
  85. package/dist/minimal-components-C4z900Ro.js.map +0 -1
  86. package/dist/minimal-components-v4qBp6jv.cjs +0 -2
  87. package/dist/minimal-components-v4qBp6jv.cjs.map +0 -1
  88. package/dist/performance-monitor-C5k6FDXw.js +0 -301
  89. package/dist/performance-monitor-C5k6FDXw.js.map +0 -1
  90. package/dist/performance-monitor-lJmuUjQQ.cjs +0 -2
  91. package/dist/performance-monitor-lJmuUjQQ.cjs.map +0 -1
  92. package/dist/utils-CFOue_9K.cjs +0 -9
  93. package/dist/utils-CFOue_9K.cjs.map +0 -1
  94. package/dist/utils-Dzpl2ArK.js +0 -2844
  95. package/dist/utils-Dzpl2ArK.js.map +0 -1
  96. package/dist/utils.js.map +0 -1
  97. package/dist/utils.mjs.map +0 -1
@@ -0,0 +1,2858 @@
1
+ import { n as e } from "./rolldown-runtime-BmowowmI.js";
2
+ import { a as t, f as n, i as r, l as i, u as a } from "./context-DD_SH4tT.js";
3
+ import o, { useMemo as s } from "react";
4
+ //#region ../../node_modules/clsx/dist/clsx.mjs
5
+ function c(e) {
6
+ var t, n, r = "";
7
+ if (typeof e == "string" || typeof e == "number") r += e;
8
+ else if (typeof e == "object") if (Array.isArray(e)) {
9
+ var i = e.length;
10
+ for (t = 0; t < i; t++) e[t] && (n = c(e[t])) && (r && (r += " "), r += n);
11
+ } else for (n in e) e[n] && (r && (r += " "), r += n);
12
+ return r;
13
+ }
14
+ function l() {
15
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = c(e)) && (r && (r += " "), r += t);
16
+ return r;
17
+ }
18
+ //#endregion
19
+ //#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
20
+ var u = (e, t) => {
21
+ let n = Array(e.length + t.length);
22
+ for (let t = 0; t < e.length; t++) n[t] = e[t];
23
+ for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
24
+ return n;
25
+ }, d = (e, t) => ({
26
+ classGroupId: e,
27
+ validator: t
28
+ }), f = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
29
+ nextPart: e,
30
+ validators: t,
31
+ classGroupId: n
32
+ }), p = "-", m = [], h = "arbitrary..", g = (e) => {
33
+ let t = y(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
34
+ return {
35
+ getClassGroupId: (e) => {
36
+ if (e.startsWith("[") && e.endsWith("]")) return v(e);
37
+ let n = e.split(p);
38
+ return _(n, +(n[0] === "" && n.length > 1), t);
39
+ },
40
+ getConflictingClassGroupIds: (e, t) => {
41
+ if (t) {
42
+ let t = r[e], i = n[e];
43
+ return t ? i ? u(i, t) : t : i || m;
44
+ }
45
+ return n[e] || m;
46
+ }
47
+ };
48
+ }, _ = (e, t, n) => {
49
+ if (e.length - t === 0) return n.classGroupId;
50
+ let r = n.nextPart.get(e[t]);
51
+ if (r) {
52
+ let n = _(e, t + 1, r);
53
+ if (n) return n;
54
+ }
55
+ let i = n.validators;
56
+ if (i === null) return;
57
+ let a = t === 0 ? e.join(p) : e.slice(t).join(p), o = i.length;
58
+ for (let e = 0; e < o; e++) {
59
+ let t = i[e];
60
+ if (t.validator(a)) return t.classGroupId;
61
+ }
62
+ }, v = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
63
+ let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
64
+ return r ? h + r : void 0;
65
+ })(), y = (e) => {
66
+ let { theme: t, classGroups: n } = e;
67
+ return b(n, t);
68
+ }, b = (e, t) => {
69
+ let n = f();
70
+ for (let r in e) {
71
+ let i = e[r];
72
+ x(i, n, r, t);
73
+ }
74
+ return n;
75
+ }, x = (e, t, n, r) => {
76
+ let i = e.length;
77
+ for (let a = 0; a < i; a++) {
78
+ let i = e[a];
79
+ S(i, t, n, r);
80
+ }
81
+ }, S = (e, t, n, r) => {
82
+ if (typeof e == "string") {
83
+ C(e, t, n);
84
+ return;
85
+ }
86
+ if (typeof e == "function") {
87
+ w(e, t, n, r);
88
+ return;
89
+ }
90
+ T(e, t, n, r);
91
+ }, C = (e, t, n) => {
92
+ let r = e === "" ? t : E(t, e);
93
+ r.classGroupId = n;
94
+ }, w = (e, t, n, r) => {
95
+ if (ee(e)) {
96
+ x(e(r), t, n, r);
97
+ return;
98
+ }
99
+ t.validators === null && (t.validators = []), t.validators.push(d(n, e));
100
+ }, T = (e, t, n, r) => {
101
+ let i = Object.entries(e), a = i.length;
102
+ for (let e = 0; e < a; e++) {
103
+ let [a, o] = i[e];
104
+ x(o, E(t, a), n, r);
105
+ }
106
+ }, E = (e, t) => {
107
+ let n = e, r = t.split(p), i = r.length;
108
+ for (let e = 0; e < i; e++) {
109
+ let t = r[e], i = n.nextPart.get(t);
110
+ i || (i = f(), n.nextPart.set(t, i)), n = i;
111
+ }
112
+ return n;
113
+ }, ee = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, D = (e) => {
114
+ if (e < 1) return {
115
+ get: () => void 0,
116
+ set: () => {}
117
+ };
118
+ let t = 0, n = Object.create(null), r = Object.create(null), i = (i, a) => {
119
+ n[i] = a, t++, t > e && (t = 0, r = n, n = Object.create(null));
120
+ };
121
+ return {
122
+ get(e) {
123
+ let t = n[e];
124
+ if (t !== void 0) return t;
125
+ if ((t = r[e]) !== void 0) return i(e, t), t;
126
+ },
127
+ set(e, t) {
128
+ e in n ? n[e] = t : i(e, t);
129
+ }
130
+ };
131
+ }, O = "!", k = ":", A = [], j = (e, t, n, r, i) => ({
132
+ modifiers: e,
133
+ hasImportantModifier: t,
134
+ baseClassName: n,
135
+ maybePostfixModifierPosition: r,
136
+ isExternal: i
137
+ }), M = (e) => {
138
+ let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
139
+ let t = [], n = 0, r = 0, i = 0, a, o = e.length;
140
+ for (let s = 0; s < o; s++) {
141
+ let o = e[s];
142
+ if (n === 0 && r === 0) {
143
+ if (o === k) {
144
+ t.push(e.slice(i, s)), i = s + 1;
145
+ continue;
146
+ }
147
+ if (o === "/") {
148
+ a = s;
149
+ continue;
150
+ }
151
+ }
152
+ o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
153
+ }
154
+ let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
155
+ s.endsWith(O) ? (c = s.slice(0, -1), l = !0) : s.startsWith(O) && (c = s.slice(1), l = !0);
156
+ let u = a && a > i ? a - i : void 0;
157
+ return j(t, l, c, u);
158
+ };
159
+ if (t) {
160
+ let e = t + k, n = r;
161
+ r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : j(A, !1, t, void 0, !0);
162
+ }
163
+ if (n) {
164
+ let e = r;
165
+ r = (t) => n({
166
+ className: t,
167
+ parseClassName: e
168
+ });
169
+ }
170
+ return r;
171
+ }, te = (e) => {
172
+ let t = /* @__PURE__ */ new Map();
173
+ return e.orderSensitiveModifiers.forEach((e, n) => {
174
+ t.set(e, 1e6 + n);
175
+ }), (e) => {
176
+ let n = [], r = [];
177
+ for (let i = 0; i < e.length; i++) {
178
+ let a = e[i], o = a[0] === "[", s = t.has(a);
179
+ o || s ? (r.length > 0 && (r.sort(), n.push(...r), r = []), n.push(a)) : r.push(a);
180
+ }
181
+ return r.length > 0 && (r.sort(), n.push(...r)), n;
182
+ };
183
+ }, ne = (e) => ({
184
+ cache: D(e.cacheSize),
185
+ parseClassName: M(e),
186
+ sortModifiers: te(e),
187
+ postfixLookupClassGroupIds: N(e),
188
+ ...g(e)
189
+ }), N = (e) => {
190
+ let t = Object.create(null), n = e.postfixLookupClassGroups;
191
+ if (n) for (let e = 0; e < n.length; e++) t[n[e]] = !0;
192
+ return t;
193
+ }, re = /\s+/, ie = (e, t) => {
194
+ let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(re), l = "";
195
+ for (let e = c.length - 1; e >= 0; --e) {
196
+ let t = c[e], { isExternal: u, modifiers: d, hasImportantModifier: f, baseClassName: p, maybePostfixModifierPosition: m } = n(t);
197
+ if (u) {
198
+ l = t + (l.length > 0 ? " " + l : l);
199
+ continue;
200
+ }
201
+ let h = !!m, g;
202
+ if (h) {
203
+ g = r(p.substring(0, m));
204
+ let e = g && o[g] ? r(p) : void 0;
205
+ e && e !== g && (g = e, h = !1);
206
+ } else g = r(p);
207
+ if (!g) {
208
+ if (!h) {
209
+ l = t + (l.length > 0 ? " " + l : l);
210
+ continue;
211
+ }
212
+ if (g = r(p), !g) {
213
+ l = t + (l.length > 0 ? " " + l : l);
214
+ continue;
215
+ }
216
+ h = !1;
217
+ }
218
+ let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + O : _, y = v + g;
219
+ if (s.indexOf(y) > -1) continue;
220
+ s.push(y);
221
+ let b = i(g, h);
222
+ for (let e = 0; e < b.length; ++e) s.push(v + b[e]);
223
+ l = t + (l.length > 0 ? " " + l : l);
224
+ }
225
+ return l;
226
+ }, ae = (...e) => {
227
+ let t = 0, n, r, i = "";
228
+ for (; t < e.length;) (n = e[t++]) && (r = oe(n)) && (i && (i += " "), i += r);
229
+ return i;
230
+ }, oe = (e) => {
231
+ if (typeof e == "string") return e;
232
+ let t, n = "";
233
+ for (let r = 0; r < e.length; r++) e[r] && (t = oe(e[r])) && (n && (n += " "), n += t);
234
+ return n;
235
+ }, P = (e, ...t) => {
236
+ let n, r, i, a, o = (o) => (n = ne(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
237
+ let t = r(e);
238
+ if (t) return t;
239
+ let a = ie(e, n);
240
+ return i(e, a), a;
241
+ };
242
+ return a = o, (...e) => a(ae(...e));
243
+ }, F = [], I = (e) => {
244
+ let t = (t) => t[e] || F;
245
+ return t.isThemeGetter = !0, t;
246
+ }, L = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, se = /^\((?:(\w[\w-]*):)?(.+)\)$/i, R = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, ce = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, z = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, B = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, le = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, V = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, H = (e) => R.test(e), U = (e) => !!e && !Number.isNaN(Number(e)), W = (e) => !!e && Number.isInteger(Number(e)), ue = (e) => e.endsWith("%") && U(e.slice(0, -1)), G = (e) => ce.test(e), de = () => !0, fe = (e) => z.test(e) && !B.test(e), pe = () => !1, me = (e) => le.test(e), he = (e) => V.test(e), ge = (e) => !K(e) && !J(e), _e = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), ve = (e) => Y(e, Pe, pe), K = (e) => L.test(e), q = (e) => Y(e, Fe, fe), ye = (e) => Y(e, Ie, U), be = (e) => Y(e, Re, de), xe = (e) => Y(e, Le, pe), Se = (e) => Y(e, Me, pe), Ce = (e) => Y(e, Ne, he), we = (e) => Y(e, ze, me), J = (e) => se.test(e), Te = (e) => X(e, Fe), Ee = (e) => X(e, Le), De = (e) => X(e, Me), Oe = (e) => X(e, Pe), ke = (e) => X(e, Ne), Ae = (e) => X(e, ze, !0), je = (e) => X(e, Re, !0), Y = (e, t, n) => {
247
+ let r = L.exec(e);
248
+ return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
249
+ }, X = (e, t, n = !1) => {
250
+ let r = se.exec(e);
251
+ return r ? r[1] ? t(r[1]) : n : !1;
252
+ }, Me = (e) => e === "position" || e === "percentage", Ne = (e) => e === "image" || e === "url", Pe = (e) => e === "length" || e === "size" || e === "bg-size", Fe = (e) => e === "length", Ie = (e) => e === "number", Le = (e) => e === "family-name", Re = (e) => e === "number" || e === "weight", ze = (e) => e === "shadow", Be = /*#__PURE__*/ P(() => {
253
+ let e = I("color"), t = I("font"), n = I("text"), r = I("font-weight"), i = I("tracking"), a = I("leading"), o = I("breakpoint"), s = I("container"), c = I("spacing"), l = I("radius"), u = I("shadow"), d = I("inset-shadow"), f = I("text-shadow"), p = I("drop-shadow"), m = I("blur"), h = I("perspective"), g = I("aspect"), _ = I("ease"), v = I("animate"), y = () => [
254
+ "auto",
255
+ "avoid",
256
+ "all",
257
+ "avoid-page",
258
+ "page",
259
+ "left",
260
+ "right",
261
+ "column"
262
+ ], b = () => [
263
+ "center",
264
+ "top",
265
+ "bottom",
266
+ "left",
267
+ "right",
268
+ "top-left",
269
+ "left-top",
270
+ "top-right",
271
+ "right-top",
272
+ "bottom-right",
273
+ "right-bottom",
274
+ "bottom-left",
275
+ "left-bottom"
276
+ ], x = () => [
277
+ ...b(),
278
+ J,
279
+ K
280
+ ], S = () => [
281
+ "auto",
282
+ "hidden",
283
+ "clip",
284
+ "visible",
285
+ "scroll"
286
+ ], C = () => [
287
+ "auto",
288
+ "contain",
289
+ "none"
290
+ ], w = () => [
291
+ J,
292
+ K,
293
+ c
294
+ ], T = () => [
295
+ H,
296
+ "full",
297
+ "auto",
298
+ ...w()
299
+ ], E = () => [
300
+ W,
301
+ "none",
302
+ "subgrid",
303
+ J,
304
+ K
305
+ ], ee = () => [
306
+ "auto",
307
+ { span: [
308
+ "full",
309
+ W,
310
+ J,
311
+ K
312
+ ] },
313
+ W,
314
+ J,
315
+ K
316
+ ], D = () => [
317
+ W,
318
+ "auto",
319
+ J,
320
+ K
321
+ ], O = () => [
322
+ "auto",
323
+ "min",
324
+ "max",
325
+ "fr",
326
+ J,
327
+ K
328
+ ], k = () => [
329
+ "start",
330
+ "end",
331
+ "center",
332
+ "between",
333
+ "around",
334
+ "evenly",
335
+ "stretch",
336
+ "baseline",
337
+ "center-safe",
338
+ "end-safe"
339
+ ], A = () => [
340
+ "start",
341
+ "end",
342
+ "center",
343
+ "stretch",
344
+ "center-safe",
345
+ "end-safe"
346
+ ], j = () => ["auto", ...w()], M = () => [
347
+ H,
348
+ "auto",
349
+ "full",
350
+ "dvw",
351
+ "dvh",
352
+ "lvw",
353
+ "lvh",
354
+ "svw",
355
+ "svh",
356
+ "min",
357
+ "max",
358
+ "fit",
359
+ ...w()
360
+ ], te = () => [
361
+ H,
362
+ "screen",
363
+ "full",
364
+ "dvw",
365
+ "lvw",
366
+ "svw",
367
+ "min",
368
+ "max",
369
+ "fit",
370
+ ...w()
371
+ ], ne = () => [
372
+ H,
373
+ "screen",
374
+ "full",
375
+ "lh",
376
+ "dvh",
377
+ "lvh",
378
+ "svh",
379
+ "min",
380
+ "max",
381
+ "fit",
382
+ ...w()
383
+ ], N = () => [
384
+ e,
385
+ J,
386
+ K
387
+ ], re = () => [
388
+ ...b(),
389
+ De,
390
+ Se,
391
+ { position: [J, K] }
392
+ ], ie = () => ["no-repeat", { repeat: [
393
+ "",
394
+ "x",
395
+ "y",
396
+ "space",
397
+ "round"
398
+ ] }], ae = () => [
399
+ "auto",
400
+ "cover",
401
+ "contain",
402
+ Oe,
403
+ ve,
404
+ { size: [J, K] }
405
+ ], oe = () => [
406
+ ue,
407
+ Te,
408
+ q
409
+ ], P = () => [
410
+ "",
411
+ "none",
412
+ "full",
413
+ l,
414
+ J,
415
+ K
416
+ ], F = () => [
417
+ "",
418
+ U,
419
+ Te,
420
+ q
421
+ ], L = () => [
422
+ "solid",
423
+ "dashed",
424
+ "dotted",
425
+ "double"
426
+ ], se = () => [
427
+ "normal",
428
+ "multiply",
429
+ "screen",
430
+ "overlay",
431
+ "darken",
432
+ "lighten",
433
+ "color-dodge",
434
+ "color-burn",
435
+ "hard-light",
436
+ "soft-light",
437
+ "difference",
438
+ "exclusion",
439
+ "hue",
440
+ "saturation",
441
+ "color",
442
+ "luminosity"
443
+ ], R = () => [
444
+ U,
445
+ ue,
446
+ De,
447
+ Se
448
+ ], ce = () => [
449
+ "",
450
+ "none",
451
+ m,
452
+ J,
453
+ K
454
+ ], z = () => [
455
+ "none",
456
+ U,
457
+ J,
458
+ K
459
+ ], B = () => [
460
+ "none",
461
+ U,
462
+ J,
463
+ K
464
+ ], le = () => [
465
+ U,
466
+ J,
467
+ K
468
+ ], V = () => [
469
+ H,
470
+ "full",
471
+ ...w()
472
+ ];
473
+ return {
474
+ cacheSize: 500,
475
+ theme: {
476
+ animate: [
477
+ "spin",
478
+ "ping",
479
+ "pulse",
480
+ "bounce"
481
+ ],
482
+ aspect: ["video"],
483
+ blur: [G],
484
+ breakpoint: [G],
485
+ color: [de],
486
+ container: [G],
487
+ "drop-shadow": [G],
488
+ ease: [
489
+ "in",
490
+ "out",
491
+ "in-out"
492
+ ],
493
+ font: [ge],
494
+ "font-weight": [
495
+ "thin",
496
+ "extralight",
497
+ "light",
498
+ "normal",
499
+ "medium",
500
+ "semibold",
501
+ "bold",
502
+ "extrabold",
503
+ "black"
504
+ ],
505
+ "inset-shadow": [G],
506
+ leading: [
507
+ "none",
508
+ "tight",
509
+ "snug",
510
+ "normal",
511
+ "relaxed",
512
+ "loose"
513
+ ],
514
+ perspective: [
515
+ "dramatic",
516
+ "near",
517
+ "normal",
518
+ "midrange",
519
+ "distant",
520
+ "none"
521
+ ],
522
+ radius: [G],
523
+ shadow: [G],
524
+ spacing: ["px", U],
525
+ text: [G],
526
+ "text-shadow": [G],
527
+ tracking: [
528
+ "tighter",
529
+ "tight",
530
+ "normal",
531
+ "wide",
532
+ "wider",
533
+ "widest"
534
+ ]
535
+ },
536
+ classGroups: {
537
+ aspect: [{ aspect: [
538
+ "auto",
539
+ "square",
540
+ H,
541
+ K,
542
+ J,
543
+ g
544
+ ] }],
545
+ container: ["container"],
546
+ "container-type": [{ "@container": [
547
+ "",
548
+ "normal",
549
+ "size",
550
+ J,
551
+ K
552
+ ] }],
553
+ "container-named": [_e],
554
+ columns: [{ columns: [
555
+ U,
556
+ K,
557
+ J,
558
+ s
559
+ ] }],
560
+ "break-after": [{ "break-after": y() }],
561
+ "break-before": [{ "break-before": y() }],
562
+ "break-inside": [{ "break-inside": [
563
+ "auto",
564
+ "avoid",
565
+ "avoid-page",
566
+ "avoid-column"
567
+ ] }],
568
+ "box-decoration": [{ "box-decoration": ["slice", "clone"] }],
569
+ box: [{ box: ["border", "content"] }],
570
+ display: [
571
+ "block",
572
+ "inline-block",
573
+ "inline",
574
+ "flex",
575
+ "inline-flex",
576
+ "table",
577
+ "inline-table",
578
+ "table-caption",
579
+ "table-cell",
580
+ "table-column",
581
+ "table-column-group",
582
+ "table-footer-group",
583
+ "table-header-group",
584
+ "table-row-group",
585
+ "table-row",
586
+ "flow-root",
587
+ "grid",
588
+ "inline-grid",
589
+ "contents",
590
+ "list-item",
591
+ "hidden"
592
+ ],
593
+ sr: ["sr-only", "not-sr-only"],
594
+ float: [{ float: [
595
+ "right",
596
+ "left",
597
+ "none",
598
+ "start",
599
+ "end"
600
+ ] }],
601
+ clear: [{ clear: [
602
+ "left",
603
+ "right",
604
+ "both",
605
+ "none",
606
+ "start",
607
+ "end"
608
+ ] }],
609
+ isolation: ["isolate", "isolation-auto"],
610
+ "object-fit": [{ object: [
611
+ "contain",
612
+ "cover",
613
+ "fill",
614
+ "none",
615
+ "scale-down"
616
+ ] }],
617
+ "object-position": [{ object: x() }],
618
+ overflow: [{ overflow: S() }],
619
+ "overflow-x": [{ "overflow-x": S() }],
620
+ "overflow-y": [{ "overflow-y": S() }],
621
+ overscroll: [{ overscroll: C() }],
622
+ "overscroll-x": [{ "overscroll-x": C() }],
623
+ "overscroll-y": [{ "overscroll-y": C() }],
624
+ position: [
625
+ "static",
626
+ "fixed",
627
+ "absolute",
628
+ "relative",
629
+ "sticky"
630
+ ],
631
+ inset: [{ inset: T() }],
632
+ "inset-x": [{ "inset-x": T() }],
633
+ "inset-y": [{ "inset-y": T() }],
634
+ start: [{
635
+ "inset-s": T(),
636
+ start: T()
637
+ }],
638
+ end: [{
639
+ "inset-e": T(),
640
+ end: T()
641
+ }],
642
+ "inset-bs": [{ "inset-bs": T() }],
643
+ "inset-be": [{ "inset-be": T() }],
644
+ top: [{ top: T() }],
645
+ right: [{ right: T() }],
646
+ bottom: [{ bottom: T() }],
647
+ left: [{ left: T() }],
648
+ visibility: [
649
+ "visible",
650
+ "invisible",
651
+ "collapse"
652
+ ],
653
+ z: [{ z: [
654
+ W,
655
+ "auto",
656
+ J,
657
+ K
658
+ ] }],
659
+ basis: [{ basis: [
660
+ H,
661
+ "full",
662
+ "auto",
663
+ s,
664
+ ...w()
665
+ ] }],
666
+ "flex-direction": [{ flex: [
667
+ "row",
668
+ "row-reverse",
669
+ "col",
670
+ "col-reverse"
671
+ ] }],
672
+ "flex-wrap": [{ flex: [
673
+ "nowrap",
674
+ "wrap",
675
+ "wrap-reverse"
676
+ ] }],
677
+ flex: [{ flex: [
678
+ U,
679
+ H,
680
+ "auto",
681
+ "initial",
682
+ "none",
683
+ K
684
+ ] }],
685
+ grow: [{ grow: [
686
+ "",
687
+ U,
688
+ J,
689
+ K
690
+ ] }],
691
+ shrink: [{ shrink: [
692
+ "",
693
+ U,
694
+ J,
695
+ K
696
+ ] }],
697
+ order: [{ order: [
698
+ W,
699
+ "first",
700
+ "last",
701
+ "none",
702
+ J,
703
+ K
704
+ ] }],
705
+ "grid-cols": [{ "grid-cols": E() }],
706
+ "col-start-end": [{ col: ee() }],
707
+ "col-start": [{ "col-start": D() }],
708
+ "col-end": [{ "col-end": D() }],
709
+ "grid-rows": [{ "grid-rows": E() }],
710
+ "row-start-end": [{ row: ee() }],
711
+ "row-start": [{ "row-start": D() }],
712
+ "row-end": [{ "row-end": D() }],
713
+ "grid-flow": [{ "grid-flow": [
714
+ "row",
715
+ "col",
716
+ "dense",
717
+ "row-dense",
718
+ "col-dense"
719
+ ] }],
720
+ "auto-cols": [{ "auto-cols": O() }],
721
+ "auto-rows": [{ "auto-rows": O() }],
722
+ gap: [{ gap: w() }],
723
+ "gap-x": [{ "gap-x": w() }],
724
+ "gap-y": [{ "gap-y": w() }],
725
+ "justify-content": [{ justify: [...k(), "normal"] }],
726
+ "justify-items": [{ "justify-items": [...A(), "normal"] }],
727
+ "justify-self": [{ "justify-self": ["auto", ...A()] }],
728
+ "align-content": [{ content: ["normal", ...k()] }],
729
+ "align-items": [{ items: [...A(), { baseline: ["", "last"] }] }],
730
+ "align-self": [{ self: [
731
+ "auto",
732
+ ...A(),
733
+ { baseline: ["", "last"] }
734
+ ] }],
735
+ "place-content": [{ "place-content": k() }],
736
+ "place-items": [{ "place-items": [...A(), "baseline"] }],
737
+ "place-self": [{ "place-self": ["auto", ...A()] }],
738
+ p: [{ p: w() }],
739
+ px: [{ px: w() }],
740
+ py: [{ py: w() }],
741
+ ps: [{ ps: w() }],
742
+ pe: [{ pe: w() }],
743
+ pbs: [{ pbs: w() }],
744
+ pbe: [{ pbe: w() }],
745
+ pt: [{ pt: w() }],
746
+ pr: [{ pr: w() }],
747
+ pb: [{ pb: w() }],
748
+ pl: [{ pl: w() }],
749
+ m: [{ m: j() }],
750
+ mx: [{ mx: j() }],
751
+ my: [{ my: j() }],
752
+ ms: [{ ms: j() }],
753
+ me: [{ me: j() }],
754
+ mbs: [{ mbs: j() }],
755
+ mbe: [{ mbe: j() }],
756
+ mt: [{ mt: j() }],
757
+ mr: [{ mr: j() }],
758
+ mb: [{ mb: j() }],
759
+ ml: [{ ml: j() }],
760
+ "space-x": [{ "space-x": w() }],
761
+ "space-x-reverse": ["space-x-reverse"],
762
+ "space-y": [{ "space-y": w() }],
763
+ "space-y-reverse": ["space-y-reverse"],
764
+ size: [{ size: M() }],
765
+ "inline-size": [{ inline: ["auto", ...te()] }],
766
+ "min-inline-size": [{ "min-inline": ["auto", ...te()] }],
767
+ "max-inline-size": [{ "max-inline": ["none", ...te()] }],
768
+ "block-size": [{ block: ["auto", ...ne()] }],
769
+ "min-block-size": [{ "min-block": ["auto", ...ne()] }],
770
+ "max-block-size": [{ "max-block": ["none", ...ne()] }],
771
+ w: [{ w: [
772
+ s,
773
+ "screen",
774
+ ...M()
775
+ ] }],
776
+ "min-w": [{ "min-w": [
777
+ s,
778
+ "screen",
779
+ "none",
780
+ ...M()
781
+ ] }],
782
+ "max-w": [{ "max-w": [
783
+ s,
784
+ "screen",
785
+ "none",
786
+ "prose",
787
+ { screen: [o] },
788
+ ...M()
789
+ ] }],
790
+ h: [{ h: [
791
+ "screen",
792
+ "lh",
793
+ ...M()
794
+ ] }],
795
+ "min-h": [{ "min-h": [
796
+ "screen",
797
+ "lh",
798
+ "none",
799
+ ...M()
800
+ ] }],
801
+ "max-h": [{ "max-h": [
802
+ "screen",
803
+ "lh",
804
+ ...M()
805
+ ] }],
806
+ "font-size": [{ text: [
807
+ "base",
808
+ n,
809
+ Te,
810
+ q
811
+ ] }],
812
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
813
+ "font-style": ["italic", "not-italic"],
814
+ "font-weight": [{ font: [
815
+ r,
816
+ je,
817
+ be
818
+ ] }],
819
+ "font-stretch": [{ "font-stretch": [
820
+ "ultra-condensed",
821
+ "extra-condensed",
822
+ "condensed",
823
+ "semi-condensed",
824
+ "normal",
825
+ "semi-expanded",
826
+ "expanded",
827
+ "extra-expanded",
828
+ "ultra-expanded",
829
+ ue,
830
+ K
831
+ ] }],
832
+ "font-family": [{ font: [
833
+ Ee,
834
+ xe,
835
+ t
836
+ ] }],
837
+ "font-features": [{ "font-features": [K] }],
838
+ "fvn-normal": ["normal-nums"],
839
+ "fvn-ordinal": ["ordinal"],
840
+ "fvn-slashed-zero": ["slashed-zero"],
841
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
842
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
843
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
844
+ tracking: [{ tracking: [
845
+ i,
846
+ J,
847
+ K
848
+ ] }],
849
+ "line-clamp": [{ "line-clamp": [
850
+ U,
851
+ "none",
852
+ J,
853
+ ye
854
+ ] }],
855
+ leading: [{ leading: [a, ...w()] }],
856
+ "list-image": [{ "list-image": [
857
+ "none",
858
+ J,
859
+ K
860
+ ] }],
861
+ "list-style-position": [{ list: ["inside", "outside"] }],
862
+ "list-style-type": [{ list: [
863
+ "disc",
864
+ "decimal",
865
+ "none",
866
+ J,
867
+ K
868
+ ] }],
869
+ "text-alignment": [{ text: [
870
+ "left",
871
+ "center",
872
+ "right",
873
+ "justify",
874
+ "start",
875
+ "end"
876
+ ] }],
877
+ "placeholder-color": [{ placeholder: N() }],
878
+ "text-color": [{ text: N() }],
879
+ "text-decoration": [
880
+ "underline",
881
+ "overline",
882
+ "line-through",
883
+ "no-underline"
884
+ ],
885
+ "text-decoration-style": [{ decoration: [...L(), "wavy"] }],
886
+ "text-decoration-thickness": [{ decoration: [
887
+ U,
888
+ "from-font",
889
+ "auto",
890
+ J,
891
+ q
892
+ ] }],
893
+ "text-decoration-color": [{ decoration: N() }],
894
+ "underline-offset": [{ "underline-offset": [
895
+ U,
896
+ "auto",
897
+ J,
898
+ K
899
+ ] }],
900
+ "text-transform": [
901
+ "uppercase",
902
+ "lowercase",
903
+ "capitalize",
904
+ "normal-case"
905
+ ],
906
+ "text-overflow": [
907
+ "truncate",
908
+ "text-ellipsis",
909
+ "text-clip"
910
+ ],
911
+ "text-wrap": [{ text: [
912
+ "wrap",
913
+ "nowrap",
914
+ "balance",
915
+ "pretty"
916
+ ] }],
917
+ indent: [{ indent: w() }],
918
+ "tab-size": [{ tab: [
919
+ W,
920
+ J,
921
+ K
922
+ ] }],
923
+ "vertical-align": [{ align: [
924
+ "baseline",
925
+ "top",
926
+ "middle",
927
+ "bottom",
928
+ "text-top",
929
+ "text-bottom",
930
+ "sub",
931
+ "super",
932
+ J,
933
+ K
934
+ ] }],
935
+ whitespace: [{ whitespace: [
936
+ "normal",
937
+ "nowrap",
938
+ "pre",
939
+ "pre-line",
940
+ "pre-wrap",
941
+ "break-spaces"
942
+ ] }],
943
+ break: [{ break: [
944
+ "normal",
945
+ "words",
946
+ "all",
947
+ "keep"
948
+ ] }],
949
+ wrap: [{ wrap: [
950
+ "break-word",
951
+ "anywhere",
952
+ "normal"
953
+ ] }],
954
+ hyphens: [{ hyphens: [
955
+ "none",
956
+ "manual",
957
+ "auto"
958
+ ] }],
959
+ content: [{ content: [
960
+ "none",
961
+ J,
962
+ K
963
+ ] }],
964
+ "bg-attachment": [{ bg: [
965
+ "fixed",
966
+ "local",
967
+ "scroll"
968
+ ] }],
969
+ "bg-clip": [{ "bg-clip": [
970
+ "border",
971
+ "padding",
972
+ "content",
973
+ "text"
974
+ ] }],
975
+ "bg-origin": [{ "bg-origin": [
976
+ "border",
977
+ "padding",
978
+ "content"
979
+ ] }],
980
+ "bg-position": [{ bg: re() }],
981
+ "bg-repeat": [{ bg: ie() }],
982
+ "bg-size": [{ bg: ae() }],
983
+ "bg-image": [{ bg: [
984
+ "none",
985
+ {
986
+ linear: [
987
+ { to: [
988
+ "t",
989
+ "tr",
990
+ "r",
991
+ "br",
992
+ "b",
993
+ "bl",
994
+ "l",
995
+ "tl"
996
+ ] },
997
+ W,
998
+ J,
999
+ K
1000
+ ],
1001
+ radial: [
1002
+ "",
1003
+ J,
1004
+ K
1005
+ ],
1006
+ conic: [
1007
+ W,
1008
+ J,
1009
+ K
1010
+ ]
1011
+ },
1012
+ ke,
1013
+ Ce
1014
+ ] }],
1015
+ "bg-color": [{ bg: N() }],
1016
+ "gradient-from-pos": [{ from: oe() }],
1017
+ "gradient-via-pos": [{ via: oe() }],
1018
+ "gradient-to-pos": [{ to: oe() }],
1019
+ "gradient-from": [{ from: N() }],
1020
+ "gradient-via": [{ via: N() }],
1021
+ "gradient-to": [{ to: N() }],
1022
+ rounded: [{ rounded: P() }],
1023
+ "rounded-s": [{ "rounded-s": P() }],
1024
+ "rounded-e": [{ "rounded-e": P() }],
1025
+ "rounded-t": [{ "rounded-t": P() }],
1026
+ "rounded-r": [{ "rounded-r": P() }],
1027
+ "rounded-b": [{ "rounded-b": P() }],
1028
+ "rounded-l": [{ "rounded-l": P() }],
1029
+ "rounded-ss": [{ "rounded-ss": P() }],
1030
+ "rounded-se": [{ "rounded-se": P() }],
1031
+ "rounded-ee": [{ "rounded-ee": P() }],
1032
+ "rounded-es": [{ "rounded-es": P() }],
1033
+ "rounded-tl": [{ "rounded-tl": P() }],
1034
+ "rounded-tr": [{ "rounded-tr": P() }],
1035
+ "rounded-br": [{ "rounded-br": P() }],
1036
+ "rounded-bl": [{ "rounded-bl": P() }],
1037
+ "border-w": [{ border: F() }],
1038
+ "border-w-x": [{ "border-x": F() }],
1039
+ "border-w-y": [{ "border-y": F() }],
1040
+ "border-w-s": [{ "border-s": F() }],
1041
+ "border-w-e": [{ "border-e": F() }],
1042
+ "border-w-bs": [{ "border-bs": F() }],
1043
+ "border-w-be": [{ "border-be": F() }],
1044
+ "border-w-t": [{ "border-t": F() }],
1045
+ "border-w-r": [{ "border-r": F() }],
1046
+ "border-w-b": [{ "border-b": F() }],
1047
+ "border-w-l": [{ "border-l": F() }],
1048
+ "divide-x": [{ "divide-x": F() }],
1049
+ "divide-x-reverse": ["divide-x-reverse"],
1050
+ "divide-y": [{ "divide-y": F() }],
1051
+ "divide-y-reverse": ["divide-y-reverse"],
1052
+ "border-style": [{ border: [
1053
+ ...L(),
1054
+ "hidden",
1055
+ "none"
1056
+ ] }],
1057
+ "divide-style": [{ divide: [
1058
+ ...L(),
1059
+ "hidden",
1060
+ "none"
1061
+ ] }],
1062
+ "border-color": [{ border: N() }],
1063
+ "border-color-x": [{ "border-x": N() }],
1064
+ "border-color-y": [{ "border-y": N() }],
1065
+ "border-color-s": [{ "border-s": N() }],
1066
+ "border-color-e": [{ "border-e": N() }],
1067
+ "border-color-bs": [{ "border-bs": N() }],
1068
+ "border-color-be": [{ "border-be": N() }],
1069
+ "border-color-t": [{ "border-t": N() }],
1070
+ "border-color-r": [{ "border-r": N() }],
1071
+ "border-color-b": [{ "border-b": N() }],
1072
+ "border-color-l": [{ "border-l": N() }],
1073
+ "divide-color": [{ divide: N() }],
1074
+ "outline-style": [{ outline: [
1075
+ ...L(),
1076
+ "none",
1077
+ "hidden"
1078
+ ] }],
1079
+ "outline-offset": [{ "outline-offset": [
1080
+ U,
1081
+ J,
1082
+ K
1083
+ ] }],
1084
+ "outline-w": [{ outline: [
1085
+ "",
1086
+ U,
1087
+ Te,
1088
+ q
1089
+ ] }],
1090
+ "outline-color": [{ outline: N() }],
1091
+ shadow: [{ shadow: [
1092
+ "",
1093
+ "none",
1094
+ u,
1095
+ Ae,
1096
+ we
1097
+ ] }],
1098
+ "shadow-color": [{ shadow: N() }],
1099
+ "inset-shadow": [{ "inset-shadow": [
1100
+ "none",
1101
+ d,
1102
+ Ae,
1103
+ we
1104
+ ] }],
1105
+ "inset-shadow-color": [{ "inset-shadow": N() }],
1106
+ "ring-w": [{ ring: F() }],
1107
+ "ring-w-inset": ["ring-inset"],
1108
+ "ring-color": [{ ring: N() }],
1109
+ "ring-offset-w": [{ "ring-offset": [U, q] }],
1110
+ "ring-offset-color": [{ "ring-offset": N() }],
1111
+ "inset-ring-w": [{ "inset-ring": F() }],
1112
+ "inset-ring-color": [{ "inset-ring": N() }],
1113
+ "text-shadow": [{ "text-shadow": [
1114
+ "none",
1115
+ f,
1116
+ Ae,
1117
+ we
1118
+ ] }],
1119
+ "text-shadow-color": [{ "text-shadow": N() }],
1120
+ opacity: [{ opacity: [
1121
+ U,
1122
+ J,
1123
+ K
1124
+ ] }],
1125
+ "mix-blend": [{ "mix-blend": [
1126
+ ...se(),
1127
+ "plus-darker",
1128
+ "plus-lighter"
1129
+ ] }],
1130
+ "bg-blend": [{ "bg-blend": se() }],
1131
+ "mask-clip": [{ "mask-clip": [
1132
+ "border",
1133
+ "padding",
1134
+ "content",
1135
+ "fill",
1136
+ "stroke",
1137
+ "view"
1138
+ ] }, "mask-no-clip"],
1139
+ "mask-composite": [{ mask: [
1140
+ "add",
1141
+ "subtract",
1142
+ "intersect",
1143
+ "exclude"
1144
+ ] }],
1145
+ "mask-image-linear-pos": [{ "mask-linear": [U] }],
1146
+ "mask-image-linear-from-pos": [{ "mask-linear-from": R() }],
1147
+ "mask-image-linear-to-pos": [{ "mask-linear-to": R() }],
1148
+ "mask-image-linear-from-color": [{ "mask-linear-from": N() }],
1149
+ "mask-image-linear-to-color": [{ "mask-linear-to": N() }],
1150
+ "mask-image-t-from-pos": [{ "mask-t-from": R() }],
1151
+ "mask-image-t-to-pos": [{ "mask-t-to": R() }],
1152
+ "mask-image-t-from-color": [{ "mask-t-from": N() }],
1153
+ "mask-image-t-to-color": [{ "mask-t-to": N() }],
1154
+ "mask-image-r-from-pos": [{ "mask-r-from": R() }],
1155
+ "mask-image-r-to-pos": [{ "mask-r-to": R() }],
1156
+ "mask-image-r-from-color": [{ "mask-r-from": N() }],
1157
+ "mask-image-r-to-color": [{ "mask-r-to": N() }],
1158
+ "mask-image-b-from-pos": [{ "mask-b-from": R() }],
1159
+ "mask-image-b-to-pos": [{ "mask-b-to": R() }],
1160
+ "mask-image-b-from-color": [{ "mask-b-from": N() }],
1161
+ "mask-image-b-to-color": [{ "mask-b-to": N() }],
1162
+ "mask-image-l-from-pos": [{ "mask-l-from": R() }],
1163
+ "mask-image-l-to-pos": [{ "mask-l-to": R() }],
1164
+ "mask-image-l-from-color": [{ "mask-l-from": N() }],
1165
+ "mask-image-l-to-color": [{ "mask-l-to": N() }],
1166
+ "mask-image-x-from-pos": [{ "mask-x-from": R() }],
1167
+ "mask-image-x-to-pos": [{ "mask-x-to": R() }],
1168
+ "mask-image-x-from-color": [{ "mask-x-from": N() }],
1169
+ "mask-image-x-to-color": [{ "mask-x-to": N() }],
1170
+ "mask-image-y-from-pos": [{ "mask-y-from": R() }],
1171
+ "mask-image-y-to-pos": [{ "mask-y-to": R() }],
1172
+ "mask-image-y-from-color": [{ "mask-y-from": N() }],
1173
+ "mask-image-y-to-color": [{ "mask-y-to": N() }],
1174
+ "mask-image-radial": [{ "mask-radial": [J, K] }],
1175
+ "mask-image-radial-from-pos": [{ "mask-radial-from": R() }],
1176
+ "mask-image-radial-to-pos": [{ "mask-radial-to": R() }],
1177
+ "mask-image-radial-from-color": [{ "mask-radial-from": N() }],
1178
+ "mask-image-radial-to-color": [{ "mask-radial-to": N() }],
1179
+ "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
1180
+ "mask-image-radial-size": [{ "mask-radial": [{
1181
+ closest: ["side", "corner"],
1182
+ farthest: ["side", "corner"]
1183
+ }] }],
1184
+ "mask-image-radial-pos": [{ "mask-radial-at": b() }],
1185
+ "mask-image-conic-pos": [{ "mask-conic": [U] }],
1186
+ "mask-image-conic-from-pos": [{ "mask-conic-from": R() }],
1187
+ "mask-image-conic-to-pos": [{ "mask-conic-to": R() }],
1188
+ "mask-image-conic-from-color": [{ "mask-conic-from": N() }],
1189
+ "mask-image-conic-to-color": [{ "mask-conic-to": N() }],
1190
+ "mask-mode": [{ mask: [
1191
+ "alpha",
1192
+ "luminance",
1193
+ "match"
1194
+ ] }],
1195
+ "mask-origin": [{ "mask-origin": [
1196
+ "border",
1197
+ "padding",
1198
+ "content",
1199
+ "fill",
1200
+ "stroke",
1201
+ "view"
1202
+ ] }],
1203
+ "mask-position": [{ mask: re() }],
1204
+ "mask-repeat": [{ mask: ie() }],
1205
+ "mask-size": [{ mask: ae() }],
1206
+ "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
1207
+ "mask-image": [{ mask: [
1208
+ "none",
1209
+ J,
1210
+ K
1211
+ ] }],
1212
+ filter: [{ filter: [
1213
+ "",
1214
+ "none",
1215
+ J,
1216
+ K
1217
+ ] }],
1218
+ blur: [{ blur: ce() }],
1219
+ brightness: [{ brightness: [
1220
+ U,
1221
+ J,
1222
+ K
1223
+ ] }],
1224
+ contrast: [{ contrast: [
1225
+ U,
1226
+ J,
1227
+ K
1228
+ ] }],
1229
+ "drop-shadow": [{ "drop-shadow": [
1230
+ "",
1231
+ "none",
1232
+ p,
1233
+ Ae,
1234
+ we
1235
+ ] }],
1236
+ "drop-shadow-color": [{ "drop-shadow": N() }],
1237
+ grayscale: [{ grayscale: [
1238
+ "",
1239
+ U,
1240
+ J,
1241
+ K
1242
+ ] }],
1243
+ "hue-rotate": [{ "hue-rotate": [
1244
+ U,
1245
+ J,
1246
+ K
1247
+ ] }],
1248
+ invert: [{ invert: [
1249
+ "",
1250
+ U,
1251
+ J,
1252
+ K
1253
+ ] }],
1254
+ saturate: [{ saturate: [
1255
+ U,
1256
+ J,
1257
+ K
1258
+ ] }],
1259
+ sepia: [{ sepia: [
1260
+ "",
1261
+ U,
1262
+ J,
1263
+ K
1264
+ ] }],
1265
+ "backdrop-filter": [{ "backdrop-filter": [
1266
+ "",
1267
+ "none",
1268
+ J,
1269
+ K
1270
+ ] }],
1271
+ "backdrop-blur": [{ "backdrop-blur": ce() }],
1272
+ "backdrop-brightness": [{ "backdrop-brightness": [
1273
+ U,
1274
+ J,
1275
+ K
1276
+ ] }],
1277
+ "backdrop-contrast": [{ "backdrop-contrast": [
1278
+ U,
1279
+ J,
1280
+ K
1281
+ ] }],
1282
+ "backdrop-grayscale": [{ "backdrop-grayscale": [
1283
+ "",
1284
+ U,
1285
+ J,
1286
+ K
1287
+ ] }],
1288
+ "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
1289
+ U,
1290
+ J,
1291
+ K
1292
+ ] }],
1293
+ "backdrop-invert": [{ "backdrop-invert": [
1294
+ "",
1295
+ U,
1296
+ J,
1297
+ K
1298
+ ] }],
1299
+ "backdrop-opacity": [{ "backdrop-opacity": [
1300
+ U,
1301
+ J,
1302
+ K
1303
+ ] }],
1304
+ "backdrop-saturate": [{ "backdrop-saturate": [
1305
+ U,
1306
+ J,
1307
+ K
1308
+ ] }],
1309
+ "backdrop-sepia": [{ "backdrop-sepia": [
1310
+ "",
1311
+ U,
1312
+ J,
1313
+ K
1314
+ ] }],
1315
+ "border-collapse": [{ border: ["collapse", "separate"] }],
1316
+ "border-spacing": [{ "border-spacing": w() }],
1317
+ "border-spacing-x": [{ "border-spacing-x": w() }],
1318
+ "border-spacing-y": [{ "border-spacing-y": w() }],
1319
+ "table-layout": [{ table: ["auto", "fixed"] }],
1320
+ caption: [{ caption: ["top", "bottom"] }],
1321
+ transition: [{ transition: [
1322
+ "",
1323
+ "all",
1324
+ "colors",
1325
+ "opacity",
1326
+ "shadow",
1327
+ "transform",
1328
+ "none",
1329
+ J,
1330
+ K
1331
+ ] }],
1332
+ "transition-behavior": [{ transition: ["normal", "discrete"] }],
1333
+ duration: [{ duration: [
1334
+ U,
1335
+ "initial",
1336
+ J,
1337
+ K
1338
+ ] }],
1339
+ ease: [{ ease: [
1340
+ "linear",
1341
+ "initial",
1342
+ _,
1343
+ J,
1344
+ K
1345
+ ] }],
1346
+ delay: [{ delay: [
1347
+ U,
1348
+ J,
1349
+ K
1350
+ ] }],
1351
+ animate: [{ animate: [
1352
+ "none",
1353
+ v,
1354
+ J,
1355
+ K
1356
+ ] }],
1357
+ backface: [{ backface: ["hidden", "visible"] }],
1358
+ perspective: [{ perspective: [
1359
+ h,
1360
+ J,
1361
+ K
1362
+ ] }],
1363
+ "perspective-origin": [{ "perspective-origin": x() }],
1364
+ rotate: [{ rotate: z() }],
1365
+ "rotate-x": [{ "rotate-x": z() }],
1366
+ "rotate-y": [{ "rotate-y": z() }],
1367
+ "rotate-z": [{ "rotate-z": z() }],
1368
+ scale: [{ scale: B() }],
1369
+ "scale-x": [{ "scale-x": B() }],
1370
+ "scale-y": [{ "scale-y": B() }],
1371
+ "scale-z": [{ "scale-z": B() }],
1372
+ "scale-3d": ["scale-3d"],
1373
+ skew: [{ skew: le() }],
1374
+ "skew-x": [{ "skew-x": le() }],
1375
+ "skew-y": [{ "skew-y": le() }],
1376
+ transform: [{ transform: [
1377
+ J,
1378
+ K,
1379
+ "",
1380
+ "none",
1381
+ "gpu",
1382
+ "cpu"
1383
+ ] }],
1384
+ "transform-origin": [{ origin: x() }],
1385
+ "transform-style": [{ transform: ["3d", "flat"] }],
1386
+ translate: [{ translate: V() }],
1387
+ "translate-x": [{ "translate-x": V() }],
1388
+ "translate-y": [{ "translate-y": V() }],
1389
+ "translate-z": [{ "translate-z": V() }],
1390
+ "translate-none": ["translate-none"],
1391
+ zoom: [{ zoom: [
1392
+ W,
1393
+ J,
1394
+ K
1395
+ ] }],
1396
+ accent: [{ accent: N() }],
1397
+ appearance: [{ appearance: ["none", "auto"] }],
1398
+ "caret-color": [{ caret: N() }],
1399
+ "color-scheme": [{ scheme: [
1400
+ "normal",
1401
+ "dark",
1402
+ "light",
1403
+ "light-dark",
1404
+ "only-dark",
1405
+ "only-light"
1406
+ ] }],
1407
+ cursor: [{ cursor: [
1408
+ "auto",
1409
+ "default",
1410
+ "pointer",
1411
+ "wait",
1412
+ "text",
1413
+ "move",
1414
+ "help",
1415
+ "not-allowed",
1416
+ "none",
1417
+ "context-menu",
1418
+ "progress",
1419
+ "cell",
1420
+ "crosshair",
1421
+ "vertical-text",
1422
+ "alias",
1423
+ "copy",
1424
+ "no-drop",
1425
+ "grab",
1426
+ "grabbing",
1427
+ "all-scroll",
1428
+ "col-resize",
1429
+ "row-resize",
1430
+ "n-resize",
1431
+ "e-resize",
1432
+ "s-resize",
1433
+ "w-resize",
1434
+ "ne-resize",
1435
+ "nw-resize",
1436
+ "se-resize",
1437
+ "sw-resize",
1438
+ "ew-resize",
1439
+ "ns-resize",
1440
+ "nesw-resize",
1441
+ "nwse-resize",
1442
+ "zoom-in",
1443
+ "zoom-out",
1444
+ J,
1445
+ K
1446
+ ] }],
1447
+ "field-sizing": [{ "field-sizing": ["fixed", "content"] }],
1448
+ "pointer-events": [{ "pointer-events": ["auto", "none"] }],
1449
+ resize: [{ resize: [
1450
+ "none",
1451
+ "",
1452
+ "y",
1453
+ "x"
1454
+ ] }],
1455
+ "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
1456
+ "scrollbar-thumb-color": [{ "scrollbar-thumb": N() }],
1457
+ "scrollbar-track-color": [{ "scrollbar-track": N() }],
1458
+ "scrollbar-gutter": [{ "scrollbar-gutter": [
1459
+ "auto",
1460
+ "stable",
1461
+ "both"
1462
+ ] }],
1463
+ "scrollbar-w": [{ scrollbar: [
1464
+ "auto",
1465
+ "thin",
1466
+ "none"
1467
+ ] }],
1468
+ "scroll-m": [{ "scroll-m": w() }],
1469
+ "scroll-mx": [{ "scroll-mx": w() }],
1470
+ "scroll-my": [{ "scroll-my": w() }],
1471
+ "scroll-ms": [{ "scroll-ms": w() }],
1472
+ "scroll-me": [{ "scroll-me": w() }],
1473
+ "scroll-mbs": [{ "scroll-mbs": w() }],
1474
+ "scroll-mbe": [{ "scroll-mbe": w() }],
1475
+ "scroll-mt": [{ "scroll-mt": w() }],
1476
+ "scroll-mr": [{ "scroll-mr": w() }],
1477
+ "scroll-mb": [{ "scroll-mb": w() }],
1478
+ "scroll-ml": [{ "scroll-ml": w() }],
1479
+ "scroll-p": [{ "scroll-p": w() }],
1480
+ "scroll-px": [{ "scroll-px": w() }],
1481
+ "scroll-py": [{ "scroll-py": w() }],
1482
+ "scroll-ps": [{ "scroll-ps": w() }],
1483
+ "scroll-pe": [{ "scroll-pe": w() }],
1484
+ "scroll-pbs": [{ "scroll-pbs": w() }],
1485
+ "scroll-pbe": [{ "scroll-pbe": w() }],
1486
+ "scroll-pt": [{ "scroll-pt": w() }],
1487
+ "scroll-pr": [{ "scroll-pr": w() }],
1488
+ "scroll-pb": [{ "scroll-pb": w() }],
1489
+ "scroll-pl": [{ "scroll-pl": w() }],
1490
+ "snap-align": [{ snap: [
1491
+ "start",
1492
+ "end",
1493
+ "center",
1494
+ "align-none"
1495
+ ] }],
1496
+ "snap-stop": [{ snap: ["normal", "always"] }],
1497
+ "snap-type": [{ snap: [
1498
+ "none",
1499
+ "x",
1500
+ "y",
1501
+ "both"
1502
+ ] }],
1503
+ "snap-strictness": [{ snap: ["mandatory", "proximity"] }],
1504
+ touch: [{ touch: [
1505
+ "auto",
1506
+ "none",
1507
+ "manipulation"
1508
+ ] }],
1509
+ "touch-x": [{ "touch-pan": [
1510
+ "x",
1511
+ "left",
1512
+ "right"
1513
+ ] }],
1514
+ "touch-y": [{ "touch-pan": [
1515
+ "y",
1516
+ "up",
1517
+ "down"
1518
+ ] }],
1519
+ "touch-pz": ["touch-pinch-zoom"],
1520
+ select: [{ select: [
1521
+ "none",
1522
+ "text",
1523
+ "all",
1524
+ "auto"
1525
+ ] }],
1526
+ "will-change": [{ "will-change": [
1527
+ "auto",
1528
+ "scroll",
1529
+ "contents",
1530
+ "transform",
1531
+ J,
1532
+ K
1533
+ ] }],
1534
+ fill: [{ fill: ["none", ...N()] }],
1535
+ "stroke-w": [{ stroke: [
1536
+ U,
1537
+ Te,
1538
+ q,
1539
+ ye
1540
+ ] }],
1541
+ stroke: [{ stroke: ["none", ...N()] }],
1542
+ "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
1543
+ },
1544
+ conflictingClassGroups: {
1545
+ "container-named": ["container-type"],
1546
+ overflow: ["overflow-x", "overflow-y"],
1547
+ overscroll: ["overscroll-x", "overscroll-y"],
1548
+ inset: [
1549
+ "inset-x",
1550
+ "inset-y",
1551
+ "inset-bs",
1552
+ "inset-be",
1553
+ "start",
1554
+ "end",
1555
+ "top",
1556
+ "right",
1557
+ "bottom",
1558
+ "left"
1559
+ ],
1560
+ "inset-x": ["right", "left"],
1561
+ "inset-y": ["top", "bottom"],
1562
+ flex: [
1563
+ "basis",
1564
+ "grow",
1565
+ "shrink"
1566
+ ],
1567
+ gap: ["gap-x", "gap-y"],
1568
+ p: [
1569
+ "px",
1570
+ "py",
1571
+ "ps",
1572
+ "pe",
1573
+ "pbs",
1574
+ "pbe",
1575
+ "pt",
1576
+ "pr",
1577
+ "pb",
1578
+ "pl"
1579
+ ],
1580
+ px: ["pr", "pl"],
1581
+ py: ["pt", "pb"],
1582
+ m: [
1583
+ "mx",
1584
+ "my",
1585
+ "ms",
1586
+ "me",
1587
+ "mbs",
1588
+ "mbe",
1589
+ "mt",
1590
+ "mr",
1591
+ "mb",
1592
+ "ml"
1593
+ ],
1594
+ mx: ["mr", "ml"],
1595
+ my: ["mt", "mb"],
1596
+ size: ["w", "h"],
1597
+ "font-size": ["leading"],
1598
+ "fvn-normal": [
1599
+ "fvn-ordinal",
1600
+ "fvn-slashed-zero",
1601
+ "fvn-figure",
1602
+ "fvn-spacing",
1603
+ "fvn-fraction"
1604
+ ],
1605
+ "fvn-ordinal": ["fvn-normal"],
1606
+ "fvn-slashed-zero": ["fvn-normal"],
1607
+ "fvn-figure": ["fvn-normal"],
1608
+ "fvn-spacing": ["fvn-normal"],
1609
+ "fvn-fraction": ["fvn-normal"],
1610
+ "line-clamp": ["display", "overflow"],
1611
+ rounded: [
1612
+ "rounded-s",
1613
+ "rounded-e",
1614
+ "rounded-t",
1615
+ "rounded-r",
1616
+ "rounded-b",
1617
+ "rounded-l",
1618
+ "rounded-ss",
1619
+ "rounded-se",
1620
+ "rounded-ee",
1621
+ "rounded-es",
1622
+ "rounded-tl",
1623
+ "rounded-tr",
1624
+ "rounded-br",
1625
+ "rounded-bl"
1626
+ ],
1627
+ "rounded-s": ["rounded-ss", "rounded-es"],
1628
+ "rounded-e": ["rounded-se", "rounded-ee"],
1629
+ "rounded-t": ["rounded-tl", "rounded-tr"],
1630
+ "rounded-r": ["rounded-tr", "rounded-br"],
1631
+ "rounded-b": ["rounded-br", "rounded-bl"],
1632
+ "rounded-l": ["rounded-tl", "rounded-bl"],
1633
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
1634
+ "border-w": [
1635
+ "border-w-x",
1636
+ "border-w-y",
1637
+ "border-w-s",
1638
+ "border-w-e",
1639
+ "border-w-bs",
1640
+ "border-w-be",
1641
+ "border-w-t",
1642
+ "border-w-r",
1643
+ "border-w-b",
1644
+ "border-w-l"
1645
+ ],
1646
+ "border-w-x": ["border-w-r", "border-w-l"],
1647
+ "border-w-y": ["border-w-t", "border-w-b"],
1648
+ "border-color": [
1649
+ "border-color-x",
1650
+ "border-color-y",
1651
+ "border-color-s",
1652
+ "border-color-e",
1653
+ "border-color-bs",
1654
+ "border-color-be",
1655
+ "border-color-t",
1656
+ "border-color-r",
1657
+ "border-color-b",
1658
+ "border-color-l"
1659
+ ],
1660
+ "border-color-x": ["border-color-r", "border-color-l"],
1661
+ "border-color-y": ["border-color-t", "border-color-b"],
1662
+ translate: [
1663
+ "translate-x",
1664
+ "translate-y",
1665
+ "translate-none"
1666
+ ],
1667
+ "translate-none": [
1668
+ "translate",
1669
+ "translate-x",
1670
+ "translate-y",
1671
+ "translate-z"
1672
+ ],
1673
+ "scroll-m": [
1674
+ "scroll-mx",
1675
+ "scroll-my",
1676
+ "scroll-ms",
1677
+ "scroll-me",
1678
+ "scroll-mbs",
1679
+ "scroll-mbe",
1680
+ "scroll-mt",
1681
+ "scroll-mr",
1682
+ "scroll-mb",
1683
+ "scroll-ml"
1684
+ ],
1685
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
1686
+ "scroll-my": ["scroll-mt", "scroll-mb"],
1687
+ "scroll-p": [
1688
+ "scroll-px",
1689
+ "scroll-py",
1690
+ "scroll-ps",
1691
+ "scroll-pe",
1692
+ "scroll-pbs",
1693
+ "scroll-pbe",
1694
+ "scroll-pt",
1695
+ "scroll-pr",
1696
+ "scroll-pb",
1697
+ "scroll-pl"
1698
+ ],
1699
+ "scroll-px": ["scroll-pr", "scroll-pl"],
1700
+ "scroll-py": ["scroll-pt", "scroll-pb"],
1701
+ touch: [
1702
+ "touch-x",
1703
+ "touch-y",
1704
+ "touch-pz"
1705
+ ],
1706
+ "touch-x": ["touch"],
1707
+ "touch-y": ["touch"],
1708
+ "touch-pz": ["touch"]
1709
+ },
1710
+ conflictingClassGroupModifiers: { "font-size": ["leading"] },
1711
+ postfixLookupClassGroups: ["container-type"],
1712
+ orderSensitiveModifiers: [
1713
+ "*",
1714
+ "**",
1715
+ "after",
1716
+ "backdrop",
1717
+ "before",
1718
+ "details-content",
1719
+ "file",
1720
+ "first-letter",
1721
+ "first-line",
1722
+ "marker",
1723
+ "placeholder",
1724
+ "selection"
1725
+ ]
1726
+ };
1727
+ });
1728
+ //#endregion
1729
+ //#region src/lib/utils.ts
1730
+ function Z(...e) {
1731
+ return Be(l(e));
1732
+ }
1733
+ //#endregion
1734
+ //#region src/components/enhanced/media-player-enhanced.tsx
1735
+ var Q = r();
1736
+ function Ve(...e) {
1737
+ return (t) => {
1738
+ e.forEach((e) => {
1739
+ typeof e == "function" ? e(t) : e && (e.current = t);
1740
+ });
1741
+ };
1742
+ }
1743
+ function He(e, t, n, r) {
1744
+ let [i, a] = o.useState(!0), [s, c] = o.useState(!1), [l, u] = o.useState(!1), d = o.useRef(null), f = o.useCallback(() => {
1745
+ d.current && clearTimeout(d.current), e && (d.current = setTimeout(() => {
1746
+ !s && !l && a(!1);
1747
+ }, t));
1748
+ }, [
1749
+ e,
1750
+ t,
1751
+ s,
1752
+ l
1753
+ ]), p = o.useCallback(() => {
1754
+ a(!0), f();
1755
+ }, [f]);
1756
+ return o.useEffect(() => (e ? f() : a(!0), () => {
1757
+ d.current && clearTimeout(d.current);
1758
+ }), [e, f]), {
1759
+ showControls: i,
1760
+ showControlsTemporarily: p,
1761
+ handleMouseEnter: o.useCallback(() => {
1762
+ n && (c(!0), a(!0));
1763
+ }, [n]),
1764
+ handleMouseLeave: o.useCallback(() => {
1765
+ n && (c(!1), f());
1766
+ }, [n, f]),
1767
+ handleTouchStart: o.useCallback(() => {
1768
+ r && (u(!0), p());
1769
+ }, [r, p]),
1770
+ handleTouchEnd: o.useCallback(() => {
1771
+ r && (u(!1), f());
1772
+ }, [r, f])
1773
+ };
1774
+ }
1775
+ function Ue(e) {
1776
+ let r = a(), i = n((e) => e.isPlaying), s = n((e) => e.currentTime), c = n((e) => e.duration), l = n((e) => e.volume), [u, d] = o.useState(null), [f, p] = o.useState(!1);
1777
+ return {
1778
+ handleTouchStart: o.useCallback((n) => {
1779
+ if (!e) return;
1780
+ let a = n.touches[0];
1781
+ if (!a) return;
1782
+ let o = Date.now();
1783
+ u && o - u.time < 300 ? (p(!0), r({ type: i ? t.PAUSE : t.PLAY })) : (d({
1784
+ x: a.clientX,
1785
+ y: a.clientY,
1786
+ time: o
1787
+ }), p(!1));
1788
+ }, [
1789
+ e,
1790
+ u,
1791
+ i,
1792
+ r
1793
+ ]),
1794
+ handleTouchMove: o.useCallback((n) => {
1795
+ if (!e || !u || f) return;
1796
+ let i = n.touches[0];
1797
+ if (!i) return;
1798
+ let a = i.clientX - u.x, o = i.clientY - u.y;
1799
+ if (Math.abs(a) > Math.abs(o) && Math.abs(a) > 50) {
1800
+ let e = a / window.innerWidth * 30, n = Math.max(0, Math.min(c, s + e));
1801
+ r({
1802
+ type: t.SEEK,
1803
+ detail: n
1804
+ });
1805
+ }
1806
+ if (Math.abs(o) > Math.abs(a) && Math.abs(o) > 50 && u.x > window.innerWidth / 2) {
1807
+ let e = -(o / window.innerHeight) * 1, n = Math.max(0, Math.min(1, l + e));
1808
+ r({
1809
+ type: t.SET_VOLUME,
1810
+ detail: n
1811
+ });
1812
+ }
1813
+ }, [
1814
+ e,
1815
+ u,
1816
+ f,
1817
+ c,
1818
+ s,
1819
+ l,
1820
+ r
1821
+ ]),
1822
+ handleTouchEnd: o.useCallback(() => {
1823
+ e && setTimeout(() => {
1824
+ d(null), p(!1);
1825
+ }, 300);
1826
+ }, [e])
1827
+ };
1828
+ }
1829
+ var We = function({ children: e, className: r, autoHide: s = !0, autoHideDelay: c = 3e3, showControlsOnHover: l = !0, showControlsOnTouch: u = !0, enableKeyboardControls: d = !0, enableTouchGestures: f = !0, onPlay: p, onPause: m, onTimeUpdate: h, onVolumeChange: g, onFullscreenChange: _ }) {
1830
+ let v = i(), y = a(), b = n(o.useCallback((e) => e.isPlaying, [])), x = n(o.useCallback((e) => e.isFullscreen, [])), S = n(o.useCallback((e) => e.currentTime, [])), C = n(o.useCallback((e) => e.volume, [])), w = n(o.useCallback((e) => e.error, [])), { showControls: T, showControlsTemporarily: E, handleMouseEnter: ee, handleMouseLeave: D, handleTouchStart: O, handleTouchEnd: k } = He(s, c, l, u), { handleTouchStart: A, handleTouchMove: j, handleTouchEnd: M } = Ue(f), te = o.useCallback((e) => {
1831
+ O(), A(e);
1832
+ }, [O, A]), ne = o.useCallback(() => {
1833
+ k(), M();
1834
+ }, [k, M]), N = o.useCallback(() => {
1835
+ E();
1836
+ }, [E]);
1837
+ return o.useEffect(() => {
1838
+ if (!d) return;
1839
+ let e = (e) => {
1840
+ if (!(e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement)) switch (e.code) {
1841
+ case "Space":
1842
+ case "KeyK":
1843
+ e.preventDefault(), y({ type: b ? t.PAUSE : t.PLAY });
1844
+ break;
1845
+ case "KeyF":
1846
+ e.preventDefault(), y({ type: x ? t.EXIT_FULLSCREEN : t.ENTER_FULLSCREEN });
1847
+ break;
1848
+ case "KeyM":
1849
+ e.preventDefault(), y({ type: t.TOGGLE_MUTE });
1850
+ break;
1851
+ case "ArrowLeft":
1852
+ e.preventDefault(), y({
1853
+ type: t.SEEK,
1854
+ detail: Math.max(0, S - 10)
1855
+ });
1856
+ break;
1857
+ case "ArrowRight":
1858
+ e.preventDefault(), y({
1859
+ type: t.SEEK,
1860
+ detail: S + 10
1861
+ });
1862
+ break;
1863
+ case "ArrowUp":
1864
+ e.preventDefault(), y({
1865
+ type: t.SET_VOLUME,
1866
+ detail: Math.min(1, C + .1)
1867
+ });
1868
+ break;
1869
+ case "ArrowDown":
1870
+ e.preventDefault(), y({
1871
+ type: t.SET_VOLUME,
1872
+ detail: Math.max(0, C - .1)
1873
+ });
1874
+ break;
1875
+ }
1876
+ };
1877
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1878
+ }, [
1879
+ d,
1880
+ y,
1881
+ b,
1882
+ x,
1883
+ S,
1884
+ C
1885
+ ]), o.useEffect(() => {
1886
+ b ? p?.() : m?.();
1887
+ }, [
1888
+ b,
1889
+ p,
1890
+ m
1891
+ ]), o.useEffect(() => {
1892
+ h?.(S);
1893
+ }, [S, h]), o.useEffect(() => {
1894
+ g?.(C);
1895
+ }, [C, g]), o.useEffect(() => {
1896
+ _?.(x);
1897
+ }, [x, _]), /* @__PURE__ */ (0, Q.jsx)("div", {
1898
+ ref: Ve(v.rootRef),
1899
+ className: Z("relative isolate flex flex-col overflow-hidden rounded-lg bg-black outline-none", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", x && "fixed inset-0 z-50 rounded-none", r),
1900
+ "data-state": x ? "fullscreen" : "inline",
1901
+ "data-disabled": w ? "" : void 0,
1902
+ "data-controls-visible": T ? "" : void 0,
1903
+ tabIndex: 0,
1904
+ onMouseEnter: ee,
1905
+ onMouseLeave: D,
1906
+ onTouchStart: te,
1907
+ onTouchMove: j,
1908
+ onTouchEnd: ne,
1909
+ onClick: N,
1910
+ children: e
1911
+ });
1912
+ };
1913
+ We.displayName = "EnhancedMediaPlayer";
1914
+ //#endregion
1915
+ //#region src/lib/format-time.ts
1916
+ function $(e) {
1917
+ if (isNaN(e) || !isFinite(e)) return "0:00";
1918
+ let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
1919
+ return t > 0 ? `${t}:${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${n}:${r.toString().padStart(2, "0")}`;
1920
+ }
1921
+ function Ge(e) {
1922
+ let t = e.split(":").map(Number);
1923
+ if (t.length === 2) {
1924
+ let [e = 0, n = 0] = t;
1925
+ return e * 60 + n;
1926
+ } else if (t.length === 3) {
1927
+ let [e = 0, n = 0, r = 0] = t;
1928
+ return e * 3600 + n * 60 + r;
1929
+ }
1930
+ return 0;
1931
+ }
1932
+ //#endregion
1933
+ //#region src/components/enhanced/advanced-features.tsx
1934
+ var Ke = /* @__PURE__ */ e({
1935
+ ChaptersPanel: () => Xe,
1936
+ PictureInPictureButton: () => Ze,
1937
+ PlaybackSpeedSelector: () => Ye,
1938
+ QualitySelector: () => qe,
1939
+ SubtitleSelector: () => Je
1940
+ }), qe = function({ qualities: e, currentQuality: t, onQualityChange: n, className: r }) {
1941
+ let [i, a] = o.useState(!1), s = o.useMemo(() => e.find((e) => e.id === t)?.label || "Auto", [e, t]);
1942
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
1943
+ className: Z("relative", r),
1944
+ children: [/* @__PURE__ */ (0, Q.jsxs)("button", {
1945
+ type: "button",
1946
+ onClick: () => a(!i),
1947
+ className: "flex items-center gap-2 rounded-lg bg-black/50 px-3 py-2 text-white transition-colors hover:bg-black/70",
1948
+ "aria-label": "Select quality",
1949
+ children: [
1950
+ /* @__PURE__ */ (0, Q.jsx)("svg", {
1951
+ viewBox: "0 0 24 24",
1952
+ fill: "currentColor",
1953
+ className: "h-4 w-4",
1954
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" })
1955
+ }),
1956
+ /* @__PURE__ */ (0, Q.jsx)("span", {
1957
+ className: "text-sm",
1958
+ children: s
1959
+ }),
1960
+ /* @__PURE__ */ (0, Q.jsx)("svg", {
1961
+ viewBox: "0 0 24 24",
1962
+ fill: "currentColor",
1963
+ className: Z("h-4 w-4 transition-transform", i && "rotate-180"),
1964
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M7 10l5 5 5-5z" })
1965
+ })
1966
+ ]
1967
+ }), i && /* @__PURE__ */ (0, Q.jsx)("div", {
1968
+ className: "absolute right-0 bottom-full mb-2 min-w-32 rounded-lg border border-white/20 bg-black/90 py-2 backdrop-blur-sm",
1969
+ children: e.map((e) => /* @__PURE__ */ (0, Q.jsxs)("button", {
1970
+ onClick: () => {
1971
+ n(e.id), a(!1);
1972
+ },
1973
+ className: Z("w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10", e.id === t && "bg-primary/20 text-primary"),
1974
+ children: [e.label, e.bitrate && /* @__PURE__ */ (0, Q.jsxs)("span", {
1975
+ className: "ml-2 text-white/60 text-xs",
1976
+ children: [
1977
+ "(",
1978
+ Math.round(e.bitrate / 1e3),
1979
+ "k)"
1980
+ ]
1981
+ })]
1982
+ }, e.id))
1983
+ })]
1984
+ });
1985
+ }, Je = function({ subtitles: e, currentSubtitle: t, onSubtitleChange: n, className: r }) {
1986
+ let [i, a] = o.useState(!1), s = o.useMemo(() => t && e.find((e) => e.id === t)?.label || "Off", [e, t]);
1987
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
1988
+ className: Z("relative", r),
1989
+ children: [/* @__PURE__ */ (0, Q.jsxs)("button", {
1990
+ type: "button",
1991
+ onClick: () => a(!i),
1992
+ className: "flex items-center gap-2 rounded-lg bg-black/50 px-3 py-2 text-white transition-colors hover:bg-black/70",
1993
+ "aria-label": "Select subtitles",
1994
+ children: [
1995
+ /* @__PURE__ */ (0, Q.jsx)("svg", {
1996
+ viewBox: "0 0 24 24",
1997
+ fill: "currentColor",
1998
+ className: "h-4 w-4",
1999
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z" })
2000
+ }),
2001
+ /* @__PURE__ */ (0, Q.jsx)("span", {
2002
+ className: "text-sm",
2003
+ children: s
2004
+ }),
2005
+ /* @__PURE__ */ (0, Q.jsx)("svg", {
2006
+ viewBox: "0 0 24 24",
2007
+ fill: "currentColor",
2008
+ className: Z("h-4 w-4 transition-transform", i && "rotate-180"),
2009
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M7 10l5 5 5-5z" })
2010
+ })
2011
+ ]
2012
+ }), i && /* @__PURE__ */ (0, Q.jsxs)("div", {
2013
+ className: "absolute right-0 bottom-full mb-2 min-w-32 rounded-lg border border-white/20 bg-black/90 py-2 backdrop-blur-sm",
2014
+ children: [/* @__PURE__ */ (0, Q.jsx)("button", {
2015
+ onClick: () => {
2016
+ n(null), a(!1);
2017
+ },
2018
+ className: Z("w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10", !t && "bg-primary/20 text-primary"),
2019
+ children: "Off"
2020
+ }), e.map((e) => /* @__PURE__ */ (0, Q.jsx)("button", {
2021
+ onClick: () => {
2022
+ n(e.id), a(!1);
2023
+ },
2024
+ className: Z("w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10", e.id === t && "bg-primary/20 text-primary"),
2025
+ children: e.label
2026
+ }, e.id))]
2027
+ })]
2028
+ });
2029
+ }, Ye = function({ className: e }) {
2030
+ let r = a(), i = n((e) => e.playbackRate), [s, c] = o.useState(!1), l = [
2031
+ .25,
2032
+ .5,
2033
+ .75,
2034
+ 1,
2035
+ 1.25,
2036
+ 1.5,
2037
+ 1.75,
2038
+ 2
2039
+ ], u = o.useCallback((e) => {
2040
+ r({
2041
+ type: t.SET_PLAYBACK_RATE,
2042
+ detail: e
2043
+ }), c(!1);
2044
+ }, [r]);
2045
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
2046
+ className: Z("relative", e),
2047
+ children: [/* @__PURE__ */ (0, Q.jsxs)("button", {
2048
+ type: "button",
2049
+ onClick: () => c(!s),
2050
+ className: "flex items-center gap-2 rounded-lg bg-black/50 px-3 py-2 text-white transition-colors hover:bg-black/70",
2051
+ "aria-label": "Select playback speed",
2052
+ children: [
2053
+ /* @__PURE__ */ (0, Q.jsx)("svg", {
2054
+ viewBox: "0 0 24 24",
2055
+ fill: "currentColor",
2056
+ className: "h-4 w-4",
2057
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M13,8A4,4 0 0,0 9,12A4,4 0 0,0 13,16A4,4 0 0,0 17,12A4,4 0 0,0 13,8M13,14A2,2 0 0,1 11,12A2,2 0 0,1 13,10A2,2 0 0,1 15,12A2,2 0 0,1 13,14M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4Z" })
2058
+ }),
2059
+ /* @__PURE__ */ (0, Q.jsxs)("span", {
2060
+ className: "text-sm",
2061
+ children: [i, "x"]
2062
+ }),
2063
+ /* @__PURE__ */ (0, Q.jsx)("svg", {
2064
+ viewBox: "0 0 24 24",
2065
+ fill: "currentColor",
2066
+ className: Z("h-4 w-4 transition-transform", s && "rotate-180"),
2067
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M7 10l5 5 5-5z" })
2068
+ })
2069
+ ]
2070
+ }), s && /* @__PURE__ */ (0, Q.jsx)("div", {
2071
+ className: "absolute right-0 bottom-full mb-2 min-w-20 rounded-lg border border-white/20 bg-black/90 py-2 backdrop-blur-sm",
2072
+ children: l.map((e) => /* @__PURE__ */ (0, Q.jsxs)("button", {
2073
+ onClick: () => u(e),
2074
+ className: Z("w-full px-4 py-2 text-left text-sm text-white transition-colors hover:bg-white/10", e === i && "bg-primary/20 text-primary"),
2075
+ children: [e, "x"]
2076
+ }, e))
2077
+ })]
2078
+ });
2079
+ }, Xe = function({ chapters: e, onChapterSelect: t, className: r }) {
2080
+ let i = n((e) => e.currentTime), a = o.useMemo(() => e.find((e) => i >= e.startTime && i < e.endTime), [e, i]);
2081
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
2082
+ className: Z("rounded-lg border border-white/20 bg-black/90 p-4 backdrop-blur-sm", r),
2083
+ children: [/* @__PURE__ */ (0, Q.jsx)("h3", {
2084
+ className: "mb-3 font-semibold text-white",
2085
+ children: "Chapters"
2086
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
2087
+ className: "max-h-64 space-y-2 overflow-y-auto",
2088
+ children: e.map((e) => /* @__PURE__ */ (0, Q.jsxs)("button", {
2089
+ onClick: () => t(e),
2090
+ className: Z("flex w-full items-center gap-3 rounded-lg p-3 text-left transition-colors", "hover:bg-white/10", e.id === a?.id && "border border-primary/30 bg-primary/20"),
2091
+ children: [e.thumbnail && /* @__PURE__ */ (0, Q.jsx)("img", {
2092
+ src: e.thumbnail,
2093
+ alt: e.title,
2094
+ className: "h-9 w-16 rounded object-cover"
2095
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
2096
+ className: "min-w-0 flex-1",
2097
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
2098
+ className: "truncate font-medium text-white",
2099
+ children: e.title
2100
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
2101
+ className: "text-sm text-white/60",
2102
+ children: [
2103
+ $(e.startTime),
2104
+ " - ",
2105
+ $(e.endTime)
2106
+ ]
2107
+ })]
2108
+ })]
2109
+ }, e.id))
2110
+ })]
2111
+ });
2112
+ }, Ze = function({ className: e }) {
2113
+ let r = a(), i = n((e) => e.isPictureInPicture);
2114
+ return /* @__PURE__ */ (0, Q.jsx)("button", {
2115
+ type: "button",
2116
+ onClick: o.useCallback(() => {
2117
+ r({ type: i ? t.EXIT_PIP : t.ENTER_PIP });
2118
+ }, [r, i]),
2119
+ className: Z("flex h-10 w-10 items-center justify-center rounded-full text-white", "transition-colors hover:bg-white/10", e),
2120
+ "aria-label": i ? "Exit Picture-in-Picture" : "Enter Picture-in-Picture",
2121
+ children: /* @__PURE__ */ (0, Q.jsx)("svg", {
2122
+ viewBox: "0 0 24 24",
2123
+ fill: "currentColor",
2124
+ className: "h-5 w-5",
2125
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14z" })
2126
+ })
2127
+ });
2128
+ }, Qe = function({ className: e, size: r = "md" }) {
2129
+ let i = a(), s = n((e) => e.isPlaying), c = n((e) => e.isLoading), l = {
2130
+ sm: "h-8 w-8",
2131
+ md: "h-10 w-10",
2132
+ lg: "h-12 w-12",
2133
+ xl: "h-16 w-16"
2134
+ }, u = {
2135
+ sm: "h-4 w-4",
2136
+ md: "h-5 w-5",
2137
+ lg: "h-6 w-6",
2138
+ xl: "h-8 w-8"
2139
+ };
2140
+ return /* @__PURE__ */ (0, Q.jsx)("button", {
2141
+ type: "button",
2142
+ onClick: o.useCallback(() => {
2143
+ i({ type: s ? t.PAUSE : t.PLAY });
2144
+ }, [i, s]),
2145
+ disabled: c,
2146
+ className: Z("group relative flex items-center justify-center rounded-full bg-white/10 backdrop-blur-sm", "border border-white/20 text-white transition-all duration-200", "hover:scale-105 hover:bg-white/20 active:scale-95", "focus:outline-none focus:ring-2 focus:ring-white/50", "disabled:cursor-not-allowed disabled:opacity-50", l[r], e),
2147
+ "aria-label": s ? "Pause" : "Play",
2148
+ children: c ? /* @__PURE__ */ (0, Q.jsx)("div", { className: Z("animate-spin rounded-full border-2 border-white/30 border-t-white", u[r]) }) : /* @__PURE__ */ (0, Q.jsx)("div", {
2149
+ className: Z("transition-transform duration-200", u[r]),
2150
+ children: s ? /* @__PURE__ */ (0, Q.jsx)("svg", {
2151
+ viewBox: "0 0 24 24",
2152
+ fill: "currentColor",
2153
+ className: "h-full w-full",
2154
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M6 4h4v16H6V4zm8 0h4v16h-4V4z" })
2155
+ }) : /* @__PURE__ */ (0, Q.jsx)("svg", {
2156
+ viewBox: "0 0 24 24",
2157
+ fill: "currentColor",
2158
+ className: "ml-0.5 h-full w-full",
2159
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M8 5v14l11-7z" })
2160
+ })
2161
+ })
2162
+ });
2163
+ }, $e = function({ className: e }) {
2164
+ let r = a(), i = n((e) => e.currentTime), s = n((e) => e.duration), c = n((e) => e.buffered), l = n((e) => e.previewTime), [u, d] = o.useState(!1), [f, p] = o.useState(null), m = o.useRef(null), h = s > 0 ? i / s * 100 : 0, g = s > 0 && l !== null ? l / s * 100 : null, _ = o.useMemo(() => {
2165
+ if (!c || s === 0) return [];
2166
+ let e = [];
2167
+ for (let t = 0; t < c.length; t++) e.push({
2168
+ start: c.start(t) / s * 100,
2169
+ end: c.end(t) / s * 100
2170
+ });
2171
+ return e;
2172
+ }, [c, s]), v = o.useCallback((e) => {
2173
+ if (!m.current) return 0;
2174
+ let t = m.current.getBoundingClientRect();
2175
+ return Math.max(0, Math.min(1, (e - t.left) / t.width)) * s;
2176
+ }, [s]), y = o.useCallback((e) => {
2177
+ if (!u) {
2178
+ let n = v(e.clientX);
2179
+ p(n), r({
2180
+ type: t.PREVIEW_TIME,
2181
+ detail: n
2182
+ });
2183
+ }
2184
+ }, [
2185
+ u,
2186
+ v,
2187
+ r
2188
+ ]), b = o.useCallback(() => {
2189
+ u || (p(null), r({ type: t.CLEAR_PREVIEW }));
2190
+ }, [u, r]), x = o.useCallback((e) => {
2191
+ d(!0);
2192
+ let n = v(e.clientX);
2193
+ r({
2194
+ type: t.SEEK,
2195
+ detail: n
2196
+ });
2197
+ }, [v, r]), S = o.useCallback((e) => {
2198
+ d(!0);
2199
+ let n = v(e.touches[0]?.clientX || 0);
2200
+ r({
2201
+ type: t.SEEK,
2202
+ detail: n
2203
+ });
2204
+ }, [v, r]);
2205
+ return o.useEffect(() => {
2206
+ let e = (e) => {
2207
+ if (u) {
2208
+ let n = v(e.clientX);
2209
+ r({
2210
+ type: t.SEEK,
2211
+ detail: n
2212
+ });
2213
+ }
2214
+ }, n = () => {
2215
+ d(!1), p(null), r({ type: t.CLEAR_PREVIEW });
2216
+ }, i = (e) => {
2217
+ if (u) {
2218
+ let n = v(e.touches[0]?.clientX || 0);
2219
+ r({
2220
+ type: t.SEEK,
2221
+ detail: n
2222
+ });
2223
+ }
2224
+ };
2225
+ return u && (document.addEventListener("mousemove", e), document.addEventListener("mouseup", n), document.addEventListener("touchmove", i), document.addEventListener("touchend", n)), () => {
2226
+ document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", n), document.removeEventListener("touchmove", i), document.removeEventListener("touchend", n);
2227
+ };
2228
+ }, [
2229
+ u,
2230
+ v,
2231
+ r
2232
+ ]), /* @__PURE__ */ (0, Q.jsxs)("div", {
2233
+ className: Z("group relative flex items-center", e),
2234
+ children: [(f !== null || l !== null) && /* @__PURE__ */ (0, Q.jsx)("div", {
2235
+ className: "pointer-events-none absolute bottom-full mb-2 rounded bg-black/80 px-2 py-1 text-white text-xs",
2236
+ style: {
2237
+ left: `${g || (f || 0) / s * 100}%`,
2238
+ transform: "translateX(-50%)"
2239
+ },
2240
+ children: $(f || l || 0)
2241
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
2242
+ ref: m,
2243
+ className: "relative h-2 w-full cursor-pointer rounded-full bg-white/20 transition-all duration-200 group-hover:h-3",
2244
+ onMouseMove: y,
2245
+ onMouseLeave: b,
2246
+ onMouseDown: x,
2247
+ onTouchStart: S,
2248
+ children: [
2249
+ _.map((e, t) => /* @__PURE__ */ (0, Q.jsx)("div", {
2250
+ className: "absolute top-0 h-full rounded-full bg-white/30",
2251
+ style: {
2252
+ left: `${e.start}%`,
2253
+ width: `${e.end - e.start}%`
2254
+ }
2255
+ }, t)),
2256
+ /* @__PURE__ */ (0, Q.jsx)("div", {
2257
+ className: "absolute top-0 h-full rounded-full bg-primary transition-all duration-100",
2258
+ style: { width: `${h}%` }
2259
+ }),
2260
+ g !== null && /* @__PURE__ */ (0, Q.jsx)("div", {
2261
+ className: "absolute top-0 h-full w-1 rounded-full bg-white/80",
2262
+ style: { left: `${g}%` }
2263
+ }),
2264
+ /* @__PURE__ */ (0, Q.jsx)("div", {
2265
+ className: "-translate-y-1/2 absolute top-1/2 h-4 w-4 rounded-full border-2 border-white bg-primary opacity-0 shadow-lg transition-all duration-200 group-hover:opacity-100",
2266
+ style: {
2267
+ left: `${h}%`,
2268
+ transform: "translateX(-50%) translateY(-50%)"
2269
+ }
2270
+ })
2271
+ ]
2272
+ })]
2273
+ });
2274
+ }, et = function({ className: e }) {
2275
+ let r = a(), i = n((e) => e.volume), s = n((e) => e.isMuted), [c, l] = o.useState(!1), u = o.useCallback(() => {
2276
+ r({ type: t.TOGGLE_MUTE });
2277
+ }, [r]), d = o.useCallback((e) => {
2278
+ r({
2279
+ type: t.SET_VOLUME,
2280
+ detail: e
2281
+ });
2282
+ }, [r]), f = o.useMemo(() => s || i === 0 ? /* @__PURE__ */ (0, Q.jsx)("svg", {
2283
+ viewBox: "0 0 24 24",
2284
+ fill: "currentColor",
2285
+ className: "h-5 w-5",
2286
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z" })
2287
+ }) : i < .5 ? /* @__PURE__ */ (0, Q.jsx)("svg", {
2288
+ viewBox: "0 0 24 24",
2289
+ fill: "currentColor",
2290
+ className: "h-5 w-5",
2291
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z" })
2292
+ }) : /* @__PURE__ */ (0, Q.jsx)("svg", {
2293
+ viewBox: "0 0 24 24",
2294
+ fill: "currentColor",
2295
+ className: "h-5 w-5",
2296
+ children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z" })
2297
+ }), [s, i]);
2298
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
2299
+ className: Z("relative flex items-center", e),
2300
+ onMouseEnter: () => l(!0),
2301
+ onMouseLeave: () => l(!1),
2302
+ children: [/* @__PURE__ */ (0, Q.jsx)("button", {
2303
+ type: "button",
2304
+ onClick: u,
2305
+ className: "flex h-10 w-10 items-center justify-center rounded-full text-white transition-colors hover:bg-white/10",
2306
+ "aria-label": s ? "Unmute" : "Mute",
2307
+ children: f
2308
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
2309
+ className: Z("absolute left-full ml-2 flex items-center transition-all duration-200", c ? "translate-x-0 opacity-100" : "-translate-x-2 pointer-events-none opacity-0"),
2310
+ children: /* @__PURE__ */ (0, Q.jsx)("input", {
2311
+ type: "range",
2312
+ min: "0",
2313
+ max: "1",
2314
+ step: "0.01",
2315
+ value: s ? 0 : i,
2316
+ onChange: (e) => d(parseFloat(e.target.value)),
2317
+ className: "slider h-1 w-20 cursor-pointer appearance-none rounded-lg bg-white/20"
2318
+ })
2319
+ })]
2320
+ });
2321
+ }, tt = function({ className: e, size: r = "md", skipTime: i = 10 }) {
2322
+ let s = a(), c = n((e) => e.currentTime);
2323
+ return /* @__PURE__ */ (0, Q.jsx)("button", {
2324
+ type: "button",
2325
+ onClick: o.useCallback(() => {
2326
+ let e = Math.max(0, c - i);
2327
+ s({
2328
+ type: t.SEEK,
2329
+ detail: e
2330
+ });
2331
+ }, [
2332
+ s,
2333
+ c,
2334
+ i
2335
+ ]),
2336
+ className: Z("group relative flex items-center justify-center rounded-full bg-white/10 backdrop-blur-sm", "border border-white/20 text-white transition-all duration-200", "hover:scale-105 hover:bg-white/20 active:scale-95", "focus:outline-none focus:ring-2 focus:ring-white/50", {
2337
+ sm: "h-8 w-8",
2338
+ md: "h-10 w-10",
2339
+ lg: "h-12 w-12"
2340
+ }[r], e),
2341
+ "aria-label": `Backward ${i} seconds`,
2342
+ title: `Backward ${i}s`,
2343
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
2344
+ className: Z("flex items-center transition-transform duration-200", {
2345
+ sm: "h-4 w-4",
2346
+ md: "h-5 w-5",
2347
+ lg: "h-6 w-6"
2348
+ }[r]),
2349
+ children: [/* @__PURE__ */ (0, Q.jsxs)("svg", {
2350
+ viewBox: "0 0 24 24",
2351
+ fill: "currentColor",
2352
+ className: "h-full w-full",
2353
+ children: [/* @__PURE__ */ (0, Q.jsx)("path", { d: "M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zM15.5 7.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v9c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-9z" }), /* @__PURE__ */ (0, Q.jsx)("path", {
2354
+ d: "M5.5 12l7-4.5v9l-7-4.5z",
2355
+ opacity: "0.8"
2356
+ })]
2357
+ }), i && /* @__PURE__ */ (0, Q.jsx)("span", {
2358
+ className: "-bottom-1 absolute font-bold text-[10px]",
2359
+ children: i
2360
+ })]
2361
+ })
2362
+ });
2363
+ }, nt = function({ className: e, size: r = "md", skipTime: i = 10 }) {
2364
+ let s = a(), c = n((e) => e.currentTime), l = n((e) => e.duration);
2365
+ return /* @__PURE__ */ (0, Q.jsx)("button", {
2366
+ type: "button",
2367
+ onClick: o.useCallback(() => {
2368
+ let e = Math.min(l, c + i);
2369
+ s({
2370
+ type: t.SEEK,
2371
+ detail: e
2372
+ });
2373
+ }, [
2374
+ s,
2375
+ c,
2376
+ l,
2377
+ i
2378
+ ]),
2379
+ className: Z("group relative flex items-center justify-center rounded-full bg-white/10 backdrop-blur-sm", "border border-white/20 text-white transition-all duration-200", "hover:scale-105 hover:bg-white/20 active:scale-95", "focus:outline-none focus:ring-2 focus:ring-white/50", {
2380
+ sm: "h-8 w-8",
2381
+ md: "h-10 w-10",
2382
+ lg: "h-12 w-12"
2383
+ }[r], e),
2384
+ "aria-label": `Forward ${i} seconds`,
2385
+ title: `Forward ${i}s`,
2386
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
2387
+ className: Z("flex items-center transition-transform duration-200", {
2388
+ sm: "h-4 w-4",
2389
+ md: "h-5 w-5",
2390
+ lg: "h-6 w-6"
2391
+ }[r]),
2392
+ children: [/* @__PURE__ */ (0, Q.jsxs)("svg", {
2393
+ viewBox: "0 0 24 24",
2394
+ fill: "currentColor",
2395
+ className: "h-full w-full",
2396
+ children: [/* @__PURE__ */ (0, Q.jsx)("path", { d: "M17 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zM8.5 7.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v9c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5v-9z" }), /* @__PURE__ */ (0, Q.jsx)("path", {
2397
+ d: "M18.5 12l-7-4.5v9l7-4.5z",
2398
+ opacity: "0.8"
2399
+ })]
2400
+ }), i && /* @__PURE__ */ (0, Q.jsx)("span", {
2401
+ className: "-bottom-1 absolute font-bold text-[10px]",
2402
+ children: i
2403
+ })]
2404
+ })
2405
+ });
2406
+ }, rt = function({ variant: e = "current", className: t }) {
2407
+ let r = n((e) => e.currentTime), i = n((e) => e.duration), a = o.useMemo(() => {
2408
+ switch (e) {
2409
+ case "current": return $(r);
2410
+ case "duration": return $(i);
2411
+ case "remaining": return `-${$(i - r)}`;
2412
+ default: return $(r);
2413
+ }
2414
+ }, [
2415
+ e,
2416
+ r,
2417
+ i
2418
+ ]);
2419
+ return /* @__PURE__ */ (0, Q.jsx)("div", {
2420
+ className: Z("font-mono text-sm text-white tabular-nums", t),
2421
+ children: a
2422
+ });
2423
+ }, it = function({ metrics: e, className: t }) {
2424
+ return !e || process.env.NODE_ENV !== "development" ? null : /* @__PURE__ */ (0, Q.jsxs)("div", {
2425
+ className: Z("flex items-center gap-3 font-mono text-xs", t),
2426
+ children: [
2427
+ e.fps !== void 0 && /* @__PURE__ */ (0, Q.jsxs)("div", {
2428
+ className: Z("flex items-center gap-1", ((e) => e >= 50 ? "text-green-400" : e >= 30 ? "text-yellow-400" : "text-red-400")(e.fps)),
2429
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", { className: "h-2 w-2 rounded-full bg-current" }), /* @__PURE__ */ (0, Q.jsxs)("span", { children: [e.fps, " FPS"] })]
2430
+ }),
2431
+ e.bufferHealth !== void 0 && /* @__PURE__ */ (0, Q.jsxs)("div", {
2432
+ className: Z("flex items-center gap-1", ((e) => e >= 5 ? "text-green-400" : e >= 2 ? "text-yellow-400" : "text-red-400")(e.bufferHealth)),
2433
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", { className: "h-2 w-2 rounded-full bg-current" }), /* @__PURE__ */ (0, Q.jsxs)("span", { children: [e.bufferHealth.toFixed(1), "s"] })]
2434
+ }),
2435
+ e.quality !== void 0 && /* @__PURE__ */ (0, Q.jsxs)("div", {
2436
+ className: "flex items-center gap-1 text-blue-400",
2437
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", { className: "h-2 w-2 rounded-full bg-current" }), /* @__PURE__ */ (0, Q.jsxs)("span", { children: [e.quality, "p"] })]
2438
+ })
2439
+ ]
2440
+ });
2441
+ }, at = function({ className: e, showSkipButtons: t = !0, showVolumeControl: n = !0, showTimeDisplay: r = !0, playButtonSize: i = "xl", skipButtonSize: a = "md", skipTime: o = 10, showPerformanceIndicators: s = process.env.NODE_ENV === "development", performanceMetrics: c }) {
2442
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
2443
+ className: Z("flex flex-col gap-4 bg-gradient-to-t from-black/80 to-transparent p-4", e),
2444
+ children: [/* @__PURE__ */ (0, Q.jsx)($e, { className: "w-full" }), /* @__PURE__ */ (0, Q.jsxs)("div", {
2445
+ className: "flex items-center justify-between",
2446
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
2447
+ className: "flex items-center gap-3",
2448
+ children: [
2449
+ t && /* @__PURE__ */ (0, Q.jsx)(tt, {
2450
+ size: a,
2451
+ skipTime: o,
2452
+ className: "shrink-0"
2453
+ }),
2454
+ /* @__PURE__ */ (0, Q.jsx)(Qe, {
2455
+ size: i,
2456
+ className: "shrink-0"
2457
+ }),
2458
+ t && /* @__PURE__ */ (0, Q.jsx)(nt, {
2459
+ size: a,
2460
+ skipTime: o,
2461
+ className: "shrink-0"
2462
+ }),
2463
+ n && /* @__PURE__ */ (0, Q.jsx)(et, { className: "shrink-0" }),
2464
+ r && /* @__PURE__ */ (0, Q.jsxs)("div", {
2465
+ className: "flex items-center gap-1 font-mono text-sm",
2466
+ children: [
2467
+ /* @__PURE__ */ (0, Q.jsx)(rt, { variant: "current" }),
2468
+ /* @__PURE__ */ (0, Q.jsx)("span", {
2469
+ className: "text-white/60",
2470
+ children: "/"
2471
+ }),
2472
+ /* @__PURE__ */ (0, Q.jsx)(rt, { variant: "duration" })
2473
+ ]
2474
+ })
2475
+ ]
2476
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
2477
+ className: "flex items-center gap-2",
2478
+ children: s && /* @__PURE__ */ (0, Q.jsx)(it, {
2479
+ metrics: c,
2480
+ className: "text-white/80"
2481
+ })
2482
+ })]
2483
+ })]
2484
+ });
2485
+ }, ot = ({ performanceMetrics: e = {}, preloadingStats: t = {}, playbackState: n = {}, hlsMetrics: r = {}, pluginInfo: i = {}, debugInfo: a = {}, className: c, position: l = "top-right", defaultCollapsed: u = !1, title: d = "BaroiPlayer Debug Panel" }) => {
2486
+ let [f, p] = o.useState(u), [m, h] = o.useState("performance"), g = s(() => {
2487
+ switch (l) {
2488
+ case "top-left": return "top-4 left-4";
2489
+ case "top-right": return "top-4 right-4";
2490
+ case "bottom-left": return "bottom-4 left-4";
2491
+ case "bottom-right": return "bottom-4 right-4";
2492
+ default: return "top-4 right-4";
2493
+ }
2494
+ }, [l]), _ = (e) => {
2495
+ if (e === 0) return "0 B";
2496
+ let t = 1024, n = [
2497
+ "B",
2498
+ "KB",
2499
+ "MB",
2500
+ "GB"
2501
+ ], r = Math.floor(Math.log(e) / Math.log(t));
2502
+ return parseFloat((e / t ** r).toFixed(2)) + " " + n[r];
2503
+ }, v = (e) => `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`, y = () => /* @__PURE__ */ (0, Q.jsx)("div", {
2504
+ className: "space-y-2",
2505
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
2506
+ className: "grid grid-cols-2 gap-2 text-xs",
2507
+ children: [
2508
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2509
+ className: "text-green-400",
2510
+ children: "FPS:"
2511
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
2512
+ className: "ml-2 font-mono",
2513
+ children: e.fps || 0
2514
+ })] }),
2515
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2516
+ className: "text-blue-400",
2517
+ children: "Memory:"
2518
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2519
+ className: "ml-2 font-mono",
2520
+ children: [((e.memoryUsage || 0) / 1024 / 1024).toFixed(1), " MB"]
2521
+ })] }),
2522
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2523
+ className: "text-yellow-400",
2524
+ children: "Buffer:"
2525
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2526
+ className: "ml-2 font-mono",
2527
+ children: [(e.bufferHealth || 0).toFixed(2), "s"]
2528
+ })] }),
2529
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2530
+ className: "text-purple-400",
2531
+ children: "Bandwidth:"
2532
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2533
+ className: "ml-2 font-mono",
2534
+ children: [_(e.networkBandwidth || 0), "/s"]
2535
+ })] }),
2536
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2537
+ className: "text-red-400",
2538
+ children: "Dropped:"
2539
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2540
+ className: "ml-2 font-mono",
2541
+ children: [e.droppedFrames || 0, " frames"]
2542
+ })] }),
2543
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2544
+ className: "text-cyan-400",
2545
+ children: "Decoded:"
2546
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2547
+ className: "ml-2 font-mono",
2548
+ children: [e.decodedFrames || 0, " frames"]
2549
+ })] })
2550
+ ]
2551
+ })
2552
+ }), b = () => /* @__PURE__ */ (0, Q.jsx)("div", {
2553
+ className: "space-y-2",
2554
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
2555
+ className: "grid grid-cols-2 gap-2 text-xs",
2556
+ children: [
2557
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2558
+ className: "text-green-400",
2559
+ children: "Status:"
2560
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
2561
+ className: "ml-2 font-mono",
2562
+ children: n.isPlaying ? /* @__PURE__ */ (0, Q.jsx)("span", {
2563
+ className: "text-green-300",
2564
+ children: "Playing"
2565
+ }) : /* @__PURE__ */ (0, Q.jsx)("span", {
2566
+ className: "text-red-300",
2567
+ children: "Paused"
2568
+ })
2569
+ })] }),
2570
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2571
+ className: "text-blue-400",
2572
+ children: "Time:"
2573
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2574
+ className: "ml-2 font-mono",
2575
+ children: [
2576
+ v(n.currentTime || 0),
2577
+ " / ",
2578
+ v(n.duration || 0)
2579
+ ]
2580
+ })] }),
2581
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2582
+ className: "text-yellow-400",
2583
+ children: "Volume:"
2584
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2585
+ className: "ml-2 font-mono",
2586
+ children: [Math.round((n.volume || 0) * 100), "%"]
2587
+ })] }),
2588
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2589
+ className: "text-purple-400",
2590
+ children: "Quality:"
2591
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2592
+ className: "ml-2 font-mono",
2593
+ children: [n.quality || 0, "p"]
2594
+ })] }),
2595
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2596
+ className: "text-red-400",
2597
+ children: "Buffering:"
2598
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
2599
+ className: "ml-2 font-mono",
2600
+ children: n.isBuffering ? /* @__PURE__ */ (0, Q.jsx)("span", {
2601
+ className: "text-yellow-300",
2602
+ children: "Yes"
2603
+ }) : /* @__PURE__ */ (0, Q.jsx)("span", {
2604
+ className: "text-green-300",
2605
+ children: "No"
2606
+ })
2607
+ })] }),
2608
+ n.error && /* @__PURE__ */ (0, Q.jsxs)("div", {
2609
+ className: "col-span-2",
2610
+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2611
+ className: "text-red-400",
2612
+ children: "Error:"
2613
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
2614
+ className: "ml-2 break-all font-mono text-red-300 text-xs",
2615
+ children: n.error
2616
+ })]
2617
+ })
2618
+ ]
2619
+ })
2620
+ }), x = () => /* @__PURE__ */ (0, Q.jsx)("div", {
2621
+ className: "space-y-2",
2622
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
2623
+ className: "grid grid-cols-2 gap-2 text-xs",
2624
+ children: [
2625
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2626
+ className: "text-green-400",
2627
+ children: "Preloaded:"
2628
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2629
+ className: "ml-2 font-mono",
2630
+ children: [t.preloadedItems || 0, " items"]
2631
+ })] }),
2632
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2633
+ className: "text-blue-400",
2634
+ children: "Engagement:"
2635
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2636
+ className: "ml-2 font-mono",
2637
+ children: [(t.engagementScore || 0).toFixed(1), "%"]
2638
+ })] }),
2639
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2640
+ className: "text-yellow-400",
2641
+ children: "Queue:"
2642
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2643
+ className: "ml-2 font-mono",
2644
+ children: [t.queueLength || 0, " items"]
2645
+ })] }),
2646
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2647
+ className: "text-purple-400",
2648
+ children: "Hit Rate:"
2649
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2650
+ className: "ml-2 font-mono",
2651
+ children: [(t.hitRate || 0).toFixed(1), "%"]
2652
+ })] }),
2653
+ /* @__PURE__ */ (0, Q.jsxs)("div", {
2654
+ className: "col-span-2",
2655
+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2656
+ className: "text-cyan-400",
2657
+ children: "Saved:"
2658
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
2659
+ className: "ml-2 font-mono",
2660
+ children: _(t.totalSaved || 0)
2661
+ })]
2662
+ })
2663
+ ]
2664
+ })
2665
+ }), S = () => /* @__PURE__ */ (0, Q.jsx)("div", {
2666
+ className: "space-y-2",
2667
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
2668
+ className: "grid grid-cols-2 gap-2 text-xs",
2669
+ children: [
2670
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2671
+ className: "text-green-400",
2672
+ children: "Level:"
2673
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2674
+ className: "ml-2 font-mono",
2675
+ children: [
2676
+ r.currentLevel || 0,
2677
+ " / ",
2678
+ r.availableLevels || 0
2679
+ ]
2680
+ })] }),
2681
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2682
+ className: "text-blue-400",
2683
+ children: "Bandwidth:"
2684
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2685
+ className: "ml-2 font-mono",
2686
+ children: [_(r.bandwidthEstimate || 0), "/s"]
2687
+ })] }),
2688
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2689
+ className: "text-red-400",
2690
+ children: "Dropped:"
2691
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2692
+ className: "ml-2 font-mono",
2693
+ children: [r.droppedFrames || 0, " frames"]
2694
+ })] })
2695
+ ]
2696
+ })
2697
+ }), C = () => /* @__PURE__ */ (0, Q.jsx)("div", {
2698
+ className: "space-y-2",
2699
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
2700
+ className: "text-xs",
2701
+ children: [
2702
+ /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2703
+ className: "text-green-400",
2704
+ children: "Total:"
2705
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2706
+ className: "ml-2 font-mono",
2707
+ children: [i.pluginCount || 0, " plugins"]
2708
+ })] }),
2709
+ /* @__PURE__ */ (0, Q.jsxs)("div", {
2710
+ className: "mt-2",
2711
+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2712
+ className: "text-blue-400",
2713
+ children: "Active:"
2714
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
2715
+ className: "ml-2 space-y-1 font-mono text-xs",
2716
+ children: i.activePlugins?.map((e, t) => /* @__PURE__ */ (0, Q.jsxs)("div", {
2717
+ className: "text-green-300",
2718
+ children: ["• ", e]
2719
+ }, t)) || /* @__PURE__ */ (0, Q.jsx)("div", {
2720
+ className: "text-gray-400",
2721
+ children: "None"
2722
+ })
2723
+ })]
2724
+ }),
2725
+ i.loadedPlugins && i.loadedPlugins.length > (i.activePlugins?.length || 0) && /* @__PURE__ */ (0, Q.jsxs)("div", {
2726
+ className: "mt-2",
2727
+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2728
+ className: "text-yellow-400",
2729
+ children: "Loaded (inactive):"
2730
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
2731
+ className: "ml-2 space-y-1 font-mono text-xs",
2732
+ children: i.loadedPlugins.filter((e) => !i.activePlugins?.includes(e)).map((e, t) => /* @__PURE__ */ (0, Q.jsxs)("div", {
2733
+ className: "text-yellow-300",
2734
+ children: ["• ", e]
2735
+ }, t))
2736
+ })]
2737
+ })
2738
+ ]
2739
+ })
2740
+ }), w = () => /* @__PURE__ */ (0, Q.jsx)("div", {
2741
+ className: "space-y-2",
2742
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
2743
+ className: "space-y-1 font-mono text-xs",
2744
+ children: Object.entries(a).map(([e, t]) => /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsxs)("span", {
2745
+ className: "text-yellow-400",
2746
+ children: [e, ":"]
2747
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
2748
+ className: "ml-2 text-gray-300",
2749
+ children: typeof t == "object" ? JSON.stringify(t, null, 2) : String(t)
2750
+ })] }, e))
2751
+ })
2752
+ });
2753
+ return process.env.NODE_ENV === "development" ? /* @__PURE__ */ (0, Q.jsxs)("div", {
2754
+ className: Z("fixed z-50 min-w-80 max-w-96 rounded-lg border border-gray-700 bg-black/90 p-3 font-mono text-white text-xs backdrop-blur-sm", g, c),
2755
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
2756
+ className: "mb-3 flex items-center justify-between",
2757
+ children: [/* @__PURE__ */ (0, Q.jsx)("h3", {
2758
+ className: "font-bold text-blue-400 text-sm",
2759
+ children: d
2760
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
2761
+ className: "flex items-center space-x-2",
2762
+ children: /* @__PURE__ */ (0, Q.jsx)("button", {
2763
+ onClick: () => p(!f),
2764
+ className: "text-gray-400 transition-colors hover:text-white",
2765
+ "aria-label": f ? "Expand" : "Collapse",
2766
+ children: f ? /* @__PURE__ */ (0, Q.jsx)("svg", {
2767
+ width: "12",
2768
+ height: "12",
2769
+ viewBox: "0 0 12 12",
2770
+ fill: "none",
2771
+ children: /* @__PURE__ */ (0, Q.jsx)("path", {
2772
+ d: "M3 4.5L6 7.5L9 4.5",
2773
+ stroke: "currentColor",
2774
+ strokeWidth: "1.5",
2775
+ strokeLinecap: "round",
2776
+ strokeLinejoin: "round"
2777
+ })
2778
+ }) : /* @__PURE__ */ (0, Q.jsx)("svg", {
2779
+ width: "12",
2780
+ height: "12",
2781
+ viewBox: "0 0 12 12",
2782
+ fill: "none",
2783
+ children: /* @__PURE__ */ (0, Q.jsx)("path", {
2784
+ d: "M3 7.5L6 4.5L9 7.5",
2785
+ stroke: "currentColor",
2786
+ strokeWidth: "1.5",
2787
+ strokeLinecap: "round",
2788
+ strokeLinejoin: "round"
2789
+ })
2790
+ })
2791
+ })
2792
+ })]
2793
+ }), f ? /* @__PURE__ */ (0, Q.jsxs)("div", {
2794
+ className: "grid grid-cols-2 gap-2 text-xs",
2795
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2796
+ className: "text-green-400",
2797
+ children: "FPS:"
2798
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
2799
+ className: "ml-1 font-mono",
2800
+ children: e.fps || 0
2801
+ })] }), /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
2802
+ className: "text-blue-400",
2803
+ children: "Memory:"
2804
+ }), /* @__PURE__ */ (0, Q.jsxs)("span", {
2805
+ className: "ml-1 font-mono",
2806
+ children: [((e.memoryUsage || 0) / 1024 / 1024).toFixed(1), "MB"]
2807
+ })] })]
2808
+ }) : /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)("div", {
2809
+ className: "flex space-x-1 border-gray-600 border-b",
2810
+ children: [
2811
+ {
2812
+ id: "performance",
2813
+ label: "Performance"
2814
+ },
2815
+ {
2816
+ id: "hls",
2817
+ label: "HLS"
2818
+ },
2819
+ {
2820
+ id: "plugins",
2821
+ label: "Plugins"
2822
+ },
2823
+ {
2824
+ id: "debug",
2825
+ label: "Debug"
2826
+ }
2827
+ ].map((e) => /* @__PURE__ */ (0, Q.jsx)("button", {
2828
+ onClick: () => h(e.id),
2829
+ className: Z("px-2 py-1 font-medium text-xs transition-colors", m === e.id ? "border-blue-400 border-b text-blue-400" : "text-gray-400 hover:text-white"),
2830
+ children: e.label
2831
+ }, e.id))
2832
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
2833
+ className: "mt-3 max-h-64 overflow-y-auto",
2834
+ children: (() => {
2835
+ switch (m) {
2836
+ case "performance": return /* @__PURE__ */ (0, Q.jsxs)("div", {
2837
+ className: "space-y-3",
2838
+ children: [
2839
+ y(),
2840
+ /* @__PURE__ */ (0, Q.jsx)("hr", { className: "border-gray-600" }),
2841
+ b(),
2842
+ /* @__PURE__ */ (0, Q.jsx)("hr", { className: "border-gray-600" }),
2843
+ x()
2844
+ ]
2845
+ });
2846
+ case "hls": return S();
2847
+ case "plugins": return C();
2848
+ case "debug": return w();
2849
+ default: return y();
2850
+ }
2851
+ })()
2852
+ })] })]
2853
+ }) : null;
2854
+ };
2855
+ //#endregion
2856
+ export { Be as _, rt as a, Ze as c, Je as d, Ke as f, Z as g, We as h, $e as i, Ye as l, Ge as m, at as n, et as o, $ as p, Qe as r, Xe as s, ot as t, qe as u, l as v };
2857
+
2858
+ //# sourceMappingURL=enhanced-components-BwjBqSA1.js.map