@ioai/lerobot-studio 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist-lib/{DockviewLayout-DjLrI3Yt.js → DockviewLayout-DeRL52Yo.js} +3001 -2981
- package/dist-lib/{LeRobotDataLoader-DYBXb4dz.js → LeRobotDataLoader-B8wZijIi.js} +1308 -1277
- package/dist-lib/lerobot-studio.css +11 -1
- package/dist-lib/lerobot.d.ts +21 -0
- package/dist-lib/lerobot.es.js +1229 -1056
- package/dist-lib/{react-window-B1KnRC6j.js → react-window-BIZRp3dx.js} +83 -69
- package/package.json +1 -1
package/dist-lib/lerobot.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { r as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import
|
|
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 P, w as F, x as ce, 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
|
|
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,
|
|
1508
|
-
[fi,
|
|
1509
|
-
[pi,
|
|
1510
|
-
[mi,
|
|
1507
|
+
[di, ve],
|
|
1508
|
+
[fi, ve],
|
|
1509
|
+
[pi, ve],
|
|
1510
|
+
[mi, ye]
|
|
1511
1511
|
], oa = {
|
|
1512
|
-
[
|
|
1512
|
+
[ye]: {
|
|
1513
1513
|
getValue: Y,
|
|
1514
1514
|
bytes: 4
|
|
1515
1515
|
},
|
|
1516
|
-
[
|
|
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) !=
|
|
1560
|
-
if (!t && e >= 0 && e + 4 <= n.size && (t = Y(X(await K(n, e, 4, v)), 0) ==
|
|
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,30 +1601,30 @@ 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 &
|
|
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),
|
|
1606
|
+
let oe = !!(o.unixMode & Ae), se = !!(o.unixMode & je), P = !!(o.unixMode & 512), F = o.unixMode === void 0 ? p && !!(N & 73) : !!(o.unixMode & 73), ce = 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,
|
|
1610
|
-
sticky:
|
|
1610
|
+
sticky: P,
|
|
1611
1611
|
unixExternalUpper: N,
|
|
1612
1612
|
internalFileAttribute: o.internalFileAttributes,
|
|
1613
1613
|
externalFileAttribute: o.externalFileAttributes,
|
|
1614
|
-
executable:
|
|
1615
|
-
directory:
|
|
1614
|
+
executable: F,
|
|
1615
|
+
directory: ce || le || f && O.directory || o.filename.endsWith("/") && !o.uncompressedSize,
|
|
1616
1616
|
zipCrypto: o.encrypted && !o.extraFieldAES
|
|
1617
1617
|
});
|
|
1618
|
-
let
|
|
1619
|
-
|
|
1620
|
-
let n = new TransformStream(), [r] = await Promise.all([new Response(n.readable).arrayBuffer(), o.getData(n,
|
|
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:
|
|
1624
|
-
if (
|
|
1625
|
-
await
|
|
1623
|
+
let { onprogress: ue } = e;
|
|
1624
|
+
if (ue) try {
|
|
1625
|
+
await ue(i + 1, y, new Si(o));
|
|
1626
1626
|
} catch {}
|
|
1627
|
-
yield
|
|
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);
|
|
@@ -1669,9 +1669,9 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
|
|
|
1669
1669
|
chunkSize: He(f)
|
|
1670
1670
|
}), ie = q(i, r, Ai), M = q(i, r, ji), ae = q(i, r, Ni), N = q(i, r, Mi);
|
|
1671
1671
|
N && (ae = !0);
|
|
1672
|
-
let { onstart: oe, onprogress: se, onend:
|
|
1673
|
-
|
|
1674
|
-
let
|
|
1672
|
+
let { onstart: oe, onprogress: se, onend: P } = r, F = d == 9, ce = q(i, r, Ii);
|
|
1673
|
+
F && (ce = !1);
|
|
1674
|
+
let le = {
|
|
1675
1675
|
options: {
|
|
1676
1676
|
codecType: An,
|
|
1677
1677
|
password: S,
|
|
@@ -1685,9 +1685,9 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
|
|
|
1685
1685
|
compressed: d != 0 && !w,
|
|
1686
1686
|
encrypted: ne,
|
|
1687
1687
|
useWebWorkers: q(i, r, Fi),
|
|
1688
|
-
useCompressionStream:
|
|
1688
|
+
useCompressionStream: ce,
|
|
1689
1689
|
transferStreams: q(i, r, Li),
|
|
1690
|
-
deflate64:
|
|
1690
|
+
deflate64: F,
|
|
1691
1691
|
checkPasswordOnly: M
|
|
1692
1692
|
},
|
|
1693
1693
|
config: f,
|
|
@@ -1696,7 +1696,7 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
|
|
|
1696
1696
|
size: re,
|
|
1697
1697
|
onstart: oe,
|
|
1698
1698
|
onprogress: se,
|
|
1699
|
-
onend:
|
|
1699
|
+
onend: P
|
|
1700
1700
|
}
|
|
1701
1701
|
};
|
|
1702
1702
|
ae && await va({
|
|
@@ -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
|
|
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:
|
|
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:
|
|
1723
|
-
},
|
|
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") &&
|
|
1729
|
+
!q(i, r, "preventClose") && I && !I.locked && await I.getWriter().close();
|
|
1730
1730
|
}
|
|
1731
|
-
return M || N ? void 0 : e.getData ? e.getData() :
|
|
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(
|
|
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(
|
|
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 :
|
|
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 +
|
|
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 +
|
|
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 &
|
|
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 {}
|
|
@@ -2609,11 +2609,11 @@ var So = /*#__PURE__*/ yo(bo, 9, 1), Co = /*#__PURE__*/ yo(xo, 5, 1), wo = funct
|
|
|
2609
2609
|
var D = N - 257, se = so[D];
|
|
2610
2610
|
oe = To(e, d, (1 << se) - 1) + po[D], d += se;
|
|
2611
2611
|
}
|
|
2612
|
-
var
|
|
2613
|
-
|
|
2614
|
-
var j = go[
|
|
2615
|
-
if (
|
|
2616
|
-
var se = co[
|
|
2612
|
+
var P = m[Eo(e, d) & M], F = P >> 4;
|
|
2613
|
+
P || Ao(3), d += P & 15;
|
|
2614
|
+
var j = go[F];
|
|
2615
|
+
if (F > 3) {
|
|
2616
|
+
var se = co[F];
|
|
2617
2617
|
j += Eo(e, d) & (1 << se) - 1, d += se;
|
|
2618
2618
|
}
|
|
2619
2619
|
if (d > _) {
|
|
@@ -2621,12 +2621,12 @@ var So = /*#__PURE__*/ yo(bo, 9, 1), Co = /*#__PURE__*/ yo(xo, 5, 1), wo = funct
|
|
|
2621
2621
|
break;
|
|
2622
2622
|
}
|
|
2623
2623
|
s && l(f + 131072);
|
|
2624
|
-
var
|
|
2624
|
+
var ce = f + oe;
|
|
2625
2625
|
if (f < j) {
|
|
2626
|
-
var
|
|
2627
|
-
for (
|
|
2626
|
+
var le = a - j, I = Math.min(j, ce);
|
|
2627
|
+
for (le + f < 0 && Ao(3); f < I; ++f) n[f] = r[le + f];
|
|
2628
2628
|
}
|
|
2629
|
-
for (; f <
|
|
2629
|
+
for (; f < ce; ++f) n[f] = n[f - j];
|
|
2630
2630
|
}
|
|
2631
2631
|
}
|
|
2632
2632
|
t.l = p, t.p = ae, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
|
|
@@ -3543,27 +3543,136 @@ function vs(e) {
|
|
|
3543
3543
|
}
|
|
3544
3544
|
}
|
|
3545
3545
|
//#endregion
|
|
3546
|
+
//#region src/platform/datasource/RemoteManifestDataSource.ts
|
|
3547
|
+
function ys(e) {
|
|
3548
|
+
let t = e.replace(/\\/g, "/");
|
|
3549
|
+
return t = t.replace(/^\.\/+/, ""), t = t.replace(/\/{2,}/g, "/"), t = t.replace(/^\/+/, ""), t;
|
|
3550
|
+
}
|
|
3551
|
+
var bs = class {
|
|
3552
|
+
entryMap = /* @__PURE__ */ new Map();
|
|
3553
|
+
limits;
|
|
3554
|
+
constructor(e, t) {
|
|
3555
|
+
if (this.limits = Ro(t), e.length > this.limits.maxManifestEntries) throw new $("ENTRY_COUNT_LIMIT", "Manifest contains too many entries", {
|
|
3556
|
+
count: e.length,
|
|
3557
|
+
limit: this.limits.maxManifestEntries
|
|
3558
|
+
});
|
|
3559
|
+
let n = 0;
|
|
3560
|
+
for (let t of e) {
|
|
3561
|
+
let e = zo(t.logicalPath, this.limits);
|
|
3562
|
+
if (this.entryMap.has(e)) throw new $("DUPLICATE_PATH", "Manifest contains a duplicate path", { path: e });
|
|
3563
|
+
if (xs(t.presignedUrl, this.limits, e), t.sizeBytes != null && (!Number.isSafeInteger(t.sizeBytes) || t.sizeBytes < 0)) throw new $("MANIFEST_INVALID", "Manifest entry has an invalid size", {
|
|
3564
|
+
path: e,
|
|
3565
|
+
size: t.sizeBytes
|
|
3566
|
+
});
|
|
3567
|
+
if (t.sizeBytes != null) {
|
|
3568
|
+
if (t.sizeBytes > this.limits.maxManifestEntryBytes) throw new $("ENTRY_SIZE_LIMIT", "Manifest entry exceeds the size limit", {
|
|
3569
|
+
path: e,
|
|
3570
|
+
size: t.sizeBytes,
|
|
3571
|
+
limit: this.limits.maxManifestEntryBytes
|
|
3572
|
+
});
|
|
3573
|
+
if (n += t.sizeBytes, !Number.isSafeInteger(n) || n > this.limits.maxManifestTotalBytes) throw new $("TOTAL_SIZE_LIMIT", "Manifest exceeds the total size limit", {
|
|
3574
|
+
total: n,
|
|
3575
|
+
limit: this.limits.maxManifestTotalBytes
|
|
3576
|
+
});
|
|
3577
|
+
}
|
|
3578
|
+
this.entryMap.set(e, t);
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3581
|
+
async exists(e) {
|
|
3582
|
+
return this.entryMap.has(ys(e));
|
|
3583
|
+
}
|
|
3584
|
+
async listPaths() {
|
|
3585
|
+
return [...this.entryMap.keys()];
|
|
3586
|
+
}
|
|
3587
|
+
async readText(e) {
|
|
3588
|
+
return new TextDecoder().decode(await this.readBytes(e));
|
|
3589
|
+
}
|
|
3590
|
+
async readBytes(e, t) {
|
|
3591
|
+
let n = this.getEntry(e), r = n.presignedUrl;
|
|
3592
|
+
Vo(e, n.sizeBytes ?? void 0, this.limits);
|
|
3593
|
+
let i = await fetch(r);
|
|
3594
|
+
if (!i.ok) throw Error(`HTTP ${i.status} fetching ${e}`);
|
|
3595
|
+
let a = i.headers.get("content-length"), o = a ? Number(a) : void 0;
|
|
3596
|
+
if (o !== void 0 && (!Number.isSafeInteger(o) || o < 0)) throw new $("MANIFEST_INVALID", "Response has an invalid content length", {
|
|
3597
|
+
path: e,
|
|
3598
|
+
contentLength: a
|
|
3599
|
+
});
|
|
3600
|
+
if (Vo(e, o, this.limits), !i.body) throw Error(`HTTP response has no readable body fetching ${e}`);
|
|
3601
|
+
let s = i.body.getReader(), c = [], l = 0;
|
|
3602
|
+
for (t?.({
|
|
3603
|
+
phase: "download",
|
|
3604
|
+
loaded: 0,
|
|
3605
|
+
total: o,
|
|
3606
|
+
message: e
|
|
3607
|
+
});;) {
|
|
3608
|
+
let { done: n, value: r } = await s.read();
|
|
3609
|
+
if (n) break;
|
|
3610
|
+
if (l += r.byteLength, l > this.limits.maxMaterializedBytes) throw await s.cancel(), new $("MATERIALIZED_SIZE_LIMIT", "Remote file exceeded the in-memory size limit while downloading", {
|
|
3611
|
+
path: e,
|
|
3612
|
+
loaded: l,
|
|
3613
|
+
limit: this.limits.maxMaterializedBytes
|
|
3614
|
+
});
|
|
3615
|
+
c.push(r), t?.({
|
|
3616
|
+
phase: "download",
|
|
3617
|
+
loaded: l,
|
|
3618
|
+
total: o,
|
|
3619
|
+
message: e
|
|
3620
|
+
});
|
|
3621
|
+
}
|
|
3622
|
+
let u = new Uint8Array(l), d = 0;
|
|
3623
|
+
for (let e of c) u.set(e, d), d += e.byteLength;
|
|
3624
|
+
return u;
|
|
3625
|
+
}
|
|
3626
|
+
async getObjectUrl(e) {
|
|
3627
|
+
return this.getUrl(e);
|
|
3628
|
+
}
|
|
3629
|
+
clear() {}
|
|
3630
|
+
invalidateObjectUrl(e) {}
|
|
3631
|
+
getUrl(e) {
|
|
3632
|
+
return this.getEntry(e).presignedUrl;
|
|
3633
|
+
}
|
|
3634
|
+
getEntry(e) {
|
|
3635
|
+
let t = this.entryMap.get(ys(e));
|
|
3636
|
+
if (!t) throw Error(`File not found in manifest: ${e}`);
|
|
3637
|
+
return t;
|
|
3638
|
+
}
|
|
3639
|
+
};
|
|
3640
|
+
function xs(e, t, n) {
|
|
3641
|
+
if (!e || e.length > t.maxManifestUrlLength) throw new $("URL_INVALID", "Manifest URL is empty or too long", {
|
|
3642
|
+
path: n,
|
|
3643
|
+
urlLength: e?.length ?? 0,
|
|
3644
|
+
limit: t.maxManifestUrlLength
|
|
3645
|
+
});
|
|
3646
|
+
try {
|
|
3647
|
+
let t = new URL(e);
|
|
3648
|
+
if (t.protocol !== "http:" && t.protocol !== "https:") throw Error("unsupported protocol");
|
|
3649
|
+
if (!t.hostname || t.username || t.password) throw Error("invalid authority");
|
|
3650
|
+
} catch {
|
|
3651
|
+
throw new $("URL_INVALID", "Manifest URL must be an HTTP(S) URL", { path: n });
|
|
3652
|
+
}
|
|
3653
|
+
}
|
|
3654
|
+
//#endregion
|
|
3546
3655
|
//#region node_modules/@radix-ui/react-separator/dist/index.mjs
|
|
3547
|
-
var
|
|
3656
|
+
var Ss = Object.defineProperty, Cs = (e, t) => Ss(e, "name", {
|
|
3548
3657
|
value: t,
|
|
3549
3658
|
configurable: !0
|
|
3550
|
-
}),
|
|
3551
|
-
let { decorative: n, orientation: r =
|
|
3659
|
+
}), ws = "horizontal", Ts = ["horizontal", "vertical"], Es = /* @__PURE__ */ de.forwardRef(/* @__PURE__ */ Cs(function(e, t) {
|
|
3660
|
+
let { decorative: n, orientation: r = ws, ...i } = e, a = Ds(r) ? r : ws, o = n ? { role: "none" } : {
|
|
3552
3661
|
"aria-orientation": a === "vertical" ? a : void 0,
|
|
3553
3662
|
role: "separator"
|
|
3554
3663
|
};
|
|
3555
|
-
return /* @__PURE__ */
|
|
3664
|
+
return /* @__PURE__ */ U(C.div, {
|
|
3556
3665
|
"data-orientation": a,
|
|
3557
3666
|
...o,
|
|
3558
3667
|
...i,
|
|
3559
3668
|
ref: t
|
|
3560
3669
|
});
|
|
3561
3670
|
}, "Separator"));
|
|
3562
|
-
function
|
|
3563
|
-
return
|
|
3671
|
+
function Ds(e) {
|
|
3672
|
+
return Ts.includes(e);
|
|
3564
3673
|
}
|
|
3565
|
-
|
|
3566
|
-
var
|
|
3674
|
+
Cs(Ds, "isValidOrientation");
|
|
3675
|
+
var Os = Es, ks = 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
3676
|
variants: { variant: {
|
|
3568
3677
|
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
3569
3678
|
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
@@ -3574,30 +3683,30 @@ var Ts = Cs, Es = a("inline-flex w-fit shrink-0 items-center justify-center gap-
|
|
|
3574
3683
|
} },
|
|
3575
3684
|
defaultVariants: { variant: "default" }
|
|
3576
3685
|
});
|
|
3577
|
-
function
|
|
3578
|
-
return /* @__PURE__ */
|
|
3686
|
+
function As({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
|
|
3687
|
+
return /* @__PURE__ */ U(n ? se : "span", {
|
|
3579
3688
|
"data-slot": "badge",
|
|
3580
3689
|
"data-variant": t,
|
|
3581
|
-
className:
|
|
3690
|
+
className: D(ks({ variant: t }), e),
|
|
3582
3691
|
...r
|
|
3583
3692
|
});
|
|
3584
3693
|
}
|
|
3585
|
-
var
|
|
3694
|
+
var js = f("arrow-left", [["path", {
|
|
3586
3695
|
d: "m12 19-7-7 7-7",
|
|
3587
3696
|
key: "1l729n"
|
|
3588
3697
|
}], ["path", {
|
|
3589
3698
|
d: "M19 12H5",
|
|
3590
3699
|
key: "x3x0zl"
|
|
3591
|
-
}]]),
|
|
3700
|
+
}]]), Ms = f("check-check", [["path", {
|
|
3592
3701
|
d: "M18 6 7 17l-5-5",
|
|
3593
3702
|
key: "116fxf"
|
|
3594
3703
|
}], ["path", {
|
|
3595
3704
|
d: "m22 10-7.5 7.5L13 16",
|
|
3596
3705
|
key: "ke71qq"
|
|
3597
|
-
}]]),
|
|
3706
|
+
}]]), Ns = f("chevron-left", [["path", {
|
|
3598
3707
|
d: "m15 18-6-6 6-6",
|
|
3599
3708
|
key: "1wnfg3"
|
|
3600
|
-
}]]),
|
|
3709
|
+
}]]), Ps = f("circle-alert", [
|
|
3601
3710
|
["circle", {
|
|
3602
3711
|
cx: "12",
|
|
3603
3712
|
cy: "12",
|
|
@@ -3618,7 +3727,7 @@ var Os = u("arrow-left", [["path", {
|
|
|
3618
3727
|
y2: "16",
|
|
3619
3728
|
key: "4dfq90"
|
|
3620
3729
|
}]
|
|
3621
|
-
]),
|
|
3730
|
+
]), Fs = f("circle-check", [["circle", {
|
|
3622
3731
|
cx: "12",
|
|
3623
3732
|
cy: "12",
|
|
3624
3733
|
r: "10",
|
|
@@ -3626,13 +3735,13 @@ var Os = u("arrow-left", [["path", {
|
|
|
3626
3735
|
}], ["path", {
|
|
3627
3736
|
d: "m9 12 2 2 4-4",
|
|
3628
3737
|
key: "dzmm74"
|
|
3629
|
-
}]]),
|
|
3738
|
+
}]]), Is = f("house", [["path", {
|
|
3630
3739
|
d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
|
|
3631
3740
|
key: "5wwlr5"
|
|
3632
3741
|
}], ["path", {
|
|
3633
3742
|
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
3743
|
key: "r6nss1"
|
|
3635
|
-
}]]),
|
|
3744
|
+
}]]), Ls = f("info", [
|
|
3636
3745
|
["circle", {
|
|
3637
3746
|
cx: "12",
|
|
3638
3747
|
cy: "12",
|
|
@@ -3647,7 +3756,7 @@ var Os = u("arrow-left", [["path", {
|
|
|
3647
3756
|
d: "M12 8h.01",
|
|
3648
3757
|
key: "e9boi3"
|
|
3649
3758
|
}]
|
|
3650
|
-
]),
|
|
3759
|
+
]), Rs = f("octagon-x", [
|
|
3651
3760
|
["path", {
|
|
3652
3761
|
d: "m15 9-6 6",
|
|
3653
3762
|
key: "1uzhvr"
|
|
@@ -3660,13 +3769,13 @@ var Os = u("arrow-left", [["path", {
|
|
|
3660
3769
|
d: "m9 9 6 6",
|
|
3661
3770
|
key: "z0biqf"
|
|
3662
3771
|
}]
|
|
3663
|
-
]),
|
|
3772
|
+
]), zs = f("pencil", [["path", {
|
|
3664
3773
|
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
3774
|
key: "1a8usu"
|
|
3666
3775
|
}], ["path", {
|
|
3667
3776
|
d: "m15 5 4 4",
|
|
3668
3777
|
key: "1mk7zo"
|
|
3669
|
-
}]]),
|
|
3778
|
+
}]]), Bs = f("repeat-1", [
|
|
3670
3779
|
["path", {
|
|
3671
3780
|
d: "m17 2 4 4-4 4",
|
|
3672
3781
|
key: "nntrym"
|
|
@@ -3687,7 +3796,7 @@ var Os = u("arrow-left", [["path", {
|
|
|
3687
3796
|
d: "M11 10h1v4",
|
|
3688
3797
|
key: "70cz1p"
|
|
3689
3798
|
}]
|
|
3690
|
-
]),
|
|
3799
|
+
]), Vs = f("repeat", [
|
|
3691
3800
|
["path", {
|
|
3692
3801
|
d: "m17 2 4 4-4 4",
|
|
3693
3802
|
key: "nntrym"
|
|
@@ -3704,7 +3813,7 @@ var Os = u("arrow-left", [["path", {
|
|
|
3704
3813
|
d: "M21 13v1a4 4 0 0 1-4 4H3",
|
|
3705
3814
|
key: "1rx37r"
|
|
3706
3815
|
}]
|
|
3707
|
-
]),
|
|
3816
|
+
]), Hs = f("shuffle", [
|
|
3708
3817
|
["path", {
|
|
3709
3818
|
d: "m18 14 4 4-4 4",
|
|
3710
3819
|
key: "10pe0f"
|
|
@@ -3725,7 +3834,7 @@ var Os = u("arrow-left", [["path", {
|
|
|
3725
3834
|
d: "M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",
|
|
3726
3835
|
key: "os18l9"
|
|
3727
3836
|
}]
|
|
3728
|
-
]),
|
|
3837
|
+
]), Us = f("sliders-horizontal", [
|
|
3729
3838
|
["path", {
|
|
3730
3839
|
d: "M10 5H3",
|
|
3731
3840
|
key: "1qgfaw"
|
|
@@ -3762,20 +3871,20 @@ var Os = u("arrow-left", [["path", {
|
|
|
3762
3871
|
d: "M8 12H3",
|
|
3763
3872
|
key: "a7s4jb"
|
|
3764
3873
|
}]
|
|
3765
|
-
]),
|
|
3874
|
+
]), Ws = f("square-check-big", [["path", {
|
|
3766
3875
|
d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",
|
|
3767
3876
|
key: "2acyp4"
|
|
3768
3877
|
}], ["path", {
|
|
3769
3878
|
d: "m9 11 3 3L22 4",
|
|
3770
3879
|
key: "1pflzl"
|
|
3771
|
-
}]]),
|
|
3880
|
+
}]]), Gs = f("square", [["rect", {
|
|
3772
3881
|
width: "18",
|
|
3773
3882
|
height: "18",
|
|
3774
3883
|
x: "3",
|
|
3775
3884
|
y: "3",
|
|
3776
3885
|
rx: "2",
|
|
3777
3886
|
key: "afitv7"
|
|
3778
|
-
}]]),
|
|
3887
|
+
}]]), Ks = f("trash-2", [
|
|
3779
3888
|
["path", {
|
|
3780
3889
|
d: "M10 11v6",
|
|
3781
3890
|
key: "nco0om"
|
|
@@ -3796,7 +3905,7 @@ var Os = u("arrow-left", [["path", {
|
|
|
3796
3905
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
3797
3906
|
key: "e791ji"
|
|
3798
3907
|
}]
|
|
3799
|
-
]),
|
|
3908
|
+
]), qs = f("undo-2", [["path", {
|
|
3800
3909
|
d: "M9 14 4 9l5-5",
|
|
3801
3910
|
key: "102s5s"
|
|
3802
3911
|
}], ["path", {
|
|
@@ -3805,38 +3914,38 @@ var Os = u("arrow-left", [["path", {
|
|
|
3805
3914
|
}]]);
|
|
3806
3915
|
//#endregion
|
|
3807
3916
|
//#region src/ui/components/ui/dialog.tsx
|
|
3808
|
-
function
|
|
3809
|
-
return /* @__PURE__ */
|
|
3917
|
+
function Js({ ...e }) {
|
|
3918
|
+
return /* @__PURE__ */ U(g, {
|
|
3810
3919
|
"data-slot": "dialog",
|
|
3811
3920
|
...e
|
|
3812
3921
|
});
|
|
3813
3922
|
}
|
|
3814
|
-
function
|
|
3815
|
-
let n =
|
|
3816
|
-
return /* @__PURE__ */
|
|
3923
|
+
function Ys({ container: e, ...t }) {
|
|
3924
|
+
let n = k();
|
|
3925
|
+
return /* @__PURE__ */ U(c, {
|
|
3817
3926
|
"data-slot": "dialog-portal",
|
|
3818
3927
|
container: e ?? n,
|
|
3819
3928
|
...t
|
|
3820
3929
|
});
|
|
3821
3930
|
}
|
|
3822
|
-
function
|
|
3823
|
-
return /* @__PURE__ */
|
|
3931
|
+
function Xs({ className: e, ...t }) {
|
|
3932
|
+
return /* @__PURE__ */ U(a, {
|
|
3824
3933
|
"data-slot": "dialog-overlay",
|
|
3825
|
-
className:
|
|
3934
|
+
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
3935
|
...t
|
|
3827
3936
|
});
|
|
3828
3937
|
}
|
|
3829
|
-
function
|
|
3830
|
-
return /* @__PURE__ */
|
|
3938
|
+
function Zs({ className: e, children: n, showCloseButton: r = !0, ...i }) {
|
|
3939
|
+
return /* @__PURE__ */ W(Ys, {
|
|
3831
3940
|
"data-slot": "dialog-portal",
|
|
3832
|
-
children: [/* @__PURE__ */
|
|
3941
|
+
children: [/* @__PURE__ */ U(Xs, {}), /* @__PURE__ */ W(h, {
|
|
3833
3942
|
"data-slot": "dialog-content",
|
|
3834
|
-
className:
|
|
3835
|
-
...
|
|
3836
|
-
children: [
|
|
3943
|
+
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),
|
|
3944
|
+
...i,
|
|
3945
|
+
children: [n, r && /* @__PURE__ */ W(o, {
|
|
3837
3946
|
"data-slot": "dialog-close",
|
|
3838
3947
|
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__ */
|
|
3948
|
+
children: [/* @__PURE__ */ U(t, {}), /* @__PURE__ */ U("span", {
|
|
3840
3949
|
className: "sr-only",
|
|
3841
3950
|
children: "Close"
|
|
3842
3951
|
})]
|
|
@@ -3844,55 +3953,55 @@ function Js({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
|
3844
3953
|
})]
|
|
3845
3954
|
});
|
|
3846
3955
|
}
|
|
3847
|
-
function
|
|
3848
|
-
return /* @__PURE__ */
|
|
3956
|
+
function Qs({ className: e, ...t }) {
|
|
3957
|
+
return /* @__PURE__ */ U("div", {
|
|
3849
3958
|
"data-slot": "dialog-header",
|
|
3850
|
-
className:
|
|
3959
|
+
className: D("flex flex-col gap-2 text-center sm:text-left", e),
|
|
3851
3960
|
...t
|
|
3852
3961
|
});
|
|
3853
3962
|
}
|
|
3854
|
-
function
|
|
3855
|
-
return /* @__PURE__ */
|
|
3963
|
+
function $s({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
3964
|
+
return /* @__PURE__ */ W("div", {
|
|
3856
3965
|
"data-slot": "dialog-footer",
|
|
3857
|
-
className:
|
|
3966
|
+
className: D("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
3858
3967
|
...r,
|
|
3859
|
-
children: [n, t && /* @__PURE__ */
|
|
3968
|
+
children: [n, t && /* @__PURE__ */ U(o, {
|
|
3860
3969
|
asChild: !0,
|
|
3861
|
-
children: /* @__PURE__ */
|
|
3970
|
+
children: /* @__PURE__ */ U(i, {
|
|
3862
3971
|
variant: "outline",
|
|
3863
3972
|
children: "Close"
|
|
3864
3973
|
})
|
|
3865
3974
|
})]
|
|
3866
3975
|
});
|
|
3867
3976
|
}
|
|
3868
|
-
function
|
|
3869
|
-
return /* @__PURE__ */
|
|
3977
|
+
function ec({ className: e, ...t }) {
|
|
3978
|
+
return /* @__PURE__ */ U(M, {
|
|
3870
3979
|
"data-slot": "dialog-title",
|
|
3871
|
-
className:
|
|
3980
|
+
className: D("text-lg leading-none font-semibold text-foreground", e),
|
|
3872
3981
|
...t
|
|
3873
3982
|
});
|
|
3874
3983
|
}
|
|
3875
|
-
function
|
|
3876
|
-
return /* @__PURE__ */
|
|
3984
|
+
function tc({ className: e, ...t }) {
|
|
3985
|
+
return /* @__PURE__ */ U(_, {
|
|
3877
3986
|
"data-slot": "dialog-description",
|
|
3878
|
-
className:
|
|
3987
|
+
className: D("text-sm text-muted-foreground", e),
|
|
3879
3988
|
...t
|
|
3880
3989
|
});
|
|
3881
3990
|
}
|
|
3882
3991
|
//#endregion
|
|
3883
3992
|
//#region src/ui/components/ui/separator.tsx
|
|
3884
|
-
function
|
|
3885
|
-
return /* @__PURE__ */
|
|
3993
|
+
function nc({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
3994
|
+
return /* @__PURE__ */ U(Os, {
|
|
3886
3995
|
"data-slot": "separator",
|
|
3887
3996
|
decorative: n,
|
|
3888
3997
|
orientation: t,
|
|
3889
|
-
className:
|
|
3998
|
+
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
3999
|
...r
|
|
3891
4000
|
});
|
|
3892
4001
|
}
|
|
3893
4002
|
//#endregion
|
|
3894
4003
|
//#region node_modules/next-themes/dist/index.mjs
|
|
3895
|
-
var
|
|
4004
|
+
var rc = (e, t, n, r, i, a, o, s) => {
|
|
3896
4005
|
let c = document.documentElement, l = ["light", "dark"];
|
|
3897
4006
|
function u(t) {
|
|
3898
4007
|
(Array.isArray(e) ? e : [e]).forEach((e) => {
|
|
@@ -3911,11 +4020,11 @@ var ec = (e, t, n, r, i, a, o, s) => {
|
|
|
3911
4020
|
let e = localStorage.getItem(t) || n;
|
|
3912
4021
|
u(o && e === "system" ? f() : e);
|
|
3913
4022
|
} catch {}
|
|
3914
|
-
},
|
|
4023
|
+
}, ic = de.createContext(void 0), ac = {
|
|
3915
4024
|
setTheme: (e) => {},
|
|
3916
4025
|
themes: []
|
|
3917
|
-
},
|
|
3918
|
-
|
|
4026
|
+
}, oc = () => de.useContext(ic) ?? ac;
|
|
4027
|
+
de.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: i, defaultTheme: a, value: o, themes: s, nonce: c, scriptProps: l }) => {
|
|
3919
4028
|
let u = JSON.stringify([
|
|
3920
4029
|
n,
|
|
3921
4030
|
t,
|
|
@@ -3926,75 +4035,75 @@ ue.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableC
|
|
|
3926
4035
|
r,
|
|
3927
4036
|
i
|
|
3928
4037
|
]).slice(1, -1);
|
|
3929
|
-
return
|
|
4038
|
+
return de.createElement("script", {
|
|
3930
4039
|
...l,
|
|
3931
4040
|
suppressHydrationWarning: !0,
|
|
3932
4041
|
nonce: typeof window > "u" ? c : "",
|
|
3933
|
-
dangerouslySetInnerHTML: { __html: `(${
|
|
4042
|
+
dangerouslySetInnerHTML: { __html: `(${rc.toString()})(${u})` }
|
|
3934
4043
|
});
|
|
3935
4044
|
});
|
|
3936
4045
|
//#endregion
|
|
3937
4046
|
//#region node_modules/sonner/dist/index.mjs
|
|
3938
|
-
function
|
|
4047
|
+
function sc(e) {
|
|
3939
4048
|
if (!e || typeof document > "u") return;
|
|
3940
4049
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
3941
4050
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
3942
4051
|
}
|
|
3943
|
-
var
|
|
4052
|
+
var cc = (e) => {
|
|
3944
4053
|
switch (e) {
|
|
3945
|
-
case "success": return
|
|
3946
|
-
case "info": return
|
|
3947
|
-
case "warning": return
|
|
3948
|
-
case "error": return
|
|
4054
|
+
case "success": return dc;
|
|
4055
|
+
case "info": return pc;
|
|
4056
|
+
case "warning": return fc;
|
|
4057
|
+
case "error": return mc;
|
|
3949
4058
|
default: return null;
|
|
3950
4059
|
}
|
|
3951
|
-
},
|
|
4060
|
+
}, lc = Array(12).fill(0), uc = ({ visible: e, className: t }) => /*#__PURE__*/ L.createElement("div", {
|
|
3952
4061
|
className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
|
|
3953
4062
|
"data-visible": e
|
|
3954
|
-
}, /*#__PURE__*/
|
|
4063
|
+
}, /*#__PURE__*/ L.createElement("div", { className: "sonner-spinner" }, lc.map((e, t) => /*#__PURE__*/ L.createElement("div", {
|
|
3955
4064
|
className: "sonner-loading-bar",
|
|
3956
4065
|
key: `spinner-bar-${t}`
|
|
3957
|
-
})))),
|
|
4066
|
+
})))), dc = /*#__PURE__*/ L.createElement("svg", {
|
|
3958
4067
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3959
4068
|
viewBox: "0 0 20 20",
|
|
3960
4069
|
fill: "currentColor",
|
|
3961
4070
|
height: "20",
|
|
3962
4071
|
width: "20"
|
|
3963
|
-
}, /*#__PURE__*/
|
|
4072
|
+
}, /*#__PURE__*/ L.createElement("path", {
|
|
3964
4073
|
fillRule: "evenodd",
|
|
3965
4074
|
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
4075
|
clipRule: "evenodd"
|
|
3967
|
-
})),
|
|
4076
|
+
})), fc = /*#__PURE__*/ L.createElement("svg", {
|
|
3968
4077
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3969
4078
|
viewBox: "0 0 24 24",
|
|
3970
4079
|
fill: "currentColor",
|
|
3971
4080
|
height: "20",
|
|
3972
4081
|
width: "20"
|
|
3973
|
-
}, /*#__PURE__*/
|
|
4082
|
+
}, /*#__PURE__*/ L.createElement("path", {
|
|
3974
4083
|
fillRule: "evenodd",
|
|
3975
4084
|
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
4085
|
clipRule: "evenodd"
|
|
3977
|
-
})),
|
|
4086
|
+
})), pc = /*#__PURE__*/ L.createElement("svg", {
|
|
3978
4087
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3979
4088
|
viewBox: "0 0 20 20",
|
|
3980
4089
|
fill: "currentColor",
|
|
3981
4090
|
height: "20",
|
|
3982
4091
|
width: "20"
|
|
3983
|
-
}, /*#__PURE__*/
|
|
4092
|
+
}, /*#__PURE__*/ L.createElement("path", {
|
|
3984
4093
|
fillRule: "evenodd",
|
|
3985
4094
|
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
4095
|
clipRule: "evenodd"
|
|
3987
|
-
})),
|
|
4096
|
+
})), mc = /*#__PURE__*/ L.createElement("svg", {
|
|
3988
4097
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3989
4098
|
viewBox: "0 0 20 20",
|
|
3990
4099
|
fill: "currentColor",
|
|
3991
4100
|
height: "20",
|
|
3992
4101
|
width: "20"
|
|
3993
|
-
}, /*#__PURE__*/
|
|
4102
|
+
}, /*#__PURE__*/ L.createElement("path", {
|
|
3994
4103
|
fillRule: "evenodd",
|
|
3995
4104
|
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
4105
|
clipRule: "evenodd"
|
|
3997
|
-
})),
|
|
4106
|
+
})), hc = /*#__PURE__*/ L.createElement("svg", {
|
|
3998
4107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3999
4108
|
width: "12",
|
|
4000
4109
|
height: "12",
|
|
@@ -4004,25 +4113,25 @@ var ac = (e) => {
|
|
|
4004
4113
|
strokeWidth: "1.5",
|
|
4005
4114
|
strokeLinecap: "round",
|
|
4006
4115
|
strokeLinejoin: "round"
|
|
4007
|
-
}, /*#__PURE__*/
|
|
4116
|
+
}, /*#__PURE__*/ L.createElement("line", {
|
|
4008
4117
|
x1: "18",
|
|
4009
4118
|
y1: "6",
|
|
4010
4119
|
x2: "6",
|
|
4011
4120
|
y2: "18"
|
|
4012
|
-
}), /*#__PURE__*/
|
|
4121
|
+
}), /*#__PURE__*/ L.createElement("line", {
|
|
4013
4122
|
x1: "6",
|
|
4014
4123
|
y1: "6",
|
|
4015
4124
|
x2: "18",
|
|
4016
4125
|
y2: "18"
|
|
4017
|
-
})),
|
|
4018
|
-
let [e, t] =
|
|
4019
|
-
return
|
|
4126
|
+
})), gc = () => {
|
|
4127
|
+
let [e, t] = L.useState(document.hidden);
|
|
4128
|
+
return L.useEffect(() => {
|
|
4020
4129
|
let e = () => {
|
|
4021
4130
|
t(document.hidden);
|
|
4022
4131
|
};
|
|
4023
4132
|
return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
|
|
4024
4133
|
}, []), e;
|
|
4025
|
-
},
|
|
4134
|
+
}, _c = 1, vc = new class {
|
|
4026
4135
|
constructor() {
|
|
4027
4136
|
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
4028
4137
|
let t = this.subscribers.indexOf(e);
|
|
@@ -4032,7 +4141,7 @@ var ac = (e) => {
|
|
|
4032
4141
|
}, this.addToast = (e) => {
|
|
4033
4142
|
this.publish(e), this.toasts = [...this.toasts, e];
|
|
4034
4143
|
}, this.create = (e) => {
|
|
4035
|
-
let { message: t, ...n } = e, r = typeof e?.id == "number" || e.id?.length > 0 ? e.id :
|
|
4144
|
+
let { message: t, ...n } = e, r = typeof e?.id == "number" || e.id?.length > 0 ? e.id : _c++, i = this.toasts.find((e) => e.id === r), a = e.dismissible === void 0 || e.dismissible;
|
|
4036
4145
|
return this.dismissedToasts.has(r) && this.dismissedToasts.delete(r), i ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
|
|
4037
4146
|
...n,
|
|
4038
4147
|
...e,
|
|
@@ -4092,14 +4201,14 @@ var ac = (e) => {
|
|
|
4092
4201
|
description: typeof t.description == "function" ? void 0 : t.description
|
|
4093
4202
|
}));
|
|
4094
4203
|
let r = Promise.resolve(e instanceof Function ? e() : e), i = n !== void 0, a, o = r.then(async (e) => {
|
|
4095
|
-
if (a = ["resolve", e],
|
|
4204
|
+
if (a = ["resolve", e], L.isValidElement(e)) i = !1, this.create({
|
|
4096
4205
|
id: n,
|
|
4097
4206
|
type: "default",
|
|
4098
4207
|
message: e
|
|
4099
4208
|
});
|
|
4100
|
-
else if (
|
|
4209
|
+
else if (bc(e) && !e.ok) {
|
|
4101
4210
|
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" && !
|
|
4211
|
+
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
4212
|
this.create({
|
|
4104
4213
|
id: n,
|
|
4105
4214
|
type: "error",
|
|
@@ -4108,7 +4217,7 @@ var ac = (e) => {
|
|
|
4108
4217
|
});
|
|
4109
4218
|
} else if (e instanceof Error) {
|
|
4110
4219
|
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" && !
|
|
4220
|
+
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
4221
|
this.create({
|
|
4113
4222
|
id: n,
|
|
4114
4223
|
type: "error",
|
|
@@ -4117,7 +4226,7 @@ var ac = (e) => {
|
|
|
4117
4226
|
});
|
|
4118
4227
|
} else if (t.success !== void 0) {
|
|
4119
4228
|
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" && !
|
|
4229
|
+
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
4230
|
this.create({
|
|
4122
4231
|
id: n,
|
|
4123
4232
|
type: "success",
|
|
@@ -4128,7 +4237,7 @@ var ac = (e) => {
|
|
|
4128
4237
|
}).catch(async (e) => {
|
|
4129
4238
|
if (a = ["reject", e], t.error !== void 0) {
|
|
4130
4239
|
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" && !
|
|
4240
|
+
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
4241
|
this.create({
|
|
4133
4242
|
id: n,
|
|
4134
4243
|
type: "error",
|
|
@@ -4141,7 +4250,7 @@ var ac = (e) => {
|
|
|
4141
4250
|
}), s = () => new Promise((e, t) => o.then(() => a[0] === "reject" ? t(a[1]) : e(a[1])).catch(t));
|
|
4142
4251
|
return typeof n != "string" && typeof n != "number" ? { unwrap: s } : Object.assign(n, { unwrap: s });
|
|
4143
4252
|
}, this.custom = (e, t) => {
|
|
4144
|
-
let n = t?.id ||
|
|
4253
|
+
let n = t?.id || _c++;
|
|
4145
4254
|
return this.create({
|
|
4146
4255
|
jsx: e(n),
|
|
4147
4256
|
id: n,
|
|
@@ -4149,61 +4258,61 @@ var ac = (e) => {
|
|
|
4149
4258
|
}), n;
|
|
4150
4259
|
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
4151
4260
|
}
|
|
4152
|
-
}(),
|
|
4153
|
-
let n = t?.id ||
|
|
4154
|
-
return
|
|
4261
|
+
}(), yc = (e, t) => {
|
|
4262
|
+
let n = t?.id || _c++;
|
|
4263
|
+
return vc.addToast({
|
|
4155
4264
|
title: e,
|
|
4156
4265
|
...t,
|
|
4157
4266
|
id: n
|
|
4158
4267
|
}), n;
|
|
4159
|
-
},
|
|
4160
|
-
success:
|
|
4161
|
-
info:
|
|
4162
|
-
warning:
|
|
4163
|
-
error:
|
|
4164
|
-
custom:
|
|
4165
|
-
message:
|
|
4166
|
-
promise:
|
|
4167
|
-
dismiss:
|
|
4168
|
-
loading:
|
|
4268
|
+
}, bc = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", xc = Object.assign(yc, {
|
|
4269
|
+
success: vc.success,
|
|
4270
|
+
info: vc.info,
|
|
4271
|
+
warning: vc.warning,
|
|
4272
|
+
error: vc.error,
|
|
4273
|
+
custom: vc.custom,
|
|
4274
|
+
message: vc.message,
|
|
4275
|
+
promise: vc.promise,
|
|
4276
|
+
dismiss: vc.dismiss,
|
|
4277
|
+
loading: vc.loading
|
|
4169
4278
|
}, {
|
|
4170
|
-
getHistory: () =>
|
|
4171
|
-
getToasts: () =>
|
|
4279
|
+
getHistory: () => vc.toasts,
|
|
4280
|
+
getToasts: () => vc.getActiveToasts()
|
|
4172
4281
|
});
|
|
4173
|
-
ic("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
4174
|
-
function
|
|
4282
|
+
sc("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
4283
|
+
function Sc(e) {
|
|
4175
4284
|
return e.label !== void 0;
|
|
4176
4285
|
}
|
|
4177
|
-
var
|
|
4178
|
-
function
|
|
4286
|
+
var Cc = 3, wc = "24px", Tc = "16px", Ec = 4e3, Dc = 356, Oc = 14, kc = 45, Ac = 200;
|
|
4287
|
+
function jc(...e) {
|
|
4179
4288
|
return e.filter(Boolean).join(" ");
|
|
4180
4289
|
}
|
|
4181
|
-
function
|
|
4290
|
+
function Mc(e) {
|
|
4182
4291
|
let [t, n] = e.split("-"), r = [];
|
|
4183
4292
|
return t && r.push(t), n && r.push(n), r;
|
|
4184
4293
|
}
|
|
4185
|
-
var
|
|
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] =
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
}, [
|
|
4294
|
+
var Nc = (e) => {
|
|
4295
|
+
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), [P, F] = L.useState(0), ce = L.useRef(n.duration || y || Ec), 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 || Ec, [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 = gc(), be = n.invert || t, xe = fe === "loading";
|
|
4296
|
+
H.current = L.useMemo(() => he * x + ve, [he, ve]), L.useEffect(() => {
|
|
4297
|
+
ce.current = B;
|
|
4298
|
+
}, [B]), L.useEffect(() => {
|
|
4190
4299
|
ne(!0);
|
|
4191
|
-
}, []),
|
|
4192
|
-
let e =
|
|
4300
|
+
}, []), L.useEffect(() => {
|
|
4301
|
+
let e = I.current;
|
|
4193
4302
|
if (e) {
|
|
4194
4303
|
let t = e.getBoundingClientRect().height;
|
|
4195
|
-
return
|
|
4304
|
+
return F(t), a((e) => [{
|
|
4196
4305
|
toastId: n.id,
|
|
4197
4306
|
height: t,
|
|
4198
4307
|
position: n.position
|
|
4199
4308
|
}, ...e]), () => a((e) => e.filter((e) => e.toastId !== n.id));
|
|
4200
4309
|
}
|
|
4201
|
-
}, [a, n.id]),
|
|
4310
|
+
}, [a, n.id]), L.useLayoutEffect(() => {
|
|
4202
4311
|
if (!te) return;
|
|
4203
|
-
let e =
|
|
4312
|
+
let e = I.current, t = e.style.height;
|
|
4204
4313
|
e.style.height = "auto";
|
|
4205
4314
|
let r = e.getBoundingClientRect().height;
|
|
4206
|
-
e.style.height = t,
|
|
4315
|
+
e.style.height = t, F(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
|
|
4207
4316
|
...e,
|
|
4208
4317
|
height: r
|
|
4209
4318
|
} : e) : [{
|
|
@@ -4221,52 +4330,52 @@ var Ac = (e) => {
|
|
|
4221
4330
|
n.action,
|
|
4222
4331
|
n.cancel
|
|
4223
4332
|
]);
|
|
4224
|
-
let
|
|
4225
|
-
A(!0), se(
|
|
4333
|
+
let G = L.useCallback(() => {
|
|
4334
|
+
A(!0), se(H.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
|
|
4226
4335
|
d(n);
|
|
4227
|
-
},
|
|
4336
|
+
}, Ac);
|
|
4228
4337
|
}, [
|
|
4229
4338
|
n,
|
|
4230
4339
|
d,
|
|
4231
4340
|
a,
|
|
4232
|
-
|
|
4341
|
+
H
|
|
4233
4342
|
]);
|
|
4234
|
-
|
|
4235
|
-
if (n.promise &&
|
|
4343
|
+
L.useEffect(() => {
|
|
4344
|
+
if (n.promise && fe === "loading" || n.duration === Infinity || n.type === "loading") return;
|
|
4236
4345
|
let e;
|
|
4237
|
-
return u || i ||
|
|
4238
|
-
if (
|
|
4239
|
-
let e = (/* @__PURE__ */ new Date()).getTime() -
|
|
4240
|
-
|
|
4346
|
+
return u || i || ye ? (() => {
|
|
4347
|
+
if (ge.current < V.current) {
|
|
4348
|
+
let e = (/* @__PURE__ */ new Date()).getTime() - V.current;
|
|
4349
|
+
ce.current -= e;
|
|
4241
4350
|
}
|
|
4242
|
-
|
|
4243
|
-
})() :
|
|
4244
|
-
n.onAutoClose == null || n.onAutoClose.call(n, n),
|
|
4245
|
-
},
|
|
4351
|
+
ge.current = (/* @__PURE__ */ new Date()).getTime();
|
|
4352
|
+
})() : ce.current !== Infinity && (V.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
|
|
4353
|
+
n.onAutoClose == null || n.onAutoClose.call(n, n), G();
|
|
4354
|
+
}, ce.current)), () => clearTimeout(e);
|
|
4246
4355
|
}, [
|
|
4247
4356
|
u,
|
|
4248
4357
|
i,
|
|
4249
4358
|
n,
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
]),
|
|
4254
|
-
n.delete && (
|
|
4255
|
-
}, [
|
|
4359
|
+
fe,
|
|
4360
|
+
ye,
|
|
4361
|
+
G
|
|
4362
|
+
]), L.useEffect(() => {
|
|
4363
|
+
n.delete && (G(), n.onDismiss == null || n.onDismiss.call(n, n));
|
|
4364
|
+
}, [G, n.delete]);
|
|
4256
4365
|
function Se() {
|
|
4257
|
-
return w?.loading ? /*#__PURE__*/
|
|
4258
|
-
className:
|
|
4259
|
-
"data-visible":
|
|
4260
|
-
}, w.loading) : /*#__PURE__*/
|
|
4261
|
-
className:
|
|
4262
|
-
visible:
|
|
4366
|
+
return w?.loading ? /*#__PURE__*/ L.createElement("div", {
|
|
4367
|
+
className: jc(C?.loader, n?.classNames?.loader, "sonner-loader"),
|
|
4368
|
+
"data-visible": fe === "loading"
|
|
4369
|
+
}, w.loading) : /*#__PURE__*/ L.createElement(uc, {
|
|
4370
|
+
className: jc(C?.loader, n?.classNames?.loader),
|
|
4371
|
+
visible: fe === "loading"
|
|
4263
4372
|
});
|
|
4264
4373
|
}
|
|
4265
|
-
let Ce = n.icon || w?.[
|
|
4266
|
-
return /*#__PURE__*/
|
|
4374
|
+
let Ce = n.icon || w?.[fe] || cc(fe);
|
|
4375
|
+
return /*#__PURE__*/ L.createElement("li", {
|
|
4267
4376
|
tabIndex: 0,
|
|
4268
|
-
ref:
|
|
4269
|
-
className:
|
|
4377
|
+
ref: I,
|
|
4378
|
+
className: jc(_, me, C?.toast, n?.classNames?.toast, C?.default, C?.[fe], n?.classNames?.[fe]),
|
|
4270
4379
|
"data-sonner-toast": "",
|
|
4271
4380
|
"data-rich-colors": n.richColors ?? f,
|
|
4272
4381
|
"data-styled": !(n.jsx || n.unstyled || r),
|
|
@@ -4274,15 +4383,15 @@ var Ac = (e) => {
|
|
|
4274
4383
|
"data-promise": !!n.promise,
|
|
4275
4384
|
"data-swiped": ae,
|
|
4276
4385
|
"data-removed": k,
|
|
4277
|
-
"data-visible":
|
|
4278
|
-
"data-y-position":
|
|
4279
|
-
"data-x-position":
|
|
4386
|
+
"data-visible": de,
|
|
4387
|
+
"data-y-position": W,
|
|
4388
|
+
"data-x-position": _e,
|
|
4280
4389
|
"data-index": c,
|
|
4281
|
-
"data-front":
|
|
4390
|
+
"data-front": ue,
|
|
4282
4391
|
"data-swiping": re,
|
|
4283
|
-
"data-dismissible":
|
|
4284
|
-
"data-type":
|
|
4285
|
-
"data-invert":
|
|
4392
|
+
"data-dismissible": pe,
|
|
4393
|
+
"data-type": fe,
|
|
4394
|
+
"data-invert": be,
|
|
4286
4395
|
"data-swipe-out": ie,
|
|
4287
4396
|
"data-swipe-direction": O,
|
|
4288
4397
|
"data-expanded": !!(u || S && te),
|
|
@@ -4291,35 +4400,35 @@ var Ac = (e) => {
|
|
|
4291
4400
|
"--index": c,
|
|
4292
4401
|
"--toasts-before": c,
|
|
4293
4402
|
"--z-index": l.length - c,
|
|
4294
|
-
"--offset": `${k ? oe :
|
|
4295
|
-
"--initial-height": S ? "auto" : `${
|
|
4403
|
+
"--offset": `${k ? oe : H.current}px`,
|
|
4404
|
+
"--initial-height": S ? "auto" : `${P}px`,
|
|
4296
4405
|
...m,
|
|
4297
4406
|
...n.style
|
|
4298
4407
|
},
|
|
4299
4408
|
onDragEnd: () => {
|
|
4300
|
-
j(!1), D(null),
|
|
4409
|
+
j(!1), D(null), U.current = null;
|
|
4301
4410
|
},
|
|
4302
4411
|
onPointerDown: (e) => {
|
|
4303
|
-
e.button !== 2 && (
|
|
4412
|
+
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
4413
|
x: e.clientX,
|
|
4305
4414
|
y: e.clientY
|
|
4306
4415
|
})));
|
|
4307
4416
|
},
|
|
4308
4417
|
onPointerUp: () => {
|
|
4309
|
-
if (ie || !
|
|
4310
|
-
|
|
4311
|
-
let e = Number(
|
|
4312
|
-
if (Math.abs(i) >=
|
|
4313
|
-
se(
|
|
4418
|
+
if (ie || !pe) return;
|
|
4419
|
+
U.current = null;
|
|
4420
|
+
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;
|
|
4421
|
+
if (Math.abs(i) >= kc || a > .11) {
|
|
4422
|
+
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
4423
|
return;
|
|
4315
4424
|
}
|
|
4316
4425
|
var o, s;
|
|
4317
|
-
(o =
|
|
4426
|
+
(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
4427
|
},
|
|
4319
4428
|
onPointerMove: (t) => {
|
|
4320
4429
|
var n, r;
|
|
4321
|
-
if (!
|
|
4322
|
-
let i = t.clientY -
|
|
4430
|
+
if (!U.current || !pe || window.getSelection()?.toString().length > 0) return;
|
|
4431
|
+
let i = t.clientY - U.current.y, a = t.clientX - U.current.x, o = e.swipeDirections ?? Mc(b);
|
|
4323
4432
|
!E && (Math.abs(a) > 1 || Math.abs(i) > 1) && D(Math.abs(a) > Math.abs(i) ? "x" : "y");
|
|
4324
4433
|
let s = {
|
|
4325
4434
|
x: 0,
|
|
@@ -4336,55 +4445,55 @@ var Ac = (e) => {
|
|
|
4336
4445
|
let e = a * c(a);
|
|
4337
4446
|
s.x = Math.abs(e) < Math.abs(a) ? e : a;
|
|
4338
4447
|
}
|
|
4339
|
-
(Math.abs(s.x) > 0 || Math.abs(s.y) > 0) && N(!0), (n =
|
|
4448
|
+
(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
4449
|
}
|
|
4341
|
-
},
|
|
4450
|
+
}, z && !n.jsx && fe !== "loading" ? /*#__PURE__*/ L.createElement("button", {
|
|
4342
4451
|
"aria-label": T,
|
|
4343
|
-
"data-disabled":
|
|
4452
|
+
"data-disabled": xe,
|
|
4344
4453
|
"data-close-button": !0,
|
|
4345
|
-
onClick:
|
|
4346
|
-
|
|
4454
|
+
onClick: xe || !pe ? () => {} : () => {
|
|
4455
|
+
G(), n.onDismiss == null || n.onDismiss.call(n, n);
|
|
4347
4456
|
},
|
|
4348
|
-
className:
|
|
4349
|
-
}, w?.close ??
|
|
4457
|
+
className: jc(C?.closeButton, n?.classNames?.closeButton)
|
|
4458
|
+
}, w?.close ?? hc) : null, (fe || n.icon || n.promise) && n.icon !== null && (w?.[fe] !== null || n.icon) ? /*#__PURE__*/ L.createElement("div", {
|
|
4350
4459
|
"data-icon": "",
|
|
4351
|
-
className:
|
|
4352
|
-
}, n.promise || n.type === "loading" && !n.icon ? n.icon || Se() : null, n.type === "loading" ? null : Ce) : null, /*#__PURE__*/
|
|
4460
|
+
className: jc(C?.icon, n?.classNames?.icon)
|
|
4461
|
+
}, n.promise || n.type === "loading" && !n.icon ? n.icon || Se() : null, n.type === "loading" ? null : Ce) : null, /*#__PURE__*/ L.createElement("div", {
|
|
4353
4462
|
"data-content": "",
|
|
4354
|
-
className:
|
|
4355
|
-
}, /*#__PURE__*/
|
|
4463
|
+
className: jc(C?.content, n?.classNames?.content)
|
|
4464
|
+
}, /*#__PURE__*/ L.createElement("div", {
|
|
4356
4465
|
"data-title": "",
|
|
4357
|
-
className:
|
|
4358
|
-
}, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/
|
|
4466
|
+
className: jc(C?.title, n?.classNames?.title)
|
|
4467
|
+
}, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ L.createElement("div", {
|
|
4359
4468
|
"data-description": "",
|
|
4360
|
-
className:
|
|
4361
|
-
}, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/
|
|
4469
|
+
className: jc(v, R, C?.description, n?.classNames?.description)
|
|
4470
|
+
}, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ L.isValidElement(n.cancel) ? n.cancel : n.cancel && Sc(n.cancel) ? /*#__PURE__*/ L.createElement("button", {
|
|
4362
4471
|
"data-button": !0,
|
|
4363
4472
|
"data-cancel": !0,
|
|
4364
4473
|
style: n.cancelButtonStyle || h,
|
|
4365
4474
|
onClick: (e) => {
|
|
4366
|
-
|
|
4475
|
+
Sc(n.cancel) && pe && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), G());
|
|
4367
4476
|
},
|
|
4368
|
-
className:
|
|
4369
|
-
}, n.cancel.label) : null, /*#__PURE__*/
|
|
4477
|
+
className: jc(C?.cancelButton, n?.classNames?.cancelButton)
|
|
4478
|
+
}, n.cancel.label) : null, /*#__PURE__*/ L.isValidElement(n.action) ? n.action : n.action && Sc(n.action) ? /*#__PURE__*/ L.createElement("button", {
|
|
4370
4479
|
"data-button": !0,
|
|
4371
4480
|
"data-action": !0,
|
|
4372
4481
|
style: n.actionButtonStyle || g,
|
|
4373
4482
|
onClick: (e) => {
|
|
4374
|
-
|
|
4483
|
+
Sc(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && G());
|
|
4375
4484
|
},
|
|
4376
|
-
className:
|
|
4485
|
+
className: jc(C?.actionButton, n?.classNames?.actionButton)
|
|
4377
4486
|
}, n.action.label) : null);
|
|
4378
4487
|
};
|
|
4379
|
-
function
|
|
4488
|
+
function Pc() {
|
|
4380
4489
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
4381
4490
|
let e = document.documentElement.getAttribute("dir");
|
|
4382
4491
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
4383
4492
|
}
|
|
4384
|
-
function
|
|
4493
|
+
function Fc(e, t) {
|
|
4385
4494
|
let n = {};
|
|
4386
4495
|
return [e, t].forEach((e, t) => {
|
|
4387
|
-
let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ?
|
|
4496
|
+
let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? Tc : wc;
|
|
4388
4497
|
function o(e) {
|
|
4389
4498
|
[
|
|
4390
4499
|
"top",
|
|
@@ -4405,11 +4514,11 @@ function Mc(e, t) {
|
|
|
4405
4514
|
}) : o(a);
|
|
4406
4515
|
}), n;
|
|
4407
4516
|
}
|
|
4408
|
-
var
|
|
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 =
|
|
4410
|
-
S((t) => (t.find((t) => t.id === e.id)?.delete ||
|
|
4517
|
+
var Ic = /*#__PURE__*/ L.forwardRef(function(e, t) {
|
|
4518
|
+
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 = Cc, toastOptions: g, dir: _ = Pc(), gap: v = Oc, 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) => {
|
|
4519
|
+
S((t) => (t.find((t) => t.id === e.id)?.delete || vc.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
|
|
4411
4520
|
}, []);
|
|
4412
|
-
return
|
|
4521
|
+
return L.useEffect(() => vc.subscribe((e) => {
|
|
4413
4522
|
if (e.dismiss) {
|
|
4414
4523
|
requestAnimationFrame(() => {
|
|
4415
4524
|
S((t) => t.map((t) => t.id === e.id ? {
|
|
@@ -4420,7 +4529,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4420
4529
|
return;
|
|
4421
4530
|
}
|
|
4422
4531
|
setTimeout(() => {
|
|
4423
|
-
|
|
4532
|
+
_e.flushSync(() => {
|
|
4424
4533
|
S((t) => {
|
|
4425
4534
|
let n = t.findIndex((t) => t.id === e.id);
|
|
4426
4535
|
return n === -1 ? [e, ...t] : [
|
|
@@ -4434,7 +4543,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4434
4543
|
});
|
|
4435
4544
|
});
|
|
4436
4545
|
});
|
|
4437
|
-
}), [x]),
|
|
4546
|
+
}), [x]), L.useEffect(() => {
|
|
4438
4547
|
if (d !== "system") {
|
|
4439
4548
|
k(d);
|
|
4440
4549
|
return;
|
|
@@ -4454,9 +4563,9 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4454
4563
|
}
|
|
4455
4564
|
});
|
|
4456
4565
|
}
|
|
4457
|
-
}, [d]),
|
|
4566
|
+
}, [d]), L.useEffect(() => {
|
|
4458
4567
|
x.length <= 1 && O(!1);
|
|
4459
|
-
}, [x]),
|
|
4568
|
+
}, [x]), L.useEffect(() => {
|
|
4460
4569
|
let e = (e) => {
|
|
4461
4570
|
if (a.every((t) => e[t] || e.code === t)) {
|
|
4462
4571
|
var t;
|
|
@@ -4465,11 +4574,11 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4465
4574
|
e.code === "Escape" && (document.activeElement === A.current || A.current?.contains(document.activeElement)) && O(!1);
|
|
4466
4575
|
};
|
|
4467
4576
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
4468
|
-
}, [a]),
|
|
4577
|
+
}, [a]), L.useEffect(() => {
|
|
4469
4578
|
if (A.current) return () => {
|
|
4470
4579
|
j.current && (j.current.focus({ preventScroll: !0 }), j.current = null, ie.current = !1);
|
|
4471
4580
|
};
|
|
4472
|
-
}, [A.current]), /*#__PURE__*/
|
|
4581
|
+
}, [A.current]), /*#__PURE__*/ L.createElement("section", {
|
|
4473
4582
|
ref: t,
|
|
4474
4583
|
"aria-label": `${b} ${re}`,
|
|
4475
4584
|
tabIndex: -1,
|
|
@@ -4479,9 +4588,9 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4479
4588
|
suppressHydrationWarning: !0
|
|
4480
4589
|
}, w.map((t, n) => {
|
|
4481
4590
|
let [i, a] = t.split("-");
|
|
4482
|
-
return C.length ? /*#__PURE__*/
|
|
4591
|
+
return C.length ? /*#__PURE__*/ L.createElement("ol", {
|
|
4483
4592
|
key: t,
|
|
4484
|
-
dir: _ === "auto" ?
|
|
4593
|
+
dir: _ === "auto" ? Pc() : _,
|
|
4485
4594
|
tabIndex: -1,
|
|
4486
4595
|
ref: A,
|
|
4487
4596
|
className: c,
|
|
@@ -4491,10 +4600,10 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4491
4600
|
"data-x-position": a,
|
|
4492
4601
|
style: {
|
|
4493
4602
|
"--front-toast-height": `${T[0]?.height || 0}px`,
|
|
4494
|
-
"--width": `${
|
|
4603
|
+
"--width": `${Dc}px`,
|
|
4495
4604
|
"--gap": `${v}px`,
|
|
4496
4605
|
...m,
|
|
4497
|
-
...
|
|
4606
|
+
...Fc(l, u)
|
|
4498
4607
|
},
|
|
4499
4608
|
onBlur: (e) => {
|
|
4500
4609
|
ie.current && !e.currentTarget.contains(e.relatedTarget) && (ie.current = !1, j.current &&= (j.current.focus({ preventScroll: !0 }), null));
|
|
@@ -4512,7 +4621,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4512
4621
|
e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || te(!0);
|
|
4513
4622
|
},
|
|
4514
4623
|
onPointerUp: () => te(!1)
|
|
4515
|
-
}, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/
|
|
4624
|
+
}, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ L.createElement(Nc, {
|
|
4516
4625
|
key: n.id,
|
|
4517
4626
|
icons: y,
|
|
4518
4627
|
index: i,
|
|
@@ -4542,17 +4651,17 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4542
4651
|
swipeDirections: e.swipeDirections
|
|
4543
4652
|
}))) : null;
|
|
4544
4653
|
}));
|
|
4545
|
-
}),
|
|
4546
|
-
let { theme: t = "system" } =
|
|
4547
|
-
return /* @__PURE__ */
|
|
4654
|
+
}), Lc = ({ ...e }) => {
|
|
4655
|
+
let { theme: t = "system" } = oc();
|
|
4656
|
+
return /* @__PURE__ */ U(Ic, {
|
|
4548
4657
|
theme: t,
|
|
4549
4658
|
className: "toaster group",
|
|
4550
4659
|
icons: {
|
|
4551
|
-
success: /* @__PURE__ */
|
|
4552
|
-
info: /* @__PURE__ */
|
|
4553
|
-
warning: /* @__PURE__ */
|
|
4554
|
-
error: /* @__PURE__ */
|
|
4555
|
-
loading: /* @__PURE__ */
|
|
4660
|
+
success: /* @__PURE__ */ U(Fs, { className: "size-4" }),
|
|
4661
|
+
info: /* @__PURE__ */ U(Ls, { className: "size-4" }),
|
|
4662
|
+
warning: /* @__PURE__ */ U(F, { className: "size-4" }),
|
|
4663
|
+
error: /* @__PURE__ */ U(Rs, { className: "size-4" }),
|
|
4664
|
+
loading: /* @__PURE__ */ U(te, { className: "size-4 animate-spin" })
|
|
4556
4665
|
},
|
|
4557
4666
|
style: {
|
|
4558
4667
|
"--normal-bg": "var(--popover)",
|
|
@@ -4565,24 +4674,24 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
|
4565
4674
|
};
|
|
4566
4675
|
//#endregion
|
|
4567
4676
|
//#region src/ui/components/ui/textarea.tsx
|
|
4568
|
-
function
|
|
4569
|
-
return /* @__PURE__ */
|
|
4677
|
+
function Rc({ className: e, ...t }) {
|
|
4678
|
+
return /* @__PURE__ */ U("textarea", {
|
|
4570
4679
|
"data-slot": "textarea",
|
|
4571
|
-
className:
|
|
4680
|
+
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
4681
|
...t
|
|
4573
4682
|
});
|
|
4574
4683
|
}
|
|
4575
4684
|
//#endregion
|
|
4576
4685
|
//#region src/platform/datasource/remotePreflight.ts
|
|
4577
|
-
var
|
|
4578
|
-
function
|
|
4686
|
+
var zc = 220, Bc = 2e4;
|
|
4687
|
+
function Vc(e) {
|
|
4579
4688
|
let t = e.trim();
|
|
4580
|
-
return t ? t.length >
|
|
4689
|
+
return t ? t.length > zc ? `${t.slice(0, zc)}…` : t : "";
|
|
4581
4690
|
}
|
|
4582
|
-
function
|
|
4691
|
+
function Hc(e, t) {
|
|
4583
4692
|
return `Content-Range: ${e.trim() || "(empty)"}; Accept-Ranges: ${t.trim() || "(empty)"}`;
|
|
4584
4693
|
}
|
|
4585
|
-
var
|
|
4694
|
+
var Uc = {
|
|
4586
4695
|
range_http: "Range preflight failed: expected HTTP 206 (Partial Content), actual {actualStatus}.",
|
|
4587
4696
|
range_headers: "Range not supported: expected Accept-Ranges: bytes or a bytes Content-Range; actual: {headerSummary}.",
|
|
4588
4697
|
full_download_too_large: "This server does not support Range requests and the complete archive exceeds the safe download limit.",
|
|
@@ -4590,17 +4699,17 @@ var zc = {
|
|
|
4590
4699
|
network: "Network or authentication failed: {detail}.",
|
|
4591
4700
|
unknown: "Preflight failed: {detail}."
|
|
4592
4701
|
};
|
|
4593
|
-
function
|
|
4702
|
+
function Wc(e, t) {
|
|
4594
4703
|
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,
|
|
4704
|
+
return t.actualStatus !== void 0 && (r.actualStatus = t.actualStatus), t.headerSummary && (r.headerSummary = t.headerSummary), t.detail && (r.detail = t.detail), e(n, Uc[t.code], r);
|
|
4596
4705
|
}
|
|
4597
|
-
function
|
|
4706
|
+
function Gc(e) {
|
|
4598
4707
|
let t = e.get("content-length");
|
|
4599
4708
|
if (!t) return;
|
|
4600
4709
|
let n = Number(t);
|
|
4601
4710
|
return Number.isSafeInteger(n) && n >= 0 ? n : void 0;
|
|
4602
4711
|
}
|
|
4603
|
-
async function
|
|
4712
|
+
async function Kc(e, t) {
|
|
4604
4713
|
if (!e.body) return /* @__PURE__ */ new Uint8Array();
|
|
4605
4714
|
let n = e.body.getReader(), r = [], i = 0;
|
|
4606
4715
|
try {
|
|
@@ -4617,10 +4726,10 @@ async function Hc(e, t) {
|
|
|
4617
4726
|
for (let e of r) a.set(e, o), o += e.byteLength;
|
|
4618
4727
|
return a;
|
|
4619
4728
|
}
|
|
4620
|
-
function
|
|
4729
|
+
function qc(e, t, n) {
|
|
4621
4730
|
return hs(n) || ms(t) || fs(e);
|
|
4622
4731
|
}
|
|
4623
|
-
function
|
|
4732
|
+
function Jc() {
|
|
4624
4733
|
return {
|
|
4625
4734
|
ok: !1,
|
|
4626
4735
|
kind: "unknown",
|
|
@@ -4630,52 +4739,100 @@ function Wc() {
|
|
|
4630
4739
|
}
|
|
4631
4740
|
};
|
|
4632
4741
|
}
|
|
4633
|
-
|
|
4742
|
+
function Yc(e) {
|
|
4743
|
+
if (e instanceof DOMException && (e.name === "TimeoutError" || e.name === "AbortError")) return !0;
|
|
4744
|
+
let t = String(e?.message || e).toLowerCase();
|
|
4745
|
+
return t.includes("timeout") || t.includes("timed out") || t.includes("aborted");
|
|
4746
|
+
}
|
|
4747
|
+
function Xc(e) {
|
|
4748
|
+
let t = new AbortController(), n = setTimeout(() => {
|
|
4749
|
+
t.abort();
|
|
4750
|
+
}, e);
|
|
4751
|
+
return {
|
|
4752
|
+
signal: t.signal,
|
|
4753
|
+
cancel: () => clearTimeout(n)
|
|
4754
|
+
};
|
|
4755
|
+
}
|
|
4756
|
+
async function Zc(e) {
|
|
4757
|
+
let t;
|
|
4758
|
+
try {
|
|
4759
|
+
let n = new URL(e);
|
|
4760
|
+
if (n.protocol !== "https:") return {
|
|
4761
|
+
ok: !1,
|
|
4762
|
+
kind: "network",
|
|
4763
|
+
failure: {
|
|
4764
|
+
code: "network",
|
|
4765
|
+
detail: "Blocked insecure HTTP archive URL; use HTTPS"
|
|
4766
|
+
}
|
|
4767
|
+
};
|
|
4768
|
+
t = n.toString();
|
|
4769
|
+
} catch {
|
|
4770
|
+
return {
|
|
4771
|
+
ok: !1,
|
|
4772
|
+
kind: "unknown",
|
|
4773
|
+
failure: {
|
|
4774
|
+
code: "unknown",
|
|
4775
|
+
detail: "Invalid archive URL"
|
|
4776
|
+
}
|
|
4777
|
+
};
|
|
4778
|
+
}
|
|
4779
|
+
let { signal: n, cancel: r } = Xc(Bc);
|
|
4634
4780
|
try {
|
|
4635
|
-
let
|
|
4636
|
-
|
|
4637
|
-
|
|
4781
|
+
let r = await fetch(t, {
|
|
4782
|
+
headers: { Range: "bytes=0-511" },
|
|
4783
|
+
signal: n
|
|
4784
|
+
}), i = Gc(r.headers);
|
|
4785
|
+
if (r.status === 200) {
|
|
4786
|
+
if (i !== void 0 && i > 2147483648) return await r.body?.cancel().catch(() => void 0), {
|
|
4638
4787
|
ok: !1,
|
|
4639
4788
|
kind: "range",
|
|
4640
4789
|
failure: {
|
|
4641
4790
|
code: "full_download_too_large",
|
|
4642
|
-
actualStatus:
|
|
4791
|
+
actualStatus: r.status
|
|
4643
4792
|
}
|
|
4644
4793
|
};
|
|
4645
|
-
let
|
|
4646
|
-
return
|
|
4794
|
+
let t = await Kc(r, 512), n = qc(e, r.headers, t);
|
|
4795
|
+
return n ? {
|
|
4647
4796
|
ok: !0,
|
|
4648
|
-
kind:
|
|
4797
|
+
kind: n,
|
|
4649
4798
|
accessMode: "full",
|
|
4650
|
-
contentLength:
|
|
4651
|
-
} :
|
|
4799
|
+
contentLength: i
|
|
4800
|
+
} : Jc();
|
|
4652
4801
|
}
|
|
4653
|
-
if (
|
|
4802
|
+
if (r.status !== 206) return {
|
|
4654
4803
|
ok: !1,
|
|
4655
4804
|
kind: "range",
|
|
4656
4805
|
failure: {
|
|
4657
4806
|
code: "range_http",
|
|
4658
|
-
actualStatus:
|
|
4807
|
+
actualStatus: r.status
|
|
4659
4808
|
}
|
|
4660
4809
|
};
|
|
4661
|
-
let
|
|
4662
|
-
if (!
|
|
4810
|
+
let a = r.headers.get("content-range") || "", o = r.headers.get("accept-ranges") || "";
|
|
4811
|
+
if (!a.toLowerCase().startsWith("bytes ") && !o.toLowerCase().includes("bytes")) return {
|
|
4663
4812
|
ok: !1,
|
|
4664
4813
|
kind: "range",
|
|
4665
4814
|
failure: {
|
|
4666
4815
|
code: "range_headers",
|
|
4667
|
-
headerSummary:
|
|
4816
|
+
headerSummary: Hc(a, o)
|
|
4668
4817
|
}
|
|
4669
4818
|
};
|
|
4670
|
-
let
|
|
4671
|
-
return
|
|
4819
|
+
let s = await Kc(r, 512), c = qc(e, r.headers, s);
|
|
4820
|
+
return c ? {
|
|
4672
4821
|
ok: !0,
|
|
4673
|
-
kind:
|
|
4822
|
+
kind: c,
|
|
4674
4823
|
accessMode: "range",
|
|
4675
|
-
contentLength:
|
|
4676
|
-
} :
|
|
4824
|
+
contentLength: i
|
|
4825
|
+
} : Jc();
|
|
4677
4826
|
} catch (e) {
|
|
4678
|
-
|
|
4827
|
+
if (Yc(e)) return {
|
|
4828
|
+
ok: !1,
|
|
4829
|
+
kind: "network",
|
|
4830
|
+
failure: {
|
|
4831
|
+
code: "network",
|
|
4832
|
+
detail: `Preflight timed out after ${Bc / 1e3}s`
|
|
4833
|
+
}
|
|
4834
|
+
};
|
|
4835
|
+
let t = Vc(e.message || String(e)), n = t.toLowerCase();
|
|
4679
4836
|
return n.includes("cors") ? {
|
|
4680
4837
|
ok: !1,
|
|
4681
4838
|
kind: "cors",
|
|
@@ -4698,48 +4855,50 @@ async function Gc(e) {
|
|
|
4698
4855
|
detail: t || "Unknown error"
|
|
4699
4856
|
}
|
|
4700
4857
|
};
|
|
4858
|
+
} finally {
|
|
4859
|
+
r();
|
|
4701
4860
|
}
|
|
4702
4861
|
}
|
|
4703
4862
|
//#endregion
|
|
4704
4863
|
//#region src/core/playback/episodeLoadPlan.ts
|
|
4705
|
-
function
|
|
4864
|
+
function Qc(e) {
|
|
4706
4865
|
if (!e?.dtype) return !1;
|
|
4707
4866
|
let t = e.dtype.toLowerCase();
|
|
4708
4867
|
return t.includes("float") || t.includes("int") || t.includes("double") || t.includes("decimal");
|
|
4709
4868
|
}
|
|
4710
|
-
function
|
|
4869
|
+
function $c(e) {
|
|
4711
4870
|
return e === "observation" || e.startsWith("observation.") || e === "action" || e.startsWith("action.");
|
|
4712
4871
|
}
|
|
4713
|
-
function
|
|
4872
|
+
function el(e) {
|
|
4714
4873
|
let t = /* @__PURE__ */ new Set(["timestamp"]);
|
|
4715
4874
|
return Object.entries(e.features).forEach(([e, n]) => {
|
|
4716
|
-
|
|
4875
|
+
$c(e) && Qc(n) && t.add(e);
|
|
4717
4876
|
}), Array.from(t);
|
|
4718
4877
|
}
|
|
4719
|
-
function
|
|
4878
|
+
function tl(e, t) {
|
|
4720
4879
|
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
4880
|
return Array.from({ length: i }, (e, n) => ({
|
|
4722
4881
|
frame_index: n,
|
|
4723
4882
|
timestamp: r[n] ?? n / Math.max(1, t)
|
|
4724
4883
|
}));
|
|
4725
4884
|
}
|
|
4726
|
-
function
|
|
4885
|
+
function nl(e, t) {
|
|
4727
4886
|
return e.find((e) => !t.has(e.episode_index))?.episode_index ?? null;
|
|
4728
4887
|
}
|
|
4729
4888
|
//#endregion
|
|
4730
4889
|
//#region src/core/playback/playbackAutoplay.ts
|
|
4731
|
-
function
|
|
4890
|
+
function rl(e) {
|
|
4732
4891
|
return e.totalFrames <= 0 || e.isLoading || e.isPlaying || e.userPaused ? !1 : e.lastAutoPlayId !== e.currentId;
|
|
4733
4892
|
}
|
|
4734
4893
|
//#endregion
|
|
4735
4894
|
//#region src/core/utils/episodeKeyboard.ts
|
|
4736
|
-
var
|
|
4895
|
+
var il = (e) => e === "Enter";
|
|
4737
4896
|
//#endregion
|
|
4738
4897
|
//#region src/platform/services/ParquetImageService.ts
|
|
4739
|
-
function
|
|
4898
|
+
function al() {
|
|
4740
4899
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
4741
4900
|
}
|
|
4742
|
-
var
|
|
4901
|
+
var ol = class {
|
|
4743
4902
|
worker = null;
|
|
4744
4903
|
rawWorker = null;
|
|
4745
4904
|
dataSource = null;
|
|
@@ -4762,7 +4921,7 @@ var el = class {
|
|
|
4762
4921
|
}
|
|
4763
4922
|
async getWorker() {
|
|
4764
4923
|
if (this.assertActive(), !this.worker) {
|
|
4765
|
-
let { remote: e, raw: t } =
|
|
4924
|
+
let { remote: e, raw: t } = ue();
|
|
4766
4925
|
this.worker = e, this.rawWorker = t, this.bindRawWorkerMessages(t), await this.worker.init(), this.assertActive();
|
|
4767
4926
|
}
|
|
4768
4927
|
return this.worker;
|
|
@@ -4815,7 +4974,7 @@ var el = class {
|
|
|
4815
4974
|
}
|
|
4816
4975
|
async preloadEpisode(e, t, n, r, i) {
|
|
4817
4976
|
this.assertActive(), await this.getWorker(), this.currentPreloadKey = r;
|
|
4818
|
-
let a =
|
|
4977
|
+
let a = al(), o = new Promise((e, t) => {
|
|
4819
4978
|
this.pendingPreloadCallbacks.set(a, {
|
|
4820
4979
|
resolve: e,
|
|
4821
4980
|
reject: t,
|
|
@@ -4833,7 +4992,7 @@ var el = class {
|
|
|
4833
4992
|
}
|
|
4834
4993
|
async getFrameBitmap(e, t, n) {
|
|
4835
4994
|
if (this.disposed || !this.rawWorker) return null;
|
|
4836
|
-
let r =
|
|
4995
|
+
let r = al(), i = new Promise((e, t) => {
|
|
4837
4996
|
this.pendingBitmapCallbacks.set(r, {
|
|
4838
4997
|
resolve: e,
|
|
4839
4998
|
reject: t
|
|
@@ -4933,18 +5092,18 @@ var el = class {
|
|
|
4933
5092
|
try {
|
|
4934
5093
|
await this.worker.clearCache();
|
|
4935
5094
|
} catch {}
|
|
4936
|
-
|
|
5095
|
+
I(this.worker), this.worker = null, this.rawWorker = null;
|
|
4937
5096
|
}
|
|
4938
5097
|
});
|
|
4939
5098
|
}
|
|
4940
5099
|
};
|
|
4941
|
-
function
|
|
4942
|
-
return new
|
|
5100
|
+
function sl() {
|
|
5101
|
+
return new ol();
|
|
4943
5102
|
}
|
|
4944
|
-
new
|
|
5103
|
+
new ol();
|
|
4945
5104
|
//#endregion
|
|
4946
5105
|
//#region src/platform/utils/storage.ts
|
|
4947
|
-
var
|
|
5106
|
+
var cl = {
|
|
4948
5107
|
getItem(e) {
|
|
4949
5108
|
if (typeof window > "u") return null;
|
|
4950
5109
|
try {
|
|
@@ -4986,9 +5145,9 @@ var nl = {
|
|
|
4986
5145
|
return console.error(`[safeStorage] Failed to stringify JSON for "${e}":`, t), !1;
|
|
4987
5146
|
}
|
|
4988
5147
|
}
|
|
4989
|
-
},
|
|
4990
|
-
let r = t !== void 0, [i, a] =
|
|
4991
|
-
return
|
|
5148
|
+
}, ll = ({ children: e, controlledTheme: t, rootElement: n }) => {
|
|
5149
|
+
let r = t !== void 0, [i, a] = H(() => r ? t : cl.getItem("theme") || "system"), o = r ? t : i, [s, c] = H(() => o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o);
|
|
5150
|
+
return z(() => {
|
|
4992
5151
|
let e = () => {
|
|
4993
5152
|
let e;
|
|
4994
5153
|
e = o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o, c(e), n && n.classList.toggle("dark", e === "dark");
|
|
@@ -4999,18 +5158,18 @@ var nl = {
|
|
|
4999
5158
|
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
5000
5159
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
5001
5160
|
}
|
|
5002
|
-
}, [o, n]), /* @__PURE__ */
|
|
5161
|
+
}, [o, n]), /* @__PURE__ */ U(E.Provider, {
|
|
5003
5162
|
value: {
|
|
5004
5163
|
theme: o,
|
|
5005
5164
|
setTheme: (e) => {
|
|
5006
|
-
a(e), r ||
|
|
5165
|
+
a(e), r || cl.setItem("theme", e);
|
|
5007
5166
|
},
|
|
5008
5167
|
resolvedTheme: s
|
|
5009
5168
|
},
|
|
5010
5169
|
children: e
|
|
5011
5170
|
});
|
|
5012
|
-
},
|
|
5013
|
-
let [t, n] =
|
|
5171
|
+
}, ul = pe(null), dl = ({ children: e }) => {
|
|
5172
|
+
let [t, n] = H([]), r = R((e) => {
|
|
5014
5173
|
n((t) => {
|
|
5015
5174
|
let n = t.findIndex((t) => t.id === e.id);
|
|
5016
5175
|
if (n === -1) return [...t, e];
|
|
@@ -5020,18 +5179,18 @@ var nl = {
|
|
|
5020
5179
|
...e
|
|
5021
5180
|
}, r;
|
|
5022
5181
|
});
|
|
5023
|
-
}, []), i =
|
|
5182
|
+
}, []), i = R((e) => {
|
|
5024
5183
|
n((t) => t.map((t) => t.id === e ? {
|
|
5025
5184
|
...t,
|
|
5026
5185
|
phase: "ready"
|
|
5027
5186
|
} : t));
|
|
5028
|
-
}, []), a =
|
|
5187
|
+
}, []), a = R((e, t) => {
|
|
5029
5188
|
n((n) => n.map((n) => n.id === e ? {
|
|
5030
5189
|
...n,
|
|
5031
5190
|
phase: "error",
|
|
5032
5191
|
error: t
|
|
5033
5192
|
} : n));
|
|
5034
|
-
}, []), o =
|
|
5193
|
+
}, []), o = R(() => n([]), []), s = B(() => ({
|
|
5035
5194
|
tasks: t,
|
|
5036
5195
|
upsertTask: r,
|
|
5037
5196
|
completeTask: i,
|
|
@@ -5044,49 +5203,49 @@ var nl = {
|
|
|
5044
5203
|
a,
|
|
5045
5204
|
o
|
|
5046
5205
|
]);
|
|
5047
|
-
return /* @__PURE__ */
|
|
5206
|
+
return /* @__PURE__ */ U(ul.Provider, {
|
|
5048
5207
|
value: s,
|
|
5049
5208
|
children: e
|
|
5050
5209
|
});
|
|
5051
|
-
},
|
|
5052
|
-
let e =
|
|
5210
|
+
}, fl = () => {
|
|
5211
|
+
let e = he(ul);
|
|
5053
5212
|
if (!e) throw Error("useLoading must be used within LoadingProvider");
|
|
5054
5213
|
return e;
|
|
5055
|
-
},
|
|
5056
|
-
let t =
|
|
5214
|
+
}, pl = pe(null), ml = ({ children: e }) => {
|
|
5215
|
+
let t = R((e, t = "info", n = 3e3) => {
|
|
5057
5216
|
let r = { duration: n };
|
|
5058
5217
|
switch (t) {
|
|
5059
5218
|
case "success":
|
|
5060
|
-
|
|
5219
|
+
xc.success(e, r);
|
|
5061
5220
|
break;
|
|
5062
5221
|
case "error":
|
|
5063
|
-
|
|
5222
|
+
xc.error(e, r);
|
|
5064
5223
|
break;
|
|
5065
5224
|
case "warning":
|
|
5066
|
-
|
|
5225
|
+
xc.warning(e, r);
|
|
5067
5226
|
break;
|
|
5068
|
-
default:
|
|
5227
|
+
default: xc.info(e, r);
|
|
5069
5228
|
}
|
|
5070
|
-
}, []), n =
|
|
5071
|
-
e ?
|
|
5072
|
-
}, []), r =
|
|
5229
|
+
}, []), n = R((e) => {
|
|
5230
|
+
e ? xc.dismiss(e) : xc.dismiss();
|
|
5231
|
+
}, []), r = B(() => ({
|
|
5073
5232
|
showToast: t,
|
|
5074
5233
|
dismissToast: n
|
|
5075
5234
|
}), [t, n]);
|
|
5076
|
-
return /* @__PURE__ */
|
|
5235
|
+
return /* @__PURE__ */ U(pl.Provider, {
|
|
5077
5236
|
value: r,
|
|
5078
5237
|
children: e
|
|
5079
5238
|
});
|
|
5080
5239
|
};
|
|
5081
5240
|
//#endregion
|
|
5082
5241
|
//#region src/react/contexts/versionMutationPolicy.ts
|
|
5083
|
-
function
|
|
5242
|
+
function hl(e) {
|
|
5084
5243
|
if (e?.status !== "supported") {
|
|
5085
5244
|
let t = e?.normalizedVersion ?? "unknown", n = e?.status ?? "unavailable";
|
|
5086
5245
|
throw Error(`Episode mutations are disabled for LeRobot ${t} (${n}); the dataset is immutable`);
|
|
5087
5246
|
}
|
|
5088
5247
|
}
|
|
5089
|
-
function
|
|
5248
|
+
function gl(e) {
|
|
5090
5249
|
return {
|
|
5091
5250
|
tasks: [e],
|
|
5092
5251
|
task_index: void 0
|
|
@@ -5094,38 +5253,38 @@ function ul(e) {
|
|
|
5094
5253
|
}
|
|
5095
5254
|
//#endregion
|
|
5096
5255
|
//#region src/react/contexts/useEpisodeView.ts
|
|
5097
|
-
function
|
|
5256
|
+
function _l(e, t) {
|
|
5098
5257
|
let n = t.get(e.episode_index);
|
|
5099
5258
|
return n ? {
|
|
5100
5259
|
...e,
|
|
5101
5260
|
...n
|
|
5102
5261
|
} : e;
|
|
5103
5262
|
}
|
|
5104
|
-
function
|
|
5105
|
-
return e.filter((e) => !t.has(e.episode_index)).map((e) =>
|
|
5263
|
+
function vl(e, t, n) {
|
|
5264
|
+
return e.filter((e) => !t.has(e.episode_index)).map((e) => _l(e, n));
|
|
5106
5265
|
}
|
|
5107
|
-
function
|
|
5266
|
+
function yl(e, t) {
|
|
5108
5267
|
return t.size === 0 ? e : e.filter((e) => t.has(e.episode_index));
|
|
5109
5268
|
}
|
|
5110
|
-
function
|
|
5269
|
+
function bl(e, t) {
|
|
5111
5270
|
let n = new Set(e);
|
|
5112
5271
|
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
5113
5272
|
}
|
|
5114
|
-
function
|
|
5115
|
-
let [n, r] =
|
|
5116
|
-
|
|
5273
|
+
function xl({ episodes: e, versionCapability: t }) {
|
|
5274
|
+
let [n, r] = H(() => /* @__PURE__ */ new Map()), [i, a] = H(() => /* @__PURE__ */ new Set()), [o, s] = H(() => /* @__PURE__ */ new Set()), c = R((n, i) => {
|
|
5275
|
+
hl(t), r((t) => {
|
|
5117
5276
|
if (!e.some((e) => e.episode_index === n)) return t;
|
|
5118
5277
|
let r = new Map(t);
|
|
5119
|
-
return r.set(n,
|
|
5278
|
+
return r.set(n, gl(i)), r;
|
|
5120
5279
|
});
|
|
5121
|
-
}, [e, t]), l =
|
|
5122
|
-
|
|
5123
|
-
}, [t]), u =
|
|
5124
|
-
|
|
5280
|
+
}, [e, t]), l = R((e) => {
|
|
5281
|
+
hl(t), a((t) => new Set(t).add(e));
|
|
5282
|
+
}, [t]), u = R((e) => {
|
|
5283
|
+
hl(t), a((t) => {
|
|
5125
5284
|
let n = new Set(t);
|
|
5126
5285
|
return n.delete(e), n;
|
|
5127
5286
|
});
|
|
5128
|
-
}, [t]), d =
|
|
5287
|
+
}, [t]), d = R((e) => _l(e, n), [n]), f = B(() => vl(e, i, n), [
|
|
5129
5288
|
e,
|
|
5130
5289
|
i,
|
|
5131
5290
|
n
|
|
@@ -5138,25 +5297,25 @@ function hl({ episodes: e, versionCapability: t }) {
|
|
|
5138
5297
|
selectedEpisodeIndices: o,
|
|
5139
5298
|
setSelectedEpisodeIndices: s,
|
|
5140
5299
|
effectiveEpisodes: f,
|
|
5141
|
-
episodesForExport:
|
|
5300
|
+
episodesForExport: B(() => yl(f, o), [f, o]),
|
|
5142
5301
|
editEpisodeTask: c,
|
|
5143
5302
|
deleteEpisode: l,
|
|
5144
5303
|
restoreEpisode: u,
|
|
5145
5304
|
getEffectiveEpisode: d,
|
|
5146
|
-
toggleEpisodeSelection:
|
|
5147
|
-
s((t) =>
|
|
5305
|
+
toggleEpisodeSelection: R((e) => {
|
|
5306
|
+
s((t) => bl(t, e));
|
|
5148
5307
|
}, []),
|
|
5149
|
-
selectAllInList:
|
|
5308
|
+
selectAllInList: R((e) => {
|
|
5150
5309
|
s(new Set(e));
|
|
5151
5310
|
}, []),
|
|
5152
|
-
clearEpisodeSelection:
|
|
5311
|
+
clearEpisodeSelection: R(() => {
|
|
5153
5312
|
s(/* @__PURE__ */ new Set());
|
|
5154
5313
|
}, [])
|
|
5155
5314
|
};
|
|
5156
5315
|
}
|
|
5157
5316
|
//#endregion
|
|
5158
5317
|
//#region src/react/contexts/useFeatureSubscriptions.ts
|
|
5159
|
-
function
|
|
5318
|
+
function Sl(e) {
|
|
5160
5319
|
let t = [];
|
|
5161
5320
|
for (let n = 0; n < e.rows; n++) {
|
|
5162
5321
|
let r = n * e.width;
|
|
@@ -5164,10 +5323,10 @@ function gl(e) {
|
|
|
5164
5323
|
}
|
|
5165
5324
|
return t;
|
|
5166
5325
|
}
|
|
5167
|
-
function
|
|
5326
|
+
function Cl(e) {
|
|
5168
5327
|
return e?.dtype === "image" || e?.dtype === "video";
|
|
5169
5328
|
}
|
|
5170
|
-
var
|
|
5329
|
+
var wl = class {
|
|
5171
5330
|
subscriptions = {};
|
|
5172
5331
|
pending = /* @__PURE__ */ new Set();
|
|
5173
5332
|
loading = /* @__PURE__ */ new Set();
|
|
@@ -5180,13 +5339,13 @@ var vl = class {
|
|
|
5180
5339
|
subscribe(e) {
|
|
5181
5340
|
this.subscriptions[e] = (this.subscriptions[e] ?? 0) + 1;
|
|
5182
5341
|
let t = this.options.getSnapshot();
|
|
5183
|
-
return
|
|
5342
|
+
return Cl(t.info?.features[e]) || this.subscriptions[e] === 1 && t.featureData[e] === void 0 && (this.pending.add(e), this.ensureScheduled()), Promise.resolve();
|
|
5184
5343
|
}
|
|
5185
5344
|
unsubscribe(e) {
|
|
5186
5345
|
(this.subscriptions[e] ?? 0) > 0 && --this.subscriptions[e];
|
|
5187
5346
|
}
|
|
5188
5347
|
getSubscribedFeatureNames(e) {
|
|
5189
|
-
return Object.entries(this.subscriptions).filter(([t, n]) => n > 0 && !
|
|
5348
|
+
return Object.entries(this.subscriptions).filter(([t, n]) => n > 0 && !Cl(e.features[t])).map(([e]) => e);
|
|
5190
5349
|
}
|
|
5191
5350
|
clearPending() {
|
|
5192
5351
|
this.generation += 1, this.pending.clear(), this.loading.clear(), this.timer !== null && ((this.options.cancel ?? window.clearTimeout)(this.timer), this.timer = null);
|
|
@@ -5201,7 +5360,7 @@ var vl = class {
|
|
|
5201
5360
|
this.pending.clear();
|
|
5202
5361
|
return;
|
|
5203
5362
|
}
|
|
5204
|
-
let n = Array.from(this.pending).filter((e) => this.loading.has(e) || t.featureData[e] !== void 0 ? !1 : !
|
|
5363
|
+
let n = Array.from(this.pending).filter((e) => this.loading.has(e) || t.featureData[e] !== void 0 ? !1 : !Cl(t.info?.features[e]));
|
|
5205
5364
|
if (n.length === 0) {
|
|
5206
5365
|
this.pending.clear();
|
|
5207
5366
|
return;
|
|
@@ -5212,7 +5371,7 @@ var vl = class {
|
|
|
5212
5371
|
let r = {}, i = [];
|
|
5213
5372
|
n.forEach((e) => {
|
|
5214
5373
|
let n = t.chartData[e];
|
|
5215
|
-
n ? r[e] =
|
|
5374
|
+
n ? r[e] = Sl(n) : i.push(e);
|
|
5216
5375
|
}), Object.keys(r).length > 0 && this.options.getSnapshot().episodeIndex === t.episodeIndex && this.options.onFeatureData(r);
|
|
5217
5376
|
try {
|
|
5218
5377
|
if (i.length > 0) {
|
|
@@ -5231,8 +5390,8 @@ var vl = class {
|
|
|
5231
5390
|
}, 0));
|
|
5232
5391
|
}
|
|
5233
5392
|
};
|
|
5234
|
-
function
|
|
5235
|
-
let o =
|
|
5393
|
+
function Tl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, featureData: i, setFeatureData: a }) {
|
|
5394
|
+
let o = V({
|
|
5236
5395
|
episodeIndex: e,
|
|
5237
5396
|
loader: t,
|
|
5238
5397
|
info: n,
|
|
@@ -5246,30 +5405,30 @@ function yl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, fea
|
|
|
5246
5405
|
chartData: r,
|
|
5247
5406
|
featureData: i
|
|
5248
5407
|
};
|
|
5249
|
-
let s =
|
|
5250
|
-
return s.current ||= new
|
|
5408
|
+
let s = V(null);
|
|
5409
|
+
return s.current ||= new wl({
|
|
5251
5410
|
getSnapshot: () => o.current,
|
|
5252
5411
|
onFeatureData: (e) => a((t) => ({
|
|
5253
5412
|
...t,
|
|
5254
5413
|
...e
|
|
5255
5414
|
})),
|
|
5256
5415
|
onError: (e, t) => console.error(e, t)
|
|
5257
|
-
}),
|
|
5416
|
+
}), z(() => {
|
|
5258
5417
|
s.current?.clearPending();
|
|
5259
|
-
}, [e]),
|
|
5260
|
-
subscribeFeature:
|
|
5261
|
-
unsubscribeFeature:
|
|
5418
|
+
}, [e]), z(() => () => s.current?.dispose(), []), {
|
|
5419
|
+
subscribeFeature: R((e) => s.current.subscribe(e), []),
|
|
5420
|
+
unsubscribeFeature: R((e) => {
|
|
5262
5421
|
s.current.unsubscribe(e);
|
|
5263
5422
|
}, []),
|
|
5264
|
-
clearPendingFeatureLoads:
|
|
5423
|
+
clearPendingFeatureLoads: R(() => {
|
|
5265
5424
|
s.current.clearPending();
|
|
5266
5425
|
}, []),
|
|
5267
|
-
getSubscribedFeatureNames:
|
|
5426
|
+
getSubscribedFeatureNames: R((e) => s.current.getSubscribedFeatureNames(e), [])
|
|
5268
5427
|
};
|
|
5269
5428
|
}
|
|
5270
5429
|
//#endregion
|
|
5271
5430
|
//#region src/react/services/PlaybackEngine.ts
|
|
5272
|
-
var
|
|
5431
|
+
var El = class {
|
|
5273
5432
|
animationFrameId = null;
|
|
5274
5433
|
timerId = null;
|
|
5275
5434
|
lastTickTime = 0;
|
|
@@ -5344,7 +5503,7 @@ var bl = class {
|
|
|
5344
5503
|
}
|
|
5345
5504
|
this.scheduleNextTick(e, n);
|
|
5346
5505
|
};
|
|
5347
|
-
},
|
|
5506
|
+
}, Dl = class {
|
|
5348
5507
|
target = null;
|
|
5349
5508
|
toggleOnce = !1;
|
|
5350
5509
|
requestSet(e) {
|
|
@@ -5360,46 +5519,46 @@ var bl = class {
|
|
|
5360
5519
|
} else this.toggleOnce && (this.toggleOnce = !1, t());
|
|
5361
5520
|
}
|
|
5362
5521
|
};
|
|
5363
|
-
function
|
|
5364
|
-
let [d, f] =
|
|
5365
|
-
|
|
5522
|
+
function Ol({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers: r, fps: i, playbackSpeed: a, playbackMode: o, episodes: s, selectedEpisodeIndex: c, deletedEpisodes: l, selectEpisodeRef: u }) {
|
|
5523
|
+
let [d, f] = H(0), [p, m] = H(!1), h = V(new Dl());
|
|
5524
|
+
z(() => {
|
|
5366
5525
|
let e = () => {
|
|
5367
5526
|
document.hidden && m(!1);
|
|
5368
5527
|
};
|
|
5369
5528
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
5370
5529
|
}, []);
|
|
5371
|
-
let g =
|
|
5530
|
+
let g = R((e) => {
|
|
5372
5531
|
e < 0 || e >= t || (n.current = e, p || f(e), r(e));
|
|
5373
5532
|
}, [
|
|
5374
5533
|
t,
|
|
5375
5534
|
n,
|
|
5376
5535
|
p,
|
|
5377
5536
|
r
|
|
5378
|
-
]), _ =
|
|
5537
|
+
]), _ = R(() => {
|
|
5379
5538
|
if (e) {
|
|
5380
5539
|
h.current.requestToggle();
|
|
5381
5540
|
return;
|
|
5382
5541
|
}
|
|
5383
5542
|
m((e) => !e);
|
|
5384
|
-
}, [e]), v =
|
|
5543
|
+
}, [e]), v = R((t) => {
|
|
5385
5544
|
if (e) {
|
|
5386
5545
|
h.current.requestSet(t);
|
|
5387
5546
|
return;
|
|
5388
5547
|
}
|
|
5389
5548
|
m(t);
|
|
5390
5549
|
}, [e]);
|
|
5391
|
-
|
|
5550
|
+
z(() => {
|
|
5392
5551
|
e || h.current.flush(m, () => m((e) => !e));
|
|
5393
5552
|
}, [e]);
|
|
5394
|
-
let y =
|
|
5553
|
+
let y = R((t) => {
|
|
5395
5554
|
e || g(n.current + t);
|
|
5396
5555
|
}, [
|
|
5397
5556
|
n,
|
|
5398
5557
|
e,
|
|
5399
5558
|
g
|
|
5400
|
-
]), b =
|
|
5401
|
-
return
|
|
5402
|
-
let e = new
|
|
5559
|
+
]), b = V(null);
|
|
5560
|
+
return z(() => {
|
|
5561
|
+
let e = new El({
|
|
5403
5562
|
getFrameIndex: () => n.current,
|
|
5404
5563
|
setFrameIndexSilent: (e) => {
|
|
5405
5564
|
n.current = e;
|
|
@@ -5430,7 +5589,7 @@ function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
|
|
|
5430
5589
|
l,
|
|
5431
5590
|
u,
|
|
5432
5591
|
r
|
|
5433
|
-
]),
|
|
5592
|
+
]), z(() => {
|
|
5434
5593
|
let r = b.current;
|
|
5435
5594
|
if (r) return p && t > 0 && !e ? r.start() : (r.stop(), !p && n.current !== d && f(n.current)), () => r.stop();
|
|
5436
5595
|
}, [
|
|
@@ -5452,7 +5611,7 @@ function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
|
|
|
5452
5611
|
}
|
|
5453
5612
|
//#endregion
|
|
5454
5613
|
//#region src/react/contexts/LeRobotProvider.tsx
|
|
5455
|
-
function
|
|
5614
|
+
function kl(e) {
|
|
5456
5615
|
let t = {};
|
|
5457
5616
|
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
5617
|
let e = r.names.flat(2).filter((e) => typeof e == "string");
|
|
@@ -5473,22 +5632,22 @@ function Cl(e) {
|
|
|
5473
5632
|
features: t
|
|
5474
5633
|
};
|
|
5475
5634
|
}
|
|
5476
|
-
var
|
|
5477
|
-
let [t, n] =
|
|
5478
|
-
let e =
|
|
5635
|
+
var Al = ({ children: e }) => {
|
|
5636
|
+
let [t, n] = H(null), r = V(null), [i, a] = H(() => {
|
|
5637
|
+
let e = sl();
|
|
5479
5638
|
return r.current = e, e;
|
|
5480
|
-
}), [o, s] =
|
|
5639
|
+
}), [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: P } = fl(), F = x || !!P.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), ce = t?.getVersionCapability() ?? null, le = ce?.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 } = xl({
|
|
5481
5640
|
episodes: c,
|
|
5482
|
-
versionCapability:
|
|
5483
|
-
}),
|
|
5484
|
-
|
|
5485
|
-
|
|
5641
|
+
versionCapability: ce
|
|
5642
|
+
}), 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);
|
|
5643
|
+
z(() => () => {
|
|
5644
|
+
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
5645
|
}, []);
|
|
5487
|
-
let ke =
|
|
5646
|
+
let ke = V(null), Ae = R((e) => (De.current.add(e), queueMicrotask(() => {
|
|
5488
5647
|
De.current.has(e) && e(Ee.current);
|
|
5489
5648
|
}), () => {
|
|
5490
5649
|
De.current.delete(e);
|
|
5491
|
-
}), []), je =
|
|
5650
|
+
}), []), je = R(() => Ee.current, []), Me = R((e) => {
|
|
5492
5651
|
De.current.forEach((t) => {
|
|
5493
5652
|
try {
|
|
5494
5653
|
t(e);
|
|
@@ -5496,29 +5655,29 @@ var wl = ({ children: e }) => {
|
|
|
5496
5655
|
console.error("Frame subscriber error:", e);
|
|
5497
5656
|
}
|
|
5498
5657
|
});
|
|
5499
|
-
}, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } =
|
|
5658
|
+
}, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } = Tl({
|
|
5500
5659
|
selectedEpisodeIndex: f,
|
|
5501
5660
|
dataLoader: t,
|
|
5502
5661
|
info: o,
|
|
5503
5662
|
chartData: g,
|
|
5504
5663
|
featureData: v,
|
|
5505
|
-
setFeatureData:
|
|
5506
|
-
}), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } =
|
|
5507
|
-
isBusy:
|
|
5664
|
+
setFeatureData: y
|
|
5665
|
+
}), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } = Ol({
|
|
5666
|
+
isBusy: F,
|
|
5508
5667
|
frameCount: m.length,
|
|
5509
5668
|
frameIndexRef: Ee,
|
|
5510
5669
|
notifyFrameSubscribers: Me,
|
|
5511
5670
|
fps: o?.fps,
|
|
5512
|
-
playbackSpeed:
|
|
5671
|
+
playbackSpeed: D,
|
|
5513
5672
|
playbackMode: T,
|
|
5514
5673
|
episodes: c,
|
|
5515
5674
|
selectedEpisodeIndex: f,
|
|
5516
|
-
deletedEpisodes:
|
|
5675
|
+
deletedEpisodes: de,
|
|
5517
5676
|
selectEpisodeRef: Oe
|
|
5518
|
-
}), Ge =
|
|
5677
|
+
}), Ge = R(async () => {
|
|
5519
5678
|
Te.current += 1;
|
|
5520
5679
|
try {
|
|
5521
|
-
|
|
5680
|
+
G.current && await G.current.dispose();
|
|
5522
5681
|
} catch (e) {
|
|
5523
5682
|
console.warn("Failed to dispose previous loader", e);
|
|
5524
5683
|
}
|
|
@@ -5527,19 +5686,19 @@ var wl = ({ children: e }) => {
|
|
|
5527
5686
|
} catch (e) {
|
|
5528
5687
|
console.warn("Failed to dispose previous image service", e);
|
|
5529
5688
|
}
|
|
5530
|
-
let e =
|
|
5531
|
-
r.current = e, a(e),
|
|
5689
|
+
let e = sl();
|
|
5690
|
+
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
5691
|
}, [
|
|
5533
5692
|
Me,
|
|
5534
5693
|
se,
|
|
5535
5694
|
Fe,
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5695
|
+
ue,
|
|
5696
|
+
L,
|
|
5697
|
+
pe,
|
|
5539
5698
|
Re,
|
|
5540
5699
|
Be
|
|
5541
|
-
]), Ke =
|
|
5542
|
-
if (Se.current === e && (
|
|
5700
|
+
]), Ke = R(async (e) => {
|
|
5701
|
+
if (Se.current === e && (G.current || we.current)) return;
|
|
5543
5702
|
if (Ce.current.has(e)) {
|
|
5544
5703
|
console.log("Skipping initialization for previously failed source");
|
|
5545
5704
|
return;
|
|
@@ -5554,13 +5713,13 @@ var wl = ({ children: e }) => {
|
|
|
5554
5713
|
});
|
|
5555
5714
|
let o = null;
|
|
5556
5715
|
try {
|
|
5557
|
-
if (
|
|
5558
|
-
|
|
5716
|
+
if (G.current && await G.current.dispose(), t !== Te.current) return;
|
|
5717
|
+
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
5718
|
let c = "getDirectoryHandle" in e ? new es(e) : e;
|
|
5560
5719
|
await r.current?.dispose();
|
|
5561
|
-
let u =
|
|
5720
|
+
let u = sl();
|
|
5562
5721
|
u.setDataSource(c), r.current = u, a(u);
|
|
5563
|
-
let { LeRobotDataLoader: f } = await import("./LeRobotDataLoader-
|
|
5722
|
+
let { LeRobotDataLoader: f } = await import("./LeRobotDataLoader-B8wZijIi.js");
|
|
5564
5723
|
o = new f(c), M({
|
|
5565
5724
|
id: i,
|
|
5566
5725
|
phase: "read",
|
|
@@ -5572,8 +5731,8 @@ var wl = ({ children: e }) => {
|
|
|
5572
5731
|
return;
|
|
5573
5732
|
}
|
|
5574
5733
|
let g = o.getEpisodes();
|
|
5575
|
-
|
|
5576
|
-
let v =
|
|
5734
|
+
G.current = o, n(o), ne(o.getValidationReport());
|
|
5735
|
+
let v = kl(m);
|
|
5577
5736
|
s(v), l(g), d(o.getTasks()), N(i), Ce.current.delete(e);
|
|
5578
5737
|
} catch (n) {
|
|
5579
5738
|
if (t !== Te.current) {
|
|
@@ -5584,7 +5743,7 @@ var wl = ({ children: e }) => {
|
|
|
5584
5743
|
let r = n instanceof Error ? n.message : "Unknown error during initialization";
|
|
5585
5744
|
w(r), oe(i, r);
|
|
5586
5745
|
let a = o?.getValidationReport?.() ?? null;
|
|
5587
|
-
a?.items?.length && (ne(a),
|
|
5746
|
+
a?.items?.length && (ne(a), ie(!0));
|
|
5588
5747
|
} finally {
|
|
5589
5748
|
t === Te.current && (we.current = !1, S(!1));
|
|
5590
5749
|
}
|
|
@@ -5593,11 +5752,11 @@ var wl = ({ children: e }) => {
|
|
|
5593
5752
|
N,
|
|
5594
5753
|
oe,
|
|
5595
5754
|
Me,
|
|
5596
|
-
|
|
5597
|
-
|
|
5755
|
+
ue,
|
|
5756
|
+
L,
|
|
5598
5757
|
Re,
|
|
5599
5758
|
Be
|
|
5600
|
-
]), qe =
|
|
5759
|
+
]), qe = R(async (e) => {
|
|
5601
5760
|
if (!t || !o) return !1;
|
|
5602
5761
|
S(!0), Be(!1), w(null);
|
|
5603
5762
|
let n = "lerobot-select-episode";
|
|
@@ -5605,13 +5764,13 @@ var wl = ({ children: e }) => {
|
|
|
5605
5764
|
id: n,
|
|
5606
5765
|
phase: "read",
|
|
5607
5766
|
message: `Loading episode ${e}...`
|
|
5608
|
-
}), p(e), Re(0), Ee.current = 0, Me(0), _({}),
|
|
5767
|
+
}), p(e), Re(0), Ee.current = 0, Me(0), _({}), y({}), ke.current = e;
|
|
5609
5768
|
try {
|
|
5610
5769
|
let n = t.getEpisodeDataPath(e)?.path ?? null;
|
|
5611
5770
|
n && !t.isFileBytesCached(n) && await t.releaseParsedCaches(), i.clearPreload();
|
|
5612
5771
|
} catch {}
|
|
5613
5772
|
try {
|
|
5614
|
-
let r =
|
|
5773
|
+
let r = el(o);
|
|
5615
5774
|
M({
|
|
5616
5775
|
id: n,
|
|
5617
5776
|
phase: "read",
|
|
@@ -5624,22 +5783,22 @@ var wl = ({ children: e }) => {
|
|
|
5624
5783
|
phase: "render",
|
|
5625
5784
|
message: "Processing charts..."
|
|
5626
5785
|
});
|
|
5627
|
-
let s =
|
|
5786
|
+
let s = tl(a, o.fps ?? 30);
|
|
5628
5787
|
h(s), ke.current === e && _(a);
|
|
5629
5788
|
let c = Ie(o);
|
|
5630
5789
|
if (c.length > 0) {
|
|
5631
5790
|
let n = {}, r = [];
|
|
5632
5791
|
c.forEach((e) => {
|
|
5633
|
-
e in a ? n[e] =
|
|
5792
|
+
e in a ? n[e] = Sl(a[e]) : r.push(e);
|
|
5634
5793
|
});
|
|
5635
5794
|
let i = r.length > 0 ? await t.loadFeatureData(e, r) : {};
|
|
5636
|
-
ke.current === e &&
|
|
5795
|
+
ke.current === e && y({
|
|
5637
5796
|
...n,
|
|
5638
5797
|
...i
|
|
5639
5798
|
});
|
|
5640
5799
|
}
|
|
5641
5800
|
if (N(n), ke.current === e) {
|
|
5642
|
-
let n =
|
|
5801
|
+
let n = j(o);
|
|
5643
5802
|
if (n.length > 0) {
|
|
5644
5803
|
let r = t.getEpisodeDataPath(e);
|
|
5645
5804
|
if (r) {
|
|
@@ -5676,25 +5835,25 @@ var wl = ({ children: e }) => {
|
|
|
5676
5835
|
Be
|
|
5677
5836
|
]);
|
|
5678
5837
|
Oe.current = qe;
|
|
5679
|
-
let Je =
|
|
5838
|
+
let Je = R(() => {
|
|
5680
5839
|
w(null), Ce.current.clear();
|
|
5681
5840
|
}, []);
|
|
5682
|
-
|
|
5683
|
-
if (f !== null &&
|
|
5684
|
-
let e = c.find((e) => !
|
|
5685
|
-
e ? qe(e.episode_index) : (p(null), h([]), _({}),
|
|
5841
|
+
z(() => {
|
|
5842
|
+
if (f !== null && de.has(f) && t && o && !x) {
|
|
5843
|
+
let e = c.find((e) => !de.has(e.episode_index));
|
|
5844
|
+
e ? qe(e.episode_index) : (p(null), h([]), _({}), y({}));
|
|
5686
5845
|
}
|
|
5687
5846
|
}, [
|
|
5688
|
-
|
|
5847
|
+
de,
|
|
5689
5848
|
f,
|
|
5690
5849
|
c,
|
|
5691
5850
|
t,
|
|
5692
5851
|
o,
|
|
5693
5852
|
x,
|
|
5694
5853
|
qe
|
|
5695
|
-
]),
|
|
5854
|
+
]), z(() => {
|
|
5696
5855
|
if (f !== null || !t || !o || x || c.length === 0) return;
|
|
5697
|
-
let e =
|
|
5856
|
+
let e = nl(c, de);
|
|
5698
5857
|
if (e === null) return;
|
|
5699
5858
|
let n = window.setTimeout(() => {
|
|
5700
5859
|
qe(e);
|
|
@@ -5706,13 +5865,13 @@ var wl = ({ children: e }) => {
|
|
|
5706
5865
|
o,
|
|
5707
5866
|
x,
|
|
5708
5867
|
c,
|
|
5709
|
-
|
|
5868
|
+
de,
|
|
5710
5869
|
qe
|
|
5711
5870
|
]);
|
|
5712
|
-
let Ye =
|
|
5871
|
+
let Ye = B(() => ({
|
|
5713
5872
|
info: o,
|
|
5714
|
-
versionCapability:
|
|
5715
|
-
isReadOnly:
|
|
5873
|
+
versionCapability: ce,
|
|
5874
|
+
isReadOnly: le,
|
|
5716
5875
|
featureData: v,
|
|
5717
5876
|
subscribeFeature: Ne,
|
|
5718
5877
|
unsubscribeFeature: Pe,
|
|
@@ -5730,8 +5889,8 @@ var wl = ({ children: e }) => {
|
|
|
5730
5889
|
isLoading: x
|
|
5731
5890
|
}), [
|
|
5732
5891
|
o,
|
|
5733
|
-
|
|
5734
|
-
|
|
5892
|
+
ce,
|
|
5893
|
+
le,
|
|
5735
5894
|
v,
|
|
5736
5895
|
Ne,
|
|
5737
5896
|
Pe,
|
|
@@ -5747,45 +5906,45 @@ var wl = ({ children: e }) => {
|
|
|
5747
5906
|
Je,
|
|
5748
5907
|
C,
|
|
5749
5908
|
x
|
|
5750
|
-
]), Xe =
|
|
5909
|
+
]), Xe = B(() => ({
|
|
5751
5910
|
selectedEpisodeIndex: f,
|
|
5752
|
-
selectedEpisodeIndices:
|
|
5753
|
-
toggleEpisodeSelection:
|
|
5754
|
-
setSelectedEpisodeIndices:
|
|
5755
|
-
selectAllInList:
|
|
5756
|
-
clearEpisodeSelection:
|
|
5757
|
-
deletedEpisodes:
|
|
5758
|
-
modifiedEpisodes:
|
|
5759
|
-
effectiveEpisodes:
|
|
5760
|
-
episodesForExport:
|
|
5761
|
-
editEpisodeTask:
|
|
5762
|
-
deleteEpisode:
|
|
5763
|
-
restoreEpisode:
|
|
5764
|
-
getEffectiveEpisode:
|
|
5911
|
+
selectedEpisodeIndices: fe,
|
|
5912
|
+
toggleEpisodeSelection: ye,
|
|
5913
|
+
setSelectedEpisodeIndices: pe,
|
|
5914
|
+
selectAllInList: be,
|
|
5915
|
+
clearEpisodeSelection: xe,
|
|
5916
|
+
deletedEpisodes: de,
|
|
5917
|
+
modifiedEpisodes: I,
|
|
5918
|
+
effectiveEpisodes: me,
|
|
5919
|
+
episodesForExport: he,
|
|
5920
|
+
editEpisodeTask: ge,
|
|
5921
|
+
deleteEpisode: W,
|
|
5922
|
+
restoreEpisode: _e,
|
|
5923
|
+
getEffectiveEpisode: ve,
|
|
5765
5924
|
selectEpisode: qe
|
|
5766
5925
|
}), [
|
|
5767
5926
|
f,
|
|
5768
|
-
de,
|
|
5769
|
-
ve,
|
|
5770
5927
|
fe,
|
|
5771
5928
|
ye,
|
|
5772
|
-
be,
|
|
5773
|
-
ue,
|
|
5774
|
-
L,
|
|
5775
5929
|
pe,
|
|
5930
|
+
be,
|
|
5931
|
+
xe,
|
|
5932
|
+
de,
|
|
5933
|
+
I,
|
|
5776
5934
|
me,
|
|
5777
5935
|
he,
|
|
5778
|
-
G,
|
|
5779
5936
|
ge,
|
|
5937
|
+
W,
|
|
5780
5938
|
_e,
|
|
5939
|
+
ve,
|
|
5781
5940
|
qe
|
|
5782
|
-
]), Ze =
|
|
5941
|
+
]), Ze = B(() => ({
|
|
5783
5942
|
currentFrames: m,
|
|
5784
5943
|
chartData: g,
|
|
5785
5944
|
currentFrameIndex: Le,
|
|
5786
5945
|
isPlaying: ze,
|
|
5787
5946
|
playbackMode: T,
|
|
5788
|
-
playbackSpeed:
|
|
5947
|
+
playbackSpeed: D,
|
|
5789
5948
|
setFrameIndex: Ve,
|
|
5790
5949
|
togglePlay: He,
|
|
5791
5950
|
setPlaying: Ue,
|
|
@@ -5798,15 +5957,15 @@ var wl = ({ children: e }) => {
|
|
|
5798
5957
|
Le,
|
|
5799
5958
|
ze,
|
|
5800
5959
|
T,
|
|
5801
|
-
|
|
5960
|
+
D,
|
|
5802
5961
|
Ve,
|
|
5803
5962
|
He,
|
|
5804
5963
|
Ue,
|
|
5805
5964
|
We
|
|
5806
|
-
]), Qe =
|
|
5965
|
+
]), Qe = B(() => ({
|
|
5807
5966
|
healthDialogOpen: k,
|
|
5808
|
-
setHealthDialogOpen:
|
|
5809
|
-
}), [k]), $e =
|
|
5967
|
+
setHealthDialogOpen: ie
|
|
5968
|
+
}), [k]), $e = B(() => ({
|
|
5810
5969
|
...Ye,
|
|
5811
5970
|
...Xe,
|
|
5812
5971
|
...Ze,
|
|
@@ -5817,15 +5976,15 @@ var wl = ({ children: e }) => {
|
|
|
5817
5976
|
Ze,
|
|
5818
5977
|
Qe
|
|
5819
5978
|
]);
|
|
5820
|
-
return /* @__PURE__ */
|
|
5979
|
+
return /* @__PURE__ */ U(A.Provider, {
|
|
5821
5980
|
value: $e,
|
|
5822
|
-
children: /* @__PURE__ */
|
|
5981
|
+
children: /* @__PURE__ */ U(ae.Provider, {
|
|
5823
5982
|
value: Ye,
|
|
5824
|
-
children: /* @__PURE__ */
|
|
5983
|
+
children: /* @__PURE__ */ U(b.Provider, {
|
|
5825
5984
|
value: Xe,
|
|
5826
|
-
children: /* @__PURE__ */
|
|
5985
|
+
children: /* @__PURE__ */ U(O.Provider, {
|
|
5827
5986
|
value: Ze,
|
|
5828
|
-
children: /* @__PURE__ */
|
|
5987
|
+
children: /* @__PURE__ */ U(re.Provider, {
|
|
5829
5988
|
value: Qe,
|
|
5830
5989
|
children: e
|
|
5831
5990
|
})
|
|
@@ -5833,9 +5992,9 @@ var wl = ({ children: e }) => {
|
|
|
5833
5992
|
})
|
|
5834
5993
|
})
|
|
5835
5994
|
});
|
|
5836
|
-
},
|
|
5837
|
-
let { resolvedTheme: e } =
|
|
5838
|
-
return /* @__PURE__ */
|
|
5995
|
+
}, jl = () => {
|
|
5996
|
+
let { resolvedTheme: e } = w();
|
|
5997
|
+
return /* @__PURE__ */ U(Lc, {
|
|
5839
5998
|
theme: e,
|
|
5840
5999
|
position: "top-center",
|
|
5841
6000
|
richColors: !0,
|
|
@@ -5844,36 +6003,36 @@ var wl = ({ children: e }) => {
|
|
|
5844
6003
|
};
|
|
5845
6004
|
//#endregion
|
|
5846
6005
|
//#region src/react/components/LeRobotStudioProvider.tsx
|
|
5847
|
-
function
|
|
5848
|
-
return /* @__PURE__ */
|
|
6006
|
+
function Ml({ theme: e, children: t, showToaster: n, portalContainer: r }) {
|
|
6007
|
+
return /* @__PURE__ */ U(ie, {
|
|
5849
6008
|
container: r,
|
|
5850
|
-
children: /* @__PURE__ */
|
|
6009
|
+
children: /* @__PURE__ */ U(ll, {
|
|
5851
6010
|
controlledTheme: e,
|
|
5852
6011
|
rootElement: r,
|
|
5853
|
-
children: /* @__PURE__ */
|
|
6012
|
+
children: /* @__PURE__ */ U(dl, { children: /* @__PURE__ */ U(Al, { children: /* @__PURE__ */ U(ml, { children: /* @__PURE__ */ W(le, {
|
|
5854
6013
|
delay: 200,
|
|
5855
|
-
children: [t, n ? /* @__PURE__ */
|
|
6014
|
+
children: [t, n ? /* @__PURE__ */ U(jl, {}) : null]
|
|
5856
6015
|
}) }) }) })
|
|
5857
6016
|
})
|
|
5858
6017
|
});
|
|
5859
6018
|
}
|
|
5860
|
-
var
|
|
5861
|
-
let [o, s] =
|
|
5862
|
-
return /* @__PURE__ */
|
|
6019
|
+
var Nl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !0, wrapRoot: a = !0 }) => {
|
|
6020
|
+
let [o, s] = H(null);
|
|
6021
|
+
return /* @__PURE__ */ U(y, {
|
|
5863
6022
|
forcedLanguage: t,
|
|
5864
|
-
children: a ? /* @__PURE__ */
|
|
6023
|
+
children: a ? /* @__PURE__ */ U("div", {
|
|
5865
6024
|
ref: s,
|
|
5866
|
-
className:
|
|
5867
|
-
children: /* @__PURE__ */
|
|
6025
|
+
className: D("lerobot-root h-full w-full relative bg-background text-foreground", n),
|
|
6026
|
+
children: /* @__PURE__ */ U(Ml, {
|
|
5868
6027
|
theme: e,
|
|
5869
6028
|
showToaster: i,
|
|
5870
6029
|
portalContainer: o,
|
|
5871
6030
|
children: r
|
|
5872
6031
|
})
|
|
5873
|
-
}) : /* @__PURE__ */
|
|
6032
|
+
}) : /* @__PURE__ */ U("div", {
|
|
5874
6033
|
ref: s,
|
|
5875
|
-
className:
|
|
5876
|
-
children: /* @__PURE__ */
|
|
6034
|
+
className: D("lerobot-root h-full w-full bg-background text-foreground", n),
|
|
6035
|
+
children: /* @__PURE__ */ U(Ml, {
|
|
5877
6036
|
theme: e,
|
|
5878
6037
|
showToaster: i,
|
|
5879
6038
|
portalContainer: o,
|
|
@@ -5881,119 +6040,119 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
5881
6040
|
})
|
|
5882
6041
|
})
|
|
5883
6042
|
});
|
|
5884
|
-
},
|
|
5885
|
-
let { t:
|
|
5886
|
-
return
|
|
6043
|
+
}, Pl = ({ open: e, onOpenChange: t, episode: n, onSave: r }) => {
|
|
6044
|
+
let { t: a } = T(), [o, s] = H("");
|
|
6045
|
+
return z(() => {
|
|
5887
6046
|
if (!n) return;
|
|
5888
6047
|
let e = n.tasks && n.tasks.length > 0 && n.tasks[0] || "";
|
|
5889
|
-
|
|
5890
|
-
}, [n]), /* @__PURE__ */
|
|
6048
|
+
s(e);
|
|
6049
|
+
}, [n]), /* @__PURE__ */ U(Js, {
|
|
5891
6050
|
open: !!(e && n),
|
|
5892
6051
|
onOpenChange: t,
|
|
5893
|
-
children: /* @__PURE__ */
|
|
6052
|
+
children: /* @__PURE__ */ W(Zs, {
|
|
5894
6053
|
className: "sm:max-w-md",
|
|
5895
|
-
children: [/* @__PURE__ */
|
|
6054
|
+
children: [/* @__PURE__ */ W(Qs, { children: [/* @__PURE__ */ U(ec, { children: a("editTask.title", "Edit Episode Task") }), /* @__PURE__ */ U(tc, {
|
|
5896
6055
|
className: "sr-only",
|
|
5897
|
-
children:
|
|
5898
|
-
})] }), n ? /* @__PURE__ */
|
|
6056
|
+
children: a("editTask.a11yDescription", "Edit the task description for the selected episode.")
|
|
6057
|
+
})] }), n ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ W("div", {
|
|
5899
6058
|
className: "space-y-4 py-2",
|
|
5900
|
-
children: [/* @__PURE__ */
|
|
6059
|
+
children: [/* @__PURE__ */ W("div", {
|
|
5901
6060
|
className: "space-y-2",
|
|
5902
|
-
children: [/* @__PURE__ */
|
|
6061
|
+
children: [/* @__PURE__ */ U("label", {
|
|
5903
6062
|
className: "text-sm font-medium text-muted-foreground",
|
|
5904
|
-
children:
|
|
5905
|
-
}), /* @__PURE__ */
|
|
6063
|
+
children: a("editTask.episodeIndex", "Episode Index")
|
|
6064
|
+
}), /* @__PURE__ */ U(p, {
|
|
5906
6065
|
value: n.episode_index,
|
|
5907
6066
|
disabled: !0,
|
|
5908
6067
|
className: "bg-muted"
|
|
5909
6068
|
})]
|
|
5910
|
-
}), /* @__PURE__ */
|
|
6069
|
+
}), /* @__PURE__ */ W("div", {
|
|
5911
6070
|
className: "space-y-2",
|
|
5912
|
-
children: [/* @__PURE__ */
|
|
6071
|
+
children: [/* @__PURE__ */ U("label", {
|
|
5913
6072
|
className: "text-sm font-medium text-muted-foreground",
|
|
5914
|
-
children:
|
|
5915
|
-
}), /* @__PURE__ */
|
|
5916
|
-
value:
|
|
5917
|
-
onChange: (e) =>
|
|
5918
|
-
placeholder:
|
|
6073
|
+
children: a("editTask.taskDescription", "Task Description")
|
|
6074
|
+
}), /* @__PURE__ */ U(Rc, {
|
|
6075
|
+
value: o,
|
|
6076
|
+
onChange: (e) => s(e.target.value),
|
|
6077
|
+
placeholder: a("editTask.taskPlaceholder", "Enter task description..."),
|
|
5919
6078
|
rows: 4,
|
|
5920
6079
|
className: "resize-none"
|
|
5921
6080
|
})]
|
|
5922
6081
|
})]
|
|
5923
|
-
}), /* @__PURE__ */
|
|
6082
|
+
}), /* @__PURE__ */ W($s, { children: [/* @__PURE__ */ U(i, {
|
|
5924
6083
|
variant: "outline",
|
|
5925
6084
|
onClick: () => t(!1),
|
|
5926
|
-
children:
|
|
5927
|
-
}), /* @__PURE__ */
|
|
6085
|
+
children: a("common.cancel", "Cancel")
|
|
6086
|
+
}), /* @__PURE__ */ U(i, {
|
|
5928
6087
|
onClick: () => {
|
|
5929
6088
|
if (n == null) return;
|
|
5930
|
-
let e =
|
|
6089
|
+
let e = o.trim();
|
|
5931
6090
|
r(n.episode_index, e || ""), t(!1);
|
|
5932
6091
|
},
|
|
5933
|
-
children:
|
|
6092
|
+
children: a("editTask.save", "Save")
|
|
5934
6093
|
})] })] }) : null]
|
|
5935
6094
|
})
|
|
5936
6095
|
});
|
|
5937
|
-
},
|
|
5938
|
-
let { t:
|
|
5939
|
-
return /* @__PURE__ */
|
|
6096
|
+
}, Fl = ({ totalCount: e, editMode: t, multiSelectMode: n, isReadOnly: r, onToggleEditMode: a, onToggleMultiSelectMode: o }) => {
|
|
6097
|
+
let { t: s } = T();
|
|
6098
|
+
return /* @__PURE__ */ W("div", {
|
|
5940
6099
|
className: "flex min-w-0 flex-wrap items-center justify-between gap-2 overflow-hidden",
|
|
5941
|
-
children: [/* @__PURE__ */
|
|
6100
|
+
children: [/* @__PURE__ */ W("h2", {
|
|
5942
6101
|
className: "flex min-w-0 items-center gap-1 text-sm text-muted-foreground overflow-hidden",
|
|
5943
|
-
children: [e != null && /* @__PURE__ */
|
|
5944
|
-
}), !r && /* @__PURE__ */
|
|
6102
|
+
children: [e != null && /* @__PURE__ */ U("span", { children: e }), /* @__PURE__ */ U("span", { children: "Episodes" })]
|
|
6103
|
+
}), !r && /* @__PURE__ */ W("div", {
|
|
5945
6104
|
className: "flex min-w-0 flex-wrap items-center gap-1 overflow-hidden",
|
|
5946
|
-
children: [/* @__PURE__ */
|
|
6105
|
+
children: [/* @__PURE__ */ U(i, {
|
|
5947
6106
|
variant: n ? "secondary" : "ghost",
|
|
5948
6107
|
size: "sm",
|
|
5949
|
-
className:
|
|
5950
|
-
onClick:
|
|
5951
|
-
title:
|
|
5952
|
-
children: n ? /* @__PURE__ */
|
|
5953
|
-
}), /* @__PURE__ */
|
|
6108
|
+
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"),
|
|
6109
|
+
onClick: o,
|
|
6110
|
+
title: s("sidebar.multiSelect", "Select"),
|
|
6111
|
+
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(Ws, { className: "h-3 w-3 shrink-0" }), s("sidebar.multiSelect", "Select")] })
|
|
6112
|
+
}), /* @__PURE__ */ U(i, {
|
|
5954
6113
|
variant: t ? "secondary" : "ghost",
|
|
5955
6114
|
size: "sm",
|
|
5956
|
-
className:
|
|
5957
|
-
onClick:
|
|
5958
|
-
title: t ?
|
|
5959
|
-
children: t ? /* @__PURE__ */
|
|
6115
|
+
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"),
|
|
6116
|
+
onClick: a,
|
|
6117
|
+
title: t ? s("sidebar.exitEditMode", "Done editing") : s("sidebar.enterEditMode", "Edit episodes"),
|
|
6118
|
+
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(zs, { className: "mr-1 h-3 w-3 shrink-0" }), s("sidebar.edit", "Edit")] })
|
|
5960
6119
|
})]
|
|
5961
6120
|
})]
|
|
5962
6121
|
});
|
|
5963
|
-
},
|
|
5964
|
-
let { t:
|
|
5965
|
-
return /* @__PURE__ */
|
|
6122
|
+
}, Il = ({ searchTerm: e, showAdvanced: t, onSearchTermChange: n, onToggleAdvanced: r }) => {
|
|
6123
|
+
let { t: a } = T();
|
|
6124
|
+
return /* @__PURE__ */ W("div", {
|
|
5966
6125
|
className: "group relative flex min-w-0 items-center gap-1 overflow-hidden",
|
|
5967
|
-
children: [/* @__PURE__ */
|
|
6126
|
+
children: [/* @__PURE__ */ W("div", {
|
|
5968
6127
|
className: "relative min-w-0 flex-1 basis-0",
|
|
5969
|
-
children: [/* @__PURE__ */
|
|
6128
|
+
children: [/* @__PURE__ */ U(m, {
|
|
5970
6129
|
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
6130
|
"aria-hidden": !0
|
|
5972
|
-
}), /* @__PURE__ */
|
|
5973
|
-
placeholder:
|
|
6131
|
+
}), /* @__PURE__ */ U(p, {
|
|
6132
|
+
placeholder: a("sidebar.searchPlaceholder"),
|
|
5974
6133
|
className: "h-9 min-w-0 w-full border-transparent bg-muted/50 pl-9 text-xs placeholder:text-muted-foreground/40",
|
|
5975
6134
|
value: e,
|
|
5976
6135
|
onChange: (e) => n(e.target.value),
|
|
5977
|
-
"aria-label":
|
|
6136
|
+
"aria-label": a("sidebar.searchPlaceholder")
|
|
5978
6137
|
})]
|
|
5979
|
-
}), /* @__PURE__ */
|
|
6138
|
+
}), /* @__PURE__ */ U(i, {
|
|
5980
6139
|
variant: t ? "secondary" : "ghost",
|
|
5981
6140
|
size: "sm",
|
|
5982
|
-
className:
|
|
6141
|
+
className: D("h-9 w-9 shrink-0 p-0", t && "text-primary"),
|
|
5983
6142
|
onClick: r,
|
|
5984
|
-
title:
|
|
5985
|
-
children: /* @__PURE__ */
|
|
6143
|
+
title: a("sidebar.advanced", "Advanced"),
|
|
6144
|
+
children: /* @__PURE__ */ U(Us, {
|
|
5986
6145
|
className: "h-3.5 w-3.5",
|
|
5987
6146
|
"aria-hidden": !0
|
|
5988
6147
|
})
|
|
5989
6148
|
})]
|
|
5990
6149
|
});
|
|
5991
|
-
},
|
|
5992
|
-
let { t: i } =
|
|
5993
|
-
return /* @__PURE__ */
|
|
6150
|
+
}, Ll = ({ durationMin: e, durationMax: t, onDurationMinChange: n, onDurationMaxChange: r }) => {
|
|
6151
|
+
let { t: i } = T();
|
|
6152
|
+
return /* @__PURE__ */ W("div", {
|
|
5994
6153
|
className: "flex min-w-0 items-center gap-2 overflow-hidden",
|
|
5995
6154
|
children: [
|
|
5996
|
-
/* @__PURE__ */
|
|
6155
|
+
/* @__PURE__ */ U(p, {
|
|
5997
6156
|
type: "number",
|
|
5998
6157
|
placeholder: i("sidebar.filterByDuration"),
|
|
5999
6158
|
className: "h-8 min-w-0 flex-1 basis-0 border border-border bg-muted/50 px-2 text-xs",
|
|
@@ -6004,11 +6163,11 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6004
6163
|
step: .1,
|
|
6005
6164
|
"aria-label": i("sidebar.filterByDuration")
|
|
6006
6165
|
}),
|
|
6007
|
-
/* @__PURE__ */
|
|
6166
|
+
/* @__PURE__ */ U("span", {
|
|
6008
6167
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
6009
6168
|
children: "-"
|
|
6010
6169
|
}),
|
|
6011
|
-
/* @__PURE__ */
|
|
6170
|
+
/* @__PURE__ */ U(p, {
|
|
6012
6171
|
type: "number",
|
|
6013
6172
|
className: "h-8 min-w-0 flex-1 basis-0 border border-border bg-muted/50 px-2 text-xs",
|
|
6014
6173
|
value: t,
|
|
@@ -6019,159 +6178,159 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6019
6178
|
})
|
|
6020
6179
|
]
|
|
6021
6180
|
});
|
|
6022
|
-
},
|
|
6023
|
-
let { t:
|
|
6024
|
-
return /* @__PURE__ */
|
|
6181
|
+
}, Rl = ({ selectedCount: e, selectedDeletedCount: n, selectedNonDeletedCount: r, onSelectAll: a, onClearSelection: o, onBulkEdit: s, onBulkDelete: c, onBulkRestore: l }) => {
|
|
6182
|
+
let { t: u } = T();
|
|
6183
|
+
return /* @__PURE__ */ W("div", {
|
|
6025
6184
|
className: "flex min-w-0 flex-wrap items-center gap-1 overflow-hidden",
|
|
6026
6185
|
children: [
|
|
6027
|
-
/* @__PURE__ */
|
|
6028
|
-
render: /* @__PURE__ */
|
|
6186
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6187
|
+
render: /* @__PURE__ */ U(i, {
|
|
6029
6188
|
variant: "ghost",
|
|
6030
6189
|
size: "icon",
|
|
6031
6190
|
className: "h-8 w-8 shrink-0",
|
|
6032
|
-
onClick:
|
|
6191
|
+
onClick: a
|
|
6033
6192
|
}),
|
|
6034
|
-
children: /* @__PURE__ */
|
|
6035
|
-
}), /* @__PURE__ */
|
|
6193
|
+
children: /* @__PURE__ */ U(Ms, { className: "h-3.5 w-3.5" })
|
|
6194
|
+
}), /* @__PURE__ */ U(P, {
|
|
6036
6195
|
side: "bottom",
|
|
6037
|
-
children:
|
|
6196
|
+
children: u("sidebar.selectAll")
|
|
6038
6197
|
})] }),
|
|
6039
|
-
/* @__PURE__ */
|
|
6040
|
-
render: /* @__PURE__ */
|
|
6198
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6199
|
+
render: /* @__PURE__ */ U(i, {
|
|
6041
6200
|
variant: "ghost",
|
|
6042
6201
|
size: "icon",
|
|
6043
6202
|
className: "h-8 w-8 shrink-0",
|
|
6044
|
-
onClick:
|
|
6203
|
+
onClick: o
|
|
6045
6204
|
}),
|
|
6046
|
-
children: /* @__PURE__ */
|
|
6047
|
-
}), /* @__PURE__ */
|
|
6205
|
+
children: /* @__PURE__ */ U(t, { className: "h-3.5 w-3.5" })
|
|
6206
|
+
}), /* @__PURE__ */ U(P, {
|
|
6048
6207
|
side: "bottom",
|
|
6049
|
-
children:
|
|
6208
|
+
children: u("sidebar.clearSelection")
|
|
6050
6209
|
})] }),
|
|
6051
|
-
/* @__PURE__ */
|
|
6052
|
-
render: /* @__PURE__ */
|
|
6210
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6211
|
+
render: /* @__PURE__ */ U(i, {
|
|
6053
6212
|
disabled: e === 0,
|
|
6054
6213
|
variant: "ghost",
|
|
6055
6214
|
size: "icon",
|
|
6056
6215
|
className: "h-8 w-8 shrink-0",
|
|
6057
|
-
onClick:
|
|
6216
|
+
onClick: s
|
|
6058
6217
|
}),
|
|
6059
|
-
children: /* @__PURE__ */
|
|
6060
|
-
}), /* @__PURE__ */
|
|
6218
|
+
children: /* @__PURE__ */ U(zs, { className: "h-3.5 w-3.5" })
|
|
6219
|
+
}), /* @__PURE__ */ U(P, {
|
|
6061
6220
|
side: "bottom",
|
|
6062
|
-
children:
|
|
6221
|
+
children: u("sidebar.bulkEdit")
|
|
6063
6222
|
})] }),
|
|
6064
|
-
|
|
6065
|
-
render: /* @__PURE__ */
|
|
6223
|
+
r > 0 && /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6224
|
+
render: /* @__PURE__ */ U(i, {
|
|
6066
6225
|
variant: "ghost",
|
|
6067
6226
|
size: "icon",
|
|
6068
6227
|
className: "h-8 w-8 shrink-0 text-destructive hover:text-destructive",
|
|
6069
|
-
onClick:
|
|
6228
|
+
onClick: c
|
|
6070
6229
|
}),
|
|
6071
|
-
children: /* @__PURE__ */
|
|
6072
|
-
}), /* @__PURE__ */
|
|
6230
|
+
children: /* @__PURE__ */ U(Ks, { className: "h-3.5 w-3.5" })
|
|
6231
|
+
}), /* @__PURE__ */ U(P, {
|
|
6073
6232
|
side: "bottom",
|
|
6074
|
-
children:
|
|
6233
|
+
children: u("sidebar.bulkDelete")
|
|
6075
6234
|
})] }),
|
|
6076
|
-
|
|
6077
|
-
render: /* @__PURE__ */
|
|
6235
|
+
n > 0 && /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6236
|
+
render: /* @__PURE__ */ U(i, {
|
|
6078
6237
|
disabled: e === 0,
|
|
6079
6238
|
variant: "ghost",
|
|
6080
6239
|
size: "icon",
|
|
6081
6240
|
className: "h-8 w-8 shrink-0",
|
|
6082
|
-
onClick:
|
|
6241
|
+
onClick: l
|
|
6083
6242
|
}),
|
|
6084
|
-
children: /* @__PURE__ */
|
|
6085
|
-
}), /* @__PURE__ */
|
|
6243
|
+
children: /* @__PURE__ */ U(qs, { className: "h-3.5 w-3.5" })
|
|
6244
|
+
}), /* @__PURE__ */ U(P, {
|
|
6086
6245
|
side: "bottom",
|
|
6087
|
-
children:
|
|
6246
|
+
children: u("sidebar.bulkRestore")
|
|
6088
6247
|
})] }),
|
|
6089
|
-
e > 0 && /* @__PURE__ */
|
|
6248
|
+
e > 0 && /* @__PURE__ */ U("span", {
|
|
6090
6249
|
className: "ml-auto min-w-0 flex-1 truncate text-right text-xs text-muted-foreground",
|
|
6091
|
-
children:
|
|
6250
|
+
children: u("sidebar.selectedCount", { count: e })
|
|
6092
6251
|
})
|
|
6093
6252
|
]
|
|
6094
6253
|
});
|
|
6095
|
-
},
|
|
6096
|
-
let { t: h } =
|
|
6097
|
-
return /* @__PURE__ */
|
|
6098
|
-
className:
|
|
6099
|
-
children: [/* @__PURE__ */
|
|
6254
|
+
}, zl = ({ 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 }) => {
|
|
6255
|
+
let { t: h } = T(), g = !r && !s, _ = !r && a, v = !r && !a && o;
|
|
6256
|
+
return /* @__PURE__ */ W("div", {
|
|
6257
|
+
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"),
|
|
6258
|
+
children: [/* @__PURE__ */ W("div", {
|
|
6100
6259
|
role: "button",
|
|
6101
6260
|
tabIndex: g ? 0 : -1,
|
|
6102
|
-
className:
|
|
6103
|
-
onClick: () => g &&
|
|
6261
|
+
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"),
|
|
6262
|
+
onClick: () => g && u(),
|
|
6104
6263
|
onKeyDown: (e) => {
|
|
6105
|
-
g &&
|
|
6264
|
+
g && il(e.key) && (e.preventDefault(), u());
|
|
6106
6265
|
},
|
|
6107
6266
|
"aria-label": h("sidebar.selectEpisode", { index: e.episode_index }),
|
|
6108
6267
|
"aria-current": _ ? "true" : void 0,
|
|
6109
6268
|
"aria-disabled": !g,
|
|
6110
6269
|
title: h("sidebar.selectEpisode", { index: e.episode_index }),
|
|
6111
6270
|
children: [
|
|
6112
|
-
|
|
6271
|
+
c && /* @__PURE__ */ U("span", {
|
|
6113
6272
|
className: "mt-0.5 shrink-0",
|
|
6114
6273
|
onClick: (e) => e.stopPropagation(),
|
|
6115
|
-
children: /* @__PURE__ */
|
|
6274
|
+
children: /* @__PURE__ */ U("button", {
|
|
6116
6275
|
type: "button",
|
|
6117
6276
|
className: "rounded border-0 bg-transparent p-0.5 hover:bg-muted/50",
|
|
6118
|
-
onClick:
|
|
6119
|
-
"aria-label":
|
|
6120
|
-
title:
|
|
6121
|
-
children:
|
|
6277
|
+
onClick: d,
|
|
6278
|
+
"aria-label": o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
|
|
6279
|
+
title: o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
|
|
6280
|
+
children: o ? /* @__PURE__ */ U(Ws, { className: "h-4 w-4 text-primary" }) : /* @__PURE__ */ U(Gs, { className: "h-4 w-4 text-muted-foreground" })
|
|
6122
6281
|
})
|
|
6123
6282
|
}),
|
|
6124
|
-
_ && /* @__PURE__ */
|
|
6125
|
-
/* @__PURE__ */
|
|
6283
|
+
_ && /* @__PURE__ */ U("div", { className: "absolute bottom-2 left-0 top-2 w-1 rounded-r-full bg-primary" }),
|
|
6284
|
+
/* @__PURE__ */ W("div", {
|
|
6126
6285
|
className: "flex min-w-0 flex-1 flex-col overflow-hidden",
|
|
6127
|
-
children: [/* @__PURE__ */
|
|
6286
|
+
children: [/* @__PURE__ */ W("div", {
|
|
6128
6287
|
className: "mb-1 flex min-w-0 items-center justify-between gap-2 overflow-hidden",
|
|
6129
|
-
children: [/* @__PURE__ */
|
|
6288
|
+
children: [/* @__PURE__ */ W(As, {
|
|
6130
6289
|
variant: _ ? "default" : "outline",
|
|
6131
|
-
className:
|
|
6290
|
+
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
6291
|
children: ["# ", e.episode_index]
|
|
6133
|
-
}), /* @__PURE__ */
|
|
6134
|
-
className:
|
|
6292
|
+
}), /* @__PURE__ */ U("span", {
|
|
6293
|
+
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
6294
|
title: n,
|
|
6136
6295
|
children: n
|
|
6137
6296
|
})]
|
|
6138
|
-
}), /* @__PURE__ */
|
|
6139
|
-
className:
|
|
6297
|
+
}), /* @__PURE__ */ U("span", {
|
|
6298
|
+
className: D("block truncate text-xs font-normal leading-snug transition-colors", _ ? "font-medium text-foreground" : v ? "text-foreground" : "text-muted-foreground"),
|
|
6140
6299
|
title: t,
|
|
6141
6300
|
children: t
|
|
6142
6301
|
})]
|
|
6143
6302
|
})
|
|
6144
6303
|
]
|
|
6145
|
-
}),
|
|
6304
|
+
}), l && !c && /* @__PURE__ */ U("div", {
|
|
6146
6305
|
className: "mx-2 mt-1 flex shrink-0 items-center gap-0.5",
|
|
6147
6306
|
onClick: (e) => e.stopPropagation(),
|
|
6148
|
-
children: r ? /* @__PURE__ */
|
|
6307
|
+
children: r ? /* @__PURE__ */ U(i, {
|
|
6149
6308
|
size: "sm",
|
|
6150
6309
|
variant: "ghost",
|
|
6151
6310
|
className: "h-8 px-2 text-muted-foreground hover:text-foreground",
|
|
6152
6311
|
onClick: m,
|
|
6153
6312
|
title: h("sidebar.restoreEpisode", "Restore episode"),
|
|
6154
|
-
children: /* @__PURE__ */
|
|
6155
|
-
}) : /* @__PURE__ */
|
|
6313
|
+
children: /* @__PURE__ */ U(qs, { className: "h-3.5 w-3.5" })
|
|
6314
|
+
}) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(i, {
|
|
6156
6315
|
size: "sm",
|
|
6157
6316
|
variant: "ghost",
|
|
6158
6317
|
className: "h-8 px-2 text-muted-foreground hover:text-foreground",
|
|
6159
|
-
onClick:
|
|
6318
|
+
onClick: f,
|
|
6160
6319
|
title: h("sidebar.editTask", "Edit task"),
|
|
6161
|
-
children: /* @__PURE__ */
|
|
6162
|
-
}), /* @__PURE__ */
|
|
6320
|
+
children: /* @__PURE__ */ U(zs, { className: "h-3.5 w-3.5" })
|
|
6321
|
+
}), /* @__PURE__ */ U(i, {
|
|
6163
6322
|
size: "sm",
|
|
6164
6323
|
variant: "ghost",
|
|
6165
6324
|
className: "h-8 px-2 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",
|
|
6166
6325
|
onClick: p,
|
|
6167
6326
|
title: h("sidebar.deleteEpisode", "Delete episode"),
|
|
6168
|
-
children: /* @__PURE__ */
|
|
6327
|
+
children: /* @__PURE__ */ U(Ks, { className: "h-3.5 w-3.5" })
|
|
6169
6328
|
})] })
|
|
6170
6329
|
})]
|
|
6171
6330
|
});
|
|
6172
6331
|
};
|
|
6173
|
-
function
|
|
6174
|
-
return /* @__PURE__ */
|
|
6332
|
+
function Bl({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick: i, onToggleSelection: a, onEdit: o, onDelete: s, onRestore: c }) {
|
|
6333
|
+
return /* @__PURE__ */ U(zl, {
|
|
6175
6334
|
episode: e.episode,
|
|
6176
6335
|
taskDescription: e.taskDescription,
|
|
6177
6336
|
formattedDuration: e.formattedDuration,
|
|
@@ -6188,23 +6347,23 @@ function Pl({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick
|
|
|
6188
6347
|
onRestore: (t) => c(e.episode.episode_index, t)
|
|
6189
6348
|
});
|
|
6190
6349
|
}
|
|
6191
|
-
function
|
|
6350
|
+
function Vl({ ariaAttributes: e, index: t, style: n, filteredEpisodes: r, ...i }) {
|
|
6192
6351
|
let a = r[t];
|
|
6193
|
-
return /* @__PURE__ */
|
|
6352
|
+
return /* @__PURE__ */ U("div", {
|
|
6194
6353
|
...e,
|
|
6195
6354
|
style: n,
|
|
6196
6355
|
className: "overflow-hidden",
|
|
6197
|
-
children: /* @__PURE__ */
|
|
6356
|
+
children: /* @__PURE__ */ U(Bl, {
|
|
6198
6357
|
item: a,
|
|
6199
6358
|
...i
|
|
6200
6359
|
})
|
|
6201
6360
|
});
|
|
6202
6361
|
}
|
|
6203
|
-
function
|
|
6362
|
+
function Hl(e, t) {
|
|
6204
6363
|
return t.filteredEpisodes[e].episode.episode_index;
|
|
6205
6364
|
}
|
|
6206
|
-
var
|
|
6207
|
-
let { t: d } =
|
|
6365
|
+
var Ul = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelectMode: i, editMode: a, onRowClick: o, onToggleSelection: s, onEdit: c, onDelete: l, onRestore: u }) => {
|
|
6366
|
+
let { t: d } = T(), f = B(() => ({
|
|
6208
6367
|
filteredEpisodes: n,
|
|
6209
6368
|
isLoading: r,
|
|
6210
6369
|
multiSelectMode: i,
|
|
@@ -6224,52 +6383,63 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6224
6383
|
c,
|
|
6225
6384
|
l,
|
|
6226
6385
|
u
|
|
6227
|
-
])
|
|
6228
|
-
|
|
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",
|
|
6386
|
+
]), p = e ? /* @__PURE__ */ U("div", {
|
|
6387
|
+
className: "shrink-0 border-b border-destructive/20 bg-destructive/5 px-3 py-2",
|
|
6259
6388
|
children: /* @__PURE__ */ W("div", {
|
|
6260
|
-
className: "
|
|
6261
|
-
children:
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6389
|
+
className: "flex items-start gap-2",
|
|
6390
|
+
children: [/* @__PURE__ */ U(Ps, { className: "mt-0.5 h-4 w-4 shrink-0 text-destructive/70" }), /* @__PURE__ */ W("div", {
|
|
6391
|
+
className: "min-w-0 space-y-0.5",
|
|
6392
|
+
children: [/* @__PURE__ */ U("p", {
|
|
6393
|
+
className: "text-sm font-medium text-destructive",
|
|
6394
|
+
children: d("sidebar.errorLoading")
|
|
6395
|
+
}), /* @__PURE__ */ U("p", {
|
|
6396
|
+
className: "max-w-full break-words text-xs text-muted-foreground",
|
|
6397
|
+
children: e
|
|
6398
|
+
})]
|
|
6399
|
+
})]
|
|
6265
6400
|
})
|
|
6401
|
+
}) : null;
|
|
6402
|
+
return n.length === 0 ? /* @__PURE__ */ W("div", {
|
|
6403
|
+
className: "flex h-full min-h-0 flex-col",
|
|
6404
|
+
children: [p, /* @__PURE__ */ U("div", {
|
|
6405
|
+
className: "flex flex-1 items-center justify-center p-4 text-center text-muted-foreground",
|
|
6406
|
+
children: t && t.length === 0 ? d("sidebar.emptyNoDataset") : d("sidebar.emptyNoMatch")
|
|
6407
|
+
})]
|
|
6408
|
+
}) : n.length >= 100 ? /* @__PURE__ */ W("div", {
|
|
6409
|
+
className: "flex h-full min-h-0 flex-col",
|
|
6410
|
+
children: [p, /* @__PURE__ */ U(oe, {
|
|
6411
|
+
rowCount: n.length,
|
|
6412
|
+
rowHeight: a && !i ? 102 : 61,
|
|
6413
|
+
rowComponent: Vl,
|
|
6414
|
+
rowProps: f,
|
|
6415
|
+
rowKey: Hl,
|
|
6416
|
+
overscanCount: 4,
|
|
6417
|
+
className: "flex-1 min-h-0 w-full min-w-0 overflow-x-hidden",
|
|
6418
|
+
style: {
|
|
6419
|
+
height: "100%",
|
|
6420
|
+
width: "100%"
|
|
6421
|
+
},
|
|
6422
|
+
"aria-label": d("sidebar.episodesTitle")
|
|
6423
|
+
})]
|
|
6424
|
+
}) : /* @__PURE__ */ W("div", {
|
|
6425
|
+
className: "flex h-full min-h-0 flex-col",
|
|
6426
|
+
children: [p, /* @__PURE__ */ U(ce, {
|
|
6427
|
+
className: "flex-1 min-h-0 w-full min-w-0",
|
|
6428
|
+
children: /* @__PURE__ */ U("div", {
|
|
6429
|
+
className: "w-full min-w-0 overflow-x-hidden",
|
|
6430
|
+
children: n.map((e) => /* @__PURE__ */ U(Bl, {
|
|
6431
|
+
item: e,
|
|
6432
|
+
...f
|
|
6433
|
+
}, e.episode.episode_index))
|
|
6434
|
+
})
|
|
6435
|
+
})]
|
|
6266
6436
|
});
|
|
6267
|
-
},
|
|
6268
|
-
let { t: e } =
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
}, [
|
|
6272
|
-
let
|
|
6437
|
+
}, Wl = () => {
|
|
6438
|
+
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, P] = H(""), F = c || !!(o && s?.status !== "supported");
|
|
6439
|
+
z(() => {
|
|
6440
|
+
F && (C(!1), E(!1), A(!1), oe(!1), m());
|
|
6441
|
+
}, [F, m]);
|
|
6442
|
+
let ce = B(() => {
|
|
6273
6443
|
if (!t) return [];
|
|
6274
6444
|
let e = t;
|
|
6275
6445
|
if (b.trim()) {
|
|
@@ -6279,150 +6449,150 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6279
6449
|
return String(e.episode_index).includes(t) || a.toLowerCase().includes(t) || Array.isArray(r.tasks) && r.tasks.some((e) => e.toLowerCase().includes(t));
|
|
6280
6450
|
});
|
|
6281
6451
|
}
|
|
6282
|
-
let r =
|
|
6283
|
-
return i != null && !Number.isNaN(i) && (e = e.filter((e) => (e.length ?? 0) / r >= i)),
|
|
6452
|
+
let r = o?.fps ?? 30, i = D === "" ? void 0 : parseFloat(D), a = ee === "" ? void 0 : parseFloat(ee);
|
|
6453
|
+
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
6454
|
}, [
|
|
6285
6455
|
t,
|
|
6286
6456
|
n,
|
|
6287
6457
|
b,
|
|
6288
6458
|
D,
|
|
6289
6459
|
ee,
|
|
6290
|
-
|
|
6460
|
+
o?.fps,
|
|
6291
6461
|
g
|
|
6292
|
-
]),
|
|
6293
|
-
e.stopPropagation(), !
|
|
6294
|
-
},
|
|
6295
|
-
e.stopPropagation(), !
|
|
6296
|
-
},
|
|
6297
|
-
e.stopPropagation(), !
|
|
6298
|
-
},
|
|
6299
|
-
h.has(e.episode_index) || (w ?
|
|
6300
|
-
},
|
|
6301
|
-
if (
|
|
6462
|
+
]), le = (e, t) => {
|
|
6463
|
+
e.stopPropagation(), !F && (j(g(t)), A(!0));
|
|
6464
|
+
}, I = (e, t) => {
|
|
6465
|
+
e.stopPropagation(), !F && v(t);
|
|
6466
|
+
}, ue = (e, t) => {
|
|
6467
|
+
e.stopPropagation(), !F && y(t);
|
|
6468
|
+
}, de = (e) => {
|
|
6469
|
+
h.has(e.episode_index) || (w ? f(e.episode_index) : l(e.episode_index));
|
|
6470
|
+
}, L = B(() => ce.filter((e) => d.has(e.episode_index)), [ce, 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 = () => {
|
|
6471
|
+
if (F) return;
|
|
6302
6472
|
let e = se.trim();
|
|
6303
|
-
|
|
6304
|
-
},
|
|
6305
|
-
let t =
|
|
6306
|
-
return
|
|
6473
|
+
L.forEach((t) => _(t.episode_index, e || "")), oe(!1), P("");
|
|
6474
|
+
}, R = B(() => {
|
|
6475
|
+
let t = o?.fps || 30;
|
|
6476
|
+
return ce.map((r) => {
|
|
6307
6477
|
let i = g(r), a = (r.length || 0) / t, o = Math.floor(a / 60), s = Math.floor(a % 60);
|
|
6308
6478
|
return {
|
|
6309
6479
|
episode: r,
|
|
6310
6480
|
taskDescription: (i.tasks && i.tasks.length > 0 ? String(i.tasks[0]) : n[i.task_index || 0]) || e("sidebar.noDescription"),
|
|
6311
6481
|
formattedDuration: `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`,
|
|
6312
6482
|
isDeleted: h.has(r.episode_index),
|
|
6313
|
-
isSelected:
|
|
6314
|
-
isChecked:
|
|
6483
|
+
isSelected: u === r.episode_index,
|
|
6484
|
+
isChecked: d.has(r.episode_index)
|
|
6315
6485
|
};
|
|
6316
6486
|
});
|
|
6317
6487
|
}, [
|
|
6318
|
-
|
|
6488
|
+
ce,
|
|
6319
6489
|
g,
|
|
6320
|
-
|
|
6490
|
+
o?.fps,
|
|
6321
6491
|
n,
|
|
6322
6492
|
e,
|
|
6323
6493
|
h,
|
|
6324
|
-
|
|
6325
|
-
|
|
6494
|
+
u,
|
|
6495
|
+
d
|
|
6326
6496
|
]);
|
|
6327
|
-
return /* @__PURE__ */
|
|
6497
|
+
return /* @__PURE__ */ W("div", {
|
|
6328
6498
|
className: "flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden bg-background",
|
|
6329
6499
|
children: [
|
|
6330
|
-
/* @__PURE__ */
|
|
6500
|
+
/* @__PURE__ */ W("div", {
|
|
6331
6501
|
className: "shrink-0 space-y-3 border-b px-3 pt-0 pb-2 min-w-0 overflow-x-hidden",
|
|
6332
6502
|
children: [
|
|
6333
|
-
/* @__PURE__ */
|
|
6503
|
+
/* @__PURE__ */ U(Fl, {
|
|
6334
6504
|
totalCount: t?.length,
|
|
6335
6505
|
editMode: S,
|
|
6336
6506
|
multiSelectMode: w,
|
|
6337
|
-
isReadOnly:
|
|
6507
|
+
isReadOnly: F,
|
|
6338
6508
|
onToggleEditMode: () => C((e) => !e),
|
|
6339
6509
|
onToggleMultiSelectMode: () => {
|
|
6340
|
-
|
|
6510
|
+
E((e) => !e), w && m();
|
|
6341
6511
|
}
|
|
6342
6512
|
}),
|
|
6343
|
-
|
|
6513
|
+
F && s && /* @__PURE__ */ U("p", {
|
|
6344
6514
|
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:
|
|
6515
|
+
children: e("sidebar.readOnlyVersion", { version: s.normalizedVersion ?? o?.codebase_version ?? "unknown" })
|
|
6346
6516
|
}),
|
|
6347
|
-
/* @__PURE__ */
|
|
6517
|
+
/* @__PURE__ */ U(Il, {
|
|
6348
6518
|
searchTerm: b,
|
|
6349
6519
|
showAdvanced: ie,
|
|
6350
6520
|
onSearchTermChange: x,
|
|
6351
6521
|
onToggleAdvanced: () => M((e) => !e)
|
|
6352
6522
|
}),
|
|
6353
|
-
ie && /* @__PURE__ */
|
|
6523
|
+
ie && /* @__PURE__ */ U(Ll, {
|
|
6354
6524
|
durationMin: D,
|
|
6355
6525
|
durationMax: ee,
|
|
6356
6526
|
onDurationMinChange: O,
|
|
6357
|
-
onDurationMaxChange:
|
|
6527
|
+
onDurationMaxChange: te
|
|
6358
6528
|
}),
|
|
6359
|
-
!
|
|
6360
|
-
selectedCount:
|
|
6361
|
-
selectedDeletedCount:
|
|
6362
|
-
selectedNonDeletedCount:
|
|
6363
|
-
onSelectAll: () => p(
|
|
6529
|
+
!F && w && /* @__PURE__ */ U(Rl, {
|
|
6530
|
+
selectedCount: d.size,
|
|
6531
|
+
selectedDeletedCount: fe.length,
|
|
6532
|
+
selectedNonDeletedCount: pe.length,
|
|
6533
|
+
onSelectAll: () => p(ce.map((e) => e.episode_index)),
|
|
6364
6534
|
onClearSelection: m,
|
|
6365
6535
|
onBulkEdit: () => oe(!0),
|
|
6366
|
-
onBulkDelete: () =>
|
|
6367
|
-
onBulkRestore: () =>
|
|
6536
|
+
onBulkDelete: () => pe.forEach((e) => v(e.episode_index)),
|
|
6537
|
+
onBulkRestore: () => fe.forEach((e) => y(e.episode_index))
|
|
6368
6538
|
})
|
|
6369
6539
|
]
|
|
6370
6540
|
}),
|
|
6371
|
-
/* @__PURE__ */
|
|
6541
|
+
/* @__PURE__ */ U("div", {
|
|
6372
6542
|
className: "flex flex-1 min-h-0 min-w-0 flex-col overflow-hidden",
|
|
6373
|
-
children: /* @__PURE__ */
|
|
6374
|
-
error:
|
|
6543
|
+
children: /* @__PURE__ */ U(Ul, {
|
|
6544
|
+
error: a,
|
|
6375
6545
|
episodes: t,
|
|
6376
|
-
filteredEpisodes:
|
|
6546
|
+
filteredEpisodes: R,
|
|
6377
6547
|
isLoading: r,
|
|
6378
|
-
multiSelectMode: !
|
|
6379
|
-
editMode: !
|
|
6380
|
-
onRowClick:
|
|
6548
|
+
multiSelectMode: !F && w,
|
|
6549
|
+
editMode: !F && S,
|
|
6550
|
+
onRowClick: de,
|
|
6381
6551
|
onToggleSelection: (e, t) => {
|
|
6382
|
-
t.preventDefault(), t.stopPropagation(),
|
|
6552
|
+
t.preventDefault(), t.stopPropagation(), f(e.episode_index);
|
|
6383
6553
|
},
|
|
6384
|
-
onEdit: (e, t) =>
|
|
6385
|
-
onDelete: (e, t) =>
|
|
6386
|
-
onRestore: (e, t) =>
|
|
6554
|
+
onEdit: (e, t) => le(t, e),
|
|
6555
|
+
onDelete: (e, t) => I(t, e),
|
|
6556
|
+
onRestore: (e, t) => ue(t, e)
|
|
6387
6557
|
})
|
|
6388
6558
|
}),
|
|
6389
|
-
!
|
|
6559
|
+
!F && /* @__PURE__ */ U(Pl, {
|
|
6390
6560
|
open: k,
|
|
6391
6561
|
onOpenChange: A,
|
|
6392
6562
|
episode: re,
|
|
6393
6563
|
onSave: _
|
|
6394
6564
|
}, re?.episode_index ?? "edit-dialog"),
|
|
6395
|
-
!
|
|
6565
|
+
!F && /* @__PURE__ */ U(Js, {
|
|
6396
6566
|
open: ae,
|
|
6397
6567
|
onOpenChange: oe,
|
|
6398
|
-
children: /* @__PURE__ */
|
|
6568
|
+
children: /* @__PURE__ */ W(Zs, {
|
|
6399
6569
|
className: "sm:max-w-md",
|
|
6400
6570
|
children: [
|
|
6401
|
-
/* @__PURE__ */
|
|
6402
|
-
/* @__PURE__ */
|
|
6571
|
+
/* @__PURE__ */ U(Qs, { children: /* @__PURE__ */ U(ec, { children: e("sidebar.bulkEdit", "Edit task") }) }),
|
|
6572
|
+
/* @__PURE__ */ W("div", {
|
|
6403
6573
|
className: "py-2",
|
|
6404
|
-
children: [/* @__PURE__ */
|
|
6574
|
+
children: [/* @__PURE__ */ W("p", {
|
|
6405
6575
|
className: "mb-2 text-xs text-muted-foreground",
|
|
6406
6576
|
children: [
|
|
6407
|
-
e("sidebar.selectedCount", { count:
|
|
6577
|
+
e("sidebar.selectedCount", { count: L.length }),
|
|
6408
6578
|
" -",
|
|
6409
6579
|
" ",
|
|
6410
6580
|
e("editTask.taskDescription")
|
|
6411
6581
|
]
|
|
6412
|
-
}), /* @__PURE__ */
|
|
6582
|
+
}), /* @__PURE__ */ U(Rc, {
|
|
6413
6583
|
value: se,
|
|
6414
|
-
onChange: (e) =>
|
|
6584
|
+
onChange: (e) => P(e.target.value),
|
|
6415
6585
|
placeholder: e("editTask.taskPlaceholder", "Enter task description..."),
|
|
6416
6586
|
rows: 3,
|
|
6417
6587
|
className: "resize-none"
|
|
6418
6588
|
})]
|
|
6419
6589
|
}),
|
|
6420
|
-
/* @__PURE__ */
|
|
6590
|
+
/* @__PURE__ */ W($s, { children: [/* @__PURE__ */ U(i, {
|
|
6421
6591
|
variant: "outline",
|
|
6422
6592
|
onClick: () => oe(!1),
|
|
6423
6593
|
children: e("common.cancel", "Cancel")
|
|
6424
|
-
}), /* @__PURE__ */
|
|
6425
|
-
onClick:
|
|
6594
|
+
}), /* @__PURE__ */ U(i, {
|
|
6595
|
+
onClick: me,
|
|
6426
6596
|
children: e("editTask.save", "Save")
|
|
6427
6597
|
})] })
|
|
6428
6598
|
]
|
|
@@ -6430,20 +6600,20 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6430
6600
|
})
|
|
6431
6601
|
]
|
|
6432
6602
|
});
|
|
6433
|
-
},
|
|
6434
|
-
let t =
|
|
6435
|
-
|
|
6603
|
+
}, Gl = (e = !0) => {
|
|
6604
|
+
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);
|
|
6605
|
+
z(() => {
|
|
6436
6606
|
u.current = e;
|
|
6437
|
-
}, [e]),
|
|
6607
|
+
}, [e]), z(() => {
|
|
6438
6608
|
d.current = n;
|
|
6439
|
-
}, [n]),
|
|
6609
|
+
}, [n]), z(() => {
|
|
6440
6610
|
f.current = a;
|
|
6441
|
-
}, [a]),
|
|
6611
|
+
}, [a]), z(() => {
|
|
6442
6612
|
p.current = l;
|
|
6443
|
-
}, [l]),
|
|
6613
|
+
}, [l]), z(() => {
|
|
6444
6614
|
m.current = i;
|
|
6445
6615
|
}, [i]);
|
|
6446
|
-
let h =
|
|
6616
|
+
let h = R((e) => {
|
|
6447
6617
|
if (!u.current || m.current) return;
|
|
6448
6618
|
let n = e.target;
|
|
6449
6619
|
if (!t?.contains(n)) return;
|
|
@@ -6518,46 +6688,46 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6518
6688
|
r,
|
|
6519
6689
|
t
|
|
6520
6690
|
]);
|
|
6521
|
-
|
|
6691
|
+
z(() => {
|
|
6522
6692
|
if (e) return window.addEventListener("keydown", h), () => {
|
|
6523
6693
|
window.removeEventListener("keydown", h);
|
|
6524
6694
|
};
|
|
6525
6695
|
}, [e, h]);
|
|
6526
|
-
},
|
|
6527
|
-
let [o, s] =
|
|
6696
|
+
}, Kl = ({ children: e, minWidth: t = 200, maxWidth: n = 600, defaultWidth: r = 256, onWidthChange: i, className: a = "" }) => {
|
|
6697
|
+
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
6698
|
let e = Math.max(g.current, window.innerWidth - 320);
|
|
6529
6699
|
return Math.min(_.current, e);
|
|
6530
6700
|
}, [320]);
|
|
6531
|
-
|
|
6701
|
+
z(() => {
|
|
6532
6702
|
g.current = t, _.current = n, v.current = i;
|
|
6533
6703
|
}, [
|
|
6534
6704
|
t,
|
|
6535
6705
|
n,
|
|
6536
6706
|
i
|
|
6537
6707
|
]);
|
|
6538
|
-
let b =
|
|
6708
|
+
let b = R((e) => {
|
|
6539
6709
|
!f.current || !u.current || (h.current !== null && cancelAnimationFrame(h.current), h.current = requestAnimationFrame(() => {
|
|
6540
6710
|
let t = e.clientX - p.current, n = y(), r = Math.max(g.current, Math.min(n, m.current + t));
|
|
6541
6711
|
u.current && (u.current.style.width = `${r}px`), s(r), v.current?.(r);
|
|
6542
6712
|
}));
|
|
6543
|
-
}, [y]), x =
|
|
6713
|
+
}, [y]), x = R(() => {
|
|
6544
6714
|
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 =
|
|
6715
|
+
}, []), S = R((e) => {
|
|
6546
6716
|
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
6717
|
}, [o]);
|
|
6548
|
-
return
|
|
6718
|
+
return z(() => (c && (document.addEventListener("mousemove", b, { passive: !0 }), document.addEventListener("mouseup", x)), () => {
|
|
6549
6719
|
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
6720
|
}), [
|
|
6551
6721
|
c,
|
|
6552
6722
|
b,
|
|
6553
6723
|
x
|
|
6554
|
-
]),
|
|
6724
|
+
]), z(() => {
|
|
6555
6725
|
let e = () => {
|
|
6556
6726
|
let e = y();
|
|
6557
6727
|
o > e && (s(e), u.current && (u.current.style.width = `${e}px`), v.current?.(e));
|
|
6558
6728
|
};
|
|
6559
6729
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
6560
|
-
}, [o, y]), /* @__PURE__ */
|
|
6730
|
+
}, [o, y]), /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U("div", {
|
|
6561
6731
|
ref: u,
|
|
6562
6732
|
className: `flex h-full min-w-0 shrink-0 flex-col overflow-x-hidden border-r bg-background ${a}`,
|
|
6563
6733
|
style: {
|
|
@@ -6567,31 +6737,31 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6567
6737
|
transition: "width 0.2s ease-out"
|
|
6568
6738
|
},
|
|
6569
6739
|
children: e
|
|
6570
|
-
}), /* @__PURE__ */
|
|
6740
|
+
}), /* @__PURE__ */ U("div", {
|
|
6571
6741
|
ref: d,
|
|
6572
6742
|
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
6743
|
onMouseDown: S,
|
|
6574
6744
|
style: { cursor: "col-resize" },
|
|
6575
|
-
children: /* @__PURE__ */
|
|
6745
|
+
children: /* @__PURE__ */ U("div", { className: "absolute inset-y-0 left-0 w-4" })
|
|
6576
6746
|
})] });
|
|
6577
|
-
},
|
|
6578
|
-
function
|
|
6579
|
-
return `calc(${(Math.max(0, Math.min(1, e)) * 100).toFixed(4)}% - ${
|
|
6747
|
+
}, ql = 16, Jl = 250;
|
|
6748
|
+
function Yl(e) {
|
|
6749
|
+
return `calc(${(Math.max(0, Math.min(1, e)) * 100).toFixed(4)}% - ${ql / 2}px)`;
|
|
6580
6750
|
}
|
|
6581
|
-
function
|
|
6751
|
+
function Xl(e) {
|
|
6582
6752
|
let t = Math.floor(e / 60), n = Math.floor(e % 60), r = Math.floor(e % 1 * 100);
|
|
6583
6753
|
return `${t}:${n.toString().padStart(2, "0")}.${r.toString().padStart(2, "0")}`;
|
|
6584
6754
|
}
|
|
6585
|
-
var
|
|
6586
|
-
let { t: l } =
|
|
6755
|
+
var Zl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFrameIndex: i, isDisabled: a, setFrameIndex: o, getFrameIndex: s, subscribeFrameIndex: c }) => {
|
|
6756
|
+
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
6757
|
let t = Math.max(0, Math.min(1, e));
|
|
6588
|
-
f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left =
|
|
6589
|
-
}, []), b =
|
|
6758
|
+
f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left = Yl(t));
|
|
6759
|
+
}, []), b = R((e) => {
|
|
6590
6760
|
m.current && m.current.classList.toggle("cursor-grabbing", e), p.current && p.current.classList.toggle("shadow-md", e);
|
|
6591
|
-
}, []), x =
|
|
6761
|
+
}, []), x = R((e) => {
|
|
6592
6762
|
m.current && (m.current.setAttribute("aria-valuenow", String(e)), m.current.setAttribute("aria-valuetext", l("playback.a11y.valuetext", {
|
|
6593
|
-
time:
|
|
6594
|
-
totalTime:
|
|
6763
|
+
time: Xl(v(e)),
|
|
6764
|
+
totalTime: Xl(r),
|
|
6595
6765
|
frame: e,
|
|
6596
6766
|
totalFrames: n
|
|
6597
6767
|
})));
|
|
@@ -6600,26 +6770,26 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6600
6770
|
l,
|
|
6601
6771
|
n,
|
|
6602
6772
|
r
|
|
6603
|
-
]), S =
|
|
6604
|
-
u.current && (u.current.textContent =
|
|
6773
|
+
]), S = R((e, t) => {
|
|
6774
|
+
u.current && (u.current.textContent = Xl(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
6775
|
}, [
|
|
6606
6776
|
v,
|
|
6607
6777
|
n,
|
|
6608
6778
|
x,
|
|
6609
6779
|
y
|
|
6610
|
-
]), C =
|
|
6780
|
+
]), C = R((e, t = !0) => {
|
|
6611
6781
|
o(e), S(e, t);
|
|
6612
|
-
}, [o, S]), w =
|
|
6782
|
+
}, [o, S]), w = R((e) => {
|
|
6613
6783
|
if (n === 0) return;
|
|
6614
6784
|
let t = Math.round(Math.max(0, Math.min(1, e)) * (n - 1));
|
|
6615
6785
|
C(t);
|
|
6616
|
-
}, [C, n]),
|
|
6786
|
+
}, [C, n]), E = R((e) => {
|
|
6617
6787
|
if (!m.current || n === 0) return;
|
|
6618
6788
|
let t = m.current.getBoundingClientRect();
|
|
6619
6789
|
if (t.width <= 0) return;
|
|
6620
6790
|
let r = (e - t.left) / t.width;
|
|
6621
6791
|
w(r);
|
|
6622
|
-
}, [w, n]), D =
|
|
6792
|
+
}, [w, n]), D = R((e) => {
|
|
6623
6793
|
if (a || n === 0) return;
|
|
6624
6794
|
let t = s(), r = null;
|
|
6625
6795
|
switch (e.key) {
|
|
@@ -6646,11 +6816,11 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6646
6816
|
s,
|
|
6647
6817
|
a,
|
|
6648
6818
|
n
|
|
6649
|
-
]), O =
|
|
6819
|
+
]), O = R((e) => {
|
|
6650
6820
|
if (!m.current || a || n === 0) return;
|
|
6651
|
-
_.current?.(), h.current = !0, b(!0), m.current.setPointerCapture(e.pointerId),
|
|
6821
|
+
_.current?.(), h.current = !0, b(!0), m.current.setPointerCapture(e.pointerId), E(e.clientX);
|
|
6652
6822
|
let t = (e) => {
|
|
6653
|
-
h.current &&
|
|
6823
|
+
h.current && E(e.clientX);
|
|
6654
6824
|
}, r = () => {
|
|
6655
6825
|
window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i), _.current = null;
|
|
6656
6826
|
}, i = (e) => {
|
|
@@ -6661,25 +6831,25 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6661
6831
|
a,
|
|
6662
6832
|
n,
|
|
6663
6833
|
b,
|
|
6664
|
-
|
|
6834
|
+
E
|
|
6665
6835
|
]);
|
|
6666
|
-
|
|
6836
|
+
z(() => {
|
|
6667
6837
|
let e = n > 0 ? Math.min(s(), n - 1) : 0;
|
|
6668
6838
|
S(e, !0);
|
|
6669
6839
|
}, [
|
|
6670
6840
|
s,
|
|
6671
6841
|
S,
|
|
6672
6842
|
n
|
|
6673
|
-
]),
|
|
6843
|
+
]), z(() => c((e) => {
|
|
6674
6844
|
if (h.current) return;
|
|
6675
|
-
let t = Date.now() - g.current >=
|
|
6845
|
+
let t = Date.now() - g.current >= Jl;
|
|
6676
6846
|
S(e, t);
|
|
6677
|
-
}), [c, S]),
|
|
6847
|
+
}), [c, S]), z(() => () => {
|
|
6678
6848
|
_.current?.();
|
|
6679
6849
|
}, []);
|
|
6680
|
-
let ee =
|
|
6681
|
-
time:
|
|
6682
|
-
totalTime:
|
|
6850
|
+
let ee = B(() => Xl(v(i)), [v, i]), te = B(() => l("playback.a11y.valuetext", {
|
|
6851
|
+
time: Xl(v(i)),
|
|
6852
|
+
totalTime: Xl(r),
|
|
6683
6853
|
frame: i,
|
|
6684
6854
|
totalFrames: n
|
|
6685
6855
|
}), [
|
|
@@ -6689,16 +6859,16 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6689
6859
|
n,
|
|
6690
6860
|
r
|
|
6691
6861
|
]), 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__ */
|
|
6862
|
+
return /* @__PURE__ */ W("div", {
|
|
6693
6863
|
className: "flex-1 flex flex-col justify-center gap-1.5 px-2",
|
|
6694
|
-
children: [/* @__PURE__ */
|
|
6864
|
+
children: [/* @__PURE__ */ W("div", {
|
|
6695
6865
|
className: "flex items-end justify-between gap-4",
|
|
6696
|
-
children: [/* @__PURE__ */
|
|
6866
|
+
children: [/* @__PURE__ */ U("div", {
|
|
6697
6867
|
className: "flex min-w-0 flex-col justify-end",
|
|
6698
|
-
children: /* @__PURE__ */
|
|
6868
|
+
children: /* @__PURE__ */ W("div", {
|
|
6699
6869
|
className: "flex items-baseline gap-1.5",
|
|
6700
6870
|
title: l("playback.progress"),
|
|
6701
|
-
children: [/* @__PURE__ */
|
|
6871
|
+
children: [/* @__PURE__ */ U("span", {
|
|
6702
6872
|
ref: u,
|
|
6703
6873
|
className: ne,
|
|
6704
6874
|
style: {
|
|
@@ -6706,17 +6876,17 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6706
6876
|
display: "inline-block"
|
|
6707
6877
|
},
|
|
6708
6878
|
children: ee
|
|
6709
|
-
}), /* @__PURE__ */
|
|
6879
|
+
}), /* @__PURE__ */ W("span", {
|
|
6710
6880
|
className: k,
|
|
6711
|
-
children: ["/ ",
|
|
6881
|
+
children: ["/ ", Xl(r)]
|
|
6712
6882
|
})]
|
|
6713
6883
|
})
|
|
6714
|
-
}), /* @__PURE__ */
|
|
6884
|
+
}), /* @__PURE__ */ U("div", {
|
|
6715
6885
|
className: "flex min-w-[96px] flex-col items-end justify-end",
|
|
6716
|
-
children: /* @__PURE__ */
|
|
6886
|
+
children: /* @__PURE__ */ W("div", {
|
|
6717
6887
|
className: "flex items-baseline gap-1.5",
|
|
6718
6888
|
title: l("units.frame"),
|
|
6719
|
-
children: [/* @__PURE__ */
|
|
6889
|
+
children: [/* @__PURE__ */ U("span", {
|
|
6720
6890
|
ref: d,
|
|
6721
6891
|
className: ne,
|
|
6722
6892
|
style: {
|
|
@@ -6725,13 +6895,13 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6725
6895
|
textAlign: "right"
|
|
6726
6896
|
},
|
|
6727
6897
|
children: i
|
|
6728
|
-
}), /* @__PURE__ */
|
|
6898
|
+
}), /* @__PURE__ */ W("span", {
|
|
6729
6899
|
className: k,
|
|
6730
6900
|
children: ["/ ", n]
|
|
6731
6901
|
})]
|
|
6732
6902
|
})
|
|
6733
6903
|
})]
|
|
6734
|
-
}), /* @__PURE__ */
|
|
6904
|
+
}), /* @__PURE__ */ W("div", {
|
|
6735
6905
|
ref: m,
|
|
6736
6906
|
className: "relative h-1.5 w-full cursor-pointer rounded-full bg-primary/20 touch-none",
|
|
6737
6907
|
onPointerDown: O,
|
|
@@ -6744,7 +6914,7 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6744
6914
|
"aria-valuemax": Math.max(0, n - 1),
|
|
6745
6915
|
"aria-valuenow": i,
|
|
6746
6916
|
"aria-valuetext": te,
|
|
6747
|
-
children: [/* @__PURE__ */
|
|
6917
|
+
children: [/* @__PURE__ */ U("div", {
|
|
6748
6918
|
ref: f,
|
|
6749
6919
|
className: "absolute h-full rounded-full bg-primary pointer-events-none",
|
|
6750
6920
|
style: {
|
|
@@ -6752,50 +6922,50 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6752
6922
|
transform: `scaleX(${n > 1 ? i / (n - 1) : 0})`,
|
|
6753
6923
|
transformOrigin: "left center"
|
|
6754
6924
|
}
|
|
6755
|
-
}), /* @__PURE__ */
|
|
6925
|
+
}), /* @__PURE__ */ U("div", {
|
|
6756
6926
|
ref: p,
|
|
6757
6927
|
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
6928
|
style: {
|
|
6759
|
-
left:
|
|
6929
|
+
left: Yl(n > 1 ? i / (n - 1) : 0),
|
|
6760
6930
|
transform: "translateY(-50%)"
|
|
6761
6931
|
}
|
|
6762
6932
|
})]
|
|
6763
6933
|
})]
|
|
6764
6934
|
});
|
|
6765
6935
|
});
|
|
6766
|
-
|
|
6936
|
+
Zl.displayName = "PlaybackProgressSlider";
|
|
6767
6937
|
//#endregion
|
|
6768
6938
|
//#region src/react/components/Playback/PlaybackBar.tsx
|
|
6769
|
-
var
|
|
6770
|
-
let { t: e } =
|
|
6771
|
-
|
|
6772
|
-
let e = `${
|
|
6773
|
-
|
|
6774
|
-
totalFrames:
|
|
6775
|
-
isLoading:
|
|
6939
|
+
var Ql = () => {
|
|
6940
|
+
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 } = fl(), 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);
|
|
6941
|
+
z(() => {
|
|
6942
|
+
let e = `${y}-${w}`;
|
|
6943
|
+
rl({
|
|
6944
|
+
totalFrames: w,
|
|
6945
|
+
isLoading: _,
|
|
6776
6946
|
isPlaying: o,
|
|
6777
|
-
userPaused:
|
|
6947
|
+
userPaused: O.current,
|
|
6778
6948
|
currentId: e,
|
|
6779
|
-
lastAutoPlayId:
|
|
6780
|
-
}) && (
|
|
6949
|
+
lastAutoPlayId: D.current
|
|
6950
|
+
}) && (D.current = e, s(!0));
|
|
6781
6951
|
}, [
|
|
6782
|
-
|
|
6783
|
-
|
|
6952
|
+
w,
|
|
6953
|
+
_,
|
|
6784
6954
|
o,
|
|
6785
6955
|
s,
|
|
6786
|
-
|
|
6787
|
-
]),
|
|
6788
|
-
|
|
6789
|
-
}, [
|
|
6790
|
-
|
|
6791
|
-
}, [
|
|
6956
|
+
y
|
|
6957
|
+
]), z(() => {
|
|
6958
|
+
O.current = !1;
|
|
6959
|
+
}, [y]), z(() => {
|
|
6960
|
+
_ && (D.current = null);
|
|
6961
|
+
}, [_]);
|
|
6792
6962
|
let ee = () => {
|
|
6793
|
-
|
|
6794
|
-
},
|
|
6963
|
+
u(c === "sequential" ? "shuffle" : c === "shuffle" ? "loop" : "sequential");
|
|
6964
|
+
}, te = () => {
|
|
6795
6965
|
switch (c) {
|
|
6796
|
-
case "loop": return /* @__PURE__ */
|
|
6797
|
-
case "shuffle": return /* @__PURE__ */
|
|
6798
|
-
case "sequential": return /* @__PURE__ */
|
|
6966
|
+
case "loop": return /* @__PURE__ */ U(Bs, { className: "h-4 w-4" });
|
|
6967
|
+
case "shuffle": return /* @__PURE__ */ U(Hs, { className: "h-4 w-4" });
|
|
6968
|
+
case "sequential": return /* @__PURE__ */ U(Vs, { className: "h-4 w-4" });
|
|
6799
6969
|
}
|
|
6800
6970
|
}, k = [
|
|
6801
6971
|
.25,
|
|
@@ -6804,478 +6974,478 @@ var Kl = () => {
|
|
|
6804
6974
|
2,
|
|
6805
6975
|
4
|
|
6806
6976
|
], A = () => {
|
|
6807
|
-
let e = k.indexOf(
|
|
6808
|
-
|
|
6977
|
+
let e = k.indexOf(f), t = k[(e + 1) % k.length];
|
|
6978
|
+
p(t);
|
|
6809
6979
|
}, re = () => {
|
|
6810
6980
|
switch (c) {
|
|
6811
6981
|
case "loop": return e("playback.mode.loop");
|
|
6812
6982
|
case "shuffle": return e("playback.mode.shuffle");
|
|
6813
6983
|
case "sequential": return e("playback.mode.sequential");
|
|
6814
6984
|
}
|
|
6815
|
-
}, j =
|
|
6816
|
-
|
|
6985
|
+
}, j = B(() => w === 0 ? 0 : t[w - 1]?.timestamp === void 0 ? w / E : t[w - 1].timestamp, [
|
|
6986
|
+
w,
|
|
6817
6987
|
t,
|
|
6818
|
-
|
|
6819
|
-
]), ie =
|
|
6988
|
+
E
|
|
6989
|
+
]), ie = R(() => {
|
|
6820
6990
|
let e = !o;
|
|
6821
|
-
|
|
6991
|
+
O.current = !e, s(e);
|
|
6822
6992
|
}, [o, s]);
|
|
6823
|
-
return
|
|
6993
|
+
return w === 0 && !_ && !C ? /* @__PURE__ */ U("div", {
|
|
6824
6994
|
className: "h-16 border-t bg-background/50 px-6 flex items-center justify-center text-muted-foreground italic text-sm",
|
|
6825
6995
|
children: e("playback.noData")
|
|
6826
|
-
}) :
|
|
6996
|
+
}) : _ || C ? /* @__PURE__ */ W("div", {
|
|
6827
6997
|
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
6998
|
role: "status",
|
|
6829
6999
|
"aria-live": "polite",
|
|
6830
|
-
"aria-label":
|
|
7000
|
+
"aria-label": C?.message || e("common.loading"),
|
|
6831
7001
|
children: [
|
|
6832
|
-
/* @__PURE__ */
|
|
7002
|
+
/* @__PURE__ */ W("div", {
|
|
6833
7003
|
className: "flex items-center gap-1",
|
|
6834
7004
|
children: [
|
|
6835
|
-
/* @__PURE__ */
|
|
6836
|
-
/* @__PURE__ */
|
|
6837
|
-
/* @__PURE__ */
|
|
6838
|
-
/* @__PURE__ */
|
|
6839
|
-
/* @__PURE__ */
|
|
7005
|
+
/* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" }),
|
|
7006
|
+
/* @__PURE__ */ U("div", { className: "h-8 w-12 rounded bg-muted" }),
|
|
7007
|
+
/* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" }),
|
|
7008
|
+
/* @__PURE__ */ U("div", { className: "h-9 w-9 rounded-full bg-muted" }),
|
|
7009
|
+
/* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" })
|
|
6840
7010
|
]
|
|
6841
7011
|
}),
|
|
6842
|
-
/* @__PURE__ */
|
|
7012
|
+
/* @__PURE__ */ U(nc, {
|
|
6843
7013
|
orientation: "vertical",
|
|
6844
7014
|
className: "h-8 mx-2 bg-border"
|
|
6845
7015
|
}),
|
|
6846
|
-
/* @__PURE__ */
|
|
7016
|
+
/* @__PURE__ */ W("div", {
|
|
6847
7017
|
className: "flex-1 flex flex-col justify-center gap-2",
|
|
6848
|
-
children: [/* @__PURE__ */
|
|
7018
|
+
children: [/* @__PURE__ */ W("div", {
|
|
6849
7019
|
className: "flex justify-between",
|
|
6850
|
-
children: [/* @__PURE__ */
|
|
6851
|
-
}), /* @__PURE__ */
|
|
7020
|
+
children: [/* @__PURE__ */ U("div", { className: "h-3 w-24 bg-muted rounded" }), /* @__PURE__ */ U("div", { className: "h-3 w-16 bg-muted rounded" })]
|
|
7021
|
+
}), /* @__PURE__ */ U("div", { className: "h-1.5 w-full bg-muted rounded-full" })]
|
|
6852
7022
|
}),
|
|
6853
|
-
/* @__PURE__ */
|
|
7023
|
+
/* @__PURE__ */ U(nc, {
|
|
6854
7024
|
orientation: "vertical",
|
|
6855
7025
|
className: "h-8 mx-2 bg-border"
|
|
6856
7026
|
}),
|
|
6857
|
-
/* @__PURE__ */
|
|
7027
|
+
/* @__PURE__ */ W("div", {
|
|
6858
7028
|
className: "flex items-center gap-4",
|
|
6859
|
-
children: [/* @__PURE__ */
|
|
7029
|
+
children: [/* @__PURE__ */ U("div", { className: "h-8 w-12 bg-muted rounded" }), /* @__PURE__ */ U("div", { className: "h-8 w-16 bg-muted rounded" })]
|
|
6860
7030
|
})
|
|
6861
7031
|
]
|
|
6862
|
-
}) : /* @__PURE__ */
|
|
7032
|
+
}) : /* @__PURE__ */ W("div", {
|
|
6863
7033
|
className: "h-16 border-t bg-background text-foreground px-4 flex items-center gap-4",
|
|
6864
7034
|
children: [
|
|
6865
|
-
/* @__PURE__ */
|
|
7035
|
+
/* @__PURE__ */ W("div", {
|
|
6866
7036
|
className: "flex items-center gap-1",
|
|
6867
7037
|
children: [
|
|
6868
|
-
/* @__PURE__ */
|
|
6869
|
-
render: /* @__PURE__ */
|
|
7038
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
7039
|
+
render: /* @__PURE__ */ U(i, {
|
|
6870
7040
|
variant: "ghost",
|
|
6871
7041
|
size: "icon",
|
|
6872
7042
|
className: `h-8 w-8 ${c === "sequential" ? "text-muted-foreground" : "text-primary"} hover:text-foreground`,
|
|
6873
7043
|
onClick: ee,
|
|
6874
|
-
disabled:
|
|
7044
|
+
disabled: _,
|
|
6875
7045
|
"aria-label": e("playback.mode.toggle")
|
|
6876
7046
|
}),
|
|
6877
|
-
children:
|
|
6878
|
-
}), /* @__PURE__ */
|
|
6879
|
-
/* @__PURE__ */
|
|
6880
|
-
render: /* @__PURE__ */
|
|
7047
|
+
children: te()
|
|
7048
|
+
}), /* @__PURE__ */ U(P, { children: re() })] }),
|
|
7049
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ W(x, {
|
|
7050
|
+
render: /* @__PURE__ */ U(i, {
|
|
6881
7051
|
variant: "ghost",
|
|
6882
7052
|
size: "sm",
|
|
6883
7053
|
className: "h-8 px-2 font-mono text-xs",
|
|
6884
7054
|
onClick: A,
|
|
6885
|
-
disabled:
|
|
7055
|
+
disabled: _ || w === 0,
|
|
6886
7056
|
"aria-label": e("playback.speed")
|
|
6887
7057
|
}),
|
|
6888
|
-
children: [
|
|
6889
|
-
}), /* @__PURE__ */
|
|
6890
|
-
/* @__PURE__ */
|
|
6891
|
-
render: /* @__PURE__ */
|
|
7058
|
+
children: [f, "x"]
|
|
7059
|
+
}), /* @__PURE__ */ U(P, { children: e("playback.speed") })] }),
|
|
7060
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
7061
|
+
render: /* @__PURE__ */ U(i, {
|
|
6892
7062
|
variant: "ghost",
|
|
6893
7063
|
size: "icon",
|
|
6894
7064
|
className: "h-8 w-8",
|
|
6895
|
-
onClick: () => a(Math.max(0,
|
|
6896
|
-
disabled:
|
|
7065
|
+
onClick: () => a(Math.max(0, g() - 1)),
|
|
7066
|
+
disabled: _,
|
|
6897
7067
|
"aria-label": e("panels.keyboardShortcuts.prevFrame.action")
|
|
6898
7068
|
}),
|
|
6899
|
-
children: /* @__PURE__ */
|
|
6900
|
-
}), /* @__PURE__ */
|
|
6901
|
-
/* @__PURE__ */
|
|
6902
|
-
render: /* @__PURE__ */
|
|
7069
|
+
children: /* @__PURE__ */ U(Ns, { className: "h-4 w-4" })
|
|
7070
|
+
}), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.prevFrame.action") })] }),
|
|
7071
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
7072
|
+
render: /* @__PURE__ */ U(i, {
|
|
6903
7073
|
variant: "default",
|
|
6904
7074
|
size: "icon",
|
|
6905
7075
|
className: "h-9 w-9 rounded-full transition-all",
|
|
6906
7076
|
onClick: ie,
|
|
6907
|
-
disabled:
|
|
7077
|
+
disabled: _ || w === 0,
|
|
6908
7078
|
"aria-label": e("panels.keyboardShortcuts.playPause.action")
|
|
6909
7079
|
}),
|
|
6910
|
-
children: o ? /* @__PURE__ */
|
|
6911
|
-
}), /* @__PURE__ */
|
|
6912
|
-
/* @__PURE__ */
|
|
6913
|
-
render: /* @__PURE__ */
|
|
7080
|
+
children: o ? /* @__PURE__ */ U(d, { className: "h-4 w-4" }) : /* @__PURE__ */ U(n, { className: "h-4 w-4 fill-current" })
|
|
7081
|
+
}), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.playPause.action") })] }),
|
|
7082
|
+
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
7083
|
+
render: /* @__PURE__ */ U(i, {
|
|
6914
7084
|
variant: "ghost",
|
|
6915
7085
|
size: "icon",
|
|
6916
7086
|
className: "h-8 w-8",
|
|
6917
|
-
onClick: () => a(Math.min(
|
|
6918
|
-
disabled:
|
|
7087
|
+
onClick: () => a(Math.min(w - 1, g() + 1)),
|
|
7088
|
+
disabled: _,
|
|
6919
7089
|
"aria-label": e("panels.keyboardShortcuts.nextFrame.action")
|
|
6920
7090
|
}),
|
|
6921
|
-
children: /* @__PURE__ */
|
|
6922
|
-
}), /* @__PURE__ */
|
|
7091
|
+
children: /* @__PURE__ */ U(l, { className: "h-4 w-4" })
|
|
7092
|
+
}), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.nextFrame.action") })] })
|
|
6923
7093
|
]
|
|
6924
7094
|
}),
|
|
6925
|
-
/* @__PURE__ */
|
|
7095
|
+
/* @__PURE__ */ U(nc, {
|
|
6926
7096
|
orientation: "vertical",
|
|
6927
7097
|
className: "h-8 mx-2 bg-border"
|
|
6928
7098
|
}),
|
|
6929
|
-
/* @__PURE__ */
|
|
7099
|
+
/* @__PURE__ */ U(Zl, {
|
|
6930
7100
|
currentFrames: t,
|
|
6931
|
-
fps:
|
|
6932
|
-
totalFrames:
|
|
7101
|
+
fps: E,
|
|
7102
|
+
totalFrames: w,
|
|
6933
7103
|
totalTime: j,
|
|
6934
|
-
initialFrameIndex:
|
|
6935
|
-
isDisabled:
|
|
7104
|
+
initialFrameIndex: r,
|
|
7105
|
+
isDisabled: _ || !!C,
|
|
6936
7106
|
setFrameIndex: a,
|
|
6937
|
-
getFrameIndex:
|
|
6938
|
-
subscribeFrameIndex:
|
|
7107
|
+
getFrameIndex: g,
|
|
7108
|
+
subscribeFrameIndex: h
|
|
6939
7109
|
}),
|
|
6940
|
-
/* @__PURE__ */
|
|
7110
|
+
/* @__PURE__ */ U(nc, {
|
|
6941
7111
|
orientation: "vertical",
|
|
6942
7112
|
className: "h-8 mx-2 bg-border"
|
|
6943
7113
|
}),
|
|
6944
|
-
/* @__PURE__ */
|
|
7114
|
+
/* @__PURE__ */ W("div", {
|
|
6945
7115
|
className: "flex items-center gap-4 pr-2",
|
|
6946
|
-
children: [/* @__PURE__ */
|
|
7116
|
+
children: [/* @__PURE__ */ W("div", {
|
|
6947
7117
|
className: "flex flex-col items-end",
|
|
6948
|
-
children: [/* @__PURE__ */
|
|
7118
|
+
children: [/* @__PURE__ */ U("span", {
|
|
6949
7119
|
className: "text-[9px] font-bold text-muted-foreground/60 uppercase tracking-wider",
|
|
6950
7120
|
children: e("playback.meta.fps")
|
|
6951
|
-
}), /* @__PURE__ */
|
|
7121
|
+
}), /* @__PURE__ */ U(As, {
|
|
6952
7122
|
variant: "secondary",
|
|
6953
7123
|
className: "text-[10px] h-4.5 px-1 py-0 font-mono",
|
|
6954
|
-
children:
|
|
7124
|
+
children: E
|
|
6955
7125
|
})]
|
|
6956
|
-
}), /* @__PURE__ */
|
|
7126
|
+
}), /* @__PURE__ */ W("div", {
|
|
6957
7127
|
className: "flex flex-col items-end min-w-[60px]",
|
|
6958
|
-
children: [/* @__PURE__ */
|
|
7128
|
+
children: [/* @__PURE__ */ U("span", {
|
|
6959
7129
|
className: "text-[9px] font-bold text-muted-foreground/60 uppercase tracking-wider",
|
|
6960
7130
|
children: e("playback.meta.version")
|
|
6961
|
-
}), /* @__PURE__ */
|
|
7131
|
+
}), /* @__PURE__ */ U("span", {
|
|
6962
7132
|
className: "text-[10px] font-mono text-foreground/80",
|
|
6963
|
-
children:
|
|
7133
|
+
children: m?.codebase_version || "N/A"
|
|
6964
7134
|
})]
|
|
6965
7135
|
})]
|
|
6966
7136
|
})
|
|
6967
7137
|
]
|
|
6968
7138
|
});
|
|
6969
|
-
},
|
|
6970
|
-
let { t:
|
|
6971
|
-
return /* @__PURE__ */
|
|
7139
|
+
}, $l = ({ title: e, message: t, onRetry: n, errorDetail: a }) => {
|
|
7140
|
+
let { t: o } = T(), { reset: s } = N(), [c, l] = H(!1);
|
|
7141
|
+
return /* @__PURE__ */ W("div", {
|
|
6972
7142
|
className: "flex flex-col items-center justify-center p-8 text-center max-w-md mx-auto h-full space-y-6",
|
|
6973
7143
|
role: "alert",
|
|
6974
7144
|
"aria-live": "assertive",
|
|
6975
7145
|
children: [
|
|
6976
|
-
/* @__PURE__ */
|
|
7146
|
+
/* @__PURE__ */ U("div", {
|
|
6977
7147
|
className: "bg-destructive/10 p-4 rounded-full",
|
|
6978
|
-
children: /* @__PURE__ */
|
|
7148
|
+
children: /* @__PURE__ */ U(Ps, { className: "h-12 w-12 text-destructive" })
|
|
6979
7149
|
}),
|
|
6980
|
-
/* @__PURE__ */
|
|
7150
|
+
/* @__PURE__ */ W("div", {
|
|
6981
7151
|
className: "space-y-2",
|
|
6982
|
-
children: [/* @__PURE__ */
|
|
7152
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
6983
7153
|
className: "text-xl font-bold text-foreground",
|
|
6984
|
-
children:
|
|
6985
|
-
}), /* @__PURE__ */
|
|
7154
|
+
children: e || o("common.error")
|
|
7155
|
+
}), /* @__PURE__ */ U("p", {
|
|
6986
7156
|
className: "text-muted-foreground",
|
|
6987
|
-
children:
|
|
7157
|
+
children: t || o("errors.generic")
|
|
6988
7158
|
})]
|
|
6989
7159
|
}),
|
|
6990
|
-
|
|
7160
|
+
a && /* @__PURE__ */ W("div", {
|
|
6991
7161
|
className: "w-full bg-muted/50 rounded-lg p-3 text-left overflow-hidden",
|
|
6992
|
-
children: [/* @__PURE__ */
|
|
7162
|
+
children: [/* @__PURE__ */ W("div", {
|
|
6993
7163
|
className: "flex justify-between items-center mb-2",
|
|
6994
|
-
children: [/* @__PURE__ */
|
|
7164
|
+
children: [/* @__PURE__ */ U("span", {
|
|
6995
7165
|
className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider",
|
|
6996
|
-
children:
|
|
6997
|
-
}), /* @__PURE__ */
|
|
7166
|
+
children: o("errors.details")
|
|
7167
|
+
}), /* @__PURE__ */ U(i, {
|
|
6998
7168
|
variant: "ghost",
|
|
6999
7169
|
size: "icon",
|
|
7000
7170
|
className: "h-6 w-6",
|
|
7001
7171
|
onClick: () => {
|
|
7002
|
-
|
|
7172
|
+
a && (navigator.clipboard.writeText(a), l(!0), setTimeout(() => l(!1), 2e3));
|
|
7003
7173
|
},
|
|
7004
|
-
"aria-label":
|
|
7005
|
-
title:
|
|
7006
|
-
children:
|
|
7174
|
+
"aria-label": c ? o("common.copied", "Copied") : o("common.copy"),
|
|
7175
|
+
title: o("common.copy"),
|
|
7176
|
+
children: c ? /* @__PURE__ */ U(u, { className: "h-3 w-3 text-green-500" }) : /* @__PURE__ */ U(ee, { className: "h-3 w-3" })
|
|
7007
7177
|
})]
|
|
7008
|
-
}), /* @__PURE__ */
|
|
7178
|
+
}), /* @__PURE__ */ U("pre", {
|
|
7009
7179
|
className: "text-xs font-mono text-muted-foreground break-all whitespace-pre-wrap max-h-32 overflow-y-auto",
|
|
7010
|
-
children:
|
|
7180
|
+
children: a
|
|
7011
7181
|
})]
|
|
7012
7182
|
}),
|
|
7013
|
-
/* @__PURE__ */
|
|
7183
|
+
/* @__PURE__ */ W("div", {
|
|
7014
7184
|
className: "flex flex-wrap items-center justify-center gap-3 w-full",
|
|
7015
|
-
children: [
|
|
7016
|
-
onClick:
|
|
7185
|
+
children: [n && /* @__PURE__ */ W(i, {
|
|
7186
|
+
onClick: n,
|
|
7017
7187
|
variant: "default",
|
|
7018
7188
|
className: "gap-2",
|
|
7019
|
-
children: [/* @__PURE__ */
|
|
7020
|
-
}), /* @__PURE__ */
|
|
7021
|
-
onClick:
|
|
7189
|
+
children: [/* @__PURE__ */ U(r, { className: "h-4 w-4" }), o("common.retry")]
|
|
7190
|
+
}), /* @__PURE__ */ W(i, {
|
|
7191
|
+
onClick: s,
|
|
7022
7192
|
variant: "outline",
|
|
7023
7193
|
className: "gap-2",
|
|
7024
|
-
children: [/* @__PURE__ */
|
|
7194
|
+
children: [/* @__PURE__ */ U(Is, { className: "h-4 w-4" }), o("navbar.goHome")]
|
|
7025
7195
|
})]
|
|
7026
7196
|
})
|
|
7027
7197
|
]
|
|
7028
7198
|
});
|
|
7029
|
-
},
|
|
7030
|
-
function
|
|
7031
|
-
let { t: c } =
|
|
7199
|
+
}, eu = L.lazy(async () => ({ default: (await import("./DockviewLayout-DeRL52Yo.js")).DockviewLayout }));
|
|
7200
|
+
function tu({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sidebar: r, emptyState: i, sidebarHeader: a, showToaster: o = !0, onRetry: s }) {
|
|
7201
|
+
let { t: c } = T(), { episodes: l, info: u, clearError: d, error: f } = N(), { tasks: p } = fl(), 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
7202
|
d();
|
|
7033
7203
|
});
|
|
7034
|
-
return /* @__PURE__ */
|
|
7035
|
-
className:
|
|
7036
|
-
children: [/* @__PURE__ */
|
|
7204
|
+
return /* @__PURE__ */ W("div", {
|
|
7205
|
+
className: D("flex flex-col h-full w-full overflow-hidden", n),
|
|
7206
|
+
children: [/* @__PURE__ */ W("div", {
|
|
7037
7207
|
className: "flex flex-1 overflow-hidden",
|
|
7038
|
-
children: [h && /* @__PURE__ */
|
|
7208
|
+
children: [h && /* @__PURE__ */ W(Kl, {
|
|
7039
7209
|
defaultWidth: 256,
|
|
7040
7210
|
minWidth: 200,
|
|
7041
7211
|
maxWidth: 600,
|
|
7042
7212
|
className: "min-w-0 overflow-hidden",
|
|
7043
|
-
children: [a, /* @__PURE__ */
|
|
7213
|
+
children: [a, /* @__PURE__ */ U("div", {
|
|
7044
7214
|
className: "flex flex-1 min-h-0 flex-col overflow-hidden",
|
|
7045
7215
|
children: r
|
|
7046
7216
|
})]
|
|
7047
|
-
}), /* @__PURE__ */
|
|
7217
|
+
}), /* @__PURE__ */ W("div", {
|
|
7048
7218
|
className: "flex-1 flex flex-col min-w-0",
|
|
7049
|
-
children: [/* @__PURE__ */
|
|
7050
|
-
className: "flex-1 overflow-hidden relative",
|
|
7051
|
-
children: u ? /* @__PURE__ */
|
|
7219
|
+
children: [/* @__PURE__ */ U("div", {
|
|
7220
|
+
className: "flex-1 min-w-0 min-h-0 overflow-hidden relative",
|
|
7221
|
+
children: u ? /* @__PURE__ */ W(ge, { children: [f ? /* @__PURE__ */ U("div", {
|
|
7052
7222
|
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
7223
|
children: f
|
|
7054
|
-
}) : null, /* @__PURE__ */
|
|
7055
|
-
fallback: /* @__PURE__ */
|
|
7224
|
+
}) : null, /* @__PURE__ */ U(fe, {
|
|
7225
|
+
fallback: /* @__PURE__ */ U("div", {
|
|
7056
7226
|
className: "w-full h-full flex items-center justify-center text-muted-foreground bg-background/50 backdrop-blur-sm z-50",
|
|
7057
7227
|
role: "status",
|
|
7058
7228
|
"aria-live": "polite",
|
|
7059
|
-
children: /* @__PURE__ */
|
|
7229
|
+
children: /* @__PURE__ */ W("div", {
|
|
7060
7230
|
className: "flex flex-col items-center gap-4",
|
|
7061
|
-
children: [/* @__PURE__ */
|
|
7231
|
+
children: [/* @__PURE__ */ W("div", {
|
|
7062
7232
|
className: "flex items-center gap-3",
|
|
7063
|
-
children: [/* @__PURE__ */
|
|
7233
|
+
children: [/* @__PURE__ */ U("div", {
|
|
7064
7234
|
className: "h-5 w-5 border-2 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
|
|
7065
7235
|
"aria-hidden": !0
|
|
7066
|
-
}), /* @__PURE__ */
|
|
7236
|
+
}), /* @__PURE__ */ U("span", {
|
|
7067
7237
|
className: "text-sm font-medium",
|
|
7068
7238
|
children: c("common.loadingLayout")
|
|
7069
7239
|
})]
|
|
7070
|
-
}), /* @__PURE__ */
|
|
7240
|
+
}), /* @__PURE__ */ U("p", {
|
|
7071
7241
|
className: "text-xs text-muted-foreground",
|
|
7072
7242
|
children: c("common.firstLoadNote")
|
|
7073
7243
|
})]
|
|
7074
7244
|
})
|
|
7075
7245
|
}),
|
|
7076
|
-
children: /* @__PURE__ */
|
|
7077
|
-
})] }) : g ? /* @__PURE__ */
|
|
7246
|
+
children: /* @__PURE__ */ U(eu, {})
|
|
7247
|
+
})] }) : g ? /* @__PURE__ */ U("div", {
|
|
7078
7248
|
className: "w-full h-full flex items-center justify-center text-muted-foreground",
|
|
7079
7249
|
role: "status",
|
|
7080
7250
|
"aria-live": "polite",
|
|
7081
|
-
children: /* @__PURE__ */
|
|
7251
|
+
children: /* @__PURE__ */ W("div", {
|
|
7082
7252
|
className: "flex flex-col items-center gap-4 max-w-md text-center px-6",
|
|
7083
|
-
children: [/* @__PURE__ */
|
|
7253
|
+
children: [/* @__PURE__ */ U("div", {
|
|
7084
7254
|
className: "h-10 w-10 border-4 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
|
|
7085
7255
|
"aria-hidden": !0
|
|
7086
|
-
}), /* @__PURE__ */
|
|
7256
|
+
}), /* @__PURE__ */ W("div", {
|
|
7087
7257
|
className: "space-y-2",
|
|
7088
|
-
children: [/* @__PURE__ */
|
|
7258
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
7089
7259
|
className: "text-lg font-semibold text-foreground",
|
|
7090
7260
|
children: c(`loading.phase.${g.phase}`)
|
|
7091
|
-
}), /* @__PURE__ */
|
|
7261
|
+
}), /* @__PURE__ */ U("p", {
|
|
7092
7262
|
className: "text-sm text-muted-foreground animate-pulse motion-reduce:animate-none",
|
|
7093
7263
|
children: g.message || c("common.loading")
|
|
7094
7264
|
})]
|
|
7095
7265
|
})]
|
|
7096
7266
|
})
|
|
7097
|
-
}) : _ ? /* @__PURE__ */
|
|
7267
|
+
}) : _ ? /* @__PURE__ */ U($l, {
|
|
7098
7268
|
title: c("common.error"),
|
|
7099
7269
|
message: c("errors.loadFailed"),
|
|
7100
7270
|
errorDetail: _.error || void 0,
|
|
7101
7271
|
onRetry: v
|
|
7102
|
-
}) : i ?? /* @__PURE__ */
|
|
7272
|
+
}) : i ?? /* @__PURE__ */ U("div", {
|
|
7103
7273
|
className: "w-full h-full flex items-center justify-center text-muted-foreground",
|
|
7104
7274
|
role: "status",
|
|
7105
7275
|
"aria-live": "polite",
|
|
7106
|
-
children: /* @__PURE__ */
|
|
7276
|
+
children: /* @__PURE__ */ U("div", {
|
|
7107
7277
|
className: "text-center",
|
|
7108
|
-
children: /* @__PURE__ */
|
|
7278
|
+
children: /* @__PURE__ */ U("p", { children: c("common.loading") })
|
|
7109
7279
|
})
|
|
7110
7280
|
})
|
|
7111
|
-
}), t && m && /* @__PURE__ */
|
|
7281
|
+
}), t && m && /* @__PURE__ */ U(Ql, {})]
|
|
7112
7282
|
})]
|
|
7113
|
-
}), o ? /* @__PURE__ */
|
|
7283
|
+
}), o ? /* @__PURE__ */ U(jl, {}) : null]
|
|
7114
7284
|
});
|
|
7115
7285
|
}
|
|
7116
7286
|
//#endregion
|
|
7117
7287
|
//#region src/react/components/LeRobotViewer.tsx
|
|
7118
|
-
function
|
|
7119
|
-
let { t:
|
|
7120
|
-
|
|
7121
|
-
let
|
|
7288
|
+
function nu({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFatalError: a, enableKeyboardShortcuts: o = !0, onBack: s, onExport: c }) {
|
|
7289
|
+
let { t: l } = T(), { initialize: u, error: d, isLoading: f, clearError: p } = N();
|
|
7290
|
+
Gl(o);
|
|
7291
|
+
let m = V(null), [h, g] = H(null), [_, v] = H(null), [y, b] = H(!1), x = V(null), S = B(() => _ ?? (d ? {
|
|
7122
7292
|
code: "DATASET_LOAD_FAILED",
|
|
7123
|
-
message:
|
|
7293
|
+
message: d,
|
|
7124
7294
|
recoverable: !0
|
|
7125
|
-
} : null), [
|
|
7295
|
+
} : null), [d, _]), C = (e) => {
|
|
7126
7296
|
try {
|
|
7127
7297
|
return new URL(e, window.location.href).toString();
|
|
7128
7298
|
} catch {
|
|
7129
7299
|
return e;
|
|
7130
7300
|
}
|
|
7131
7301
|
};
|
|
7132
|
-
|
|
7133
|
-
let
|
|
7134
|
-
return
|
|
7135
|
-
if (
|
|
7136
|
-
|
|
7302
|
+
z(() => {
|
|
7303
|
+
let e = !1;
|
|
7304
|
+
return p(), (async () => {
|
|
7305
|
+
if (v(null), b(!1), typeof t != "string") {
|
|
7306
|
+
g(t);
|
|
7137
7307
|
return;
|
|
7138
7308
|
}
|
|
7139
|
-
let n =
|
|
7309
|
+
let n = t.trim();
|
|
7140
7310
|
if (!n) {
|
|
7141
|
-
|
|
7311
|
+
g(null), v({
|
|
7142
7312
|
code: "INVALID_DATA_SOURCE",
|
|
7143
|
-
message: `${
|
|
7313
|
+
message: `${l("common.error")}: empty dataSource url`,
|
|
7144
7314
|
recoverable: !1
|
|
7145
7315
|
});
|
|
7146
7316
|
return;
|
|
7147
7317
|
}
|
|
7148
|
-
let r =
|
|
7149
|
-
|
|
7318
|
+
let r = C(n);
|
|
7319
|
+
b(!0);
|
|
7150
7320
|
try {
|
|
7151
|
-
let
|
|
7152
|
-
if (!
|
|
7153
|
-
|
|
7321
|
+
let t = await Zc(r);
|
|
7322
|
+
if (!t.ok) {
|
|
7323
|
+
g(null), v({
|
|
7154
7324
|
code: "REMOTE_SOURCE_UNAVAILABLE",
|
|
7155
|
-
message:
|
|
7325
|
+
message: Wc(l, t.failure),
|
|
7156
7326
|
recoverable: !0
|
|
7157
7327
|
});
|
|
7158
7328
|
return;
|
|
7159
7329
|
}
|
|
7160
|
-
let n = fs(r) ||
|
|
7330
|
+
let n = fs(r) || t.kind;
|
|
7161
7331
|
if (!n) {
|
|
7162
|
-
|
|
7332
|
+
g(null), v({
|
|
7163
7333
|
code: "UNSUPPORTED_ARCHIVE",
|
|
7164
|
-
message:
|
|
7334
|
+
message: l("validation.unsupportedFormat"),
|
|
7165
7335
|
recoverable: !1
|
|
7166
7336
|
});
|
|
7167
7337
|
return;
|
|
7168
7338
|
}
|
|
7169
|
-
if (
|
|
7170
|
-
|
|
7171
|
-
} catch (
|
|
7172
|
-
if (
|
|
7173
|
-
let n =
|
|
7174
|
-
|
|
7339
|
+
if (e) return;
|
|
7340
|
+
g(gs(r, void 0, n, { accessMode: t.accessMode }));
|
|
7341
|
+
} catch (t) {
|
|
7342
|
+
if (e) return;
|
|
7343
|
+
let n = t instanceof Error ? t.message : String(t);
|
|
7344
|
+
g(null), v({
|
|
7175
7345
|
code: "REMOTE_SOURCE_UNAVAILABLE",
|
|
7176
7346
|
message: n,
|
|
7177
7347
|
recoverable: !0,
|
|
7178
|
-
cause:
|
|
7348
|
+
cause: t
|
|
7179
7349
|
});
|
|
7180
7350
|
} finally {
|
|
7181
|
-
|
|
7351
|
+
e || b(!1);
|
|
7182
7352
|
}
|
|
7183
7353
|
})(), () => {
|
|
7184
|
-
|
|
7354
|
+
e = !0;
|
|
7185
7355
|
};
|
|
7186
7356
|
}, [
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
]),
|
|
7191
|
-
|
|
7192
|
-
}, [
|
|
7193
|
-
|
|
7194
|
-
}, [
|
|
7195
|
-
if (!
|
|
7196
|
-
let e = `${
|
|
7197
|
-
|
|
7198
|
-
}, [
|
|
7199
|
-
let
|
|
7200
|
-
if (
|
|
7201
|
-
|
|
7357
|
+
t,
|
|
7358
|
+
l,
|
|
7359
|
+
p
|
|
7360
|
+
]), z(() => {
|
|
7361
|
+
h && m.current !== h && (m.current = h, u(h));
|
|
7362
|
+
}, [h, u]), z(() => {
|
|
7363
|
+
S || (x.current = null);
|
|
7364
|
+
}, [S]), z(() => {
|
|
7365
|
+
if (!a || !S) return;
|
|
7366
|
+
let e = `${S.code}:${S.message}`;
|
|
7367
|
+
x.current !== e && (x.current = e, a(S));
|
|
7368
|
+
}, [S, a]);
|
|
7369
|
+
let w = R(() => {
|
|
7370
|
+
if (p(), m.current = null, v(null), h) {
|
|
7371
|
+
m.current = h, u(h);
|
|
7202
7372
|
return;
|
|
7203
7373
|
}
|
|
7204
|
-
|
|
7374
|
+
g(null), typeof t != "string" && g(t);
|
|
7205
7375
|
}, [
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7376
|
+
p,
|
|
7377
|
+
h,
|
|
7378
|
+
u,
|
|
7379
|
+
t
|
|
7210
7380
|
]);
|
|
7211
|
-
if (
|
|
7212
|
-
let
|
|
7381
|
+
if (a && S) return null;
|
|
7382
|
+
let E = s || c ? /* @__PURE__ */ W("div", {
|
|
7213
7383
|
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: [
|
|
7384
|
+
children: [s ? /* @__PURE__ */ W(i, {
|
|
7215
7385
|
variant: "ghost",
|
|
7216
7386
|
size: "sm",
|
|
7217
7387
|
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:
|
|
7219
|
-
"aria-label":
|
|
7220
|
-
title:
|
|
7221
|
-
children: [/* @__PURE__ */
|
|
7388
|
+
onClick: s,
|
|
7389
|
+
"aria-label": l("common.back"),
|
|
7390
|
+
title: l("common.back"),
|
|
7391
|
+
children: [/* @__PURE__ */ U(js, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ U("span", {
|
|
7222
7392
|
className: "text-xs font-medium truncate",
|
|
7223
|
-
children:
|
|
7393
|
+
children: l("common.back")
|
|
7224
7394
|
})]
|
|
7225
|
-
}) : /* @__PURE__ */
|
|
7395
|
+
}) : /* @__PURE__ */ U("span", {
|
|
7226
7396
|
className: "flex-1 min-w-0",
|
|
7227
7397
|
"aria-hidden": !0
|
|
7228
|
-
}),
|
|
7398
|
+
}), c ? /* @__PURE__ */ W(i, {
|
|
7229
7399
|
variant: "ghost",
|
|
7230
7400
|
size: "sm",
|
|
7231
7401
|
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:
|
|
7233
|
-
"aria-label":
|
|
7234
|
-
title:
|
|
7235
|
-
children: [/* @__PURE__ */
|
|
7402
|
+
onClick: c,
|
|
7403
|
+
"aria-label": l("navbar.export", "Export"),
|
|
7404
|
+
title: l("navbar.export", "Export"),
|
|
7405
|
+
children: [/* @__PURE__ */ U(e, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ U("span", {
|
|
7236
7406
|
className: "text-xs font-medium truncate",
|
|
7237
|
-
children:
|
|
7407
|
+
children: l("navbar.export", "Export")
|
|
7238
7408
|
})]
|
|
7239
|
-
}) : /* @__PURE__ */
|
|
7409
|
+
}) : /* @__PURE__ */ U("span", {
|
|
7240
7410
|
className: "flex-1 min-w-0",
|
|
7241
7411
|
"aria-hidden": !0
|
|
7242
7412
|
})]
|
|
7243
|
-
}) : null,
|
|
7244
|
-
title:
|
|
7245
|
-
message:
|
|
7246
|
-
errorDetail:
|
|
7247
|
-
onRetry:
|
|
7248
|
-
}) : /* @__PURE__ */
|
|
7413
|
+
}) : null, D = S ? /* @__PURE__ */ U($l, {
|
|
7414
|
+
title: l("common.error"),
|
|
7415
|
+
message: l("errors.loadFailed"),
|
|
7416
|
+
errorDetail: S.message,
|
|
7417
|
+
onRetry: w
|
|
7418
|
+
}) : /* @__PURE__ */ U("div", {
|
|
7249
7419
|
className: "w-full h-full flex items-center justify-center text-muted-foreground",
|
|
7250
7420
|
role: "status",
|
|
7251
7421
|
"aria-live": "polite",
|
|
7252
|
-
children: /* @__PURE__ */
|
|
7422
|
+
children: /* @__PURE__ */ W("div", {
|
|
7253
7423
|
className: "flex items-center gap-3",
|
|
7254
|
-
children: [/* @__PURE__ */
|
|
7424
|
+
children: [/* @__PURE__ */ U("div", {
|
|
7255
7425
|
className: "h-5 w-5 border-2 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
|
|
7256
7426
|
"aria-hidden": !0
|
|
7257
|
-
}), /* @__PURE__ */
|
|
7427
|
+
}), /* @__PURE__ */ U("span", {
|
|
7258
7428
|
className: "text-sm",
|
|
7259
|
-
children:
|
|
7429
|
+
children: l(y || f ? "common.initializing" : "common.loading")
|
|
7260
7430
|
})]
|
|
7261
7431
|
})
|
|
7262
7432
|
});
|
|
7263
|
-
return /* @__PURE__ */
|
|
7264
|
-
showSidebar:
|
|
7265
|
-
showPlaybackBar:
|
|
7433
|
+
return /* @__PURE__ */ U(tu, {
|
|
7434
|
+
showSidebar: n,
|
|
7435
|
+
showPlaybackBar: r,
|
|
7266
7436
|
showToaster: !1,
|
|
7267
|
-
sidebar: /* @__PURE__ */
|
|
7268
|
-
sidebarHeader:
|
|
7269
|
-
emptyState:
|
|
7270
|
-
onRetry:
|
|
7437
|
+
sidebar: /* @__PURE__ */ U(Wl, {}),
|
|
7438
|
+
sidebarHeader: E,
|
|
7439
|
+
emptyState: D,
|
|
7440
|
+
onRetry: w
|
|
7271
7441
|
});
|
|
7272
7442
|
}
|
|
7273
|
-
var
|
|
7443
|
+
var ru = ({ 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(Nl, {
|
|
7274
7444
|
theme: t,
|
|
7275
7445
|
language: n,
|
|
7276
7446
|
className: a,
|
|
7277
7447
|
showToaster: !0,
|
|
7278
|
-
children: /* @__PURE__ */
|
|
7448
|
+
children: /* @__PURE__ */ U(nu, {
|
|
7279
7449
|
dataSource: e,
|
|
7280
7450
|
showSidebar: r,
|
|
7281
7451
|
showPlaybackBar: i,
|
|
@@ -7287,11 +7457,14 @@ var Zl = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlayb
|
|
|
7287
7457
|
});
|
|
7288
7458
|
//#endregion
|
|
7289
7459
|
//#region src/react/public-api.ts
|
|
7290
|
-
function
|
|
7460
|
+
function iu(e) {
|
|
7291
7461
|
return _s(e);
|
|
7292
7462
|
}
|
|
7293
|
-
function
|
|
7463
|
+
function au(e) {
|
|
7294
7464
|
return gs(e);
|
|
7295
7465
|
}
|
|
7466
|
+
function ou(e) {
|
|
7467
|
+
return new bs(e);
|
|
7468
|
+
}
|
|
7296
7469
|
//#endregion
|
|
7297
|
-
export {
|
|
7470
|
+
export { ru as LeRobotViewer, iu as createArchiveDataSourceFromFile, au as createArchiveDataSourceFromUrl, ou as createRemoteManifestDataSource };
|