@ioai/lerobot-studio 1.0.3 → 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 +6 -0
- package/dist-lib/lerobot.d.ts +21 -0
- package/dist-lib/lerobot.es.js +497 -385
- package/package.json +1 -1
package/dist-lib/lerobot.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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
2
|
import { r as I, t as ue } from "./workerManager-D6ovn2ln.js";
|
|
3
3
|
import * as de from "react";
|
|
4
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";
|
|
@@ -1603,16 +1603,16 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
|
|
|
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
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
1618
|
let I = new Si(o);
|
|
@@ -1669,8 +1669,8 @@ 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
|
-
|
|
1672
|
+
let { onstart: oe, onprogress: se, onend: P } = r, F = d == 9, ce = q(i, r, Ii);
|
|
1673
|
+
F && (ce = !1);
|
|
1674
1674
|
let le = {
|
|
1675
1675
|
options: {
|
|
1676
1676
|
codecType: An,
|
|
@@ -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({
|
|
@@ -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 le = a - j, I = Math.min(j,
|
|
2626
|
+
var le = a - j, I = Math.min(j, ce);
|
|
2627
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,12 +3543,121 @@ 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
|
};
|
|
@@ -3559,11 +3668,11 @@ var ys = Object.defineProperty, bs = (e, t) => ys(e, "name", {
|
|
|
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 = s("inline-flex w-fit shrink-0 items-center justify-center gap-
|
|
|
3574
3683
|
} },
|
|
3575
3684
|
defaultVariants: { variant: "default" }
|
|
3576
3685
|
});
|
|
3577
|
-
function
|
|
3686
|
+
function As({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
|
|
3578
3687
|
return /* @__PURE__ */ U(n ? se : "span", {
|
|
3579
3688
|
"data-slot": "badge",
|
|
3580
3689
|
"data-variant": t,
|
|
3581
|
-
className: D(
|
|
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 = f("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 = f("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 = f("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 = f("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 = f("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 = f("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 = f("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 = f("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 = f("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,13 +3914,13 @@ var Os = f("arrow-left", [["path", {
|
|
|
3805
3914
|
}]]);
|
|
3806
3915
|
//#endregion
|
|
3807
3916
|
//#region src/ui/components/ui/dialog.tsx
|
|
3808
|
-
function
|
|
3917
|
+
function Js({ ...e }) {
|
|
3809
3918
|
return /* @__PURE__ */ U(g, {
|
|
3810
3919
|
"data-slot": "dialog",
|
|
3811
3920
|
...e
|
|
3812
3921
|
});
|
|
3813
3922
|
}
|
|
3814
|
-
function
|
|
3923
|
+
function Ys({ container: e, ...t }) {
|
|
3815
3924
|
let n = k();
|
|
3816
3925
|
return /* @__PURE__ */ U(c, {
|
|
3817
3926
|
"data-slot": "dialog-portal",
|
|
@@ -3819,17 +3928,17 @@ function Ks({ container: e, ...t }) {
|
|
|
3819
3928
|
...t
|
|
3820
3929
|
});
|
|
3821
3930
|
}
|
|
3822
|
-
function
|
|
3931
|
+
function Xs({ className: e, ...t }) {
|
|
3823
3932
|
return /* @__PURE__ */ U(a, {
|
|
3824
3933
|
"data-slot": "dialog-overlay",
|
|
3825
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__ */ W(
|
|
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__ */ U(
|
|
3941
|
+
children: [/* @__PURE__ */ U(Xs, {}), /* @__PURE__ */ W(h, {
|
|
3833
3942
|
"data-slot": "dialog-content",
|
|
3834
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),
|
|
3835
3944
|
...i,
|
|
@@ -3844,14 +3953,14 @@ function Js({ className: e, children: n, showCloseButton: r = !0, ...i }) {
|
|
|
3844
3953
|
})]
|
|
3845
3954
|
});
|
|
3846
3955
|
}
|
|
3847
|
-
function
|
|
3956
|
+
function Qs({ className: e, ...t }) {
|
|
3848
3957
|
return /* @__PURE__ */ U("div", {
|
|
3849
3958
|
"data-slot": "dialog-header",
|
|
3850
3959
|
className: D("flex flex-col gap-2 text-center sm:text-left", e),
|
|
3851
3960
|
...t
|
|
3852
3961
|
});
|
|
3853
3962
|
}
|
|
3854
|
-
function
|
|
3963
|
+
function $s({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
3855
3964
|
return /* @__PURE__ */ W("div", {
|
|
3856
3965
|
"data-slot": "dialog-footer",
|
|
3857
3966
|
className: D("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
@@ -3865,14 +3974,14 @@ function Xs({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
|
3865
3974
|
})]
|
|
3866
3975
|
});
|
|
3867
3976
|
}
|
|
3868
|
-
function
|
|
3977
|
+
function ec({ className: e, ...t }) {
|
|
3869
3978
|
return /* @__PURE__ */ U(M, {
|
|
3870
3979
|
"data-slot": "dialog-title",
|
|
3871
3980
|
className: D("text-lg leading-none font-semibold text-foreground", e),
|
|
3872
3981
|
...t
|
|
3873
3982
|
});
|
|
3874
3983
|
}
|
|
3875
|
-
function
|
|
3984
|
+
function tc({ className: e, ...t }) {
|
|
3876
3985
|
return /* @__PURE__ */ U(_, {
|
|
3877
3986
|
"data-slot": "dialog-description",
|
|
3878
3987
|
className: D("text-sm text-muted-foreground", e),
|
|
@@ -3881,8 +3990,8 @@ function Qs({ className: e, ...t }) {
|
|
|
3881
3990
|
}
|
|
3882
3991
|
//#endregion
|
|
3883
3992
|
//#region src/ui/components/ui/separator.tsx
|
|
3884
|
-
function
|
|
3885
|
-
return /* @__PURE__ */ U(
|
|
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,
|
|
@@ -3892,7 +4001,7 @@ function $s({ className: e, orientation: t = "horizontal", decorative: n = !0, .
|
|
|
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,10 +4020,10 @@ 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
|
-
},
|
|
4026
|
+
}, oc = () => de.useContext(ic) ?? ac;
|
|
3918
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,
|
|
@@ -3930,31 +4039,31 @@ de.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableC
|
|
|
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__*/ L.createElement("div", { className: "sonner-spinner" },
|
|
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",
|
|
@@ -3964,7 +4073,7 @@ var ac = (e) => {
|
|
|
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",
|
|
@@ -3974,7 +4083,7 @@ var ac = (e) => {
|
|
|
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",
|
|
@@ -3984,7 +4093,7 @@ var ac = (e) => {
|
|
|
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",
|
|
@@ -3994,7 +4103,7 @@ var ac = (e) => {
|
|
|
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",
|
|
@@ -4014,7 +4123,7 @@ var ac = (e) => {
|
|
|
4014
4123
|
y1: "6",
|
|
4015
4124
|
x2: "18",
|
|
4016
4125
|
y2: "18"
|
|
4017
|
-
})),
|
|
4126
|
+
})), gc = () => {
|
|
4018
4127
|
let [e, t] = L.useState(document.hidden);
|
|
4019
4128
|
return L.useEffect(() => {
|
|
4020
4129
|
let e = () => {
|
|
@@ -4022,7 +4131,7 @@ var ac = (e) => {
|
|
|
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,
|
|
@@ -4097,7 +4206,7 @@ var ac = (e) => {
|
|
|
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
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({
|
|
@@ -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,50 +4258,50 @@ 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] = 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), [
|
|
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";
|
|
4187
4296
|
H.current = L.useMemo(() => he * x + ve, [he, ve]), L.useEffect(() => {
|
|
4188
|
-
|
|
4297
|
+
ce.current = B;
|
|
4189
4298
|
}, [B]), L.useEffect(() => {
|
|
4190
4299
|
ne(!0);
|
|
4191
4300
|
}, []), L.useEffect(() => {
|
|
4192
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
|
|
@@ -4203,7 +4312,7 @@ var Ac = (e) => {
|
|
|
4203
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) : [{
|
|
@@ -4224,7 +4333,7 @@ var Ac = (e) => {
|
|
|
4224
4333
|
let G = L.useCallback(() => {
|
|
4225
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,
|
|
@@ -4237,12 +4346,12 @@ var Ac = (e) => {
|
|
|
4237
4346
|
return u || i || ye ? (() => {
|
|
4238
4347
|
if (ge.current < V.current) {
|
|
4239
4348
|
let e = (/* @__PURE__ */ new Date()).getTime() - V.current;
|
|
4240
|
-
|
|
4349
|
+
ce.current -= e;
|
|
4241
4350
|
}
|
|
4242
4351
|
ge.current = (/* @__PURE__ */ new Date()).getTime();
|
|
4243
|
-
})() :
|
|
4352
|
+
})() : ce.current !== Infinity && (V.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
|
|
4244
4353
|
n.onAutoClose == null || n.onAutoClose.call(n, n), G();
|
|
4245
|
-
},
|
|
4354
|
+
}, ce.current)), () => clearTimeout(e);
|
|
4246
4355
|
}, [
|
|
4247
4356
|
u,
|
|
4248
4357
|
i,
|
|
@@ -4255,18 +4364,18 @@ var Ac = (e) => {
|
|
|
4255
4364
|
}, [G, n.delete]);
|
|
4256
4365
|
function Se() {
|
|
4257
4366
|
return w?.loading ? /*#__PURE__*/ L.createElement("div", {
|
|
4258
|
-
className:
|
|
4367
|
+
className: jc(C?.loader, n?.classNames?.loader, "sonner-loader"),
|
|
4259
4368
|
"data-visible": fe === "loading"
|
|
4260
|
-
}, w.loading) : /*#__PURE__*/ L.createElement(
|
|
4261
|
-
className:
|
|
4369
|
+
}, w.loading) : /*#__PURE__*/ L.createElement(uc, {
|
|
4370
|
+
className: jc(C?.loader, n?.classNames?.loader),
|
|
4262
4371
|
visible: fe === "loading"
|
|
4263
4372
|
});
|
|
4264
4373
|
}
|
|
4265
|
-
let Ce = n.icon || w?.[fe] ||
|
|
4374
|
+
let Ce = n.icon || w?.[fe] || cc(fe);
|
|
4266
4375
|
return /*#__PURE__*/ L.createElement("li", {
|
|
4267
4376
|
tabIndex: 0,
|
|
4268
4377
|
ref: I,
|
|
4269
|
-
className:
|
|
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),
|
|
@@ -4292,7 +4401,7 @@ var Ac = (e) => {
|
|
|
4292
4401
|
"--toasts-before": c,
|
|
4293
4402
|
"--z-index": l.length - c,
|
|
4294
4403
|
"--offset": `${k ? oe : H.current}px`,
|
|
4295
|
-
"--initial-height": S ? "auto" : `${
|
|
4404
|
+
"--initial-height": S ? "auto" : `${P}px`,
|
|
4296
4405
|
...m,
|
|
4297
4406
|
...n.style
|
|
4298
4407
|
},
|
|
@@ -4309,7 +4418,7 @@ var Ac = (e) => {
|
|
|
4309
4418
|
if (ie || !pe) return;
|
|
4310
4419
|
U.current = null;
|
|
4311
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;
|
|
4312
|
-
if (Math.abs(i) >=
|
|
4421
|
+
if (Math.abs(i) >= kc || a > .11) {
|
|
4313
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
|
}
|
|
@@ -4319,7 +4428,7 @@ var Ac = (e) => {
|
|
|
4319
4428
|
onPointerMove: (t) => {
|
|
4320
4429
|
var n, r;
|
|
4321
4430
|
if (!U.current || !pe || window.getSelection()?.toString().length > 0) return;
|
|
4322
|
-
let i = t.clientY - U.current.y, a = t.clientX - U.current.x, o = e.swipeDirections ??
|
|
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,
|
|
@@ -4345,46 +4454,46 @@ var Ac = (e) => {
|
|
|
4345
4454
|
onClick: xe || !pe ? () => {} : () => {
|
|
4346
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:
|
|
4460
|
+
className: jc(C?.icon, n?.classNames?.icon)
|
|
4352
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:
|
|
4463
|
+
className: jc(C?.content, n?.classNames?.content)
|
|
4355
4464
|
}, /*#__PURE__*/ L.createElement("div", {
|
|
4356
4465
|
"data-title": "",
|
|
4357
|
-
className:
|
|
4466
|
+
className: jc(C?.title, n?.classNames?.title)
|
|
4358
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__*/ L.isValidElement(n.cancel) ? n.cancel : n.cancel &&
|
|
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__*/ L.isValidElement(n.action) ? n.action : n.action &&
|
|
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 L.useEffect(() =>
|
|
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 ? {
|
|
@@ -4481,7 +4590,7 @@ var Nc = /*#__PURE__*/ L.forwardRef(function(e, t) {
|
|
|
4481
4590
|
let [i, a] = t.split("-");
|
|
4482
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__*/ L.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__*/ L.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__*/ L.createElement(
|
|
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,16 +4651,16 @@ var Nc = /*#__PURE__*/ L.forwardRef(function(e, t) {
|
|
|
4542
4651
|
swipeDirections: e.swipeDirections
|
|
4543
4652
|
}))) : null;
|
|
4544
4653
|
}));
|
|
4545
|
-
}),
|
|
4546
|
-
let { theme: t = "system" } =
|
|
4547
|
-
return /* @__PURE__ */ U(
|
|
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__ */ U(
|
|
4552
|
-
info: /* @__PURE__ */ U(
|
|
4553
|
-
warning: /* @__PURE__ */ U(
|
|
4554
|
-
error: /* @__PURE__ */ U(
|
|
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" }),
|
|
4555
4664
|
loading: /* @__PURE__ */ U(te, { className: "size-4 animate-spin" })
|
|
4556
4665
|
},
|
|
4557
4666
|
style: {
|
|
@@ -4565,7 +4674,7 @@ var Nc = /*#__PURE__*/ L.forwardRef(function(e, t) {
|
|
|
4565
4674
|
};
|
|
4566
4675
|
//#endregion
|
|
4567
4676
|
//#region src/ui/components/ui/textarea.tsx
|
|
4568
|
-
function
|
|
4677
|
+
function Rc({ className: e, ...t }) {
|
|
4569
4678
|
return /* @__PURE__ */ U("textarea", {
|
|
4570
4679
|
"data-slot": "textarea",
|
|
4571
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),
|
|
@@ -4574,15 +4683,15 @@ function Fc({ className: e, ...t }) {
|
|
|
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 Bc = {
|
|
|
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 Uc(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,12 +4739,12 @@ function Gc() {
|
|
|
4630
4739
|
}
|
|
4631
4740
|
};
|
|
4632
4741
|
}
|
|
4633
|
-
function
|
|
4742
|
+
function Yc(e) {
|
|
4634
4743
|
if (e instanceof DOMException && (e.name === "TimeoutError" || e.name === "AbortError")) return !0;
|
|
4635
4744
|
let t = String(e?.message || e).toLowerCase();
|
|
4636
4745
|
return t.includes("timeout") || t.includes("timed out") || t.includes("aborted");
|
|
4637
4746
|
}
|
|
4638
|
-
function
|
|
4747
|
+
function Xc(e) {
|
|
4639
4748
|
let t = new AbortController(), n = setTimeout(() => {
|
|
4640
4749
|
t.abort();
|
|
4641
4750
|
}, e);
|
|
@@ -4644,7 +4753,7 @@ function qc(e) {
|
|
|
4644
4753
|
cancel: () => clearTimeout(n)
|
|
4645
4754
|
};
|
|
4646
4755
|
}
|
|
4647
|
-
async function
|
|
4756
|
+
async function Zc(e) {
|
|
4648
4757
|
let t;
|
|
4649
4758
|
try {
|
|
4650
4759
|
let n = new URL(e);
|
|
@@ -4667,12 +4776,12 @@ async function Jc(e) {
|
|
|
4667
4776
|
}
|
|
4668
4777
|
};
|
|
4669
4778
|
}
|
|
4670
|
-
let { signal: n, cancel: r } =
|
|
4779
|
+
let { signal: n, cancel: r } = Xc(Bc);
|
|
4671
4780
|
try {
|
|
4672
4781
|
let r = await fetch(t, {
|
|
4673
4782
|
headers: { Range: "bytes=0-511" },
|
|
4674
4783
|
signal: n
|
|
4675
|
-
}), i =
|
|
4784
|
+
}), i = Gc(r.headers);
|
|
4676
4785
|
if (r.status === 200) {
|
|
4677
4786
|
if (i !== void 0 && i > 2147483648) return await r.body?.cancel().catch(() => void 0), {
|
|
4678
4787
|
ok: !1,
|
|
@@ -4682,13 +4791,13 @@ async function Jc(e) {
|
|
|
4682
4791
|
actualStatus: r.status
|
|
4683
4792
|
}
|
|
4684
4793
|
};
|
|
4685
|
-
let t = await
|
|
4794
|
+
let t = await Kc(r, 512), n = qc(e, r.headers, t);
|
|
4686
4795
|
return n ? {
|
|
4687
4796
|
ok: !0,
|
|
4688
4797
|
kind: n,
|
|
4689
4798
|
accessMode: "full",
|
|
4690
4799
|
contentLength: i
|
|
4691
|
-
} :
|
|
4800
|
+
} : Jc();
|
|
4692
4801
|
}
|
|
4693
4802
|
if (r.status !== 206) return {
|
|
4694
4803
|
ok: !1,
|
|
@@ -4704,26 +4813,26 @@ async function Jc(e) {
|
|
|
4704
4813
|
kind: "range",
|
|
4705
4814
|
failure: {
|
|
4706
4815
|
code: "range_headers",
|
|
4707
|
-
headerSummary:
|
|
4816
|
+
headerSummary: Hc(a, o)
|
|
4708
4817
|
}
|
|
4709
4818
|
};
|
|
4710
|
-
let s = await
|
|
4819
|
+
let s = await Kc(r, 512), c = qc(e, r.headers, s);
|
|
4711
4820
|
return c ? {
|
|
4712
4821
|
ok: !0,
|
|
4713
4822
|
kind: c,
|
|
4714
4823
|
accessMode: "range",
|
|
4715
4824
|
contentLength: i
|
|
4716
|
-
} :
|
|
4825
|
+
} : Jc();
|
|
4717
4826
|
} catch (e) {
|
|
4718
|
-
if (
|
|
4827
|
+
if (Yc(e)) return {
|
|
4719
4828
|
ok: !1,
|
|
4720
4829
|
kind: "network",
|
|
4721
4830
|
failure: {
|
|
4722
4831
|
code: "network",
|
|
4723
|
-
detail: `Preflight timed out after ${
|
|
4832
|
+
detail: `Preflight timed out after ${Bc / 1e3}s`
|
|
4724
4833
|
}
|
|
4725
4834
|
};
|
|
4726
|
-
let t =
|
|
4835
|
+
let t = Vc(e.message || String(e)), n = t.toLowerCase();
|
|
4727
4836
|
return n.includes("cors") ? {
|
|
4728
4837
|
ok: !1,
|
|
4729
4838
|
kind: "cors",
|
|
@@ -4752,44 +4861,44 @@ async function Jc(e) {
|
|
|
4752
4861
|
}
|
|
4753
4862
|
//#endregion
|
|
4754
4863
|
//#region src/core/playback/episodeLoadPlan.ts
|
|
4755
|
-
function
|
|
4864
|
+
function Qc(e) {
|
|
4756
4865
|
if (!e?.dtype) return !1;
|
|
4757
4866
|
let t = e.dtype.toLowerCase();
|
|
4758
4867
|
return t.includes("float") || t.includes("int") || t.includes("double") || t.includes("decimal");
|
|
4759
4868
|
}
|
|
4760
|
-
function
|
|
4869
|
+
function $c(e) {
|
|
4761
4870
|
return e === "observation" || e.startsWith("observation.") || e === "action" || e.startsWith("action.");
|
|
4762
4871
|
}
|
|
4763
|
-
function
|
|
4872
|
+
function el(e) {
|
|
4764
4873
|
let t = /* @__PURE__ */ new Set(["timestamp"]);
|
|
4765
4874
|
return Object.entries(e.features).forEach(([e, n]) => {
|
|
4766
|
-
|
|
4875
|
+
$c(e) && Qc(n) && t.add(e);
|
|
4767
4876
|
}), Array.from(t);
|
|
4768
4877
|
}
|
|
4769
|
-
function
|
|
4878
|
+
function tl(e, t) {
|
|
4770
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);
|
|
4771
4880
|
return Array.from({ length: i }, (e, n) => ({
|
|
4772
4881
|
frame_index: n,
|
|
4773
4882
|
timestamp: r[n] ?? n / Math.max(1, t)
|
|
4774
4883
|
}));
|
|
4775
4884
|
}
|
|
4776
|
-
function
|
|
4885
|
+
function nl(e, t) {
|
|
4777
4886
|
return e.find((e) => !t.has(e.episode_index))?.episode_index ?? null;
|
|
4778
4887
|
}
|
|
4779
4888
|
//#endregion
|
|
4780
4889
|
//#region src/core/playback/playbackAutoplay.ts
|
|
4781
|
-
function
|
|
4890
|
+
function rl(e) {
|
|
4782
4891
|
return e.totalFrames <= 0 || e.isLoading || e.isPlaying || e.userPaused ? !1 : e.lastAutoPlayId !== e.currentId;
|
|
4783
4892
|
}
|
|
4784
4893
|
//#endregion
|
|
4785
4894
|
//#region src/core/utils/episodeKeyboard.ts
|
|
4786
|
-
var
|
|
4895
|
+
var il = (e) => e === "Enter";
|
|
4787
4896
|
//#endregion
|
|
4788
4897
|
//#region src/platform/services/ParquetImageService.ts
|
|
4789
|
-
function
|
|
4898
|
+
function al() {
|
|
4790
4899
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
4791
4900
|
}
|
|
4792
|
-
var
|
|
4901
|
+
var ol = class {
|
|
4793
4902
|
worker = null;
|
|
4794
4903
|
rawWorker = null;
|
|
4795
4904
|
dataSource = null;
|
|
@@ -4865,7 +4974,7 @@ var rl = class {
|
|
|
4865
4974
|
}
|
|
4866
4975
|
async preloadEpisode(e, t, n, r, i) {
|
|
4867
4976
|
this.assertActive(), await this.getWorker(), this.currentPreloadKey = r;
|
|
4868
|
-
let a =
|
|
4977
|
+
let a = al(), o = new Promise((e, t) => {
|
|
4869
4978
|
this.pendingPreloadCallbacks.set(a, {
|
|
4870
4979
|
resolve: e,
|
|
4871
4980
|
reject: t,
|
|
@@ -4883,7 +4992,7 @@ var rl = class {
|
|
|
4883
4992
|
}
|
|
4884
4993
|
async getFrameBitmap(e, t, n) {
|
|
4885
4994
|
if (this.disposed || !this.rawWorker) return null;
|
|
4886
|
-
let r =
|
|
4995
|
+
let r = al(), i = new Promise((e, t) => {
|
|
4887
4996
|
this.pendingBitmapCallbacks.set(r, {
|
|
4888
4997
|
resolve: e,
|
|
4889
4998
|
reject: t
|
|
@@ -4988,13 +5097,13 @@ var rl = class {
|
|
|
4988
5097
|
});
|
|
4989
5098
|
}
|
|
4990
5099
|
};
|
|
4991
|
-
function
|
|
4992
|
-
return new
|
|
5100
|
+
function sl() {
|
|
5101
|
+
return new ol();
|
|
4993
5102
|
}
|
|
4994
|
-
new
|
|
5103
|
+
new ol();
|
|
4995
5104
|
//#endregion
|
|
4996
5105
|
//#region src/platform/utils/storage.ts
|
|
4997
|
-
var
|
|
5106
|
+
var cl = {
|
|
4998
5107
|
getItem(e) {
|
|
4999
5108
|
if (typeof window > "u") return null;
|
|
5000
5109
|
try {
|
|
@@ -5036,8 +5145,8 @@ var al = {
|
|
|
5036
5145
|
return console.error(`[safeStorage] Failed to stringify JSON for "${e}":`, t), !1;
|
|
5037
5146
|
}
|
|
5038
5147
|
}
|
|
5039
|
-
},
|
|
5040
|
-
let r = t !== void 0, [i, a] = H(() => r ? t :
|
|
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);
|
|
5041
5150
|
return z(() => {
|
|
5042
5151
|
let e = () => {
|
|
5043
5152
|
let e;
|
|
@@ -5053,13 +5162,13 @@ var al = {
|
|
|
5053
5162
|
value: {
|
|
5054
5163
|
theme: o,
|
|
5055
5164
|
setTheme: (e) => {
|
|
5056
|
-
a(e), r ||
|
|
5165
|
+
a(e), r || cl.setItem("theme", e);
|
|
5057
5166
|
},
|
|
5058
5167
|
resolvedTheme: s
|
|
5059
5168
|
},
|
|
5060
5169
|
children: e
|
|
5061
5170
|
});
|
|
5062
|
-
},
|
|
5171
|
+
}, ul = pe(null), dl = ({ children: e }) => {
|
|
5063
5172
|
let [t, n] = H([]), r = R((e) => {
|
|
5064
5173
|
n((t) => {
|
|
5065
5174
|
let n = t.findIndex((t) => t.id === e.id);
|
|
@@ -5094,49 +5203,49 @@ var al = {
|
|
|
5094
5203
|
a,
|
|
5095
5204
|
o
|
|
5096
5205
|
]);
|
|
5097
|
-
return /* @__PURE__ */ U(
|
|
5206
|
+
return /* @__PURE__ */ U(ul.Provider, {
|
|
5098
5207
|
value: s,
|
|
5099
5208
|
children: e
|
|
5100
5209
|
});
|
|
5101
|
-
},
|
|
5102
|
-
let e = he(
|
|
5210
|
+
}, fl = () => {
|
|
5211
|
+
let e = he(ul);
|
|
5103
5212
|
if (!e) throw Error("useLoading must be used within LoadingProvider");
|
|
5104
5213
|
return e;
|
|
5105
|
-
},
|
|
5214
|
+
}, pl = pe(null), ml = ({ children: e }) => {
|
|
5106
5215
|
let t = R((e, t = "info", n = 3e3) => {
|
|
5107
5216
|
let r = { duration: n };
|
|
5108
5217
|
switch (t) {
|
|
5109
5218
|
case "success":
|
|
5110
|
-
|
|
5219
|
+
xc.success(e, r);
|
|
5111
5220
|
break;
|
|
5112
5221
|
case "error":
|
|
5113
|
-
|
|
5222
|
+
xc.error(e, r);
|
|
5114
5223
|
break;
|
|
5115
5224
|
case "warning":
|
|
5116
|
-
|
|
5225
|
+
xc.warning(e, r);
|
|
5117
5226
|
break;
|
|
5118
|
-
default:
|
|
5227
|
+
default: xc.info(e, r);
|
|
5119
5228
|
}
|
|
5120
5229
|
}, []), n = R((e) => {
|
|
5121
|
-
e ?
|
|
5230
|
+
e ? xc.dismiss(e) : xc.dismiss();
|
|
5122
5231
|
}, []), r = B(() => ({
|
|
5123
5232
|
showToast: t,
|
|
5124
5233
|
dismissToast: n
|
|
5125
5234
|
}), [t, n]);
|
|
5126
|
-
return /* @__PURE__ */ U(
|
|
5235
|
+
return /* @__PURE__ */ U(pl.Provider, {
|
|
5127
5236
|
value: r,
|
|
5128
5237
|
children: e
|
|
5129
5238
|
});
|
|
5130
5239
|
};
|
|
5131
5240
|
//#endregion
|
|
5132
5241
|
//#region src/react/contexts/versionMutationPolicy.ts
|
|
5133
|
-
function
|
|
5242
|
+
function hl(e) {
|
|
5134
5243
|
if (e?.status !== "supported") {
|
|
5135
5244
|
let t = e?.normalizedVersion ?? "unknown", n = e?.status ?? "unavailable";
|
|
5136
5245
|
throw Error(`Episode mutations are disabled for LeRobot ${t} (${n}); the dataset is immutable`);
|
|
5137
5246
|
}
|
|
5138
5247
|
}
|
|
5139
|
-
function
|
|
5248
|
+
function gl(e) {
|
|
5140
5249
|
return {
|
|
5141
5250
|
tasks: [e],
|
|
5142
5251
|
task_index: void 0
|
|
@@ -5144,38 +5253,38 @@ function pl(e) {
|
|
|
5144
5253
|
}
|
|
5145
5254
|
//#endregion
|
|
5146
5255
|
//#region src/react/contexts/useEpisodeView.ts
|
|
5147
|
-
function
|
|
5256
|
+
function _l(e, t) {
|
|
5148
5257
|
let n = t.get(e.episode_index);
|
|
5149
5258
|
return n ? {
|
|
5150
5259
|
...e,
|
|
5151
5260
|
...n
|
|
5152
5261
|
} : e;
|
|
5153
5262
|
}
|
|
5154
|
-
function
|
|
5155
|
-
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));
|
|
5156
5265
|
}
|
|
5157
|
-
function
|
|
5266
|
+
function yl(e, t) {
|
|
5158
5267
|
return t.size === 0 ? e : e.filter((e) => t.has(e.episode_index));
|
|
5159
5268
|
}
|
|
5160
|
-
function
|
|
5269
|
+
function bl(e, t) {
|
|
5161
5270
|
let n = new Set(e);
|
|
5162
5271
|
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
5163
5272
|
}
|
|
5164
|
-
function
|
|
5273
|
+
function xl({ episodes: e, versionCapability: t }) {
|
|
5165
5274
|
let [n, r] = H(() => /* @__PURE__ */ new Map()), [i, a] = H(() => /* @__PURE__ */ new Set()), [o, s] = H(() => /* @__PURE__ */ new Set()), c = R((n, i) => {
|
|
5166
|
-
|
|
5275
|
+
hl(t), r((t) => {
|
|
5167
5276
|
if (!e.some((e) => e.episode_index === n)) return t;
|
|
5168
5277
|
let r = new Map(t);
|
|
5169
|
-
return r.set(n,
|
|
5278
|
+
return r.set(n, gl(i)), r;
|
|
5170
5279
|
});
|
|
5171
5280
|
}, [e, t]), l = R((e) => {
|
|
5172
|
-
|
|
5281
|
+
hl(t), a((t) => new Set(t).add(e));
|
|
5173
5282
|
}, [t]), u = R((e) => {
|
|
5174
|
-
|
|
5283
|
+
hl(t), a((t) => {
|
|
5175
5284
|
let n = new Set(t);
|
|
5176
5285
|
return n.delete(e), n;
|
|
5177
5286
|
});
|
|
5178
|
-
}, [t]), d = R((e) =>
|
|
5287
|
+
}, [t]), d = R((e) => _l(e, n), [n]), f = B(() => vl(e, i, n), [
|
|
5179
5288
|
e,
|
|
5180
5289
|
i,
|
|
5181
5290
|
n
|
|
@@ -5188,13 +5297,13 @@ function vl({ episodes: e, versionCapability: t }) {
|
|
|
5188
5297
|
selectedEpisodeIndices: o,
|
|
5189
5298
|
setSelectedEpisodeIndices: s,
|
|
5190
5299
|
effectiveEpisodes: f,
|
|
5191
|
-
episodesForExport: B(() =>
|
|
5300
|
+
episodesForExport: B(() => yl(f, o), [f, o]),
|
|
5192
5301
|
editEpisodeTask: c,
|
|
5193
5302
|
deleteEpisode: l,
|
|
5194
5303
|
restoreEpisode: u,
|
|
5195
5304
|
getEffectiveEpisode: d,
|
|
5196
5305
|
toggleEpisodeSelection: R((e) => {
|
|
5197
|
-
s((t) =>
|
|
5306
|
+
s((t) => bl(t, e));
|
|
5198
5307
|
}, []),
|
|
5199
5308
|
selectAllInList: R((e) => {
|
|
5200
5309
|
s(new Set(e));
|
|
@@ -5206,7 +5315,7 @@ function vl({ episodes: e, versionCapability: t }) {
|
|
|
5206
5315
|
}
|
|
5207
5316
|
//#endregion
|
|
5208
5317
|
//#region src/react/contexts/useFeatureSubscriptions.ts
|
|
5209
|
-
function
|
|
5318
|
+
function Sl(e) {
|
|
5210
5319
|
let t = [];
|
|
5211
5320
|
for (let n = 0; n < e.rows; n++) {
|
|
5212
5321
|
let r = n * e.width;
|
|
@@ -5214,10 +5323,10 @@ function yl(e) {
|
|
|
5214
5323
|
}
|
|
5215
5324
|
return t;
|
|
5216
5325
|
}
|
|
5217
|
-
function
|
|
5326
|
+
function Cl(e) {
|
|
5218
5327
|
return e?.dtype === "image" || e?.dtype === "video";
|
|
5219
5328
|
}
|
|
5220
|
-
var
|
|
5329
|
+
var wl = class {
|
|
5221
5330
|
subscriptions = {};
|
|
5222
5331
|
pending = /* @__PURE__ */ new Set();
|
|
5223
5332
|
loading = /* @__PURE__ */ new Set();
|
|
@@ -5230,13 +5339,13 @@ var xl = class {
|
|
|
5230
5339
|
subscribe(e) {
|
|
5231
5340
|
this.subscriptions[e] = (this.subscriptions[e] ?? 0) + 1;
|
|
5232
5341
|
let t = this.options.getSnapshot();
|
|
5233
|
-
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();
|
|
5234
5343
|
}
|
|
5235
5344
|
unsubscribe(e) {
|
|
5236
5345
|
(this.subscriptions[e] ?? 0) > 0 && --this.subscriptions[e];
|
|
5237
5346
|
}
|
|
5238
5347
|
getSubscribedFeatureNames(e) {
|
|
5239
|
-
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);
|
|
5240
5349
|
}
|
|
5241
5350
|
clearPending() {
|
|
5242
5351
|
this.generation += 1, this.pending.clear(), this.loading.clear(), this.timer !== null && ((this.options.cancel ?? window.clearTimeout)(this.timer), this.timer = null);
|
|
@@ -5251,7 +5360,7 @@ var xl = class {
|
|
|
5251
5360
|
this.pending.clear();
|
|
5252
5361
|
return;
|
|
5253
5362
|
}
|
|
5254
|
-
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]));
|
|
5255
5364
|
if (n.length === 0) {
|
|
5256
5365
|
this.pending.clear();
|
|
5257
5366
|
return;
|
|
@@ -5262,7 +5371,7 @@ var xl = class {
|
|
|
5262
5371
|
let r = {}, i = [];
|
|
5263
5372
|
n.forEach((e) => {
|
|
5264
5373
|
let n = t.chartData[e];
|
|
5265
|
-
n ? r[e] =
|
|
5374
|
+
n ? r[e] = Sl(n) : i.push(e);
|
|
5266
5375
|
}), Object.keys(r).length > 0 && this.options.getSnapshot().episodeIndex === t.episodeIndex && this.options.onFeatureData(r);
|
|
5267
5376
|
try {
|
|
5268
5377
|
if (i.length > 0) {
|
|
@@ -5281,7 +5390,7 @@ var xl = class {
|
|
|
5281
5390
|
}, 0));
|
|
5282
5391
|
}
|
|
5283
5392
|
};
|
|
5284
|
-
function
|
|
5393
|
+
function Tl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, featureData: i, setFeatureData: a }) {
|
|
5285
5394
|
let o = V({
|
|
5286
5395
|
episodeIndex: e,
|
|
5287
5396
|
loader: t,
|
|
@@ -5297,7 +5406,7 @@ function Sl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, fea
|
|
|
5297
5406
|
featureData: i
|
|
5298
5407
|
};
|
|
5299
5408
|
let s = V(null);
|
|
5300
|
-
return s.current ||= new
|
|
5409
|
+
return s.current ||= new wl({
|
|
5301
5410
|
getSnapshot: () => o.current,
|
|
5302
5411
|
onFeatureData: (e) => a((t) => ({
|
|
5303
5412
|
...t,
|
|
@@ -5319,7 +5428,7 @@ function Sl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, fea
|
|
|
5319
5428
|
}
|
|
5320
5429
|
//#endregion
|
|
5321
5430
|
//#region src/react/services/PlaybackEngine.ts
|
|
5322
|
-
var
|
|
5431
|
+
var El = class {
|
|
5323
5432
|
animationFrameId = null;
|
|
5324
5433
|
timerId = null;
|
|
5325
5434
|
lastTickTime = 0;
|
|
@@ -5394,7 +5503,7 @@ var Cl = class {
|
|
|
5394
5503
|
}
|
|
5395
5504
|
this.scheduleNextTick(e, n);
|
|
5396
5505
|
};
|
|
5397
|
-
},
|
|
5506
|
+
}, Dl = class {
|
|
5398
5507
|
target = null;
|
|
5399
5508
|
toggleOnce = !1;
|
|
5400
5509
|
requestSet(e) {
|
|
@@ -5410,8 +5519,8 @@ var Cl = class {
|
|
|
5410
5519
|
} else this.toggleOnce && (this.toggleOnce = !1, t());
|
|
5411
5520
|
}
|
|
5412
5521
|
};
|
|
5413
|
-
function
|
|
5414
|
-
let [d, f] = H(0), [p, m] = H(!1), h = V(new
|
|
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());
|
|
5415
5524
|
z(() => {
|
|
5416
5525
|
let e = () => {
|
|
5417
5526
|
document.hidden && m(!1);
|
|
@@ -5449,7 +5558,7 @@ function Tl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
|
|
|
5449
5558
|
g
|
|
5450
5559
|
]), b = V(null);
|
|
5451
5560
|
return z(() => {
|
|
5452
|
-
let e = new
|
|
5561
|
+
let e = new El({
|
|
5453
5562
|
getFrameIndex: () => n.current,
|
|
5454
5563
|
setFrameIndexSilent: (e) => {
|
|
5455
5564
|
n.current = e;
|
|
@@ -5502,7 +5611,7 @@ function Tl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
|
|
|
5502
5611
|
}
|
|
5503
5612
|
//#endregion
|
|
5504
5613
|
//#region src/react/contexts/LeRobotProvider.tsx
|
|
5505
|
-
function
|
|
5614
|
+
function kl(e) {
|
|
5506
5615
|
let t = {};
|
|
5507
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))) {
|
|
5508
5617
|
let e = r.names.flat(2).filter((e) => typeof e == "string");
|
|
@@ -5523,13 +5632,13 @@ function El(e) {
|
|
|
5523
5632
|
features: t
|
|
5524
5633
|
};
|
|
5525
5634
|
}
|
|
5526
|
-
var
|
|
5635
|
+
var Al = ({ children: e }) => {
|
|
5527
5636
|
let [t, n] = H(null), r = V(null), [i, a] = H(() => {
|
|
5528
|
-
let e =
|
|
5637
|
+
let e = sl();
|
|
5529
5638
|
return r.current = e, e;
|
|
5530
|
-
}), [o, s] = H(null), [c, l] = H([]), [u, d] = H({}), [f, p] = H(null), [m, h] = H([]), [g, _] = H({}), [v, y] = H({}), [x, S] = H(!1), [C, w] = H(null), [T, E] = H("sequential"), [D, ee] = H(1), [te, ne] = H(null), [k, ie] = H(!1), { upsertTask: M, completeTask: N, failTask: oe, clear: se, tasks:
|
|
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({
|
|
5531
5640
|
episodes: c,
|
|
5532
|
-
versionCapability:
|
|
5641
|
+
versionCapability: ce
|
|
5533
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);
|
|
5534
5643
|
z(() => () => {
|
|
5535
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));
|
|
@@ -5546,15 +5655,15 @@ var Dl = ({ children: e }) => {
|
|
|
5546
5655
|
console.error("Frame subscriber error:", e);
|
|
5547
5656
|
}
|
|
5548
5657
|
});
|
|
5549
|
-
}, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } =
|
|
5658
|
+
}, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } = Tl({
|
|
5550
5659
|
selectedEpisodeIndex: f,
|
|
5551
5660
|
dataLoader: t,
|
|
5552
5661
|
info: o,
|
|
5553
5662
|
chartData: g,
|
|
5554
5663
|
featureData: v,
|
|
5555
5664
|
setFeatureData: y
|
|
5556
|
-
}), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } =
|
|
5557
|
-
isBusy:
|
|
5665
|
+
}), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } = Ol({
|
|
5666
|
+
isBusy: F,
|
|
5558
5667
|
frameCount: m.length,
|
|
5559
5668
|
frameIndexRef: Ee,
|
|
5560
5669
|
notifyFrameSubscribers: Me,
|
|
@@ -5577,7 +5686,7 @@ var Dl = ({ children: e }) => {
|
|
|
5577
5686
|
} catch (e) {
|
|
5578
5687
|
console.warn("Failed to dispose previous image service", e);
|
|
5579
5688
|
}
|
|
5580
|
-
let e =
|
|
5689
|
+
let e = sl();
|
|
5581
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);
|
|
5582
5691
|
}, [
|
|
5583
5692
|
Me,
|
|
@@ -5608,7 +5717,7 @@ var Dl = ({ children: e }) => {
|
|
|
5608
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;
|
|
5609
5718
|
let c = "getDirectoryHandle" in e ? new es(e) : e;
|
|
5610
5719
|
await r.current?.dispose();
|
|
5611
|
-
let u =
|
|
5720
|
+
let u = sl();
|
|
5612
5721
|
u.setDataSource(c), r.current = u, a(u);
|
|
5613
5722
|
let { LeRobotDataLoader: f } = await import("./LeRobotDataLoader-B8wZijIi.js");
|
|
5614
5723
|
o = new f(c), M({
|
|
@@ -5623,7 +5732,7 @@ var Dl = ({ children: e }) => {
|
|
|
5623
5732
|
}
|
|
5624
5733
|
let g = o.getEpisodes();
|
|
5625
5734
|
G.current = o, n(o), ne(o.getValidationReport());
|
|
5626
|
-
let v =
|
|
5735
|
+
let v = kl(m);
|
|
5627
5736
|
s(v), l(g), d(o.getTasks()), N(i), Ce.current.delete(e);
|
|
5628
5737
|
} catch (n) {
|
|
5629
5738
|
if (t !== Te.current) {
|
|
@@ -5661,7 +5770,7 @@ var Dl = ({ children: e }) => {
|
|
|
5661
5770
|
n && !t.isFileBytesCached(n) && await t.releaseParsedCaches(), i.clearPreload();
|
|
5662
5771
|
} catch {}
|
|
5663
5772
|
try {
|
|
5664
|
-
let r =
|
|
5773
|
+
let r = el(o);
|
|
5665
5774
|
M({
|
|
5666
5775
|
id: n,
|
|
5667
5776
|
phase: "read",
|
|
@@ -5674,13 +5783,13 @@ var Dl = ({ children: e }) => {
|
|
|
5674
5783
|
phase: "render",
|
|
5675
5784
|
message: "Processing charts..."
|
|
5676
5785
|
});
|
|
5677
|
-
let s =
|
|
5786
|
+
let s = tl(a, o.fps ?? 30);
|
|
5678
5787
|
h(s), ke.current === e && _(a);
|
|
5679
5788
|
let c = Ie(o);
|
|
5680
5789
|
if (c.length > 0) {
|
|
5681
5790
|
let n = {}, r = [];
|
|
5682
5791
|
c.forEach((e) => {
|
|
5683
|
-
e in a ? n[e] =
|
|
5792
|
+
e in a ? n[e] = Sl(a[e]) : r.push(e);
|
|
5684
5793
|
});
|
|
5685
5794
|
let i = r.length > 0 ? await t.loadFeatureData(e, r) : {};
|
|
5686
5795
|
ke.current === e && y({
|
|
@@ -5744,7 +5853,7 @@ var Dl = ({ children: e }) => {
|
|
|
5744
5853
|
qe
|
|
5745
5854
|
]), z(() => {
|
|
5746
5855
|
if (f !== null || !t || !o || x || c.length === 0) return;
|
|
5747
|
-
let e =
|
|
5856
|
+
let e = nl(c, de);
|
|
5748
5857
|
if (e === null) return;
|
|
5749
5858
|
let n = window.setTimeout(() => {
|
|
5750
5859
|
qe(e);
|
|
@@ -5761,7 +5870,7 @@ var Dl = ({ children: e }) => {
|
|
|
5761
5870
|
]);
|
|
5762
5871
|
let Ye = B(() => ({
|
|
5763
5872
|
info: o,
|
|
5764
|
-
versionCapability:
|
|
5873
|
+
versionCapability: ce,
|
|
5765
5874
|
isReadOnly: le,
|
|
5766
5875
|
featureData: v,
|
|
5767
5876
|
subscribeFeature: Ne,
|
|
@@ -5780,7 +5889,7 @@ var Dl = ({ children: e }) => {
|
|
|
5780
5889
|
isLoading: x
|
|
5781
5890
|
}), [
|
|
5782
5891
|
o,
|
|
5783
|
-
|
|
5892
|
+
ce,
|
|
5784
5893
|
le,
|
|
5785
5894
|
v,
|
|
5786
5895
|
Ne,
|
|
@@ -5883,9 +5992,9 @@ var Dl = ({ children: e }) => {
|
|
|
5883
5992
|
})
|
|
5884
5993
|
})
|
|
5885
5994
|
});
|
|
5886
|
-
},
|
|
5995
|
+
}, jl = () => {
|
|
5887
5996
|
let { resolvedTheme: e } = w();
|
|
5888
|
-
return /* @__PURE__ */ U(
|
|
5997
|
+
return /* @__PURE__ */ U(Lc, {
|
|
5889
5998
|
theme: e,
|
|
5890
5999
|
position: "top-center",
|
|
5891
6000
|
richColors: !0,
|
|
@@ -5894,27 +6003,27 @@ var Dl = ({ children: e }) => {
|
|
|
5894
6003
|
};
|
|
5895
6004
|
//#endregion
|
|
5896
6005
|
//#region src/react/components/LeRobotStudioProvider.tsx
|
|
5897
|
-
function
|
|
6006
|
+
function Ml({ theme: e, children: t, showToaster: n, portalContainer: r }) {
|
|
5898
6007
|
return /* @__PURE__ */ U(ie, {
|
|
5899
6008
|
container: r,
|
|
5900
|
-
children: /* @__PURE__ */ U(
|
|
6009
|
+
children: /* @__PURE__ */ U(ll, {
|
|
5901
6010
|
controlledTheme: e,
|
|
5902
6011
|
rootElement: r,
|
|
5903
|
-
children: /* @__PURE__ */ U(
|
|
6012
|
+
children: /* @__PURE__ */ U(dl, { children: /* @__PURE__ */ U(Al, { children: /* @__PURE__ */ U(ml, { children: /* @__PURE__ */ W(le, {
|
|
5904
6013
|
delay: 200,
|
|
5905
|
-
children: [t, n ? /* @__PURE__ */ U(
|
|
6014
|
+
children: [t, n ? /* @__PURE__ */ U(jl, {}) : null]
|
|
5906
6015
|
}) }) }) })
|
|
5907
6016
|
})
|
|
5908
6017
|
});
|
|
5909
6018
|
}
|
|
5910
|
-
var
|
|
6019
|
+
var Nl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !0, wrapRoot: a = !0 }) => {
|
|
5911
6020
|
let [o, s] = H(null);
|
|
5912
6021
|
return /* @__PURE__ */ U(y, {
|
|
5913
6022
|
forcedLanguage: t,
|
|
5914
6023
|
children: a ? /* @__PURE__ */ U("div", {
|
|
5915
6024
|
ref: s,
|
|
5916
6025
|
className: D("lerobot-root h-full w-full relative bg-background text-foreground", n),
|
|
5917
|
-
children: /* @__PURE__ */ U(
|
|
6026
|
+
children: /* @__PURE__ */ U(Ml, {
|
|
5918
6027
|
theme: e,
|
|
5919
6028
|
showToaster: i,
|
|
5920
6029
|
portalContainer: o,
|
|
@@ -5923,7 +6032,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
5923
6032
|
}) : /* @__PURE__ */ U("div", {
|
|
5924
6033
|
ref: s,
|
|
5925
6034
|
className: D("lerobot-root h-full w-full bg-background text-foreground", n),
|
|
5926
|
-
children: /* @__PURE__ */ U(
|
|
6035
|
+
children: /* @__PURE__ */ U(Ml, {
|
|
5927
6036
|
theme: e,
|
|
5928
6037
|
showToaster: i,
|
|
5929
6038
|
portalContainer: o,
|
|
@@ -5931,18 +6040,18 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
5931
6040
|
})
|
|
5932
6041
|
})
|
|
5933
6042
|
});
|
|
5934
|
-
},
|
|
6043
|
+
}, Pl = ({ open: e, onOpenChange: t, episode: n, onSave: r }) => {
|
|
5935
6044
|
let { t: a } = T(), [o, s] = H("");
|
|
5936
6045
|
return z(() => {
|
|
5937
6046
|
if (!n) return;
|
|
5938
6047
|
let e = n.tasks && n.tasks.length > 0 && n.tasks[0] || "";
|
|
5939
6048
|
s(e);
|
|
5940
|
-
}, [n]), /* @__PURE__ */ U(
|
|
6049
|
+
}, [n]), /* @__PURE__ */ U(Js, {
|
|
5941
6050
|
open: !!(e && n),
|
|
5942
6051
|
onOpenChange: t,
|
|
5943
|
-
children: /* @__PURE__ */ W(
|
|
6052
|
+
children: /* @__PURE__ */ W(Zs, {
|
|
5944
6053
|
className: "sm:max-w-md",
|
|
5945
|
-
children: [/* @__PURE__ */ W(
|
|
6054
|
+
children: [/* @__PURE__ */ W(Qs, { children: [/* @__PURE__ */ U(ec, { children: a("editTask.title", "Edit Episode Task") }), /* @__PURE__ */ U(tc, {
|
|
5946
6055
|
className: "sr-only",
|
|
5947
6056
|
children: a("editTask.a11yDescription", "Edit the task description for the selected episode.")
|
|
5948
6057
|
})] }), n ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ W("div", {
|
|
@@ -5962,7 +6071,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
5962
6071
|
children: [/* @__PURE__ */ U("label", {
|
|
5963
6072
|
className: "text-sm font-medium text-muted-foreground",
|
|
5964
6073
|
children: a("editTask.taskDescription", "Task Description")
|
|
5965
|
-
}), /* @__PURE__ */ U(
|
|
6074
|
+
}), /* @__PURE__ */ U(Rc, {
|
|
5966
6075
|
value: o,
|
|
5967
6076
|
onChange: (e) => s(e.target.value),
|
|
5968
6077
|
placeholder: a("editTask.taskPlaceholder", "Enter task description..."),
|
|
@@ -5970,7 +6079,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
5970
6079
|
className: "resize-none"
|
|
5971
6080
|
})]
|
|
5972
6081
|
})]
|
|
5973
|
-
}), /* @__PURE__ */ W(
|
|
6082
|
+
}), /* @__PURE__ */ W($s, { children: [/* @__PURE__ */ U(i, {
|
|
5974
6083
|
variant: "outline",
|
|
5975
6084
|
onClick: () => t(!1),
|
|
5976
6085
|
children: a("common.cancel", "Cancel")
|
|
@@ -5984,7 +6093,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
5984
6093
|
})] })] }) : null]
|
|
5985
6094
|
})
|
|
5986
6095
|
});
|
|
5987
|
-
},
|
|
6096
|
+
}, Fl = ({ totalCount: e, editMode: t, multiSelectMode: n, isReadOnly: r, onToggleEditMode: a, onToggleMultiSelectMode: o }) => {
|
|
5988
6097
|
let { t: s } = T();
|
|
5989
6098
|
return /* @__PURE__ */ W("div", {
|
|
5990
6099
|
className: "flex min-w-0 flex-wrap items-center justify-between gap-2 overflow-hidden",
|
|
@@ -5999,18 +6108,18 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
5999
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"),
|
|
6000
6109
|
onClick: o,
|
|
6001
6110
|
title: s("sidebar.multiSelect", "Select"),
|
|
6002
|
-
children: n ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(u, { className: "h-3 w-3 shrink-0" }), s("sidebar.multiSelect", "Select")] }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(
|
|
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")] })
|
|
6003
6112
|
}), /* @__PURE__ */ U(i, {
|
|
6004
6113
|
variant: t ? "secondary" : "ghost",
|
|
6005
6114
|
size: "sm",
|
|
6006
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"),
|
|
6007
6116
|
onClick: a,
|
|
6008
6117
|
title: t ? s("sidebar.exitEditMode", "Done editing") : s("sidebar.enterEditMode", "Edit episodes"),
|
|
6009
|
-
children: t ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(u, { className: "mr-1 h-3 w-3 shrink-0" }), s("sidebar.done", "Done")] }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(
|
|
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")] })
|
|
6010
6119
|
})]
|
|
6011
6120
|
})]
|
|
6012
6121
|
});
|
|
6013
|
-
},
|
|
6122
|
+
}, Il = ({ searchTerm: e, showAdvanced: t, onSearchTermChange: n, onToggleAdvanced: r }) => {
|
|
6014
6123
|
let { t: a } = T();
|
|
6015
6124
|
return /* @__PURE__ */ W("div", {
|
|
6016
6125
|
className: "group relative flex min-w-0 items-center gap-1 overflow-hidden",
|
|
@@ -6032,13 +6141,13 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6032
6141
|
className: D("h-9 w-9 shrink-0 p-0", t && "text-primary"),
|
|
6033
6142
|
onClick: r,
|
|
6034
6143
|
title: a("sidebar.advanced", "Advanced"),
|
|
6035
|
-
children: /* @__PURE__ */ U(
|
|
6144
|
+
children: /* @__PURE__ */ U(Us, {
|
|
6036
6145
|
className: "h-3.5 w-3.5",
|
|
6037
6146
|
"aria-hidden": !0
|
|
6038
6147
|
})
|
|
6039
6148
|
})]
|
|
6040
6149
|
});
|
|
6041
|
-
},
|
|
6150
|
+
}, Ll = ({ durationMin: e, durationMax: t, onDurationMinChange: n, onDurationMaxChange: r }) => {
|
|
6042
6151
|
let { t: i } = T();
|
|
6043
6152
|
return /* @__PURE__ */ W("div", {
|
|
6044
6153
|
className: "flex min-w-0 items-center gap-2 overflow-hidden",
|
|
@@ -6069,7 +6178,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6069
6178
|
})
|
|
6070
6179
|
]
|
|
6071
6180
|
});
|
|
6072
|
-
},
|
|
6181
|
+
}, Rl = ({ selectedCount: e, selectedDeletedCount: n, selectedNonDeletedCount: r, onSelectAll: a, onClearSelection: o, onBulkEdit: s, onBulkDelete: c, onBulkRestore: l }) => {
|
|
6073
6182
|
let { t: u } = T();
|
|
6074
6183
|
return /* @__PURE__ */ W("div", {
|
|
6075
6184
|
className: "flex min-w-0 flex-wrap items-center gap-1 overflow-hidden",
|
|
@@ -6081,8 +6190,8 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6081
6190
|
className: "h-8 w-8 shrink-0",
|
|
6082
6191
|
onClick: a
|
|
6083
6192
|
}),
|
|
6084
|
-
children: /* @__PURE__ */ U(
|
|
6085
|
-
}), /* @__PURE__ */ U(
|
|
6193
|
+
children: /* @__PURE__ */ U(Ms, { className: "h-3.5 w-3.5" })
|
|
6194
|
+
}), /* @__PURE__ */ U(P, {
|
|
6086
6195
|
side: "bottom",
|
|
6087
6196
|
children: u("sidebar.selectAll")
|
|
6088
6197
|
})] }),
|
|
@@ -6094,7 +6203,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6094
6203
|
onClick: o
|
|
6095
6204
|
}),
|
|
6096
6205
|
children: /* @__PURE__ */ U(t, { className: "h-3.5 w-3.5" })
|
|
6097
|
-
}), /* @__PURE__ */ U(
|
|
6206
|
+
}), /* @__PURE__ */ U(P, {
|
|
6098
6207
|
side: "bottom",
|
|
6099
6208
|
children: u("sidebar.clearSelection")
|
|
6100
6209
|
})] }),
|
|
@@ -6106,8 +6215,8 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6106
6215
|
className: "h-8 w-8 shrink-0",
|
|
6107
6216
|
onClick: s
|
|
6108
6217
|
}),
|
|
6109
|
-
children: /* @__PURE__ */ U(
|
|
6110
|
-
}), /* @__PURE__ */ U(
|
|
6218
|
+
children: /* @__PURE__ */ U(zs, { className: "h-3.5 w-3.5" })
|
|
6219
|
+
}), /* @__PURE__ */ U(P, {
|
|
6111
6220
|
side: "bottom",
|
|
6112
6221
|
children: u("sidebar.bulkEdit")
|
|
6113
6222
|
})] }),
|
|
@@ -6118,8 +6227,8 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6118
6227
|
className: "h-8 w-8 shrink-0 text-destructive hover:text-destructive",
|
|
6119
6228
|
onClick: c
|
|
6120
6229
|
}),
|
|
6121
|
-
children: /* @__PURE__ */ U(
|
|
6122
|
-
}), /* @__PURE__ */ U(
|
|
6230
|
+
children: /* @__PURE__ */ U(Ks, { className: "h-3.5 w-3.5" })
|
|
6231
|
+
}), /* @__PURE__ */ U(P, {
|
|
6123
6232
|
side: "bottom",
|
|
6124
6233
|
children: u("sidebar.bulkDelete")
|
|
6125
6234
|
})] }),
|
|
@@ -6131,8 +6240,8 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6131
6240
|
className: "h-8 w-8 shrink-0",
|
|
6132
6241
|
onClick: l
|
|
6133
6242
|
}),
|
|
6134
|
-
children: /* @__PURE__ */ U(
|
|
6135
|
-
}), /* @__PURE__ */ U(
|
|
6243
|
+
children: /* @__PURE__ */ U(qs, { className: "h-3.5 w-3.5" })
|
|
6244
|
+
}), /* @__PURE__ */ U(P, {
|
|
6136
6245
|
side: "bottom",
|
|
6137
6246
|
children: u("sidebar.bulkRestore")
|
|
6138
6247
|
})] }),
|
|
@@ -6142,7 +6251,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6142
6251
|
})
|
|
6143
6252
|
]
|
|
6144
6253
|
});
|
|
6145
|
-
},
|
|
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 }) => {
|
|
6146
6255
|
let { t: h } = T(), g = !r && !s, _ = !r && a, v = !r && !a && o;
|
|
6147
6256
|
return /* @__PURE__ */ W("div", {
|
|
6148
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"),
|
|
@@ -6152,7 +6261,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6152
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"),
|
|
6153
6262
|
onClick: () => g && u(),
|
|
6154
6263
|
onKeyDown: (e) => {
|
|
6155
|
-
g &&
|
|
6264
|
+
g && il(e.key) && (e.preventDefault(), u());
|
|
6156
6265
|
},
|
|
6157
6266
|
"aria-label": h("sidebar.selectEpisode", { index: e.episode_index }),
|
|
6158
6267
|
"aria-current": _ ? "true" : void 0,
|
|
@@ -6168,7 +6277,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6168
6277
|
onClick: d,
|
|
6169
6278
|
"aria-label": o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
|
|
6170
6279
|
title: o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
|
|
6171
|
-
children: o ? /* @__PURE__ */ U(
|
|
6280
|
+
children: o ? /* @__PURE__ */ U(Ws, { className: "h-4 w-4 text-primary" }) : /* @__PURE__ */ U(Gs, { className: "h-4 w-4 text-muted-foreground" })
|
|
6172
6281
|
})
|
|
6173
6282
|
}),
|
|
6174
6283
|
_ && /* @__PURE__ */ U("div", { className: "absolute bottom-2 left-0 top-2 w-1 rounded-r-full bg-primary" }),
|
|
@@ -6176,7 +6285,7 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6176
6285
|
className: "flex min-w-0 flex-1 flex-col overflow-hidden",
|
|
6177
6286
|
children: [/* @__PURE__ */ W("div", {
|
|
6178
6287
|
className: "mb-1 flex min-w-0 items-center justify-between gap-2 overflow-hidden",
|
|
6179
|
-
children: [/* @__PURE__ */ W(
|
|
6288
|
+
children: [/* @__PURE__ */ W(As, {
|
|
6180
6289
|
variant: _ ? "default" : "outline",
|
|
6181
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"),
|
|
6182
6291
|
children: ["# ", e.episode_index]
|
|
@@ -6201,27 +6310,27 @@ var Al = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
|
|
|
6201
6310
|
className: "h-8 px-2 text-muted-foreground hover:text-foreground",
|
|
6202
6311
|
onClick: m,
|
|
6203
6312
|
title: h("sidebar.restoreEpisode", "Restore episode"),
|
|
6204
|
-
children: /* @__PURE__ */ U(
|
|
6313
|
+
children: /* @__PURE__ */ U(qs, { className: "h-3.5 w-3.5" })
|
|
6205
6314
|
}) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(i, {
|
|
6206
6315
|
size: "sm",
|
|
6207
6316
|
variant: "ghost",
|
|
6208
6317
|
className: "h-8 px-2 text-muted-foreground hover:text-foreground",
|
|
6209
6318
|
onClick: f,
|
|
6210
6319
|
title: h("sidebar.editTask", "Edit task"),
|
|
6211
|
-
children: /* @__PURE__ */ U(
|
|
6320
|
+
children: /* @__PURE__ */ U(zs, { className: "h-3.5 w-3.5" })
|
|
6212
6321
|
}), /* @__PURE__ */ U(i, {
|
|
6213
6322
|
size: "sm",
|
|
6214
6323
|
variant: "ghost",
|
|
6215
6324
|
className: "h-8 px-2 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",
|
|
6216
6325
|
onClick: p,
|
|
6217
6326
|
title: h("sidebar.deleteEpisode", "Delete episode"),
|
|
6218
|
-
children: /* @__PURE__ */ U(
|
|
6327
|
+
children: /* @__PURE__ */ U(Ks, { className: "h-3.5 w-3.5" })
|
|
6219
6328
|
})] })
|
|
6220
6329
|
})]
|
|
6221
6330
|
});
|
|
6222
6331
|
};
|
|
6223
|
-
function
|
|
6224
|
-
return /* @__PURE__ */ U(
|
|
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, {
|
|
6225
6334
|
episode: e.episode,
|
|
6226
6335
|
taskDescription: e.taskDescription,
|
|
6227
6336
|
formattedDuration: e.formattedDuration,
|
|
@@ -6238,22 +6347,22 @@ function Ll({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick
|
|
|
6238
6347
|
onRestore: (t) => c(e.episode.episode_index, t)
|
|
6239
6348
|
});
|
|
6240
6349
|
}
|
|
6241
|
-
function
|
|
6350
|
+
function Vl({ ariaAttributes: e, index: t, style: n, filteredEpisodes: r, ...i }) {
|
|
6242
6351
|
let a = r[t];
|
|
6243
6352
|
return /* @__PURE__ */ U("div", {
|
|
6244
6353
|
...e,
|
|
6245
6354
|
style: n,
|
|
6246
6355
|
className: "overflow-hidden",
|
|
6247
|
-
children: /* @__PURE__ */ U(
|
|
6356
|
+
children: /* @__PURE__ */ U(Bl, {
|
|
6248
6357
|
item: a,
|
|
6249
6358
|
...i
|
|
6250
6359
|
})
|
|
6251
6360
|
});
|
|
6252
6361
|
}
|
|
6253
|
-
function
|
|
6362
|
+
function Hl(e, t) {
|
|
6254
6363
|
return t.filteredEpisodes[e].episode.episode_index;
|
|
6255
6364
|
}
|
|
6256
|
-
var
|
|
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 }) => {
|
|
6257
6366
|
let { t: d } = T(), f = B(() => ({
|
|
6258
6367
|
filteredEpisodes: n,
|
|
6259
6368
|
isLoading: r,
|
|
@@ -6278,7 +6387,7 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6278
6387
|
className: "shrink-0 border-b border-destructive/20 bg-destructive/5 px-3 py-2",
|
|
6279
6388
|
children: /* @__PURE__ */ W("div", {
|
|
6280
6389
|
className: "flex items-start gap-2",
|
|
6281
|
-
children: [/* @__PURE__ */ U(
|
|
6390
|
+
children: [/* @__PURE__ */ U(Ps, { className: "mt-0.5 h-4 w-4 shrink-0 text-destructive/70" }), /* @__PURE__ */ W("div", {
|
|
6282
6391
|
className: "min-w-0 space-y-0.5",
|
|
6283
6392
|
children: [/* @__PURE__ */ U("p", {
|
|
6284
6393
|
className: "text-sm font-medium text-destructive",
|
|
@@ -6301,9 +6410,9 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6301
6410
|
children: [p, /* @__PURE__ */ U(oe, {
|
|
6302
6411
|
rowCount: n.length,
|
|
6303
6412
|
rowHeight: a && !i ? 102 : 61,
|
|
6304
|
-
rowComponent:
|
|
6413
|
+
rowComponent: Vl,
|
|
6305
6414
|
rowProps: f,
|
|
6306
|
-
rowKey:
|
|
6415
|
+
rowKey: Hl,
|
|
6307
6416
|
overscanCount: 4,
|
|
6308
6417
|
className: "flex-1 min-h-0 w-full min-w-0 overflow-x-hidden",
|
|
6309
6418
|
style: {
|
|
@@ -6314,23 +6423,23 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6314
6423
|
})]
|
|
6315
6424
|
}) : /* @__PURE__ */ W("div", {
|
|
6316
6425
|
className: "flex h-full min-h-0 flex-col",
|
|
6317
|
-
children: [p, /* @__PURE__ */ U(
|
|
6426
|
+
children: [p, /* @__PURE__ */ U(ce, {
|
|
6318
6427
|
className: "flex-1 min-h-0 w-full min-w-0",
|
|
6319
6428
|
children: /* @__PURE__ */ U("div", {
|
|
6320
6429
|
className: "w-full min-w-0 overflow-x-hidden",
|
|
6321
|
-
children: n.map((e) => /* @__PURE__ */ U(
|
|
6430
|
+
children: n.map((e) => /* @__PURE__ */ U(Bl, {
|
|
6322
6431
|
item: e,
|
|
6323
6432
|
...f
|
|
6324
6433
|
}, e.episode.episode_index))
|
|
6325
6434
|
})
|
|
6326
6435
|
})]
|
|
6327
6436
|
});
|
|
6328
|
-
},
|
|
6329
|
-
let { t: e } = T(), { episodes: t, tasks: n, isLoading: r, error: a, info: o, versionCapability: s, isReadOnly: c } = N(), { selectEpisode: l, selectedEpisodeIndex: u, selectedEpisodeIndices: d, toggleEpisodeSelection: f, selectAllInList: p, clearEpisodeSelection: m, deletedEpisodes: h, getEffectiveEpisode: g, editEpisodeTask: _, deleteEpisode: v, restoreEpisode: y } = ne(), [b, x] = H(""), [S, C] = H(!1), [w, E] = H(!1), [D, O] = H(""), [ee, te] = H(""), [k, A] = H(!1), [re, j] = H(null), [ie, M] = H(!1), [ae, oe] = H(!1), [se,
|
|
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");
|
|
6330
6439
|
z(() => {
|
|
6331
|
-
|
|
6332
|
-
}, [
|
|
6333
|
-
let
|
|
6440
|
+
F && (C(!1), E(!1), A(!1), oe(!1), m());
|
|
6441
|
+
}, [F, m]);
|
|
6442
|
+
let ce = B(() => {
|
|
6334
6443
|
if (!t) return [];
|
|
6335
6444
|
let e = t;
|
|
6336
6445
|
if (b.trim()) {
|
|
@@ -6351,20 +6460,20 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6351
6460
|
o?.fps,
|
|
6352
6461
|
g
|
|
6353
6462
|
]), le = (e, t) => {
|
|
6354
|
-
e.stopPropagation(), !
|
|
6463
|
+
e.stopPropagation(), !F && (j(g(t)), A(!0));
|
|
6355
6464
|
}, I = (e, t) => {
|
|
6356
|
-
e.stopPropagation(), !
|
|
6465
|
+
e.stopPropagation(), !F && v(t);
|
|
6357
6466
|
}, ue = (e, t) => {
|
|
6358
|
-
e.stopPropagation(), !
|
|
6467
|
+
e.stopPropagation(), !F && y(t);
|
|
6359
6468
|
}, de = (e) => {
|
|
6360
6469
|
h.has(e.episode_index) || (w ? f(e.episode_index) : l(e.episode_index));
|
|
6361
|
-
}, L = B(() =>
|
|
6362
|
-
if (
|
|
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;
|
|
6363
6472
|
let e = se.trim();
|
|
6364
|
-
L.forEach((t) => _(t.episode_index, e || "")), oe(!1),
|
|
6473
|
+
L.forEach((t) => _(t.episode_index, e || "")), oe(!1), P("");
|
|
6365
6474
|
}, R = B(() => {
|
|
6366
6475
|
let t = o?.fps || 30;
|
|
6367
|
-
return
|
|
6476
|
+
return ce.map((r) => {
|
|
6368
6477
|
let i = g(r), a = (r.length || 0) / t, o = Math.floor(a / 60), s = Math.floor(a % 60);
|
|
6369
6478
|
return {
|
|
6370
6479
|
episode: r,
|
|
@@ -6376,7 +6485,7 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6376
6485
|
};
|
|
6377
6486
|
});
|
|
6378
6487
|
}, [
|
|
6379
|
-
|
|
6488
|
+
ce,
|
|
6380
6489
|
g,
|
|
6381
6490
|
o?.fps,
|
|
6382
6491
|
n,
|
|
@@ -6391,37 +6500,37 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6391
6500
|
/* @__PURE__ */ W("div", {
|
|
6392
6501
|
className: "shrink-0 space-y-3 border-b px-3 pt-0 pb-2 min-w-0 overflow-x-hidden",
|
|
6393
6502
|
children: [
|
|
6394
|
-
/* @__PURE__ */ U(
|
|
6503
|
+
/* @__PURE__ */ U(Fl, {
|
|
6395
6504
|
totalCount: t?.length,
|
|
6396
6505
|
editMode: S,
|
|
6397
6506
|
multiSelectMode: w,
|
|
6398
|
-
isReadOnly:
|
|
6507
|
+
isReadOnly: F,
|
|
6399
6508
|
onToggleEditMode: () => C((e) => !e),
|
|
6400
6509
|
onToggleMultiSelectMode: () => {
|
|
6401
6510
|
E((e) => !e), w && m();
|
|
6402
6511
|
}
|
|
6403
6512
|
}),
|
|
6404
|
-
|
|
6513
|
+
F && s && /* @__PURE__ */ U("p", {
|
|
6405
6514
|
className: "rounded-md border border-border/60 bg-muted/40 px-2 py-1.5 text-xs text-muted-foreground",
|
|
6406
6515
|
children: e("sidebar.readOnlyVersion", { version: s.normalizedVersion ?? o?.codebase_version ?? "unknown" })
|
|
6407
6516
|
}),
|
|
6408
|
-
/* @__PURE__ */ U(
|
|
6517
|
+
/* @__PURE__ */ U(Il, {
|
|
6409
6518
|
searchTerm: b,
|
|
6410
6519
|
showAdvanced: ie,
|
|
6411
6520
|
onSearchTermChange: x,
|
|
6412
6521
|
onToggleAdvanced: () => M((e) => !e)
|
|
6413
6522
|
}),
|
|
6414
|
-
ie && /* @__PURE__ */ U(
|
|
6523
|
+
ie && /* @__PURE__ */ U(Ll, {
|
|
6415
6524
|
durationMin: D,
|
|
6416
6525
|
durationMax: ee,
|
|
6417
6526
|
onDurationMinChange: O,
|
|
6418
6527
|
onDurationMaxChange: te
|
|
6419
6528
|
}),
|
|
6420
|
-
!
|
|
6529
|
+
!F && w && /* @__PURE__ */ U(Rl, {
|
|
6421
6530
|
selectedCount: d.size,
|
|
6422
6531
|
selectedDeletedCount: fe.length,
|
|
6423
6532
|
selectedNonDeletedCount: pe.length,
|
|
6424
|
-
onSelectAll: () => p(
|
|
6533
|
+
onSelectAll: () => p(ce.map((e) => e.episode_index)),
|
|
6425
6534
|
onClearSelection: m,
|
|
6426
6535
|
onBulkEdit: () => oe(!0),
|
|
6427
6536
|
onBulkDelete: () => pe.forEach((e) => v(e.episode_index)),
|
|
@@ -6431,13 +6540,13 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6431
6540
|
}),
|
|
6432
6541
|
/* @__PURE__ */ U("div", {
|
|
6433
6542
|
className: "flex flex-1 min-h-0 min-w-0 flex-col overflow-hidden",
|
|
6434
|
-
children: /* @__PURE__ */ U(
|
|
6543
|
+
children: /* @__PURE__ */ U(Ul, {
|
|
6435
6544
|
error: a,
|
|
6436
6545
|
episodes: t,
|
|
6437
6546
|
filteredEpisodes: R,
|
|
6438
6547
|
isLoading: r,
|
|
6439
|
-
multiSelectMode: !
|
|
6440
|
-
editMode: !
|
|
6548
|
+
multiSelectMode: !F && w,
|
|
6549
|
+
editMode: !F && S,
|
|
6441
6550
|
onRowClick: de,
|
|
6442
6551
|
onToggleSelection: (e, t) => {
|
|
6443
6552
|
t.preventDefault(), t.stopPropagation(), f(e.episode_index);
|
|
@@ -6447,19 +6556,19 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6447
6556
|
onRestore: (e, t) => ue(t, e)
|
|
6448
6557
|
})
|
|
6449
6558
|
}),
|
|
6450
|
-
!
|
|
6559
|
+
!F && /* @__PURE__ */ U(Pl, {
|
|
6451
6560
|
open: k,
|
|
6452
6561
|
onOpenChange: A,
|
|
6453
6562
|
episode: re,
|
|
6454
6563
|
onSave: _
|
|
6455
6564
|
}, re?.episode_index ?? "edit-dialog"),
|
|
6456
|
-
!
|
|
6565
|
+
!F && /* @__PURE__ */ U(Js, {
|
|
6457
6566
|
open: ae,
|
|
6458
6567
|
onOpenChange: oe,
|
|
6459
|
-
children: /* @__PURE__ */ W(
|
|
6568
|
+
children: /* @__PURE__ */ W(Zs, {
|
|
6460
6569
|
className: "sm:max-w-md",
|
|
6461
6570
|
children: [
|
|
6462
|
-
/* @__PURE__ */ U(
|
|
6571
|
+
/* @__PURE__ */ U(Qs, { children: /* @__PURE__ */ U(ec, { children: e("sidebar.bulkEdit", "Edit task") }) }),
|
|
6463
6572
|
/* @__PURE__ */ W("div", {
|
|
6464
6573
|
className: "py-2",
|
|
6465
6574
|
children: [/* @__PURE__ */ W("p", {
|
|
@@ -6470,15 +6579,15 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6470
6579
|
" ",
|
|
6471
6580
|
e("editTask.taskDescription")
|
|
6472
6581
|
]
|
|
6473
|
-
}), /* @__PURE__ */ U(
|
|
6582
|
+
}), /* @__PURE__ */ U(Rc, {
|
|
6474
6583
|
value: se,
|
|
6475
|
-
onChange: (e) =>
|
|
6584
|
+
onChange: (e) => P(e.target.value),
|
|
6476
6585
|
placeholder: e("editTask.taskPlaceholder", "Enter task description..."),
|
|
6477
6586
|
rows: 3,
|
|
6478
6587
|
className: "resize-none"
|
|
6479
6588
|
})]
|
|
6480
6589
|
}),
|
|
6481
|
-
/* @__PURE__ */ W(
|
|
6590
|
+
/* @__PURE__ */ W($s, { children: [/* @__PURE__ */ U(i, {
|
|
6482
6591
|
variant: "outline",
|
|
6483
6592
|
onClick: () => oe(!1),
|
|
6484
6593
|
children: e("common.cancel", "Cancel")
|
|
@@ -6491,7 +6600,7 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6491
6600
|
})
|
|
6492
6601
|
]
|
|
6493
6602
|
});
|
|
6494
|
-
},
|
|
6603
|
+
}, Gl = (e = !0) => {
|
|
6495
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);
|
|
6496
6605
|
z(() => {
|
|
6497
6606
|
u.current = e;
|
|
@@ -6584,7 +6693,7 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6584
6693
|
window.removeEventListener("keydown", h);
|
|
6585
6694
|
};
|
|
6586
6695
|
}, [e, h]);
|
|
6587
|
-
},
|
|
6696
|
+
}, Kl = ({ children: e, minWidth: t = 200, maxWidth: n = 600, defaultWidth: r = 256, onWidthChange: i, className: a = "" }) => {
|
|
6588
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(() => {
|
|
6589
6698
|
let e = Math.max(g.current, window.innerWidth - 320);
|
|
6590
6699
|
return Math.min(_.current, e);
|
|
@@ -6635,24 +6744,24 @@ var Bl = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
|
|
|
6635
6744
|
style: { cursor: "col-resize" },
|
|
6636
6745
|
children: /* @__PURE__ */ U("div", { className: "absolute inset-y-0 left-0 w-4" })
|
|
6637
6746
|
})] });
|
|
6638
|
-
},
|
|
6639
|
-
function
|
|
6640
|
-
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)`;
|
|
6641
6750
|
}
|
|
6642
|
-
function
|
|
6751
|
+
function Xl(e) {
|
|
6643
6752
|
let t = Math.floor(e / 60), n = Math.floor(e % 60), r = Math.floor(e % 1 * 100);
|
|
6644
6753
|
return `${t}:${n.toString().padStart(2, "0")}.${r.toString().padStart(2, "0")}`;
|
|
6645
6754
|
}
|
|
6646
|
-
var
|
|
6755
|
+
var Zl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFrameIndex: i, isDisabled: a, setFrameIndex: o, getFrameIndex: s, subscribeFrameIndex: c }) => {
|
|
6647
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) => {
|
|
6648
6757
|
let t = Math.max(0, Math.min(1, e));
|
|
6649
|
-
f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left =
|
|
6758
|
+
f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left = Yl(t));
|
|
6650
6759
|
}, []), b = R((e) => {
|
|
6651
6760
|
m.current && m.current.classList.toggle("cursor-grabbing", e), p.current && p.current.classList.toggle("shadow-md", e);
|
|
6652
6761
|
}, []), x = R((e) => {
|
|
6653
6762
|
m.current && (m.current.setAttribute("aria-valuenow", String(e)), m.current.setAttribute("aria-valuetext", l("playback.a11y.valuetext", {
|
|
6654
|
-
time:
|
|
6655
|
-
totalTime:
|
|
6763
|
+
time: Xl(v(e)),
|
|
6764
|
+
totalTime: Xl(r),
|
|
6656
6765
|
frame: e,
|
|
6657
6766
|
totalFrames: n
|
|
6658
6767
|
})));
|
|
@@ -6662,7 +6771,7 @@ var Jl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6662
6771
|
n,
|
|
6663
6772
|
r
|
|
6664
6773
|
]), S = R((e, t) => {
|
|
6665
|
-
u.current && (u.current.textContent =
|
|
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());
|
|
6666
6775
|
}, [
|
|
6667
6776
|
v,
|
|
6668
6777
|
n,
|
|
@@ -6733,14 +6842,14 @@ var Jl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6733
6842
|
n
|
|
6734
6843
|
]), z(() => c((e) => {
|
|
6735
6844
|
if (h.current) return;
|
|
6736
|
-
let t = Date.now() - g.current >=
|
|
6845
|
+
let t = Date.now() - g.current >= Jl;
|
|
6737
6846
|
S(e, t);
|
|
6738
6847
|
}), [c, S]), z(() => () => {
|
|
6739
6848
|
_.current?.();
|
|
6740
6849
|
}, []);
|
|
6741
|
-
let ee = B(() =>
|
|
6742
|
-
time:
|
|
6743
|
-
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),
|
|
6744
6853
|
frame: i,
|
|
6745
6854
|
totalFrames: n
|
|
6746
6855
|
}), [
|
|
@@ -6769,7 +6878,7 @@ var Jl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6769
6878
|
children: ee
|
|
6770
6879
|
}), /* @__PURE__ */ W("span", {
|
|
6771
6880
|
className: k,
|
|
6772
|
-
children: ["/ ",
|
|
6881
|
+
children: ["/ ", Xl(r)]
|
|
6773
6882
|
})]
|
|
6774
6883
|
})
|
|
6775
6884
|
}), /* @__PURE__ */ U("div", {
|
|
@@ -6817,21 +6926,21 @@ var Jl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
|
|
|
6817
6926
|
ref: p,
|
|
6818
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",
|
|
6819
6928
|
style: {
|
|
6820
|
-
left:
|
|
6929
|
+
left: Yl(n > 1 ? i / (n - 1) : 0),
|
|
6821
6930
|
transform: "translateY(-50%)"
|
|
6822
6931
|
}
|
|
6823
6932
|
})]
|
|
6824
6933
|
})]
|
|
6825
6934
|
});
|
|
6826
6935
|
});
|
|
6827
|
-
|
|
6936
|
+
Zl.displayName = "PlaybackProgressSlider";
|
|
6828
6937
|
//#endregion
|
|
6829
6938
|
//#region src/react/components/Playback/PlaybackBar.tsx
|
|
6830
|
-
var
|
|
6831
|
-
let { t: e } = T(), { currentFrames: t, currentFrameIndex: r, setFrameIndex: a, isPlaying: o, setPlaying: s, playbackMode: c, setPlaybackMode: u, playbackSpeed: f, setPlaybackSpeed: p } = S(), { info: m, subscribeFrameIndex: h, getFrameIndex: g, isLoading: _ } = N(), { selectedEpisodeIndex: y } = ne(), { tasks: b } =
|
|
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);
|
|
6832
6941
|
z(() => {
|
|
6833
6942
|
let e = `${y}-${w}`;
|
|
6834
|
-
|
|
6943
|
+
rl({
|
|
6835
6944
|
totalFrames: w,
|
|
6836
6945
|
isLoading: _,
|
|
6837
6946
|
isPlaying: o,
|
|
@@ -6854,9 +6963,9 @@ var Yl = () => {
|
|
|
6854
6963
|
u(c === "sequential" ? "shuffle" : c === "shuffle" ? "loop" : "sequential");
|
|
6855
6964
|
}, te = () => {
|
|
6856
6965
|
switch (c) {
|
|
6857
|
-
case "loop": return /* @__PURE__ */ U(
|
|
6858
|
-
case "shuffle": return /* @__PURE__ */ U(
|
|
6859
|
-
case "sequential": return /* @__PURE__ */ U(
|
|
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" });
|
|
6860
6969
|
}
|
|
6861
6970
|
}, k = [
|
|
6862
6971
|
.25,
|
|
@@ -6900,7 +7009,7 @@ var Yl = () => {
|
|
|
6900
7009
|
/* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" })
|
|
6901
7010
|
]
|
|
6902
7011
|
}),
|
|
6903
|
-
/* @__PURE__ */ U(
|
|
7012
|
+
/* @__PURE__ */ U(nc, {
|
|
6904
7013
|
orientation: "vertical",
|
|
6905
7014
|
className: "h-8 mx-2 bg-border"
|
|
6906
7015
|
}),
|
|
@@ -6911,7 +7020,7 @@ var Yl = () => {
|
|
|
6911
7020
|
children: [/* @__PURE__ */ U("div", { className: "h-3 w-24 bg-muted rounded" }), /* @__PURE__ */ U("div", { className: "h-3 w-16 bg-muted rounded" })]
|
|
6912
7021
|
}), /* @__PURE__ */ U("div", { className: "h-1.5 w-full bg-muted rounded-full" })]
|
|
6913
7022
|
}),
|
|
6914
|
-
/* @__PURE__ */ U(
|
|
7023
|
+
/* @__PURE__ */ U(nc, {
|
|
6915
7024
|
orientation: "vertical",
|
|
6916
7025
|
className: "h-8 mx-2 bg-border"
|
|
6917
7026
|
}),
|
|
@@ -6936,7 +7045,7 @@ var Yl = () => {
|
|
|
6936
7045
|
"aria-label": e("playback.mode.toggle")
|
|
6937
7046
|
}),
|
|
6938
7047
|
children: te()
|
|
6939
|
-
}), /* @__PURE__ */ U(
|
|
7048
|
+
}), /* @__PURE__ */ U(P, { children: re() })] }),
|
|
6940
7049
|
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ W(x, {
|
|
6941
7050
|
render: /* @__PURE__ */ U(i, {
|
|
6942
7051
|
variant: "ghost",
|
|
@@ -6947,7 +7056,7 @@ var Yl = () => {
|
|
|
6947
7056
|
"aria-label": e("playback.speed")
|
|
6948
7057
|
}),
|
|
6949
7058
|
children: [f, "x"]
|
|
6950
|
-
}), /* @__PURE__ */ U(
|
|
7059
|
+
}), /* @__PURE__ */ U(P, { children: e("playback.speed") })] }),
|
|
6951
7060
|
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6952
7061
|
render: /* @__PURE__ */ U(i, {
|
|
6953
7062
|
variant: "ghost",
|
|
@@ -6957,8 +7066,8 @@ var Yl = () => {
|
|
|
6957
7066
|
disabled: _,
|
|
6958
7067
|
"aria-label": e("panels.keyboardShortcuts.prevFrame.action")
|
|
6959
7068
|
}),
|
|
6960
|
-
children: /* @__PURE__ */ U(
|
|
6961
|
-
}), /* @__PURE__ */ U(
|
|
7069
|
+
children: /* @__PURE__ */ U(Ns, { className: "h-4 w-4" })
|
|
7070
|
+
}), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.prevFrame.action") })] }),
|
|
6962
7071
|
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6963
7072
|
render: /* @__PURE__ */ U(i, {
|
|
6964
7073
|
variant: "default",
|
|
@@ -6969,7 +7078,7 @@ var Yl = () => {
|
|
|
6969
7078
|
"aria-label": e("panels.keyboardShortcuts.playPause.action")
|
|
6970
7079
|
}),
|
|
6971
7080
|
children: o ? /* @__PURE__ */ U(d, { className: "h-4 w-4" }) : /* @__PURE__ */ U(n, { className: "h-4 w-4 fill-current" })
|
|
6972
|
-
}), /* @__PURE__ */ U(
|
|
7081
|
+
}), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.playPause.action") })] }),
|
|
6973
7082
|
/* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
|
|
6974
7083
|
render: /* @__PURE__ */ U(i, {
|
|
6975
7084
|
variant: "ghost",
|
|
@@ -6980,14 +7089,14 @@ var Yl = () => {
|
|
|
6980
7089
|
"aria-label": e("panels.keyboardShortcuts.nextFrame.action")
|
|
6981
7090
|
}),
|
|
6982
7091
|
children: /* @__PURE__ */ U(l, { className: "h-4 w-4" })
|
|
6983
|
-
}), /* @__PURE__ */ U(
|
|
7092
|
+
}), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.nextFrame.action") })] })
|
|
6984
7093
|
]
|
|
6985
7094
|
}),
|
|
6986
|
-
/* @__PURE__ */ U(
|
|
7095
|
+
/* @__PURE__ */ U(nc, {
|
|
6987
7096
|
orientation: "vertical",
|
|
6988
7097
|
className: "h-8 mx-2 bg-border"
|
|
6989
7098
|
}),
|
|
6990
|
-
/* @__PURE__ */ U(
|
|
7099
|
+
/* @__PURE__ */ U(Zl, {
|
|
6991
7100
|
currentFrames: t,
|
|
6992
7101
|
fps: E,
|
|
6993
7102
|
totalFrames: w,
|
|
@@ -6998,7 +7107,7 @@ var Yl = () => {
|
|
|
6998
7107
|
getFrameIndex: g,
|
|
6999
7108
|
subscribeFrameIndex: h
|
|
7000
7109
|
}),
|
|
7001
|
-
/* @__PURE__ */ U(
|
|
7110
|
+
/* @__PURE__ */ U(nc, {
|
|
7002
7111
|
orientation: "vertical",
|
|
7003
7112
|
className: "h-8 mx-2 bg-border"
|
|
7004
7113
|
}),
|
|
@@ -7009,7 +7118,7 @@ var Yl = () => {
|
|
|
7009
7118
|
children: [/* @__PURE__ */ U("span", {
|
|
7010
7119
|
className: "text-[9px] font-bold text-muted-foreground/60 uppercase tracking-wider",
|
|
7011
7120
|
children: e("playback.meta.fps")
|
|
7012
|
-
}), /* @__PURE__ */ U(
|
|
7121
|
+
}), /* @__PURE__ */ U(As, {
|
|
7013
7122
|
variant: "secondary",
|
|
7014
7123
|
className: "text-[10px] h-4.5 px-1 py-0 font-mono",
|
|
7015
7124
|
children: E
|
|
@@ -7027,7 +7136,7 @@ var Yl = () => {
|
|
|
7027
7136
|
})
|
|
7028
7137
|
]
|
|
7029
7138
|
});
|
|
7030
|
-
},
|
|
7139
|
+
}, $l = ({ title: e, message: t, onRetry: n, errorDetail: a }) => {
|
|
7031
7140
|
let { t: o } = T(), { reset: s } = N(), [c, l] = H(!1);
|
|
7032
7141
|
return /* @__PURE__ */ W("div", {
|
|
7033
7142
|
className: "flex flex-col items-center justify-center p-8 text-center max-w-md mx-auto h-full space-y-6",
|
|
@@ -7036,7 +7145,7 @@ var Yl = () => {
|
|
|
7036
7145
|
children: [
|
|
7037
7146
|
/* @__PURE__ */ U("div", {
|
|
7038
7147
|
className: "bg-destructive/10 p-4 rounded-full",
|
|
7039
|
-
children: /* @__PURE__ */ U(
|
|
7148
|
+
children: /* @__PURE__ */ U(Ps, { className: "h-12 w-12 text-destructive" })
|
|
7040
7149
|
}),
|
|
7041
7150
|
/* @__PURE__ */ W("div", {
|
|
7042
7151
|
className: "space-y-2",
|
|
@@ -7082,21 +7191,21 @@ var Yl = () => {
|
|
|
7082
7191
|
onClick: s,
|
|
7083
7192
|
variant: "outline",
|
|
7084
7193
|
className: "gap-2",
|
|
7085
|
-
children: [/* @__PURE__ */ U(
|
|
7194
|
+
children: [/* @__PURE__ */ U(Is, { className: "h-4 w-4" }), o("navbar.goHome")]
|
|
7086
7195
|
})]
|
|
7087
7196
|
})
|
|
7088
7197
|
]
|
|
7089
7198
|
});
|
|
7090
|
-
},
|
|
7091
|
-
function
|
|
7092
|
-
let { t: c } = T(), { episodes: l, info: u, clearError: d, error: f } = N(), { tasks: p } =
|
|
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 ?? (() => {
|
|
7093
7202
|
d();
|
|
7094
7203
|
});
|
|
7095
7204
|
return /* @__PURE__ */ W("div", {
|
|
7096
7205
|
className: D("flex flex-col h-full w-full overflow-hidden", n),
|
|
7097
7206
|
children: [/* @__PURE__ */ W("div", {
|
|
7098
7207
|
className: "flex flex-1 overflow-hidden",
|
|
7099
|
-
children: [h && /* @__PURE__ */ W(
|
|
7208
|
+
children: [h && /* @__PURE__ */ W(Kl, {
|
|
7100
7209
|
defaultWidth: 256,
|
|
7101
7210
|
minWidth: 200,
|
|
7102
7211
|
maxWidth: 600,
|
|
@@ -7134,7 +7243,7 @@ function Ql({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sideba
|
|
|
7134
7243
|
})]
|
|
7135
7244
|
})
|
|
7136
7245
|
}),
|
|
7137
|
-
children: /* @__PURE__ */ U(
|
|
7246
|
+
children: /* @__PURE__ */ U(eu, {})
|
|
7138
7247
|
})] }) : g ? /* @__PURE__ */ U("div", {
|
|
7139
7248
|
className: "w-full h-full flex items-center justify-center text-muted-foreground",
|
|
7140
7249
|
role: "status",
|
|
@@ -7155,7 +7264,7 @@ function Ql({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sideba
|
|
|
7155
7264
|
})]
|
|
7156
7265
|
})]
|
|
7157
7266
|
})
|
|
7158
|
-
}) : _ ? /* @__PURE__ */ U(
|
|
7267
|
+
}) : _ ? /* @__PURE__ */ U($l, {
|
|
7159
7268
|
title: c("common.error"),
|
|
7160
7269
|
message: c("errors.loadFailed"),
|
|
7161
7270
|
errorDetail: _.error || void 0,
|
|
@@ -7169,16 +7278,16 @@ function Ql({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sideba
|
|
|
7169
7278
|
children: /* @__PURE__ */ U("p", { children: c("common.loading") })
|
|
7170
7279
|
})
|
|
7171
7280
|
})
|
|
7172
|
-
}), t && m && /* @__PURE__ */ U(
|
|
7281
|
+
}), t && m && /* @__PURE__ */ U(Ql, {})]
|
|
7173
7282
|
})]
|
|
7174
|
-
}), o ? /* @__PURE__ */ U(
|
|
7283
|
+
}), o ? /* @__PURE__ */ U(jl, {}) : null]
|
|
7175
7284
|
});
|
|
7176
7285
|
}
|
|
7177
7286
|
//#endregion
|
|
7178
7287
|
//#region src/react/components/LeRobotViewer.tsx
|
|
7179
|
-
function
|
|
7288
|
+
function nu({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFatalError: a, enableKeyboardShortcuts: o = !0, onBack: s, onExport: c }) {
|
|
7180
7289
|
let { t: l } = T(), { initialize: u, error: d, isLoading: f, clearError: p } = N();
|
|
7181
|
-
|
|
7290
|
+
Gl(o);
|
|
7182
7291
|
let m = V(null), [h, g] = H(null), [_, v] = H(null), [y, b] = H(!1), x = V(null), S = B(() => _ ?? (d ? {
|
|
7183
7292
|
code: "DATASET_LOAD_FAILED",
|
|
7184
7293
|
message: d,
|
|
@@ -7209,11 +7318,11 @@ function $l({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFat
|
|
|
7209
7318
|
let r = C(n);
|
|
7210
7319
|
b(!0);
|
|
7211
7320
|
try {
|
|
7212
|
-
let t = await
|
|
7321
|
+
let t = await Zc(r);
|
|
7213
7322
|
if (!t.ok) {
|
|
7214
7323
|
g(null), v({
|
|
7215
7324
|
code: "REMOTE_SOURCE_UNAVAILABLE",
|
|
7216
|
-
message:
|
|
7325
|
+
message: Wc(l, t.failure),
|
|
7217
7326
|
recoverable: !0
|
|
7218
7327
|
});
|
|
7219
7328
|
return;
|
|
@@ -7279,7 +7388,7 @@ function $l({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFat
|
|
|
7279
7388
|
onClick: s,
|
|
7280
7389
|
"aria-label": l("common.back"),
|
|
7281
7390
|
title: l("common.back"),
|
|
7282
|
-
children: [/* @__PURE__ */ U(
|
|
7391
|
+
children: [/* @__PURE__ */ U(js, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ U("span", {
|
|
7283
7392
|
className: "text-xs font-medium truncate",
|
|
7284
7393
|
children: l("common.back")
|
|
7285
7394
|
})]
|
|
@@ -7301,7 +7410,7 @@ function $l({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFat
|
|
|
7301
7410
|
className: "flex-1 min-w-0",
|
|
7302
7411
|
"aria-hidden": !0
|
|
7303
7412
|
})]
|
|
7304
|
-
}) : null, D = S ? /* @__PURE__ */ U(
|
|
7413
|
+
}) : null, D = S ? /* @__PURE__ */ U($l, {
|
|
7305
7414
|
title: l("common.error"),
|
|
7306
7415
|
message: l("errors.loadFailed"),
|
|
7307
7416
|
errorDetail: S.message,
|
|
@@ -7321,22 +7430,22 @@ function $l({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFat
|
|
|
7321
7430
|
})]
|
|
7322
7431
|
})
|
|
7323
7432
|
});
|
|
7324
|
-
return /* @__PURE__ */ U(
|
|
7433
|
+
return /* @__PURE__ */ U(tu, {
|
|
7325
7434
|
showSidebar: n,
|
|
7326
7435
|
showPlaybackBar: r,
|
|
7327
7436
|
showToaster: !1,
|
|
7328
|
-
sidebar: /* @__PURE__ */ U(
|
|
7437
|
+
sidebar: /* @__PURE__ */ U(Wl, {}),
|
|
7329
7438
|
sidebarHeader: E,
|
|
7330
7439
|
emptyState: D,
|
|
7331
7440
|
onRetry: w
|
|
7332
7441
|
});
|
|
7333
7442
|
}
|
|
7334
|
-
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, {
|
|
7335
7444
|
theme: t,
|
|
7336
7445
|
language: n,
|
|
7337
7446
|
className: a,
|
|
7338
7447
|
showToaster: !0,
|
|
7339
|
-
children: /* @__PURE__ */ U(
|
|
7448
|
+
children: /* @__PURE__ */ U(nu, {
|
|
7340
7449
|
dataSource: e,
|
|
7341
7450
|
showSidebar: r,
|
|
7342
7451
|
showPlaybackBar: i,
|
|
@@ -7348,11 +7457,14 @@ var eu = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlayb
|
|
|
7348
7457
|
});
|
|
7349
7458
|
//#endregion
|
|
7350
7459
|
//#region src/react/public-api.ts
|
|
7351
|
-
function
|
|
7460
|
+
function iu(e) {
|
|
7352
7461
|
return _s(e);
|
|
7353
7462
|
}
|
|
7354
|
-
function
|
|
7463
|
+
function au(e) {
|
|
7355
7464
|
return gs(e);
|
|
7356
7465
|
}
|
|
7466
|
+
function ou(e) {
|
|
7467
|
+
return new bs(e);
|
|
7468
|
+
}
|
|
7357
7469
|
//#endregion
|
|
7358
|
-
export {
|
|
7470
|
+
export { ru as LeRobotViewer, iu as createArchiveDataSourceFromFile, au as createArchiveDataSourceFromUrl, ou as createRemoteManifestDataSource };
|