@factorialco/f0-react 6.88.0 → 6.88.2

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 (77) hide show
  1. package/dist/{ChatDocxThumbnail-DzNPNFya.js → ChatDocxThumbnail-DhzoVI1K.js} +11 -8
  2. package/dist/{ChatPdfThumbnail-BFul62a4.js → ChatPdfThumbnail-BHa-zmGt.js} +1 -1
  3. package/dist/{ChatSheetThumbnail-CxGL5ukQ.js → ChatSheetThumbnail-D8aN1W_0.js} +3 -2
  4. package/dist/{ChatTextThumbnail-FVwMzn0I.js → ChatTextThumbnail-B53pSYUy.js} +2 -1
  5. package/dist/{CoachmarkProvider-2_pMSJdO.js → CoachmarkProvider-Dl0ullRd.js} +11948 -11697
  6. package/dist/{DocumentToolbar-BR442e_P.js → DocumentToolbar-CbvxX6_A.js} +2 -2
  7. package/dist/{DocxViewer-YweHIcvR.js → DocxViewer-D0ywzo9E.js} +11 -9
  8. package/dist/{F0AiProcessingOverlay-Dpen_hcq.js → F0AiProcessingOverlay-CwJG6TgU.js} +492 -405
  9. package/dist/{F0CanvasPanel-DjWQhvxj.js → F0CanvasPanel-CpgOQnbI.js} +7475 -7355
  10. package/dist/F0CanvasPanel.css +1 -1
  11. package/dist/{F0VideoPlayer-CYnKHXXD.js → F0VideoPlayer-CXAjfSnS.js} +447 -429
  12. package/dist/{LocationMap-YcfJrfST.js → LocationMap-BHPvamUV.js} +5 -3
  13. package/dist/{SheetViewer-CPr0Xea_.js → SheetViewer-B0xNsuOQ.js} +3 -3
  14. package/dist/{TextViewer-Cu9mNx0F.js → TextViewer-DDrr3xIG.js} +4 -3
  15. package/dist/ai.d.ts +13 -13
  16. package/dist/ai.js +2 -2
  17. package/dist/component-status.d.ts +8 -8
  18. package/dist/component-status.js +3 -2
  19. package/dist/{experimental-Q9kMJ9wE.js → experimental-B-SPgEj_.js} +3070 -2859
  20. package/dist/experimental.d.ts +65 -54
  21. package/dist/experimental.js +3 -3
  22. package/dist/f0.d.ts +84 -73
  23. package/dist/f0.js +8070 -7967
  24. package/dist/i18n-provider-defaults.d.ts +4 -4
  25. package/dist/{index-O6DySIGj.js → index-D1wOJXWr.js} +23 -13
  26. package/dist/index-uG8opRj1.js +4 -0
  27. package/dist/{pdfWorker-CrkERbwq.js → pdfWorker-mxUZLnlP.js} +2 -2
  28. package/dist/{sheetPreview-5qeAOp0W.js → sheetPreview-Djc-YyVs.js} +4 -2
  29. package/icons/app/CursorClick.d.ts.map +1 -1
  30. package/icons/app/FitView.d.ts.map +1 -1
  31. package/icons/modules/Benefits.d.ts.map +1 -1
  32. package/icons/modules/Calendar.d.ts.map +1 -1
  33. package/icons/modules/Cards.d.ts.map +1 -1
  34. package/icons/modules/ClockIn.d.ts.map +1 -1
  35. package/icons/modules/Communities.d.ts.map +1 -1
  36. package/icons/modules/Complaints.d.ts.map +1 -1
  37. package/icons/modules/Discover.d.ts.map +1 -1
  38. package/icons/modules/Documents.d.ts.map +1 -1
  39. package/icons/modules/Engagement.d.ts.map +1 -1
  40. package/icons/modules/Finance.d.ts.map +1 -1
  41. package/icons/modules/Goals.d.ts.map +1 -1
  42. package/icons/modules/Home.d.ts.map +1 -1
  43. package/icons/modules/Hub.d.ts.map +1 -1
  44. package/icons/modules/Inbox.d.ts.map +1 -1
  45. package/icons/modules/ItManagement.d.ts.map +1 -1
  46. package/icons/modules/Kudos.d.ts.map +1 -1
  47. package/icons/modules/LMS.d.ts.map +1 -1
  48. package/icons/modules/Marketplace.d.ts.map +1 -1
  49. package/icons/modules/Meetings.d.ts.map +1 -1
  50. package/icons/modules/MyDocuments.d.ts.map +1 -1
  51. package/icons/modules/Organization.d.ts.map +1 -1
  52. package/icons/modules/Overviews.d.ts.map +1 -1
  53. package/icons/modules/Pages.d.ts.map +1 -1
  54. package/icons/modules/Payroll.d.ts.map +1 -1
  55. package/icons/modules/Performance.d.ts.map +1 -1
  56. package/icons/modules/Profile.d.ts.map +1 -1
  57. package/icons/modules/Projects.d.ts.map +1 -1
  58. package/icons/modules/Recruitment.d.ts.map +1 -1
  59. package/icons/modules/Reports.d.ts.map +1 -1
  60. package/icons/modules/Rocket.d.ts.map +1 -1
  61. package/icons/modules/SalaryAdvance.d.ts.map +1 -1
  62. package/icons/modules/Sales.d.ts.map +1 -1
  63. package/icons/modules/Settings.d.ts.map +1 -1
  64. package/icons/modules/Shifts.d.ts.map +1 -1
  65. package/icons/modules/Social.d.ts.map +1 -1
  66. package/icons/modules/Software.d.ts.map +1 -1
  67. package/icons/modules/Spaces.d.ts.map +1 -1
  68. package/icons/modules/Spending.d.ts.map +1 -1
  69. package/icons/modules/Tasks.d.ts.map +1 -1
  70. package/icons/modules/TimeOff.d.ts.map +1 -1
  71. package/icons/modules/TimeTracking.d.ts.map +1 -1
  72. package/icons/modules/Trainings.d.ts.map +1 -1
  73. package/icons/modules/Treasury.d.ts.map +1 -1
  74. package/icons/modules/Workflows.d.ts.map +1 -1
  75. package/icons/special/One.d.ts.map +1 -1
  76. package/package.json +6 -3
  77. package/dist/index-N_SH9qr4.js +0 -4
@@ -1,6 +1,6 @@
1
- import { u as W, t as je, v as Ge, m as $, x as Xe, y as Ze, z as qe, A as Ye, B as Je, E as Qe, G as et, H as tt, J as nt, K as rt, L as at, M as ot, N as ye, O as st, Q as Ce, l as it, R as ct, U as lt, V as dt, w as ut, r as ft } from "./F0CanvasPanel-DjWQhvxj.js";
2
- import { jsxs as R, jsx as l } from "react/jsx-runtime";
3
- import { forwardRef as re, useId as mt, useState as x, useRef as O, useEffect as _, useMemo as J, useCallback as M } from "react";
1
+ import { u as W, t as je, v as Ge, m as $, x as Xe, y as Ze, z as qe, A as Ye, B as Je, E as Qe, G as et, H as tt, J as nt, K as rt, L as at, M as ot, N as ye, O as st, Q as Ce, l as it, R as ct, U as lt, V as dt, w as ut, r as ft } from "./F0CanvasPanel-CpgOQnbI.js";
2
+ import { jsxs as S, jsx as c } from "react/jsx-runtime";
3
+ import { forwardRef as re, useId as mt, useState as x, useRef as F, useEffect as N, useMemo as J, useCallback as T } from "react";
4
4
  import { d as H, f as de } from "./tooltip-CMBdJvJA.js";
5
5
  import { F as pt, a as Pe, b as ht, c as gt } from "./VolumeMuted-DKLKhxyd.js";
6
6
  function Se(e) {
@@ -25,7 +25,8 @@ function ae(...e) {
25
25
  return Array.from(t.values());
26
26
  }
27
27
  function Le(e, t) {
28
- if (e.label) return e.label;
28
+ if (e.label)
29
+ return e.label;
29
30
  try {
30
31
  const a = t ?? e.locale, o = new Intl.DisplayNames([a], { type: "language" }).of(e.locale) ?? e.locale;
31
32
  return o.charAt(0).toLocaleUpperCase(a) + o.slice(1);
@@ -34,22 +35,26 @@ function Le(e, t) {
34
35
  }
35
36
  }
36
37
  function Z(e, t) {
37
- if (e.length === 0) return;
38
+ if (e.length === 0)
39
+ return;
38
40
  const a = e.map((r) => r.locale), n = (r) => r.split("-")[0], o = (r) => a.find((u) => u === r) ?? a.find((u) => n(u) === n(r));
39
41
  if (t) {
40
42
  const r = o(t);
41
- if (r) return r;
43
+ if (r)
44
+ return r;
42
45
  }
43
- const i = typeof navigator < "u" ? navigator.language : void 0;
44
- if (i) {
45
- const r = o(i);
46
- if (r) return r;
46
+ const s = typeof navigator < "u" ? navigator.language : void 0;
47
+ if (s) {
48
+ const r = o(s);
49
+ if (r)
50
+ return r;
47
51
  }
48
52
  return a[0];
49
53
  }
50
54
  const Re = [0.5, 0.75, 1, 1.25, 1.5], oe = 1, le = 0.25, Q = 5, te = 0.1, q = 12, vt = 1, bt = 250, yt = [25, 50, 75], Lt = 300 * 1e3, wt = 10, kt = 0.03;
51
55
  function ne(e) {
52
- if (!Number.isFinite(e) || e < 0) return "0:00";
56
+ if (!Number.isFinite(e) || e < 0)
57
+ return "0:00";
53
58
  const t = Math.floor(e / 60), a = Math.floor(e % 60);
54
59
  return `${t}:${a.toString().padStart(2, "0")}`;
55
60
  }
@@ -67,7 +72,7 @@ const De = {
67
72
  fontWeight: 700,
68
73
  fontFamily: "inherit",
69
74
  letterSpacing: -0.4
70
- }, ue = re(({ animate: e, ...t }, a) => /* @__PURE__ */ R(
75
+ }, ue = re(({ animate: e, ...t }, a) => /* @__PURE__ */ S(
71
76
  "svg",
72
77
  {
73
78
  xmlns: "http://www.w3.org/2000/svg",
@@ -77,7 +82,7 @@ const De = {
77
82
  ...t,
78
83
  "aria-hidden": "true",
79
84
  children: [
80
- /* @__PURE__ */ l(
85
+ /* @__PURE__ */ c(
81
86
  "rect",
82
87
  {
83
88
  x: 3.5,
@@ -89,14 +94,14 @@ const De = {
89
94
  vectorEffect: "non-scaling-stroke"
90
95
  }
91
96
  ),
92
- /* @__PURE__ */ l("text", { ...De, fill: "currentColor", children: "AD" })
97
+ /* @__PURE__ */ c("text", { ...De, fill: "currentColor", children: "AD" })
93
98
  ]
94
99
  }
95
100
  ));
96
101
  ue.displayName = "AudioDescriptionLineIcon";
97
102
  const Te = re(({ animate: e, ...t }, a) => {
98
103
  const n = `ad-mask-${mt().replace(/:/g, "")}`;
99
- return /* @__PURE__ */ R(
104
+ return /* @__PURE__ */ S(
100
105
  "svg",
101
106
  {
102
107
  xmlns: "http://www.w3.org/2000/svg",
@@ -106,11 +111,11 @@ const Te = re(({ animate: e, ...t }, a) => {
106
111
  ...t,
107
112
  "aria-hidden": "true",
108
113
  children: [
109
- /* @__PURE__ */ R("mask", { id: n, maskUnits: "userSpaceOnUse", children: [
110
- /* @__PURE__ */ l("rect", { x: 3, y: 6, width: 18, height: 12, rx: 3, fill: "white" }),
111
- /* @__PURE__ */ l("text", { ...De, fill: "black", children: "AD" })
114
+ /* @__PURE__ */ S("mask", { id: n, maskUnits: "userSpaceOnUse", children: [
115
+ /* @__PURE__ */ c("rect", { x: 3, y: 6, width: 18, height: 12, rx: 3, fill: "white" }),
116
+ /* @__PURE__ */ c("text", { ...De, fill: "black", children: "AD" })
112
117
  ] }),
113
- /* @__PURE__ */ l(
118
+ /* @__PURE__ */ c(
114
119
  "rect",
115
120
  {
116
121
  x: 3,
@@ -128,7 +133,7 @@ const Te = re(({ animate: e, ...t }, a) => {
128
133
  });
129
134
  Te.displayName = "AudioDescriptionFilledIcon";
130
135
  const fe = re(
131
- ({ animate: e, ...t }, a) => /* @__PURE__ */ R(
136
+ ({ animate: e, ...t }, a) => /* @__PURE__ */ S(
132
137
  "svg",
133
138
  {
134
139
  xmlns: "http://www.w3.org/2000/svg",
@@ -137,7 +142,7 @@ const fe = re(
137
142
  ref: a,
138
143
  ...t,
139
144
  children: [
140
- /* @__PURE__ */ l(
145
+ /* @__PURE__ */ c(
141
146
  "rect",
142
147
  {
143
148
  x: 3.5,
@@ -149,7 +154,7 @@ const fe = re(
149
154
  vectorEffect: "non-scaling-stroke"
150
155
  }
151
156
  ),
152
- /* @__PURE__ */ l(
157
+ /* @__PURE__ */ c(
153
158
  "path",
154
159
  {
155
160
  stroke: "currentColor",
@@ -158,7 +163,7 @@ const fe = re(
158
163
  vectorEffect: "non-scaling-stroke"
159
164
  }
160
165
  ),
161
- /* @__PURE__ */ l(
166
+ /* @__PURE__ */ c(
162
167
  "path",
163
168
  {
164
169
  stroke: "currentColor",
@@ -172,8 +177,8 @@ const fe = re(
172
177
  )
173
178
  );
174
179
  fe.displayName = "CaptionsLineIcon";
175
- const Me = re(
176
- ({ animate: e, ...t }, a) => /* @__PURE__ */ l(
180
+ const Ae = re(
181
+ ({ animate: e, ...t }, a) => /* @__PURE__ */ c(
177
182
  "svg",
178
183
  {
179
184
  xmlns: "http://www.w3.org/2000/svg",
@@ -181,7 +186,7 @@ const Me = re(
181
186
  viewBox: "0 0 24 24",
182
187
  ref: a,
183
188
  ...t,
184
- children: /* @__PURE__ */ l(
189
+ children: /* @__PURE__ */ c(
185
190
  "path",
186
191
  {
187
192
  fill: "currentColor",
@@ -194,19 +199,20 @@ const Me = re(
194
199
  }
195
200
  )
196
201
  );
197
- Me.displayName = "CaptionsFilledIcon";
202
+ Ae.displayName = "CaptionsFilledIcon";
198
203
  function Et({
199
204
  value: e,
200
205
  onChange: t,
201
206
  containerRef: a
202
207
  }) {
203
- const { t: n } = W(), [o, i] = x(!1), r = (u) => {
208
+ const { t: n } = W(), [o, s] = x(!1), r = (u) => {
204
209
  const d = Array.from(
205
210
  u.currentTarget.querySelectorAll(
206
211
  '[role="menuitemradio"]'
207
212
  )
208
213
  );
209
- if (d.length === 0) return;
214
+ if (d.length === 0)
215
+ return;
210
216
  const m = d.indexOf(document.activeElement);
211
217
  let g;
212
218
  switch (u.key) {
@@ -227,8 +233,8 @@ function Et({
227
233
  }
228
234
  u.preventDefault(), d[g]?.focus();
229
235
  };
230
- return /* @__PURE__ */ R(je, { open: o, onOpenChange: i, children: [
231
- /* @__PURE__ */ l(Ge, { asChild: !0, children: /* @__PURE__ */ l(
236
+ return /* @__PURE__ */ S(je, { open: o, onOpenChange: s, children: [
237
+ /* @__PURE__ */ c(Ge, { asChild: !0, children: /* @__PURE__ */ c(
232
238
  $,
233
239
  {
234
240
  variant: "ghost",
@@ -239,7 +245,7 @@ function Et({
239
245
  })
240
246
  }
241
247
  ) }),
242
- /* @__PURE__ */ l(
248
+ /* @__PURE__ */ c(
243
249
  Xe,
244
250
  {
245
251
  container: a.current,
@@ -255,7 +261,7 @@ function Et({
255
261
  onKeyDown: r,
256
262
  children: Re.map((u) => {
257
263
  const d = u === e;
258
- return /* @__PURE__ */ R(
264
+ return /* @__PURE__ */ S(
259
265
  "button",
260
266
  {
261
267
  type: "button",
@@ -269,10 +275,10 @@ function Et({
269
275
  "[&_svg]:h-3.5 [&_svg]:w-3.5"
270
276
  ),
271
277
  onClick: () => {
272
- t(u), i(!1);
278
+ t(u), s(!1);
273
279
  },
274
280
  children: [
275
- d && /* @__PURE__ */ l("span", { className: "absolute left-2.5 inline-flex items-center", children: /* @__PURE__ */ l(Ze, {}) }),
281
+ d && /* @__PURE__ */ c("span", { className: "absolute left-2.5 inline-flex items-center", children: /* @__PURE__ */ c(Ze, {}) }),
276
282
  se(u)
277
283
  ]
278
284
  },
@@ -283,65 +289,163 @@ function Et({
283
289
  )
284
290
  ] });
285
291
  }
286
- const ie = "off", we = "py-2 pr-4 text-base font-medium", Ct = "gap-2 py-2 pl-3 pr-2 text-base font-medium", Ae = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
292
+ function Ct({
293
+ currentTime: e,
294
+ duration: t,
295
+ markerTime: a,
296
+ blockSeekPastMarker: n = !1,
297
+ onSeek: o
298
+ }) {
299
+ const { t: s } = W(), r = F(null), [u, d] = x(!1), [m, g] = x(null), y = t > 0 ? Math.min(1, e / t) : 0, l = a !== void 0 && t > 0 ? Math.min(1, a / t) : 0, f = a !== void 0 && t > 0 && a > 0 && a < t - le && e < a - le, h = (v) => {
300
+ const P = r.current;
301
+ if (!P)
302
+ return 0;
303
+ const M = P.getBoundingClientRect();
304
+ return Math.max(0, Math.min(1, (v - M.left) / M.width));
305
+ }, b = (v) => {
306
+ t && o(h(v) * t);
307
+ }, E = (v) => {
308
+ t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId), d(!0), b(v.clientX));
309
+ }, A = (v) => {
310
+ t && (g(h(v.clientX)), u && b(v.clientX));
311
+ }, k = (v) => {
312
+ u && (d(!1), v.currentTarget.hasPointerCapture(v.pointerId) && v.currentTarget.releasePointerCapture(v.pointerId));
313
+ }, w = m !== null && n && a !== void 0 && m > l, O = (v) => {
314
+ if (!t)
315
+ return;
316
+ let P = null;
317
+ switch (v.key) {
318
+ case "ArrowLeft":
319
+ P = Math.max(0, e - Q);
320
+ break;
321
+ case "ArrowRight":
322
+ P = Math.min(t, e + Q);
323
+ break;
324
+ case "Home":
325
+ P = 0;
326
+ break;
327
+ case "End":
328
+ P = t;
329
+ break;
330
+ default:
331
+ return;
332
+ }
333
+ v.preventDefault(), v.stopPropagation(), o(P);
334
+ };
335
+ return /* @__PURE__ */ S(
336
+ "div",
337
+ {
338
+ ref: r,
339
+ className: H(
340
+ "relative flex h-4 flex-1 items-center rounded-sm",
341
+ "cursor-pointer touch-none",
342
+ de()
343
+ ),
344
+ role: "slider",
345
+ tabIndex: 0,
346
+ "aria-label": s("videoPlayer.seekLabel"),
347
+ "aria-valuemin": 0,
348
+ "aria-valuemax": t || 0,
349
+ "aria-valuenow": e,
350
+ "aria-valuetext": s("videoPlayer.timeProgress", {
351
+ current: ne(e),
352
+ total: ne(t)
353
+ }),
354
+ onPointerDown: E,
355
+ onPointerMove: A,
356
+ onPointerUp: k,
357
+ onPointerCancel: k,
358
+ onLostPointerCapture: () => d(!1),
359
+ onPointerLeave: () => g(null),
360
+ onKeyDown: O,
361
+ children: [
362
+ /* @__PURE__ */ c("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
363
+ /* @__PURE__ */ c(
364
+ "div",
365
+ {
366
+ className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
367
+ style: { width: `${y * 100}%` }
368
+ }
369
+ ),
370
+ f && /* @__PURE__ */ c(
371
+ "div",
372
+ {
373
+ className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
374
+ style: { left: `${l * 100}%` },
375
+ "aria-hidden": "true"
376
+ }
377
+ ),
378
+ /* @__PURE__ */ c(
379
+ "div",
380
+ {
381
+ className: "pointer-events-none absolute z-[2] h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
382
+ style: { left: `${y * 100}%` }
383
+ }
384
+ ),
385
+ w && /* @__PURE__ */ c("div", { className: "absolute inset-0 cursor-not-allowed" })
386
+ ]
387
+ }
388
+ );
389
+ }
390
+ const ie = "off", we = "py-2 pr-4 text-base font-medium", Pt = "gap-2 py-2 pl-3 pr-2 text-base font-medium", Me = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
287
391
  function ce({
288
392
  icon: e,
289
393
  label: t,
290
394
  container: a,
291
395
  options: n,
292
396
  value: o,
293
- onLanguageChange: i,
397
+ onLanguageChange: s,
294
398
  on: r,
295
399
  onOff: u,
296
400
  offLabel: d
297
401
  }) {
298
- const m = u !== void 0, g = n.find((c) => c.locale === o), y = m && !r ? d : g ? Le(g) : d;
299
- return /* @__PURE__ */ R(et, { children: [
300
- /* @__PURE__ */ R(tt, { className: Ct, children: [
301
- /* @__PURE__ */ l(nt, { icon: e }),
302
- /* @__PURE__ */ l("span", { className: "flex-1", children: t }),
303
- /* @__PURE__ */ l("span", { className: "text-f1-foreground-secondary", children: y })
402
+ const m = u !== void 0, g = n.find((l) => l.locale === o), y = m && !r ? d : g ? Le(g) : d;
403
+ return /* @__PURE__ */ S(et, { children: [
404
+ /* @__PURE__ */ S(tt, { className: Pt, children: [
405
+ /* @__PURE__ */ c(nt, { icon: e }),
406
+ /* @__PURE__ */ c("span", { className: "flex-1", children: t }),
407
+ /* @__PURE__ */ c("span", { className: "text-f1-foreground-secondary", children: y })
304
408
  ] }),
305
- /* @__PURE__ */ l(rt, { container: a ?? void 0, children: /* @__PURE__ */ l(at, { className: Ae, children: /* @__PURE__ */ R(
409
+ /* @__PURE__ */ c(rt, { container: a ?? void 0, children: /* @__PURE__ */ c(at, { className: Me, children: /* @__PURE__ */ S(
306
410
  ot,
307
411
  {
308
412
  value: m ? r ? o : ie : o,
309
- onValueChange: (c) => m && c === ie ? u() : i(c),
413
+ onValueChange: (l) => m && l === ie ? u() : s(l),
310
414
  children: [
311
- n.map((c) => /* @__PURE__ */ l(
415
+ n.map((l) => /* @__PURE__ */ c(
312
416
  ye,
313
417
  {
314
- value: c.locale,
418
+ value: l.locale,
315
419
  className: we,
316
- children: Le(c)
420
+ children: Le(l)
317
421
  },
318
- c.locale
422
+ l.locale
319
423
  )),
320
- m && /* @__PURE__ */ l(ye, { value: ie, className: we, children: d })
424
+ m && /* @__PURE__ */ c(ye, { value: ie, className: we, children: d })
321
425
  ]
322
426
  }
323
427
  ) }) })
324
428
  ] });
325
429
  }
326
- function Pt({
430
+ function St({
327
431
  containerRef: e,
328
432
  audioLanguages: t,
329
433
  audioLanguage: a,
330
434
  onAudioLanguageChange: n,
331
435
  captionLanguages: o,
332
- captionLanguage: i,
436
+ captionLanguage: s,
333
437
  captionsOn: r,
334
438
  onCaptionLanguageChange: u,
335
439
  onCaptionsOff: d,
336
440
  audioDescriptionLanguages: m,
337
441
  audioDescriptionLanguage: g,
338
442
  audioDescriptionOn: y,
339
- onAudioDescriptionLanguageChange: c,
443
+ onAudioDescriptionLanguageChange: l,
340
444
  onAudioDescriptionOff: f
341
445
  }) {
342
446
  const { t: h } = W(), b = e.current, E = h("videoPlayer.off");
343
- return /* @__PURE__ */ R(qe, { children: [
344
- /* @__PURE__ */ l(Ye, { asChild: !0, children: /* @__PURE__ */ l(
447
+ return /* @__PURE__ */ S(qe, { children: [
448
+ /* @__PURE__ */ c(Ye, { asChild: !0, children: /* @__PURE__ */ c(
345
449
  $,
346
450
  {
347
451
  variant: "ghost",
@@ -351,15 +455,15 @@ function Pt({
351
455
  label: h("videoPlayer.settings")
352
456
  }
353
457
  ) }),
354
- /* @__PURE__ */ R(
458
+ /* @__PURE__ */ S(
355
459
  Je,
356
460
  {
357
461
  container: b,
358
462
  side: "top",
359
463
  align: "end",
360
- className: Ae,
464
+ className: Me,
361
465
  children: [
362
- t.length > 1 && /* @__PURE__ */ l(
466
+ t.length > 1 && /* @__PURE__ */ c(
363
467
  ce,
364
468
  {
365
469
  icon: Qe,
@@ -371,21 +475,21 @@ function Pt({
371
475
  offLabel: E
372
476
  }
373
477
  ),
374
- o.length > 1 && /* @__PURE__ */ l(
478
+ o.length > 1 && /* @__PURE__ */ c(
375
479
  ce,
376
480
  {
377
481
  icon: fe,
378
482
  label: h("videoPlayer.subtitles"),
379
483
  container: b,
380
484
  options: o,
381
- value: i,
485
+ value: s,
382
486
  on: r,
383
487
  onLanguageChange: u,
384
488
  onOff: d,
385
489
  offLabel: E
386
490
  }
387
491
  ),
388
- m.length > 1 && /* @__PURE__ */ l(
492
+ m.length > 1 && /* @__PURE__ */ c(
389
493
  ce,
390
494
  {
391
495
  icon: ue,
@@ -394,7 +498,7 @@ function Pt({
394
498
  options: m,
395
499
  value: g,
396
500
  on: y,
397
- onLanguageChange: c,
501
+ onLanguageChange: l,
398
502
  onOff: f,
399
503
  offLabel: E
400
504
  }
@@ -404,105 +508,9 @@ function Pt({
404
508
  )
405
509
  ] });
406
510
  }
407
- function St(e) {
511
+ function Rt(e) {
408
512
  return e.audioLanguages > 1 || e.captionLanguages > 1 || e.audioDescriptionLanguages > 1;
409
513
  }
410
- function Rt({
411
- currentTime: e,
412
- duration: t,
413
- markerTime: a,
414
- blockSeekPastMarker: n = !1,
415
- onSeek: o
416
- }) {
417
- const { t: i } = W(), r = O(null), [u, d] = x(!1), [m, g] = x(null), y = t > 0 ? Math.min(1, e / t) : 0, c = a !== void 0 && t > 0 ? Math.min(1, a / t) : 0, f = a !== void 0 && t > 0 && a > 0 && a < t - le && e < a - le, h = (v) => {
418
- const S = r.current;
419
- if (!S) return 0;
420
- const I = S.getBoundingClientRect();
421
- return Math.max(0, Math.min(1, (v - I.left) / I.width));
422
- }, b = (v) => {
423
- t && o(h(v) * t);
424
- }, E = (v) => {
425
- t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId), d(!0), b(v.clientX));
426
- }, A = (v) => {
427
- t && (g(h(v.clientX)), u && b(v.clientX));
428
- }, k = (v) => {
429
- u && (d(!1), v.currentTarget.hasPointerCapture(v.pointerId) && v.currentTarget.releasePointerCapture(v.pointerId));
430
- }, L = m !== null && n && a !== void 0 && m > c, T = (v) => {
431
- if (!t) return;
432
- let S = null;
433
- switch (v.key) {
434
- case "ArrowLeft":
435
- S = Math.max(0, e - Q);
436
- break;
437
- case "ArrowRight":
438
- S = Math.min(t, e + Q);
439
- break;
440
- case "Home":
441
- S = 0;
442
- break;
443
- case "End":
444
- S = t;
445
- break;
446
- default:
447
- return;
448
- }
449
- v.preventDefault(), v.stopPropagation(), o(S);
450
- };
451
- return /* @__PURE__ */ R(
452
- "div",
453
- {
454
- ref: r,
455
- className: H(
456
- "relative flex h-4 flex-1 items-center rounded-sm",
457
- "cursor-pointer touch-none",
458
- de()
459
- ),
460
- role: "slider",
461
- tabIndex: 0,
462
- "aria-label": i("videoPlayer.seekLabel"),
463
- "aria-valuemin": 0,
464
- "aria-valuemax": t || 0,
465
- "aria-valuenow": e,
466
- "aria-valuetext": i("videoPlayer.timeProgress", {
467
- current: ne(e),
468
- total: ne(t)
469
- }),
470
- onPointerDown: E,
471
- onPointerMove: A,
472
- onPointerUp: k,
473
- onPointerCancel: k,
474
- onLostPointerCapture: () => d(!1),
475
- onPointerLeave: () => g(null),
476
- onKeyDown: T,
477
- children: [
478
- /* @__PURE__ */ l("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
479
- /* @__PURE__ */ l(
480
- "div",
481
- {
482
- className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
483
- style: { width: `${y * 100}%` }
484
- }
485
- ),
486
- f && /* @__PURE__ */ l(
487
- "div",
488
- {
489
- className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
490
- style: { left: `${c * 100}%` },
491
- "aria-hidden": "true"
492
- }
493
- ),
494
- /* @__PURE__ */ l(
495
- "div",
496
- {
497
- className: "pointer-events-none absolute z-[2] h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
498
- style: { left: `${y * 100}%` }
499
- }
500
- ),
501
- L && /* @__PURE__ */ l("div", { className: "absolute inset-0 cursor-not-allowed" })
502
- ]
503
- }
504
- );
505
- }
506
514
  function Dt(e, t) {
507
515
  return t || e === 0 ? Pe : e <= 0.5 ? ht : gt;
508
516
  }
@@ -513,8 +521,8 @@ function Tt({
513
521
  onVolumeChange: n,
514
522
  silent: o = !1
515
523
  }) {
516
- const { t: i } = W(), r = t || e === 0;
517
- return o ? /* @__PURE__ */ l(
524
+ const { t: s } = W(), r = t || e === 0;
525
+ return o ? /* @__PURE__ */ c(
518
526
  $,
519
527
  {
520
528
  variant: "ghost",
@@ -522,41 +530,42 @@ function Tt({
522
530
  hideLabel: !0,
523
531
  disabled: !0,
524
532
  icon: Pe,
525
- label: i("videoPlayer.noAudio")
533
+ label: s("videoPlayer.noAudio")
526
534
  }
527
- ) : /* @__PURE__ */ R("div", { className: "flex items-center gap-1", children: [
528
- /* @__PURE__ */ l(
535
+ ) : /* @__PURE__ */ S("div", { className: "flex items-center gap-1", children: [
536
+ /* @__PURE__ */ c(
529
537
  $,
530
538
  {
531
539
  variant: "ghost",
532
540
  size: "sm",
533
541
  hideLabel: !0,
534
542
  icon: Dt(e, r),
535
- label: i(r ? "videoPlayer.unmute" : "videoPlayer.mute"),
543
+ label: s(r ? "videoPlayer.unmute" : "videoPlayer.mute"),
536
544
  onClick: a
537
545
  }
538
546
  ),
539
- /* @__PURE__ */ l(Mt, { value: r ? 0 : e, onChange: n })
547
+ /* @__PURE__ */ c(At, { value: r ? 0 : e, onChange: n })
540
548
  ] });
541
549
  }
542
- function Mt({ value: e, onChange: t }) {
543
- const { t: a } = W(), n = O(null), [o, i] = x(!1), r = Math.max(0, Math.min(1, e)), u = (c) => {
550
+ function At({ value: e, onChange: t }) {
551
+ const { t: a } = W(), n = F(null), [o, s] = x(!1), r = Math.max(0, Math.min(1, e)), u = (l) => {
544
552
  const f = n.current;
545
- if (!f) return 0;
553
+ if (!f)
554
+ return 0;
546
555
  const h = f.getBoundingClientRect(), b = h.width - q;
547
556
  return b <= 0 ? 0 : Math.max(
548
557
  0,
549
- Math.min(1, (c - h.left - q / 2) / b)
558
+ Math.min(1, (l - h.left - q / 2) / b)
550
559
  );
551
- }, d = (c) => {
552
- c.preventDefault(), c.currentTarget.setPointerCapture(c.pointerId), i(!0), t(u(c.clientX));
553
- }, m = (c) => {
554
- o && t(u(c.clientX));
555
- }, g = (c) => {
556
- o && (i(!1), c.currentTarget.hasPointerCapture(c.pointerId) && c.currentTarget.releasePointerCapture(c.pointerId));
557
- }, y = (c) => {
560
+ }, d = (l) => {
561
+ l.preventDefault(), l.currentTarget.setPointerCapture(l.pointerId), s(!0), t(u(l.clientX));
562
+ }, m = (l) => {
563
+ o && t(u(l.clientX));
564
+ }, g = (l) => {
565
+ o && (s(!1), l.currentTarget.hasPointerCapture(l.pointerId) && l.currentTarget.releasePointerCapture(l.pointerId));
566
+ }, y = (l) => {
558
567
  let f = null;
559
- switch (c.key) {
568
+ switch (l.key) {
560
569
  case "ArrowRight":
561
570
  case "ArrowUp":
562
571
  f = Math.min(1, r + te);
@@ -574,9 +583,9 @@ function Mt({ value: e, onChange: t }) {
574
583
  default:
575
584
  return;
576
585
  }
577
- c.preventDefault(), c.stopPropagation(), t(f);
586
+ l.preventDefault(), l.stopPropagation(), t(f);
578
587
  };
579
- return /* @__PURE__ */ R(
588
+ return /* @__PURE__ */ S(
580
589
  "div",
581
590
  {
582
591
  ref: n,
@@ -596,11 +605,11 @@ function Mt({ value: e, onChange: t }) {
596
605
  onPointerMove: m,
597
606
  onPointerUp: g,
598
607
  onPointerCancel: g,
599
- onLostPointerCapture: () => i(!1),
608
+ onLostPointerCapture: () => s(!1),
600
609
  onKeyDown: y,
601
610
  children: [
602
- /* @__PURE__ */ l("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
603
- /* @__PURE__ */ l(
611
+ /* @__PURE__ */ c("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
612
+ /* @__PURE__ */ c(
604
613
  "div",
605
614
  {
606
615
  className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
@@ -609,7 +618,7 @@ function Mt({ value: e, onChange: t }) {
609
618
  }
610
619
  }
611
620
  ),
612
- /* @__PURE__ */ l(
621
+ /* @__PURE__ */ c(
613
622
  "div",
614
623
  {
615
624
  className: "pointer-events-none absolute h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
@@ -622,50 +631,50 @@ function Mt({ value: e, onChange: t }) {
622
631
  }
623
632
  );
624
633
  }
625
- function At({
634
+ function Mt({
626
635
  isPlaying: e,
627
636
  currentTime: t,
628
637
  duration: a,
629
638
  volume: n,
630
639
  isMuted: o,
631
- playbackRate: i,
640
+ playbackRate: s,
632
641
  isFullscreen: r,
633
642
  markerTime: u,
634
643
  blockSeekPastMarker: d,
635
644
  containerRef: m,
636
645
  captionsAvailable: g,
637
646
  captionsOn: y,
638
- audioDescriptionAvailable: c,
647
+ audioDescriptionAvailable: l,
639
648
  audioDescriptionOn: f,
640
649
  silent: h,
641
650
  persist: b,
642
651
  audioLanguages: E,
643
652
  audioLanguage: A,
644
653
  onAudioLanguageChange: k,
645
- captionLanguages: L,
646
- captionLanguage: T,
654
+ captionLanguages: w,
655
+ captionLanguage: O,
647
656
  onCaptionLanguageChange: v,
648
- onCaptionsOff: S,
649
- audioDescriptionLanguages: I,
657
+ onCaptionsOff: P,
658
+ audioDescriptionLanguages: M,
650
659
  audioDescriptionLanguage: C,
651
- onAudioDescriptionLanguageChange: s,
652
- onAudioDescriptionOff: P,
653
- onTogglePlay: D,
660
+ onAudioDescriptionLanguageChange: i,
661
+ onAudioDescriptionOff: D,
662
+ onTogglePlay: R,
654
663
  onToggleMute: B,
655
664
  onVolumeChange: j,
656
665
  onPlaybackRateChange: K,
657
666
  onToggleFullscreen: G,
658
- onToggleCaptions: F,
667
+ onToggleCaptions: _,
659
668
  onToggleAudioDescription: U,
660
669
  onSeek: Y,
661
670
  download: X
662
671
  }) {
663
- const { t: p } = W(), N = g && L.length <= 1, z = c && I.length <= 1, V = St({
672
+ const { t: p } = W(), I = g && w.length <= 1, z = l && M.length <= 1, V = Rt({
664
673
  audioLanguages: E.length,
665
- captionLanguages: L.length,
666
- audioDescriptionLanguages: I.length
674
+ captionLanguages: w.length,
675
+ audioDescriptionLanguages: M.length
667
676
  });
668
- return /* @__PURE__ */ R(
677
+ return /* @__PURE__ */ S(
669
678
  "div",
670
679
  {
671
680
  className: H(
@@ -686,7 +695,7 @@ function At({
686
695
  !e || b ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"
687
696
  ),
688
697
  children: [
689
- /* @__PURE__ */ l(
698
+ /* @__PURE__ */ c(
690
699
  $,
691
700
  {
692
701
  variant: "ghost",
@@ -694,11 +703,11 @@ function At({
694
703
  hideLabel: !0,
695
704
  icon: e ? st : Ce,
696
705
  label: p(e ? "videoPlayer.pause" : "videoPlayer.play"),
697
- onClick: D
706
+ onClick: R
698
707
  }
699
708
  ),
700
- /* @__PURE__ */ l(
701
- Rt,
709
+ /* @__PURE__ */ c(
710
+ Ct,
702
711
  {
703
712
  currentTime: t,
704
713
  duration: a,
@@ -707,12 +716,12 @@ function At({
707
716
  onSeek: Y
708
717
  }
709
718
  ),
710
- /* @__PURE__ */ R("span", { className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground", children: [
719
+ /* @__PURE__ */ S("span", { className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground", children: [
711
720
  ne(t),
712
721
  " / ",
713
722
  ne(a)
714
723
  ] }),
715
- /* @__PURE__ */ l(
724
+ /* @__PURE__ */ c(
716
725
  Tt,
717
726
  {
718
727
  volume: n,
@@ -722,32 +731,32 @@ function At({
722
731
  silent: h
723
732
  }
724
733
  ),
725
- /* @__PURE__ */ l(
734
+ /* @__PURE__ */ c(
726
735
  Et,
727
736
  {
728
- value: i,
737
+ value: s,
729
738
  onChange: K,
730
739
  containerRef: m
731
740
  }
732
741
  ),
733
- N && // Filled glyph when captions are on, line glyph when off; `aria-pressed`
742
+ I && // Filled glyph when captions are on, line glyph when off; `aria-pressed`
734
743
  // conveys the state to assistive tech (the label stays stable).
735
- /* @__PURE__ */ l(
744
+ /* @__PURE__ */ c(
736
745
  $,
737
746
  {
738
747
  variant: "ghost",
739
748
  size: "sm",
740
749
  hideLabel: !0,
741
- icon: y ? Me : fe,
750
+ icon: y ? Ae : fe,
742
751
  label: p("videoPlayer.captions"),
743
752
  "aria-pressed": y,
744
- onClick: F
753
+ onClick: _
745
754
  }
746
755
  ),
747
756
  z && // Filled "AD" badge when on, line badge when off — the same on/off
748
757
  // language as captions, legible over video. `hideLabel` gives the
749
758
  // captions-style tooltip from the label; `aria-pressed` conveys state.
750
- /* @__PURE__ */ l(
759
+ /* @__PURE__ */ c(
751
760
  $,
752
761
  {
753
762
  variant: "ghost",
@@ -759,26 +768,26 @@ function At({
759
768
  onClick: U
760
769
  }
761
770
  ),
762
- V && /* @__PURE__ */ l(
763
- Pt,
771
+ V && /* @__PURE__ */ c(
772
+ St,
764
773
  {
765
774
  containerRef: m,
766
775
  audioLanguages: E,
767
776
  audioLanguage: A,
768
777
  onAudioLanguageChange: k,
769
- captionLanguages: L,
770
- captionLanguage: T,
778
+ captionLanguages: w,
779
+ captionLanguage: O,
771
780
  captionsOn: y,
772
781
  onCaptionLanguageChange: v,
773
- onCaptionsOff: S,
774
- audioDescriptionLanguages: I,
782
+ onCaptionsOff: P,
783
+ audioDescriptionLanguages: M,
775
784
  audioDescriptionLanguage: C,
776
785
  audioDescriptionOn: f,
777
- onAudioDescriptionLanguageChange: s,
778
- onAudioDescriptionOff: P
786
+ onAudioDescriptionLanguageChange: i,
787
+ onAudioDescriptionOff: D
779
788
  }
780
789
  ),
781
- X && /* @__PURE__ */ l(
790
+ X && /* @__PURE__ */ c(
782
791
  $,
783
792
  {
784
793
  variant: "ghost",
@@ -789,7 +798,7 @@ function At({
789
798
  onClick: X.onClick
790
799
  }
791
800
  ),
792
- /* @__PURE__ */ l(
801
+ /* @__PURE__ */ c(
793
802
  $,
794
803
  {
795
804
  variant: "ghost",
@@ -807,7 +816,7 @@ function At({
807
816
  const ke = (e) => e.trimStart().startsWith("WEBVTT");
808
817
  function Ie(e) {
809
818
  const t = e !== void 0 && ke(e), [a, n] = x();
810
- return _(() => {
819
+ return N(() => {
811
820
  if (e === void 0 || !ke(e)) {
812
821
  n(void 0);
813
822
  return;
@@ -821,47 +830,47 @@ function Ie(e) {
821
830
  }
822
831
  const xe = "descriptions";
823
832
  function It(e, { enabled: t, describedSrc: a, descriptions: n }) {
824
- const o = a !== void 0, { trackSrc: i, needsCrossOrigin: r } = Ie(n), [u, d] = x(!1), m = o || n !== void 0 || u, [g, y] = x(), c = O(!1);
825
- return _(() => {
826
- if (!e) return;
833
+ const o = a !== void 0, { trackSrc: s, needsCrossOrigin: r } = Ie(n), [u, d] = x(!1), m = o || n !== void 0 || u, [g, y] = x(), l = F(!1);
834
+ return N(() => {
835
+ if (!e)
836
+ return;
827
837
  const f = e.textTracks, h = typeof window < "u" && "speechSynthesis" in window, b = t && !o && h, E = () => {
828
- c.current && (c.current = !1, e.play().catch(() => {
838
+ l.current && (l.current = !1, e.play().catch(() => {
829
839
  }));
830
840
  }, A = (C) => {
831
841
  window.speechSynthesis.cancel();
832
- const s = new SpeechSynthesisUtterance(C);
833
- s.onend = E, s.onerror = E, window.speechSynthesis.speak(s);
834
- }, k = /* @__PURE__ */ new WeakSet(), L = [], T = (C) => {
835
- if (C.kind !== xe || (C.mode = "hidden", k.has(C)) || typeof C.addEventListener != "function") return;
842
+ const i = new SpeechSynthesisUtterance(C);
843
+ i.onend = E, i.onerror = E, window.speechSynthesis.speak(i);
844
+ }, k = /* @__PURE__ */ new WeakSet(), w = [], O = (C) => {
845
+ if (C.kind !== xe || (C.mode = "hidden", k.has(C)) || typeof C.addEventListener != "function")
846
+ return;
836
847
  k.add(C);
837
- const s = () => {
838
- const D = C.activeCues?.[0]?.text || void 0;
839
- y(D), b && D && (e.paused || (e.pause(), c.current = !0), A(D));
848
+ const i = () => {
849
+ const R = C.activeCues?.[0]?.text || void 0;
850
+ y(R), b && R && (e.paused || (e.pause(), l.current = !0), A(R));
840
851
  };
841
- C.addEventListener("cuechange", s), L.push(() => C.removeEventListener("cuechange", s));
852
+ C.addEventListener("cuechange", i), w.push(() => C.removeEventListener("cuechange", i));
842
853
  }, v = () => {
843
854
  let C = !1;
844
- for (let s = 0; s < f.length; s++) {
845
- const P = f[s];
846
- P.kind === xe && (n === void 0 && (C = !0), T(P));
847
- }
855
+ for (const i of Array.from(f))
856
+ i.kind === xe && (n === void 0 && (C = !0), O(i));
848
857
  d(C);
849
858
  };
850
859
  v();
851
- const S = typeof f.addEventListener == "function", I = () => v();
852
- return S && (f.addEventListener("addtrack", I), f.addEventListener("removetrack", I)), () => {
853
- S && (f.removeEventListener("addtrack", I), f.removeEventListener("removetrack", I)), L.forEach((C) => C()), h && window.speechSynthesis.cancel(), E();
860
+ const P = typeof f.addEventListener == "function", M = () => v();
861
+ return P && (f.addEventListener("addtrack", M), f.addEventListener("removetrack", M)), () => {
862
+ P && (f.removeEventListener("addtrack", M), f.removeEventListener("removetrack", M)), w.forEach((C) => C()), h && window.speechSynthesis.cancel(), E();
854
863
  };
855
- }, [e, t, o, n, i]), J(
856
- () => ({ trackSrc: i, needsCrossOrigin: r, available: m, activeCue: g }),
857
- [i, r, m, g]
864
+ }, [e, t, o, n, s]), J(
865
+ () => ({ trackSrc: s, needsCrossOrigin: r, available: m, activeCue: g }),
866
+ [s, r, m, g]
858
867
  );
859
868
  }
860
869
  function Nt({
861
870
  targetRef: e
862
871
  }) {
863
872
  const [t, a] = x(!1);
864
- _(() => {
873
+ N(() => {
865
874
  const o = () => {
866
875
  a(document.fullscreenElement === e.current);
867
876
  };
@@ -869,7 +878,7 @@ function Nt({
869
878
  document.removeEventListener("fullscreenchange", o);
870
879
  };
871
880
  }, [e]);
872
- const n = M(async () => {
881
+ const n = T(async () => {
873
882
  const o = e.current;
874
883
  if (o)
875
884
  try {
@@ -885,9 +894,9 @@ function _t({
885
894
  togglePlay: a,
886
895
  toggleMute: n,
887
896
  toggleFullscreen: o,
888
- setVolume: i
897
+ setVolume: s
889
898
  }) {
890
- return M(
899
+ return T(
891
900
  (r) => {
892
901
  const u = r.target;
893
902
  if (u instanceof HTMLElement && (u.closest(
@@ -895,7 +904,8 @@ function _t({
895
904
  ) || u.closest('[role="menu"], [role^="menuitem"]') || u.getAttribute("role") === "slider"))
896
905
  return;
897
906
  const d = e.current;
898
- if (!d) return;
907
+ if (!d)
908
+ return;
899
909
  switch (r.key.length === 1 ? r.key.toLowerCase() : r.key) {
900
910
  case " ":
901
911
  r.preventDefault(), a();
@@ -910,10 +920,10 @@ function _t({
910
920
  return;
911
921
  }
912
922
  case "ArrowUp":
913
- r.preventDefault(), i(Math.min(1, d.volume + te));
923
+ r.preventDefault(), s(Math.min(1, d.volume + te));
914
924
  return;
915
925
  case "ArrowDown":
916
- r.preventDefault(), i(Math.max(0, d.volume - te));
926
+ r.preventDefault(), s(Math.max(0, d.volume - te));
917
927
  return;
918
928
  case "m":
919
929
  r.preventDefault(), n();
@@ -925,7 +935,7 @@ function _t({
925
935
  return;
926
936
  }
927
937
  },
928
- [e, t, a, n, o, i]
938
+ [e, t, a, n, o, s]
929
939
  );
930
940
  }
931
941
  function Ft({
@@ -933,15 +943,16 @@ function Ft({
933
943
  enabled: t,
934
944
  resetKey: a
935
945
  }) {
936
- const n = O(0), o = O(0), i = O(t);
937
- i.current = t;
946
+ const n = F(0), o = F(0), s = F(t);
947
+ s.current = t;
938
948
  const [r, u] = x(0);
939
- _(() => {
949
+ N(() => {
940
950
  n.current = 0, o.current = 0, u(0);
941
- }, [a]), _(() => {
942
- if (!e) return;
951
+ }, [a]), N(() => {
952
+ if (!e)
953
+ return;
943
954
  const m = () => {
944
- i.current && e.currentTime > n.current + le && (e.currentTime = n.current);
955
+ s.current && e.currentTime > n.current + le && (e.currentTime = n.current);
945
956
  }, g = () => {
946
957
  u((h) => {
947
958
  const b = n.current;
@@ -949,17 +960,17 @@ function Ft({
949
960
  });
950
961
  }, y = () => {
951
962
  u((h) => Math.max(h, n.current));
952
- }, c = () => {
963
+ }, l = () => {
953
964
  const h = e.currentTime - o.current;
954
965
  h >= 0 && h < vt && e.currentTime > n.current && (n.current = e.currentTime, g()), m(), o.current = e.currentTime;
955
966
  }, f = () => {
956
967
  m(), y();
957
968
  };
958
- return e.addEventListener("timeupdate", c), e.addEventListener("seeking", f), e.addEventListener("seeked", f), e.addEventListener("pause", y), e.addEventListener("ended", y), () => {
959
- e.removeEventListener("timeupdate", c), e.removeEventListener("seeking", f), e.removeEventListener("seeked", f), e.removeEventListener("pause", y), e.removeEventListener("ended", y);
969
+ return e.addEventListener("timeupdate", l), e.addEventListener("seeking", f), e.addEventListener("seeked", f), e.addEventListener("pause", y), e.addEventListener("ended", y), () => {
970
+ e.removeEventListener("timeupdate", l), e.removeEventListener("seeking", f), e.removeEventListener("seeked", f), e.removeEventListener("pause", y), e.removeEventListener("ended", y);
960
971
  };
961
972
  }, [e]);
962
- const d = M((m) => i.current ? Math.min(m, n.current) : m, []);
973
+ const d = T((m) => s.current ? Math.min(m, n.current) : m, []);
963
974
  return { maxWatchedTime: r, clampSeek: d };
964
975
  }
965
976
  const Ee = /* @__PURE__ */ new Set([
@@ -967,45 +978,44 @@ const Ee = /* @__PURE__ */ new Set([
967
978
  "subtitles"
968
979
  ]), Ot = 2, Vt = 3;
969
980
  function Ut(e, t) {
970
- const { trackSrc: a, needsCrossOrigin: n } = Ie(t), [o, i] = x(!1), [r, u] = x(!1), [d, m] = x(!1), y = r || t !== void 0 && !d;
971
- return _(() => {
981
+ const { trackSrc: a, needsCrossOrigin: n } = Ie(t), [o, s] = x(!1), [r, u] = x(!1), [d, m] = x(!1), y = r || t !== void 0 && !d;
982
+ return N(() => {
972
983
  m(!1), u(!1);
973
- }, [a]), _(() => {
974
- if (!e) return;
975
- const c = e.textTracks, f = e.querySelector(
984
+ }, [a]), N(() => {
985
+ if (!e)
986
+ return;
987
+ const l = e.textTracks, f = e.querySelector(
976
988
  'track[kind="captions"]'
977
989
  ), h = () => {
978
990
  let k = !1;
979
- for (let L = 0; L < c.length; L++) {
980
- const T = c[L];
981
- Ee.has(T.kind) && (T.mode = o ? "showing" : "hidden", T.cues && T.cues.length > 0 && (k = !0));
982
- }
991
+ for (const w of Array.from(l))
992
+ Ee.has(w.kind) && (w.mode = o ? "showing" : "hidden", w.cues && w.cues.length > 0 && (k = !0));
983
993
  if (u(k), f) {
984
994
  if (f.readyState === Vt)
985
995
  m(!0);
986
996
  else if (f.readyState === Ot) {
987
- const L = f.track?.cues;
988
- m(!L || L.length === 0);
997
+ const w = f.track?.cues;
998
+ m(!w || w.length === 0);
989
999
  }
990
1000
  }
991
1001
  };
992
1002
  h();
993
1003
  const b = [];
994
1004
  if (f) {
995
- const k = () => h(), L = () => m(!0);
996
- f.addEventListener("load", k), f.addEventListener("error", L), b.push(() => {
997
- f.removeEventListener("load", k), f.removeEventListener("error", L);
1005
+ const k = () => h(), w = () => m(!0);
1006
+ f.addEventListener("load", k), f.addEventListener("error", w), b.push(() => {
1007
+ f.removeEventListener("load", k), f.removeEventListener("error", w);
998
1008
  });
999
1009
  }
1000
- for (let k = 0; k < c.length; k++) {
1001
- const L = c[k];
1002
- if (!Ee.has(L.kind) || typeof L.addEventListener != "function") continue;
1003
- const T = () => h();
1004
- L.addEventListener("cuechange", T), b.push(() => L.removeEventListener("cuechange", T));
1010
+ for (const k of Array.from(l)) {
1011
+ if (!Ee.has(k.kind) || typeof k.addEventListener != "function")
1012
+ continue;
1013
+ const w = () => h();
1014
+ k.addEventListener("cuechange", w), b.push(() => k.removeEventListener("cuechange", w));
1005
1015
  }
1006
- const E = typeof c.addEventListener == "function", A = () => h();
1007
- return E && (c.addEventListener("addtrack", A), c.addEventListener("removetrack", A)), e.addEventListener("loadedmetadata", h), () => {
1008
- b.forEach((k) => k()), E && (c.removeEventListener("addtrack", A), c.removeEventListener("removetrack", A)), e.removeEventListener("loadedmetadata", h);
1016
+ const E = typeof l.addEventListener == "function", A = () => h();
1017
+ return E && (l.addEventListener("addtrack", A), l.addEventListener("removetrack", A)), e.addEventListener("loadedmetadata", h), () => {
1018
+ b.forEach((k) => k()), E && (l.removeEventListener("addtrack", A), l.removeEventListener("removetrack", A)), e.removeEventListener("loadedmetadata", h);
1009
1019
  };
1010
1020
  }, [e, t, o, a]), J(
1011
1021
  () => ({
@@ -1013,7 +1023,7 @@ function Ut(e, t) {
1013
1023
  needsCrossOrigin: n,
1014
1024
  available: y,
1015
1025
  showing: o,
1016
- toggle: () => i((c) => !c)
1026
+ toggle: () => s((l) => !l)
1017
1027
  }),
1018
1028
  [a, n, y, o]
1019
1029
  );
@@ -1030,35 +1040,38 @@ function Kt({
1030
1040
  onComplete: t,
1031
1041
  resetKey: a
1032
1042
  }) {
1033
- const n = O(t);
1043
+ const n = F(t);
1034
1044
  n.current = t;
1035
- const o = O(!1), i = !!t;
1036
- _(() => {
1045
+ const o = F(!1), s = !!t;
1046
+ N(() => {
1037
1047
  o.current = !1;
1038
- }, [a]), _(() => {
1039
- if (!e || !i) return;
1048
+ }, [a]), N(() => {
1049
+ if (!e || !s)
1050
+ return;
1040
1051
  const r = () => {
1041
1052
  o.current || !e.duration || e.currentTime >= $t(e.duration) && (o.current = !0, n.current?.(e));
1042
1053
  };
1043
1054
  return e.addEventListener("timeupdate", r), e.addEventListener("ended", r), () => {
1044
1055
  e.removeEventListener("timeupdate", r), e.removeEventListener("ended", r);
1045
1056
  };
1046
- }, [e, i]);
1057
+ }, [e, s]);
1047
1058
  }
1048
1059
  function zt({
1049
1060
  video: e,
1050
1061
  onMilestone: t,
1051
1062
  resetKey: a
1052
1063
  }) {
1053
- const n = O(t);
1064
+ const n = F(t);
1054
1065
  n.current = t;
1055
- const o = O(/* @__PURE__ */ new Set()), i = !!t;
1056
- _(() => {
1066
+ const o = F(/* @__PURE__ */ new Set()), s = !!t;
1067
+ N(() => {
1057
1068
  o.current.clear();
1058
- }, [a]), _(() => {
1059
- if (!e || !i) return;
1069
+ }, [a]), N(() => {
1070
+ if (!e || !s)
1071
+ return;
1060
1072
  const r = () => {
1061
- if (!e.duration) return;
1073
+ if (!e.duration)
1074
+ return;
1062
1075
  const u = Math.round(e.currentTime / e.duration * 100);
1063
1076
  for (const d of yt)
1064
1077
  o.current.has(d) || u >= d && (o.current.add(d), n.current?.(d, e));
@@ -1066,70 +1079,73 @@ function zt({
1066
1079
  return e.addEventListener("timeupdate", r), () => {
1067
1080
  e.removeEventListener("timeupdate", r);
1068
1081
  };
1069
- }, [e, i]);
1082
+ }, [e, s]);
1070
1083
  }
1071
1084
  function Bt(e) {
1072
- const t = O(null), [a, n] = x(
1085
+ const t = F(null), [a, n] = x(
1073
1086
  null
1074
- ), o = O(0), i = M((s) => {
1075
- t.current = s, n(s);
1076
- }, []), [r, u] = x(!1), [d, m] = x(!1), [g, y] = x(0), [c, f] = x(0), [h, b] = x(1), [E, A] = x(!1), [k, L] = x(
1087
+ ), o = F(0), s = T((i) => {
1088
+ t.current = i, n(i);
1089
+ }, []), [r, u] = x(!1), [d, m] = x(!1), [g, y] = x(0), [l, f] = x(0), [h, b] = x(1), [E, A] = x(!1), [k, w] = x(
1077
1090
  oe
1078
1091
  );
1079
- _(() => {
1080
- o.current = 0, t.current && (t.current.playbackRate = oe), u(!1), m(!1), y(0), f(0), L(oe);
1081
- }, [e]), _(() => {
1082
- const s = a;
1083
- if (!s) return;
1084
- const P = () => m(!0), D = () => m(!1), B = () => m(!1), j = () => {
1085
- b(s.volume), A(s.muted);
1086
- }, K = () => f(s.duration || 0), G = () => {
1087
- xt(s.playbackRate) && L(s.playbackRate);
1088
- }, F = () => {
1092
+ N(() => {
1093
+ o.current = 0, t.current && (t.current.playbackRate = oe), u(!1), m(!1), y(0), f(0), w(oe);
1094
+ }, [e]), N(() => {
1095
+ const i = a;
1096
+ if (!i)
1097
+ return;
1098
+ const D = () => m(!0), R = () => m(!1), B = () => m(!1), j = () => {
1099
+ b(i.volume), A(i.muted);
1100
+ }, K = () => f(i.duration || 0), G = () => {
1101
+ xt(i.playbackRate) && w(i.playbackRate);
1102
+ }, _ = () => {
1089
1103
  const U = performance.now();
1090
- U - o.current >= bt && (o.current = U, y(s.currentTime));
1104
+ U - o.current >= bt && (o.current = U, y(i.currentTime));
1091
1105
  };
1092
- return s.addEventListener("play", P), s.addEventListener("pause", D), s.addEventListener("ended", B), s.addEventListener("volumechange", j), s.addEventListener("loadedmetadata", K), s.addEventListener("ratechange", G), s.addEventListener("timeupdate", F), s.readyState >= 1 && s.duration && f(s.duration), () => {
1093
- s.removeEventListener("play", P), s.removeEventListener("pause", D), s.removeEventListener("ended", B), s.removeEventListener("volumechange", j), s.removeEventListener("loadedmetadata", K), s.removeEventListener("ratechange", G), s.removeEventListener("timeupdate", F);
1106
+ return i.addEventListener("play", D), i.addEventListener("pause", R), i.addEventListener("ended", B), i.addEventListener("volumechange", j), i.addEventListener("loadedmetadata", K), i.addEventListener("ratechange", G), i.addEventListener("timeupdate", _), i.readyState >= 1 && i.duration && f(i.duration), () => {
1107
+ i.removeEventListener("play", D), i.removeEventListener("pause", R), i.removeEventListener("ended", B), i.removeEventListener("volumechange", j), i.removeEventListener("loadedmetadata", K), i.removeEventListener("ratechange", G), i.removeEventListener("timeupdate", _);
1094
1108
  };
1095
1109
  }, [a]);
1096
- const T = M(() => {
1097
- const s = t.current;
1098
- s && (s.paused || s.ended ? s.play().catch(() => {
1099
- }) : s.pause());
1100
- }, []), v = M(() => {
1101
- const s = t.current;
1102
- s && (s.muted = !s.muted);
1103
- }, []), S = M((s) => {
1104
- const P = t.current;
1105
- if (!P) return;
1106
- const D = Math.max(0, Math.min(1, s));
1107
- P.volume = D, P.muted = D === 0;
1108
- }, []), I = M((s) => {
1109
- const P = t.current;
1110
- P && (P.playbackRate = s);
1111
- }, []), C = M((s) => {
1112
- const P = t.current;
1113
- if (!P) return;
1114
- const D = Math.max(0, Math.min(s, P.duration || s));
1115
- P.currentTime = D, y(D);
1110
+ const O = T(() => {
1111
+ const i = t.current;
1112
+ i && (i.paused || i.ended ? i.play().catch(() => {
1113
+ }) : i.pause());
1114
+ }, []), v = T(() => {
1115
+ const i = t.current;
1116
+ i && (i.muted = !i.muted);
1117
+ }, []), P = T((i) => {
1118
+ const D = t.current;
1119
+ if (!D)
1120
+ return;
1121
+ const R = Math.max(0, Math.min(1, i));
1122
+ D.volume = R, D.muted = R === 0;
1123
+ }, []), M = T((i) => {
1124
+ const D = t.current;
1125
+ D && (D.playbackRate = i);
1126
+ }, []), C = T((i) => {
1127
+ const D = t.current;
1128
+ if (!D)
1129
+ return;
1130
+ const R = Math.max(0, Math.min(i, D.duration || i));
1131
+ D.currentTime = R, y(R);
1116
1132
  }, []);
1117
1133
  return {
1118
1134
  videoRef: t,
1119
1135
  videoElement: a,
1120
- setVideoNode: i,
1136
+ setVideoNode: s,
1121
1137
  videoLoaded: r,
1122
1138
  isPlaying: d,
1123
1139
  currentTime: g,
1124
- duration: c,
1140
+ duration: l,
1125
1141
  volume: h,
1126
1142
  isMuted: E,
1127
1143
  playbackRate: k,
1128
1144
  setVideoLoaded: u,
1129
- togglePlay: T,
1145
+ togglePlay: O,
1130
1146
  toggleMute: v,
1131
- setVolume: S,
1132
- setPlaybackRate: I,
1147
+ setVolume: P,
1148
+ setPlaybackRate: M,
1133
1149
  seekTo: C
1134
1150
  };
1135
1151
  }
@@ -1137,23 +1153,24 @@ function Ht({
1137
1153
  video: e,
1138
1154
  onTrackAction: t
1139
1155
  }) {
1140
- const a = O(t);
1156
+ const a = F(t);
1141
1157
  a.current = t;
1142
1158
  const n = !!t;
1143
- _(() => {
1144
- if (!e || !n) return;
1159
+ N(() => {
1160
+ if (!e || !n)
1161
+ return;
1145
1162
  let o = null;
1146
- const i = () => {
1163
+ const s = () => {
1147
1164
  o && (clearInterval(o), o = null);
1148
1165
  }, r = () => {
1149
- a.current?.(), i(), o = setInterval(() => {
1166
+ a.current?.(), s(), o = setInterval(() => {
1150
1167
  a.current?.();
1151
1168
  }, Lt);
1152
1169
  }, u = () => {
1153
- a.current?.(), i();
1154
- }, d = () => i();
1170
+ a.current?.(), s();
1171
+ }, d = () => s();
1155
1172
  return e.addEventListener("play", r), e.addEventListener("pause", u), e.addEventListener("ended", d), () => {
1156
- i(), e.removeEventListener("play", r), e.removeEventListener("pause", u), e.removeEventListener("ended", d);
1173
+ s(), e.removeEventListener("play", r), e.removeEventListener("pause", u), e.removeEventListener("ended", d);
1157
1174
  };
1158
1175
  }, [e, n]);
1159
1176
  }
@@ -1163,76 +1180,77 @@ function Wt({
1163
1180
  ariaLabel: a,
1164
1181
  silent: n = !1,
1165
1182
  persistControls: o = !1,
1166
- content: i,
1183
+ content: s,
1167
1184
  defaultLanguage: r,
1168
1185
  autoPlay: u = !1,
1169
1186
  autoFocus: d = !1,
1170
1187
  download: m,
1171
1188
  restrictForwardSeek: g = !1,
1172
1189
  onTrackAction: y,
1173
- onMilestone: c,
1190
+ onMilestone: l,
1174
1191
  onComplete: f,
1175
1192
  ...h
1176
1193
  }) {
1177
- const { t: b } = W(), E = O(null), A = J(() => ae(e), [e]), [k, L] = x(
1194
+ const { t: b } = W(), E = F(null), A = J(() => ae(e), [e]), [k, w] = x(
1178
1195
  () => Z(A, r)
1179
- ), T = A.some((w) => w.locale === k) ? k : Z(A, r), v = ee(e, T) ?? "", S = J(
1180
- () => ae(i?.captions),
1181
- [i?.captions]
1182
- ), [I, C] = x(
1183
- () => Z(S, r)
1184
- ), s = S.some(
1185
- (w) => w.locale === I
1186
- ) ? I : Z(S, r), P = ee(i?.captions, s), D = J(
1187
- () => ae(i?.descriptions, i?.describedSrc),
1188
- [i?.descriptions, i?.describedSrc]
1196
+ ), O = A.some((L) => L.locale === k) ? k : Z(A, r), v = ee(e, O) ?? "", P = J(
1197
+ () => ae(s?.captions),
1198
+ [s?.captions]
1199
+ ), [M, C] = x(
1200
+ () => Z(P, r)
1201
+ ), i = P.some(
1202
+ (L) => L.locale === M
1203
+ ) ? M : Z(P, r), D = ee(s?.captions, i), R = J(
1204
+ () => ae(s?.descriptions, s?.describedSrc),
1205
+ [s?.descriptions, s?.describedSrc]
1189
1206
  ), [B, j] = x(
1190
- () => Z(D, r)
1191
- ), K = D.some(
1192
- (w) => w.locale === B
1193
- ) ? B : Z(D, r), G = ee(
1194
- i?.descriptions,
1207
+ () => Z(R, r)
1208
+ ), K = R.some(
1209
+ (L) => L.locale === B
1210
+ ) ? B : Z(R, r), G = ee(
1211
+ s?.descriptions,
1195
1212
  K
1196
- ), F = ee(
1197
- i?.describedSrc,
1213
+ ), _ = ee(
1214
+ s?.describedSrc,
1198
1215
  K
1199
- ), [U, Y] = x(!1), X = U && F ? F : v, p = Bt(X), N = Ut(p.videoElement, P), z = It(p.videoElement, {
1216
+ ), [U, Y] = x(!1), X = U && _ ? _ : v, p = Bt(X), I = Ut(p.videoElement, D), z = It(p.videoElement, {
1200
1217
  enabled: U,
1201
- describedSrc: F,
1218
+ describedSrc: _,
1202
1219
  descriptions: G
1203
- }), V = M(() => {
1204
- const w = p.videoRef.current;
1205
- if (!w) return;
1206
- const He = w.currentTime, We = !w.paused, be = () => {
1207
- w.currentTime = He, We && w.play().catch(() => {
1208
- }), w.removeEventListener("loadedmetadata", be);
1220
+ }), V = T(() => {
1221
+ const L = p.videoRef.current;
1222
+ if (!L)
1223
+ return;
1224
+ const He = L.currentTime, We = !L.paused, be = () => {
1225
+ L.currentTime = He, We && L.play().catch(() => {
1226
+ }), L.removeEventListener("loadedmetadata", be);
1209
1227
  };
1210
- w.addEventListener("loadedmetadata", be);
1211
- }, [p.videoRef]), Ne = M(
1212
- (w) => {
1213
- V(), L(w);
1228
+ L.addEventListener("loadedmetadata", be);
1229
+ }, [p.videoRef]), Ne = T(
1230
+ (L) => {
1231
+ V(), w(L);
1214
1232
  },
1215
1233
  [V]
1216
- ), _e = M(() => {
1217
- F && V(), Y((w) => !w);
1218
- }, [F, V]), Fe = M(
1219
- (w) => {
1220
- C(w), N.showing || N.toggle();
1234
+ ), _e = T(() => {
1235
+ _ && V(), Y((L) => !L);
1236
+ }, [_, V]), Fe = T(
1237
+ (L) => {
1238
+ C(L), I.showing || I.toggle();
1221
1239
  },
1222
- [N]
1223
- ), Oe = M(() => {
1224
- N.showing && N.toggle();
1225
- }, [N]), Ve = M(
1226
- (w) => {
1227
- F && V(), j(w), Y(!0);
1240
+ [I]
1241
+ ), Oe = T(() => {
1242
+ I.showing && I.toggle();
1243
+ }, [I]), Ve = T(
1244
+ (L) => {
1245
+ _ && V(), j(L), Y(!0);
1228
1246
  },
1229
- [F, V]
1230
- ), Ue = M(() => {
1231
- F && V(), Y(!1);
1232
- }, [F, V]);
1247
+ [_, V]
1248
+ ), Ue = T(() => {
1249
+ _ && V(), Y(!1);
1250
+ }, [_, V]);
1233
1251
  Ht({ video: p.videoElement, onTrackAction: y }), zt({
1234
1252
  video: p.videoElement,
1235
- onMilestone: c,
1253
+ onMilestone: l,
1236
1254
  resetKey: v
1237
1255
  }), Kt({
1238
1256
  video: p.videoElement,
@@ -1243,16 +1261,16 @@ function Wt({
1243
1261
  video: p.videoElement,
1244
1262
  enabled: g,
1245
1263
  resetKey: v
1246
- }), pe = M(
1247
- (w) => p.seekTo(me(w)),
1264
+ }), pe = T(
1265
+ (L) => p.seekTo(me(L)),
1248
1266
  [p, me]
1249
1267
  ), { isFullscreen: Ke, toggleFullscreen: he } = Nt({
1250
1268
  targetRef: E
1251
- }), ge = M(() => {
1252
- }, []), ve = !!(U && F);
1253
- _(() => {
1254
- const w = p.videoRef.current;
1255
- n && w && (w.muted = !ve);
1269
+ }), ge = T(() => {
1270
+ }, []), ve = !!(U && _);
1271
+ N(() => {
1272
+ const L = p.videoRef.current;
1273
+ n && L && (L.muted = !ve);
1256
1274
  }, [n, ve, p.videoElement, p.videoRef]);
1257
1275
  const ze = _t({
1258
1276
  videoRef: p.videoRef,
@@ -1262,11 +1280,11 @@ function Wt({
1262
1280
  toggleFullscreen: he,
1263
1281
  setVolume: n ? ge : p.setVolume
1264
1282
  });
1265
- _(() => {
1283
+ N(() => {
1266
1284
  d && E.current?.focus({ preventScroll: !0 });
1267
1285
  }, [d]);
1268
- const Be = (w) => w.preventDefault();
1269
- return /* @__PURE__ */ R(
1286
+ const Be = (L) => L.preventDefault();
1287
+ return /* @__PURE__ */ S(
1270
1288
  "div",
1271
1289
  {
1272
1290
  ref: E,
@@ -1279,10 +1297,10 @@ function Wt({
1279
1297
  "aria-label": a ?? b("videoPlayer.regionLabel"),
1280
1298
  tabIndex: 0,
1281
1299
  onKeyDown: ze,
1282
- "data-video-captions": n ? "no-audio" : N.available ? "available" : "missing",
1300
+ "data-video-captions": n ? "no-audio" : I.available ? "available" : "missing",
1283
1301
  ...h,
1284
1302
  children: [
1285
- /* @__PURE__ */ R(
1303
+ /* @__PURE__ */ S(
1286
1304
  "video",
1287
1305
  {
1288
1306
  ref: p.setVideoNode,
@@ -1295,7 +1313,7 @@ function Wt({
1295
1313
  onClick: p.togglePlay,
1296
1314
  src: X,
1297
1315
  poster: t,
1298
- crossOrigin: N.needsCrossOrigin || z.needsCrossOrigin ? "anonymous" : void 0,
1316
+ crossOrigin: I.needsCrossOrigin || z.needsCrossOrigin ? "anonymous" : void 0,
1299
1317
  onLoadedData: () => p.setVideoLoaded(!0),
1300
1318
  className: H(
1301
1319
  "block h-full w-full cursor-pointer rounded-[inherit] object-contain transition-opacity duration-300",
@@ -1306,16 +1324,16 @@ function Wt({
1306
1324
  ),
1307
1325
  style: { opacity: p.videoLoaded || t ? 1 : 0 },
1308
1326
  children: [
1309
- N.trackSrc && /* @__PURE__ */ l(
1327
+ I.trackSrc && /* @__PURE__ */ c(
1310
1328
  "track",
1311
1329
  {
1312
1330
  kind: "captions",
1313
- src: N.trackSrc,
1331
+ src: I.trackSrc,
1314
1332
  label: b("videoPlayer.captions"),
1315
1333
  default: !1
1316
1334
  }
1317
1335
  ),
1318
- z.trackSrc && /* @__PURE__ */ l(
1336
+ z.trackSrc && /* @__PURE__ */ c(
1319
1337
  "track",
1320
1338
  {
1321
1339
  kind: "descriptions",
@@ -1327,31 +1345,31 @@ function Wt({
1327
1345
  ]
1328
1346
  }
1329
1347
  ),
1330
- !p.isPlaying && /* @__PURE__ */ l(
1348
+ !p.isPlaying && /* @__PURE__ */ c(
1331
1349
  "div",
1332
1350
  {
1333
1351
  "aria-hidden": !0,
1334
1352
  "data-video-play-overlay": !0,
1335
1353
  className: "pointer-events-none absolute inset-0 z-[1] flex items-center justify-center",
1336
- children: /* @__PURE__ */ l(
1354
+ children: /* @__PURE__ */ c(
1337
1355
  "button",
1338
1356
  {
1339
1357
  type: "button",
1340
1358
  tabIndex: -1,
1341
1359
  onClick: p.togglePlay,
1342
1360
  className: "pointer-events-auto flex size-14 items-center justify-center rounded-full bg-f1-foreground/70 pl-0.5 shadow-[0_2px_8px_rgba(0,0,0,0.45)] transition-transform duration-150 hover:scale-105 motion-reduce:transition-none dark:bg-f1-background/70 [&_svg]:size-7",
1343
- children: /* @__PURE__ */ l(dt, { icon: Ce, size: "lg", color: "#fff" })
1361
+ children: /* @__PURE__ */ c(dt, { icon: Ce, size: "lg", color: "#fff" })
1344
1362
  }
1345
1363
  )
1346
1364
  }
1347
1365
  ),
1348
- N.showing && z.activeCue && /* @__PURE__ */ l(
1366
+ I.showing && z.activeCue && /* @__PURE__ */ c(
1349
1367
  "div",
1350
1368
  {
1351
1369
  "aria-hidden": !0,
1352
1370
  className: "dark pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-center p-3",
1353
- children: /* @__PURE__ */ R("p", { className: "max-w-[90%] rounded-md bg-f1-background/70 px-2 py-1 text-center text-base italic text-f1-foreground [text-shadow:0_1px_2px_rgba(0,0,0,0.55)]", children: [
1354
- /* @__PURE__ */ R("span", { className: "pr-1 font-medium not-italic opacity-70", children: [
1371
+ children: /* @__PURE__ */ S("p", { className: "max-w-[90%] rounded-md bg-f1-background/70 px-2 py-1 text-center text-base italic text-f1-foreground [text-shadow:0_1px_2px_rgba(0,0,0,0.55)]", children: [
1372
+ /* @__PURE__ */ S("span", { className: "pr-1 font-medium not-italic opacity-70", children: [
1355
1373
  "[",
1356
1374
  b("videoPlayer.audioDescription"),
1357
1375
  "]"
@@ -1360,9 +1378,9 @@ function Wt({
1360
1378
  ] })
1361
1379
  }
1362
1380
  ),
1363
- /* @__PURE__ */ l("span", { className: "sr-only", "aria-live": "polite", children: p.isPlaying ? b("videoPlayer.playing") : b("videoPlayer.paused") }),
1364
- p.videoLoaded && /* @__PURE__ */ l(
1365
- At,
1381
+ /* @__PURE__ */ c("span", { className: "sr-only", "aria-live": "polite", children: p.isPlaying ? b("videoPlayer.playing") : b("videoPlayer.paused") }),
1382
+ p.videoLoaded && /* @__PURE__ */ c(
1383
+ Mt,
1366
1384
  {
1367
1385
  isPlaying: p.isPlaying,
1368
1386
  currentTime: p.currentTime,
@@ -1374,20 +1392,20 @@ function Wt({
1374
1392
  markerTime: g ? $e : void 0,
1375
1393
  blockSeekPastMarker: g,
1376
1394
  containerRef: E,
1377
- captionsAvailable: N.available,
1378
- captionsOn: N.showing,
1395
+ captionsAvailable: I.available,
1396
+ captionsOn: I.showing,
1379
1397
  audioDescriptionAvailable: z.available,
1380
1398
  audioDescriptionOn: U,
1381
1399
  silent: n,
1382
1400
  persist: o,
1383
1401
  audioLanguages: A,
1384
- audioLanguage: T,
1402
+ audioLanguage: O,
1385
1403
  onAudioLanguageChange: Ne,
1386
- captionLanguages: S,
1387
- captionLanguage: s,
1404
+ captionLanguages: P,
1405
+ captionLanguage: i,
1388
1406
  onCaptionLanguageChange: Fe,
1389
1407
  onCaptionsOff: Oe,
1390
- audioDescriptionLanguages: D,
1408
+ audioDescriptionLanguages: R,
1391
1409
  audioDescriptionLanguage: K,
1392
1410
  onAudioDescriptionLanguageChange: Ve,
1393
1411
  onAudioDescriptionOff: Ue,
@@ -1398,7 +1416,7 @@ function Wt({
1398
1416
  onToggleFullscreen: () => {
1399
1417
  he();
1400
1418
  },
1401
- onToggleCaptions: N.toggle,
1419
+ onToggleCaptions: I.toggle,
1402
1420
  onToggleAudioDescription: _e,
1403
1421
  onSeek: pe,
1404
1422
  download: m