@moises.ai/design-system 3.9.0 → 3.9.1
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/dist/index.js +224 -224
- package/package.json +1 -1
- package/src/components/ProjectsList/ProjectItem/ProjectItem.jsx +1 -1
- package/src/components/ProjectsList/ProjectTrackVoice/ProjectTrackVoice.jsx +4 -4
- package/src/components/ProjectsList/ProjectsList.stories.jsx +4 -3
- package/src/components/ProjectsList/utils-stories.js +1 -6
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var _c = [" ", "Enter", "ArrowUp", "ArrowDown"], $c = [" ", "Enter"], Dt = "Sele
|
|
|
27
27
|
disabled: p,
|
|
28
28
|
required: y,
|
|
29
29
|
form: f
|
|
30
|
-
} = n, m = sr(e), [k, E] = d.useState(null), [
|
|
30
|
+
} = n, m = sr(e), [k, E] = d.useState(null), [I, b] = d.useState(null), [S, w] = d.useState(!1), B = ua(u), [x, O] = Hn({
|
|
31
31
|
prop: r,
|
|
32
32
|
defaultProp: a ?? !1,
|
|
33
33
|
onChange: o,
|
|
@@ -45,8 +45,8 @@ var _c = [" ", "Enter", "ArrowUp", "ArrowDown"], $c = [" ", "Enter"], Dt = "Sele
|
|
|
45
45
|
scope: e,
|
|
46
46
|
trigger: k,
|
|
47
47
|
onTriggerChange: E,
|
|
48
|
-
valueNode:
|
|
49
|
-
onValueNodeChange:
|
|
48
|
+
valueNode: I,
|
|
49
|
+
onValueNodeChange: b,
|
|
50
50
|
valueNodeHasChildren: S,
|
|
51
51
|
onValueNodeHasChildrenChange: w,
|
|
52
52
|
contentId: _r(),
|
|
@@ -101,8 +101,8 @@ Oa.displayName = Dt;
|
|
|
101
101
|
var Fa = "SelectTrigger", Ha = d.forwardRef(
|
|
102
102
|
(n, e) => {
|
|
103
103
|
const { __scopeSelect: t, disabled: r = !1, ...a } = n, o = sr(t), i = ht(Fa, t), l = i.disabled || r, c = be(e, i.onTriggerChange), u = rr(t), h = d.useRef("touch"), [A, p, y] = uo((m) => {
|
|
104
|
-
const k = u().filter((
|
|
105
|
-
|
|
104
|
+
const k = u().filter((b) => !b.disabled), E = k.find((b) => b.value === i.value), I = Ao(k, m, E);
|
|
105
|
+
I !== void 0 && i.onValueChange(I.value);
|
|
106
106
|
}), f = (m) => {
|
|
107
107
|
l || (i.onOpenChange(!0), y()), m && (i.triggerPointerDownPosRef.current = {
|
|
108
108
|
x: Math.round(m.pageX),
|
|
@@ -206,12 +206,12 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
206
206
|
avoidCollisions: k,
|
|
207
207
|
//
|
|
208
208
|
...E
|
|
209
|
-
} = n,
|
|
209
|
+
} = n, I = ht(Jt, t), [b, S] = d.useState(null), [w, B] = d.useState(null), x = be(e, (q) => S(q)), [O, N] = d.useState(null), [T, P] = d.useState(
|
|
210
210
|
null
|
|
211
211
|
), M = rr(t), [z, D] = d.useState(!1), Q = d.useRef(!1);
|
|
212
212
|
d.useEffect(() => {
|
|
213
|
-
if (
|
|
214
|
-
}, [
|
|
213
|
+
if (b) return dl(b);
|
|
214
|
+
}, [b]), ul();
|
|
215
215
|
const j = d.useCallback(
|
|
216
216
|
(q) => {
|
|
217
217
|
const [le, ...Be] = M().map((te) => te.ref.current), [ae] = Be.slice(-1), ee = document.activeElement;
|
|
@@ -220,15 +220,15 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
220
220
|
},
|
|
221
221
|
[M, w]
|
|
222
222
|
), U = d.useCallback(
|
|
223
|
-
() => j([O,
|
|
224
|
-
[j, O,
|
|
223
|
+
() => j([O, b]),
|
|
224
|
+
[j, O, b]
|
|
225
225
|
);
|
|
226
226
|
d.useEffect(() => {
|
|
227
227
|
z && U();
|
|
228
228
|
}, [z, U]);
|
|
229
|
-
const { onOpenChange: G, triggerPointerDownPosRef: F } =
|
|
229
|
+
const { onOpenChange: G, triggerPointerDownPosRef: F } = I;
|
|
230
230
|
d.useEffect(() => {
|
|
231
|
-
if (
|
|
231
|
+
if (b) {
|
|
232
232
|
let q = { x: 0, y: 0 };
|
|
233
233
|
const le = (ae) => {
|
|
234
234
|
var ee, te;
|
|
@@ -237,13 +237,13 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
237
237
|
y: Math.abs(Math.round(ae.pageY) - (((te = F.current) == null ? void 0 : te.y) ?? 0))
|
|
238
238
|
};
|
|
239
239
|
}, Be = (ae) => {
|
|
240
|
-
q.x <= 10 && q.y <= 10 ? ae.preventDefault() :
|
|
240
|
+
q.x <= 10 && q.y <= 10 ? ae.preventDefault() : b.contains(ae.target) || G(!1), document.removeEventListener("pointermove", le), F.current = null;
|
|
241
241
|
};
|
|
242
242
|
return F.current !== null && (document.addEventListener("pointermove", le), document.addEventListener("pointerup", Be, { capture: !0, once: !0 })), () => {
|
|
243
243
|
document.removeEventListener("pointermove", le), document.removeEventListener("pointerup", Be, { capture: !0 });
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
}, [
|
|
246
|
+
}, [b, G, F]), d.useEffect(() => {
|
|
247
247
|
const q = () => G(!1);
|
|
248
248
|
return window.addEventListener("blur", q), window.addEventListener("resize", q), () => {
|
|
249
249
|
window.removeEventListener("blur", q), window.removeEventListener("resize", q);
|
|
@@ -255,15 +255,15 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
255
255
|
}), Ke = d.useCallback(
|
|
256
256
|
(q, le, Be) => {
|
|
257
257
|
const ae = !Q.current && !Be;
|
|
258
|
-
(
|
|
258
|
+
(I.value !== void 0 && I.value === le || ae) && (N(q), ae && (Q.current = !0));
|
|
259
259
|
},
|
|
260
|
-
[
|
|
261
|
-
), ft = d.useCallback(() =>
|
|
260
|
+
[I.value]
|
|
261
|
+
), ft = d.useCallback(() => b == null ? void 0 : b.focus(), [b]), Fe = d.useCallback(
|
|
262
262
|
(q, le, Be) => {
|
|
263
263
|
const ae = !Q.current && !Be;
|
|
264
|
-
(
|
|
264
|
+
(I.value !== void 0 && I.value === le || ae) && P(q);
|
|
265
265
|
},
|
|
266
|
-
[
|
|
266
|
+
[I.value]
|
|
267
267
|
), Ae = r === "popper" ? zr : Xa, Ee = Ae === zr ? {
|
|
268
268
|
side: l,
|
|
269
269
|
sideOffset: c,
|
|
@@ -280,7 +280,7 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
280
280
|
Ka,
|
|
281
281
|
{
|
|
282
282
|
scope: t,
|
|
283
|
-
content:
|
|
283
|
+
content: b,
|
|
284
284
|
viewport: w,
|
|
285
285
|
onViewportChange: B,
|
|
286
286
|
itemRefCallback: Ke,
|
|
@@ -296,13 +296,13 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
296
296
|
hl,
|
|
297
297
|
{
|
|
298
298
|
asChild: !0,
|
|
299
|
-
trapped:
|
|
299
|
+
trapped: I.open,
|
|
300
300
|
onMountAutoFocus: (q) => {
|
|
301
301
|
q.preventDefault();
|
|
302
302
|
},
|
|
303
303
|
onUnmountAutoFocus: de(a, (q) => {
|
|
304
304
|
var le;
|
|
305
|
-
(le =
|
|
305
|
+
(le = I.trigger) == null || le.focus({ preventScroll: !0 }), q.preventDefault();
|
|
306
306
|
}),
|
|
307
307
|
children: /* @__PURE__ */ s(
|
|
308
308
|
pl,
|
|
@@ -312,14 +312,14 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
312
312
|
onEscapeKeyDown: o,
|
|
313
313
|
onPointerDownOutside: i,
|
|
314
314
|
onFocusOutside: (q) => q.preventDefault(),
|
|
315
|
-
onDismiss: () =>
|
|
315
|
+
onDismiss: () => I.onOpenChange(!1),
|
|
316
316
|
children: /* @__PURE__ */ s(
|
|
317
317
|
Ae,
|
|
318
318
|
{
|
|
319
319
|
role: "listbox",
|
|
320
|
-
id:
|
|
321
|
-
"data-state":
|
|
322
|
-
dir:
|
|
320
|
+
id: I.contentId,
|
|
321
|
+
"data-state": I.open ? "open" : "closed",
|
|
322
|
+
dir: I.dir,
|
|
323
323
|
onContextMenu: (q) => q.preventDefault(),
|
|
324
324
|
...E,
|
|
325
325
|
...Ee,
|
|
@@ -356,7 +356,7 @@ var Oe = 10, [Ka, pt] = Yt(Jt), od = "SelectContentImpl", id = ml("SelectContent
|
|
|
356
356
|
);
|
|
357
357
|
Ga.displayName = od;
|
|
358
358
|
var ld = "SelectItemAlignedPosition", Xa = d.forwardRef((n, e) => {
|
|
359
|
-
const { __scopeSelect: t, onPlaced: r, ...a } = n, o = ht(Jt, t), i = pt(Jt, t), [l, c] = d.useState(null), [u, h] = d.useState(null), A = be(e, (x) => h(x)), p = rr(t), y = d.useRef(!1), f = d.useRef(!0), { viewport: m, selectedItem: k, selectedItemText: E, focusSelectedItem:
|
|
359
|
+
const { __scopeSelect: t, onPlaced: r, ...a } = n, o = ht(Jt, t), i = pt(Jt, t), [l, c] = d.useState(null), [u, h] = d.useState(null), A = be(e, (x) => h(x)), p = rr(t), y = d.useRef(!1), f = d.useRef(!0), { viewport: m, selectedItem: k, selectedItemText: E, focusSelectedItem: I } = i, b = d.useCallback(() => {
|
|
360
360
|
if (o.trigger && o.valueNode && l && u && m && k && E) {
|
|
361
361
|
const x = o.trigger.getBoundingClientRect(), O = u.getBoundingClientRect(), N = o.valueNode.getBoundingClientRect(), T = E.getBoundingClientRect();
|
|
362
362
|
if (o.dir !== "rtl") {
|
|
@@ -411,16 +411,16 @@ var ld = "SelectItemAlignedPosition", Xa = d.forwardRef((n, e) => {
|
|
|
411
411
|
o.dir,
|
|
412
412
|
r
|
|
413
413
|
]);
|
|
414
|
-
dt(() =>
|
|
414
|
+
dt(() => b(), [b]);
|
|
415
415
|
const [S, w] = d.useState();
|
|
416
416
|
dt(() => {
|
|
417
417
|
u && w(window.getComputedStyle(u).zIndex);
|
|
418
418
|
}, [u]);
|
|
419
419
|
const B = d.useCallback(
|
|
420
420
|
(x) => {
|
|
421
|
-
x && f.current === !0 && (
|
|
421
|
+
x && f.current === !0 && (b(), I == null || I(), f.current = !1);
|
|
422
422
|
},
|
|
423
|
-
[
|
|
423
|
+
[b, I]
|
|
424
424
|
);
|
|
425
425
|
return /* @__PURE__ */ s(
|
|
426
426
|
dd,
|
|
@@ -529,8 +529,8 @@ var [dd, os] = Yt(Jt, {}), Or = "SelectViewport", Ya = d.forwardRef(
|
|
|
529
529
|
if (y > 0) {
|
|
530
530
|
const f = window.innerHeight - Oe * 2, m = parseFloat(A.style.minHeight), k = parseFloat(A.style.height), E = Math.max(m, k);
|
|
531
531
|
if (E < f) {
|
|
532
|
-
const
|
|
533
|
-
A.style.height =
|
|
532
|
+
const I = E + y, b = Math.min(f, I), S = I - b;
|
|
533
|
+
A.style.height = b + "px", A.style.bottom === "0px" && (h.scrollTop = S > 0 ? S : 0, A.style.justifyContent = "flex-end");
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
}
|
|
@@ -566,9 +566,9 @@ var Ln = "SelectItem", [hd, to] = Yt(Ln), no = d.forwardRef(
|
|
|
566
566
|
...i
|
|
567
567
|
} = n, l = ht(Ln, t), c = pt(Ln, t), u = l.value === r, [h, A] = d.useState(o ?? ""), [p, y] = d.useState(!1), f = be(
|
|
568
568
|
e,
|
|
569
|
-
(
|
|
570
|
-
var
|
|
571
|
-
return (
|
|
569
|
+
(I) => {
|
|
570
|
+
var b;
|
|
571
|
+
return (b = c.itemRefCallback) == null ? void 0 : b.call(c, I, r, a);
|
|
572
572
|
}
|
|
573
573
|
), m = _r(), k = d.useRef("touch"), E = () => {
|
|
574
574
|
a || (l.onValueChange(r), l.onOpenChange(!1));
|
|
@@ -585,8 +585,8 @@ var Ln = "SelectItem", [hd, to] = Yt(Ln), no = d.forwardRef(
|
|
|
585
585
|
disabled: a,
|
|
586
586
|
textId: m,
|
|
587
587
|
isSelected: u,
|
|
588
|
-
onItemTextChange: d.useCallback((
|
|
589
|
-
A((
|
|
588
|
+
onItemTextChange: d.useCallback((I) => {
|
|
589
|
+
A((b) => b || ((I == null ? void 0 : I.textContent) ?? "").trim());
|
|
590
590
|
}, []),
|
|
591
591
|
children: /* @__PURE__ */ s(
|
|
592
592
|
nr.ItemSlot,
|
|
@@ -616,20 +616,20 @@ var Ln = "SelectItem", [hd, to] = Yt(Ln), no = d.forwardRef(
|
|
|
616
616
|
onPointerUp: de(i.onPointerUp, () => {
|
|
617
617
|
k.current === "mouse" && E();
|
|
618
618
|
}),
|
|
619
|
-
onPointerDown: de(i.onPointerDown, (
|
|
620
|
-
k.current =
|
|
619
|
+
onPointerDown: de(i.onPointerDown, (I) => {
|
|
620
|
+
k.current = I.pointerType;
|
|
621
621
|
}),
|
|
622
|
-
onPointerMove: de(i.onPointerMove, (
|
|
623
|
-
var
|
|
624
|
-
k.current =
|
|
622
|
+
onPointerMove: de(i.onPointerMove, (I) => {
|
|
623
|
+
var b;
|
|
624
|
+
k.current = I.pointerType, a ? (b = c.onItemLeave) == null || b.call(c) : k.current === "mouse" && I.currentTarget.focus({ preventScroll: !0 });
|
|
625
625
|
}),
|
|
626
|
-
onPointerLeave: de(i.onPointerLeave, (
|
|
627
|
-
var
|
|
628
|
-
|
|
626
|
+
onPointerLeave: de(i.onPointerLeave, (I) => {
|
|
627
|
+
var b;
|
|
628
|
+
I.currentTarget === document.activeElement && ((b = c.onItemLeave) == null || b.call(c));
|
|
629
629
|
}),
|
|
630
|
-
onKeyDown: de(i.onKeyDown, (
|
|
630
|
+
onKeyDown: de(i.onKeyDown, (I) => {
|
|
631
631
|
var S;
|
|
632
|
-
((S = c.searchRef) == null ? void 0 : S.current) !== "" &&
|
|
632
|
+
((S = c.searchRef) == null ? void 0 : S.current) !== "" && I.key === " " || ($c.includes(I.key) && E(), I.key === " " && I.preventDefault());
|
|
633
633
|
})
|
|
634
634
|
}
|
|
635
635
|
)
|
|
@@ -647,8 +647,8 @@ var hn = "SelectItemText", ro = d.forwardRef(
|
|
|
647
647
|
(E) => A(E),
|
|
648
648
|
c.onItemTextChange,
|
|
649
649
|
(E) => {
|
|
650
|
-
var
|
|
651
|
-
return (
|
|
650
|
+
var I;
|
|
651
|
+
return (I = l.itemTextRefCallback) == null ? void 0 : I.call(l, E, c.value, c.disabled);
|
|
652
652
|
}
|
|
653
653
|
), y = h == null ? void 0 : h.textContent, f = d.useMemo(
|
|
654
654
|
() => /* @__PURE__ */ s("option", { value: c.value, disabled: c.disabled, children: y }, c.value),
|
|
@@ -838,7 +838,7 @@ var yd = Oa, kd = Ha, Ed = La, Sd = ja, Id = Va, bd = qa, wd = Ya, Bd = _a, Rd =
|
|
|
838
838
|
inverted: y = !1,
|
|
839
839
|
form: f,
|
|
840
840
|
...m
|
|
841
|
-
} = n, k = d.useRef(/* @__PURE__ */ new Set()), E = d.useRef(0),
|
|
841
|
+
} = n, k = d.useRef(/* @__PURE__ */ new Set()), E = d.useRef(0), b = i === "horizontal" ? Ud : Md, [S = [], w] = Hn({
|
|
842
842
|
prop: h,
|
|
843
843
|
defaultProp: u,
|
|
844
844
|
onChange: (P) => {
|
|
@@ -883,7 +883,7 @@ var yd = Oa, kd = Ha, Ed = La, Sd = ja, Id = Va, bd = qa, wd = Ya, Bd = _a, Rd =
|
|
|
883
883
|
orientation: i,
|
|
884
884
|
form: f,
|
|
885
885
|
children: /* @__PURE__ */ s(Lr.Provider, { scope: n.__scopeSlider, children: /* @__PURE__ */ s(Lr.Slot, { scope: n.__scopeSlider, children: /* @__PURE__ */ s(
|
|
886
|
-
|
|
886
|
+
b,
|
|
887
887
|
{
|
|
888
888
|
"aria-disabled": l,
|
|
889
889
|
"data-disabled": l ? "" : void 0,
|
|
@@ -930,10 +930,10 @@ var [vo, Co] = go(Zt, {
|
|
|
930
930
|
onSlideEnd: c,
|
|
931
931
|
onStepKeyDown: u,
|
|
932
932
|
...h
|
|
933
|
-
} = n, [A, p] = d.useState(null), y = be(e, (
|
|
934
|
-
function b
|
|
933
|
+
} = n, [A, p] = d.useState(null), y = be(e, (b) => p(b)), f = d.useRef(void 0), m = ua(a), k = m === "ltr", E = k && !o || !k && o;
|
|
934
|
+
function I(b) {
|
|
935
935
|
const S = f.current || A.getBoundingClientRect(), w = [0, S.width], x = is(w, E ? [t, r] : [r, t]);
|
|
936
|
-
return f.current = S, x(
|
|
936
|
+
return f.current = S, x(b - S.left);
|
|
937
937
|
}
|
|
938
938
|
return /* @__PURE__ */ s(
|
|
939
939
|
vo,
|
|
@@ -954,20 +954,20 @@ var [vo, Co] = go(Zt, {
|
|
|
954
954
|
...h.style,
|
|
955
955
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
956
956
|
},
|
|
957
|
-
onSlideStart: (
|
|
958
|
-
const S = b
|
|
957
|
+
onSlideStart: (b) => {
|
|
958
|
+
const S = I(b.clientX);
|
|
959
959
|
i == null || i(S);
|
|
960
960
|
},
|
|
961
|
-
onSlideMove: (
|
|
962
|
-
const S = b
|
|
961
|
+
onSlideMove: (b) => {
|
|
962
|
+
const S = I(b.clientX);
|
|
963
963
|
l == null || l(S);
|
|
964
964
|
},
|
|
965
965
|
onSlideEnd: () => {
|
|
966
966
|
f.current = void 0, c == null || c();
|
|
967
967
|
},
|
|
968
|
-
onStepKeyDown: (
|
|
969
|
-
const w = mo[E ? "from-left" : "from-right"].includes(
|
|
970
|
-
u == null || u({ event:
|
|
968
|
+
onStepKeyDown: (b) => {
|
|
969
|
+
const w = mo[E ? "from-left" : "from-right"].includes(b.key);
|
|
970
|
+
u == null || u({ event: b, direction: w ? -1 : 1 });
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
)
|
|
@@ -987,8 +987,8 @@ var [vo, Co] = go(Zt, {
|
|
|
987
987
|
...u
|
|
988
988
|
} = n, h = d.useRef(null), A = be(e, h), p = d.useRef(void 0), y = !a;
|
|
989
989
|
function f(m) {
|
|
990
|
-
const k = p.current || h.current.getBoundingClientRect(), E = [0, k.height],
|
|
991
|
-
return p.current = k,
|
|
990
|
+
const k = p.current || h.current.getBoundingClientRect(), E = [0, k.height], b = is(E, y ? [r, t] : [t, r]);
|
|
991
|
+
return p.current = k, b(m - k.top);
|
|
992
992
|
}
|
|
993
993
|
return /* @__PURE__ */ s(
|
|
994
994
|
vo,
|
|
@@ -1109,7 +1109,7 @@ var Vr = "SliderThumb", Io = d.forwardRef(
|
|
|
1109
1109
|
}
|
|
1110
1110
|
), zd = d.forwardRef(
|
|
1111
1111
|
(n, e) => {
|
|
1112
|
-
const { __scopeSlider: t, index: r, name: a, ...o } = n, i = ar(Vr, t), l = Co(Vr, t), [c, u] = d.useState(null), h = be(e, (
|
|
1112
|
+
const { __scopeSlider: t, index: r, name: a, ...o } = n, i = ar(Vr, t), l = Co(Vr, t), [c, u] = d.useState(null), h = be(e, (I) => u(I)), A = c ? i.form || !!c.closest("form") : !0, p = vl(c), y = i.values[r], f = y === void 0 ? 0 : wo(y, i.min, i.max), m = Hd(r, i.values.length), k = p == null ? void 0 : p[l.size], E = k ? Ld(k, f, l.direction) : 0;
|
|
1113
1113
|
return d.useEffect(() => {
|
|
1114
1114
|
if (c)
|
|
1115
1115
|
return i.thumbs.add(c), () => {
|
|
@@ -1420,15 +1420,15 @@ const Uo = d.forwardRef((n, e) => {
|
|
|
1420
1420
|
d.useEffect(() => m(a), [a]);
|
|
1421
1421
|
const [k, E] = d.useState(o);
|
|
1422
1422
|
d.useEffect(() => E(o), [o]);
|
|
1423
|
-
const [
|
|
1424
|
-
d.useEffect(() =>
|
|
1423
|
+
const [I, b] = d.useState(i);
|
|
1424
|
+
d.useEffect(() => b(i), [i]);
|
|
1425
1425
|
const [S, w] = d.useState(l);
|
|
1426
|
-
return d.useEffect(() => w(l), [l]), d.createElement(cs, { ...u, ref: e, isRoot: !0, hasBackground: c, appearance: h, accentColor: p, grayColor: f, panelBackground: k, radius:
|
|
1426
|
+
return d.useEffect(() => w(l), [l]), d.createElement(cs, { ...u, ref: e, isRoot: !0, hasBackground: c, appearance: h, accentColor: p, grayColor: f, panelBackground: k, radius: I, scaling: S, onAppearanceChange: A, onAccentColorChange: y, onGrayColorChange: m, onPanelBackgroundChange: E, onRadiusChange: b, onScalingChange: w });
|
|
1427
1427
|
});
|
|
1428
1428
|
Uo.displayName = "ThemeRoot";
|
|
1429
1429
|
const cs = d.forwardRef((n, e) => {
|
|
1430
|
-
const t = d.useContext(jn), { asChild: r, isRoot: a, hasBackground: o, appearance: i = (t == null ? void 0 : t.appearance) ?? Pe.appearance.default, accentColor: l = (t == null ? void 0 : t.accentColor) ?? Pe.accentColor.default, grayColor: c = (t == null ? void 0 : t.resolvedGrayColor) ?? Pe.grayColor.default, panelBackground: u = (t == null ? void 0 : t.panelBackground) ?? Pe.panelBackground.default, radius: h = (t == null ? void 0 : t.radius) ?? Pe.radius.default, scaling: A = (t == null ? void 0 : t.scaling) ?? Pe.scaling.default, onAppearanceChange: p = Ft, onAccentColorChange: y = Ft, onGrayColorChange: f = Ft, onPanelBackgroundChange: m = Ft, onRadiusChange: k = Ft, onScalingChange: E = Ft, ...
|
|
1431
|
-
return d.createElement(jn.Provider, { value: d.useMemo(() => ({ appearance: i, accentColor: l, grayColor: c, resolvedGrayColor: S, panelBackground: u, radius: h, scaling: A, onAppearanceChange: p, onAccentColorChange: y, onGrayColorChange: f, onPanelBackgroundChange: m, onRadiusChange: k, onScalingChange: E }), [i, l, c, S, u, h, A, p, y, f, m, k, E]) }, d.createElement(
|
|
1430
|
+
const t = d.useContext(jn), { asChild: r, isRoot: a, hasBackground: o, appearance: i = (t == null ? void 0 : t.appearance) ?? Pe.appearance.default, accentColor: l = (t == null ? void 0 : t.accentColor) ?? Pe.accentColor.default, grayColor: c = (t == null ? void 0 : t.resolvedGrayColor) ?? Pe.grayColor.default, panelBackground: u = (t == null ? void 0 : t.panelBackground) ?? Pe.panelBackground.default, radius: h = (t == null ? void 0 : t.radius) ?? Pe.radius.default, scaling: A = (t == null ? void 0 : t.scaling) ?? Pe.scaling.default, onAppearanceChange: p = Ft, onAccentColorChange: y = Ft, onGrayColorChange: f = Ft, onPanelBackgroundChange: m = Ft, onRadiusChange: k = Ft, onScalingChange: E = Ft, ...I } = n, b = r ? ke : "div", S = c === "auto" ? lu(l) : c, w = n.appearance === "light" || n.appearance === "dark", B = o === void 0 ? a || w : o;
|
|
1431
|
+
return d.createElement(jn.Provider, { value: d.useMemo(() => ({ appearance: i, accentColor: l, grayColor: c, resolvedGrayColor: S, panelBackground: u, radius: h, scaling: A, onAppearanceChange: p, onAccentColorChange: y, onGrayColorChange: f, onPanelBackgroundChange: m, onRadiusChange: k, onScalingChange: E }), [i, l, c, S, u, h, A, p, y, f, m, k, E]) }, d.createElement(b, { "data-is-root-theme": a ? "true" : "false", "data-accent-color": l, "data-gray-color": S, "data-has-background": B ? "true" : "false", "data-panel-background": u, "data-radius": h, "data-scaling": A, ref: e, ...I, className: v("radix-themes", { light: i === "light", dark: i === "dark" }, I.className) }));
|
|
1432
1432
|
});
|
|
1433
1433
|
cs.displayName = "ThemeImpl";
|
|
1434
1434
|
const gt = (n) => {
|
|
@@ -2749,8 +2749,8 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
2749
2749
|
isDragging: m,
|
|
2750
2750
|
isDragOver: k,
|
|
2751
2751
|
onDragStart: E,
|
|
2752
|
-
onDragOver:
|
|
2753
|
-
onDragLeave:
|
|
2752
|
+
onDragOver: I,
|
|
2753
|
+
onDragLeave: b,
|
|
2754
2754
|
onDrop: S,
|
|
2755
2755
|
onDragEnd: w
|
|
2756
2756
|
}) {
|
|
@@ -2783,7 +2783,7 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
2783
2783
|
});
|
|
2784
2784
|
}
|
|
2785
2785
|
}, D = (U) => {
|
|
2786
|
-
U.preventDefault(), U.dataTransfer.dropEffect = "move",
|
|
2786
|
+
U.preventDefault(), U.dataTransfer.dropEffect = "move", I == null || I(t);
|
|
2787
2787
|
}, Q = (U) => {
|
|
2788
2788
|
U.preventDefault();
|
|
2789
2789
|
const G = parseInt(U.dataTransfer.getData("text/plain"), 10);
|
|
@@ -2803,7 +2803,7 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
2803
2803
|
draggable: f,
|
|
2804
2804
|
onDragStart: f ? z : void 0,
|
|
2805
2805
|
onDragOver: f ? D : void 0,
|
|
2806
|
-
onDragLeave: f ?
|
|
2806
|
+
onDragLeave: f ? b : void 0,
|
|
2807
2807
|
onDrop: f ? Q : void 0,
|
|
2808
2808
|
onDragEnd: f ? w : void 0,
|
|
2809
2809
|
children: [
|
|
@@ -2885,7 +2885,7 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
2885
2885
|
onReorder: y,
|
|
2886
2886
|
...f
|
|
2887
2887
|
}) => {
|
|
2888
|
-
const [m, k] = K(!1), [E,
|
|
2888
|
+
const [m, k] = K(!1), [E, I] = K(null), [b, S] = K(null), w = ne(null), B = i == null ? void 0 : i.field, x = _(() => new Set(r), [r]), O = R((H) => x.has(H), [x]), N = r.length, T = (t == null ? void 0 : t.length) ?? 0, P = N > 0, M = T > 0 && N === T, z = _(
|
|
2889
2889
|
() => t == null ? void 0 : t.some((H) => {
|
|
2890
2890
|
var X;
|
|
2891
2891
|
return (X = H.dropdownOptions) == null ? void 0 : X.length;
|
|
@@ -2938,18 +2938,18 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
2938
2938
|
},
|
|
2939
2939
|
[P, M, c]
|
|
2940
2940
|
), se = R((H) => {
|
|
2941
|
-
|
|
2941
|
+
I(H);
|
|
2942
2942
|
}, []), Te = R((H) => {
|
|
2943
2943
|
S(H);
|
|
2944
2944
|
}, []), Ke = R(() => {
|
|
2945
2945
|
S(null);
|
|
2946
2946
|
}, []), ft = R(
|
|
2947
2947
|
(H, X) => {
|
|
2948
|
-
|
|
2948
|
+
I(null), S(null), !(H === X || H + 1 === X) && (y == null || y({ order: H, move_before: X }));
|
|
2949
2949
|
},
|
|
2950
2950
|
[y]
|
|
2951
2951
|
), Fe = R(() => {
|
|
2952
|
-
|
|
2952
|
+
I(null), S(null);
|
|
2953
2953
|
}, []), Ae = R(() => {
|
|
2954
2954
|
S((t == null ? void 0 : t.length) ?? 0);
|
|
2955
2955
|
}, [t == null ? void 0 : t.length]), Ee = R(() => {
|
|
@@ -2958,7 +2958,7 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
2958
2958
|
(H) => {
|
|
2959
2959
|
H.preventDefault();
|
|
2960
2960
|
const X = parseInt(H.dataTransfer.getData("text/plain"), 10), pe = (t == null ? void 0 : t.length) ?? 0;
|
|
2961
|
-
|
|
2961
|
+
I(null), S(null), !(X === pe || X + 1 === pe) && (y == null || y({ order: X, move_before: pe }));
|
|
2962
2962
|
},
|
|
2963
2963
|
[t == null ? void 0 : t.length, y]
|
|
2964
2964
|
), le = 1 + ((e == null ? void 0 : e.length) ?? 0) + (z ? 1 : 0), Be = p && (t == null ? void 0 : t.length) && E !== null, ae = R((H, X, pe) => {
|
|
@@ -3060,7 +3060,7 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
3060
3060
|
renderDataCell: ae,
|
|
3061
3061
|
reorderable: p,
|
|
3062
3062
|
isDragging: E === X,
|
|
3063
|
-
isDragOver:
|
|
3063
|
+
isDragOver: b === X,
|
|
3064
3064
|
onDragStart: se,
|
|
3065
3065
|
onDragOver: Te,
|
|
3066
3066
|
onDragLeave: Ke,
|
|
@@ -3073,7 +3073,7 @@ const cg = "_DataTable_1adwg_1", dg = "_titleText_1adwg_23", ug = "_artistText_1
|
|
|
3073
3073
|
yn,
|
|
3074
3074
|
{
|
|
3075
3075
|
className: v(Y.dropAfterRow, {
|
|
3076
|
-
[Y.dropAfterRowActive]:
|
|
3076
|
+
[Y.dropAfterRowActive]: b === t.length
|
|
3077
3077
|
}),
|
|
3078
3078
|
onDragOver: (H) => {
|
|
3079
3079
|
H.preventDefault(), H.dataTransfer.dropEffect = "move", Ae();
|
|
@@ -3432,21 +3432,21 @@ function $g({ initialScreen: n, animated: e, children: t }) {
|
|
|
3432
3432
|
), k = R(
|
|
3433
3433
|
(N) => p(() => [{ name: N || n, params: {} }]),
|
|
3434
3434
|
[p, n]
|
|
3435
|
-
), E = r.length > 1,
|
|
3435
|
+
), E = r.length > 1, I = _(
|
|
3436
3436
|
() => ({ push: y, pop: f, popTo: m, reset: k, canGoBack: E, stack: r }),
|
|
3437
3437
|
[y, f, m, k, E, r]
|
|
3438
|
-
),
|
|
3438
|
+
), b = r[r.length - 1], S = A[b.name];
|
|
3439
3439
|
if (!S) return null;
|
|
3440
3440
|
const w = (N, T) => N in o ? o[N] : S[N] ?? T, B = S.component, x = R(
|
|
3441
3441
|
(N) => {
|
|
3442
|
-
u.current[u.current.length - 1].name ===
|
|
3442
|
+
u.current[u.current.length - 1].name === b.name && i((P) => ({ ...P, ...N }));
|
|
3443
3443
|
},
|
|
3444
|
-
[
|
|
3444
|
+
[b.name]
|
|
3445
3445
|
), O = _(
|
|
3446
|
-
() => ({ name:
|
|
3447
|
-
[
|
|
3446
|
+
() => ({ name: b.name, params: b.params || {}, setOptions: x }),
|
|
3447
|
+
[b.name, b.params, x]
|
|
3448
3448
|
);
|
|
3449
|
-
return /* @__PURE__ */ s(Qi.Provider, { value:
|
|
3449
|
+
return /* @__PURE__ */ s(Qi.Provider, { value: I, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 }, children: [
|
|
3450
3450
|
/* @__PURE__ */ s(
|
|
3451
3451
|
Di,
|
|
3452
3452
|
{
|
|
@@ -3915,10 +3915,10 @@ const JS = Cr, Rf = "_sliderRoot_7wkh4_23", Nf = "_sliderTrack_7wkh4_31", xf = "
|
|
|
3915
3915
|
p();
|
|
3916
3916
|
}, [p]), E = R(() => {
|
|
3917
3917
|
n([1]), A();
|
|
3918
|
-
}, [n, A]),
|
|
3918
|
+
}, [n, A]), I = R(() => {
|
|
3919
3919
|
const S = Date.now();
|
|
3920
3920
|
S - i.current < 300 && E(), i.current = S;
|
|
3921
|
-
}, [E]),
|
|
3921
|
+
}, [E]), b = _(
|
|
3922
3922
|
() => /* @__PURE__ */ g(ge, { children: [
|
|
3923
3923
|
h ? "-∞ dB" : `${u.toFixed(1)} dB`,
|
|
3924
3924
|
/* @__PURE__ */ s($n, { className: wt.tooltipArrow })
|
|
@@ -3947,7 +3947,7 @@ const JS = Cr, Rf = "_sliderRoot_7wkh4_23", Nf = "_sliderTrack_7wkh4_31", xf = "
|
|
|
3947
3947
|
onPointerDown: m,
|
|
3948
3948
|
onKeyDown: y,
|
|
3949
3949
|
onBlur: k,
|
|
3950
|
-
onClick:
|
|
3950
|
+
onClick: I
|
|
3951
3951
|
}
|
|
3952
3952
|
) }),
|
|
3953
3953
|
/* @__PURE__ */ s(
|
|
@@ -3957,7 +3957,7 @@ const JS = Cr, Rf = "_sliderRoot_7wkh4_23", Nf = "_sliderTrack_7wkh4_31", xf = "
|
|
|
3957
3957
|
side: "bottom",
|
|
3958
3958
|
align: "center",
|
|
3959
3959
|
sideOffset: 10,
|
|
3960
|
-
children:
|
|
3960
|
+
children: b
|
|
3961
3961
|
}
|
|
3962
3962
|
)
|
|
3963
3963
|
] }) })
|
|
@@ -4131,9 +4131,9 @@ const zn = 19.5, On = 19.5, Ys = 14, Zs = 18, Vf = [
|
|
|
4131
4131
|
n == null && e(a);
|
|
4132
4132
|
}, [n, e, a]);
|
|
4133
4133
|
const p = R(
|
|
4134
|
-
(
|
|
4135
|
-
if (
|
|
4136
|
-
const S =
|
|
4134
|
+
(b) => {
|
|
4135
|
+
if (b.preventDefault(), b.stopPropagation(), t) return;
|
|
4136
|
+
const S = b.wheelDelta ?? -b.deltaY * 25;
|
|
4137
4137
|
if (!S || Math.abs(S) <= 50) return;
|
|
4138
4138
|
const w = Date.now();
|
|
4139
4139
|
if (w - A.current < 100) return;
|
|
@@ -4142,21 +4142,21 @@ const zn = 19.5, On = 19.5, Ys = 14, Zs = 18, Vf = [
|
|
|
4142
4142
|
},
|
|
4143
4143
|
[e, n, r, t]
|
|
4144
4144
|
), y = R(
|
|
4145
|
-
(
|
|
4145
|
+
(b) => {
|
|
4146
4146
|
if (t) {
|
|
4147
|
-
|
|
4147
|
+
b.preventDefault();
|
|
4148
4148
|
return;
|
|
4149
4149
|
}
|
|
4150
|
-
|
|
4150
|
+
b.preventDefault(), c(!0), h(b.clientY);
|
|
4151
4151
|
},
|
|
4152
4152
|
[t]
|
|
4153
4153
|
), f = R(
|
|
4154
|
-
(
|
|
4154
|
+
(b) => {
|
|
4155
4155
|
if (!l || t) return;
|
|
4156
|
-
const S = u -
|
|
4156
|
+
const S = u - b.clientY;
|
|
4157
4157
|
if (Math.abs(S) <= 20) return;
|
|
4158
4158
|
const w = S > 0 ? 1 : -1, B = $s(n, r, w);
|
|
4159
|
-
e(B), h(
|
|
4159
|
+
e(B), h(b.clientY), A.current = Date.now();
|
|
4160
4160
|
},
|
|
4161
4161
|
[l, u, n, e, r, t]
|
|
4162
4162
|
), m = R(() => {
|
|
@@ -4164,14 +4164,14 @@ const zn = 19.5, On = 19.5, Ys = 14, Zs = 18, Vf = [
|
|
|
4164
4164
|
}, []), k = R(() => {
|
|
4165
4165
|
c(!1);
|
|
4166
4166
|
}, []), E = R(
|
|
4167
|
-
(
|
|
4168
|
-
|
|
4167
|
+
(b) => {
|
|
4168
|
+
b.detail === 2 && !t && e(a);
|
|
4169
4169
|
},
|
|
4170
4170
|
[e, a, t]
|
|
4171
|
-
),
|
|
4172
|
-
(
|
|
4171
|
+
), I = R(
|
|
4172
|
+
(b) => {
|
|
4173
4173
|
if (!o || t) return;
|
|
4174
|
-
const S = qf(r,
|
|
4174
|
+
const S = qf(r, b);
|
|
4175
4175
|
S && e(S);
|
|
4176
4176
|
},
|
|
4177
4177
|
[o, t, e, r]
|
|
@@ -4180,7 +4180,7 @@ const zn = 19.5, On = 19.5, Ys = 14, Zs = 18, Vf = [
|
|
|
4180
4180
|
containerRef: i,
|
|
4181
4181
|
isDragging: l,
|
|
4182
4182
|
handleClick: E,
|
|
4183
|
-
handleDotClick:
|
|
4183
|
+
handleDotClick: I
|
|
4184
4184
|
};
|
|
4185
4185
|
}, Yf = ({
|
|
4186
4186
|
className: n,
|
|
@@ -4201,8 +4201,8 @@ const zn = 19.5, On = 19.5, Ys = 14, Zs = 18, Vf = [
|
|
|
4201
4201
|
defaultDot: c,
|
|
4202
4202
|
clickableDots: a
|
|
4203
4203
|
}), y = _(() => typeof e == "object" && e !== null ? e.position : Kf(e, o), [e, o]), { pointerRotation: f, pointerColor: m } = _(() => Gf(y, r), [y, r]), k = (E) => {
|
|
4204
|
-
const
|
|
4205
|
-
return r ?
|
|
4204
|
+
const I = _s[E.color] || _s.neutral, b = E.position === y, S = i === E.position && a;
|
|
4205
|
+
return r ? I.default : b ? I.active : S ? I.hover : I.default;
|
|
4206
4206
|
};
|
|
4207
4207
|
return /* @__PURE__ */ s(
|
|
4208
4208
|
"div",
|
|
@@ -4248,15 +4248,15 @@ const zn = 19.5, On = 19.5, Ys = 14, Zs = 18, Vf = [
|
|
|
4248
4248
|
}
|
|
4249
4249
|
),
|
|
4250
4250
|
o == null ? void 0 : o.map((E) => {
|
|
4251
|
-
const
|
|
4252
|
-
if (!
|
|
4253
|
-
const
|
|
4251
|
+
const I = Oi[E.position];
|
|
4252
|
+
if (!I) return null;
|
|
4253
|
+
const b = k(E), S = a && !r;
|
|
4254
4254
|
return /* @__PURE__ */ g(ve.Fragment, { children: [
|
|
4255
4255
|
S && /* @__PURE__ */ s(
|
|
4256
4256
|
"circle",
|
|
4257
4257
|
{
|
|
4258
|
-
cx:
|
|
4259
|
-
cy:
|
|
4258
|
+
cx: I.x,
|
|
4259
|
+
cy: I.y,
|
|
4260
4260
|
r: 4,
|
|
4261
4261
|
style: {
|
|
4262
4262
|
cursor: "pointer",
|
|
@@ -4272,10 +4272,10 @@ const zn = 19.5, On = 19.5, Ys = 14, Zs = 18, Vf = [
|
|
|
4272
4272
|
/* @__PURE__ */ s(
|
|
4273
4273
|
"circle",
|
|
4274
4274
|
{
|
|
4275
|
-
cx:
|
|
4276
|
-
cy:
|
|
4275
|
+
cx: I.x,
|
|
4276
|
+
cy: I.y,
|
|
4277
4277
|
r: 1,
|
|
4278
|
-
fill:
|
|
4278
|
+
fill: b,
|
|
4279
4279
|
style: {
|
|
4280
4280
|
cursor: S ? "pointer" : "default",
|
|
4281
4281
|
transition: "fill 0.2s ease",
|
|
@@ -4533,7 +4533,7 @@ const nC = ({
|
|
|
4533
4533
|
size: A = "1",
|
|
4534
4534
|
...p
|
|
4535
4535
|
}) => {
|
|
4536
|
-
const y = (o == null ? void 0 : o.id) || a, f = (o == null ? void 0 : o.name) || t, m = (o == null ? void 0 : o.description) || r, k = (o == null ? void 0 : o.image) || e, E = (o == null ? void 0 : o.icon) || l,
|
|
4536
|
+
const y = (o == null ? void 0 : o.id) || a, f = (o == null ? void 0 : o.name) || t, m = (o == null ? void 0 : o.description) || r, k = (o == null ? void 0 : o.image) || e, E = (o == null ? void 0 : o.icon) || l, I = k && (k != null && k.startsWith("url(")) ? k == null ? void 0 : k.substring(4, (k == null ? void 0 : k.length) - 1).replace(/"/g, "") : k, b = (x) => {
|
|
4537
4537
|
x.stopPropagation(), x.preventDefault(), h == null || h();
|
|
4538
4538
|
}, S = {
|
|
4539
4539
|
1: { avatar: 60, icon: 15 },
|
|
@@ -4551,7 +4551,7 @@ const nC = ({
|
|
|
4551
4551
|
),
|
|
4552
4552
|
style: { "--color-surface": "transparent" },
|
|
4553
4553
|
"data-state": u ? "checked" : "unchecked",
|
|
4554
|
-
onClick:
|
|
4554
|
+
onClick: b,
|
|
4555
4555
|
...p,
|
|
4556
4556
|
children: /* @__PURE__ */ g(C, { gap: "2", children: [
|
|
4557
4557
|
/* @__PURE__ */ s(C, { width: `${B.avatar}px`, height: `${B.avatar}px`, children: i ? /* @__PURE__ */ s(
|
|
@@ -4586,7 +4586,7 @@ const nC = ({
|
|
|
4586
4586
|
) : /* @__PURE__ */ s(
|
|
4587
4587
|
je,
|
|
4588
4588
|
{
|
|
4589
|
-
src:
|
|
4589
|
+
src: I,
|
|
4590
4590
|
className: v(
|
|
4591
4591
|
re.listCardsAvatar,
|
|
4592
4592
|
re[`listCardsAvatarSize${A}`]
|
|
@@ -5026,24 +5026,24 @@ const CC = "_content_15nbm_1", yC = "_pan_15nbm_13", kC = "_disabled_15nbm_26",
|
|
|
5026
5026
|
p.current && (document.head.removeChild(p.current), p.current = null), E(), m.current && cancelAnimationFrame(m.current);
|
|
5027
5027
|
};
|
|
5028
5028
|
}, [h, k, E]);
|
|
5029
|
-
const
|
|
5029
|
+
const I = R(
|
|
5030
5030
|
(z) => {
|
|
5031
5031
|
f.current = ea(z), !m.current && (m.current = requestAnimationFrame(() => {
|
|
5032
5032
|
m.current = 0, t(f.current);
|
|
5033
5033
|
}));
|
|
5034
5034
|
},
|
|
5035
5035
|
[t]
|
|
5036
|
-
),
|
|
5036
|
+
), b = R(
|
|
5037
5037
|
(z) => {
|
|
5038
5038
|
z.preventDefault(), z.stopPropagation();
|
|
5039
5039
|
const D = z.wheelDelta ?? -z.deltaY * 25;
|
|
5040
5040
|
if (!D) return;
|
|
5041
5041
|
const Q = e + (D > 0 ? wr : -wr);
|
|
5042
|
-
|
|
5042
|
+
I(Q);
|
|
5043
5043
|
},
|
|
5044
|
-
[e,
|
|
5044
|
+
[e, I]
|
|
5045
5045
|
);
|
|
5046
|
-
Kt("wheel",
|
|
5046
|
+
Kt("wheel", b, i);
|
|
5047
5047
|
const S = R(
|
|
5048
5048
|
(z) => {
|
|
5049
5049
|
var Q;
|
|
@@ -5057,17 +5057,17 @@ const CC = "_content_15nbm_1", yC = "_pan_15nbm_13", kC = "_disabled_15nbm_26",
|
|
|
5057
5057
|
(z) => {
|
|
5058
5058
|
if (!h) return;
|
|
5059
5059
|
const D = y.current - z.clientY, Q = e + D * wr;
|
|
5060
|
-
|
|
5060
|
+
I(Q), y.current = z.clientY;
|
|
5061
5061
|
},
|
|
5062
|
-
[h, e,
|
|
5062
|
+
[h, e, I]
|
|
5063
5063
|
), B = R((z) => {
|
|
5064
5064
|
var D, Q;
|
|
5065
5065
|
(Q = (D = z.currentTarget) == null ? void 0 : D.releasePointerCapture) == null || Q.call(D, z.pointerId), A(!1);
|
|
5066
5066
|
}, []), x = R(
|
|
5067
5067
|
(z) => {
|
|
5068
|
-
z.detail === 2 &&
|
|
5068
|
+
z.detail === 2 && I(0);
|
|
5069
5069
|
},
|
|
5070
|
-
[
|
|
5070
|
+
[I]
|
|
5071
5071
|
), { arcPath: O, pointerRotation: N, arcColor: T, pointerColor: P } = _(() => {
|
|
5072
5072
|
const z = ta(e, a, o), D = ea(z), Q = br + D * Math.PI, j = an + Bt * Math.cos(br), U = on + Bt * Math.sin(br), G = an + Bt * Math.cos(Q), F = on + Bt * Math.sin(Q), se = 0, Te = D > 0 ? 1 : 0;
|
|
5073
5073
|
return {
|
|
@@ -5367,12 +5367,12 @@ const YC = ({
|
|
|
5367
5367
|
onProjectClick: p,
|
|
5368
5368
|
openedItem: y,
|
|
5369
5369
|
setOpenedItem: f
|
|
5370
|
-
} = At(yr), [m, k] = K(!1), E = _(() => m ? o : o.slice(0, 6), [o, m]),
|
|
5370
|
+
} = At(yr), [m, k] = K(!1), E = _(() => m ? o : o.slice(0, 6), [o, m]), I = R(() => {
|
|
5371
5371
|
if (l) return;
|
|
5372
5372
|
k(!1);
|
|
5373
5373
|
const w = h.find((B) => B.id === n);
|
|
5374
5374
|
y === n ? (f(null), p == null || p(w, !1)) : (f(n), p == null || p(w, !0));
|
|
5375
|
-
}, [n, y, f, p, h, l]),
|
|
5375
|
+
}, [n, y, f, p, h, l]), b = R((w) => {
|
|
5376
5376
|
w.preventDefault(), w.stopPropagation(), k(!m);
|
|
5377
5377
|
}, [m]), S = R((w) => {
|
|
5378
5378
|
w.stopPropagation(), A == null || A(o);
|
|
@@ -5384,7 +5384,7 @@ const YC = ({
|
|
|
5384
5384
|
gap: "2",
|
|
5385
5385
|
p: "1",
|
|
5386
5386
|
className: `${Rt.item} ${y === n ? Rt.opened : ""} ${l ? Rt.failed : ""}`,
|
|
5387
|
-
onClick:
|
|
5387
|
+
onClick: I,
|
|
5388
5388
|
...u,
|
|
5389
5389
|
children: [
|
|
5390
5390
|
/* @__PURE__ */ g(C, { direction: "row", gap: "3", children: [
|
|
@@ -5417,7 +5417,7 @@ const YC = ({
|
|
|
5417
5417
|
/* @__PURE__ */ s(J, { size: "2", style: { color: "var(--neutral-alpha-10)" }, children: "Loading tracks..." })
|
|
5418
5418
|
] }),
|
|
5419
5419
|
o.length > 0 && /* @__PURE__ */ g(C, { direction: "column", gap: "1", children: [
|
|
5420
|
-
typeof c == "function" ? c(E) : c,
|
|
5420
|
+
typeof c == "function" ? c({ projectId: n, tracks: E }) : c,
|
|
5421
5421
|
/* @__PURE__ */ g(C, { direction: "row", gap: "3", p: "2", align: "center", justify: "center", children: [
|
|
5422
5422
|
/* @__PURE__ */ g(
|
|
5423
5423
|
Vn,
|
|
@@ -5434,7 +5434,7 @@ const YC = ({
|
|
|
5434
5434
|
),
|
|
5435
5435
|
o.length > 6 && /* @__PURE__ */ g(ge, { children: [
|
|
5436
5436
|
/* @__PURE__ */ s($e, { orientation: "vertical" }),
|
|
5437
|
-
/* @__PURE__ */ g(Vn, { variant: "ghost", color: "gray", style: { flex: "1" }, onClick:
|
|
5437
|
+
/* @__PURE__ */ g(Vn, { variant: "ghost", color: "gray", style: { flex: "1" }, onClick: b, children: [
|
|
5438
5438
|
m ? "Show less" : "Show more",
|
|
5439
5439
|
m ? /* @__PURE__ */ s(Sc, { width: 16, height: 16 }) : /* @__PURE__ */ s(Qa, { width: 16, height: 16 })
|
|
5440
5440
|
] })
|
|
@@ -5609,33 +5609,33 @@ const p1 = ({
|
|
|
5609
5609
|
}, y1 = ({
|
|
5610
5610
|
...n
|
|
5611
5611
|
}) => {
|
|
5612
|
-
var
|
|
5613
|
-
const { onClickTrack: e } = At(yr), {
|
|
5612
|
+
var E;
|
|
5613
|
+
const { onClickTrack: e } = At(yr), { projectId: t, id: r, title: a, cover: o, transfers: i, audioUrl: l, onChangeTransfer: c } = n, u = _(() => i && i.length > 0, [i]), [h, A] = K(u ? parseInt(((E = i == null ? void 0 : i[0]) == null ? void 0 : E.pitchShift) ?? 0) : 0), p = _(() => u ? Math.min(...i == null ? void 0 : i.map((I) => parseInt(I.pitchShift))) : 0, [i]), y = _(() => u ? Math.max(...i == null ? void 0 : i.map((I) => parseInt(I.pitchShift))) : 0, [i]), f = R((I) => {
|
|
5614
5614
|
var b;
|
|
5615
|
-
return
|
|
5616
|
-
}, [
|
|
5617
|
-
|
|
5618
|
-
id:
|
|
5619
|
-
title:
|
|
5620
|
-
audioUrl:
|
|
5615
|
+
return u ? (b = i == null ? void 0 : i.find((S) => parseInt(S.pitchShift) === I)) == null ? void 0 : b.audioUrl : l;
|
|
5616
|
+
}, [u, i, l]), m = R((I) => {
|
|
5617
|
+
A(I), c == null || c(t, {
|
|
5618
|
+
id: r,
|
|
5619
|
+
title: a,
|
|
5620
|
+
audioUrl: f(I)
|
|
5621
5621
|
});
|
|
5622
|
-
}, [
|
|
5623
|
-
|
|
5624
|
-
id:
|
|
5625
|
-
title:
|
|
5626
|
-
audioUrl:
|
|
5622
|
+
}, [c, t, r, a, i]), k = R((I) => {
|
|
5623
|
+
I.stopPropagation(), e == null || e({
|
|
5624
|
+
id: r,
|
|
5625
|
+
title: a,
|
|
5626
|
+
audioUrl: f(h)
|
|
5627
5627
|
});
|
|
5628
|
-
}, [e,
|
|
5628
|
+
}, [e, r, a, f, h]);
|
|
5629
5629
|
return /* @__PURE__ */ s(C, { direction: "column", gap: "1", children: /* @__PURE__ */ g(
|
|
5630
5630
|
C,
|
|
5631
5631
|
{
|
|
5632
5632
|
direction: "row",
|
|
5633
5633
|
gap: "3",
|
|
5634
5634
|
className: cn.itemTrack,
|
|
5635
|
-
onClick:
|
|
5635
|
+
onClick: k,
|
|
5636
5636
|
children: [
|
|
5637
5637
|
/* @__PURE__ */ g("div", { className: cn.cover, children: [
|
|
5638
|
-
/* @__PURE__ */ s(C, { className: cn.coverImage, children:
|
|
5638
|
+
/* @__PURE__ */ s(C, { className: cn.coverImage, children: o ? /* @__PURE__ */ s("img", { src: o, alt: a, width: 48, height: 48 }) : /* @__PURE__ */ s(Tc, { width: 16, height: 16 }) }),
|
|
5639
5639
|
/* @__PURE__ */ s(tr, { width: 16, height: 16, className: cn.iconArrowLeft })
|
|
5640
5640
|
] }),
|
|
5641
5641
|
/* @__PURE__ */ s(
|
|
@@ -5646,16 +5646,16 @@ const p1 = ({
|
|
|
5646
5646
|
align: "start",
|
|
5647
5647
|
justify: "center",
|
|
5648
5648
|
style: { flex: 1, minWidth: 0 },
|
|
5649
|
-
children: /* @__PURE__ */ s(J, { size: "2", asChild: !0, children: /* @__PURE__ */ s("span", { className: cn.trackTitle, children:
|
|
5649
|
+
children: /* @__PURE__ */ s(J, { size: "2", asChild: !0, children: /* @__PURE__ */ s("span", { className: cn.trackTitle, children: a }) })
|
|
5650
5650
|
}
|
|
5651
5651
|
),
|
|
5652
|
-
|
|
5652
|
+
u && i.length > 1 && /* @__PURE__ */ s(
|
|
5653
5653
|
p1,
|
|
5654
5654
|
{
|
|
5655
|
-
min:
|
|
5656
|
-
max:
|
|
5657
|
-
value:
|
|
5658
|
-
onChange:
|
|
5655
|
+
min: p,
|
|
5656
|
+
max: y,
|
|
5657
|
+
value: h,
|
|
5658
|
+
onChange: m
|
|
5659
5659
|
}
|
|
5660
5660
|
)
|
|
5661
5661
|
]
|
|
@@ -5741,14 +5741,14 @@ const B1 = "_starButton_azi6g_1", R1 = "_disabled_azi6g_17", N1 = "_readOnly_azi
|
|
|
5741
5741
|
maxLabel: h,
|
|
5742
5742
|
...A
|
|
5743
5743
|
}) => {
|
|
5744
|
-
const [p, y] = K(t || 0), [f, m] = K(0), k = e !== void 0 ? e : p, E = e !== void 0,
|
|
5744
|
+
const [p, y] = K(t || 0), [f, m] = K(0), k = e !== void 0 ? e : p, E = e !== void 0, I = R(
|
|
5745
5745
|
(B) => {
|
|
5746
5746
|
if (r || a) return;
|
|
5747
5747
|
const x = B + 1, O = x === k ? 0 : x;
|
|
5748
5748
|
E || y(O), o == null || o({ value: O });
|
|
5749
5749
|
},
|
|
5750
5750
|
[r, a, E, o, k]
|
|
5751
|
-
),
|
|
5751
|
+
), b = R(
|
|
5752
5752
|
(B) => {
|
|
5753
5753
|
if (r || a) return;
|
|
5754
5754
|
const x = B.currentTarget.getBoundingClientRect(), O = B.clientX - x.left, N = x.width / n, T = Math.floor(O / N), M = Math.max(0, Math.min(T, n - 1)) + 1;
|
|
@@ -5770,7 +5770,7 @@ const B1 = "_starButton_azi6g_1", R1 = "_disabled_azi6g_17", N1 = "_readOnly_azi
|
|
|
5770
5770
|
[De.disabled]: r,
|
|
5771
5771
|
[De.readOnly]: a
|
|
5772
5772
|
}),
|
|
5773
|
-
onClick: () =>
|
|
5773
|
+
onClick: () => I(B),
|
|
5774
5774
|
disabled: r || a,
|
|
5775
5775
|
"aria-label": `Rate ${B + 1} out of ${n}`,
|
|
5776
5776
|
...A,
|
|
@@ -5800,7 +5800,7 @@ const B1 = "_starButton_azi6g_1", R1 = "_disabled_azi6g_17", N1 = "_readOnly_azi
|
|
|
5800
5800
|
className: De.starsContainer,
|
|
5801
5801
|
role: "radiogroup",
|
|
5802
5802
|
"aria-label": `Rating: ${k} out of ${n} stars`,
|
|
5803
|
-
onMouseMove:
|
|
5803
|
+
onMouseMove: b,
|
|
5804
5804
|
onMouseLeave: S,
|
|
5805
5805
|
children: Array.from({ length: n }, (B, x) => w(x))
|
|
5806
5806
|
}
|
|
@@ -6122,12 +6122,12 @@ const Cy = ({
|
|
|
6122
6122
|
/* @__PURE__ */ g(C, { gap: "2", direction: "column", children: [
|
|
6123
6123
|
/* @__PURE__ */ s(W, { size: "2", weight: "medium", children: n._("Input Level") }),
|
|
6124
6124
|
/* @__PURE__ */ s("div", { className: at.levelMeter, children: /* @__PURE__ */ s("div", { className: at.levelMeterTrack, children: /* @__PURE__ */ s("div", { className: at.levelMeterRow, children: Array.from({ length: 17 }, (m, k) => {
|
|
6125
|
-
const E = Math.max(0, (f - 5) / 25) * 17,
|
|
6126
|
-
let
|
|
6127
|
-
return k >= 15 ?
|
|
6125
|
+
const E = Math.max(0, (f - 5) / 25) * 17, I = k < E;
|
|
6126
|
+
let b = "low";
|
|
6127
|
+
return k >= 15 ? b = "high" : k >= 11 && (b = "mid"), /* @__PURE__ */ s(
|
|
6128
6128
|
"div",
|
|
6129
6129
|
{
|
|
6130
|
-
className: `${at.levelMeterSegment} ${
|
|
6130
|
+
className: `${at.levelMeterSegment} ${I ? `${at.active} ${at[b]}` : ""}`
|
|
6131
6131
|
},
|
|
6132
6132
|
`level-${k}`
|
|
6133
6133
|
);
|
|
@@ -6473,10 +6473,10 @@ const ji = ({
|
|
|
6473
6473
|
m(!0);
|
|
6474
6474
|
}, E = () => {
|
|
6475
6475
|
m(!1);
|
|
6476
|
-
}, b = (S) => {
|
|
6477
|
-
S.stopPropagation();
|
|
6478
6476
|
}, I = (S) => {
|
|
6479
6477
|
S.stopPropagation();
|
|
6478
|
+
}, b = (S) => {
|
|
6479
|
+
S.stopPropagation();
|
|
6480
6480
|
};
|
|
6481
6481
|
return /* @__PURE__ */ g(
|
|
6482
6482
|
C,
|
|
@@ -6563,8 +6563,8 @@ const ji = ({
|
|
|
6563
6563
|
className: v(Z.dropdownTriggerWrapper, {
|
|
6564
6564
|
[Z.dropdownTriggerWrapperMobile]: y
|
|
6565
6565
|
}),
|
|
6566
|
-
onPointerDown:
|
|
6567
|
-
onClick:
|
|
6566
|
+
onPointerDown: I,
|
|
6567
|
+
onClick: b,
|
|
6568
6568
|
children: /* @__PURE__ */ s(gr, { hovered: c })
|
|
6569
6569
|
}
|
|
6570
6570
|
),
|
|
@@ -6586,13 +6586,13 @@ const ji = ({
|
|
|
6586
6586
|
t == null || t(Q), l && i();
|
|
6587
6587
|
}, A = () => {
|
|
6588
6588
|
r == null || r(), l && i();
|
|
6589
|
-
}, [p, y] = K(!1), [f, m] = K(!1), k = ne(null), E = ne(null),
|
|
6589
|
+
}, [p, y] = K(!1), [f, m] = K(!1), k = ne(null), E = ne(null), I = ne(null), b = 260, S = 4, w = a && r ? 1 : 0, B = a && !p, x = B ? n.slice(0, S) : n, O = 2750, N = () => {
|
|
6590
6590
|
a && (k.current && (clearTimeout(k.current), k.current = null), E.current && (clearTimeout(E.current), E.current = null), m(!1));
|
|
6591
6591
|
}, T = () => {
|
|
6592
6592
|
a && p && (k.current && clearTimeout(k.current), k.current = setTimeout(() => {
|
|
6593
6593
|
k.current = null, m(!0), E.current = setTimeout(() => {
|
|
6594
6594
|
E.current = null, y(!1), m(!1);
|
|
6595
|
-
},
|
|
6595
|
+
}, b);
|
|
6596
6596
|
}, O));
|
|
6597
6597
|
}, P = (Q) => {
|
|
6598
6598
|
a && (Q.stopPropagation(), k.current && (clearTimeout(k.current), k.current = null), m(!1), y(!0));
|
|
@@ -6600,7 +6600,7 @@ const ji = ({
|
|
|
6600
6600
|
a && y(!0);
|
|
6601
6601
|
}, z = () => {
|
|
6602
6602
|
if (!a) return;
|
|
6603
|
-
const Q =
|
|
6603
|
+
const Q = I.current;
|
|
6604
6604
|
Q && setTimeout(() => {
|
|
6605
6605
|
Q.contains(document.activeElement) || y(!1);
|
|
6606
6606
|
}, 0);
|
|
@@ -6641,7 +6641,7 @@ const ji = ({
|
|
|
6641
6641
|
children: /* @__PURE__ */ s(
|
|
6642
6642
|
"div",
|
|
6643
6643
|
{
|
|
6644
|
-
ref:
|
|
6644
|
+
ref: I,
|
|
6645
6645
|
className: Z.hoverRegion,
|
|
6646
6646
|
onMouseEnter: N,
|
|
6647
6647
|
onMouseLeave: T,
|
|
@@ -7145,7 +7145,7 @@ const Pn = (n) => {
|
|
|
7145
7145
|
const p = ne(null), y = ne(null), [f, m] = K(!1), k = R((w) => {
|
|
7146
7146
|
const B = w.target, x = B.scrollLeft + B.clientWidth >= B.scrollWidth - 2;
|
|
7147
7147
|
m(x);
|
|
7148
|
-
}, []), E = !!i || !!c,
|
|
7148
|
+
}, []), E = !!i || !!c, I = R(
|
|
7149
7149
|
(w) => {
|
|
7150
7150
|
if (E) return;
|
|
7151
7151
|
const B = w.target.value;
|
|
@@ -7166,7 +7166,7 @@ const Pn = (n) => {
|
|
|
7166
7166
|
}, [n.conditioningText, h]), ue(() => {
|
|
7167
7167
|
m(!1);
|
|
7168
7168
|
}, [u]);
|
|
7169
|
-
const
|
|
7169
|
+
const b = R(
|
|
7170
7170
|
(w) => {
|
|
7171
7171
|
e((B) => ({
|
|
7172
7172
|
...B,
|
|
@@ -7217,7 +7217,7 @@ const Pn = (n) => {
|
|
|
7217
7217
|
{
|
|
7218
7218
|
value: n.conditioningText,
|
|
7219
7219
|
onFocus: a,
|
|
7220
|
-
onChange:
|
|
7220
|
+
onChange: I,
|
|
7221
7221
|
placeholder: t._(
|
|
7222
7222
|
`Describe your desired sound characteristics (ex: ${Xk(
|
|
7223
7223
|
n.instrument,
|
|
@@ -7296,7 +7296,7 @@ const Pn = (n) => {
|
|
|
7296
7296
|
className: He.tagChip,
|
|
7297
7297
|
variant: "ghost",
|
|
7298
7298
|
size: "2",
|
|
7299
|
-
onClick: () =>
|
|
7299
|
+
onClick: () => b(w),
|
|
7300
7300
|
style: {
|
|
7301
7301
|
borderRadius: "9999px",
|
|
7302
7302
|
color: "rgba(241, 247, 254, 0.71)",
|
|
@@ -7788,8 +7788,8 @@ const Fn = {
|
|
|
7788
7788
|
generateFromSelectionTrack: m,
|
|
7789
7789
|
unmutedTracksCount: k,
|
|
7790
7790
|
onMountConcurrency: E,
|
|
7791
|
-
onClear:
|
|
7792
|
-
onInspireMe:
|
|
7791
|
+
onClear: I,
|
|
7792
|
+
onInspireMe: b,
|
|
7793
7793
|
inspireMeLoading: S,
|
|
7794
7794
|
onBoost: w,
|
|
7795
7795
|
boostLoading: B,
|
|
@@ -7943,7 +7943,7 @@ const Fn = {
|
|
|
7943
7943
|
i18n: i,
|
|
7944
7944
|
onAddConditioningAudio: r,
|
|
7945
7945
|
onTextConditioningFocus: a,
|
|
7946
|
-
onInspireMe:
|
|
7946
|
+
onInspireMe: b,
|
|
7947
7947
|
inspireMeLoading: S,
|
|
7948
7948
|
onBoost: w,
|
|
7949
7949
|
boostLoading: B,
|
|
@@ -8023,7 +8023,7 @@ const Fn = {
|
|
|
8023
8023
|
inpaintingTrack: f,
|
|
8024
8024
|
generateFromSelectionTrack: m,
|
|
8025
8025
|
unmutedTracksCount: k,
|
|
8026
|
-
onClear:
|
|
8026
|
+
onClear: I,
|
|
8027
8027
|
i18n: i
|
|
8028
8028
|
}
|
|
8029
8029
|
) }),
|
|
@@ -8049,7 +8049,7 @@ const Fn = {
|
|
|
8049
8049
|
Ue,
|
|
8050
8050
|
{
|
|
8051
8051
|
type: "error",
|
|
8052
|
-
onClick:
|
|
8052
|
+
onClick: I,
|
|
8053
8053
|
ctaLabel: i._("Clear"),
|
|
8054
8054
|
showBackground: !1,
|
|
8055
8055
|
showIcon: !1,
|
|
@@ -8291,7 +8291,7 @@ const aa = {
|
|
|
8291
8291
|
name: n._("Other"),
|
|
8292
8292
|
category: "paid"
|
|
8293
8293
|
}
|
|
8294
|
-
],
|
|
8294
|
+
], I = async (w) => {
|
|
8295
8295
|
if (w.isLocked) {
|
|
8296
8296
|
y(w.value);
|
|
8297
8297
|
return;
|
|
@@ -8309,7 +8309,7 @@ const aa = {
|
|
|
8309
8309
|
}
|
|
8310
8310
|
return O.includes("other") && O.length === 1 ? { ...x, selectedStems: [] } : { ...x, selectedStems: O };
|
|
8311
8311
|
});
|
|
8312
|
-
},
|
|
8312
|
+
}, b = (w) => {
|
|
8313
8313
|
c((B) => ({
|
|
8314
8314
|
...B,
|
|
8315
8315
|
selectedStems: w.value
|
|
@@ -8327,7 +8327,7 @@ const aa = {
|
|
|
8327
8327
|
icon: aa[w.value]
|
|
8328
8328
|
})),
|
|
8329
8329
|
value: l.selectedStems,
|
|
8330
|
-
onSelect:
|
|
8330
|
+
onSelect: b
|
|
8331
8331
|
}
|
|
8332
8332
|
),
|
|
8333
8333
|
/* @__PURE__ */ s(W, { size: "2", weight: "medium", mt: "2", children: n._("Music Stems") })
|
|
@@ -8346,7 +8346,7 @@ const aa = {
|
|
|
8346
8346
|
};
|
|
8347
8347
|
}),
|
|
8348
8348
|
value: l.selectedStems,
|
|
8349
|
-
onSelect:
|
|
8349
|
+
onSelect: I,
|
|
8350
8350
|
style: {
|
|
8351
8351
|
marginBottom: "12px"
|
|
8352
8352
|
}
|
|
@@ -8971,13 +8971,13 @@ const YE = "_track_1xe9y_1", ZE = "_leftIcon_1xe9y_9", _E = "_name_1xe9y_15", $E
|
|
|
8971
8971
|
// Children (having content means group/takelanes)
|
|
8972
8972
|
children: E
|
|
8973
8973
|
}) => {
|
|
8974
|
-
const
|
|
8974
|
+
const I = !!E, b = R(() => k == null ? void 0 : k(!A), [A, k]);
|
|
8975
8975
|
return /* @__PURE__ */ g("div", { className: v(fe.container, { [fe.isOpen]: A }), children: [
|
|
8976
8976
|
/* @__PURE__ */ g(
|
|
8977
8977
|
"div",
|
|
8978
8978
|
{
|
|
8979
8979
|
className: v(fe.track, {
|
|
8980
|
-
[fe.isParentTrack]:
|
|
8980
|
+
[fe.isParentTrack]: I,
|
|
8981
8981
|
[fe.isCompact]: i
|
|
8982
8982
|
}),
|
|
8983
8983
|
style: { height: `${o}px` },
|
|
@@ -8992,7 +8992,7 @@ const YE = "_track_1xe9y_1", ZE = "_leftIcon_1xe9y_9", _E = "_name_1xe9y_15", $E
|
|
|
8992
8992
|
onPointerDown: (S) => S.stopPropagation(),
|
|
8993
8993
|
onMouseDown: (S) => S.stopPropagation(),
|
|
8994
8994
|
onTouchStart: (S) => S.stopPropagation(),
|
|
8995
|
-
children: /* @__PURE__ */ s(m0, { isOpen: A, onToggleOpen:
|
|
8995
|
+
children: /* @__PURE__ */ s(m0, { isOpen: A, onToggleOpen: b })
|
|
8996
8996
|
}
|
|
8997
8997
|
),
|
|
8998
8998
|
/* @__PURE__ */ s(Ts, { content: n, children: /* @__PURE__ */ s(
|
|
@@ -9000,7 +9000,7 @@ const YE = "_track_1xe9y_1", ZE = "_leftIcon_1xe9y_9", _E = "_name_1xe9y_15", $E
|
|
|
9000
9000
|
{
|
|
9001
9001
|
size: "2",
|
|
9002
9002
|
className: fe.name,
|
|
9003
|
-
onClick:
|
|
9003
|
+
onClick: I ? b : void 0,
|
|
9004
9004
|
children: n
|
|
9005
9005
|
}
|
|
9006
9006
|
) })
|
|
@@ -9074,7 +9074,7 @@ const YE = "_track_1xe9y_1", ZE = "_leftIcon_1xe9y_9", _E = "_name_1xe9y_15", $E
|
|
|
9074
9074
|
]
|
|
9075
9075
|
}
|
|
9076
9076
|
),
|
|
9077
|
-
|
|
9077
|
+
I && A && /* @__PURE__ */ s("div", { className: fe.group, children: E })
|
|
9078
9078
|
] });
|
|
9079
9079
|
}
|
|
9080
9080
|
);
|
|
@@ -9100,10 +9100,10 @@ function zS({ schema: n }) {
|
|
|
9100
9100
|
const c = R((m, k) => {
|
|
9101
9101
|
t((E) => ({ ...E, [m]: k })), a((E) => ({ ...E, [m]: null }));
|
|
9102
9102
|
}, []), u = (m, k) => {
|
|
9103
|
-
const E = e[m],
|
|
9104
|
-
return k === "checkbox" || k === "switch" ? { checked: !!E, onCheckedChange:
|
|
9103
|
+
const E = e[m], I = (b) => c(m, b);
|
|
9104
|
+
return k === "checkbox" || k === "switch" ? { checked: !!E, onCheckedChange: I } : { value: E ?? "", onChange: (b) => {
|
|
9105
9105
|
var S;
|
|
9106
|
-
return
|
|
9106
|
+
return I(((S = b == null ? void 0 : b.target) == null ? void 0 : S.value) ?? b);
|
|
9107
9107
|
} };
|
|
9108
9108
|
}, h = () => {
|
|
9109
9109
|
const m = n.safeParse(e);
|
|
@@ -9111,8 +9111,8 @@ function zS({ schema: n }) {
|
|
|
9111
9111
|
return a({}), { isValid: !0, data: m.data };
|
|
9112
9112
|
const k = {};
|
|
9113
9113
|
for (const E of m.error.issues) {
|
|
9114
|
-
const
|
|
9115
|
-
k[
|
|
9114
|
+
const I = E.path.join(".");
|
|
9115
|
+
k[I] || (k[I] = E.message);
|
|
9116
9116
|
}
|
|
9117
9117
|
return a(k), { isValid: !1, data: e };
|
|
9118
9118
|
}, A = R((m) => (i.current.push(m), () => {
|
|
@@ -9545,14 +9545,14 @@ class B0 extends Bn {
|
|
|
9545
9545
|
const A = (p) => {
|
|
9546
9546
|
if (p.button !== o || (c.set(p.pointerId, p), c.size > 1)) return;
|
|
9547
9547
|
let y = p.clientX, f = p.clientY, m = !1;
|
|
9548
|
-
const k = Date.now(), E = t.getBoundingClientRect(), { left:
|
|
9548
|
+
const k = Date.now(), E = t.getBoundingClientRect(), { left: I, top: b } = E, S = (N) => {
|
|
9549
9549
|
if (N.defaultPrevented || c.size > 1 || u && Date.now() - k < i) return;
|
|
9550
9550
|
const T = N.clientX, P = N.clientY, M = T - y, z = P - f;
|
|
9551
|
-
(m || Math.abs(M) > a || Math.abs(z) > a) && (N.preventDefault(), N.stopPropagation(), m || (l.set({ type: "start", x: y -
|
|
9551
|
+
(m || Math.abs(M) > a || Math.abs(z) > a) && (N.preventDefault(), N.stopPropagation(), m || (l.set({ type: "start", x: y - I, y: f - b }), m = !0), l.set({ type: "move", x: T - I, y: P - b, deltaX: M, deltaY: z }), y = T, f = P);
|
|
9552
9552
|
}, w = (N) => {
|
|
9553
9553
|
if (c.delete(N.pointerId), m) {
|
|
9554
9554
|
const T = N.clientX, P = N.clientY;
|
|
9555
|
-
l.set({ type: "end", x: T -
|
|
9555
|
+
l.set({ type: "end", x: T - I, y: P - b });
|
|
9556
9556
|
}
|
|
9557
9557
|
h();
|
|
9558
9558
|
}, B = (N) => {
|
|
@@ -9726,16 +9726,16 @@ class B0 extends Bn {
|
|
|
9726
9726
|
var e;
|
|
9727
9727
|
}
|
|
9728
9728
|
renderBarWaveform(e, t, r, a) {
|
|
9729
|
-
const { width: o, height: i } = r.canvas, { halfHeight: l, barWidth: c, barRadius: u, barIndexScale: h, barSpacing: A, barMinHeight: p } = function({ width: f, height: m, length: k, options: E, pixelRatio:
|
|
9730
|
-
const
|
|
9731
|
-
return { halfHeight:
|
|
9732
|
-
}({ width: o, height: i, length: (e[0] || []).length, options: t, pixelRatio: this.getPixelRatio() }), y = function({ channelData: f, barIndexScale: m, barSpacing: k, barWidth: E, halfHeight:
|
|
9729
|
+
const { width: o, height: i } = r.canvas, { halfHeight: l, barWidth: c, barRadius: u, barIndexScale: h, barSpacing: A, barMinHeight: p } = function({ width: f, height: m, length: k, options: E, pixelRatio: I }) {
|
|
9730
|
+
const b = m / 2, S = E.barWidth ? E.barWidth * I : 1, w = E.barGap ? E.barGap * I : E.barWidth ? S / 2 : 0, B = S + w || 1;
|
|
9731
|
+
return { halfHeight: b, barWidth: S, barGap: w, barRadius: E.barRadius || 0, barMinHeight: E.barMinHeight ? E.barMinHeight * I : 0, barIndexScale: k > 0 ? f / B / k : 0, barSpacing: B };
|
|
9732
|
+
}({ width: o, height: i, length: (e[0] || []).length, options: t, pixelRatio: this.getPixelRatio() }), y = function({ channelData: f, barIndexScale: m, barSpacing: k, barWidth: E, halfHeight: I, vScale: b, canvasHeight: S, barAlign: w, barMinHeight: B }) {
|
|
9733
9733
|
const x = f[0] || [], O = f[1] || x, N = x.length, T = [];
|
|
9734
9734
|
let P = 0, M = 0, z = 0;
|
|
9735
9735
|
for (let D = 0; D <= N; D++) {
|
|
9736
9736
|
const Q = Math.round(D * m);
|
|
9737
9737
|
if (Q > P) {
|
|
9738
|
-
const { topHeight: G, totalHeight: F } = I0({ maxTop: M, maxBottom: z, halfHeight:
|
|
9738
|
+
const { topHeight: G, totalHeight: F } = I0({ maxTop: M, maxBottom: z, halfHeight: I, vScale: b, barMinHeight: B, barAlign: w }), se = b0({ barAlign: w, halfHeight: I, topHeight: G, totalHeight: F, canvasHeight: S });
|
|
9739
9739
|
T.push({ x: P * k, y: se, width: E, height: F }), P = Q, M = 0, z = 0;
|
|
9740
9740
|
}
|
|
9741
9741
|
const j = Math.abs(x[D] || 0), U = Math.abs(O[D] || 0);
|
|
@@ -9751,18 +9751,18 @@ class B0 extends Bn {
|
|
|
9751
9751
|
const { width: o, height: i } = r.canvas, l = function({ channelData: c, width: u, height: h, vScale: A }) {
|
|
9752
9752
|
const p = h / 2, y = c[0] || [];
|
|
9753
9753
|
return [y, c[1] || y].map((f, m) => {
|
|
9754
|
-
const k = f.length, E = k ? u / k : 0,
|
|
9754
|
+
const k = f.length, E = k ? u / k : 0, I = p, b = m === 0 ? -1 : 1, S = [{ x: 0, y: I }];
|
|
9755
9755
|
let w = 0, B = 0;
|
|
9756
9756
|
for (let x = 0; x <= k; x++) {
|
|
9757
9757
|
const O = Math.round(x * E);
|
|
9758
9758
|
if (O > w) {
|
|
9759
|
-
const T =
|
|
9759
|
+
const T = I + (Math.round(B * p * A) || 1) * b;
|
|
9760
9760
|
S.push({ x: w, y: T }), w = O, B = 0;
|
|
9761
9761
|
}
|
|
9762
9762
|
const N = Math.abs(f[x] || 0);
|
|
9763
9763
|
N > B && (B = N);
|
|
9764
9764
|
}
|
|
9765
|
-
return S.push({ x: w, y:
|
|
9765
|
+
return S.push({ x: w, y: I }), S;
|
|
9766
9766
|
});
|
|
9767
9767
|
}({ channelData: e, width: o, height: i, vScale: a });
|
|
9768
9768
|
r.beginPath();
|
|
@@ -9813,9 +9813,9 @@ class B0 extends Bn {
|
|
|
9813
9813
|
const m = f * h;
|
|
9814
9814
|
let k = Math.min(u - m, h);
|
|
9815
9815
|
if (k = la(k, t), k <= 0) return;
|
|
9816
|
-
const E = function({ channelData:
|
|
9817
|
-
return
|
|
9818
|
-
const x = Math.floor(
|
|
9816
|
+
const E = function({ channelData: I, offset: b, clampedWidth: S, totalWidth: w }) {
|
|
9817
|
+
return I.map((B) => {
|
|
9818
|
+
const x = Math.floor(b / w * B.length), O = Math.floor((b + S) / w * B.length);
|
|
9819
9819
|
return B.slice(x, O);
|
|
9820
9820
|
});
|
|
9821
9821
|
}({ channelData: e, offset: m, clampedWidth: k, totalWidth: u });
|
|
@@ -10067,8 +10067,8 @@ class kn extends S0 {
|
|
|
10067
10067
|
super({ media: t, mediaControls: e.mediaControls, autoplay: e.autoplay, playbackRate: e.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this.reactiveCleanups = [], this.options = Object.assign({}, N0, e);
|
|
10068
10068
|
const { state: r, actions: a } = function(l) {
|
|
10069
10069
|
var c, u, h, A, p, y;
|
|
10070
|
-
const f = (c = l == null ? void 0 : l.currentTime) !== null && c !== void 0 ? c : he(0), m = (u = l == null ? void 0 : l.duration) !== null && u !== void 0 ? u : he(0), k = (h = l == null ? void 0 : l.isPlaying) !== null && h !== void 0 ? h : he(!1), E = (A = l == null ? void 0 : l.isSeeking) !== null && A !== void 0 ? A : he(!1),
|
|
10071
|
-
return { state: { currentTime: f, duration: m, isPlaying: k, isPaused: N, isSeeking: E, volume:
|
|
10070
|
+
const f = (c = l == null ? void 0 : l.currentTime) !== null && c !== void 0 ? c : he(0), m = (u = l == null ? void 0 : l.duration) !== null && u !== void 0 ? u : he(0), k = (h = l == null ? void 0 : l.isPlaying) !== null && h !== void 0 ? h : he(!1), E = (A = l == null ? void 0 : l.isSeeking) !== null && A !== void 0 ? A : he(!1), I = (p = l == null ? void 0 : l.volume) !== null && p !== void 0 ? p : he(1), b = (y = l == null ? void 0 : l.playbackRate) !== null && y !== void 0 ? y : he(1), S = he(null), w = he(null), B = he(""), x = he(0), O = he(0), N = xt(() => !k.value, [k]), T = xt(() => S.value !== null, [S]), P = xt(() => T.value && m.value > 0, [T, m]), M = xt(() => f.value, [f]), z = xt(() => m.value > 0 ? f.value / m.value : 0, [f, m]);
|
|
10071
|
+
return { state: { currentTime: f, duration: m, isPlaying: k, isPaused: N, isSeeking: E, volume: I, playbackRate: b, audioBuffer: S, peaks: w, url: B, zoom: x, scrollPosition: O, canPlay: T, isReady: P, progress: M, progressPercent: z }, actions: { setCurrentTime: (D) => {
|
|
10072
10072
|
const Q = Math.max(0, Math.min(m.value || 1 / 0, D));
|
|
10073
10073
|
f.set(Q);
|
|
10074
10074
|
}, setDuration: (D) => {
|
|
@@ -10079,10 +10079,10 @@ class kn extends S0 {
|
|
|
10079
10079
|
E.set(D);
|
|
10080
10080
|
}, setVolume: (D) => {
|
|
10081
10081
|
const Q = Math.max(0, Math.min(1, D));
|
|
10082
|
-
|
|
10082
|
+
I.set(Q);
|
|
10083
10083
|
}, setPlaybackRate: (D) => {
|
|
10084
10084
|
const Q = Math.max(0.1, Math.min(16, D));
|
|
10085
|
-
|
|
10085
|
+
b.set(Q);
|
|
10086
10086
|
}, setAudioBuffer: (D) => {
|
|
10087
10087
|
S.set(D), D && m.set(D.duration);
|
|
10088
10088
|
}, setPeaks: (D) => {
|
|
@@ -10460,14 +10460,14 @@ function el({
|
|
|
10460
10460
|
classNamesButton: y,
|
|
10461
10461
|
onPlayStateChange: f
|
|
10462
10462
|
}) {
|
|
10463
|
-
const [m, k] = K(!1), [E,
|
|
10463
|
+
const [m, k] = K(!1), [E, I] = K(!1), [b, S] = K(!1), [w, B] = K(!1);
|
|
10464
10464
|
ue(() => {
|
|
10465
10465
|
typeof navigator < "u" && B(/^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
10466
10466
|
}, []);
|
|
10467
10467
|
const x = _(() => r, [r]), O = _(() => a ? !1 : !x || x && m, [x, m, a]), N = ne(null), T = ne(null);
|
|
10468
10468
|
ue(() => {
|
|
10469
|
-
|
|
10470
|
-
}, [h, o,
|
|
10469
|
+
b || (!h || o) && S(!0);
|
|
10470
|
+
}, [h, o, b]);
|
|
10471
10471
|
const P = R(() => {
|
|
10472
10472
|
var F;
|
|
10473
10473
|
T.current && ((F = T.current) == null || F.pause());
|
|
@@ -10480,7 +10480,7 @@ function el({
|
|
|
10480
10480
|
T.current && n && ((F = T.current) == null || F.load(n));
|
|
10481
10481
|
}, [n]);
|
|
10482
10482
|
const z = R((F) => {
|
|
10483
|
-
T.current = F,
|
|
10483
|
+
T.current = F, I(!0), k(!1);
|
|
10484
10484
|
}, []), D = R(
|
|
10485
10485
|
(F) => {
|
|
10486
10486
|
if (k(!0), t == null || t(!0), f == null || f(!0), c) {
|
|
@@ -10943,7 +10943,7 @@ const tS = "_footerVoiceForm_lsc2c_2", nS = {
|
|
|
10943
10943
|
onClickUpgradeConcurrency: f,
|
|
10944
10944
|
onRemoveTrack: m
|
|
10945
10945
|
}) => {
|
|
10946
|
-
const [k, E] = K(null), [
|
|
10946
|
+
const [k, E] = K(null), [I, b] = K(null), { submitted: S, handleSubmit: w } = Ds(h), [B, x] = K({
|
|
10947
10947
|
lastPlayed: null,
|
|
10948
10948
|
active: null,
|
|
10949
10949
|
isPlaying: !1,
|
|
@@ -10960,12 +10960,12 @@ const tS = "_footerVoiceForm_lsc2c_2", nS = {
|
|
|
10960
10960
|
[n, t]
|
|
10961
10961
|
), N = R(
|
|
10962
10962
|
(Q) => {
|
|
10963
|
-
|
|
10963
|
+
I !== Q && b(Q);
|
|
10964
10964
|
},
|
|
10965
|
-
[
|
|
10965
|
+
[I, b]
|
|
10966
10966
|
), T = R(
|
|
10967
10967
|
(Q) => {
|
|
10968
|
-
|
|
10968
|
+
b(null), B.active && B.active.pause(), x((j) => ({
|
|
10969
10969
|
...j,
|
|
10970
10970
|
isPlaying: !1,
|
|
10971
10971
|
active: null
|
|
@@ -10997,12 +10997,12 @@ const tS = "_footerVoiceForm_lsc2c_2", nS = {
|
|
|
10997
10997
|
return ue(() => {
|
|
10998
10998
|
var Q;
|
|
10999
10999
|
if (B.isPlaying === !1)
|
|
11000
|
-
|
|
11000
|
+
b(null);
|
|
11001
11001
|
else if (B.isPlaying === !0 && B.active) {
|
|
11002
11002
|
const j = (Q = n.find(
|
|
11003
11003
|
(U) => B.active && U.metadata.previewUrl === B.active.url
|
|
11004
11004
|
)) == null ? void 0 : Q.identifier;
|
|
11005
|
-
j &&
|
|
11005
|
+
j && b(j);
|
|
11006
11006
|
}
|
|
11007
11007
|
}, [B, n]), /* @__PURE__ */ g(C, { direction: "column", height: "100%", children: [
|
|
11008
11008
|
/* @__PURE__ */ s(
|
|
@@ -11011,11 +11011,11 @@ const tS = "_footerVoiceForm_lsc2c_2", nS = {
|
|
|
11011
11011
|
voices: n,
|
|
11012
11012
|
selectedId: k,
|
|
11013
11013
|
handleSelect: O,
|
|
11014
|
-
playingItem:
|
|
11014
|
+
playingItem: I,
|
|
11015
11015
|
handleAvatarClick: N,
|
|
11016
11016
|
handleDetailsClick: T,
|
|
11017
11017
|
wavegroup: P,
|
|
11018
|
-
setPlayingItem:
|
|
11018
|
+
setPlayingItem: b,
|
|
11019
11019
|
style: { display: o ? "none" : "block" },
|
|
11020
11020
|
i18n: i
|
|
11021
11021
|
}
|