@ioai/lerobot-studio 1.0.2 → 1.0.3

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,11 +1,11 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, K as c, M as l, N as u, O as d, P as f, S as p, T as m, U as h, V as g, W as _, _ as v, a as y, b, c as x, ft as S, g as C, gt as w, h as T, ht as E, i as D, j as O, k as ee, l as te, lt as ne, m as k, mt as A, n as re, o as j, p as ie, pt as M, r as ae, s as N, st as oe, t as se, v as ce, w as P, x as F, y as I } from "./react-window-B1KnRC6j.js";
2
- import { r as L, t as le } from "./workerManager-D6ovn2ln.js";
3
- import * as ue from "react";
4
- import R, { Suspense as de, createContext as fe, memo as pe, useCallback as z, useContext as me, useEffect as B, useMemo as V, useRef as H, useState as U } from "react";
5
- import { Fragment as he, jsx as W, jsxs as G } from "react/jsx-runtime";
6
- import ge from "react-dom";
1
+ import { A as e, C as t, D as n, E as r, F as i, G as a, H as o, I as s, K as c, M as l, N as u, O as d, P as f, S as p, T as m, U as h, V as g, W as _, _ as v, _t as y, a as b, b as x, c as S, ct as C, g as w, gt as T, h as E, ht as D, i as O, j as ee, k as te, l as ne, mt as k, n as A, o as re, p as j, pt as ie, q as M, r as ae, s as N, t as oe, ut as se, v as ce, w as P, x as F, y as le } from "./react-window-BIZRp3dx.js";
2
+ import { r as I, t as ue } from "./workerManager-D6ovn2ln.js";
3
+ import * as de from "react";
4
+ import L, { Suspense as fe, createContext as pe, memo as me, useCallback as R, useContext as he, useEffect as z, useMemo as B, useRef as V, useState as H } from "react";
5
+ import { Fragment as ge, jsx as U, jsxs as W } from "react/jsx-runtime";
6
+ import _e from "react-dom";
7
7
  //#region node_modules/@zip.js/zip.js/lib/core/constants.js
8
- var _e = 4294967295, ve = 65535, ye = 33639248, be = 39169, xe = 21589, Se = 28789, Ce = 25461, we = 6534, Te = 30837, Ee = 30805, De = 2048, Oe = 61440, ke = 16384, Ae = 2048, je = 1024, Me = Infinity, Ne = "undefined", Pe = "function", Fe = /* @__PURE__ */ new Uint8Array(), Ie = 64, Le = 2;
8
+ var ve = 4294967295, ye = 65535, be = 33639248, xe = 39169, G = 21589, Se = 28789, Ce = 25461, we = 6534, Te = 30837, Ee = 30805, De = 2048, Oe = 61440, ke = 16384, Ae = 2048, je = 1024, Me = Infinity, Ne = "undefined", Pe = "function", Fe = /* @__PURE__ */ new Uint8Array(), Ie = 64, Le = 2;
9
9
  try {
10
10
  typeof navigator < "u" && navigator.hardwareConcurrency && (Le = navigator.hardwareConcurrency);
11
11
  } catch {}
@@ -1504,16 +1504,16 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1504
1504
  xi.forEach((t) => this[t] = e[t]);
1505
1505
  }
1506
1506
  }, Ci = "filenameEncoding", wi = "commentEncoding", Ti = "extractPrependedData", Ei = "extractAppendedData", Di = "password", Oi = "rawPassword", ki = "passThrough", Ai = "signal", ji = "checkPasswordOnly", Mi = "checkOverlappingEntryOnly", Ni = "checkOverlappingEntry", Pi = "checkAmbiguity", Fi = "useWebWorkers", Ii = "useCompressionStream", Li = "transferStreams", Ri = "strictness", zi = "maxAppendedDataSize", Bi = "strict", Vi = "balanced", Hi = "tolerant", Ui = "File format is not recognized", Wi = "End of central directory not found", Gi = "End of Zip64 central directory locator not found", Ki = "Central directory header not found", qi = "Local file header not found", Ji = "Zip64 extra field not found", Yi = "File contains encrypted entry", Xi = "Encryption method not supported", Zi = "Compression method not supported", Qi = "Split zip file", $i = "Overlapping entry found", ea = "Ambiguous archive", ta = "utf-8", na = "UTF8", ra = "cp437", ia = 9 | De, aa = [
1507
- [di, _e],
1508
- [fi, _e],
1509
- [pi, _e],
1510
- [mi, ve]
1507
+ [di, ve],
1508
+ [fi, ve],
1509
+ [pi, ve],
1510
+ [mi, ye]
1511
1511
  ], oa = {
1512
- [ve]: {
1512
+ [ye]: {
1513
1513
  getValue: Y,
1514
1514
  bytes: 4
1515
1515
  },
1516
- [_e]: {
1516
+ [ve]: {
1517
1517
  getValue: Ia,
1518
1518
  bytes: 8
1519
1519
  }
@@ -1556,8 +1556,8 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1556
1556
  if (E.length < 4) throw Error(Ui);
1557
1557
  let e = w - d - (n.lastDiskOffset || 0);
1558
1558
  if (f != e && v == g) {
1559
- let t = Y(D, T) != ye;
1560
- if (!t && e >= 0 && e + 4 <= n.size && (t = Y(X(await K(n, e, 4, v)), 0) == ye), t) {
1559
+ let t = Y(D, T) != be;
1560
+ if (!t && e >= 0 && e + 4 <= n.size && (t = Y(X(await K(n, e, 4, v)), 0) == be), t) {
1561
1561
  let t = f;
1562
1562
  f = e, f > t && (b += f - t), E = await K(n, f, d, v), D = X(E);
1563
1563
  }
@@ -1601,9 +1601,9 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1601
1601
  filename: M,
1602
1602
  comment: ae
1603
1603
  }), ua(o, o, D, T + 6), o.offset += b, x = Math.min(o.offset, x), a && (ne.has(o.filename) && (k = !0), ne.add(o.filename));
1604
- let N = o.externalFileAttributes >> 16 & ve;
1604
+ let N = o.externalFileAttributes >> 16 & ye;
1605
1605
  o.unixMode === void 0 && N & 16877 && (o.unixMode = N);
1606
- let oe = !!(o.unixMode & Ae), se = !!(o.unixMode & je), ce = !!(o.unixMode & 512), P = o.unixMode === void 0 ? p && !!(N & 73) : !!(o.unixMode & 73), F = o.unixMode !== void 0 && (o.unixMode & 61440) == 16384, I = (N & Oe) == ke;
1606
+ let oe = !!(o.unixMode & Ae), se = !!(o.unixMode & je), ce = !!(o.unixMode & 512), P = o.unixMode === void 0 ? p && !!(N & 73) : !!(o.unixMode & 73), F = o.unixMode !== void 0 && (o.unixMode & 61440) == 16384, le = (N & Oe) == ke;
1607
1607
  Object.assign(o, {
1608
1608
  setuid: oe,
1609
1609
  setgid: se,
@@ -1612,19 +1612,19 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1612
1612
  internalFileAttribute: o.internalFileAttributes,
1613
1613
  externalFileAttribute: o.externalFileAttributes,
1614
1614
  executable: P,
1615
- directory: F || I || f && O.directory || o.filename.endsWith("/") && !o.uncompressedSize,
1615
+ directory: F || le || f && O.directory || o.filename.endsWith("/") && !o.uncompressedSize,
1616
1616
  zipCrypto: o.encrypted && !o.extraFieldAES
1617
1617
  });
1618
- let L = new Si(o);
1619
- L.getData = (e, n) => o.getData(e, L, t.readRanges, n), L.arrayBuffer = async (e) => {
1620
- let n = new TransformStream(), [r] = await Promise.all([new Response(n.readable).arrayBuffer(), o.getData(n, L, t.readRanges, e)]);
1618
+ let I = new Si(o);
1619
+ I.getData = (e, n) => o.getData(e, I, t.readRanges, n), I.arrayBuffer = async (e) => {
1620
+ let n = new TransformStream(), [r] = await Promise.all([new Response(n.readable).arrayBuffer(), o.getData(n, I, t.readRanges, e)]);
1621
1621
  return r;
1622
1622
  }, T = g;
1623
- let { onprogress: le } = e;
1624
- if (le) try {
1625
- await le(i + 1, y, new Si(o));
1623
+ let { onprogress: ue } = e;
1624
+ if (ue) try {
1625
+ await ue(i + 1, y, new Si(o));
1626
1626
  } catch {}
1627
- yield L;
1627
+ yield I;
1628
1628
  }
1629
1629
  a && T != C && Ma("trailing central directory data"), k && Ma("duplicate filename"), a && (b || y && x > 0) && Ma("prepended data");
1630
1630
  let A = q(t, e, Ti), re = q(t, e, Ei);
@@ -1671,7 +1671,7 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1671
1671
  N && (ae = !0);
1672
1672
  let { onstart: oe, onprogress: se, onend: ce } = r, P = d == 9, F = q(i, r, Ii);
1673
1673
  P && (F = !1);
1674
- let I = {
1674
+ let le = {
1675
1675
  options: {
1676
1676
  codecType: An,
1677
1677
  password: S,
@@ -1713,22 +1713,22 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1713
1713
  extraFieldZip64: u || y.extraFieldZip64,
1714
1714
  readRanges: n
1715
1715
  });
1716
- let L;
1716
+ let I;
1717
1717
  try {
1718
1718
  if (!N) {
1719
- M && (e = new WritableStream()), e = new ei(e), await ni(e, w ? _ : g), {writable: L} = e;
1719
+ M && (e = new WritableStream()), e = new ei(e), await ni(e, w ? _ : g), {writable: I} = e;
1720
1720
  let { outputSize: t } = await sr({
1721
1721
  readable: j,
1722
- writable: L
1723
- }, I);
1722
+ writable: I
1723
+ }, le);
1724
1724
  if (e.size += t, t != (w ? _ : g)) throw Error(ln);
1725
1725
  }
1726
1726
  } catch (t) {
1727
1727
  if (t.outputSize !== void 0 && (e.size += t.outputSize), !M || t.message != "zipjs-abort-check-password") throw t;
1728
1728
  } finally {
1729
- !q(i, r, "preventClose") && L && !L.locked && await L.getWriter().close();
1729
+ !q(i, r, "preventClose") && I && !I.locked && await I.getWriter().close();
1730
1730
  }
1731
- return M || N ? void 0 : e.getData ? e.getData() : L;
1731
+ return M || N ? void 0 : e.getData ? e.getData() : I;
1732
1732
  }
1733
1733
  };
1734
1734
  function la(e, t, n) {
@@ -1770,7 +1770,7 @@ function ua(e, t, n, r, i) {
1770
1770
  d && (fa(d, si, ci, t, e), t.extraFieldUnicodePath = d);
1771
1771
  let f = o.get(Ce);
1772
1772
  f && (fa(f, li, ui, t, e), t.extraFieldUnicodeComment = f);
1773
- let p = o.get(be);
1773
+ let p = o.get(xe);
1774
1774
  p && p.data.length >= 7 ? (pa(p, t, l), t.extraFieldAES = p) : t.compressionMethod = l;
1775
1775
  let m = o.get(10);
1776
1776
  m && (ma(m, t), t.extraFieldNTFS = m);
@@ -1780,7 +1780,7 @@ function ua(e, t, n, r, i) {
1780
1780
  let e = o.get(Te);
1781
1781
  e && (ha(e, t, !0), t.extraFieldInfoZip = e);
1782
1782
  }
1783
- let g = o.get(xe);
1783
+ let g = o.get(G);
1784
1784
  g && (_a(g, t, i), t.extraFieldExtendedTimestamp = g);
1785
1785
  let _ = o.get(we);
1786
1786
  _ && (t.extraFieldUSDZ = _);
@@ -1909,11 +1909,11 @@ function ya(e, t) {
1909
1909
  return e === void 0 ? t ? Bi : Vi : e;
1910
1910
  }
1911
1911
  function ba(e, t) {
1912
- return e === void 0 ? t == "strict" ? 0 : t == "tolerant" ? Infinity : ve : e;
1912
+ return e === void 0 ? t == "strict" ? 0 : t == "tolerant" ? Infinity : ye : e;
1913
1913
  }
1914
1914
  var xa = 64, Sa = 0, Ca = 1, wa = 2;
1915
1915
  async function Ta(e, t, n) {
1916
- let { size: r } = e, i = Math.min(r, 22 + ve), a = { count: xa }, o, s, c = 0;
1916
+ let { size: r } = e, i = Math.min(r, 22 + ye), a = { count: xa }, o, s, c = 0;
1917
1917
  for await (let [n, l, u, d, f] of Da(e, i)) {
1918
1918
  let i = J(n, d + 20);
1919
1919
  if (f + 22 + i == r) {
@@ -1929,7 +1929,7 @@ async function Ta(e, t, n) {
1929
1929
  };
1930
1930
  }
1931
1931
  async function Ea(e, t, n) {
1932
- let { size: r } = e, i = Math.min(r, t == Infinity ? r : 22 + ve + t), a, o;
1932
+ let { size: r } = e, i = Math.min(r, t == Infinity ? r : 22 + ye + t), a, o;
1933
1933
  for await (let [t, s, c, l, u] of Da(e, i)) {
1934
1934
  let i = Oa(c, l, u);
1935
1935
  a ||= i;
@@ -1980,7 +1980,7 @@ function q(e, t, n) {
1980
1980
  return t[n] === void 0 ? e.options[n] : t[n];
1981
1981
  }
1982
1982
  function Na(e) {
1983
- let t = (e & 4294901760) >> 16, n = e & ve;
1983
+ let t = (e & 4294901760) >> 16, n = e & ye;
1984
1984
  try {
1985
1985
  return new Date(1980 + ((t & 65024) >> 9), ((t & 480) >> 5) - 1, t & 31, (n & 63488) >> 11, (n & 2016) >> 5, (n & 31) * 2, 0);
1986
1986
  } catch {}
@@ -2623,8 +2623,8 @@ var So = /*#__PURE__*/ yo(bo, 9, 1), Co = /*#__PURE__*/ yo(xo, 5, 1), wo = funct
2623
2623
  s && l(f + 131072);
2624
2624
  var F = f + oe;
2625
2625
  if (f < j) {
2626
- var I = a - j, L = Math.min(j, F);
2627
- for (I + f < 0 && Ao(3); f < L; ++f) n[f] = r[I + f];
2626
+ var le = a - j, I = Math.min(j, F);
2627
+ for (le + f < 0 && Ao(3); f < I; ++f) n[f] = r[le + f];
2628
2628
  }
2629
2629
  for (; f < F; ++f) n[f] = n[f - j];
2630
2630
  }
@@ -3547,12 +3547,12 @@ function vs(e) {
3547
3547
  var ys = Object.defineProperty, bs = (e, t) => ys(e, "name", {
3548
3548
  value: t,
3549
3549
  configurable: !0
3550
- }), xs = "horizontal", Ss = ["horizontal", "vertical"], Cs = /* @__PURE__ */ ue.forwardRef(/* @__PURE__ */ bs(function(e, t) {
3550
+ }), xs = "horizontal", Ss = ["horizontal", "vertical"], Cs = /* @__PURE__ */ de.forwardRef(/* @__PURE__ */ bs(function(e, t) {
3551
3551
  let { decorative: n, orientation: r = xs, ...i } = e, a = ws(r) ? r : xs, o = n ? { role: "none" } : {
3552
3552
  "aria-orientation": a === "vertical" ? a : void 0,
3553
3553
  role: "separator"
3554
3554
  };
3555
- return /* @__PURE__ */ W(oe.div, {
3555
+ return /* @__PURE__ */ U(C.div, {
3556
3556
  "data-orientation": a,
3557
3557
  ...o,
3558
3558
  ...i,
@@ -3563,7 +3563,7 @@ function ws(e) {
3563
3563
  return Ss.includes(e);
3564
3564
  }
3565
3565
  bs(ws, "isValidOrientation");
3566
- var Ts = Cs, Es = a("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
3566
+ var Ts = Cs, Es = s("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
3567
3567
  variants: { variant: {
3568
3568
  default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
3569
3569
  secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
@@ -3575,29 +3575,29 @@ var Ts = Cs, Es = a("inline-flex w-fit shrink-0 items-center justify-center gap-
3575
3575
  defaultVariants: { variant: "default" }
3576
3576
  });
3577
3577
  function Ds({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
3578
- return /* @__PURE__ */ W(n ? ne : "span", {
3578
+ return /* @__PURE__ */ U(n ? se : "span", {
3579
3579
  "data-slot": "badge",
3580
3580
  "data-variant": t,
3581
- className: A(Es({ variant: t }), e),
3581
+ className: D(Es({ variant: t }), e),
3582
3582
  ...r
3583
3583
  });
3584
3584
  }
3585
- var Os = u("arrow-left", [["path", {
3585
+ var Os = f("arrow-left", [["path", {
3586
3586
  d: "m12 19-7-7 7-7",
3587
3587
  key: "1l729n"
3588
3588
  }], ["path", {
3589
3589
  d: "M19 12H5",
3590
3590
  key: "x3x0zl"
3591
- }]]), ks = u("check-check", [["path", {
3591
+ }]]), ks = f("check-check", [["path", {
3592
3592
  d: "M18 6 7 17l-5-5",
3593
3593
  key: "116fxf"
3594
3594
  }], ["path", {
3595
3595
  d: "m22 10-7.5 7.5L13 16",
3596
3596
  key: "ke71qq"
3597
- }]]), As = u("chevron-left", [["path", {
3597
+ }]]), As = f("chevron-left", [["path", {
3598
3598
  d: "m15 18-6-6 6-6",
3599
3599
  key: "1wnfg3"
3600
- }]]), js = u("circle-alert", [
3600
+ }]]), js = f("circle-alert", [
3601
3601
  ["circle", {
3602
3602
  cx: "12",
3603
3603
  cy: "12",
@@ -3618,7 +3618,7 @@ var Os = u("arrow-left", [["path", {
3618
3618
  y2: "16",
3619
3619
  key: "4dfq90"
3620
3620
  }]
3621
- ]), Ms = u("circle-check", [["circle", {
3621
+ ]), Ms = f("circle-check", [["circle", {
3622
3622
  cx: "12",
3623
3623
  cy: "12",
3624
3624
  r: "10",
@@ -3626,13 +3626,13 @@ var Os = u("arrow-left", [["path", {
3626
3626
  }], ["path", {
3627
3627
  d: "m9 12 2 2 4-4",
3628
3628
  key: "dzmm74"
3629
- }]]), Ns = u("house", [["path", {
3629
+ }]]), Ns = f("house", [["path", {
3630
3630
  d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
3631
3631
  key: "5wwlr5"
3632
3632
  }], ["path", {
3633
3633
  d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
3634
3634
  key: "r6nss1"
3635
- }]]), Ps = u("info", [
3635
+ }]]), Ps = f("info", [
3636
3636
  ["circle", {
3637
3637
  cx: "12",
3638
3638
  cy: "12",
@@ -3647,7 +3647,7 @@ var Os = u("arrow-left", [["path", {
3647
3647
  d: "M12 8h.01",
3648
3648
  key: "e9boi3"
3649
3649
  }]
3650
- ]), Fs = u("octagon-x", [
3650
+ ]), Fs = f("octagon-x", [
3651
3651
  ["path", {
3652
3652
  d: "m15 9-6 6",
3653
3653
  key: "1uzhvr"
@@ -3660,13 +3660,13 @@ var Os = u("arrow-left", [["path", {
3660
3660
  d: "m9 9 6 6",
3661
3661
  key: "z0biqf"
3662
3662
  }]
3663
- ]), Is = u("pencil", [["path", {
3663
+ ]), Is = f("pencil", [["path", {
3664
3664
  d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
3665
3665
  key: "1a8usu"
3666
3666
  }], ["path", {
3667
3667
  d: "m15 5 4 4",
3668
3668
  key: "1mk7zo"
3669
- }]]), Ls = u("repeat-1", [
3669
+ }]]), Ls = f("repeat-1", [
3670
3670
  ["path", {
3671
3671
  d: "m17 2 4 4-4 4",
3672
3672
  key: "nntrym"
@@ -3687,7 +3687,7 @@ var Os = u("arrow-left", [["path", {
3687
3687
  d: "M11 10h1v4",
3688
3688
  key: "70cz1p"
3689
3689
  }]
3690
- ]), Rs = u("repeat", [
3690
+ ]), Rs = f("repeat", [
3691
3691
  ["path", {
3692
3692
  d: "m17 2 4 4-4 4",
3693
3693
  key: "nntrym"
@@ -3704,7 +3704,7 @@ var Os = u("arrow-left", [["path", {
3704
3704
  d: "M21 13v1a4 4 0 0 1-4 4H3",
3705
3705
  key: "1rx37r"
3706
3706
  }]
3707
- ]), zs = u("shuffle", [
3707
+ ]), zs = f("shuffle", [
3708
3708
  ["path", {
3709
3709
  d: "m18 14 4 4-4 4",
3710
3710
  key: "10pe0f"
@@ -3725,7 +3725,7 @@ var Os = u("arrow-left", [["path", {
3725
3725
  d: "M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",
3726
3726
  key: "os18l9"
3727
3727
  }]
3728
- ]), Bs = u("sliders-horizontal", [
3728
+ ]), Bs = f("sliders-horizontal", [
3729
3729
  ["path", {
3730
3730
  d: "M10 5H3",
3731
3731
  key: "1qgfaw"
@@ -3762,20 +3762,20 @@ var Os = u("arrow-left", [["path", {
3762
3762
  d: "M8 12H3",
3763
3763
  key: "a7s4jb"
3764
3764
  }]
3765
- ]), Vs = u("square-check-big", [["path", {
3765
+ ]), Vs = f("square-check-big", [["path", {
3766
3766
  d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",
3767
3767
  key: "2acyp4"
3768
3768
  }], ["path", {
3769
3769
  d: "m9 11 3 3L22 4",
3770
3770
  key: "1pflzl"
3771
- }]]), Hs = u("square", [["rect", {
3771
+ }]]), Hs = f("square", [["rect", {
3772
3772
  width: "18",
3773
3773
  height: "18",
3774
3774
  x: "3",
3775
3775
  y: "3",
3776
3776
  rx: "2",
3777
3777
  key: "afitv7"
3778
- }]]), Us = u("trash-2", [
3778
+ }]]), Us = f("trash-2", [
3779
3779
  ["path", {
3780
3780
  d: "M10 11v6",
3781
3781
  key: "nco0om"
@@ -3796,7 +3796,7 @@ var Os = u("arrow-left", [["path", {
3796
3796
  d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
3797
3797
  key: "e791ji"
3798
3798
  }]
3799
- ]), Ws = u("undo-2", [["path", {
3799
+ ]), Ws = f("undo-2", [["path", {
3800
3800
  d: "M9 14 4 9l5-5",
3801
3801
  key: "102s5s"
3802
3802
  }], ["path", {
@@ -3806,37 +3806,37 @@ var Os = u("arrow-left", [["path", {
3806
3806
  //#endregion
3807
3807
  //#region src/ui/components/ui/dialog.tsx
3808
3808
  function Gs({ ...e }) {
3809
- return /* @__PURE__ */ W(t, {
3809
+ return /* @__PURE__ */ U(g, {
3810
3810
  "data-slot": "dialog",
3811
3811
  ...e
3812
3812
  });
3813
3813
  }
3814
3814
  function Ks({ container: e, ...t }) {
3815
- let n = M();
3816
- return /* @__PURE__ */ W(o, {
3815
+ let n = k();
3816
+ return /* @__PURE__ */ U(c, {
3817
3817
  "data-slot": "dialog-portal",
3818
3818
  container: e ?? n,
3819
3819
  ...t
3820
3820
  });
3821
3821
  }
3822
3822
  function qs({ className: e, ...t }) {
3823
- return /* @__PURE__ */ W(_, {
3823
+ return /* @__PURE__ */ U(a, {
3824
3824
  "data-slot": "dialog-overlay",
3825
- className: A("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
3825
+ className: D("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
3826
3826
  ...t
3827
3827
  });
3828
3828
  }
3829
- function Js({ className: e, children: t, showCloseButton: n = !0, ...r }) {
3830
- return /* @__PURE__ */ G(Ks, {
3829
+ function Js({ className: e, children: n, showCloseButton: r = !0, ...i }) {
3830
+ return /* @__PURE__ */ W(Ks, {
3831
3831
  "data-slot": "dialog-portal",
3832
- children: [/* @__PURE__ */ W(qs, {}), /* @__PURE__ */ G(s, {
3832
+ children: [/* @__PURE__ */ U(qs, {}), /* @__PURE__ */ W(h, {
3833
3833
  "data-slot": "dialog-content",
3834
- className: A("fixed top-[50vh] left-[50vw] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", e),
3835
- ...r,
3836
- children: [t, n && /* @__PURE__ */ G(g, {
3834
+ className: D("fixed top-[50vh] left-[50vw] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", e),
3835
+ ...i,
3836
+ children: [n, r && /* @__PURE__ */ W(o, {
3837
3837
  "data-slot": "dialog-close",
3838
3838
  className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3839
- children: [/* @__PURE__ */ W(p, {}), /* @__PURE__ */ W("span", {
3839
+ children: [/* @__PURE__ */ U(t, {}), /* @__PURE__ */ U("span", {
3840
3840
  className: "sr-only",
3841
3841
  children: "Close"
3842
3842
  })]
@@ -3845,20 +3845,20 @@ function Js({ className: e, children: t, showCloseButton: n = !0, ...r }) {
3845
3845
  });
3846
3846
  }
3847
3847
  function Ys({ className: e, ...t }) {
3848
- return /* @__PURE__ */ W("div", {
3848
+ return /* @__PURE__ */ U("div", {
3849
3849
  "data-slot": "dialog-header",
3850
- className: A("flex flex-col gap-2 text-center sm:text-left", e),
3850
+ className: D("flex flex-col gap-2 text-center sm:text-left", e),
3851
3851
  ...t
3852
3852
  });
3853
3853
  }
3854
3854
  function Xs({ className: e, showCloseButton: t = !1, children: n, ...r }) {
3855
- return /* @__PURE__ */ G("div", {
3855
+ return /* @__PURE__ */ W("div", {
3856
3856
  "data-slot": "dialog-footer",
3857
- className: A("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
3857
+ className: D("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
3858
3858
  ...r,
3859
- children: [n, t && /* @__PURE__ */ W(g, {
3859
+ children: [n, t && /* @__PURE__ */ U(o, {
3860
3860
  asChild: !0,
3861
- children: /* @__PURE__ */ W(f, {
3861
+ children: /* @__PURE__ */ U(i, {
3862
3862
  variant: "outline",
3863
3863
  children: "Close"
3864
3864
  })
@@ -3866,27 +3866,27 @@ function Xs({ className: e, showCloseButton: t = !1, children: n, ...r }) {
3866
3866
  });
3867
3867
  }
3868
3868
  function Zs({ className: e, ...t }) {
3869
- return /* @__PURE__ */ W(c, {
3869
+ return /* @__PURE__ */ U(M, {
3870
3870
  "data-slot": "dialog-title",
3871
- className: A("text-lg leading-none font-semibold text-foreground", e),
3871
+ className: D("text-lg leading-none font-semibold text-foreground", e),
3872
3872
  ...t
3873
3873
  });
3874
3874
  }
3875
3875
  function Qs({ className: e, ...t }) {
3876
- return /* @__PURE__ */ W(h, {
3876
+ return /* @__PURE__ */ U(_, {
3877
3877
  "data-slot": "dialog-description",
3878
- className: A("text-sm text-muted-foreground", e),
3878
+ className: D("text-sm text-muted-foreground", e),
3879
3879
  ...t
3880
3880
  });
3881
3881
  }
3882
3882
  //#endregion
3883
3883
  //#region src/ui/components/ui/separator.tsx
3884
3884
  function $s({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
3885
- return /* @__PURE__ */ W(Ts, {
3885
+ return /* @__PURE__ */ U(Ts, {
3886
3886
  "data-slot": "separator",
3887
3887
  decorative: n,
3888
3888
  orientation: t,
3889
- className: A("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", e),
3889
+ className: D("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", e),
3890
3890
  ...r
3891
3891
  });
3892
3892
  }
@@ -3911,11 +3911,11 @@ var ec = (e, t, n, r, i, a, o, s) => {
3911
3911
  let e = localStorage.getItem(t) || n;
3912
3912
  u(o && e === "system" ? f() : e);
3913
3913
  } catch {}
3914
- }, tc = ue.createContext(void 0), nc = {
3914
+ }, tc = de.createContext(void 0), nc = {
3915
3915
  setTheme: (e) => {},
3916
3916
  themes: []
3917
- }, rc = () => ue.useContext(tc) ?? nc;
3918
- ue.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: i, defaultTheme: a, value: o, themes: s, nonce: c, scriptProps: l }) => {
3917
+ }, rc = () => de.useContext(tc) ?? nc;
3918
+ de.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: i, defaultTheme: a, value: o, themes: s, nonce: c, scriptProps: l }) => {
3919
3919
  let u = JSON.stringify([
3920
3920
  n,
3921
3921
  t,
@@ -3926,7 +3926,7 @@ ue.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableC
3926
3926
  r,
3927
3927
  i
3928
3928
  ]).slice(1, -1);
3929
- return ue.createElement("script", {
3929
+ return de.createElement("script", {
3930
3930
  ...l,
3931
3931
  suppressHydrationWarning: !0,
3932
3932
  nonce: typeof window > "u" ? c : "",
@@ -3948,53 +3948,53 @@ var ac = (e) => {
3948
3948
  case "error": return dc;
3949
3949
  default: return null;
3950
3950
  }
3951
- }, oc = Array(12).fill(0), sc = ({ visible: e, className: t }) => /*#__PURE__*/ R.createElement("div", {
3951
+ }, oc = Array(12).fill(0), sc = ({ visible: e, className: t }) => /*#__PURE__*/ L.createElement("div", {
3952
3952
  className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
3953
3953
  "data-visible": e
3954
- }, /*#__PURE__*/ R.createElement("div", { className: "sonner-spinner" }, oc.map((e, t) => /*#__PURE__*/ R.createElement("div", {
3954
+ }, /*#__PURE__*/ L.createElement("div", { className: "sonner-spinner" }, oc.map((e, t) => /*#__PURE__*/ L.createElement("div", {
3955
3955
  className: "sonner-loading-bar",
3956
3956
  key: `spinner-bar-${t}`
3957
- })))), cc = /*#__PURE__*/ R.createElement("svg", {
3957
+ })))), cc = /*#__PURE__*/ L.createElement("svg", {
3958
3958
  xmlns: "http://www.w3.org/2000/svg",
3959
3959
  viewBox: "0 0 20 20",
3960
3960
  fill: "currentColor",
3961
3961
  height: "20",
3962
3962
  width: "20"
3963
- }, /*#__PURE__*/ R.createElement("path", {
3963
+ }, /*#__PURE__*/ L.createElement("path", {
3964
3964
  fillRule: "evenodd",
3965
3965
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
3966
3966
  clipRule: "evenodd"
3967
- })), lc = /*#__PURE__*/ R.createElement("svg", {
3967
+ })), lc = /*#__PURE__*/ L.createElement("svg", {
3968
3968
  xmlns: "http://www.w3.org/2000/svg",
3969
3969
  viewBox: "0 0 24 24",
3970
3970
  fill: "currentColor",
3971
3971
  height: "20",
3972
3972
  width: "20"
3973
- }, /*#__PURE__*/ R.createElement("path", {
3973
+ }, /*#__PURE__*/ L.createElement("path", {
3974
3974
  fillRule: "evenodd",
3975
3975
  d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
3976
3976
  clipRule: "evenodd"
3977
- })), uc = /*#__PURE__*/ R.createElement("svg", {
3977
+ })), uc = /*#__PURE__*/ L.createElement("svg", {
3978
3978
  xmlns: "http://www.w3.org/2000/svg",
3979
3979
  viewBox: "0 0 20 20",
3980
3980
  fill: "currentColor",
3981
3981
  height: "20",
3982
3982
  width: "20"
3983
- }, /*#__PURE__*/ R.createElement("path", {
3983
+ }, /*#__PURE__*/ L.createElement("path", {
3984
3984
  fillRule: "evenodd",
3985
3985
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
3986
3986
  clipRule: "evenodd"
3987
- })), dc = /*#__PURE__*/ R.createElement("svg", {
3987
+ })), dc = /*#__PURE__*/ L.createElement("svg", {
3988
3988
  xmlns: "http://www.w3.org/2000/svg",
3989
3989
  viewBox: "0 0 20 20",
3990
3990
  fill: "currentColor",
3991
3991
  height: "20",
3992
3992
  width: "20"
3993
- }, /*#__PURE__*/ R.createElement("path", {
3993
+ }, /*#__PURE__*/ L.createElement("path", {
3994
3994
  fillRule: "evenodd",
3995
3995
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
3996
3996
  clipRule: "evenodd"
3997
- })), fc = /*#__PURE__*/ R.createElement("svg", {
3997
+ })), fc = /*#__PURE__*/ L.createElement("svg", {
3998
3998
  xmlns: "http://www.w3.org/2000/svg",
3999
3999
  width: "12",
4000
4000
  height: "12",
@@ -4004,19 +4004,19 @@ var ac = (e) => {
4004
4004
  strokeWidth: "1.5",
4005
4005
  strokeLinecap: "round",
4006
4006
  strokeLinejoin: "round"
4007
- }, /*#__PURE__*/ R.createElement("line", {
4007
+ }, /*#__PURE__*/ L.createElement("line", {
4008
4008
  x1: "18",
4009
4009
  y1: "6",
4010
4010
  x2: "6",
4011
4011
  y2: "18"
4012
- }), /*#__PURE__*/ R.createElement("line", {
4012
+ }), /*#__PURE__*/ L.createElement("line", {
4013
4013
  x1: "6",
4014
4014
  y1: "6",
4015
4015
  x2: "18",
4016
4016
  y2: "18"
4017
4017
  })), pc = () => {
4018
- let [e, t] = R.useState(document.hidden);
4019
- return R.useEffect(() => {
4018
+ let [e, t] = L.useState(document.hidden);
4019
+ return L.useEffect(() => {
4020
4020
  let e = () => {
4021
4021
  t(document.hidden);
4022
4022
  };
@@ -4092,14 +4092,14 @@ var ac = (e) => {
4092
4092
  description: typeof t.description == "function" ? void 0 : t.description
4093
4093
  }));
4094
4094
  let r = Promise.resolve(e instanceof Function ? e() : e), i = n !== void 0, a, o = r.then(async (e) => {
4095
- if (a = ["resolve", e], R.isValidElement(e)) i = !1, this.create({
4095
+ if (a = ["resolve", e], L.isValidElement(e)) i = !1, this.create({
4096
4096
  id: n,
4097
4097
  type: "default",
4098
4098
  message: e
4099
4099
  });
4100
4100
  else if (_c(e) && !e.ok) {
4101
4101
  i = !1;
4102
- let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4102
+ let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4103
4103
  this.create({
4104
4104
  id: n,
4105
4105
  type: "error",
@@ -4108,7 +4108,7 @@ var ac = (e) => {
4108
4108
  });
4109
4109
  } else if (e instanceof Error) {
4110
4110
  i = !1;
4111
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4111
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4112
4112
  this.create({
4113
4113
  id: n,
4114
4114
  type: "error",
@@ -4117,7 +4117,7 @@ var ac = (e) => {
4117
4117
  });
4118
4118
  } else if (t.success !== void 0) {
4119
4119
  i = !1;
4120
- let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4120
+ let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4121
4121
  this.create({
4122
4122
  id: n,
4123
4123
  type: "success",
@@ -4128,7 +4128,7 @@ var ac = (e) => {
4128
4128
  }).catch(async (e) => {
4129
4129
  if (a = ["reject", e], t.error !== void 0) {
4130
4130
  i = !1;
4131
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4131
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4132
4132
  this.create({
4133
4133
  id: n,
4134
4134
  type: "error",
@@ -4183,13 +4183,13 @@ function kc(e) {
4183
4183
  return t && r.push(t), n && r.push(n), r;
4184
4184
  }
4185
4185
  var Ac = (e) => {
4186
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = R.useState(null), [O, ee] = R.useState(null), [te, ne] = R.useState(!1), [k, A] = R.useState(!1), [re, j] = R.useState(!1), [ie, M] = R.useState(!1), [ae, N] = R.useState(!1), [oe, se] = R.useState(0), [ce, P] = R.useState(0), F = R.useRef(n.duration || y || Cc), I = R.useRef(null), L = R.useRef(null), le = c === 0, ue = c + 1 <= o, de = n.type, fe = n.dismissible !== !1, pe = n.className || "", z = n.descriptionClassName || "", me = R.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), B = R.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), V = R.useMemo(() => n.duration || y || Cc, [n.duration, y]), H = R.useRef(0), U = R.useRef(0), he = R.useRef(0), W = R.useRef(null), [G, ge] = b.split("-"), _e = R.useMemo(() => s.reduce((e, t, n) => n >= me ? e : e + t.height, 0), [s, me]), ve = pc(), ye = n.invert || t, be = de === "loading";
4187
- U.current = R.useMemo(() => me * x + _e, [me, _e]), R.useEffect(() => {
4188
- F.current = V;
4189
- }, [V]), R.useEffect(() => {
4186
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = L.useState(null), [O, ee] = L.useState(null), [te, ne] = L.useState(!1), [k, A] = L.useState(!1), [re, j] = L.useState(!1), [ie, M] = L.useState(!1), [ae, N] = L.useState(!1), [oe, se] = L.useState(0), [ce, P] = L.useState(0), F = L.useRef(n.duration || y || Cc), le = L.useRef(null), I = L.useRef(null), ue = c === 0, de = c + 1 <= o, fe = n.type, pe = n.dismissible !== !1, me = n.className || "", R = n.descriptionClassName || "", he = L.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), z = L.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), B = L.useMemo(() => n.duration || y || Cc, [n.duration, y]), V = L.useRef(0), H = L.useRef(0), ge = L.useRef(0), U = L.useRef(null), [W, _e] = b.split("-"), ve = L.useMemo(() => s.reduce((e, t, n) => n >= he ? e : e + t.height, 0), [s, he]), ye = pc(), be = n.invert || t, xe = fe === "loading";
4187
+ H.current = L.useMemo(() => he * x + ve, [he, ve]), L.useEffect(() => {
4188
+ F.current = B;
4189
+ }, [B]), L.useEffect(() => {
4190
4190
  ne(!0);
4191
- }, []), R.useEffect(() => {
4192
- let e = L.current;
4191
+ }, []), L.useEffect(() => {
4192
+ let e = I.current;
4193
4193
  if (e) {
4194
4194
  let t = e.getBoundingClientRect().height;
4195
4195
  return P(t), a((e) => [{
@@ -4198,9 +4198,9 @@ var Ac = (e) => {
4198
4198
  position: n.position
4199
4199
  }, ...e]), () => a((e) => e.filter((e) => e.toastId !== n.id));
4200
4200
  }
4201
- }, [a, n.id]), R.useLayoutEffect(() => {
4201
+ }, [a, n.id]), L.useLayoutEffect(() => {
4202
4202
  if (!te) return;
4203
- let e = L.current, t = e.style.height;
4203
+ let e = I.current, t = e.style.height;
4204
4204
  e.style.height = "auto";
4205
4205
  let r = e.getBoundingClientRect().height;
4206
4206
  e.style.height = t, P(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
@@ -4221,52 +4221,52 @@ var Ac = (e) => {
4221
4221
  n.action,
4222
4222
  n.cancel
4223
4223
  ]);
4224
- let xe = R.useCallback(() => {
4225
- A(!0), se(U.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
4224
+ let G = L.useCallback(() => {
4225
+ A(!0), se(H.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
4226
4226
  d(n);
4227
4227
  }, Dc);
4228
4228
  }, [
4229
4229
  n,
4230
4230
  d,
4231
4231
  a,
4232
- U
4232
+ H
4233
4233
  ]);
4234
- R.useEffect(() => {
4235
- if (n.promise && de === "loading" || n.duration === Infinity || n.type === "loading") return;
4234
+ L.useEffect(() => {
4235
+ if (n.promise && fe === "loading" || n.duration === Infinity || n.type === "loading") return;
4236
4236
  let e;
4237
- return u || i || ve ? (() => {
4238
- if (he.current < H.current) {
4239
- let e = (/* @__PURE__ */ new Date()).getTime() - H.current;
4237
+ return u || i || ye ? (() => {
4238
+ if (ge.current < V.current) {
4239
+ let e = (/* @__PURE__ */ new Date()).getTime() - V.current;
4240
4240
  F.current -= e;
4241
4241
  }
4242
- he.current = (/* @__PURE__ */ new Date()).getTime();
4243
- })() : F.current !== Infinity && (H.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
4244
- n.onAutoClose == null || n.onAutoClose.call(n, n), xe();
4242
+ ge.current = (/* @__PURE__ */ new Date()).getTime();
4243
+ })() : F.current !== Infinity && (V.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
4244
+ n.onAutoClose == null || n.onAutoClose.call(n, n), G();
4245
4245
  }, F.current)), () => clearTimeout(e);
4246
4246
  }, [
4247
4247
  u,
4248
4248
  i,
4249
4249
  n,
4250
- de,
4251
- ve,
4252
- xe
4253
- ]), R.useEffect(() => {
4254
- n.delete && (xe(), n.onDismiss == null || n.onDismiss.call(n, n));
4255
- }, [xe, n.delete]);
4250
+ fe,
4251
+ ye,
4252
+ G
4253
+ ]), L.useEffect(() => {
4254
+ n.delete && (G(), n.onDismiss == null || n.onDismiss.call(n, n));
4255
+ }, [G, n.delete]);
4256
4256
  function Se() {
4257
- return w?.loading ? /*#__PURE__*/ R.createElement("div", {
4257
+ return w?.loading ? /*#__PURE__*/ L.createElement("div", {
4258
4258
  className: Oc(C?.loader, n?.classNames?.loader, "sonner-loader"),
4259
- "data-visible": de === "loading"
4260
- }, w.loading) : /*#__PURE__*/ R.createElement(sc, {
4259
+ "data-visible": fe === "loading"
4260
+ }, w.loading) : /*#__PURE__*/ L.createElement(sc, {
4261
4261
  className: Oc(C?.loader, n?.classNames?.loader),
4262
- visible: de === "loading"
4262
+ visible: fe === "loading"
4263
4263
  });
4264
4264
  }
4265
- let Ce = n.icon || w?.[de] || ac(de);
4266
- return /*#__PURE__*/ R.createElement("li", {
4265
+ let Ce = n.icon || w?.[fe] || ac(fe);
4266
+ return /*#__PURE__*/ L.createElement("li", {
4267
4267
  tabIndex: 0,
4268
- ref: L,
4269
- className: Oc(_, pe, C?.toast, n?.classNames?.toast, C?.default, C?.[de], n?.classNames?.[de]),
4268
+ ref: I,
4269
+ className: Oc(_, me, C?.toast, n?.classNames?.toast, C?.default, C?.[fe], n?.classNames?.[fe]),
4270
4270
  "data-sonner-toast": "",
4271
4271
  "data-rich-colors": n.richColors ?? f,
4272
4272
  "data-styled": !(n.jsx || n.unstyled || r),
@@ -4274,15 +4274,15 @@ var Ac = (e) => {
4274
4274
  "data-promise": !!n.promise,
4275
4275
  "data-swiped": ae,
4276
4276
  "data-removed": k,
4277
- "data-visible": ue,
4278
- "data-y-position": G,
4279
- "data-x-position": ge,
4277
+ "data-visible": de,
4278
+ "data-y-position": W,
4279
+ "data-x-position": _e,
4280
4280
  "data-index": c,
4281
- "data-front": le,
4281
+ "data-front": ue,
4282
4282
  "data-swiping": re,
4283
- "data-dismissible": fe,
4284
- "data-type": de,
4285
- "data-invert": ye,
4283
+ "data-dismissible": pe,
4284
+ "data-type": fe,
4285
+ "data-invert": be,
4286
4286
  "data-swipe-out": ie,
4287
4287
  "data-swipe-direction": O,
4288
4288
  "data-expanded": !!(u || S && te),
@@ -4291,35 +4291,35 @@ var Ac = (e) => {
4291
4291
  "--index": c,
4292
4292
  "--toasts-before": c,
4293
4293
  "--z-index": l.length - c,
4294
- "--offset": `${k ? oe : U.current}px`,
4294
+ "--offset": `${k ? oe : H.current}px`,
4295
4295
  "--initial-height": S ? "auto" : `${ce}px`,
4296
4296
  ...m,
4297
4297
  ...n.style
4298
4298
  },
4299
4299
  onDragEnd: () => {
4300
- j(!1), D(null), W.current = null;
4300
+ j(!1), D(null), U.current = null;
4301
4301
  },
4302
4302
  onPointerDown: (e) => {
4303
- e.button !== 2 && (be || !fe || (I.current = /* @__PURE__ */ new Date(), se(U.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (j(!0), W.current = {
4303
+ e.button !== 2 && (xe || !pe || (le.current = /* @__PURE__ */ new Date(), se(H.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (j(!0), U.current = {
4304
4304
  x: e.clientX,
4305
4305
  y: e.clientY
4306
4306
  })));
4307
4307
  },
4308
4308
  onPointerUp: () => {
4309
- if (ie || !fe) return;
4310
- W.current = null;
4311
- let e = Number(L.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(L.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - I.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
4309
+ if (ie || !pe) return;
4310
+ U.current = null;
4311
+ let e = Number(I.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(I.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - le.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
4312
4312
  if (Math.abs(i) >= Ec || a > .11) {
4313
- se(U.current), n.onDismiss == null || n.onDismiss.call(n, n), ee(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), xe(), M(!0);
4313
+ se(H.current), n.onDismiss == null || n.onDismiss.call(n, n), ee(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), G(), M(!0);
4314
4314
  return;
4315
4315
  }
4316
4316
  var o, s;
4317
- (o = L.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = L.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), N(!1), j(!1), D(null);
4317
+ (o = I.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = I.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), N(!1), j(!1), D(null);
4318
4318
  },
4319
4319
  onPointerMove: (t) => {
4320
4320
  var n, r;
4321
- if (!W.current || !fe || window.getSelection()?.toString().length > 0) return;
4322
- let i = t.clientY - W.current.y, a = t.clientX - W.current.x, o = e.swipeDirections ?? kc(b);
4321
+ if (!U.current || !pe || window.getSelection()?.toString().length > 0) return;
4322
+ let i = t.clientY - U.current.y, a = t.clientX - U.current.x, o = e.swipeDirections ?? kc(b);
4323
4323
  !E && (Math.abs(a) > 1 || Math.abs(i) > 1) && D(Math.abs(a) > Math.abs(i) ? "x" : "y");
4324
4324
  let s = {
4325
4325
  x: 0,
@@ -4336,42 +4336,42 @@ var Ac = (e) => {
4336
4336
  let e = a * c(a);
4337
4337
  s.x = Math.abs(e) < Math.abs(a) ? e : a;
4338
4338
  }
4339
- (Math.abs(s.x) > 0 || Math.abs(s.y) > 0) && N(!0), (n = L.current) == null || n.style.setProperty("--swipe-amount-x", `${s.x}px`), (r = L.current) == null || r.style.setProperty("--swipe-amount-y", `${s.y}px`);
4339
+ (Math.abs(s.x) > 0 || Math.abs(s.y) > 0) && N(!0), (n = I.current) == null || n.style.setProperty("--swipe-amount-x", `${s.x}px`), (r = I.current) == null || r.style.setProperty("--swipe-amount-y", `${s.y}px`);
4340
4340
  }
4341
- }, B && !n.jsx && de !== "loading" ? /*#__PURE__*/ R.createElement("button", {
4341
+ }, z && !n.jsx && fe !== "loading" ? /*#__PURE__*/ L.createElement("button", {
4342
4342
  "aria-label": T,
4343
- "data-disabled": be,
4343
+ "data-disabled": xe,
4344
4344
  "data-close-button": !0,
4345
- onClick: be || !fe ? () => {} : () => {
4346
- xe(), n.onDismiss == null || n.onDismiss.call(n, n);
4345
+ onClick: xe || !pe ? () => {} : () => {
4346
+ G(), n.onDismiss == null || n.onDismiss.call(n, n);
4347
4347
  },
4348
4348
  className: Oc(C?.closeButton, n?.classNames?.closeButton)
4349
- }, w?.close ?? fc) : null, (de || n.icon || n.promise) && n.icon !== null && (w?.[de] !== null || n.icon) ? /*#__PURE__*/ R.createElement("div", {
4349
+ }, w?.close ?? fc) : null, (fe || n.icon || n.promise) && n.icon !== null && (w?.[fe] !== null || n.icon) ? /*#__PURE__*/ L.createElement("div", {
4350
4350
  "data-icon": "",
4351
4351
  className: Oc(C?.icon, n?.classNames?.icon)
4352
- }, n.promise || n.type === "loading" && !n.icon ? n.icon || Se() : null, n.type === "loading" ? null : Ce) : null, /*#__PURE__*/ R.createElement("div", {
4352
+ }, n.promise || n.type === "loading" && !n.icon ? n.icon || Se() : null, n.type === "loading" ? null : Ce) : null, /*#__PURE__*/ L.createElement("div", {
4353
4353
  "data-content": "",
4354
4354
  className: Oc(C?.content, n?.classNames?.content)
4355
- }, /*#__PURE__*/ R.createElement("div", {
4355
+ }, /*#__PURE__*/ L.createElement("div", {
4356
4356
  "data-title": "",
4357
4357
  className: Oc(C?.title, n?.classNames?.title)
4358
- }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ R.createElement("div", {
4358
+ }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ L.createElement("div", {
4359
4359
  "data-description": "",
4360
- className: Oc(v, z, C?.description, n?.classNames?.description)
4361
- }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ R.isValidElement(n.cancel) ? n.cancel : n.cancel && yc(n.cancel) ? /*#__PURE__*/ R.createElement("button", {
4360
+ className: Oc(v, R, C?.description, n?.classNames?.description)
4361
+ }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ L.isValidElement(n.cancel) ? n.cancel : n.cancel && yc(n.cancel) ? /*#__PURE__*/ L.createElement("button", {
4362
4362
  "data-button": !0,
4363
4363
  "data-cancel": !0,
4364
4364
  style: n.cancelButtonStyle || h,
4365
4365
  onClick: (e) => {
4366
- yc(n.cancel) && fe && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), xe());
4366
+ yc(n.cancel) && pe && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), G());
4367
4367
  },
4368
4368
  className: Oc(C?.cancelButton, n?.classNames?.cancelButton)
4369
- }, n.cancel.label) : null, /*#__PURE__*/ R.isValidElement(n.action) ? n.action : n.action && yc(n.action) ? /*#__PURE__*/ R.createElement("button", {
4369
+ }, n.cancel.label) : null, /*#__PURE__*/ L.isValidElement(n.action) ? n.action : n.action && yc(n.action) ? /*#__PURE__*/ L.createElement("button", {
4370
4370
  "data-button": !0,
4371
4371
  "data-action": !0,
4372
4372
  style: n.actionButtonStyle || g,
4373
4373
  onClick: (e) => {
4374
- yc(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && xe());
4374
+ yc(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && G());
4375
4375
  },
4376
4376
  className: Oc(C?.actionButton, n?.classNames?.actionButton)
4377
4377
  }, n.action.label) : null);
@@ -4405,11 +4405,11 @@ function Mc(e, t) {
4405
4405
  }) : o(a);
4406
4406
  }), n;
4407
4407
  }
4408
- var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4409
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = bc, toastOptions: g, dir: _ = jc(), gap: v = Tc, icons: y, containerAriaLabel: b = "Notifications" } = e, [x, S] = R.useState([]), C = R.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), w = R.useMemo(() => Array.from(new Set([i].concat(C.filter((e) => e.position).map((e) => e.position)))), [C, i]), [T, E] = R.useState([]), [D, O] = R.useState(!1), [ee, te] = R.useState(!1), [ne, k] = R.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), A = R.useRef(null), re = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), j = R.useRef(null), ie = R.useRef(!1), M = R.useCallback((e) => {
4408
+ var Nc = /*#__PURE__*/ L.forwardRef(function(e, t) {
4409
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = bc, toastOptions: g, dir: _ = jc(), gap: v = Tc, icons: y, containerAriaLabel: b = "Notifications" } = e, [x, S] = L.useState([]), C = L.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), w = L.useMemo(() => Array.from(new Set([i].concat(C.filter((e) => e.position).map((e) => e.position)))), [C, i]), [T, E] = L.useState([]), [D, O] = L.useState(!1), [ee, te] = L.useState(!1), [ne, k] = L.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), A = L.useRef(null), re = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), j = L.useRef(null), ie = L.useRef(!1), M = L.useCallback((e) => {
4410
4410
  S((t) => (t.find((t) => t.id === e.id)?.delete || hc.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
4411
4411
  }, []);
4412
- return R.useEffect(() => hc.subscribe((e) => {
4412
+ return L.useEffect(() => hc.subscribe((e) => {
4413
4413
  if (e.dismiss) {
4414
4414
  requestAnimationFrame(() => {
4415
4415
  S((t) => t.map((t) => t.id === e.id ? {
@@ -4420,7 +4420,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4420
4420
  return;
4421
4421
  }
4422
4422
  setTimeout(() => {
4423
- ge.flushSync(() => {
4423
+ _e.flushSync(() => {
4424
4424
  S((t) => {
4425
4425
  let n = t.findIndex((t) => t.id === e.id);
4426
4426
  return n === -1 ? [e, ...t] : [
@@ -4434,7 +4434,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4434
4434
  });
4435
4435
  });
4436
4436
  });
4437
- }), [x]), R.useEffect(() => {
4437
+ }), [x]), L.useEffect(() => {
4438
4438
  if (d !== "system") {
4439
4439
  k(d);
4440
4440
  return;
@@ -4454,9 +4454,9 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4454
4454
  }
4455
4455
  });
4456
4456
  }
4457
- }, [d]), R.useEffect(() => {
4457
+ }, [d]), L.useEffect(() => {
4458
4458
  x.length <= 1 && O(!1);
4459
- }, [x]), R.useEffect(() => {
4459
+ }, [x]), L.useEffect(() => {
4460
4460
  let e = (e) => {
4461
4461
  if (a.every((t) => e[t] || e.code === t)) {
4462
4462
  var t;
@@ -4465,11 +4465,11 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4465
4465
  e.code === "Escape" && (document.activeElement === A.current || A.current?.contains(document.activeElement)) && O(!1);
4466
4466
  };
4467
4467
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
4468
- }, [a]), R.useEffect(() => {
4468
+ }, [a]), L.useEffect(() => {
4469
4469
  if (A.current) return () => {
4470
4470
  j.current && (j.current.focus({ preventScroll: !0 }), j.current = null, ie.current = !1);
4471
4471
  };
4472
- }, [A.current]), /*#__PURE__*/ R.createElement("section", {
4472
+ }, [A.current]), /*#__PURE__*/ L.createElement("section", {
4473
4473
  ref: t,
4474
4474
  "aria-label": `${b} ${re}`,
4475
4475
  tabIndex: -1,
@@ -4479,7 +4479,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4479
4479
  suppressHydrationWarning: !0
4480
4480
  }, w.map((t, n) => {
4481
4481
  let [i, a] = t.split("-");
4482
- return C.length ? /*#__PURE__*/ R.createElement("ol", {
4482
+ return C.length ? /*#__PURE__*/ L.createElement("ol", {
4483
4483
  key: t,
4484
4484
  dir: _ === "auto" ? jc() : _,
4485
4485
  tabIndex: -1,
@@ -4512,7 +4512,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4512
4512
  e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || te(!0);
4513
4513
  },
4514
4514
  onPointerUp: () => te(!1)
4515
- }, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ R.createElement(Ac, {
4515
+ }, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ L.createElement(Ac, {
4516
4516
  key: n.id,
4517
4517
  icons: y,
4518
4518
  index: i,
@@ -4544,15 +4544,15 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4544
4544
  }));
4545
4545
  }), Pc = ({ ...e }) => {
4546
4546
  let { theme: t = "system" } = rc();
4547
- return /* @__PURE__ */ W(Nc, {
4547
+ return /* @__PURE__ */ U(Nc, {
4548
4548
  theme: t,
4549
4549
  className: "toaster group",
4550
4550
  icons: {
4551
- success: /* @__PURE__ */ W(Ms, { className: "size-4" }),
4552
- info: /* @__PURE__ */ W(Ps, { className: "size-4" }),
4553
- warning: /* @__PURE__ */ W(n, { className: "size-4" }),
4554
- error: /* @__PURE__ */ W(Fs, { className: "size-4" }),
4555
- loading: /* @__PURE__ */ W(d, { className: "size-4 animate-spin" })
4551
+ success: /* @__PURE__ */ U(Ms, { className: "size-4" }),
4552
+ info: /* @__PURE__ */ U(Ps, { className: "size-4" }),
4553
+ warning: /* @__PURE__ */ U(P, { className: "size-4" }),
4554
+ error: /* @__PURE__ */ U(Fs, { className: "size-4" }),
4555
+ loading: /* @__PURE__ */ U(te, { className: "size-4 animate-spin" })
4556
4556
  },
4557
4557
  style: {
4558
4558
  "--normal-bg": "var(--popover)",
@@ -4566,23 +4566,23 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4566
4566
  //#endregion
4567
4567
  //#region src/ui/components/ui/textarea.tsx
4568
4568
  function Fc({ className: e, ...t }) {
4569
- return /* @__PURE__ */ W("textarea", {
4569
+ return /* @__PURE__ */ U("textarea", {
4570
4570
  "data-slot": "textarea",
4571
- className: A("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
4571
+ className: D("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
4572
4572
  ...t
4573
4573
  });
4574
4574
  }
4575
4575
  //#endregion
4576
4576
  //#region src/platform/datasource/remotePreflight.ts
4577
- var Ic = 220;
4578
- function Lc(e) {
4577
+ var Ic = 220, Lc = 2e4;
4578
+ function Rc(e) {
4579
4579
  let t = e.trim();
4580
4580
  return t ? t.length > Ic ? `${t.slice(0, Ic)}…` : t : "";
4581
4581
  }
4582
- function Rc(e, t) {
4582
+ function zc(e, t) {
4583
4583
  return `Content-Range: ${e.trim() || "(empty)"}; Accept-Ranges: ${t.trim() || "(empty)"}`;
4584
4584
  }
4585
- var zc = {
4585
+ var Bc = {
4586
4586
  range_http: "Range preflight failed: expected HTTP 206 (Partial Content), actual {actualStatus}.",
4587
4587
  range_headers: "Range not supported: expected Accept-Ranges: bytes or a bytes Content-Range; actual: {headerSummary}.",
4588
4588
  full_download_too_large: "This server does not support Range requests and the complete archive exceeds the safe download limit.",
@@ -4590,17 +4590,17 @@ var zc = {
4590
4590
  network: "Network or authentication failed: {detail}.",
4591
4591
  unknown: "Preflight failed: {detail}."
4592
4592
  };
4593
- function Bc(e, t) {
4593
+ function Vc(e, t) {
4594
4594
  let n = `dialogs.remoteArchive.error.${t.code}`, r = {};
4595
- return t.actualStatus !== void 0 && (r.actualStatus = t.actualStatus), t.headerSummary && (r.headerSummary = t.headerSummary), t.detail && (r.detail = t.detail), e(n, zc[t.code], r);
4595
+ return t.actualStatus !== void 0 && (r.actualStatus = t.actualStatus), t.headerSummary && (r.headerSummary = t.headerSummary), t.detail && (r.detail = t.detail), e(n, Bc[t.code], r);
4596
4596
  }
4597
- function Vc(e) {
4597
+ function Hc(e) {
4598
4598
  let t = e.get("content-length");
4599
4599
  if (!t) return;
4600
4600
  let n = Number(t);
4601
4601
  return Number.isSafeInteger(n) && n >= 0 ? n : void 0;
4602
4602
  }
4603
- async function Hc(e, t) {
4603
+ async function Uc(e, t) {
4604
4604
  if (!e.body) return /* @__PURE__ */ new Uint8Array();
4605
4605
  let n = e.body.getReader(), r = [], i = 0;
4606
4606
  try {
@@ -4617,10 +4617,10 @@ async function Hc(e, t) {
4617
4617
  for (let e of r) a.set(e, o), o += e.byteLength;
4618
4618
  return a;
4619
4619
  }
4620
- function Uc(e, t, n) {
4620
+ function Wc(e, t, n) {
4621
4621
  return hs(n) || ms(t) || fs(e);
4622
4622
  }
4623
- function Wc() {
4623
+ function Gc() {
4624
4624
  return {
4625
4625
  ok: !1,
4626
4626
  kind: "unknown",
@@ -4630,52 +4630,100 @@ function Wc() {
4630
4630
  }
4631
4631
  };
4632
4632
  }
4633
- async function Gc(e) {
4633
+ function Kc(e) {
4634
+ if (e instanceof DOMException && (e.name === "TimeoutError" || e.name === "AbortError")) return !0;
4635
+ let t = String(e?.message || e).toLowerCase();
4636
+ return t.includes("timeout") || t.includes("timed out") || t.includes("aborted");
4637
+ }
4638
+ function qc(e) {
4639
+ let t = new AbortController(), n = setTimeout(() => {
4640
+ t.abort();
4641
+ }, e);
4642
+ return {
4643
+ signal: t.signal,
4644
+ cancel: () => clearTimeout(n)
4645
+ };
4646
+ }
4647
+ async function Jc(e) {
4648
+ let t;
4649
+ try {
4650
+ let n = new URL(e);
4651
+ if (n.protocol !== "https:") return {
4652
+ ok: !1,
4653
+ kind: "network",
4654
+ failure: {
4655
+ code: "network",
4656
+ detail: "Blocked insecure HTTP archive URL; use HTTPS"
4657
+ }
4658
+ };
4659
+ t = n.toString();
4660
+ } catch {
4661
+ return {
4662
+ ok: !1,
4663
+ kind: "unknown",
4664
+ failure: {
4665
+ code: "unknown",
4666
+ detail: "Invalid archive URL"
4667
+ }
4668
+ };
4669
+ }
4670
+ let { signal: n, cancel: r } = qc(Lc);
4634
4671
  try {
4635
- let t = await fetch(e, { headers: { Range: "bytes=0-511" } }), n = Vc(t.headers);
4636
- if (t.status === 200) {
4637
- if (n !== void 0 && n > 2147483648) return await t.body?.cancel().catch(() => void 0), {
4672
+ let r = await fetch(t, {
4673
+ headers: { Range: "bytes=0-511" },
4674
+ signal: n
4675
+ }), i = Hc(r.headers);
4676
+ if (r.status === 200) {
4677
+ if (i !== void 0 && i > 2147483648) return await r.body?.cancel().catch(() => void 0), {
4638
4678
  ok: !1,
4639
4679
  kind: "range",
4640
4680
  failure: {
4641
4681
  code: "full_download_too_large",
4642
- actualStatus: t.status
4682
+ actualStatus: r.status
4643
4683
  }
4644
4684
  };
4645
- let r = await Hc(t, 512), i = Uc(e, t.headers, r);
4646
- return i ? {
4685
+ let t = await Uc(r, 512), n = Wc(e, r.headers, t);
4686
+ return n ? {
4647
4687
  ok: !0,
4648
- kind: i,
4688
+ kind: n,
4649
4689
  accessMode: "full",
4650
- contentLength: n
4651
- } : Wc();
4690
+ contentLength: i
4691
+ } : Gc();
4652
4692
  }
4653
- if (t.status !== 206) return {
4693
+ if (r.status !== 206) return {
4654
4694
  ok: !1,
4655
4695
  kind: "range",
4656
4696
  failure: {
4657
4697
  code: "range_http",
4658
- actualStatus: t.status
4698
+ actualStatus: r.status
4659
4699
  }
4660
4700
  };
4661
- let r = t.headers.get("content-range") || "", i = t.headers.get("accept-ranges") || "";
4662
- if (!r.toLowerCase().startsWith("bytes ") && !i.toLowerCase().includes("bytes")) return {
4701
+ let a = r.headers.get("content-range") || "", o = r.headers.get("accept-ranges") || "";
4702
+ if (!a.toLowerCase().startsWith("bytes ") && !o.toLowerCase().includes("bytes")) return {
4663
4703
  ok: !1,
4664
4704
  kind: "range",
4665
4705
  failure: {
4666
4706
  code: "range_headers",
4667
- headerSummary: Rc(r, i)
4707
+ headerSummary: zc(a, o)
4668
4708
  }
4669
4709
  };
4670
- let a = await Hc(t, 512), o = Uc(e, t.headers, a);
4671
- return o ? {
4710
+ let s = await Uc(r, 512), c = Wc(e, r.headers, s);
4711
+ return c ? {
4672
4712
  ok: !0,
4673
- kind: o,
4713
+ kind: c,
4674
4714
  accessMode: "range",
4675
- contentLength: n
4676
- } : Wc();
4715
+ contentLength: i
4716
+ } : Gc();
4677
4717
  } catch (e) {
4678
- let t = Lc(e.message || String(e)), n = t.toLowerCase();
4718
+ if (Kc(e)) return {
4719
+ ok: !1,
4720
+ kind: "network",
4721
+ failure: {
4722
+ code: "network",
4723
+ detail: `Preflight timed out after ${Lc / 1e3}s`
4724
+ }
4725
+ };
4726
+ let t = Rc(e.message || String(e)), n = t.toLowerCase();
4679
4727
  return n.includes("cors") ? {
4680
4728
  ok: !1,
4681
4729
  kind: "cors",
@@ -4698,48 +4746,50 @@ async function Gc(e) {
4698
4746
  detail: t || "Unknown error"
4699
4747
  }
4700
4748
  };
4749
+ } finally {
4750
+ r();
4701
4751
  }
4702
4752
  }
4703
4753
  //#endregion
4704
4754
  //#region src/core/playback/episodeLoadPlan.ts
4705
- function Kc(e) {
4755
+ function Yc(e) {
4706
4756
  if (!e?.dtype) return !1;
4707
4757
  let t = e.dtype.toLowerCase();
4708
4758
  return t.includes("float") || t.includes("int") || t.includes("double") || t.includes("decimal");
4709
4759
  }
4710
- function qc(e) {
4760
+ function Xc(e) {
4711
4761
  return e === "observation" || e.startsWith("observation.") || e === "action" || e.startsWith("action.");
4712
4762
  }
4713
- function Jc(e) {
4763
+ function Zc(e) {
4714
4764
  let t = /* @__PURE__ */ new Set(["timestamp"]);
4715
4765
  return Object.entries(e.features).forEach(([e, n]) => {
4716
- qc(e) && Kc(n) && t.add(e);
4766
+ Xc(e) && Yc(n) && t.add(e);
4717
4767
  }), Array.from(t);
4718
4768
  }
4719
- function Yc(e, t) {
4769
+ function Qc(e, t) {
4720
4770
  let n = e.timestamp, r = n ? Array.from(n.values.slice(0, n.rows), (e, n) => Number.isFinite(e) ? e : n / Math.max(1, t)) : [], i = r.length || Object.values(e).reduce((e, t) => Math.max(e, t.rows), 0);
4721
4771
  return Array.from({ length: i }, (e, n) => ({
4722
4772
  frame_index: n,
4723
4773
  timestamp: r[n] ?? n / Math.max(1, t)
4724
4774
  }));
4725
4775
  }
4726
- function Xc(e, t) {
4776
+ function $c(e, t) {
4727
4777
  return e.find((e) => !t.has(e.episode_index))?.episode_index ?? null;
4728
4778
  }
4729
4779
  //#endregion
4730
4780
  //#region src/core/playback/playbackAutoplay.ts
4731
- function Zc(e) {
4781
+ function el(e) {
4732
4782
  return e.totalFrames <= 0 || e.isLoading || e.isPlaying || e.userPaused ? !1 : e.lastAutoPlayId !== e.currentId;
4733
4783
  }
4734
4784
  //#endregion
4735
4785
  //#region src/core/utils/episodeKeyboard.ts
4736
- var Qc = (e) => e === "Enter";
4786
+ var tl = (e) => e === "Enter";
4737
4787
  //#endregion
4738
4788
  //#region src/platform/services/ParquetImageService.ts
4739
- function $c() {
4789
+ function nl() {
4740
4790
  return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
4741
4791
  }
4742
- var el = class {
4792
+ var rl = class {
4743
4793
  worker = null;
4744
4794
  rawWorker = null;
4745
4795
  dataSource = null;
@@ -4762,7 +4812,7 @@ var el = class {
4762
4812
  }
4763
4813
  async getWorker() {
4764
4814
  if (this.assertActive(), !this.worker) {
4765
- let { remote: e, raw: t } = le();
4815
+ let { remote: e, raw: t } = ue();
4766
4816
  this.worker = e, this.rawWorker = t, this.bindRawWorkerMessages(t), await this.worker.init(), this.assertActive();
4767
4817
  }
4768
4818
  return this.worker;
@@ -4815,7 +4865,7 @@ var el = class {
4815
4865
  }
4816
4866
  async preloadEpisode(e, t, n, r, i) {
4817
4867
  this.assertActive(), await this.getWorker(), this.currentPreloadKey = r;
4818
- let a = $c(), o = new Promise((e, t) => {
4868
+ let a = nl(), o = new Promise((e, t) => {
4819
4869
  this.pendingPreloadCallbacks.set(a, {
4820
4870
  resolve: e,
4821
4871
  reject: t,
@@ -4833,7 +4883,7 @@ var el = class {
4833
4883
  }
4834
4884
  async getFrameBitmap(e, t, n) {
4835
4885
  if (this.disposed || !this.rawWorker) return null;
4836
- let r = $c(), i = new Promise((e, t) => {
4886
+ let r = nl(), i = new Promise((e, t) => {
4837
4887
  this.pendingBitmapCallbacks.set(r, {
4838
4888
  resolve: e,
4839
4889
  reject: t
@@ -4933,18 +4983,18 @@ var el = class {
4933
4983
  try {
4934
4984
  await this.worker.clearCache();
4935
4985
  } catch {}
4936
- L(this.worker), this.worker = null, this.rawWorker = null;
4986
+ I(this.worker), this.worker = null, this.rawWorker = null;
4937
4987
  }
4938
4988
  });
4939
4989
  }
4940
4990
  };
4941
- function tl() {
4942
- return new el();
4991
+ function il() {
4992
+ return new rl();
4943
4993
  }
4944
- new el();
4994
+ new rl();
4945
4995
  //#endregion
4946
4996
  //#region src/platform/utils/storage.ts
4947
- var nl = {
4997
+ var al = {
4948
4998
  getItem(e) {
4949
4999
  if (typeof window > "u") return null;
4950
5000
  try {
@@ -4986,9 +5036,9 @@ var nl = {
4986
5036
  return console.error(`[safeStorage] Failed to stringify JSON for "${e}":`, t), !1;
4987
5037
  }
4988
5038
  }
4989
- }, rl = ({ children: e, controlledTheme: t, rootElement: n }) => {
4990
- let r = t !== void 0, [i, a] = U(() => r ? t : nl.getItem("theme") || "system"), o = r ? t : i, [s, c] = U(() => o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o);
4991
- return B(() => {
5039
+ }, ol = ({ children: e, controlledTheme: t, rootElement: n }) => {
5040
+ let r = t !== void 0, [i, a] = H(() => r ? t : al.getItem("theme") || "system"), o = r ? t : i, [s, c] = H(() => o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o);
5041
+ return z(() => {
4992
5042
  let e = () => {
4993
5043
  let e;
4994
5044
  e = o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o, c(e), n && n.classList.toggle("dark", e === "dark");
@@ -4999,18 +5049,18 @@ var nl = {
4999
5049
  let t = window.matchMedia("(prefers-color-scheme: dark)");
5000
5050
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
5001
5051
  }
5002
- }, [o, n]), /* @__PURE__ */ W(k.Provider, {
5052
+ }, [o, n]), /* @__PURE__ */ U(E.Provider, {
5003
5053
  value: {
5004
5054
  theme: o,
5005
5055
  setTheme: (e) => {
5006
- a(e), r || nl.setItem("theme", e);
5056
+ a(e), r || al.setItem("theme", e);
5007
5057
  },
5008
5058
  resolvedTheme: s
5009
5059
  },
5010
5060
  children: e
5011
5061
  });
5012
- }, il = fe(null), al = ({ children: e }) => {
5013
- let [t, n] = U([]), r = z((e) => {
5062
+ }, sl = pe(null), cl = ({ children: e }) => {
5063
+ let [t, n] = H([]), r = R((e) => {
5014
5064
  n((t) => {
5015
5065
  let n = t.findIndex((t) => t.id === e.id);
5016
5066
  if (n === -1) return [...t, e];
@@ -5020,18 +5070,18 @@ var nl = {
5020
5070
  ...e
5021
5071
  }, r;
5022
5072
  });
5023
- }, []), i = z((e) => {
5073
+ }, []), i = R((e) => {
5024
5074
  n((t) => t.map((t) => t.id === e ? {
5025
5075
  ...t,
5026
5076
  phase: "ready"
5027
5077
  } : t));
5028
- }, []), a = z((e, t) => {
5078
+ }, []), a = R((e, t) => {
5029
5079
  n((n) => n.map((n) => n.id === e ? {
5030
5080
  ...n,
5031
5081
  phase: "error",
5032
5082
  error: t
5033
5083
  } : n));
5034
- }, []), o = z(() => n([]), []), s = V(() => ({
5084
+ }, []), o = R(() => n([]), []), s = B(() => ({
5035
5085
  tasks: t,
5036
5086
  upsertTask: r,
5037
5087
  completeTask: i,
@@ -5044,16 +5094,16 @@ var nl = {
5044
5094
  a,
5045
5095
  o
5046
5096
  ]);
5047
- return /* @__PURE__ */ W(il.Provider, {
5097
+ return /* @__PURE__ */ U(sl.Provider, {
5048
5098
  value: s,
5049
5099
  children: e
5050
5100
  });
5051
- }, ol = () => {
5052
- let e = me(il);
5101
+ }, ll = () => {
5102
+ let e = he(sl);
5053
5103
  if (!e) throw Error("useLoading must be used within LoadingProvider");
5054
5104
  return e;
5055
- }, sl = fe(null), cl = ({ children: e }) => {
5056
- let t = z((e, t = "info", n = 3e3) => {
5105
+ }, ul = pe(null), dl = ({ children: e }) => {
5106
+ let t = R((e, t = "info", n = 3e3) => {
5057
5107
  let r = { duration: n };
5058
5108
  switch (t) {
5059
5109
  case "success":
@@ -5067,26 +5117,26 @@ var nl = {
5067
5117
  break;
5068
5118
  default: vc.info(e, r);
5069
5119
  }
5070
- }, []), n = z((e) => {
5120
+ }, []), n = R((e) => {
5071
5121
  e ? vc.dismiss(e) : vc.dismiss();
5072
- }, []), r = V(() => ({
5122
+ }, []), r = B(() => ({
5073
5123
  showToast: t,
5074
5124
  dismissToast: n
5075
5125
  }), [t, n]);
5076
- return /* @__PURE__ */ W(sl.Provider, {
5126
+ return /* @__PURE__ */ U(ul.Provider, {
5077
5127
  value: r,
5078
5128
  children: e
5079
5129
  });
5080
5130
  };
5081
5131
  //#endregion
5082
5132
  //#region src/react/contexts/versionMutationPolicy.ts
5083
- function ll(e) {
5133
+ function fl(e) {
5084
5134
  if (e?.status !== "supported") {
5085
5135
  let t = e?.normalizedVersion ?? "unknown", n = e?.status ?? "unavailable";
5086
5136
  throw Error(`Episode mutations are disabled for LeRobot ${t} (${n}); the dataset is immutable`);
5087
5137
  }
5088
5138
  }
5089
- function ul(e) {
5139
+ function pl(e) {
5090
5140
  return {
5091
5141
  tasks: [e],
5092
5142
  task_index: void 0
@@ -5094,38 +5144,38 @@ function ul(e) {
5094
5144
  }
5095
5145
  //#endregion
5096
5146
  //#region src/react/contexts/useEpisodeView.ts
5097
- function dl(e, t) {
5147
+ function ml(e, t) {
5098
5148
  let n = t.get(e.episode_index);
5099
5149
  return n ? {
5100
5150
  ...e,
5101
5151
  ...n
5102
5152
  } : e;
5103
5153
  }
5104
- function fl(e, t, n) {
5105
- return e.filter((e) => !t.has(e.episode_index)).map((e) => dl(e, n));
5154
+ function hl(e, t, n) {
5155
+ return e.filter((e) => !t.has(e.episode_index)).map((e) => ml(e, n));
5106
5156
  }
5107
- function pl(e, t) {
5157
+ function gl(e, t) {
5108
5158
  return t.size === 0 ? e : e.filter((e) => t.has(e.episode_index));
5109
5159
  }
5110
- function ml(e, t) {
5160
+ function _l(e, t) {
5111
5161
  let n = new Set(e);
5112
5162
  return n.has(t) ? n.delete(t) : n.add(t), n;
5113
5163
  }
5114
- function hl({ episodes: e, versionCapability: t }) {
5115
- let [n, r] = U(() => /* @__PURE__ */ new Map()), [i, a] = U(() => /* @__PURE__ */ new Set()), [o, s] = U(() => /* @__PURE__ */ new Set()), c = z((n, i) => {
5116
- ll(t), r((t) => {
5164
+ function vl({ episodes: e, versionCapability: t }) {
5165
+ let [n, r] = H(() => /* @__PURE__ */ new Map()), [i, a] = H(() => /* @__PURE__ */ new Set()), [o, s] = H(() => /* @__PURE__ */ new Set()), c = R((n, i) => {
5166
+ fl(t), r((t) => {
5117
5167
  if (!e.some((e) => e.episode_index === n)) return t;
5118
5168
  let r = new Map(t);
5119
- return r.set(n, ul(i)), r;
5169
+ return r.set(n, pl(i)), r;
5120
5170
  });
5121
- }, [e, t]), l = z((e) => {
5122
- ll(t), a((t) => new Set(t).add(e));
5123
- }, [t]), u = z((e) => {
5124
- ll(t), a((t) => {
5171
+ }, [e, t]), l = R((e) => {
5172
+ fl(t), a((t) => new Set(t).add(e));
5173
+ }, [t]), u = R((e) => {
5174
+ fl(t), a((t) => {
5125
5175
  let n = new Set(t);
5126
5176
  return n.delete(e), n;
5127
5177
  });
5128
- }, [t]), d = z((e) => dl(e, n), [n]), f = V(() => fl(e, i, n), [
5178
+ }, [t]), d = R((e) => ml(e, n), [n]), f = B(() => hl(e, i, n), [
5129
5179
  e,
5130
5180
  i,
5131
5181
  n
@@ -5138,25 +5188,25 @@ function hl({ episodes: e, versionCapability: t }) {
5138
5188
  selectedEpisodeIndices: o,
5139
5189
  setSelectedEpisodeIndices: s,
5140
5190
  effectiveEpisodes: f,
5141
- episodesForExport: V(() => pl(f, o), [f, o]),
5191
+ episodesForExport: B(() => gl(f, o), [f, o]),
5142
5192
  editEpisodeTask: c,
5143
5193
  deleteEpisode: l,
5144
5194
  restoreEpisode: u,
5145
5195
  getEffectiveEpisode: d,
5146
- toggleEpisodeSelection: z((e) => {
5147
- s((t) => ml(t, e));
5196
+ toggleEpisodeSelection: R((e) => {
5197
+ s((t) => _l(t, e));
5148
5198
  }, []),
5149
- selectAllInList: z((e) => {
5199
+ selectAllInList: R((e) => {
5150
5200
  s(new Set(e));
5151
5201
  }, []),
5152
- clearEpisodeSelection: z(() => {
5202
+ clearEpisodeSelection: R(() => {
5153
5203
  s(/* @__PURE__ */ new Set());
5154
5204
  }, [])
5155
5205
  };
5156
5206
  }
5157
5207
  //#endregion
5158
5208
  //#region src/react/contexts/useFeatureSubscriptions.ts
5159
- function gl(e) {
5209
+ function yl(e) {
5160
5210
  let t = [];
5161
5211
  for (let n = 0; n < e.rows; n++) {
5162
5212
  let r = n * e.width;
@@ -5164,10 +5214,10 @@ function gl(e) {
5164
5214
  }
5165
5215
  return t;
5166
5216
  }
5167
- function _l(e) {
5217
+ function bl(e) {
5168
5218
  return e?.dtype === "image" || e?.dtype === "video";
5169
5219
  }
5170
- var vl = class {
5220
+ var xl = class {
5171
5221
  subscriptions = {};
5172
5222
  pending = /* @__PURE__ */ new Set();
5173
5223
  loading = /* @__PURE__ */ new Set();
@@ -5180,13 +5230,13 @@ var vl = class {
5180
5230
  subscribe(e) {
5181
5231
  this.subscriptions[e] = (this.subscriptions[e] ?? 0) + 1;
5182
5232
  let t = this.options.getSnapshot();
5183
- return _l(t.info?.features[e]) || this.subscriptions[e] === 1 && t.featureData[e] === void 0 && (this.pending.add(e), this.ensureScheduled()), Promise.resolve();
5233
+ return bl(t.info?.features[e]) || this.subscriptions[e] === 1 && t.featureData[e] === void 0 && (this.pending.add(e), this.ensureScheduled()), Promise.resolve();
5184
5234
  }
5185
5235
  unsubscribe(e) {
5186
5236
  (this.subscriptions[e] ?? 0) > 0 && --this.subscriptions[e];
5187
5237
  }
5188
5238
  getSubscribedFeatureNames(e) {
5189
- return Object.entries(this.subscriptions).filter(([t, n]) => n > 0 && !_l(e.features[t])).map(([e]) => e);
5239
+ return Object.entries(this.subscriptions).filter(([t, n]) => n > 0 && !bl(e.features[t])).map(([e]) => e);
5190
5240
  }
5191
5241
  clearPending() {
5192
5242
  this.generation += 1, this.pending.clear(), this.loading.clear(), this.timer !== null && ((this.options.cancel ?? window.clearTimeout)(this.timer), this.timer = null);
@@ -5201,7 +5251,7 @@ var vl = class {
5201
5251
  this.pending.clear();
5202
5252
  return;
5203
5253
  }
5204
- let n = Array.from(this.pending).filter((e) => this.loading.has(e) || t.featureData[e] !== void 0 ? !1 : !_l(t.info?.features[e]));
5254
+ let n = Array.from(this.pending).filter((e) => this.loading.has(e) || t.featureData[e] !== void 0 ? !1 : !bl(t.info?.features[e]));
5205
5255
  if (n.length === 0) {
5206
5256
  this.pending.clear();
5207
5257
  return;
@@ -5212,7 +5262,7 @@ var vl = class {
5212
5262
  let r = {}, i = [];
5213
5263
  n.forEach((e) => {
5214
5264
  let n = t.chartData[e];
5215
- n ? r[e] = gl(n) : i.push(e);
5265
+ n ? r[e] = yl(n) : i.push(e);
5216
5266
  }), Object.keys(r).length > 0 && this.options.getSnapshot().episodeIndex === t.episodeIndex && this.options.onFeatureData(r);
5217
5267
  try {
5218
5268
  if (i.length > 0) {
@@ -5231,8 +5281,8 @@ var vl = class {
5231
5281
  }, 0));
5232
5282
  }
5233
5283
  };
5234
- function yl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, featureData: i, setFeatureData: a }) {
5235
- let o = H({
5284
+ function Sl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, featureData: i, setFeatureData: a }) {
5285
+ let o = V({
5236
5286
  episodeIndex: e,
5237
5287
  loader: t,
5238
5288
  info: n,
@@ -5246,30 +5296,30 @@ function yl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, fea
5246
5296
  chartData: r,
5247
5297
  featureData: i
5248
5298
  };
5249
- let s = H(null);
5250
- return s.current ||= new vl({
5299
+ let s = V(null);
5300
+ return s.current ||= new xl({
5251
5301
  getSnapshot: () => o.current,
5252
5302
  onFeatureData: (e) => a((t) => ({
5253
5303
  ...t,
5254
5304
  ...e
5255
5305
  })),
5256
5306
  onError: (e, t) => console.error(e, t)
5257
- }), B(() => {
5307
+ }), z(() => {
5258
5308
  s.current?.clearPending();
5259
- }, [e]), B(() => () => s.current?.dispose(), []), {
5260
- subscribeFeature: z((e) => s.current.subscribe(e), []),
5261
- unsubscribeFeature: z((e) => {
5309
+ }, [e]), z(() => () => s.current?.dispose(), []), {
5310
+ subscribeFeature: R((e) => s.current.subscribe(e), []),
5311
+ unsubscribeFeature: R((e) => {
5262
5312
  s.current.unsubscribe(e);
5263
5313
  }, []),
5264
- clearPendingFeatureLoads: z(() => {
5314
+ clearPendingFeatureLoads: R(() => {
5265
5315
  s.current.clearPending();
5266
5316
  }, []),
5267
- getSubscribedFeatureNames: z((e) => s.current.getSubscribedFeatureNames(e), [])
5317
+ getSubscribedFeatureNames: R((e) => s.current.getSubscribedFeatureNames(e), [])
5268
5318
  };
5269
5319
  }
5270
5320
  //#endregion
5271
5321
  //#region src/react/services/PlaybackEngine.ts
5272
- var bl = class {
5322
+ var Cl = class {
5273
5323
  animationFrameId = null;
5274
5324
  timerId = null;
5275
5325
  lastTickTime = 0;
@@ -5344,7 +5394,7 @@ var bl = class {
5344
5394
  }
5345
5395
  this.scheduleNextTick(e, n);
5346
5396
  };
5347
- }, xl = class {
5397
+ }, wl = class {
5348
5398
  target = null;
5349
5399
  toggleOnce = !1;
5350
5400
  requestSet(e) {
@@ -5360,46 +5410,46 @@ var bl = class {
5360
5410
  } else this.toggleOnce && (this.toggleOnce = !1, t());
5361
5411
  }
5362
5412
  };
5363
- function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers: r, fps: i, playbackSpeed: a, playbackMode: o, episodes: s, selectedEpisodeIndex: c, deletedEpisodes: l, selectEpisodeRef: u }) {
5364
- let [d, f] = U(0), [p, m] = U(!1), h = H(new xl());
5365
- B(() => {
5413
+ function Tl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers: r, fps: i, playbackSpeed: a, playbackMode: o, episodes: s, selectedEpisodeIndex: c, deletedEpisodes: l, selectEpisodeRef: u }) {
5414
+ let [d, f] = H(0), [p, m] = H(!1), h = V(new wl());
5415
+ z(() => {
5366
5416
  let e = () => {
5367
5417
  document.hidden && m(!1);
5368
5418
  };
5369
5419
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
5370
5420
  }, []);
5371
- let g = z((e) => {
5421
+ let g = R((e) => {
5372
5422
  e < 0 || e >= t || (n.current = e, p || f(e), r(e));
5373
5423
  }, [
5374
5424
  t,
5375
5425
  n,
5376
5426
  p,
5377
5427
  r
5378
- ]), _ = z(() => {
5428
+ ]), _ = R(() => {
5379
5429
  if (e) {
5380
5430
  h.current.requestToggle();
5381
5431
  return;
5382
5432
  }
5383
5433
  m((e) => !e);
5384
- }, [e]), v = z((t) => {
5434
+ }, [e]), v = R((t) => {
5385
5435
  if (e) {
5386
5436
  h.current.requestSet(t);
5387
5437
  return;
5388
5438
  }
5389
5439
  m(t);
5390
5440
  }, [e]);
5391
- B(() => {
5441
+ z(() => {
5392
5442
  e || h.current.flush(m, () => m((e) => !e));
5393
5443
  }, [e]);
5394
- let y = z((t) => {
5444
+ let y = R((t) => {
5395
5445
  e || g(n.current + t);
5396
5446
  }, [
5397
5447
  n,
5398
5448
  e,
5399
5449
  g
5400
- ]), b = H(null);
5401
- return B(() => {
5402
- let e = new bl({
5450
+ ]), b = V(null);
5451
+ return z(() => {
5452
+ let e = new Cl({
5403
5453
  getFrameIndex: () => n.current,
5404
5454
  setFrameIndexSilent: (e) => {
5405
5455
  n.current = e;
@@ -5430,7 +5480,7 @@ function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
5430
5480
  l,
5431
5481
  u,
5432
5482
  r
5433
- ]), B(() => {
5483
+ ]), z(() => {
5434
5484
  let r = b.current;
5435
5485
  if (r) return p && t > 0 && !e ? r.start() : (r.stop(), !p && n.current !== d && f(n.current)), () => r.stop();
5436
5486
  }, [
@@ -5452,7 +5502,7 @@ function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
5452
5502
  }
5453
5503
  //#endregion
5454
5504
  //#region src/react/contexts/LeRobotProvider.tsx
5455
- function Cl(e) {
5505
+ function El(e) {
5456
5506
  let t = {};
5457
5507
  for (let [n, r] of Object.entries(e.features)) if (r && r.names && Array.isArray(r.names)) if (r.names.some((e) => Array.isArray(e))) {
5458
5508
  let e = r.names.flat(2).filter((e) => typeof e == "string");
@@ -5473,22 +5523,22 @@ function Cl(e) {
5473
5523
  features: t
5474
5524
  };
5475
5525
  }
5476
- var wl = ({ children: e }) => {
5477
- let [t, n] = U(null), r = H(null), [i, a] = U(() => {
5478
- let e = tl();
5526
+ var Dl = ({ children: e }) => {
5527
+ let [t, n] = H(null), r = V(null), [i, a] = H(() => {
5528
+ let e = il();
5479
5529
  return r.current = e, e;
5480
- }), [o, s] = U(null), [c, l] = U([]), [u, d] = U({}), [f, p] = U(null), [m, h] = U([]), [g, _] = U({}), [v, b] = U({}), [x, S] = U(!1), [C, w] = U(null), [T, E] = U("sequential"), [O, ee] = U(1), [te, ne] = U(null), [k, A] = U(!1), { upsertTask: M, completeTask: N, failTask: oe, clear: se, tasks: ce } = ol(), P = x || !!ce.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), F = t?.getVersionCapability() ?? null, I = F?.status === "read-only", { modifiedEpisodes: L, setModifiedEpisodes: le, deletedEpisodes: ue, setDeletedEpisodes: R, selectedEpisodeIndices: de, setSelectedEpisodeIndices: fe, effectiveEpisodes: pe, episodesForExport: me, editEpisodeTask: he, deleteEpisode: G, restoreEpisode: ge, getEffectiveEpisode: _e, toggleEpisodeSelection: ve, selectAllInList: ye, clearEpisodeSelection: be } = hl({
5530
+ }), [o, s] = H(null), [c, l] = H([]), [u, d] = H({}), [f, p] = H(null), [m, h] = H([]), [g, _] = H({}), [v, y] = H({}), [x, S] = H(!1), [C, w] = H(null), [T, E] = H("sequential"), [D, ee] = H(1), [te, ne] = H(null), [k, ie] = H(!1), { upsertTask: M, completeTask: N, failTask: oe, clear: se, tasks: ce } = ll(), P = x || !!ce.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), F = t?.getVersionCapability() ?? null, le = F?.status === "read-only", { modifiedEpisodes: I, setModifiedEpisodes: ue, deletedEpisodes: de, setDeletedEpisodes: L, selectedEpisodeIndices: fe, setSelectedEpisodeIndices: pe, effectiveEpisodes: me, episodesForExport: he, editEpisodeTask: ge, deleteEpisode: W, restoreEpisode: _e, getEffectiveEpisode: ve, toggleEpisodeSelection: ye, selectAllInList: be, clearEpisodeSelection: xe } = vl({
5481
5531
  episodes: c,
5482
5532
  versionCapability: F
5483
- }), xe = H(null), Se = H(null), Ce = H(/* @__PURE__ */ new Set()), we = H(!1), Te = H(0), Ee = H(0), De = H(/* @__PURE__ */ new Set()), Oe = H(async () => !1);
5484
- B(() => () => {
5485
- xe.current && xe.current.dispose().catch((e) => console.warn("Unmount dispose error:", e)), r.current?.dispose().catch((e) => console.warn("Unmount image dispose error:", e));
5533
+ }), G = V(null), Se = V(null), Ce = V(/* @__PURE__ */ new Set()), we = V(!1), Te = V(0), Ee = V(0), De = V(/* @__PURE__ */ new Set()), Oe = V(async () => !1);
5534
+ z(() => () => {
5535
+ G.current && G.current.dispose().catch((e) => console.warn("Unmount dispose error:", e)), r.current?.dispose().catch((e) => console.warn("Unmount image dispose error:", e));
5486
5536
  }, []);
5487
- let ke = H(null), Ae = z((e) => (De.current.add(e), queueMicrotask(() => {
5537
+ let ke = V(null), Ae = R((e) => (De.current.add(e), queueMicrotask(() => {
5488
5538
  De.current.has(e) && e(Ee.current);
5489
5539
  }), () => {
5490
5540
  De.current.delete(e);
5491
- }), []), je = z(() => Ee.current, []), Me = z((e) => {
5541
+ }), []), je = R(() => Ee.current, []), Me = R((e) => {
5492
5542
  De.current.forEach((t) => {
5493
5543
  try {
5494
5544
  t(e);
@@ -5496,29 +5546,29 @@ var wl = ({ children: e }) => {
5496
5546
  console.error("Frame subscriber error:", e);
5497
5547
  }
5498
5548
  });
5499
- }, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } = yl({
5549
+ }, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } = Sl({
5500
5550
  selectedEpisodeIndex: f,
5501
5551
  dataLoader: t,
5502
5552
  info: o,
5503
5553
  chartData: g,
5504
5554
  featureData: v,
5505
- setFeatureData: b
5506
- }), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } = Sl({
5555
+ setFeatureData: y
5556
+ }), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } = Tl({
5507
5557
  isBusy: P,
5508
5558
  frameCount: m.length,
5509
5559
  frameIndexRef: Ee,
5510
5560
  notifyFrameSubscribers: Me,
5511
5561
  fps: o?.fps,
5512
- playbackSpeed: O,
5562
+ playbackSpeed: D,
5513
5563
  playbackMode: T,
5514
5564
  episodes: c,
5515
5565
  selectedEpisodeIndex: f,
5516
- deletedEpisodes: ue,
5566
+ deletedEpisodes: de,
5517
5567
  selectEpisodeRef: Oe
5518
- }), Ge = z(async () => {
5568
+ }), Ge = R(async () => {
5519
5569
  Te.current += 1;
5520
5570
  try {
5521
- xe.current && await xe.current.dispose();
5571
+ G.current && await G.current.dispose();
5522
5572
  } catch (e) {
5523
5573
  console.warn("Failed to dispose previous loader", e);
5524
5574
  }
@@ -5527,19 +5577,19 @@ var wl = ({ children: e }) => {
5527
5577
  } catch (e) {
5528
5578
  console.warn("Failed to dispose previous image service", e);
5529
5579
  }
5530
- let e = tl();
5531
- r.current = e, a(e), xe.current = null, Se.current = null, Ce.current.clear(), we.current = !1, n(null), s(null), l([]), d({}), le(/* @__PURE__ */ new Map()), R(/* @__PURE__ */ new Set()), p(null), fe(/* @__PURE__ */ new Set()), h([]), _({}), b({}), Re(0), Ee.current = 0, Me(0), Fe(), Be(!1), w(null), se(), ne(null), A(!1);
5580
+ let e = il();
5581
+ r.current = e, a(e), G.current = null, Se.current = null, Ce.current.clear(), we.current = !1, n(null), s(null), l([]), d({}), ue(/* @__PURE__ */ new Map()), L(/* @__PURE__ */ new Set()), p(null), pe(/* @__PURE__ */ new Set()), h([]), _({}), y({}), Re(0), Ee.current = 0, Me(0), Fe(), Be(!1), w(null), se(), ne(null), ie(!1);
5532
5582
  }, [
5533
5583
  Me,
5534
5584
  se,
5535
5585
  Fe,
5536
- le,
5537
- R,
5538
- fe,
5586
+ ue,
5587
+ L,
5588
+ pe,
5539
5589
  Re,
5540
5590
  Be
5541
- ]), Ke = z(async (e) => {
5542
- if (Se.current === e && (xe.current || we.current)) return;
5591
+ ]), Ke = R(async (e) => {
5592
+ if (Se.current === e && (G.current || we.current)) return;
5543
5593
  if (Ce.current.has(e)) {
5544
5594
  console.log("Skipping initialization for previously failed source");
5545
5595
  return;
@@ -5554,13 +5604,13 @@ var wl = ({ children: e }) => {
5554
5604
  });
5555
5605
  let o = null;
5556
5606
  try {
5557
- if (xe.current && await xe.current.dispose(), t !== Te.current) return;
5558
- xe.current = null, n(null), s(null), l([]), d({}), le(/* @__PURE__ */ new Map()), R(/* @__PURE__ */ new Set()), p(null), h([]), _({}), b({}), Re(0), Ee.current = 0, Me(0), Be(!1), Se.current = e;
5607
+ if (G.current && await G.current.dispose(), t !== Te.current) return;
5608
+ G.current = null, n(null), s(null), l([]), d({}), ue(/* @__PURE__ */ new Map()), L(/* @__PURE__ */ new Set()), p(null), h([]), _({}), y({}), Re(0), Ee.current = 0, Me(0), Be(!1), Se.current = e;
5559
5609
  let c = "getDirectoryHandle" in e ? new es(e) : e;
5560
5610
  await r.current?.dispose();
5561
- let u = tl();
5611
+ let u = il();
5562
5612
  u.setDataSource(c), r.current = u, a(u);
5563
- let { LeRobotDataLoader: f } = await import("./LeRobotDataLoader-DYBXb4dz.js");
5613
+ let { LeRobotDataLoader: f } = await import("./LeRobotDataLoader-B8wZijIi.js");
5564
5614
  o = new f(c), M({
5565
5615
  id: i,
5566
5616
  phase: "read",
@@ -5572,8 +5622,8 @@ var wl = ({ children: e }) => {
5572
5622
  return;
5573
5623
  }
5574
5624
  let g = o.getEpisodes();
5575
- xe.current = o, n(o), ne(o.getValidationReport());
5576
- let v = Cl(m);
5625
+ G.current = o, n(o), ne(o.getValidationReport());
5626
+ let v = El(m);
5577
5627
  s(v), l(g), d(o.getTasks()), N(i), Ce.current.delete(e);
5578
5628
  } catch (n) {
5579
5629
  if (t !== Te.current) {
@@ -5584,7 +5634,7 @@ var wl = ({ children: e }) => {
5584
5634
  let r = n instanceof Error ? n.message : "Unknown error during initialization";
5585
5635
  w(r), oe(i, r);
5586
5636
  let a = o?.getValidationReport?.() ?? null;
5587
- a?.items?.length && (ne(a), A(!0));
5637
+ a?.items?.length && (ne(a), ie(!0));
5588
5638
  } finally {
5589
5639
  t === Te.current && (we.current = !1, S(!1));
5590
5640
  }
@@ -5593,11 +5643,11 @@ var wl = ({ children: e }) => {
5593
5643
  N,
5594
5644
  oe,
5595
5645
  Me,
5596
- le,
5597
- R,
5646
+ ue,
5647
+ L,
5598
5648
  Re,
5599
5649
  Be
5600
- ]), qe = z(async (e) => {
5650
+ ]), qe = R(async (e) => {
5601
5651
  if (!t || !o) return !1;
5602
5652
  S(!0), Be(!1), w(null);
5603
5653
  let n = "lerobot-select-episode";
@@ -5605,13 +5655,13 @@ var wl = ({ children: e }) => {
5605
5655
  id: n,
5606
5656
  phase: "read",
5607
5657
  message: `Loading episode ${e}...`
5608
- }), p(e), Re(0), Ee.current = 0, Me(0), _({}), b({}), ke.current = e;
5658
+ }), p(e), Re(0), Ee.current = 0, Me(0), _({}), y({}), ke.current = e;
5609
5659
  try {
5610
5660
  let n = t.getEpisodeDataPath(e)?.path ?? null;
5611
5661
  n && !t.isFileBytesCached(n) && await t.releaseParsedCaches(), i.clearPreload();
5612
5662
  } catch {}
5613
5663
  try {
5614
- let r = Jc(o);
5664
+ let r = Zc(o);
5615
5665
  M({
5616
5666
  id: n,
5617
5667
  phase: "read",
@@ -5624,22 +5674,22 @@ var wl = ({ children: e }) => {
5624
5674
  phase: "render",
5625
5675
  message: "Processing charts..."
5626
5676
  });
5627
- let s = Yc(a, o.fps ?? 30);
5677
+ let s = Qc(a, o.fps ?? 30);
5628
5678
  h(s), ke.current === e && _(a);
5629
5679
  let c = Ie(o);
5630
5680
  if (c.length > 0) {
5631
5681
  let n = {}, r = [];
5632
5682
  c.forEach((e) => {
5633
- e in a ? n[e] = gl(a[e]) : r.push(e);
5683
+ e in a ? n[e] = yl(a[e]) : r.push(e);
5634
5684
  });
5635
5685
  let i = r.length > 0 ? await t.loadFeatureData(e, r) : {};
5636
- ke.current === e && b({
5686
+ ke.current === e && y({
5637
5687
  ...n,
5638
5688
  ...i
5639
5689
  });
5640
5690
  }
5641
5691
  if (N(n), ke.current === e) {
5642
- let n = ie(o);
5692
+ let n = j(o);
5643
5693
  if (n.length > 0) {
5644
5694
  let r = t.getEpisodeDataPath(e);
5645
5695
  if (r) {
@@ -5676,25 +5726,25 @@ var wl = ({ children: e }) => {
5676
5726
  Be
5677
5727
  ]);
5678
5728
  Oe.current = qe;
5679
- let Je = z(() => {
5729
+ let Je = R(() => {
5680
5730
  w(null), Ce.current.clear();
5681
5731
  }, []);
5682
- B(() => {
5683
- if (f !== null && ue.has(f) && t && o && !x) {
5684
- let e = c.find((e) => !ue.has(e.episode_index));
5685
- e ? qe(e.episode_index) : (p(null), h([]), _({}), b({}));
5732
+ z(() => {
5733
+ if (f !== null && de.has(f) && t && o && !x) {
5734
+ let e = c.find((e) => !de.has(e.episode_index));
5735
+ e ? qe(e.episode_index) : (p(null), h([]), _({}), y({}));
5686
5736
  }
5687
5737
  }, [
5688
- ue,
5738
+ de,
5689
5739
  f,
5690
5740
  c,
5691
5741
  t,
5692
5742
  o,
5693
5743
  x,
5694
5744
  qe
5695
- ]), B(() => {
5745
+ ]), z(() => {
5696
5746
  if (f !== null || !t || !o || x || c.length === 0) return;
5697
- let e = Xc(c, ue);
5747
+ let e = $c(c, de);
5698
5748
  if (e === null) return;
5699
5749
  let n = window.setTimeout(() => {
5700
5750
  qe(e);
@@ -5706,13 +5756,13 @@ var wl = ({ children: e }) => {
5706
5756
  o,
5707
5757
  x,
5708
5758
  c,
5709
- ue,
5759
+ de,
5710
5760
  qe
5711
5761
  ]);
5712
- let Ye = V(() => ({
5762
+ let Ye = B(() => ({
5713
5763
  info: o,
5714
5764
  versionCapability: F,
5715
- isReadOnly: I,
5765
+ isReadOnly: le,
5716
5766
  featureData: v,
5717
5767
  subscribeFeature: Ne,
5718
5768
  unsubscribeFeature: Pe,
@@ -5731,7 +5781,7 @@ var wl = ({ children: e }) => {
5731
5781
  }), [
5732
5782
  o,
5733
5783
  F,
5734
- I,
5784
+ le,
5735
5785
  v,
5736
5786
  Ne,
5737
5787
  Pe,
@@ -5747,45 +5797,45 @@ var wl = ({ children: e }) => {
5747
5797
  Je,
5748
5798
  C,
5749
5799
  x
5750
- ]), Xe = V(() => ({
5800
+ ]), Xe = B(() => ({
5751
5801
  selectedEpisodeIndex: f,
5752
- selectedEpisodeIndices: de,
5753
- toggleEpisodeSelection: ve,
5754
- setSelectedEpisodeIndices: fe,
5755
- selectAllInList: ye,
5756
- clearEpisodeSelection: be,
5757
- deletedEpisodes: ue,
5758
- modifiedEpisodes: L,
5759
- effectiveEpisodes: pe,
5760
- episodesForExport: me,
5761
- editEpisodeTask: he,
5762
- deleteEpisode: G,
5763
- restoreEpisode: ge,
5764
- getEffectiveEpisode: _e,
5802
+ selectedEpisodeIndices: fe,
5803
+ toggleEpisodeSelection: ye,
5804
+ setSelectedEpisodeIndices: pe,
5805
+ selectAllInList: be,
5806
+ clearEpisodeSelection: xe,
5807
+ deletedEpisodes: de,
5808
+ modifiedEpisodes: I,
5809
+ effectiveEpisodes: me,
5810
+ episodesForExport: he,
5811
+ editEpisodeTask: ge,
5812
+ deleteEpisode: W,
5813
+ restoreEpisode: _e,
5814
+ getEffectiveEpisode: ve,
5765
5815
  selectEpisode: qe
5766
5816
  }), [
5767
5817
  f,
5768
- de,
5769
- ve,
5770
5818
  fe,
5771
5819
  ye,
5772
- be,
5773
- ue,
5774
- L,
5775
5820
  pe,
5821
+ be,
5822
+ xe,
5823
+ de,
5824
+ I,
5776
5825
  me,
5777
5826
  he,
5778
- G,
5779
5827
  ge,
5828
+ W,
5780
5829
  _e,
5830
+ ve,
5781
5831
  qe
5782
- ]), Ze = V(() => ({
5832
+ ]), Ze = B(() => ({
5783
5833
  currentFrames: m,
5784
5834
  chartData: g,
5785
5835
  currentFrameIndex: Le,
5786
5836
  isPlaying: ze,
5787
5837
  playbackMode: T,
5788
- playbackSpeed: O,
5838
+ playbackSpeed: D,
5789
5839
  setFrameIndex: Ve,
5790
5840
  togglePlay: He,
5791
5841
  setPlaying: Ue,
@@ -5798,15 +5848,15 @@ var wl = ({ children: e }) => {
5798
5848
  Le,
5799
5849
  ze,
5800
5850
  T,
5801
- O,
5851
+ D,
5802
5852
  Ve,
5803
5853
  He,
5804
5854
  Ue,
5805
5855
  We
5806
- ]), Qe = V(() => ({
5856
+ ]), Qe = B(() => ({
5807
5857
  healthDialogOpen: k,
5808
- setHealthDialogOpen: A
5809
- }), [k]), $e = V(() => ({
5858
+ setHealthDialogOpen: ie
5859
+ }), [k]), $e = B(() => ({
5810
5860
  ...Ye,
5811
5861
  ...Xe,
5812
5862
  ...Ze,
@@ -5817,15 +5867,15 @@ var wl = ({ children: e }) => {
5817
5867
  Ze,
5818
5868
  Qe
5819
5869
  ]);
5820
- return /* @__PURE__ */ W(re.Provider, {
5870
+ return /* @__PURE__ */ U(A.Provider, {
5821
5871
  value: $e,
5822
- children: /* @__PURE__ */ W(ae.Provider, {
5872
+ children: /* @__PURE__ */ U(ae.Provider, {
5823
5873
  value: Ye,
5824
- children: /* @__PURE__ */ W(y.Provider, {
5874
+ children: /* @__PURE__ */ U(b.Provider, {
5825
5875
  value: Xe,
5826
- children: /* @__PURE__ */ W(D.Provider, {
5876
+ children: /* @__PURE__ */ U(O.Provider, {
5827
5877
  value: Ze,
5828
- children: /* @__PURE__ */ W(j.Provider, {
5878
+ children: /* @__PURE__ */ U(re.Provider, {
5829
5879
  value: Qe,
5830
5880
  children: e
5831
5881
  })
@@ -5833,9 +5883,9 @@ var wl = ({ children: e }) => {
5833
5883
  })
5834
5884
  })
5835
5885
  });
5836
- }, Tl = () => {
5837
- let { resolvedTheme: e } = T();
5838
- return /* @__PURE__ */ W(Pc, {
5886
+ }, Ol = () => {
5887
+ let { resolvedTheme: e } = w();
5888
+ return /* @__PURE__ */ U(Pc, {
5839
5889
  theme: e,
5840
5890
  position: "top-center",
5841
5891
  richColors: !0,
@@ -5844,36 +5894,36 @@ var wl = ({ children: e }) => {
5844
5894
  };
5845
5895
  //#endregion
5846
5896
  //#region src/react/components/LeRobotStudioProvider.tsx
5847
- function El({ theme: e, children: t, showToaster: n, portalContainer: r }) {
5848
- return /* @__PURE__ */ W(S, {
5897
+ function kl({ theme: e, children: t, showToaster: n, portalContainer: r }) {
5898
+ return /* @__PURE__ */ U(ie, {
5849
5899
  container: r,
5850
- children: /* @__PURE__ */ W(rl, {
5900
+ children: /* @__PURE__ */ U(ol, {
5851
5901
  controlledTheme: e,
5852
5902
  rootElement: r,
5853
- children: /* @__PURE__ */ W(al, { children: /* @__PURE__ */ W(wl, { children: /* @__PURE__ */ W(cl, { children: /* @__PURE__ */ G(ce, {
5903
+ children: /* @__PURE__ */ U(cl, { children: /* @__PURE__ */ U(Dl, { children: /* @__PURE__ */ U(dl, { children: /* @__PURE__ */ W(le, {
5854
5904
  delay: 200,
5855
- children: [t, n ? /* @__PURE__ */ W(Tl, {}) : null]
5905
+ children: [t, n ? /* @__PURE__ */ U(Ol, {}) : null]
5856
5906
  }) }) }) })
5857
5907
  })
5858
5908
  });
5859
5909
  }
5860
- var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !0, wrapRoot: a = !0 }) => {
5861
- let [o, s] = U(null);
5862
- return /* @__PURE__ */ W(w, {
5910
+ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !0, wrapRoot: a = !0 }) => {
5911
+ let [o, s] = H(null);
5912
+ return /* @__PURE__ */ U(y, {
5863
5913
  forcedLanguage: t,
5864
- children: a ? /* @__PURE__ */ W("div", {
5914
+ children: a ? /* @__PURE__ */ U("div", {
5865
5915
  ref: s,
5866
- className: A("lerobot-root h-full w-full relative bg-background text-foreground", n),
5867
- children: /* @__PURE__ */ W(El, {
5916
+ className: D("lerobot-root h-full w-full relative bg-background text-foreground", n),
5917
+ children: /* @__PURE__ */ U(kl, {
5868
5918
  theme: e,
5869
5919
  showToaster: i,
5870
5920
  portalContainer: o,
5871
5921
  children: r
5872
5922
  })
5873
- }) : /* @__PURE__ */ W("div", {
5923
+ }) : /* @__PURE__ */ U("div", {
5874
5924
  ref: s,
5875
- className: A("lerobot-root h-full w-full bg-background text-foreground", n),
5876
- children: /* @__PURE__ */ W(El, {
5925
+ className: D("lerobot-root h-full w-full bg-background text-foreground", n),
5926
+ children: /* @__PURE__ */ U(kl, {
5877
5927
  theme: e,
5878
5928
  showToaster: i,
5879
5929
  portalContainer: o,
@@ -5881,119 +5931,119 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
5881
5931
  })
5882
5932
  })
5883
5933
  });
5884
- }, Ol = ({ open: e, onOpenChange: t, episode: n, onSave: r }) => {
5885
- let { t: i } = E(), [a, o] = U("");
5886
- return B(() => {
5934
+ }, jl = ({ open: e, onOpenChange: t, episode: n, onSave: r }) => {
5935
+ let { t: a } = T(), [o, s] = H("");
5936
+ return z(() => {
5887
5937
  if (!n) return;
5888
5938
  let e = n.tasks && n.tasks.length > 0 && n.tasks[0] || "";
5889
- o(e);
5890
- }, [n]), /* @__PURE__ */ W(Gs, {
5939
+ s(e);
5940
+ }, [n]), /* @__PURE__ */ U(Gs, {
5891
5941
  open: !!(e && n),
5892
5942
  onOpenChange: t,
5893
- children: /* @__PURE__ */ G(Js, {
5943
+ children: /* @__PURE__ */ W(Js, {
5894
5944
  className: "sm:max-w-md",
5895
- children: [/* @__PURE__ */ G(Ys, { children: [/* @__PURE__ */ W(Zs, { children: i("editTask.title", "Edit Episode Task") }), /* @__PURE__ */ W(Qs, {
5945
+ children: [/* @__PURE__ */ W(Ys, { children: [/* @__PURE__ */ U(Zs, { children: a("editTask.title", "Edit Episode Task") }), /* @__PURE__ */ U(Qs, {
5896
5946
  className: "sr-only",
5897
- children: i("editTask.a11yDescription", "Edit the task description for the selected episode.")
5898
- })] }), n ? /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ G("div", {
5947
+ children: a("editTask.a11yDescription", "Edit the task description for the selected episode.")
5948
+ })] }), n ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ W("div", {
5899
5949
  className: "space-y-4 py-2",
5900
- children: [/* @__PURE__ */ G("div", {
5950
+ children: [/* @__PURE__ */ W("div", {
5901
5951
  className: "space-y-2",
5902
- children: [/* @__PURE__ */ W("label", {
5952
+ children: [/* @__PURE__ */ U("label", {
5903
5953
  className: "text-sm font-medium text-muted-foreground",
5904
- children: i("editTask.episodeIndex", "Episode Index")
5905
- }), /* @__PURE__ */ W(F, {
5954
+ children: a("editTask.episodeIndex", "Episode Index")
5955
+ }), /* @__PURE__ */ U(p, {
5906
5956
  value: n.episode_index,
5907
5957
  disabled: !0,
5908
5958
  className: "bg-muted"
5909
5959
  })]
5910
- }), /* @__PURE__ */ G("div", {
5960
+ }), /* @__PURE__ */ W("div", {
5911
5961
  className: "space-y-2",
5912
- children: [/* @__PURE__ */ W("label", {
5962
+ children: [/* @__PURE__ */ U("label", {
5913
5963
  className: "text-sm font-medium text-muted-foreground",
5914
- children: i("editTask.taskDescription", "Task Description")
5915
- }), /* @__PURE__ */ W(Fc, {
5916
- value: a,
5917
- onChange: (e) => o(e.target.value),
5918
- placeholder: i("editTask.taskPlaceholder", "Enter task description..."),
5964
+ children: a("editTask.taskDescription", "Task Description")
5965
+ }), /* @__PURE__ */ U(Fc, {
5966
+ value: o,
5967
+ onChange: (e) => s(e.target.value),
5968
+ placeholder: a("editTask.taskPlaceholder", "Enter task description..."),
5919
5969
  rows: 4,
5920
5970
  className: "resize-none"
5921
5971
  })]
5922
5972
  })]
5923
- }), /* @__PURE__ */ G(Xs, { children: [/* @__PURE__ */ W(f, {
5973
+ }), /* @__PURE__ */ W(Xs, { children: [/* @__PURE__ */ U(i, {
5924
5974
  variant: "outline",
5925
5975
  onClick: () => t(!1),
5926
- children: i("common.cancel", "Cancel")
5927
- }), /* @__PURE__ */ W(f, {
5976
+ children: a("common.cancel", "Cancel")
5977
+ }), /* @__PURE__ */ U(i, {
5928
5978
  onClick: () => {
5929
5979
  if (n == null) return;
5930
- let e = a.trim();
5980
+ let e = o.trim();
5931
5981
  r(n.episode_index, e || ""), t(!1);
5932
5982
  },
5933
- children: i("editTask.save", "Save")
5983
+ children: a("editTask.save", "Save")
5934
5984
  })] })] }) : null]
5935
5985
  })
5936
5986
  });
5937
- }, kl = ({ totalCount: e, editMode: t, multiSelectMode: n, isReadOnly: r, onToggleEditMode: i, onToggleMultiSelectMode: a }) => {
5938
- let { t: o } = E();
5939
- return /* @__PURE__ */ G("div", {
5987
+ }, Ml = ({ totalCount: e, editMode: t, multiSelectMode: n, isReadOnly: r, onToggleEditMode: a, onToggleMultiSelectMode: o }) => {
5988
+ let { t: s } = T();
5989
+ return /* @__PURE__ */ W("div", {
5940
5990
  className: "flex min-w-0 flex-wrap items-center justify-between gap-2 overflow-hidden",
5941
- children: [/* @__PURE__ */ G("h2", {
5991
+ children: [/* @__PURE__ */ W("h2", {
5942
5992
  className: "flex min-w-0 items-center gap-1 text-sm text-muted-foreground overflow-hidden",
5943
- children: [e != null && /* @__PURE__ */ W("span", { children: e }), /* @__PURE__ */ W("span", { children: "Episodes" })]
5944
- }), !r && /* @__PURE__ */ G("div", {
5993
+ children: [e != null && /* @__PURE__ */ U("span", { children: e }), /* @__PURE__ */ U("span", { children: "Episodes" })]
5994
+ }), !r && /* @__PURE__ */ W("div", {
5945
5995
  className: "flex min-w-0 flex-wrap items-center gap-1 overflow-hidden",
5946
- children: [/* @__PURE__ */ W(f, {
5996
+ children: [/* @__PURE__ */ U(i, {
5947
5997
  variant: n ? "secondary" : "ghost",
5948
5998
  size: "sm",
5949
- className: A("h-7 shrink-0 px-1 text-xs font-medium", n ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
5950
- onClick: a,
5951
- title: o("sidebar.multiSelect", "Select"),
5952
- children: n ? /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(l, { className: "h-3 w-3 shrink-0" }), o("sidebar.multiSelect", "Select")] }) : /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(Vs, { className: "h-3 w-3 shrink-0" }), o("sidebar.multiSelect", "Select")] })
5953
- }), /* @__PURE__ */ W(f, {
5999
+ className: D("h-7 shrink-0 px-1 text-xs font-medium", n ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
6000
+ onClick: o,
6001
+ title: s("sidebar.multiSelect", "Select"),
6002
+ children: n ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(u, { className: "h-3 w-3 shrink-0" }), s("sidebar.multiSelect", "Select")] }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(Vs, { className: "h-3 w-3 shrink-0" }), s("sidebar.multiSelect", "Select")] })
6003
+ }), /* @__PURE__ */ U(i, {
5954
6004
  variant: t ? "secondary" : "ghost",
5955
6005
  size: "sm",
5956
- className: A("h-7 shrink-0 px-1 text-xs font-medium", t ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
5957
- onClick: i,
5958
- title: t ? o("sidebar.exitEditMode", "Done editing") : o("sidebar.enterEditMode", "Edit episodes"),
5959
- children: t ? /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(l, { className: "mr-1 h-3 w-3 shrink-0" }), o("sidebar.done", "Done")] }) : /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(Is, { className: "mr-1 h-3 w-3 shrink-0" }), o("sidebar.edit", "Edit")] })
6006
+ className: D("h-7 shrink-0 px-1 text-xs font-medium", t ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
6007
+ onClick: a,
6008
+ title: t ? s("sidebar.exitEditMode", "Done editing") : s("sidebar.enterEditMode", "Edit episodes"),
6009
+ children: t ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(u, { className: "mr-1 h-3 w-3 shrink-0" }), s("sidebar.done", "Done")] }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(Is, { className: "mr-1 h-3 w-3 shrink-0" }), s("sidebar.edit", "Edit")] })
5960
6010
  })]
5961
6011
  })]
5962
6012
  });
5963
- }, Al = ({ searchTerm: e, showAdvanced: t, onSearchTermChange: n, onToggleAdvanced: r }) => {
5964
- let { t: i } = E();
5965
- return /* @__PURE__ */ G("div", {
6013
+ }, Nl = ({ searchTerm: e, showAdvanced: t, onSearchTermChange: n, onToggleAdvanced: r }) => {
6014
+ let { t: a } = T();
6015
+ return /* @__PURE__ */ W("div", {
5966
6016
  className: "group relative flex min-w-0 items-center gap-1 overflow-hidden",
5967
- children: [/* @__PURE__ */ G("div", {
6017
+ children: [/* @__PURE__ */ W("div", {
5968
6018
  className: "relative min-w-0 flex-1 basis-0",
5969
- children: [/* @__PURE__ */ W(P, {
6019
+ children: [/* @__PURE__ */ U(m, {
5970
6020
  className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/40 transition-colors group-focus-within:text-primary/50",
5971
6021
  "aria-hidden": !0
5972
- }), /* @__PURE__ */ W(F, {
5973
- placeholder: i("sidebar.searchPlaceholder"),
6022
+ }), /* @__PURE__ */ U(p, {
6023
+ placeholder: a("sidebar.searchPlaceholder"),
5974
6024
  className: "h-9 min-w-0 w-full border-transparent bg-muted/50 pl-9 text-xs placeholder:text-muted-foreground/40",
5975
6025
  value: e,
5976
6026
  onChange: (e) => n(e.target.value),
5977
- "aria-label": i("sidebar.searchPlaceholder")
6027
+ "aria-label": a("sidebar.searchPlaceholder")
5978
6028
  })]
5979
- }), /* @__PURE__ */ W(f, {
6029
+ }), /* @__PURE__ */ U(i, {
5980
6030
  variant: t ? "secondary" : "ghost",
5981
6031
  size: "sm",
5982
- className: A("h-9 w-9 shrink-0 p-0", t && "text-primary"),
6032
+ className: D("h-9 w-9 shrink-0 p-0", t && "text-primary"),
5983
6033
  onClick: r,
5984
- title: i("sidebar.advanced", "Advanced"),
5985
- children: /* @__PURE__ */ W(Bs, {
6034
+ title: a("sidebar.advanced", "Advanced"),
6035
+ children: /* @__PURE__ */ U(Bs, {
5986
6036
  className: "h-3.5 w-3.5",
5987
6037
  "aria-hidden": !0
5988
6038
  })
5989
6039
  })]
5990
6040
  });
5991
- }, jl = ({ durationMin: e, durationMax: t, onDurationMinChange: n, onDurationMaxChange: r }) => {
5992
- let { t: i } = E();
5993
- return /* @__PURE__ */ G("div", {
6041
+ }, Pl = ({ durationMin: e, durationMax: t, onDurationMinChange: n, onDurationMaxChange: r }) => {
6042
+ let { t: i } = T();
6043
+ return /* @__PURE__ */ W("div", {
5994
6044
  className: "flex min-w-0 items-center gap-2 overflow-hidden",
5995
6045
  children: [
5996
- /* @__PURE__ */ W(F, {
6046
+ /* @__PURE__ */ U(p, {
5997
6047
  type: "number",
5998
6048
  placeholder: i("sidebar.filterByDuration"),
5999
6049
  className: "h-8 min-w-0 flex-1 basis-0 border border-border bg-muted/50 px-2 text-xs",
@@ -6004,11 +6054,11 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
6004
6054
  step: .1,
6005
6055
  "aria-label": i("sidebar.filterByDuration")
6006
6056
  }),
6007
- /* @__PURE__ */ W("span", {
6057
+ /* @__PURE__ */ U("span", {
6008
6058
  className: "shrink-0 text-xs text-muted-foreground",
6009
6059
  children: "-"
6010
6060
  }),
6011
- /* @__PURE__ */ W(F, {
6061
+ /* @__PURE__ */ U(p, {
6012
6062
  type: "number",
6013
6063
  className: "h-8 min-w-0 flex-1 basis-0 border border-border bg-muted/50 px-2 text-xs",
6014
6064
  value: t,
@@ -6019,159 +6069,159 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
6019
6069
  })
6020
6070
  ]
6021
6071
  });
6022
- }, Ml = ({ selectedCount: e, selectedDeletedCount: t, selectedNonDeletedCount: n, onSelectAll: r, onClearSelection: i, onBulkEdit: a, onBulkDelete: o, onBulkRestore: s }) => {
6023
- let { t: c } = E();
6024
- return /* @__PURE__ */ G("div", {
6072
+ }, Fl = ({ selectedCount: e, selectedDeletedCount: n, selectedNonDeletedCount: r, onSelectAll: a, onClearSelection: o, onBulkEdit: s, onBulkDelete: c, onBulkRestore: l }) => {
6073
+ let { t: u } = T();
6074
+ return /* @__PURE__ */ W("div", {
6025
6075
  className: "flex min-w-0 flex-wrap items-center gap-1 overflow-hidden",
6026
6076
  children: [
6027
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6028
- render: /* @__PURE__ */ W(f, {
6077
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6078
+ render: /* @__PURE__ */ U(i, {
6029
6079
  variant: "ghost",
6030
6080
  size: "icon",
6031
6081
  className: "h-8 w-8 shrink-0",
6032
- onClick: r
6082
+ onClick: a
6033
6083
  }),
6034
- children: /* @__PURE__ */ W(ks, { className: "h-3.5 w-3.5" })
6035
- }), /* @__PURE__ */ W(v, {
6084
+ children: /* @__PURE__ */ U(ks, { className: "h-3.5 w-3.5" })
6085
+ }), /* @__PURE__ */ U(ce, {
6036
6086
  side: "bottom",
6037
- children: c("sidebar.selectAll")
6087
+ children: u("sidebar.selectAll")
6038
6088
  })] }),
6039
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6040
- render: /* @__PURE__ */ W(f, {
6089
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6090
+ render: /* @__PURE__ */ U(i, {
6041
6091
  variant: "ghost",
6042
6092
  size: "icon",
6043
6093
  className: "h-8 w-8 shrink-0",
6044
- onClick: i
6094
+ onClick: o
6045
6095
  }),
6046
- children: /* @__PURE__ */ W(p, { className: "h-3.5 w-3.5" })
6047
- }), /* @__PURE__ */ W(v, {
6096
+ children: /* @__PURE__ */ U(t, { className: "h-3.5 w-3.5" })
6097
+ }), /* @__PURE__ */ U(ce, {
6048
6098
  side: "bottom",
6049
- children: c("sidebar.clearSelection")
6099
+ children: u("sidebar.clearSelection")
6050
6100
  })] }),
6051
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6052
- render: /* @__PURE__ */ W(f, {
6101
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6102
+ render: /* @__PURE__ */ U(i, {
6053
6103
  disabled: e === 0,
6054
6104
  variant: "ghost",
6055
6105
  size: "icon",
6056
6106
  className: "h-8 w-8 shrink-0",
6057
- onClick: a
6107
+ onClick: s
6058
6108
  }),
6059
- children: /* @__PURE__ */ W(Is, { className: "h-3.5 w-3.5" })
6060
- }), /* @__PURE__ */ W(v, {
6109
+ children: /* @__PURE__ */ U(Is, { className: "h-3.5 w-3.5" })
6110
+ }), /* @__PURE__ */ U(ce, {
6061
6111
  side: "bottom",
6062
- children: c("sidebar.bulkEdit")
6112
+ children: u("sidebar.bulkEdit")
6063
6113
  })] }),
6064
- n > 0 && /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6065
- render: /* @__PURE__ */ W(f, {
6114
+ r > 0 && /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6115
+ render: /* @__PURE__ */ U(i, {
6066
6116
  variant: "ghost",
6067
6117
  size: "icon",
6068
6118
  className: "h-8 w-8 shrink-0 text-destructive hover:text-destructive",
6069
- onClick: o
6119
+ onClick: c
6070
6120
  }),
6071
- children: /* @__PURE__ */ W(Us, { className: "h-3.5 w-3.5" })
6072
- }), /* @__PURE__ */ W(v, {
6121
+ children: /* @__PURE__ */ U(Us, { className: "h-3.5 w-3.5" })
6122
+ }), /* @__PURE__ */ U(ce, {
6073
6123
  side: "bottom",
6074
- children: c("sidebar.bulkDelete")
6124
+ children: u("sidebar.bulkDelete")
6075
6125
  })] }),
6076
- t > 0 && /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6077
- render: /* @__PURE__ */ W(f, {
6126
+ n > 0 && /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6127
+ render: /* @__PURE__ */ U(i, {
6078
6128
  disabled: e === 0,
6079
6129
  variant: "ghost",
6080
6130
  size: "icon",
6081
6131
  className: "h-8 w-8 shrink-0",
6082
- onClick: s
6132
+ onClick: l
6083
6133
  }),
6084
- children: /* @__PURE__ */ W(Ws, { className: "h-3.5 w-3.5" })
6085
- }), /* @__PURE__ */ W(v, {
6134
+ children: /* @__PURE__ */ U(Ws, { className: "h-3.5 w-3.5" })
6135
+ }), /* @__PURE__ */ U(ce, {
6086
6136
  side: "bottom",
6087
- children: c("sidebar.bulkRestore")
6137
+ children: u("sidebar.bulkRestore")
6088
6138
  })] }),
6089
- e > 0 && /* @__PURE__ */ W("span", {
6139
+ e > 0 && /* @__PURE__ */ U("span", {
6090
6140
  className: "ml-auto min-w-0 flex-1 truncate text-right text-xs text-muted-foreground",
6091
- children: c("sidebar.selectedCount", { count: e })
6141
+ children: u("sidebar.selectedCount", { count: e })
6092
6142
  })
6093
6143
  ]
6094
6144
  });
6095
- }, Nl = ({ episode: e, taskDescription: t, formattedDuration: n, isDeleted: r, isSelected: i, isChecked: a, isLoading: o, multiSelectMode: s, showActions: c, onRowClick: l, onToggleSelection: u, onEdit: d, onDelete: p, onRestore: m }) => {
6096
- let { t: h } = E(), g = !r && !o, _ = !r && i, v = !r && !i && a;
6097
- return /* @__PURE__ */ G("div", {
6098
- className: A("group relative flex w-full min-w-0 flex-col overflow-hidden border-b border-border/30 text-left transition-colors", r && "bg-muted/30 opacity-60", _ && "bg-accent text-foreground", v && "bg-muted/60 text-muted-foreground", !r && !i && !a && "bg-transparent text-muted-foreground/80 hover:bg-accent/50 hover:text-foreground"),
6099
- children: [/* @__PURE__ */ G("div", {
6145
+ }, Il = ({ episode: e, taskDescription: t, formattedDuration: n, isDeleted: r, isSelected: a, isChecked: o, isLoading: s, multiSelectMode: c, showActions: l, onRowClick: u, onToggleSelection: d, onEdit: f, onDelete: p, onRestore: m }) => {
6146
+ let { t: h } = T(), g = !r && !s, _ = !r && a, v = !r && !a && o;
6147
+ return /* @__PURE__ */ W("div", {
6148
+ className: D("group relative flex w-full min-w-0 flex-col overflow-hidden border-b border-border/30 text-left transition-colors", r && "bg-muted/30 opacity-60", _ && "bg-accent text-foreground", v && "bg-muted/60 text-muted-foreground", !r && !a && !o && "bg-transparent text-muted-foreground/80 hover:bg-accent/50 hover:text-foreground"),
6149
+ children: [/* @__PURE__ */ W("div", {
6100
6150
  role: "button",
6101
6151
  tabIndex: g ? 0 : -1,
6102
- className: A("flex w-full px-3 py-2.5 min-w-0 flex-1 overflow-hidden rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60", s ? "flex-row items-start gap-2" : "flex-col"),
6103
- onClick: () => g && l(),
6152
+ className: D("flex w-full px-3 py-2.5 min-w-0 flex-1 overflow-hidden rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60", c ? "flex-row items-start gap-2" : "flex-col"),
6153
+ onClick: () => g && u(),
6104
6154
  onKeyDown: (e) => {
6105
- g && Qc(e.key) && (e.preventDefault(), l());
6155
+ g && tl(e.key) && (e.preventDefault(), u());
6106
6156
  },
6107
6157
  "aria-label": h("sidebar.selectEpisode", { index: e.episode_index }),
6108
6158
  "aria-current": _ ? "true" : void 0,
6109
6159
  "aria-disabled": !g,
6110
6160
  title: h("sidebar.selectEpisode", { index: e.episode_index }),
6111
6161
  children: [
6112
- s && /* @__PURE__ */ W("span", {
6162
+ c && /* @__PURE__ */ U("span", {
6113
6163
  className: "mt-0.5 shrink-0",
6114
6164
  onClick: (e) => e.stopPropagation(),
6115
- children: /* @__PURE__ */ W("button", {
6165
+ children: /* @__PURE__ */ U("button", {
6116
6166
  type: "button",
6117
6167
  className: "rounded border-0 bg-transparent p-0.5 hover:bg-muted/50",
6118
- onClick: u,
6119
- "aria-label": a ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6120
- title: a ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6121
- children: a ? /* @__PURE__ */ W(Vs, { className: "h-4 w-4 text-primary" }) : /* @__PURE__ */ W(Hs, { className: "h-4 w-4 text-muted-foreground" })
6168
+ onClick: d,
6169
+ "aria-label": o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6170
+ title: o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6171
+ children: o ? /* @__PURE__ */ U(Vs, { className: "h-4 w-4 text-primary" }) : /* @__PURE__ */ U(Hs, { className: "h-4 w-4 text-muted-foreground" })
6122
6172
  })
6123
6173
  }),
6124
- _ && /* @__PURE__ */ W("div", { className: "absolute bottom-2 left-0 top-2 w-1 rounded-r-full bg-primary" }),
6125
- /* @__PURE__ */ G("div", {
6174
+ _ && /* @__PURE__ */ U("div", { className: "absolute bottom-2 left-0 top-2 w-1 rounded-r-full bg-primary" }),
6175
+ /* @__PURE__ */ W("div", {
6126
6176
  className: "flex min-w-0 flex-1 flex-col overflow-hidden",
6127
- children: [/* @__PURE__ */ G("div", {
6177
+ children: [/* @__PURE__ */ W("div", {
6128
6178
  className: "mb-1 flex min-w-0 items-center justify-between gap-2 overflow-hidden",
6129
- children: [/* @__PURE__ */ G(Ds, {
6179
+ children: [/* @__PURE__ */ W(Ds, {
6130
6180
  variant: _ ? "default" : "outline",
6131
- className: A("h-4 shrink-0 px-1.5 font-mono text-[10px] font-medium transition-colors", _ ? "border-transparent bg-primary text-primary-foreground" : v ? "border-border/60 bg-muted text-foreground/80" : "opacity-70"),
6181
+ className: D("h-4 shrink-0 px-1.5 font-mono text-[10px] font-medium transition-colors", _ ? "border-transparent bg-primary text-primary-foreground" : v ? "border-border/60 bg-muted text-foreground/80" : "opacity-70"),
6132
6182
  children: ["# ", e.episode_index]
6133
- }), /* @__PURE__ */ W("span", {
6134
- className: A("min-w-0 truncate font-mono text-[11px] transition-colors", _ ? "font-medium text-foreground/80" : v ? "text-foreground/80" : "text-muted-foreground"),
6183
+ }), /* @__PURE__ */ U("span", {
6184
+ className: D("min-w-0 truncate font-mono text-[11px] transition-colors", _ ? "font-medium text-foreground/80" : v ? "text-foreground/80" : "text-muted-foreground"),
6135
6185
  title: n,
6136
6186
  children: n
6137
6187
  })]
6138
- }), /* @__PURE__ */ W("span", {
6139
- className: A("block truncate text-xs font-normal leading-snug transition-colors", _ ? "font-medium text-foreground" : v ? "text-foreground" : "text-muted-foreground"),
6188
+ }), /* @__PURE__ */ U("span", {
6189
+ className: D("block truncate text-xs font-normal leading-snug transition-colors", _ ? "font-medium text-foreground" : v ? "text-foreground" : "text-muted-foreground"),
6140
6190
  title: t,
6141
6191
  children: t
6142
6192
  })]
6143
6193
  })
6144
6194
  ]
6145
- }), c && !s && /* @__PURE__ */ W("div", {
6195
+ }), l && !c && /* @__PURE__ */ U("div", {
6146
6196
  className: "mx-2 mt-1 flex shrink-0 items-center gap-0.5",
6147
6197
  onClick: (e) => e.stopPropagation(),
6148
- children: r ? /* @__PURE__ */ W(f, {
6198
+ children: r ? /* @__PURE__ */ U(i, {
6149
6199
  size: "sm",
6150
6200
  variant: "ghost",
6151
6201
  className: "h-8 px-2 text-muted-foreground hover:text-foreground",
6152
6202
  onClick: m,
6153
6203
  title: h("sidebar.restoreEpisode", "Restore episode"),
6154
- children: /* @__PURE__ */ W(Ws, { className: "h-3.5 w-3.5" })
6155
- }) : /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(f, {
6204
+ children: /* @__PURE__ */ U(Ws, { className: "h-3.5 w-3.5" })
6205
+ }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(i, {
6156
6206
  size: "sm",
6157
6207
  variant: "ghost",
6158
6208
  className: "h-8 px-2 text-muted-foreground hover:text-foreground",
6159
- onClick: d,
6209
+ onClick: f,
6160
6210
  title: h("sidebar.editTask", "Edit task"),
6161
- children: /* @__PURE__ */ W(Is, { className: "h-3.5 w-3.5" })
6162
- }), /* @__PURE__ */ W(f, {
6211
+ children: /* @__PURE__ */ U(Is, { className: "h-3.5 w-3.5" })
6212
+ }), /* @__PURE__ */ U(i, {
6163
6213
  size: "sm",
6164
6214
  variant: "ghost",
6165
6215
  className: "h-8 px-2 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",
6166
6216
  onClick: p,
6167
6217
  title: h("sidebar.deleteEpisode", "Delete episode"),
6168
- children: /* @__PURE__ */ W(Us, { className: "h-3.5 w-3.5" })
6218
+ children: /* @__PURE__ */ U(Us, { className: "h-3.5 w-3.5" })
6169
6219
  })] })
6170
6220
  })]
6171
6221
  });
6172
6222
  };
6173
- function Pl({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick: i, onToggleSelection: a, onEdit: o, onDelete: s, onRestore: c }) {
6174
- return /* @__PURE__ */ W(Nl, {
6223
+ function Ll({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick: i, onToggleSelection: a, onEdit: o, onDelete: s, onRestore: c }) {
6224
+ return /* @__PURE__ */ U(Il, {
6175
6225
  episode: e.episode,
6176
6226
  taskDescription: e.taskDescription,
6177
6227
  formattedDuration: e.formattedDuration,
@@ -6188,23 +6238,23 @@ function Pl({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick
6188
6238
  onRestore: (t) => c(e.episode.episode_index, t)
6189
6239
  });
6190
6240
  }
6191
- function Fl({ ariaAttributes: e, index: t, style: n, filteredEpisodes: r, ...i }) {
6241
+ function Rl({ ariaAttributes: e, index: t, style: n, filteredEpisodes: r, ...i }) {
6192
6242
  let a = r[t];
6193
- return /* @__PURE__ */ W("div", {
6243
+ return /* @__PURE__ */ U("div", {
6194
6244
  ...e,
6195
6245
  style: n,
6196
6246
  className: "overflow-hidden",
6197
- children: /* @__PURE__ */ W(Pl, {
6247
+ children: /* @__PURE__ */ U(Ll, {
6198
6248
  item: a,
6199
6249
  ...i
6200
6250
  })
6201
6251
  });
6202
6252
  }
6203
- function Il(e, t) {
6253
+ function zl(e, t) {
6204
6254
  return t.filteredEpisodes[e].episode.episode_index;
6205
6255
  }
6206
- var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelectMode: i, editMode: a, onRowClick: o, onToggleSelection: s, onEdit: c, onDelete: l, onRestore: u }) => {
6207
- let { t: d } = E(), f = V(() => ({
6256
+ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelectMode: i, editMode: a, onRowClick: o, onToggleSelection: s, onEdit: c, onDelete: l, onRestore: u }) => {
6257
+ let { t: d } = T(), f = B(() => ({
6208
6258
  filteredEpisodes: n,
6209
6259
  isLoading: r,
6210
6260
  multiSelectMode: i,
@@ -6224,52 +6274,63 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6224
6274
  c,
6225
6275
  l,
6226
6276
  u
6227
- ]);
6228
- return e ? /* @__PURE__ */ G("div", {
6229
- className: "flex h-full flex-col items-center justify-center space-y-2 p-4 text-center",
6230
- children: [
6231
- /* @__PURE__ */ W(js, { className: "h-8 w-8 text-destructive/70" }),
6232
- /* @__PURE__ */ W("p", {
6233
- className: "text-sm font-medium text-destructive",
6234
- children: d("sidebar.errorLoading")
6235
- }),
6236
- /* @__PURE__ */ W("p", {
6237
- className: "max-w-full break-words text-xs text-muted-foreground",
6238
- children: e
6239
- })
6240
- ]
6241
- }) : n.length === 0 ? /* @__PURE__ */ W("div", {
6242
- className: "flex h-full items-center justify-center p-4 text-center text-muted-foreground",
6243
- children: t && t.length === 0 ? d("sidebar.emptyNoDataset") : d("sidebar.emptyNoMatch")
6244
- }) : n.length >= 100 ? /* @__PURE__ */ W(se, {
6245
- rowCount: n.length,
6246
- rowHeight: a && !i ? 102 : 61,
6247
- rowComponent: Fl,
6248
- rowProps: f,
6249
- rowKey: Il,
6250
- overscanCount: 4,
6251
- className: "flex-1 min-h-0 w-full min-w-0 overflow-x-hidden",
6252
- style: {
6253
- height: "100%",
6254
- width: "100%"
6255
- },
6256
- "aria-label": d("sidebar.episodesTitle")
6257
- }) : /* @__PURE__ */ W(b, {
6258
- className: "flex-1 min-h-0 w-full min-w-0",
6277
+ ]), p = e ? /* @__PURE__ */ U("div", {
6278
+ className: "shrink-0 border-b border-destructive/20 bg-destructive/5 px-3 py-2",
6259
6279
  children: /* @__PURE__ */ W("div", {
6260
- className: "w-full min-w-0 overflow-x-hidden",
6261
- children: n.map((e) => /* @__PURE__ */ W(Pl, {
6262
- item: e,
6263
- ...f
6264
- }, e.episode.episode_index))
6280
+ className: "flex items-start gap-2",
6281
+ children: [/* @__PURE__ */ U(js, { className: "mt-0.5 h-4 w-4 shrink-0 text-destructive/70" }), /* @__PURE__ */ W("div", {
6282
+ className: "min-w-0 space-y-0.5",
6283
+ children: [/* @__PURE__ */ U("p", {
6284
+ className: "text-sm font-medium text-destructive",
6285
+ children: d("sidebar.errorLoading")
6286
+ }), /* @__PURE__ */ U("p", {
6287
+ className: "max-w-full break-words text-xs text-muted-foreground",
6288
+ children: e
6289
+ })]
6290
+ })]
6265
6291
  })
6292
+ }) : null;
6293
+ return n.length === 0 ? /* @__PURE__ */ W("div", {
6294
+ className: "flex h-full min-h-0 flex-col",
6295
+ children: [p, /* @__PURE__ */ U("div", {
6296
+ className: "flex flex-1 items-center justify-center p-4 text-center text-muted-foreground",
6297
+ children: t && t.length === 0 ? d("sidebar.emptyNoDataset") : d("sidebar.emptyNoMatch")
6298
+ })]
6299
+ }) : n.length >= 100 ? /* @__PURE__ */ W("div", {
6300
+ className: "flex h-full min-h-0 flex-col",
6301
+ children: [p, /* @__PURE__ */ U(oe, {
6302
+ rowCount: n.length,
6303
+ rowHeight: a && !i ? 102 : 61,
6304
+ rowComponent: Rl,
6305
+ rowProps: f,
6306
+ rowKey: zl,
6307
+ overscanCount: 4,
6308
+ className: "flex-1 min-h-0 w-full min-w-0 overflow-x-hidden",
6309
+ style: {
6310
+ height: "100%",
6311
+ width: "100%"
6312
+ },
6313
+ "aria-label": d("sidebar.episodesTitle")
6314
+ })]
6315
+ }) : /* @__PURE__ */ W("div", {
6316
+ className: "flex h-full min-h-0 flex-col",
6317
+ children: [p, /* @__PURE__ */ U(F, {
6318
+ className: "flex-1 min-h-0 w-full min-w-0",
6319
+ children: /* @__PURE__ */ U("div", {
6320
+ className: "w-full min-w-0 overflow-x-hidden",
6321
+ children: n.map((e) => /* @__PURE__ */ U(Ll, {
6322
+ item: e,
6323
+ ...f
6324
+ }, e.episode.episode_index))
6325
+ })
6326
+ })]
6266
6327
  });
6267
- }, Rl = () => {
6268
- let { t: e } = E(), { episodes: t, tasks: n, isLoading: r, error: i, info: a, versionCapability: o, isReadOnly: s } = N(), { selectEpisode: c, selectedEpisodeIndex: l, selectedEpisodeIndices: u, toggleEpisodeSelection: d, selectAllInList: p, clearEpisodeSelection: m, deletedEpisodes: h, getEffectiveEpisode: g, editEpisodeTask: _, deleteEpisode: v, restoreEpisode: y } = te(), [b, x] = U(""), [S, C] = U(!1), [w, T] = U(!1), [D, O] = U(""), [ee, ne] = U(""), [k, A] = U(!1), [re, j] = U(null), [ie, M] = U(!1), [ae, oe] = U(!1), [se, ce] = U(""), P = s || !!(a && o?.status !== "supported");
6269
- B(() => {
6270
- P && (C(!1), T(!1), A(!1), oe(!1), m());
6328
+ }, Vl = () => {
6329
+ let { t: e } = T(), { episodes: t, tasks: n, isLoading: r, error: a, info: o, versionCapability: s, isReadOnly: c } = N(), { selectEpisode: l, selectedEpisodeIndex: u, selectedEpisodeIndices: d, toggleEpisodeSelection: f, selectAllInList: p, clearEpisodeSelection: m, deletedEpisodes: h, getEffectiveEpisode: g, editEpisodeTask: _, deleteEpisode: v, restoreEpisode: y } = ne(), [b, x] = H(""), [S, C] = H(!1), [w, E] = H(!1), [D, O] = H(""), [ee, te] = H(""), [k, A] = H(!1), [re, j] = H(null), [ie, M] = H(!1), [ae, oe] = H(!1), [se, ce] = H(""), P = c || !!(o && s?.status !== "supported");
6330
+ z(() => {
6331
+ P && (C(!1), E(!1), A(!1), oe(!1), m());
6271
6332
  }, [P, m]);
6272
- let F = V(() => {
6333
+ let F = B(() => {
6273
6334
  if (!t) return [];
6274
6335
  let e = t;
6275
6336
  if (b.trim()) {
@@ -6279,30 +6340,30 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6279
6340
  return String(e.episode_index).includes(t) || a.toLowerCase().includes(t) || Array.isArray(r.tasks) && r.tasks.some((e) => e.toLowerCase().includes(t));
6280
6341
  });
6281
6342
  }
6282
- let r = a?.fps ?? 30, i = D === "" ? void 0 : parseFloat(D), o = ee === "" ? void 0 : parseFloat(ee);
6283
- return i != null && !Number.isNaN(i) && (e = e.filter((e) => (e.length ?? 0) / r >= i)), o != null && !Number.isNaN(o) && (e = e.filter((e) => (e.length ?? 0) / r <= o)), e;
6343
+ let r = o?.fps ?? 30, i = D === "" ? void 0 : parseFloat(D), a = ee === "" ? void 0 : parseFloat(ee);
6344
+ return i != null && !Number.isNaN(i) && (e = e.filter((e) => (e.length ?? 0) / r >= i)), a != null && !Number.isNaN(a) && (e = e.filter((e) => (e.length ?? 0) / r <= a)), e;
6284
6345
  }, [
6285
6346
  t,
6286
6347
  n,
6287
6348
  b,
6288
6349
  D,
6289
6350
  ee,
6290
- a?.fps,
6351
+ o?.fps,
6291
6352
  g
6292
- ]), I = (e, t) => {
6353
+ ]), le = (e, t) => {
6293
6354
  e.stopPropagation(), !P && (j(g(t)), A(!0));
6294
- }, L = (e, t) => {
6355
+ }, I = (e, t) => {
6295
6356
  e.stopPropagation(), !P && v(t);
6296
- }, le = (e, t) => {
6357
+ }, ue = (e, t) => {
6297
6358
  e.stopPropagation(), !P && y(t);
6298
- }, ue = (e) => {
6299
- h.has(e.episode_index) || (w ? d(e.episode_index) : c(e.episode_index));
6300
- }, R = V(() => F.filter((e) => u.has(e.episode_index)), [F, u]), de = V(() => R.filter((e) => h.has(e.episode_index)), [R, h]), fe = V(() => R.filter((e) => !h.has(e.episode_index)), [R, h]), pe = () => {
6359
+ }, de = (e) => {
6360
+ h.has(e.episode_index) || (w ? f(e.episode_index) : l(e.episode_index));
6361
+ }, L = B(() => F.filter((e) => d.has(e.episode_index)), [F, d]), fe = B(() => L.filter((e) => h.has(e.episode_index)), [L, h]), pe = B(() => L.filter((e) => !h.has(e.episode_index)), [L, h]), me = () => {
6301
6362
  if (P) return;
6302
6363
  let e = se.trim();
6303
- R.forEach((t) => _(t.episode_index, e || "")), oe(!1), ce("");
6304
- }, z = V(() => {
6305
- let t = a?.fps || 30;
6364
+ L.forEach((t) => _(t.episode_index, e || "")), oe(!1), ce("");
6365
+ }, R = B(() => {
6366
+ let t = o?.fps || 30;
6306
6367
  return F.map((r) => {
6307
6368
  let i = g(r), a = (r.length || 0) / t, o = Math.floor(a / 60), s = Math.floor(a % 60);
6308
6369
  return {
@@ -6310,106 +6371,106 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6310
6371
  taskDescription: (i.tasks && i.tasks.length > 0 ? String(i.tasks[0]) : n[i.task_index || 0]) || e("sidebar.noDescription"),
6311
6372
  formattedDuration: `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`,
6312
6373
  isDeleted: h.has(r.episode_index),
6313
- isSelected: l === r.episode_index,
6314
- isChecked: u.has(r.episode_index)
6374
+ isSelected: u === r.episode_index,
6375
+ isChecked: d.has(r.episode_index)
6315
6376
  };
6316
6377
  });
6317
6378
  }, [
6318
6379
  F,
6319
6380
  g,
6320
- a?.fps,
6381
+ o?.fps,
6321
6382
  n,
6322
6383
  e,
6323
6384
  h,
6324
- l,
6325
- u
6385
+ u,
6386
+ d
6326
6387
  ]);
6327
- return /* @__PURE__ */ G("div", {
6388
+ return /* @__PURE__ */ W("div", {
6328
6389
  className: "flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden bg-background",
6329
6390
  children: [
6330
- /* @__PURE__ */ G("div", {
6391
+ /* @__PURE__ */ W("div", {
6331
6392
  className: "shrink-0 space-y-3 border-b px-3 pt-0 pb-2 min-w-0 overflow-x-hidden",
6332
6393
  children: [
6333
- /* @__PURE__ */ W(kl, {
6394
+ /* @__PURE__ */ U(Ml, {
6334
6395
  totalCount: t?.length,
6335
6396
  editMode: S,
6336
6397
  multiSelectMode: w,
6337
6398
  isReadOnly: P,
6338
6399
  onToggleEditMode: () => C((e) => !e),
6339
6400
  onToggleMultiSelectMode: () => {
6340
- T((e) => !e), w && m();
6401
+ E((e) => !e), w && m();
6341
6402
  }
6342
6403
  }),
6343
- P && o && /* @__PURE__ */ W("p", {
6404
+ P && s && /* @__PURE__ */ U("p", {
6344
6405
  className: "rounded-md border border-border/60 bg-muted/40 px-2 py-1.5 text-xs text-muted-foreground",
6345
- children: e("sidebar.readOnlyVersion", { version: o.normalizedVersion ?? a?.codebase_version ?? "unknown" })
6406
+ children: e("sidebar.readOnlyVersion", { version: s.normalizedVersion ?? o?.codebase_version ?? "unknown" })
6346
6407
  }),
6347
- /* @__PURE__ */ W(Al, {
6408
+ /* @__PURE__ */ U(Nl, {
6348
6409
  searchTerm: b,
6349
6410
  showAdvanced: ie,
6350
6411
  onSearchTermChange: x,
6351
6412
  onToggleAdvanced: () => M((e) => !e)
6352
6413
  }),
6353
- ie && /* @__PURE__ */ W(jl, {
6414
+ ie && /* @__PURE__ */ U(Pl, {
6354
6415
  durationMin: D,
6355
6416
  durationMax: ee,
6356
6417
  onDurationMinChange: O,
6357
- onDurationMaxChange: ne
6418
+ onDurationMaxChange: te
6358
6419
  }),
6359
- !P && w && /* @__PURE__ */ W(Ml, {
6360
- selectedCount: u.size,
6361
- selectedDeletedCount: de.length,
6362
- selectedNonDeletedCount: fe.length,
6420
+ !P && w && /* @__PURE__ */ U(Fl, {
6421
+ selectedCount: d.size,
6422
+ selectedDeletedCount: fe.length,
6423
+ selectedNonDeletedCount: pe.length,
6363
6424
  onSelectAll: () => p(F.map((e) => e.episode_index)),
6364
6425
  onClearSelection: m,
6365
6426
  onBulkEdit: () => oe(!0),
6366
- onBulkDelete: () => fe.forEach((e) => v(e.episode_index)),
6367
- onBulkRestore: () => de.forEach((e) => y(e.episode_index))
6427
+ onBulkDelete: () => pe.forEach((e) => v(e.episode_index)),
6428
+ onBulkRestore: () => fe.forEach((e) => y(e.episode_index))
6368
6429
  })
6369
6430
  ]
6370
6431
  }),
6371
- /* @__PURE__ */ W("div", {
6432
+ /* @__PURE__ */ U("div", {
6372
6433
  className: "flex flex-1 min-h-0 min-w-0 flex-col overflow-hidden",
6373
- children: /* @__PURE__ */ W(Ll, {
6374
- error: i,
6434
+ children: /* @__PURE__ */ U(Bl, {
6435
+ error: a,
6375
6436
  episodes: t,
6376
- filteredEpisodes: z,
6437
+ filteredEpisodes: R,
6377
6438
  isLoading: r,
6378
6439
  multiSelectMode: !P && w,
6379
6440
  editMode: !P && S,
6380
- onRowClick: ue,
6441
+ onRowClick: de,
6381
6442
  onToggleSelection: (e, t) => {
6382
- t.preventDefault(), t.stopPropagation(), d(e.episode_index);
6443
+ t.preventDefault(), t.stopPropagation(), f(e.episode_index);
6383
6444
  },
6384
- onEdit: (e, t) => I(t, e),
6385
- onDelete: (e, t) => L(t, e),
6386
- onRestore: (e, t) => le(t, e)
6445
+ onEdit: (e, t) => le(t, e),
6446
+ onDelete: (e, t) => I(t, e),
6447
+ onRestore: (e, t) => ue(t, e)
6387
6448
  })
6388
6449
  }),
6389
- !P && /* @__PURE__ */ W(Ol, {
6450
+ !P && /* @__PURE__ */ U(jl, {
6390
6451
  open: k,
6391
6452
  onOpenChange: A,
6392
6453
  episode: re,
6393
6454
  onSave: _
6394
6455
  }, re?.episode_index ?? "edit-dialog"),
6395
- !P && /* @__PURE__ */ W(Gs, {
6456
+ !P && /* @__PURE__ */ U(Gs, {
6396
6457
  open: ae,
6397
6458
  onOpenChange: oe,
6398
- children: /* @__PURE__ */ G(Js, {
6459
+ children: /* @__PURE__ */ W(Js, {
6399
6460
  className: "sm:max-w-md",
6400
6461
  children: [
6401
- /* @__PURE__ */ W(Ys, { children: /* @__PURE__ */ W(Zs, { children: e("sidebar.bulkEdit", "Edit task") }) }),
6402
- /* @__PURE__ */ G("div", {
6462
+ /* @__PURE__ */ U(Ys, { children: /* @__PURE__ */ U(Zs, { children: e("sidebar.bulkEdit", "Edit task") }) }),
6463
+ /* @__PURE__ */ W("div", {
6403
6464
  className: "py-2",
6404
- children: [/* @__PURE__ */ G("p", {
6465
+ children: [/* @__PURE__ */ W("p", {
6405
6466
  className: "mb-2 text-xs text-muted-foreground",
6406
6467
  children: [
6407
- e("sidebar.selectedCount", { count: R.length }),
6468
+ e("sidebar.selectedCount", { count: L.length }),
6408
6469
  " -",
6409
6470
  " ",
6410
6471
  e("editTask.taskDescription")
6411
6472
  ]
6412
- }), /* @__PURE__ */ W(Fc, {
6473
+ }), /* @__PURE__ */ U(Fc, {
6413
6474
  value: se,
6414
6475
  onChange: (e) => ce(e.target.value),
6415
6476
  placeholder: e("editTask.taskPlaceholder", "Enter task description..."),
@@ -6417,12 +6478,12 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6417
6478
  className: "resize-none"
6418
6479
  })]
6419
6480
  }),
6420
- /* @__PURE__ */ G(Xs, { children: [/* @__PURE__ */ W(f, {
6481
+ /* @__PURE__ */ W(Xs, { children: [/* @__PURE__ */ U(i, {
6421
6482
  variant: "outline",
6422
6483
  onClick: () => oe(!1),
6423
6484
  children: e("common.cancel", "Cancel")
6424
- }), /* @__PURE__ */ W(f, {
6425
- onClick: pe,
6485
+ }), /* @__PURE__ */ U(i, {
6486
+ onClick: me,
6426
6487
  children: e("editTask.save", "Save")
6427
6488
  })] })
6428
6489
  ]
@@ -6430,20 +6491,20 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6430
6491
  })
6431
6492
  ]
6432
6493
  });
6433
- }, zl = (e = !0) => {
6434
- let t = M(), { episodes: n, getFrameIndex: r, isLoading: i } = N(), { selectedEpisodeIndex: a, selectEpisode: o } = te(), { setFrameIndex: s, togglePlay: c, currentFrames: l } = x(), u = H(e), d = H(n), f = H(a), p = H(l), m = H(i);
6435
- B(() => {
6494
+ }, Hl = (e = !0) => {
6495
+ let t = k(), { episodes: n, getFrameIndex: r, isLoading: i } = N(), { selectedEpisodeIndex: a, selectEpisode: o } = ne(), { setFrameIndex: s, togglePlay: c, currentFrames: l } = S(), u = V(e), d = V(n), f = V(a), p = V(l), m = V(i);
6496
+ z(() => {
6436
6497
  u.current = e;
6437
- }, [e]), B(() => {
6498
+ }, [e]), z(() => {
6438
6499
  d.current = n;
6439
- }, [n]), B(() => {
6500
+ }, [n]), z(() => {
6440
6501
  f.current = a;
6441
- }, [a]), B(() => {
6502
+ }, [a]), z(() => {
6442
6503
  p.current = l;
6443
- }, [l]), B(() => {
6504
+ }, [l]), z(() => {
6444
6505
  m.current = i;
6445
6506
  }, [i]);
6446
- let h = z((e) => {
6507
+ let h = R((e) => {
6447
6508
  if (!u.current || m.current) return;
6448
6509
  let n = e.target;
6449
6510
  if (!t?.contains(n)) return;
@@ -6518,46 +6579,46 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6518
6579
  r,
6519
6580
  t
6520
6581
  ]);
6521
- B(() => {
6582
+ z(() => {
6522
6583
  if (e) return window.addEventListener("keydown", h), () => {
6523
6584
  window.removeEventListener("keydown", h);
6524
6585
  };
6525
6586
  }, [e, h]);
6526
- }, Bl = ({ children: e, minWidth: t = 200, maxWidth: n = 600, defaultWidth: r = 256, onWidthChange: i, className: a = "" }) => {
6527
- let [o, s] = U(r), [c, l] = U(!1), u = H(null), d = H(null), f = H(!1), p = H(0), m = H(r), h = H(null), g = H(t), _ = H(n), v = H(i), y = z(() => {
6587
+ }, Ul = ({ children: e, minWidth: t = 200, maxWidth: n = 600, defaultWidth: r = 256, onWidthChange: i, className: a = "" }) => {
6588
+ let [o, s] = H(r), [c, l] = H(!1), u = V(null), d = V(null), f = V(!1), p = V(0), m = V(r), h = V(null), g = V(t), _ = V(n), v = V(i), y = R(() => {
6528
6589
  let e = Math.max(g.current, window.innerWidth - 320);
6529
6590
  return Math.min(_.current, e);
6530
6591
  }, [320]);
6531
- B(() => {
6592
+ z(() => {
6532
6593
  g.current = t, _.current = n, v.current = i;
6533
6594
  }, [
6534
6595
  t,
6535
6596
  n,
6536
6597
  i
6537
6598
  ]);
6538
- let b = z((e) => {
6599
+ let b = R((e) => {
6539
6600
  !f.current || !u.current || (h.current !== null && cancelAnimationFrame(h.current), h.current = requestAnimationFrame(() => {
6540
6601
  let t = e.clientX - p.current, n = y(), r = Math.max(g.current, Math.min(n, m.current + t));
6541
6602
  u.current && (u.current.style.width = `${r}px`), s(r), v.current?.(r);
6542
6603
  }));
6543
- }, [y]), x = z(() => {
6604
+ }, [y]), x = R(() => {
6544
6605
  f.current && (f.current = !1, l(!1), document.body.style.cursor = "", document.body.style.userSelect = "", u.current && (u.current.style.transition = ""), d.current && (d.current.style.transition = ""), h.current !== null && (cancelAnimationFrame(h.current), h.current = null));
6545
- }, []), S = z((e) => {
6606
+ }, []), S = R((e) => {
6546
6607
  e.preventDefault(), e.stopPropagation(), f.current = !0, l(!0), p.current = e.clientX, m.current = o, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", u.current && (u.current.style.transition = "none"), d.current && (d.current.style.transition = "none");
6547
6608
  }, [o]);
6548
- return B(() => (c && (document.addEventListener("mousemove", b, { passive: !0 }), document.addEventListener("mouseup", x)), () => {
6609
+ return z(() => (c && (document.addEventListener("mousemove", b, { passive: !0 }), document.addEventListener("mouseup", x)), () => {
6549
6610
  document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", x), h.current !== null && cancelAnimationFrame(h.current), f.current && (document.body.style.cursor = "", document.body.style.userSelect = "");
6550
6611
  }), [
6551
6612
  c,
6552
6613
  b,
6553
6614
  x
6554
- ]), B(() => {
6615
+ ]), z(() => {
6555
6616
  let e = () => {
6556
6617
  let e = y();
6557
6618
  o > e && (s(e), u.current && (u.current.style.width = `${e}px`), v.current?.(e));
6558
6619
  };
6559
6620
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
6560
- }, [o, y]), /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W("div", {
6621
+ }, [o, y]), /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U("div", {
6561
6622
  ref: u,
6562
6623
  className: `flex h-full min-w-0 shrink-0 flex-col overflow-x-hidden border-r bg-background ${a}`,
6563
6624
  style: {
@@ -6567,31 +6628,31 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6567
6628
  transition: "width 0.2s ease-out"
6568
6629
  },
6569
6630
  children: e
6570
- }), /* @__PURE__ */ W("div", {
6631
+ }), /* @__PURE__ */ U("div", {
6571
6632
  ref: d,
6572
6633
  className: `relative z-10 flex w-1 shrink-0 cursor-col-resize items-center justify-center bg-border transition-colors duration-200 hover:bg-primary/30 ${c ? "bg-primary/60" : ""}`,
6573
6634
  onMouseDown: S,
6574
6635
  style: { cursor: "col-resize" },
6575
- children: /* @__PURE__ */ W("div", { className: "absolute inset-y-0 left-0 w-4" })
6636
+ children: /* @__PURE__ */ U("div", { className: "absolute inset-y-0 left-0 w-4" })
6576
6637
  })] });
6577
- }, Vl = 16, Hl = 250;
6578
- function Ul(e) {
6579
- return `calc(${(Math.max(0, Math.min(1, e)) * 100).toFixed(4)}% - ${Vl / 2}px)`;
6638
+ }, Wl = 16, Gl = 250;
6639
+ function Kl(e) {
6640
+ return `calc(${(Math.max(0, Math.min(1, e)) * 100).toFixed(4)}% - ${Wl / 2}px)`;
6580
6641
  }
6581
- function Wl(e) {
6642
+ function ql(e) {
6582
6643
  let t = Math.floor(e / 60), n = Math.floor(e % 60), r = Math.floor(e % 1 * 100);
6583
6644
  return `${t}:${n.toString().padStart(2, "0")}.${r.toString().padStart(2, "0")}`;
6584
6645
  }
6585
- var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFrameIndex: i, isDisabled: a, setFrameIndex: o, getFrameIndex: s, subscribeFrameIndex: c }) => {
6586
- let { t: l } = E(), u = H(null), d = H(null), f = H(null), p = H(null), m = H(null), h = H(!1), g = H(0), _ = H(null), v = z((n) => e[n]?.timestamp === void 0 ? n / t : e[n].timestamp, [e, t]), y = z((e) => {
6646
+ var Jl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFrameIndex: i, isDisabled: a, setFrameIndex: o, getFrameIndex: s, subscribeFrameIndex: c }) => {
6647
+ let { t: l } = T(), u = V(null), d = V(null), f = V(null), p = V(null), m = V(null), h = V(!1), g = V(0), _ = V(null), v = R((n) => e[n]?.timestamp === void 0 ? n / t : e[n].timestamp, [e, t]), y = R((e) => {
6587
6648
  let t = Math.max(0, Math.min(1, e));
6588
- f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left = Ul(t));
6589
- }, []), b = z((e) => {
6649
+ f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left = Kl(t));
6650
+ }, []), b = R((e) => {
6590
6651
  m.current && m.current.classList.toggle("cursor-grabbing", e), p.current && p.current.classList.toggle("shadow-md", e);
6591
- }, []), x = z((e) => {
6652
+ }, []), x = R((e) => {
6592
6653
  m.current && (m.current.setAttribute("aria-valuenow", String(e)), m.current.setAttribute("aria-valuetext", l("playback.a11y.valuetext", {
6593
- time: Wl(v(e)),
6594
- totalTime: Wl(r),
6654
+ time: ql(v(e)),
6655
+ totalTime: ql(r),
6595
6656
  frame: e,
6596
6657
  totalFrames: n
6597
6658
  })));
@@ -6600,26 +6661,26 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6600
6661
  l,
6601
6662
  n,
6602
6663
  r
6603
- ]), S = z((e, t) => {
6604
- u.current && (u.current.textContent = Wl(v(e))), d.current && (d.current.textContent = String(e)), y(n > 0 ? e / Math.max(1, n - 1) : 0), t && (x(e), g.current = Date.now());
6664
+ ]), S = R((e, t) => {
6665
+ u.current && (u.current.textContent = ql(v(e))), d.current && (d.current.textContent = String(e)), y(n > 0 ? e / Math.max(1, n - 1) : 0), t && (x(e), g.current = Date.now());
6605
6666
  }, [
6606
6667
  v,
6607
6668
  n,
6608
6669
  x,
6609
6670
  y
6610
- ]), C = z((e, t = !0) => {
6671
+ ]), C = R((e, t = !0) => {
6611
6672
  o(e), S(e, t);
6612
- }, [o, S]), w = z((e) => {
6673
+ }, [o, S]), w = R((e) => {
6613
6674
  if (n === 0) return;
6614
6675
  let t = Math.round(Math.max(0, Math.min(1, e)) * (n - 1));
6615
6676
  C(t);
6616
- }, [C, n]), T = z((e) => {
6677
+ }, [C, n]), E = R((e) => {
6617
6678
  if (!m.current || n === 0) return;
6618
6679
  let t = m.current.getBoundingClientRect();
6619
6680
  if (t.width <= 0) return;
6620
6681
  let r = (e - t.left) / t.width;
6621
6682
  w(r);
6622
- }, [w, n]), D = z((e) => {
6683
+ }, [w, n]), D = R((e) => {
6623
6684
  if (a || n === 0) return;
6624
6685
  let t = s(), r = null;
6625
6686
  switch (e.key) {
@@ -6646,11 +6707,11 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6646
6707
  s,
6647
6708
  a,
6648
6709
  n
6649
- ]), O = z((e) => {
6710
+ ]), O = R((e) => {
6650
6711
  if (!m.current || a || n === 0) return;
6651
- _.current?.(), h.current = !0, b(!0), m.current.setPointerCapture(e.pointerId), T(e.clientX);
6712
+ _.current?.(), h.current = !0, b(!0), m.current.setPointerCapture(e.pointerId), E(e.clientX);
6652
6713
  let t = (e) => {
6653
- h.current && T(e.clientX);
6714
+ h.current && E(e.clientX);
6654
6715
  }, r = () => {
6655
6716
  window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i), _.current = null;
6656
6717
  }, i = (e) => {
@@ -6661,25 +6722,25 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6661
6722
  a,
6662
6723
  n,
6663
6724
  b,
6664
- T
6725
+ E
6665
6726
  ]);
6666
- B(() => {
6727
+ z(() => {
6667
6728
  let e = n > 0 ? Math.min(s(), n - 1) : 0;
6668
6729
  S(e, !0);
6669
6730
  }, [
6670
6731
  s,
6671
6732
  S,
6672
6733
  n
6673
- ]), B(() => c((e) => {
6734
+ ]), z(() => c((e) => {
6674
6735
  if (h.current) return;
6675
- let t = Date.now() - g.current >= Hl;
6736
+ let t = Date.now() - g.current >= Gl;
6676
6737
  S(e, t);
6677
- }), [c, S]), B(() => () => {
6738
+ }), [c, S]), z(() => () => {
6678
6739
  _.current?.();
6679
6740
  }, []);
6680
- let ee = V(() => Wl(v(i)), [v, i]), te = V(() => l("playback.a11y.valuetext", {
6681
- time: Wl(v(i)),
6682
- totalTime: Wl(r),
6741
+ let ee = B(() => ql(v(i)), [v, i]), te = B(() => l("playback.a11y.valuetext", {
6742
+ time: ql(v(i)),
6743
+ totalTime: ql(r),
6683
6744
  frame: i,
6684
6745
  totalFrames: n
6685
6746
  }), [
@@ -6689,16 +6750,16 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6689
6750
  n,
6690
6751
  r
6691
6752
  ]), ne = "text-xs font-mono font-semibold tabular-nums whitespace-nowrap text-foreground", k = "text-[10px] font-mono tabular-nums text-muted-foreground";
6692
- return /* @__PURE__ */ G("div", {
6753
+ return /* @__PURE__ */ W("div", {
6693
6754
  className: "flex-1 flex flex-col justify-center gap-1.5 px-2",
6694
- children: [/* @__PURE__ */ G("div", {
6755
+ children: [/* @__PURE__ */ W("div", {
6695
6756
  className: "flex items-end justify-between gap-4",
6696
- children: [/* @__PURE__ */ W("div", {
6757
+ children: [/* @__PURE__ */ U("div", {
6697
6758
  className: "flex min-w-0 flex-col justify-end",
6698
- children: /* @__PURE__ */ G("div", {
6759
+ children: /* @__PURE__ */ W("div", {
6699
6760
  className: "flex items-baseline gap-1.5",
6700
6761
  title: l("playback.progress"),
6701
- children: [/* @__PURE__ */ W("span", {
6762
+ children: [/* @__PURE__ */ U("span", {
6702
6763
  ref: u,
6703
6764
  className: ne,
6704
6765
  style: {
@@ -6706,17 +6767,17 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6706
6767
  display: "inline-block"
6707
6768
  },
6708
6769
  children: ee
6709
- }), /* @__PURE__ */ G("span", {
6770
+ }), /* @__PURE__ */ W("span", {
6710
6771
  className: k,
6711
- children: ["/ ", Wl(r)]
6772
+ children: ["/ ", ql(r)]
6712
6773
  })]
6713
6774
  })
6714
- }), /* @__PURE__ */ W("div", {
6775
+ }), /* @__PURE__ */ U("div", {
6715
6776
  className: "flex min-w-[96px] flex-col items-end justify-end",
6716
- children: /* @__PURE__ */ G("div", {
6777
+ children: /* @__PURE__ */ W("div", {
6717
6778
  className: "flex items-baseline gap-1.5",
6718
6779
  title: l("units.frame"),
6719
- children: [/* @__PURE__ */ W("span", {
6780
+ children: [/* @__PURE__ */ U("span", {
6720
6781
  ref: d,
6721
6782
  className: ne,
6722
6783
  style: {
@@ -6725,13 +6786,13 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6725
6786
  textAlign: "right"
6726
6787
  },
6727
6788
  children: i
6728
- }), /* @__PURE__ */ G("span", {
6789
+ }), /* @__PURE__ */ W("span", {
6729
6790
  className: k,
6730
6791
  children: ["/ ", n]
6731
6792
  })]
6732
6793
  })
6733
6794
  })]
6734
- }), /* @__PURE__ */ G("div", {
6795
+ }), /* @__PURE__ */ W("div", {
6735
6796
  ref: m,
6736
6797
  className: "relative h-1.5 w-full cursor-pointer rounded-full bg-primary/20 touch-none",
6737
6798
  onPointerDown: O,
@@ -6744,7 +6805,7 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6744
6805
  "aria-valuemax": Math.max(0, n - 1),
6745
6806
  "aria-valuenow": i,
6746
6807
  "aria-valuetext": te,
6747
- children: [/* @__PURE__ */ W("div", {
6808
+ children: [/* @__PURE__ */ U("div", {
6748
6809
  ref: f,
6749
6810
  className: "absolute h-full rounded-full bg-primary pointer-events-none",
6750
6811
  style: {
@@ -6752,50 +6813,50 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6752
6813
  transform: `scaleX(${n > 1 ? i / (n - 1) : 0})`,
6753
6814
  transformOrigin: "left center"
6754
6815
  }
6755
- }), /* @__PURE__ */ W("div", {
6816
+ }), /* @__PURE__ */ U("div", {
6756
6817
  ref: p,
6757
6818
  className: "absolute left-0 top-1/2 h-4 w-4 rounded-full border border-primary/50 bg-background transition-shadow will-change-transform hover:shadow-md",
6758
6819
  style: {
6759
- left: Ul(n > 1 ? i / (n - 1) : 0),
6820
+ left: Kl(n > 1 ? i / (n - 1) : 0),
6760
6821
  transform: "translateY(-50%)"
6761
6822
  }
6762
6823
  })]
6763
6824
  })]
6764
6825
  });
6765
6826
  });
6766
- Gl.displayName = "PlaybackProgressSlider";
6827
+ Jl.displayName = "PlaybackProgressSlider";
6767
6828
  //#endregion
6768
6829
  //#region src/react/components/Playback/PlaybackBar.tsx
6769
- var Kl = () => {
6770
- let { t: e } = E(), { currentFrames: t, currentFrameIndex: n, setFrameIndex: a, isPlaying: o, setPlaying: s, playbackMode: c, setPlaybackMode: l, playbackSpeed: u, setPlaybackSpeed: d } = x(), { info: p, subscribeFrameIndex: m, getFrameIndex: h, isLoading: g } = N(), { selectedEpisodeIndex: _ } = te(), { tasks: y } = ol(), b = y.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), S = t.length, w = p?.fps || 30, T = H(null), D = H(!1);
6771
- B(() => {
6772
- let e = `${_}-${S}`;
6773
- Zc({
6774
- totalFrames: S,
6775
- isLoading: g,
6830
+ var Yl = () => {
6831
+ let { t: e } = T(), { currentFrames: t, currentFrameIndex: r, setFrameIndex: a, isPlaying: o, setPlaying: s, playbackMode: c, setPlaybackMode: u, playbackSpeed: f, setPlaybackSpeed: p } = S(), { info: m, subscribeFrameIndex: h, getFrameIndex: g, isLoading: _ } = N(), { selectedEpisodeIndex: y } = ne(), { tasks: b } = ll(), C = b.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), w = t.length, E = m?.fps || 30, D = V(null), O = V(!1);
6832
+ z(() => {
6833
+ let e = `${y}-${w}`;
6834
+ el({
6835
+ totalFrames: w,
6836
+ isLoading: _,
6776
6837
  isPlaying: o,
6777
- userPaused: D.current,
6838
+ userPaused: O.current,
6778
6839
  currentId: e,
6779
- lastAutoPlayId: T.current
6780
- }) && (T.current = e, s(!0));
6840
+ lastAutoPlayId: D.current
6841
+ }) && (D.current = e, s(!0));
6781
6842
  }, [
6782
- S,
6783
- g,
6843
+ w,
6844
+ _,
6784
6845
  o,
6785
6846
  s,
6786
- _
6787
- ]), B(() => {
6788
- D.current = !1;
6789
- }, [_]), B(() => {
6790
- g && (T.current = null);
6791
- }, [g]);
6847
+ y
6848
+ ]), z(() => {
6849
+ O.current = !1;
6850
+ }, [y]), z(() => {
6851
+ _ && (D.current = null);
6852
+ }, [_]);
6792
6853
  let ee = () => {
6793
- l(c === "sequential" ? "shuffle" : c === "shuffle" ? "loop" : "sequential");
6794
- }, ne = () => {
6854
+ u(c === "sequential" ? "shuffle" : c === "shuffle" ? "loop" : "sequential");
6855
+ }, te = () => {
6795
6856
  switch (c) {
6796
- case "loop": return /* @__PURE__ */ W(Ls, { className: "h-4 w-4" });
6797
- case "shuffle": return /* @__PURE__ */ W(zs, { className: "h-4 w-4" });
6798
- case "sequential": return /* @__PURE__ */ W(Rs, { className: "h-4 w-4" });
6857
+ case "loop": return /* @__PURE__ */ U(Ls, { className: "h-4 w-4" });
6858
+ case "shuffle": return /* @__PURE__ */ U(zs, { className: "h-4 w-4" });
6859
+ case "sequential": return /* @__PURE__ */ U(Rs, { className: "h-4 w-4" });
6799
6860
  }
6800
6861
  }, k = [
6801
6862
  .25,
@@ -6804,478 +6865,478 @@ var Kl = () => {
6804
6865
  2,
6805
6866
  4
6806
6867
  ], A = () => {
6807
- let e = k.indexOf(u), t = k[(e + 1) % k.length];
6808
- d(t);
6868
+ let e = k.indexOf(f), t = k[(e + 1) % k.length];
6869
+ p(t);
6809
6870
  }, re = () => {
6810
6871
  switch (c) {
6811
6872
  case "loop": return e("playback.mode.loop");
6812
6873
  case "shuffle": return e("playback.mode.shuffle");
6813
6874
  case "sequential": return e("playback.mode.sequential");
6814
6875
  }
6815
- }, j = V(() => S === 0 ? 0 : t[S - 1]?.timestamp === void 0 ? S / w : t[S - 1].timestamp, [
6816
- S,
6876
+ }, j = B(() => w === 0 ? 0 : t[w - 1]?.timestamp === void 0 ? w / E : t[w - 1].timestamp, [
6877
+ w,
6817
6878
  t,
6818
- w
6819
- ]), ie = z(() => {
6879
+ E
6880
+ ]), ie = R(() => {
6820
6881
  let e = !o;
6821
- D.current = !e, s(e);
6882
+ O.current = !e, s(e);
6822
6883
  }, [o, s]);
6823
- return S === 0 && !g && !b ? /* @__PURE__ */ W("div", {
6884
+ return w === 0 && !_ && !C ? /* @__PURE__ */ U("div", {
6824
6885
  className: "h-16 border-t bg-background/50 px-6 flex items-center justify-center text-muted-foreground italic text-sm",
6825
6886
  children: e("playback.noData")
6826
- }) : g || b ? /* @__PURE__ */ G("div", {
6887
+ }) : _ || C ? /* @__PURE__ */ W("div", {
6827
6888
  className: "h-16 border-t bg-background text-foreground px-4 flex items-center gap-4 animate-pulse motion-reduce:animate-none pointer-events-none opacity-60",
6828
6889
  role: "status",
6829
6890
  "aria-live": "polite",
6830
- "aria-label": b?.message || e("common.loading"),
6891
+ "aria-label": C?.message || e("common.loading"),
6831
6892
  children: [
6832
- /* @__PURE__ */ G("div", {
6893
+ /* @__PURE__ */ W("div", {
6833
6894
  className: "flex items-center gap-1",
6834
6895
  children: [
6835
- /* @__PURE__ */ W("div", { className: "h-8 w-8 rounded bg-muted" }),
6836
- /* @__PURE__ */ W("div", { className: "h-8 w-12 rounded bg-muted" }),
6837
- /* @__PURE__ */ W("div", { className: "h-8 w-8 rounded bg-muted" }),
6838
- /* @__PURE__ */ W("div", { className: "h-9 w-9 rounded-full bg-muted" }),
6839
- /* @__PURE__ */ W("div", { className: "h-8 w-8 rounded bg-muted" })
6896
+ /* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" }),
6897
+ /* @__PURE__ */ U("div", { className: "h-8 w-12 rounded bg-muted" }),
6898
+ /* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" }),
6899
+ /* @__PURE__ */ U("div", { className: "h-9 w-9 rounded-full bg-muted" }),
6900
+ /* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" })
6840
6901
  ]
6841
6902
  }),
6842
- /* @__PURE__ */ W($s, {
6903
+ /* @__PURE__ */ U($s, {
6843
6904
  orientation: "vertical",
6844
6905
  className: "h-8 mx-2 bg-border"
6845
6906
  }),
6846
- /* @__PURE__ */ G("div", {
6907
+ /* @__PURE__ */ W("div", {
6847
6908
  className: "flex-1 flex flex-col justify-center gap-2",
6848
- children: [/* @__PURE__ */ G("div", {
6909
+ children: [/* @__PURE__ */ W("div", {
6849
6910
  className: "flex justify-between",
6850
- children: [/* @__PURE__ */ W("div", { className: "h-3 w-24 bg-muted rounded" }), /* @__PURE__ */ W("div", { className: "h-3 w-16 bg-muted rounded" })]
6851
- }), /* @__PURE__ */ W("div", { className: "h-1.5 w-full bg-muted rounded-full" })]
6911
+ children: [/* @__PURE__ */ U("div", { className: "h-3 w-24 bg-muted rounded" }), /* @__PURE__ */ U("div", { className: "h-3 w-16 bg-muted rounded" })]
6912
+ }), /* @__PURE__ */ U("div", { className: "h-1.5 w-full bg-muted rounded-full" })]
6852
6913
  }),
6853
- /* @__PURE__ */ W($s, {
6914
+ /* @__PURE__ */ U($s, {
6854
6915
  orientation: "vertical",
6855
6916
  className: "h-8 mx-2 bg-border"
6856
6917
  }),
6857
- /* @__PURE__ */ G("div", {
6918
+ /* @__PURE__ */ W("div", {
6858
6919
  className: "flex items-center gap-4",
6859
- children: [/* @__PURE__ */ W("div", { className: "h-8 w-12 bg-muted rounded" }), /* @__PURE__ */ W("div", { className: "h-8 w-16 bg-muted rounded" })]
6920
+ children: [/* @__PURE__ */ U("div", { className: "h-8 w-12 bg-muted rounded" }), /* @__PURE__ */ U("div", { className: "h-8 w-16 bg-muted rounded" })]
6860
6921
  })
6861
6922
  ]
6862
- }) : /* @__PURE__ */ G("div", {
6923
+ }) : /* @__PURE__ */ W("div", {
6863
6924
  className: "h-16 border-t bg-background text-foreground px-4 flex items-center gap-4",
6864
6925
  children: [
6865
- /* @__PURE__ */ G("div", {
6926
+ /* @__PURE__ */ W("div", {
6866
6927
  className: "flex items-center gap-1",
6867
6928
  children: [
6868
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6869
- render: /* @__PURE__ */ W(f, {
6929
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6930
+ render: /* @__PURE__ */ U(i, {
6870
6931
  variant: "ghost",
6871
6932
  size: "icon",
6872
6933
  className: `h-8 w-8 ${c === "sequential" ? "text-muted-foreground" : "text-primary"} hover:text-foreground`,
6873
6934
  onClick: ee,
6874
- disabled: g,
6935
+ disabled: _,
6875
6936
  "aria-label": e("playback.mode.toggle")
6876
6937
  }),
6877
- children: ne()
6878
- }), /* @__PURE__ */ W(v, { children: re() })] }),
6879
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ G(I, {
6880
- render: /* @__PURE__ */ W(f, {
6938
+ children: te()
6939
+ }), /* @__PURE__ */ U(ce, { children: re() })] }),
6940
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ W(x, {
6941
+ render: /* @__PURE__ */ U(i, {
6881
6942
  variant: "ghost",
6882
6943
  size: "sm",
6883
6944
  className: "h-8 px-2 font-mono text-xs",
6884
6945
  onClick: A,
6885
- disabled: g || S === 0,
6946
+ disabled: _ || w === 0,
6886
6947
  "aria-label": e("playback.speed")
6887
6948
  }),
6888
- children: [u, "x"]
6889
- }), /* @__PURE__ */ W(v, { children: e("playback.speed") })] }),
6890
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6891
- render: /* @__PURE__ */ W(f, {
6949
+ children: [f, "x"]
6950
+ }), /* @__PURE__ */ U(ce, { children: e("playback.speed") })] }),
6951
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6952
+ render: /* @__PURE__ */ U(i, {
6892
6953
  variant: "ghost",
6893
6954
  size: "icon",
6894
6955
  className: "h-8 w-8",
6895
- onClick: () => a(Math.max(0, h() - 1)),
6896
- disabled: g,
6956
+ onClick: () => a(Math.max(0, g() - 1)),
6957
+ disabled: _,
6897
6958
  "aria-label": e("panels.keyboardShortcuts.prevFrame.action")
6898
6959
  }),
6899
- children: /* @__PURE__ */ W(As, { className: "h-4 w-4" })
6900
- }), /* @__PURE__ */ W(v, { children: e("panels.keyboardShortcuts.prevFrame.action") })] }),
6901
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6902
- render: /* @__PURE__ */ W(f, {
6960
+ children: /* @__PURE__ */ U(As, { className: "h-4 w-4" })
6961
+ }), /* @__PURE__ */ U(ce, { children: e("panels.keyboardShortcuts.prevFrame.action") })] }),
6962
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6963
+ render: /* @__PURE__ */ U(i, {
6903
6964
  variant: "default",
6904
6965
  size: "icon",
6905
6966
  className: "h-9 w-9 rounded-full transition-all",
6906
6967
  onClick: ie,
6907
- disabled: g || S === 0,
6968
+ disabled: _ || w === 0,
6908
6969
  "aria-label": e("panels.keyboardShortcuts.playPause.action")
6909
6970
  }),
6910
- children: o ? /* @__PURE__ */ W(r, { className: "h-4 w-4" }) : /* @__PURE__ */ W(i, { className: "h-4 w-4 fill-current" })
6911
- }), /* @__PURE__ */ W(v, { children: e("panels.keyboardShortcuts.playPause.action") })] }),
6912
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6913
- render: /* @__PURE__ */ W(f, {
6971
+ children: o ? /* @__PURE__ */ U(d, { className: "h-4 w-4" }) : /* @__PURE__ */ U(n, { className: "h-4 w-4 fill-current" })
6972
+ }), /* @__PURE__ */ U(ce, { children: e("panels.keyboardShortcuts.playPause.action") })] }),
6973
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6974
+ render: /* @__PURE__ */ U(i, {
6914
6975
  variant: "ghost",
6915
6976
  size: "icon",
6916
6977
  className: "h-8 w-8",
6917
- onClick: () => a(Math.min(S - 1, h() + 1)),
6918
- disabled: g,
6978
+ onClick: () => a(Math.min(w - 1, g() + 1)),
6979
+ disabled: _,
6919
6980
  "aria-label": e("panels.keyboardShortcuts.nextFrame.action")
6920
6981
  }),
6921
- children: /* @__PURE__ */ W(O, { className: "h-4 w-4" })
6922
- }), /* @__PURE__ */ W(v, { children: e("panels.keyboardShortcuts.nextFrame.action") })] })
6982
+ children: /* @__PURE__ */ U(l, { className: "h-4 w-4" })
6983
+ }), /* @__PURE__ */ U(ce, { children: e("panels.keyboardShortcuts.nextFrame.action") })] })
6923
6984
  ]
6924
6985
  }),
6925
- /* @__PURE__ */ W($s, {
6986
+ /* @__PURE__ */ U($s, {
6926
6987
  orientation: "vertical",
6927
6988
  className: "h-8 mx-2 bg-border"
6928
6989
  }),
6929
- /* @__PURE__ */ W(Gl, {
6990
+ /* @__PURE__ */ U(Jl, {
6930
6991
  currentFrames: t,
6931
- fps: w,
6932
- totalFrames: S,
6992
+ fps: E,
6993
+ totalFrames: w,
6933
6994
  totalTime: j,
6934
- initialFrameIndex: n,
6935
- isDisabled: g || !!b,
6995
+ initialFrameIndex: r,
6996
+ isDisabled: _ || !!C,
6936
6997
  setFrameIndex: a,
6937
- getFrameIndex: h,
6938
- subscribeFrameIndex: m
6998
+ getFrameIndex: g,
6999
+ subscribeFrameIndex: h
6939
7000
  }),
6940
- /* @__PURE__ */ W($s, {
7001
+ /* @__PURE__ */ U($s, {
6941
7002
  orientation: "vertical",
6942
7003
  className: "h-8 mx-2 bg-border"
6943
7004
  }),
6944
- /* @__PURE__ */ G("div", {
7005
+ /* @__PURE__ */ W("div", {
6945
7006
  className: "flex items-center gap-4 pr-2",
6946
- children: [/* @__PURE__ */ G("div", {
7007
+ children: [/* @__PURE__ */ W("div", {
6947
7008
  className: "flex flex-col items-end",
6948
- children: [/* @__PURE__ */ W("span", {
7009
+ children: [/* @__PURE__ */ U("span", {
6949
7010
  className: "text-[9px] font-bold text-muted-foreground/60 uppercase tracking-wider",
6950
7011
  children: e("playback.meta.fps")
6951
- }), /* @__PURE__ */ W(Ds, {
7012
+ }), /* @__PURE__ */ U(Ds, {
6952
7013
  variant: "secondary",
6953
7014
  className: "text-[10px] h-4.5 px-1 py-0 font-mono",
6954
- children: w
7015
+ children: E
6955
7016
  })]
6956
- }), /* @__PURE__ */ G("div", {
7017
+ }), /* @__PURE__ */ W("div", {
6957
7018
  className: "flex flex-col items-end min-w-[60px]",
6958
- children: [/* @__PURE__ */ W("span", {
7019
+ children: [/* @__PURE__ */ U("span", {
6959
7020
  className: "text-[9px] font-bold text-muted-foreground/60 uppercase tracking-wider",
6960
7021
  children: e("playback.meta.version")
6961
- }), /* @__PURE__ */ W("span", {
7022
+ }), /* @__PURE__ */ U("span", {
6962
7023
  className: "text-[10px] font-mono text-foreground/80",
6963
- children: p?.codebase_version || "N/A"
7024
+ children: m?.codebase_version || "N/A"
6964
7025
  })]
6965
7026
  })]
6966
7027
  })
6967
7028
  ]
6968
7029
  });
6969
- }, ql = ({ title: t, message: n, onRetry: r, errorDetail: i }) => {
6970
- let { t: a } = E(), { reset: o } = N(), [s, c] = U(!1);
6971
- return /* @__PURE__ */ G("div", {
7030
+ }, Xl = ({ title: e, message: t, onRetry: n, errorDetail: a }) => {
7031
+ let { t: o } = T(), { reset: s } = N(), [c, l] = H(!1);
7032
+ return /* @__PURE__ */ W("div", {
6972
7033
  className: "flex flex-col items-center justify-center p-8 text-center max-w-md mx-auto h-full space-y-6",
6973
7034
  role: "alert",
6974
7035
  "aria-live": "assertive",
6975
7036
  children: [
6976
- /* @__PURE__ */ W("div", {
7037
+ /* @__PURE__ */ U("div", {
6977
7038
  className: "bg-destructive/10 p-4 rounded-full",
6978
- children: /* @__PURE__ */ W(js, { className: "h-12 w-12 text-destructive" })
7039
+ children: /* @__PURE__ */ U(js, { className: "h-12 w-12 text-destructive" })
6979
7040
  }),
6980
- /* @__PURE__ */ G("div", {
7041
+ /* @__PURE__ */ W("div", {
6981
7042
  className: "space-y-2",
6982
- children: [/* @__PURE__ */ W("h3", {
7043
+ children: [/* @__PURE__ */ U("h3", {
6983
7044
  className: "text-xl font-bold text-foreground",
6984
- children: t || a("common.error")
6985
- }), /* @__PURE__ */ W("p", {
7045
+ children: e || o("common.error")
7046
+ }), /* @__PURE__ */ U("p", {
6986
7047
  className: "text-muted-foreground",
6987
- children: n || a("errors.generic")
7048
+ children: t || o("errors.generic")
6988
7049
  })]
6989
7050
  }),
6990
- i && /* @__PURE__ */ G("div", {
7051
+ a && /* @__PURE__ */ W("div", {
6991
7052
  className: "w-full bg-muted/50 rounded-lg p-3 text-left overflow-hidden",
6992
- children: [/* @__PURE__ */ G("div", {
7053
+ children: [/* @__PURE__ */ W("div", {
6993
7054
  className: "flex justify-between items-center mb-2",
6994
- children: [/* @__PURE__ */ W("span", {
7055
+ children: [/* @__PURE__ */ U("span", {
6995
7056
  className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider",
6996
- children: a("errors.details")
6997
- }), /* @__PURE__ */ W(f, {
7057
+ children: o("errors.details")
7058
+ }), /* @__PURE__ */ U(i, {
6998
7059
  variant: "ghost",
6999
7060
  size: "icon",
7000
7061
  className: "h-6 w-6",
7001
7062
  onClick: () => {
7002
- i && (navigator.clipboard.writeText(i), c(!0), setTimeout(() => c(!1), 2e3));
7063
+ a && (navigator.clipboard.writeText(a), l(!0), setTimeout(() => l(!1), 2e3));
7003
7064
  },
7004
- "aria-label": s ? a("common.copied", "Copied") : a("common.copy"),
7005
- title: a("common.copy"),
7006
- children: s ? /* @__PURE__ */ W(l, { className: "h-3 w-3 text-green-500" }) : /* @__PURE__ */ W(e, { className: "h-3 w-3" })
7065
+ "aria-label": c ? o("common.copied", "Copied") : o("common.copy"),
7066
+ title: o("common.copy"),
7067
+ children: c ? /* @__PURE__ */ U(u, { className: "h-3 w-3 text-green-500" }) : /* @__PURE__ */ U(ee, { className: "h-3 w-3" })
7007
7068
  })]
7008
- }), /* @__PURE__ */ W("pre", {
7069
+ }), /* @__PURE__ */ U("pre", {
7009
7070
  className: "text-xs font-mono text-muted-foreground break-all whitespace-pre-wrap max-h-32 overflow-y-auto",
7010
- children: i
7071
+ children: a
7011
7072
  })]
7012
7073
  }),
7013
- /* @__PURE__ */ G("div", {
7074
+ /* @__PURE__ */ W("div", {
7014
7075
  className: "flex flex-wrap items-center justify-center gap-3 w-full",
7015
- children: [r && /* @__PURE__ */ G(f, {
7016
- onClick: r,
7076
+ children: [n && /* @__PURE__ */ W(i, {
7077
+ onClick: n,
7017
7078
  variant: "default",
7018
7079
  className: "gap-2",
7019
- children: [/* @__PURE__ */ W(m, { className: "h-4 w-4" }), a("common.retry")]
7020
- }), /* @__PURE__ */ G(f, {
7021
- onClick: o,
7080
+ children: [/* @__PURE__ */ U(r, { className: "h-4 w-4" }), o("common.retry")]
7081
+ }), /* @__PURE__ */ W(i, {
7082
+ onClick: s,
7022
7083
  variant: "outline",
7023
7084
  className: "gap-2",
7024
- children: [/* @__PURE__ */ W(Ns, { className: "h-4 w-4" }), a("navbar.goHome")]
7085
+ children: [/* @__PURE__ */ U(Ns, { className: "h-4 w-4" }), o("navbar.goHome")]
7025
7086
  })]
7026
7087
  })
7027
7088
  ]
7028
7089
  });
7029
- }, Jl = R.lazy(async () => ({ default: (await import("./DockviewLayout-DjLrI3Yt.js")).DockviewLayout }));
7030
- function Yl({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sidebar: r, emptyState: i, sidebarHeader: a, showToaster: o = !0, onRetry: s }) {
7031
- let { t: c } = E(), { episodes: l, info: u, clearError: d, error: f } = N(), { tasks: p } = ol(), m = u !== null && l.length > 0, h = m && e && !!r, g = p.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), _ = p.find((e) => e.phase === "error"), v = s ?? (() => {
7090
+ }, Zl = L.lazy(async () => ({ default: (await import("./DockviewLayout-DeRL52Yo.js")).DockviewLayout }));
7091
+ function Ql({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sidebar: r, emptyState: i, sidebarHeader: a, showToaster: o = !0, onRetry: s }) {
7092
+ let { t: c } = T(), { episodes: l, info: u, clearError: d, error: f } = N(), { tasks: p } = ll(), m = u !== null && l.length > 0, h = m && e && !!r, g = p.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), _ = p.find((e) => e.phase === "error"), v = s ?? (() => {
7032
7093
  d();
7033
7094
  });
7034
- return /* @__PURE__ */ G("div", {
7035
- className: A("flex flex-col h-full w-full overflow-hidden", n),
7036
- children: [/* @__PURE__ */ G("div", {
7095
+ return /* @__PURE__ */ W("div", {
7096
+ className: D("flex flex-col h-full w-full overflow-hidden", n),
7097
+ children: [/* @__PURE__ */ W("div", {
7037
7098
  className: "flex flex-1 overflow-hidden",
7038
- children: [h && /* @__PURE__ */ G(Bl, {
7099
+ children: [h && /* @__PURE__ */ W(Ul, {
7039
7100
  defaultWidth: 256,
7040
7101
  minWidth: 200,
7041
7102
  maxWidth: 600,
7042
7103
  className: "min-w-0 overflow-hidden",
7043
- children: [a, /* @__PURE__ */ W("div", {
7104
+ children: [a, /* @__PURE__ */ U("div", {
7044
7105
  className: "flex flex-1 min-h-0 flex-col overflow-hidden",
7045
7106
  children: r
7046
7107
  })]
7047
- }), /* @__PURE__ */ G("div", {
7108
+ }), /* @__PURE__ */ W("div", {
7048
7109
  className: "flex-1 flex flex-col min-w-0",
7049
- children: [/* @__PURE__ */ W("div", {
7050
- className: "flex-1 overflow-hidden relative",
7051
- children: u ? /* @__PURE__ */ G(he, { children: [f ? /* @__PURE__ */ W("div", {
7110
+ children: [/* @__PURE__ */ U("div", {
7111
+ className: "flex-1 min-w-0 min-h-0 overflow-hidden relative",
7112
+ children: u ? /* @__PURE__ */ W(ge, { children: [f ? /* @__PURE__ */ U("div", {
7052
7113
  className: "absolute inset-x-0 top-0 z-10 px-3 py-2 text-xs bg-destructive/10 text-destructive border-b border-destructive/20",
7053
7114
  children: f
7054
- }) : null, /* @__PURE__ */ W(de, {
7055
- fallback: /* @__PURE__ */ W("div", {
7115
+ }) : null, /* @__PURE__ */ U(fe, {
7116
+ fallback: /* @__PURE__ */ U("div", {
7056
7117
  className: "w-full h-full flex items-center justify-center text-muted-foreground bg-background/50 backdrop-blur-sm z-50",
7057
7118
  role: "status",
7058
7119
  "aria-live": "polite",
7059
- children: /* @__PURE__ */ G("div", {
7120
+ children: /* @__PURE__ */ W("div", {
7060
7121
  className: "flex flex-col items-center gap-4",
7061
- children: [/* @__PURE__ */ G("div", {
7122
+ children: [/* @__PURE__ */ W("div", {
7062
7123
  className: "flex items-center gap-3",
7063
- children: [/* @__PURE__ */ W("div", {
7124
+ children: [/* @__PURE__ */ U("div", {
7064
7125
  className: "h-5 w-5 border-2 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
7065
7126
  "aria-hidden": !0
7066
- }), /* @__PURE__ */ W("span", {
7127
+ }), /* @__PURE__ */ U("span", {
7067
7128
  className: "text-sm font-medium",
7068
7129
  children: c("common.loadingLayout")
7069
7130
  })]
7070
- }), /* @__PURE__ */ W("p", {
7131
+ }), /* @__PURE__ */ U("p", {
7071
7132
  className: "text-xs text-muted-foreground",
7072
7133
  children: c("common.firstLoadNote")
7073
7134
  })]
7074
7135
  })
7075
7136
  }),
7076
- children: /* @__PURE__ */ W(Jl, {})
7077
- })] }) : g ? /* @__PURE__ */ W("div", {
7137
+ children: /* @__PURE__ */ U(Zl, {})
7138
+ })] }) : g ? /* @__PURE__ */ U("div", {
7078
7139
  className: "w-full h-full flex items-center justify-center text-muted-foreground",
7079
7140
  role: "status",
7080
7141
  "aria-live": "polite",
7081
- children: /* @__PURE__ */ G("div", {
7142
+ children: /* @__PURE__ */ W("div", {
7082
7143
  className: "flex flex-col items-center gap-4 max-w-md text-center px-6",
7083
- children: [/* @__PURE__ */ W("div", {
7144
+ children: [/* @__PURE__ */ U("div", {
7084
7145
  className: "h-10 w-10 border-4 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
7085
7146
  "aria-hidden": !0
7086
- }), /* @__PURE__ */ G("div", {
7147
+ }), /* @__PURE__ */ W("div", {
7087
7148
  className: "space-y-2",
7088
- children: [/* @__PURE__ */ W("h3", {
7149
+ children: [/* @__PURE__ */ U("h3", {
7089
7150
  className: "text-lg font-semibold text-foreground",
7090
7151
  children: c(`loading.phase.${g.phase}`)
7091
- }), /* @__PURE__ */ W("p", {
7152
+ }), /* @__PURE__ */ U("p", {
7092
7153
  className: "text-sm text-muted-foreground animate-pulse motion-reduce:animate-none",
7093
7154
  children: g.message || c("common.loading")
7094
7155
  })]
7095
7156
  })]
7096
7157
  })
7097
- }) : _ ? /* @__PURE__ */ W(ql, {
7158
+ }) : _ ? /* @__PURE__ */ U(Xl, {
7098
7159
  title: c("common.error"),
7099
7160
  message: c("errors.loadFailed"),
7100
7161
  errorDetail: _.error || void 0,
7101
7162
  onRetry: v
7102
- }) : i ?? /* @__PURE__ */ W("div", {
7163
+ }) : i ?? /* @__PURE__ */ U("div", {
7103
7164
  className: "w-full h-full flex items-center justify-center text-muted-foreground",
7104
7165
  role: "status",
7105
7166
  "aria-live": "polite",
7106
- children: /* @__PURE__ */ W("div", {
7167
+ children: /* @__PURE__ */ U("div", {
7107
7168
  className: "text-center",
7108
- children: /* @__PURE__ */ W("p", { children: c("common.loading") })
7169
+ children: /* @__PURE__ */ U("p", { children: c("common.loading") })
7109
7170
  })
7110
7171
  })
7111
- }), t && m && /* @__PURE__ */ W(Kl, {})]
7172
+ }), t && m && /* @__PURE__ */ U(Yl, {})]
7112
7173
  })]
7113
- }), o ? /* @__PURE__ */ W(Tl, {}) : null]
7174
+ }), o ? /* @__PURE__ */ U(Ol, {}) : null]
7114
7175
  });
7115
7176
  }
7116
7177
  //#endregion
7117
7178
  //#region src/react/components/LeRobotViewer.tsx
7118
- function Xl({ dataSource: e, showSidebar: t = !0, showPlaybackBar: n = !0, onFatalError: r, enableKeyboardShortcuts: i = !0, onBack: a, onExport: o }) {
7119
- let { t: s } = E(), { initialize: c, error: l, isLoading: u, clearError: d } = N();
7120
- zl(i);
7121
- let p = H(null), [m, h] = U(null), [g, _] = U(null), [v, y] = U(!1), b = H(null), x = V(() => g ?? (l ? {
7179
+ function $l({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFatalError: a, enableKeyboardShortcuts: o = !0, onBack: s, onExport: c }) {
7180
+ let { t: l } = T(), { initialize: u, error: d, isLoading: f, clearError: p } = N();
7181
+ Hl(o);
7182
+ let m = V(null), [h, g] = H(null), [_, v] = H(null), [y, b] = H(!1), x = V(null), S = B(() => _ ?? (d ? {
7122
7183
  code: "DATASET_LOAD_FAILED",
7123
- message: l,
7184
+ message: d,
7124
7185
  recoverable: !0
7125
- } : null), [l, g]), S = (e) => {
7186
+ } : null), [d, _]), C = (e) => {
7126
7187
  try {
7127
7188
  return new URL(e, window.location.href).toString();
7128
7189
  } catch {
7129
7190
  return e;
7130
7191
  }
7131
7192
  };
7132
- B(() => {
7133
- let t = !1;
7134
- return d(), (async () => {
7135
- if (_(null), y(!1), typeof e != "string") {
7136
- h(e);
7193
+ z(() => {
7194
+ let e = !1;
7195
+ return p(), (async () => {
7196
+ if (v(null), b(!1), typeof t != "string") {
7197
+ g(t);
7137
7198
  return;
7138
7199
  }
7139
- let n = e.trim();
7200
+ let n = t.trim();
7140
7201
  if (!n) {
7141
- h(null), _({
7202
+ g(null), v({
7142
7203
  code: "INVALID_DATA_SOURCE",
7143
- message: `${s("common.error")}: empty dataSource url`,
7204
+ message: `${l("common.error")}: empty dataSource url`,
7144
7205
  recoverable: !1
7145
7206
  });
7146
7207
  return;
7147
7208
  }
7148
- let r = S(n);
7149
- y(!0);
7209
+ let r = C(n);
7210
+ b(!0);
7150
7211
  try {
7151
- let e = await Gc(r);
7152
- if (!e.ok) {
7153
- h(null), _({
7212
+ let t = await Jc(r);
7213
+ if (!t.ok) {
7214
+ g(null), v({
7154
7215
  code: "REMOTE_SOURCE_UNAVAILABLE",
7155
- message: Bc(s, e.failure),
7216
+ message: Vc(l, t.failure),
7156
7217
  recoverable: !0
7157
7218
  });
7158
7219
  return;
7159
7220
  }
7160
- let n = fs(r) || e.kind;
7221
+ let n = fs(r) || t.kind;
7161
7222
  if (!n) {
7162
- h(null), _({
7223
+ g(null), v({
7163
7224
  code: "UNSUPPORTED_ARCHIVE",
7164
- message: s("validation.unsupportedFormat"),
7225
+ message: l("validation.unsupportedFormat"),
7165
7226
  recoverable: !1
7166
7227
  });
7167
7228
  return;
7168
7229
  }
7169
- if (t) return;
7170
- h(gs(r, void 0, n, { accessMode: e.accessMode }));
7171
- } catch (e) {
7172
- if (t) return;
7173
- let n = e instanceof Error ? e.message : String(e);
7174
- h(null), _({
7230
+ if (e) return;
7231
+ g(gs(r, void 0, n, { accessMode: t.accessMode }));
7232
+ } catch (t) {
7233
+ if (e) return;
7234
+ let n = t instanceof Error ? t.message : String(t);
7235
+ g(null), v({
7175
7236
  code: "REMOTE_SOURCE_UNAVAILABLE",
7176
7237
  message: n,
7177
7238
  recoverable: !0,
7178
- cause: e
7239
+ cause: t
7179
7240
  });
7180
7241
  } finally {
7181
- t || y(!1);
7242
+ e || b(!1);
7182
7243
  }
7183
7244
  })(), () => {
7184
- t = !0;
7245
+ e = !0;
7185
7246
  };
7186
7247
  }, [
7187
- e,
7188
- s,
7189
- d
7190
- ]), B(() => {
7191
- m && p.current !== m && (p.current = m, c(m));
7192
- }, [m, c]), B(() => {
7193
- x || (b.current = null);
7194
- }, [x]), B(() => {
7195
- if (!r || !x) return;
7196
- let e = `${x.code}:${x.message}`;
7197
- b.current !== e && (b.current = e, r(x));
7198
- }, [x, r]);
7199
- let C = z(() => {
7200
- if (d(), p.current = null, _(null), m) {
7201
- p.current = m, c(m);
7248
+ t,
7249
+ l,
7250
+ p
7251
+ ]), z(() => {
7252
+ h && m.current !== h && (m.current = h, u(h));
7253
+ }, [h, u]), z(() => {
7254
+ S || (x.current = null);
7255
+ }, [S]), z(() => {
7256
+ if (!a || !S) return;
7257
+ let e = `${S.code}:${S.message}`;
7258
+ x.current !== e && (x.current = e, a(S));
7259
+ }, [S, a]);
7260
+ let w = R(() => {
7261
+ if (p(), m.current = null, v(null), h) {
7262
+ m.current = h, u(h);
7202
7263
  return;
7203
7264
  }
7204
- h(null), typeof e != "string" && h(e);
7265
+ g(null), typeof t != "string" && g(t);
7205
7266
  }, [
7206
- d,
7207
- m,
7208
- c,
7209
- e
7267
+ p,
7268
+ h,
7269
+ u,
7270
+ t
7210
7271
  ]);
7211
- if (r && x) return null;
7212
- let w = a || o ? /* @__PURE__ */ G("div", {
7272
+ if (a && S) return null;
7273
+ let E = s || c ? /* @__PURE__ */ W("div", {
7213
7274
  className: "flex flex-row items-center justify-between gap-2 h-9 px-2 border-b border-border/30 bg-background/50 backdrop-blur-sm",
7214
- children: [a ? /* @__PURE__ */ G(f, {
7275
+ children: [s ? /* @__PURE__ */ W(i, {
7215
7276
  variant: "ghost",
7216
7277
  size: "sm",
7217
7278
  className: "h-8 shrink-0 justify-start gap-1.5 rounded-md hover:bg-accent/60 hover:text-foreground transition-all duration-200",
7218
- onClick: a,
7219
- "aria-label": s("common.back"),
7220
- title: s("common.back"),
7221
- children: [/* @__PURE__ */ W(Os, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ W("span", {
7279
+ onClick: s,
7280
+ "aria-label": l("common.back"),
7281
+ title: l("common.back"),
7282
+ children: [/* @__PURE__ */ U(Os, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ U("span", {
7222
7283
  className: "text-xs font-medium truncate",
7223
- children: s("common.back")
7284
+ children: l("common.back")
7224
7285
  })]
7225
- }) : /* @__PURE__ */ W("span", {
7286
+ }) : /* @__PURE__ */ U("span", {
7226
7287
  className: "flex-1 min-w-0",
7227
7288
  "aria-hidden": !0
7228
- }), o ? /* @__PURE__ */ G(f, {
7289
+ }), c ? /* @__PURE__ */ W(i, {
7229
7290
  variant: "ghost",
7230
7291
  size: "sm",
7231
7292
  className: "h-8 shrink-0 justify-end gap-1.5 rounded-md hover:bg-accent/60 hover:text-foreground transition-all duration-200",
7232
- onClick: o,
7233
- "aria-label": s("navbar.export", "Export"),
7234
- title: s("navbar.export", "Export"),
7235
- children: [/* @__PURE__ */ W(ee, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ W("span", {
7293
+ onClick: c,
7294
+ "aria-label": l("navbar.export", "Export"),
7295
+ title: l("navbar.export", "Export"),
7296
+ children: [/* @__PURE__ */ U(e, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ U("span", {
7236
7297
  className: "text-xs font-medium truncate",
7237
- children: s("navbar.export", "Export")
7298
+ children: l("navbar.export", "Export")
7238
7299
  })]
7239
- }) : /* @__PURE__ */ W("span", {
7300
+ }) : /* @__PURE__ */ U("span", {
7240
7301
  className: "flex-1 min-w-0",
7241
7302
  "aria-hidden": !0
7242
7303
  })]
7243
- }) : null, T = x ? /* @__PURE__ */ W(ql, {
7244
- title: s("common.error"),
7245
- message: s("errors.loadFailed"),
7246
- errorDetail: x.message,
7247
- onRetry: C
7248
- }) : /* @__PURE__ */ W("div", {
7304
+ }) : null, D = S ? /* @__PURE__ */ U(Xl, {
7305
+ title: l("common.error"),
7306
+ message: l("errors.loadFailed"),
7307
+ errorDetail: S.message,
7308
+ onRetry: w
7309
+ }) : /* @__PURE__ */ U("div", {
7249
7310
  className: "w-full h-full flex items-center justify-center text-muted-foreground",
7250
7311
  role: "status",
7251
7312
  "aria-live": "polite",
7252
- children: /* @__PURE__ */ G("div", {
7313
+ children: /* @__PURE__ */ W("div", {
7253
7314
  className: "flex items-center gap-3",
7254
- children: [/* @__PURE__ */ W("div", {
7315
+ children: [/* @__PURE__ */ U("div", {
7255
7316
  className: "h-5 w-5 border-2 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
7256
7317
  "aria-hidden": !0
7257
- }), /* @__PURE__ */ W("span", {
7318
+ }), /* @__PURE__ */ U("span", {
7258
7319
  className: "text-sm",
7259
- children: s(v || u ? "common.initializing" : "common.loading")
7320
+ children: l(y || f ? "common.initializing" : "common.loading")
7260
7321
  })]
7261
7322
  })
7262
7323
  });
7263
- return /* @__PURE__ */ W(Yl, {
7264
- showSidebar: t,
7265
- showPlaybackBar: n,
7324
+ return /* @__PURE__ */ U(Ql, {
7325
+ showSidebar: n,
7326
+ showPlaybackBar: r,
7266
7327
  showToaster: !1,
7267
- sidebar: /* @__PURE__ */ W(Rl, {}),
7268
- sidebarHeader: w,
7269
- emptyState: T,
7270
- onRetry: C
7328
+ sidebar: /* @__PURE__ */ U(Vl, {}),
7329
+ sidebarHeader: E,
7330
+ emptyState: D,
7331
+ onRetry: w
7271
7332
  });
7272
7333
  }
7273
- var Zl = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlaybackBar: i = !0, className: a, onFatalError: o, enableKeyboardShortcuts: s = !0, onBack: c, onExport: l }) => /* @__PURE__ */ W(Dl, {
7334
+ var eu = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlaybackBar: i = !0, className: a, onFatalError: o, enableKeyboardShortcuts: s = !0, onBack: c, onExport: l }) => /* @__PURE__ */ U(Al, {
7274
7335
  theme: t,
7275
7336
  language: n,
7276
7337
  className: a,
7277
7338
  showToaster: !0,
7278
- children: /* @__PURE__ */ W(Xl, {
7339
+ children: /* @__PURE__ */ U($l, {
7279
7340
  dataSource: e,
7280
7341
  showSidebar: r,
7281
7342
  showPlaybackBar: i,
@@ -7287,11 +7348,11 @@ var Zl = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlayb
7287
7348
  });
7288
7349
  //#endregion
7289
7350
  //#region src/react/public-api.ts
7290
- function Ql(e) {
7351
+ function tu(e) {
7291
7352
  return _s(e);
7292
7353
  }
7293
- function $l(e) {
7354
+ function nu(e) {
7294
7355
  return gs(e);
7295
7356
  }
7296
7357
  //#endregion
7297
- export { Zl as LeRobotViewer, Ql as createArchiveDataSourceFromFile, $l as createArchiveDataSourceFromUrl };
7358
+ export { eu as LeRobotViewer, tu as createArchiveDataSourceFromFile, nu as createArchiveDataSourceFromUrl };