@factorialco/f0-react 6.88.2 → 6.88.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
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";
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 ut, w as dt, r as ft } from "./F0CanvasPanel-CHIKqAx1.js";
2
2
  import { jsxs as S, jsx as c } from "react/jsx-runtime";
3
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
- import { d as H, f as de } from "./tooltip-CMBdJvJA.js";
4
+ import { d as H, f as ue } 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) {
7
7
  return Array.isArray(e) && e.every(
@@ -37,7 +37,7 @@ function Le(e, t) {
37
37
  function Z(e, t) {
38
38
  if (e.length === 0)
39
39
  return;
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));
40
+ const a = e.map((r) => r.locale), n = (r) => r.split("-")[0], o = (r) => a.find((d) => d === r) ?? a.find((d) => n(d) === n(r));
41
41
  if (t) {
42
42
  const r = o(t);
43
43
  if (r)
@@ -72,7 +72,7 @@ const De = {
72
72
  fontWeight: 700,
73
73
  fontFamily: "inherit",
74
74
  letterSpacing: -0.4
75
- }, ue = re(({ animate: e, ...t }, a) => /* @__PURE__ */ S(
75
+ }, de = re(({ animate: e, ...t }, a) => /* @__PURE__ */ S(
76
76
  "svg",
77
77
  {
78
78
  xmlns: "http://www.w3.org/2000/svg",
@@ -98,7 +98,7 @@ const De = {
98
98
  ]
99
99
  }
100
100
  ));
101
- ue.displayName = "AudioDescriptionLineIcon";
101
+ de.displayName = "AudioDescriptionLineIcon";
102
102
  const Te = re(({ animate: e, ...t }, a) => {
103
103
  const n = `ad-mask-${mt().replace(/:/g, "")}`;
104
104
  return /* @__PURE__ */ S(
@@ -205,33 +205,33 @@ function Et({
205
205
  onChange: t,
206
206
  containerRef: a
207
207
  }) {
208
- const { t: n } = W(), [o, s] = x(!1), r = (u) => {
209
- const d = Array.from(
210
- u.currentTarget.querySelectorAll(
208
+ const { t: n } = W(), [o, s] = x(!1), r = (d) => {
209
+ const u = Array.from(
210
+ d.currentTarget.querySelectorAll(
211
211
  '[role="menuitemradio"]'
212
212
  )
213
213
  );
214
- if (d.length === 0)
214
+ if (u.length === 0)
215
215
  return;
216
- const m = d.indexOf(document.activeElement);
216
+ const m = u.indexOf(document.activeElement);
217
217
  let g;
218
- switch (u.key) {
218
+ switch (d.key) {
219
219
  case "ArrowDown":
220
- g = m < 0 ? 0 : (m + 1) % d.length;
220
+ g = m < 0 ? 0 : (m + 1) % u.length;
221
221
  break;
222
222
  case "ArrowUp":
223
- g = m <= 0 ? d.length - 1 : m - 1;
223
+ g = m <= 0 ? u.length - 1 : m - 1;
224
224
  break;
225
225
  case "Home":
226
226
  g = 0;
227
227
  break;
228
228
  case "End":
229
- g = d.length - 1;
229
+ g = u.length - 1;
230
230
  break;
231
231
  default:
232
232
  return;
233
233
  }
234
- u.preventDefault(), d[g]?.focus();
234
+ d.preventDefault(), u[g]?.focus();
235
235
  };
236
236
  return /* @__PURE__ */ S(je, { open: o, onOpenChange: s, children: [
237
237
  /* @__PURE__ */ c(Ge, { asChild: !0, children: /* @__PURE__ */ c(
@@ -259,14 +259,14 @@ function Et({
259
259
  role: "menu",
260
260
  "aria-label": n("videoPlayer.playbackSpeedLabel"),
261
261
  onKeyDown: r,
262
- children: Re.map((u) => {
263
- const d = u === e;
262
+ children: Re.map((d) => {
263
+ const u = d === e;
264
264
  return /* @__PURE__ */ S(
265
265
  "button",
266
266
  {
267
267
  type: "button",
268
268
  role: "menuitemradio",
269
- "aria-checked": d,
269
+ "aria-checked": u,
270
270
  className: H(
271
271
  "relative flex items-center rounded-xs py-1.5 pl-8 pr-3",
272
272
  "cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums",
@@ -275,14 +275,14 @@ function Et({
275
275
  "[&_svg]:h-3.5 [&_svg]:w-3.5"
276
276
  ),
277
277
  onClick: () => {
278
- t(u), s(!1);
278
+ t(d), s(!1);
279
279
  },
280
280
  children: [
281
- d && /* @__PURE__ */ c("span", { className: "absolute left-2.5 inline-flex items-center", children: /* @__PURE__ */ c(Ze, {}) }),
282
- se(u)
281
+ u ? /* @__PURE__ */ c("span", { className: "absolute left-2.5 inline-flex items-center", children: /* @__PURE__ */ c(Ze, {}) }) : null,
282
+ se(d)
283
283
  ]
284
284
  },
285
- u
285
+ d
286
286
  );
287
287
  })
288
288
  }
@@ -296,7 +296,7 @@ function Ct({
296
296
  blockSeekPastMarker: n = !1,
297
297
  onSeek: o
298
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) => {
299
+ const { t: s } = W(), r = F(null), [d, u] = 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
300
  const P = r.current;
301
301
  if (!P)
302
302
  return 0;
@@ -305,11 +305,11 @@ function Ct({
305
305
  }, b = (v) => {
306
306
  t && o(h(v) * t);
307
307
  }, E = (v) => {
308
- t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId), d(!0), b(v.clientX));
308
+ t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId), u(!0), b(v.clientX));
309
309
  }, A = (v) => {
310
- t && (g(h(v.clientX)), u && b(v.clientX));
310
+ t && (g(h(v.clientX)), d && b(v.clientX));
311
311
  }, k = (v) => {
312
- u && (d(!1), v.currentTarget.hasPointerCapture(v.pointerId) && v.currentTarget.releasePointerCapture(v.pointerId));
312
+ d && (u(!1), v.currentTarget.hasPointerCapture(v.pointerId) && v.currentTarget.releasePointerCapture(v.pointerId));
313
313
  }, w = m !== null && n && a !== void 0 && m > l, O = (v) => {
314
314
  if (!t)
315
315
  return;
@@ -339,7 +339,7 @@ function Ct({
339
339
  className: H(
340
340
  "relative flex h-4 flex-1 items-center rounded-sm",
341
341
  "cursor-pointer touch-none",
342
- de()
342
+ ue()
343
343
  ),
344
344
  role: "slider",
345
345
  tabIndex: 0,
@@ -355,7 +355,7 @@ function Ct({
355
355
  onPointerMove: A,
356
356
  onPointerUp: k,
357
357
  onPointerCancel: k,
358
- onLostPointerCapture: () => d(!1),
358
+ onLostPointerCapture: () => u(!1),
359
359
  onPointerLeave: () => g(null),
360
360
  onKeyDown: O,
361
361
  children: [
@@ -367,14 +367,14 @@ function Ct({
367
367
  style: { width: `${y * 100}%` }
368
368
  }
369
369
  ),
370
- f && /* @__PURE__ */ c(
370
+ f ? /* @__PURE__ */ c(
371
371
  "div",
372
372
  {
373
373
  className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
374
374
  style: { left: `${l * 100}%` },
375
375
  "aria-hidden": "true"
376
376
  }
377
- ),
377
+ ) : null,
378
378
  /* @__PURE__ */ c(
379
379
  "div",
380
380
  {
@@ -382,7 +382,7 @@ function Ct({
382
382
  style: { left: `${y * 100}%` }
383
383
  }
384
384
  ),
385
- w && /* @__PURE__ */ c("div", { className: "absolute inset-0 cursor-not-allowed" })
385
+ w ? /* @__PURE__ */ c("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
386
386
  ]
387
387
  }
388
388
  );
@@ -396,10 +396,10 @@ function ce({
396
396
  value: o,
397
397
  onLanguageChange: s,
398
398
  on: r,
399
- onOff: u,
400
- offLabel: d
399
+ onOff: d,
400
+ offLabel: u
401
401
  }) {
402
- const m = u !== void 0, g = n.find((l) => l.locale === o), y = m && !r ? d : g ? Le(g) : d;
402
+ const m = d !== void 0, g = n.find((l) => l.locale === o), y = m && !r ? u : g ? Le(g) : u;
403
403
  return /* @__PURE__ */ S(et, { children: [
404
404
  /* @__PURE__ */ S(tt, { className: Pt, children: [
405
405
  /* @__PURE__ */ c(nt, { icon: e }),
@@ -410,7 +410,7 @@ function ce({
410
410
  ot,
411
411
  {
412
412
  value: m ? r ? o : ie : o,
413
- onValueChange: (l) => m && l === ie ? u() : s(l),
413
+ onValueChange: (l) => m && l === ie ? d() : s(l),
414
414
  children: [
415
415
  n.map((l) => /* @__PURE__ */ c(
416
416
  ye,
@@ -421,7 +421,7 @@ function ce({
421
421
  },
422
422
  l.locale
423
423
  )),
424
- m && /* @__PURE__ */ c(ye, { value: ie, className: we, children: d })
424
+ m ? /* @__PURE__ */ c(ye, { value: ie, className: we, children: u }) : null
425
425
  ]
426
426
  }
427
427
  ) }) })
@@ -435,8 +435,8 @@ function St({
435
435
  captionLanguages: o,
436
436
  captionLanguage: s,
437
437
  captionsOn: r,
438
- onCaptionLanguageChange: u,
439
- onCaptionsOff: d,
438
+ onCaptionLanguageChange: d,
439
+ onCaptionsOff: u,
440
440
  audioDescriptionLanguages: m,
441
441
  audioDescriptionLanguage: g,
442
442
  audioDescriptionOn: y,
@@ -463,7 +463,7 @@ function St({
463
463
  align: "end",
464
464
  className: Me,
465
465
  children: [
466
- t.length > 1 && /* @__PURE__ */ c(
466
+ t.length > 1 ? /* @__PURE__ */ c(
467
467
  ce,
468
468
  {
469
469
  icon: Qe,
@@ -474,8 +474,8 @@ function St({
474
474
  onLanguageChange: n,
475
475
  offLabel: E
476
476
  }
477
- ),
478
- o.length > 1 && /* @__PURE__ */ c(
477
+ ) : null,
478
+ o.length > 1 ? /* @__PURE__ */ c(
479
479
  ce,
480
480
  {
481
481
  icon: fe,
@@ -484,15 +484,15 @@ function St({
484
484
  options: o,
485
485
  value: s,
486
486
  on: r,
487
- onLanguageChange: u,
488
- onOff: d,
487
+ onLanguageChange: d,
488
+ onOff: u,
489
489
  offLabel: E
490
490
  }
491
- ),
492
- m.length > 1 && /* @__PURE__ */ c(
491
+ ) : null,
492
+ m.length > 1 ? /* @__PURE__ */ c(
493
493
  ce,
494
494
  {
495
- icon: ue,
495
+ icon: de,
496
496
  label: h("videoPlayer.audioDescription"),
497
497
  container: b,
498
498
  options: m,
@@ -502,7 +502,7 @@ function St({
502
502
  onOff: f,
503
503
  offLabel: E
504
504
  }
505
- )
505
+ ) : null
506
506
  ]
507
507
  }
508
508
  )
@@ -548,7 +548,7 @@ function Tt({
548
548
  ] });
549
549
  }
550
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) => {
551
+ const { t: a } = W(), n = F(null), [o, s] = x(!1), r = Math.max(0, Math.min(1, e)), d = (l) => {
552
552
  const f = n.current;
553
553
  if (!f)
554
554
  return 0;
@@ -557,10 +557,10 @@ function At({ value: e, onChange: t }) {
557
557
  0,
558
558
  Math.min(1, (l - h.left - q / 2) / b)
559
559
  );
560
- }, d = (l) => {
561
- l.preventDefault(), l.currentTarget.setPointerCapture(l.pointerId), s(!0), t(u(l.clientX));
560
+ }, u = (l) => {
561
+ l.preventDefault(), l.currentTarget.setPointerCapture(l.pointerId), s(!0), t(d(l.clientX));
562
562
  }, m = (l) => {
563
- o && t(u(l.clientX));
563
+ o && t(d(l.clientX));
564
564
  }, g = (l) => {
565
565
  o && (s(!1), l.currentTarget.hasPointerCapture(l.pointerId) && l.currentTarget.releasePointerCapture(l.pointerId));
566
566
  }, y = (l) => {
@@ -592,7 +592,7 @@ function At({ value: e, onChange: t }) {
592
592
  className: H(
593
593
  "relative flex h-4 w-[60px] items-center rounded-sm",
594
594
  "cursor-pointer touch-none",
595
- de()
595
+ ue()
596
596
  ),
597
597
  role: "slider",
598
598
  tabIndex: 0,
@@ -601,7 +601,7 @@ function At({ value: e, onChange: t }) {
601
601
  "aria-valuemax": 1,
602
602
  "aria-valuenow": Number(r.toFixed(2)),
603
603
  "aria-valuetext": `${Math.round(r * 100)}%`,
604
- onPointerDown: d,
604
+ onPointerDown: u,
605
605
  onPointerMove: m,
606
606
  onPointerUp: g,
607
607
  onPointerCancel: g,
@@ -639,8 +639,8 @@ function Mt({
639
639
  isMuted: o,
640
640
  playbackRate: s,
641
641
  isFullscreen: r,
642
- markerTime: u,
643
- blockSeekPastMarker: d,
642
+ markerTime: d,
643
+ blockSeekPastMarker: u,
644
644
  containerRef: m,
645
645
  captionsAvailable: g,
646
646
  captionsOn: y,
@@ -711,8 +711,8 @@ function Mt({
711
711
  {
712
712
  currentTime: t,
713
713
  duration: a,
714
- markerTime: u,
715
- blockSeekPastMarker: d,
714
+ markerTime: d,
715
+ blockSeekPastMarker: u,
716
716
  onSeek: Y
717
717
  }
718
718
  ),
@@ -739,36 +739,40 @@ function Mt({
739
739
  containerRef: m
740
740
  }
741
741
  ),
742
- I && // Filled glyph when captions are on, line glyph when off; `aria-pressed`
743
- // conveys the state to assistive tech (the label stays stable).
744
- /* @__PURE__ */ c(
745
- $,
746
- {
747
- variant: "ghost",
748
- size: "sm",
749
- hideLabel: !0,
750
- icon: y ? Ae : fe,
751
- label: p("videoPlayer.captions"),
752
- "aria-pressed": y,
753
- onClick: _
754
- }
755
- ),
756
- z && // Filled "AD" badge when on, line badge when off — the same on/off
757
- // language as captions, legible over video. `hideLabel` gives the
758
- // captions-style tooltip from the label; `aria-pressed` conveys state.
759
- /* @__PURE__ */ c(
760
- $,
761
- {
762
- variant: "ghost",
763
- size: "sm",
764
- hideLabel: !0,
765
- icon: f ? Te : ue,
766
- label: p("videoPlayer.audioDescription"),
767
- "aria-pressed": f,
768
- onClick: U
769
- }
770
- ),
771
- V && /* @__PURE__ */ c(
742
+ I ? (
743
+ // Filled glyph when captions are on, line glyph when off; `aria-pressed`
744
+ // conveys the state to assistive tech (the label stays stable).
745
+ /* @__PURE__ */ c(
746
+ $,
747
+ {
748
+ variant: "ghost",
749
+ size: "sm",
750
+ hideLabel: !0,
751
+ icon: y ? Ae : fe,
752
+ label: p("videoPlayer.captions"),
753
+ "aria-pressed": y,
754
+ onClick: _
755
+ }
756
+ )
757
+ ) : null,
758
+ z ? (
759
+ // Filled "AD" badge when on, line badge when off — the same on/off
760
+ // language as captions, legible over video. `hideLabel` gives the
761
+ // captions-style tooltip from the label; `aria-pressed` conveys state.
762
+ /* @__PURE__ */ c(
763
+ $,
764
+ {
765
+ variant: "ghost",
766
+ size: "sm",
767
+ hideLabel: !0,
768
+ icon: f ? Te : de,
769
+ label: p("videoPlayer.audioDescription"),
770
+ "aria-pressed": f,
771
+ onClick: U
772
+ }
773
+ )
774
+ ) : null,
775
+ V ? /* @__PURE__ */ c(
772
776
  St,
773
777
  {
774
778
  containerRef: m,
@@ -786,8 +790,8 @@ function Mt({
786
790
  onAudioDescriptionLanguageChange: i,
787
791
  onAudioDescriptionOff: D
788
792
  }
789
- ),
790
- X && /* @__PURE__ */ c(
793
+ ) : null,
794
+ X ? /* @__PURE__ */ c(
791
795
  $,
792
796
  {
793
797
  variant: "ghost",
@@ -797,7 +801,7 @@ function Mt({
797
801
  label: X.label,
798
802
  onClick: X.onClick
799
803
  }
800
- ),
804
+ ) : null,
801
805
  /* @__PURE__ */ c(
802
806
  $,
803
807
  {
@@ -830,7 +834,7 @@ function Ie(e) {
830
834
  }
831
835
  const xe = "descriptions";
832
836
  function It(e, { enabled: t, describedSrc: a, descriptions: n }) {
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);
837
+ const o = a !== void 0, { trackSrc: s, needsCrossOrigin: r } = Ie(n), [d, u] = x(!1), m = o || n !== void 0 || d, [g, y] = x(), l = F(!1);
834
838
  return N(() => {
835
839
  if (!e)
836
840
  return;
@@ -854,7 +858,7 @@ function It(e, { enabled: t, describedSrc: a, descriptions: n }) {
854
858
  let C = !1;
855
859
  for (const i of Array.from(f))
856
860
  i.kind === xe && (n === void 0 && (C = !0), O(i));
857
- d(C);
861
+ u(C);
858
862
  };
859
863
  v();
860
864
  const P = typeof f.addEventListener == "function", M = () => v();
@@ -898,32 +902,32 @@ function _t({
898
902
  }) {
899
903
  return T(
900
904
  (r) => {
901
- const u = r.target;
902
- if (u instanceof HTMLElement && (u.closest(
905
+ const d = r.target;
906
+ if (d instanceof HTMLElement && (d.closest(
903
907
  'button, a, input, textarea, select, [role="button"], [contenteditable="true"]'
904
- ) || u.closest('[role="menu"], [role^="menuitem"]') || u.getAttribute("role") === "slider"))
908
+ ) || d.closest('[role="menu"], [role^="menuitem"]') || d.getAttribute("role") === "slider"))
905
909
  return;
906
- const d = e.current;
907
- if (!d)
910
+ const u = e.current;
911
+ if (!u)
908
912
  return;
909
913
  switch (r.key.length === 1 ? r.key.toLowerCase() : r.key) {
910
914
  case " ":
911
915
  r.preventDefault(), a();
912
916
  return;
913
917
  case "ArrowLeft":
914
- r.preventDefault(), t(Math.max(0, d.currentTime - Q));
918
+ r.preventDefault(), t(Math.max(0, u.currentTime - Q));
915
919
  return;
916
920
  case "ArrowRight": {
917
921
  r.preventDefault();
918
- const g = d.duration || d.currentTime + Q;
919
- t(Math.min(g, d.currentTime + Q));
922
+ const g = u.duration || u.currentTime + Q;
923
+ t(Math.min(g, u.currentTime + Q));
920
924
  return;
921
925
  }
922
926
  case "ArrowUp":
923
- r.preventDefault(), s(Math.min(1, d.volume + te));
927
+ r.preventDefault(), s(Math.min(1, u.volume + te));
924
928
  return;
925
929
  case "ArrowDown":
926
- r.preventDefault(), s(Math.max(0, d.volume - te));
930
+ r.preventDefault(), s(Math.max(0, u.volume - te));
927
931
  return;
928
932
  case "m":
929
933
  r.preventDefault(), n();
@@ -945,21 +949,21 @@ function Ft({
945
949
  }) {
946
950
  const n = F(0), o = F(0), s = F(t);
947
951
  s.current = t;
948
- const [r, u] = x(0);
952
+ const [r, d] = x(0);
949
953
  N(() => {
950
- n.current = 0, o.current = 0, u(0);
954
+ n.current = 0, o.current = 0, d(0);
951
955
  }, [a]), N(() => {
952
956
  if (!e)
953
957
  return;
954
958
  const m = () => {
955
959
  s.current && e.currentTime > n.current + le && (e.currentTime = n.current);
956
960
  }, g = () => {
957
- u((h) => {
961
+ d((h) => {
958
962
  const b = n.current;
959
963
  return b - h >= 1 ? b : h;
960
964
  });
961
965
  }, y = () => {
962
- u((h) => Math.max(h, n.current));
966
+ d((h) => Math.max(h, n.current));
963
967
  }, l = () => {
964
968
  const h = e.currentTime - o.current;
965
969
  h >= 0 && h < vt && e.currentTime > n.current && (n.current = e.currentTime, g()), m(), o.current = e.currentTime;
@@ -970,17 +974,17 @@ function Ft({
970
974
  e.removeEventListener("timeupdate", l), e.removeEventListener("seeking", f), e.removeEventListener("seeked", f), e.removeEventListener("pause", y), e.removeEventListener("ended", y);
971
975
  };
972
976
  }, [e]);
973
- const d = T((m) => s.current ? Math.min(m, n.current) : m, []);
974
- return { maxWatchedTime: r, clampSeek: d };
977
+ const u = T((m) => s.current ? Math.min(m, n.current) : m, []);
978
+ return { maxWatchedTime: r, clampSeek: u };
975
979
  }
976
980
  const Ee = /* @__PURE__ */ new Set([
977
981
  "captions",
978
982
  "subtitles"
979
983
  ]), Ot = 2, Vt = 3;
980
984
  function Ut(e, t) {
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;
985
+ const { trackSrc: a, needsCrossOrigin: n } = Ie(t), [o, s] = x(!1), [r, d] = x(!1), [u, m] = x(!1), y = r || t !== void 0 && !u;
982
986
  return N(() => {
983
- m(!1), u(!1);
987
+ m(!1), d(!1);
984
988
  }, [a]), N(() => {
985
989
  if (!e)
986
990
  return;
@@ -990,7 +994,7 @@ function Ut(e, t) {
990
994
  let k = !1;
991
995
  for (const w of Array.from(l))
992
996
  Ee.has(w.kind) && (w.mode = o ? "showing" : "hidden", w.cues && w.cues.length > 0 && (k = !0));
993
- if (u(k), f) {
997
+ if (d(k), f) {
994
998
  if (f.readyState === Vt)
995
999
  m(!0);
996
1000
  else if (f.readyState === Ot) {
@@ -1072,9 +1076,9 @@ function zt({
1072
1076
  const r = () => {
1073
1077
  if (!e.duration)
1074
1078
  return;
1075
- const u = Math.round(e.currentTime / e.duration * 100);
1076
- for (const d of yt)
1077
- o.current.has(d) || u >= d && (o.current.add(d), n.current?.(d, e));
1079
+ const d = Math.round(e.currentTime / e.duration * 100);
1080
+ for (const u of yt)
1081
+ o.current.has(u) || d >= u && (o.current.add(u), n.current?.(u, e));
1078
1082
  };
1079
1083
  return e.addEventListener("timeupdate", r), () => {
1080
1084
  e.removeEventListener("timeupdate", r);
@@ -1086,11 +1090,11 @@ function Bt(e) {
1086
1090
  null
1087
1091
  ), o = F(0), s = T((i) => {
1088
1092
  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(
1093
+ }, []), [r, d] = x(!1), [u, m] = x(!1), [g, y] = x(0), [l, f] = x(0), [h, b] = x(1), [E, A] = x(!1), [k, w] = x(
1090
1094
  oe
1091
1095
  );
1092
1096
  N(() => {
1093
- o.current = 0, t.current && (t.current.playbackRate = oe), u(!1), m(!1), y(0), f(0), w(oe);
1097
+ o.current = 0, t.current && (t.current.playbackRate = oe), d(!1), m(!1), y(0), f(0), w(oe);
1094
1098
  }, [e]), N(() => {
1095
1099
  const i = a;
1096
1100
  if (!i)
@@ -1135,13 +1139,13 @@ function Bt(e) {
1135
1139
  videoElement: a,
1136
1140
  setVideoNode: s,
1137
1141
  videoLoaded: r,
1138
- isPlaying: d,
1142
+ isPlaying: u,
1139
1143
  currentTime: g,
1140
1144
  duration: l,
1141
1145
  volume: h,
1142
1146
  isMuted: E,
1143
1147
  playbackRate: k,
1144
- setVideoLoaded: u,
1148
+ setVideoLoaded: d,
1145
1149
  togglePlay: O,
1146
1150
  toggleMute: v,
1147
1151
  setVolume: P,
@@ -1166,11 +1170,11 @@ function Ht({
1166
1170
  a.current?.(), s(), o = setInterval(() => {
1167
1171
  a.current?.();
1168
1172
  }, Lt);
1169
- }, u = () => {
1173
+ }, d = () => {
1170
1174
  a.current?.(), s();
1171
- }, d = () => s();
1172
- return e.addEventListener("play", r), e.addEventListener("pause", u), e.addEventListener("ended", d), () => {
1173
- s(), e.removeEventListener("play", r), e.removeEventListener("pause", u), e.removeEventListener("ended", d);
1175
+ }, u = () => s();
1176
+ return e.addEventListener("play", r), e.addEventListener("pause", d), e.addEventListener("ended", u), () => {
1177
+ s(), e.removeEventListener("play", r), e.removeEventListener("pause", d), e.removeEventListener("ended", u);
1174
1178
  };
1175
1179
  }, [e, n]);
1176
1180
  }
@@ -1182,8 +1186,8 @@ function Wt({
1182
1186
  persistControls: o = !1,
1183
1187
  content: s,
1184
1188
  defaultLanguage: r,
1185
- autoPlay: u = !1,
1186
- autoFocus: d = !1,
1189
+ autoPlay: d = !1,
1190
+ autoFocus: u = !1,
1187
1191
  download: m,
1188
1192
  restrictForwardSeek: g = !1,
1189
1193
  onTrackAction: y,
@@ -1281,8 +1285,8 @@ function Wt({
1281
1285
  setVolume: n ? ge : p.setVolume
1282
1286
  });
1283
1287
  N(() => {
1284
- d && E.current?.focus({ preventScroll: !0 });
1285
- }, [d]);
1288
+ u && E.current?.focus({ preventScroll: !0 });
1289
+ }, [u]);
1286
1290
  const Be = (L) => L.preventDefault();
1287
1291
  return /* @__PURE__ */ S(
1288
1292
  "div",
@@ -1291,7 +1295,7 @@ function Wt({
1291
1295
  className: H(
1292
1296
  "group relative h-full w-full overflow-hidden rounded-[inherit] bg-f1-foreground dark:bg-f1-background",
1293
1297
  "[&:fullscreen]:h-screen [&:fullscreen]:w-screen [&:fullscreen]:rounded-none",
1294
- de()
1298
+ ue()
1295
1299
  ),
1296
1300
  role: "region",
1297
1301
  "aria-label": a ?? b("videoPlayer.regionLabel"),
@@ -1304,7 +1308,7 @@ function Wt({
1304
1308
  "video",
1305
1309
  {
1306
1310
  ref: p.setVideoNode,
1307
- autoPlay: u,
1311
+ autoPlay: d,
1308
1312
  playsInline: !0,
1309
1313
  disablePictureInPicture: !0,
1310
1314
  disableRemotePlayback: !0,
@@ -1324,7 +1328,7 @@ function Wt({
1324
1328
  ),
1325
1329
  style: { opacity: p.videoLoaded || t ? 1 : 0 },
1326
1330
  children: [
1327
- I.trackSrc && /* @__PURE__ */ c(
1331
+ I.trackSrc ? /* @__PURE__ */ c(
1328
1332
  "track",
1329
1333
  {
1330
1334
  kind: "captions",
@@ -1332,8 +1336,8 @@ function Wt({
1332
1336
  label: b("videoPlayer.captions"),
1333
1337
  default: !1
1334
1338
  }
1335
- ),
1336
- z.trackSrc && /* @__PURE__ */ c(
1339
+ ) : null,
1340
+ z.trackSrc ? /* @__PURE__ */ c(
1337
1341
  "track",
1338
1342
  {
1339
1343
  kind: "descriptions",
@@ -1341,11 +1345,11 @@ function Wt({
1341
1345
  label: b("videoPlayer.audioDescription"),
1342
1346
  default: !1
1343
1347
  }
1344
- )
1348
+ ) : null
1345
1349
  ]
1346
1350
  }
1347
1351
  ),
1348
- !p.isPlaying && /* @__PURE__ */ c(
1352
+ p.isPlaying ? null : /* @__PURE__ */ c(
1349
1353
  "div",
1350
1354
  {
1351
1355
  "aria-hidden": !0,
@@ -1358,12 +1362,12 @@ function Wt({
1358
1362
  tabIndex: -1,
1359
1363
  onClick: p.togglePlay,
1360
1364
  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",
1361
- children: /* @__PURE__ */ c(dt, { icon: Ce, size: "lg", color: "#fff" })
1365
+ children: /* @__PURE__ */ c(ut, { icon: Ce, size: "lg", color: "#fff" })
1362
1366
  }
1363
1367
  )
1364
1368
  }
1365
1369
  ),
1366
- I.showing && z.activeCue && /* @__PURE__ */ c(
1370
+ I.showing && z.activeCue ? /* @__PURE__ */ c(
1367
1371
  "div",
1368
1372
  {
1369
1373
  "aria-hidden": !0,
@@ -1377,9 +1381,9 @@ function Wt({
1377
1381
  z.activeCue
1378
1382
  ] })
1379
1383
  }
1380
- ),
1384
+ ) : null,
1381
1385
  /* @__PURE__ */ c("span", { className: "sr-only", "aria-live": "polite", children: p.isPlaying ? b("videoPlayer.playing") : b("videoPlayer.paused") }),
1382
- p.videoLoaded && /* @__PURE__ */ c(
1386
+ p.videoLoaded ? /* @__PURE__ */ c(
1383
1387
  Mt,
1384
1388
  {
1385
1389
  isPlaying: p.isPlaying,
@@ -1421,12 +1425,12 @@ function Wt({
1421
1425
  onSeek: pe,
1422
1426
  download: m
1423
1427
  }
1424
- )
1428
+ ) : null
1425
1429
  ]
1426
1430
  }
1427
1431
  );
1428
1432
  }
1429
- const Yt = ut(
1433
+ const Yt = dt(
1430
1434
  ft("F0VideoPlayer", Wt)
1431
1435
  );
1432
1436
  export {