@kolkrabbi/design-editor 0.45.0 → 0.46.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.
@@ -1,34 +1,34 @@
1
- import { B as e, D as t, Dn as n, F as r, Gn as i, I as a, J as o, Kn as s, L as c, Lt as l, Mn as u, On as d, P as f, Un as p, Wn as m, a as h, bn as g, d as _, dn as v, er as y, f as b, ft as x, gt as S, hn as C, ht as w, i as T, j as E, jn as D, ln as O, mn as k, n as A, nn as j, o as M, p as ee, r as N, tr as te, un as P, vn as F, xn as I } from "./rolls-CSOfYXm5.js";
2
- import { n as L, r as R, t as ne } from "./useLayerEdit-BCGfD3Cv.js";
3
- import { C as z, D as B, E as V, _ as H, a as re, c as U, d as ie, f as W, g as ae, i as G, l as oe, m as se, n as ce, r as le, t as ue, u as de, v as fe, w as pe, x as K, y as me } from "./effectCategories-CsCbOfy3.js";
4
- import { r as he } from "./TreePicker-YcrYNUx5.js";
5
- import { _ as ge, a as _e, b as ve, f as ye, g as be, h as xe, i as Se, m as Ce, n as we, o as Te, p as Ee, r as De, s as Oe, v as ke, y as Ae } from "./generators-BrdP7Omn.js";
6
- import { A as je, C as Me, D as Ne, E as Pe, M as Fe, O as Ie, S as Le, T as Re, _ as ze, b as Be, c as Ve, h as He, j as Ue, k as We, l as Ge, m as Ke, u as qe, v as Je, w as Ye, y as Xe } from "./store-BtEnp5i6.js";
7
- import { a as Ze, c as Qe, d as $e, f as et, i as tt, l as nt, n as rt, o as it, p as at, r as ot, s as q, t as st, u as ct } from "./morphStore-Ba--Lk9u.js";
8
- import { n as lt, r as ut, t as dt } from "./BindDot-DqLgF_zQ.js";
9
- import { n as ft, r as pt } from "./effects-BZ8lWlZa.js";
10
- import { a as mt, i as ht, n as gt, o as _t, r as vt } from "./motion-DL5Y98d6.js";
11
- import { n as yt, r as bt, t as xt } from "./Timeline-Boo1VuFe.js";
12
- import { $ as St, A as Ct, B as wt, C as Tt, D as Et, E as Dt, F as Ot, G as kt, H as At, I as jt, J as Mt, K as Nt, L as Pt, M as Ft, N as It, O as Lt, P as Rt, Q as zt, R as Bt, S as Vt, T as Ht, U as Ut, V as Wt, W as Gt, X as Kt, Y as qt, Z as Jt, _ as Yt, a as Xt, at as Zt, b as Qt, c as $t, ct as en, d as tn, dt as nn, et as rn, f as an, ft as on, g as sn, h as cn, i as ln, it as un, j as dn, k as fn, l as pn, lt as mn, m as hn, mt as gn, n as _n, nt as vn, o as yn, ot as bn, p as xn, pt as Sn, q as Cn, r as wn, rt as Tn, s as En, st as Dn, t as On, tt as kn, u as An, ut as jn, v as Mn, w as Nn, x as Pn, y as Fn, z as In } from "./core-DUm8hgL9.js";
13
- import { Button as J, ButtonGroup as Ln, Divider as Rn, MultiSelect as zn, NavRail as Bn, StepList as Vn, Tag as Hn, Tooltip as Un, useGrabEdge as Wn, useMediaQuery as Gn, useModal as Kn } from "@kolkrabbi/kol-component";
14
- import { createContext as qn, useContext as Jn, useEffect as Y, useRef as X, useState as Z, useSyncExternalStore as Yn } from "react";
15
- import { Fragment as Xn, jsx as Q, jsxs as $ } from "react/jsx-runtime";
16
- import { IconLoader as Zn } from "@kolkrabbi/kol-icons";
17
- import { PropertyRail as Qn, RailDisplayControls as $n, RailTrigger as er } from "@kolkrabbi/kol-shell";
18
- import { useDragResize as tr, useTheme as nr } from "@kolkrabbi/kol-framework";
19
- import { createPortal as rr } from "react-dom";
1
+ import { B as e, D as t, Dn as n, F as r, Gn as i, I as a, J as o, Kn as s, L as c, Lt as l, Mn as u, On as d, P as f, Un as p, Wn as m, a as h, bn as g, d as _, dn as v, er as y, f as b, ft as x, gt as S, hn as C, ht as w, i as T, j as E, jn as D, ln as O, mn as k, n as A, nn as j, o as M, p as ee, r as N, tr as te, un as P, vn as F, xn as I } from "./rolls-KpWCAeDv.js";
2
+ import { n as L, r as R, t as ne } from "./useLayerEdit-Ba7RA6qX.js";
3
+ import { C as z, D as B, E as V, _ as H, a as re, c as U, d as ie, f as W, g as ae, i as G, l as oe, m as se, n as ce, r as le, t as ue, u as de, v as fe, w as pe, x as K, y as me } from "./effectCategories-Ccye-8LP.js";
4
+ import { r as he } from "./TreePicker-Dv0zpJwe.js";
5
+ import { _ as ge, a as _e, b as ve, f as ye, g as be, h as xe, i as Se, m as Ce, n as we, o as Te, p as Ee, r as De, s as Oe, v as ke, y as Ae } from "./generators-BdVXv0jY.js";
6
+ import { A as je, C as Me, D as Ne, E as Pe, M as Fe, O as Ie, S as Le, T as Re, _ as ze, b as Be, c as Ve, h as He, j as Ue, k as We, l as Ge, m as Ke, u as qe, v as Je, w as Ye, y as Xe } from "./store-iBb0I6hk.js";
7
+ import { a as Ze, c as Qe, d as $e, f as et, i as tt, l as nt, n as rt, o as it, p as at, r as ot, s as q, t as st, u as ct } from "./morphStore-D6mkLJ-8.js";
8
+ import { n as lt, r as ut, t as dt } from "./BindDot-B0VcuOag.js";
9
+ import { n as ft, r as pt } from "./effects-B47bpwGh.js";
10
+ import { a as mt, i as ht, n as gt, o as _t, r as vt } from "./motion-wsc6Qd7S.js";
11
+ import { n as yt, r as bt, t as xt } from "./Timeline-Ck1rBV8S.js";
12
+ import { $ as St, A as Ct, B as wt, C as Tt, D as Et, E as Dt, F as Ot, G as kt, H as At, I as jt, J as Mt, K as Nt, L as Pt, M as Ft, N as It, O as Lt, P as Rt, Q as zt, R as Bt, S as Vt, T as Ht, U as Ut, V as Wt, W as Gt, X as Kt, Y as qt, Z as Jt, _ as Yt, a as Xt, at as Zt, b as Qt, c as $t, ct as en, d as tn, dt as nn, et as rn, f as an, ft as on, g as sn, h as cn, i as ln, it as un, j as dn, k as fn, l as pn, lt as mn, m as hn, mt as gn, n as _n, nt as vn, o as yn, ot as bn, p as xn, pt as Sn, q as Cn, r as wn, rt as Tn, s as En, st as Dn, t as On, tt as kn, u as An, ut as jn, v as Mn, w as Nn, x as Pn, y as Fn, z as In } from "./core-BBb9Tk4Q.js";
13
+ import { Button as J, ButtonGroup as Ln, Divider as Rn, LabeledControlSection as zn, MultiSelect as Bn, NavRail as Vn, StepList as Hn, Tag as Un, Tooltip as Wn, useGrabEdge as Gn, useMediaQuery as Kn, useModal as qn } from "@kolkrabbi/kol-component";
14
+ import { createContext as Jn, useContext as Yn, useEffect as Y, useRef as X, useState as Z, useSyncExternalStore as Xn } from "react";
15
+ import { Fragment as Zn, jsx as Q, jsxs as $ } from "react/jsx-runtime";
16
+ import { IconLoader as Qn } from "@kolkrabbi/kol-icons";
17
+ import { PropertyRail as $n, RailDisplayControls as er, RailTrigger as tr } from "@kolkrabbi/kol-shell";
18
+ import { useDragResize as nr, useTheme as rr } from "@kolkrabbi/kol-framework";
19
+ import { createPortal as ir } from "react-dom";
20
20
  //#region src/phoneFloats.js
21
- var ir = (e) => {
21
+ var ar = (e) => {
22
22
  let t = e, n = /* @__PURE__ */ new Set(), r = (e) => (n.add(e), () => n.delete(e));
23
23
  return {
24
24
  set: (e) => {
25
25
  e !== t && (t = e, n.forEach((e) => e()));
26
26
  },
27
- use: () => Yn(r, () => t, () => t)
27
+ use: () => Xn(r, () => t, () => t)
28
28
  };
29
- }, ar = ir(null), or = ir(null), sr = ar.set;
30
- ar.use, or.set;
31
- var cr = or.use, lr = [
29
+ }, or = ar(null), sr = ar(null), cr = or.set;
30
+ or.use, sr.set;
31
+ var lr = sr.use, ur = [
32
32
  {
33
33
  id: "shape",
34
34
  label: "Shape",
@@ -44,7 +44,7 @@ var cr = or.use, lr = [
44
44
  label: "Crossfade",
45
45
  icon: "dashed-circle"
46
46
  }
47
- ], ur = {
47
+ ], dr = {
48
48
  shape: [
49
49
  ["Loops", ["morph-circle", "star-morph"]],
50
50
  ["Loops", [
@@ -118,21 +118,21 @@ var cr = or.use, lr = [
118
118
  2
119
119
  ]
120
120
  ]
121
- }, dr = null;
122
- function fr(e) {
123
- if (!dr) {
124
- dr = /* @__PURE__ */ new Map();
121
+ }, fr = null;
122
+ function pr(e) {
123
+ if (!fr) {
124
+ fr = /* @__PURE__ */ new Map();
125
125
  let e = /* @__PURE__ */ new Set();
126
- for (let t of se) for (let n of V(t.id)) e.has(n.id) || me(n) || (e.add(n.id), dr.has(n.loop) || dr.set(n.loop, []), dr.get(n.loop).push(n));
126
+ for (let t of se) for (let n of V(t.id)) e.has(n.id) || me(n) || (e.add(n.id), fr.has(n.loop) || fr.set(n.loop, []), fr.get(n.loop).push(n));
127
127
  }
128
- return dr.get(e) ?? [];
128
+ return fr.get(e) ?? [];
129
129
  }
130
- var pr = (e, t) => e.length < t ? null : Array.from({ length: t }, (n, r) => e[Math.round(r * (e.length - 1) / (t - 1))]), mr = null;
131
- function hr() {
132
- if (mr) return mr;
130
+ var mr = (e, t) => e.length < t ? null : Array.from({ length: t }, (n, r) => e[Math.round(r * (e.length - 1) / (t - 1))]), hr = null;
131
+ function gr() {
132
+ if (hr) return hr;
133
133
  let e = [];
134
- for (let t of lr) for (let n of ur[t.id]) {
135
- let [r] = n, i = t.id === "blend" ? pr(fr(n[1]), n[2]) : n[1].map((e) => fr(e)[0]);
134
+ for (let t of ur) for (let n of dr[t.id]) {
135
+ let [r] = n, i = t.id === "blend" ? mr(pr(n[1]), n[2]) : n[1].map((e) => pr(e)[0]);
136
136
  if (!i || i.some((e) => !e) || new Set(i.map((e) => e.id)).size < i.length) continue;
137
137
  let a = i.map((e) => e.label).join(" → "), o = `ship:morph:${t.id}:${i.map((e) => e.id).join("--")}`;
138
138
  e.push({
@@ -155,13 +155,13 @@ function hr() {
155
155
  }
156
156
  });
157
157
  }
158
- return mr = e;
158
+ return hr = e;
159
159
  }
160
- var gr = () => lr.map((e) => ({
160
+ var _r = () => ur.map((e) => ({
161
161
  label: e.label,
162
- subs: [...new Set(hr().filter((t) => t.type === e.id).map((e) => e.sub))]
163
- })), _r = (e, t) => hr().find((n) => n.type === e && (!t || n.category === t)), vr = (e) => hr().find((t) => t.id === e);
164
- function yr(e) {
162
+ subs: [...new Set(gr().filter((t) => t.type === e.id).map((e) => e.sub))]
163
+ })), vr = (e, t) => gr().find((n) => n.type === e && (!t || n.category === t)), yr = (e) => gr().find((t) => t.id === e);
164
+ function br(e) {
165
165
  e && (it({
166
166
  active: !0,
167
167
  ...e.morph,
@@ -172,7 +172,7 @@ function yr(e) {
172
172
  }
173
173
  //#endregion
174
174
  //#region src/editor/labs/catalog.js
175
- var br = {
175
+ var xr = {
176
176
  "fx:halftone": "ptrn-dot",
177
177
  "fx:scanline": "grid-horizontal",
178
178
  "fx:crt": "desktop",
@@ -196,19 +196,19 @@ var br = {
196
196
  "misc:Para Type": "aa",
197
197
  "vec:Distressor": "scribble",
198
198
  "vec:Modulator": "dashed-circle"
199
- }, xr = {
199
+ }, Sr = {
200
200
  effects: "filter",
201
201
  generative: "layers",
202
202
  vector: "pen-nib",
203
203
  composition: "type",
204
204
  morph: "swap",
205
205
  mode: "mode-toggle-01"
206
- }, Sr = [
206
+ }, Cr = [
207
207
  "Moiré",
208
208
  "Mesh Gradient",
209
209
  "Reaction",
210
210
  "Halftone"
211
- ], Cr = [
211
+ ], wr = [
212
212
  {
213
213
  label: "Spaced",
214
214
  patch: {
@@ -240,11 +240,11 @@ var br = {
240
240
  label: "Spiral",
241
241
  patch: { geometry: "spiral" }
242
242
  }
243
- ], wr = (e = {}) => {
243
+ ], Tr = (e = {}) => {
244
244
  let t = e.geometry ?? "rows";
245
245
  return t === "radial" ? "Vortex" : t === "rings" ? "Rings" : t === "spiral" ? "Spiral" : e.mark === "glyph" ? "Glyph" : e.mark === "lattice" ? "Lattice" : "Spaced";
246
246
  };
247
- function Tr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource: i }) {
247
+ function Er({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource: i }) {
248
248
  let a = () => e?.type === "photo" ? (e.filters ?? []).filter((e) => e?.id === "fx-media") : [], o = (e, o) => {
249
249
  let s = a(), c = t("photo", {
250
250
  ...i(),
@@ -301,19 +301,19 @@ function Tr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
301
301
  ...le(W).map((t) => ({
302
302
  id: `fx:${t.id}`,
303
303
  label: t.label,
304
- icon: br[`fx:${t.id}`] ?? "square",
304
+ icon: xr[`fx:${t.id}`] ?? "square",
305
305
  pages: t.rack ? ue.map((t) => ({
306
306
  label: t.label,
307
307
  onSelect: () => s(t.id),
308
308
  active: e?.fxGroup === t.id
309
- })) : t.id === "pattern" ? Sr.map((t) => ({
309
+ })) : t.id === "pattern" ? Cr.map((t) => ({
310
310
  label: t,
311
311
  onSelect: () => c(B("optic", t)[0], "optic"),
312
312
  active: e?.loopGroup === "optic" && f?.sub === t
313
- })) : t.id === "scanline" ? Cr.map((t) => ({
313
+ })) : t.id === "scanline" ? wr.map((t) => ({
314
314
  label: t.label,
315
315
  onSelect: () => o("scanline", t.patch),
316
- active: !e?.fxGroup && d === "scanline" && wr((e?.filters ?? []).find((e) => e?.id === "scanline")?.params) === t.label
316
+ active: !e?.fxGroup && d === "scanline" && Tr((e?.filters ?? []).find((e) => e?.id === "scanline")?.params) === t.label
317
317
  })) : t.filters.map((t) => ({
318
318
  label: t.label ?? t.id,
319
319
  onSelect: () => o(t.id),
@@ -327,22 +327,22 @@ function Tr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
327
327
  ...Ae.map((e) => ({
328
328
  id: `gen:${e.label}`,
329
329
  label: e.label,
330
- icon: br[`gen:${e.label}`] ?? "square",
330
+ icon: xr[`gen:${e.label}`] ?? "square",
331
331
  pages: m(e)
332
332
  })),
333
333
  {
334
334
  id: "sec:morph",
335
335
  label: "Morph"
336
336
  },
337
- ...lr.map((e) => ({
337
+ ...ur.map((e) => ({
338
338
  id: `morph:${e.id}`,
339
339
  label: e.label,
340
340
  icon: e.icon,
341
- pages: [...new Set(hr().filter((t) => t.type === e.id).map((e) => e.category))].map((t) => ({
341
+ pages: [...new Set(gr().filter((t) => t.type === e.id).map((e) => e.category))].map((t) => ({
342
342
  label: t,
343
- onSelect: () => yr(_r(e.id, t)),
343
+ onSelect: () => br(vr(e.id, t)),
344
344
  active: (() => {
345
- let n = hr().find((e) => e.id === rt().presetId);
345
+ let n = gr().find((e) => e.id === rt().presetId);
346
346
  return n?.type === e.id && n.category === t;
347
347
  })()
348
348
  }))
@@ -354,13 +354,13 @@ function Tr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
354
354
  {
355
355
  id: "vec:Distressor",
356
356
  label: "Distressor",
357
- icon: br["vec:Distressor"] ?? "square",
357
+ icon: xr["vec:Distressor"] ?? "square",
358
358
  pages: p("distress")
359
359
  },
360
360
  {
361
361
  id: "vec:Modulator",
362
362
  label: "Modulator",
363
- icon: br["vec:Modulator"] ?? "square",
363
+ icon: xr["vec:Modulator"] ?? "square",
364
364
  pages: p("modulator")
365
365
  },
366
366
  {
@@ -370,7 +370,7 @@ function Tr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
370
370
  ...mt.map((t) => ({
371
371
  id: `kin:${t.label}`,
372
372
  label: t.label,
373
- icon: br[`kin:${t.label}`] ?? "square",
373
+ icon: xr[`kin:${t.label}`] ?? "square",
374
374
  pages: t.subs.map((t) => ({
375
375
  label: t,
376
376
  onSelect: () => l(ht.find((e) => e.sub === t)),
@@ -380,14 +380,14 @@ function Tr({ layer: e, setOnly: t, addFilter: n, patchFilter: r, carriedSource:
380
380
  ...ve.map((e) => ({
381
381
  id: `misc:${e.label}`,
382
382
  label: e.label,
383
- icon: br[`misc:${e.label}`] ?? "square",
383
+ icon: xr[`misc:${e.label}`] ?? "square",
384
384
  pages: e.groups.flatMap((e) => p(e, "misc"))
385
385
  }))
386
386
  ];
387
387
  }
388
388
  //#endregion
389
389
  //#region src/editor/labs/LabsNav.jsx
390
- function Er() {
390
+ function Dr() {
391
391
  let { addFilter: e, patchFilter: t } = o(), { layer: n, setOnly: r } = _e(), i = X(null);
392
392
  Y(() => {
393
393
  n?.type === "photo" && n.src && (i.current = {
@@ -401,7 +401,7 @@ function Er() {
401
401
  n?.srcType,
402
402
  n?.fit
403
403
  ]);
404
- let a = Tr({
404
+ let a = Er({
405
405
  layer: n,
406
406
  setOnly: r,
407
407
  addFilter: e,
@@ -418,7 +418,7 @@ function Er() {
418
418
  if (n.id.startsWith("sec:")) {
419
419
  let e = n.id.slice(4);
420
420
  t.push({
421
- icon: xr[e] ?? "square",
421
+ icon: Sr[e] ?? "square",
422
422
  path: `${$t}${n.id}`,
423
423
  label: n.label,
424
424
  sub: []
@@ -444,7 +444,7 @@ function Er() {
444
444
  }
445
445
  //#endregion
446
446
  //#region src/editor/morph/MorphTab.jsx
447
- var Dr = (e, t) => JSON.stringify(e) === JSON.stringify(t), Or = [
447
+ var Or = (e, t) => JSON.stringify(e) === JSON.stringify(t), kr = [
448
448
  {
449
449
  key: "curve",
450
450
  label: "Curve",
@@ -477,8 +477,8 @@ var Dr = (e, t) => JSON.stringify(e) === JSON.stringify(t), Or = [
477
477
  when: (e) => e.mode === "shape"
478
478
  }
479
479
  ];
480
- function kr({ layer: e, readOnly: t = !1, editTabs: r = null }) {
481
- let i = c(), s = ct(), { steps: l, curve: u, cycle: d, mode: f, resolution: p, editing: m, fileId: h, editRequest: g } = s, { updateLayer: _, removeLayer: v, setCurrentPresetId: y, setCurrentPresetName: b, palette: x } = o(), { setOnly: S } = _e(), { buildSavedSpec: C } = Gt(), { addItem: w, updateItem: T } = Je(), E = Kn(), A = D(), j = ne(e?.id ?? null, { history: "coalesce" }), [M, ee] = Z("generate"), N = l[0], te = l.every((e) => e.loopId === N?.loopId), F = l.filter((e) => !Nt(K(e.loopId)) || !kt(K(e.loopId))), I = F.length === 0, R = {
480
+ function Ar({ layer: e, readOnly: t = !1, editTabs: r = null }) {
481
+ let i = c(), s = ct(), { steps: l, curve: u, cycle: d, mode: f, resolution: p, editing: m, fileId: h, editRequest: g } = s, { updateLayer: _, removeLayer: v, setCurrentPresetId: y, setCurrentPresetName: b, palette: x } = o(), { setOnly: S } = _e(), { buildSavedSpec: C } = Gt(), { addItem: w, updateItem: T } = Je(), E = qn(), A = D(), j = ne(e?.id ?? null, { history: "coalesce" }), [M, ee] = Z("generate"), N = l[0], te = l.every((e) => e.loopId === N?.loopId), F = l.filter((e) => !Nt(K(e.loopId)) || !kt(K(e.loopId))), I = F.length === 0, R = {
482
482
  blend: te ? null : "Blend tweens one generator — these steps are different generators",
483
483
  shape: I ? null : `No outline to morph: ${F.map((e) => Qe(e, l.indexOf(e))).join(", ")} (GL)`,
484
484
  crossfade: I ? null : `Cannot fade: ${F.map((e) => Qe(e, l.indexOf(e))).join(", ")} (GL)`
@@ -599,7 +599,7 @@ function kr({ layer: e, readOnly: t = !1, editTabs: r = null }) {
599
599
  ]), Y(() => {
600
600
  if (t || m == null || !e) return;
601
601
  let n = ot(e, K(e.loopId)?.params ?? []);
602
- Dr(n, l[m]?.params) || nt(m, n);
602
+ Or(n, l[m]?.params) || nt(m, n);
603
603
  }, [e]), Y(() => {
604
604
  t || !A || m == null || (q({ editing: null }), U.current = null);
605
605
  }, [
@@ -638,17 +638,17 @@ function kr({ layer: e, readOnly: t = !1, editTabs: r = null }) {
638
638
  !t && /* @__PURE__ */ Q(k, {
639
639
  divided: !0,
640
640
  children: /* @__PURE__ */ Q(he, {
641
- tree: gr(),
642
- presets: hr(),
643
- current: vr(s.presetId) ?? { typeLabel: lr.find((e) => e.id === f)?.label },
641
+ tree: _r(),
642
+ presets: gr(),
643
+ current: yr(s.presetId) ?? { typeLabel: ur.find((e) => e.id === f)?.label },
644
644
  subLabel: (e) => e.split(" · ").pop(),
645
- onPick: yr
645
+ onPick: br
646
646
  })
647
647
  }),
648
648
  /* @__PURE__ */ $(k, {
649
649
  divided: !0,
650
650
  children: [
651
- /* @__PURE__ */ Q(Vn, {
651
+ /* @__PURE__ */ Q(Hn, {
652
652
  items: l.map((e, t) => ({
653
653
  id: t,
654
654
  label: Qe(e, t)
@@ -711,7 +711,7 @@ function kr({ layer: e, readOnly: t = !1, editTabs: r = null }) {
711
711
  ]
712
712
  }),
713
713
  /* @__PURE__ */ Q(L, {
714
- schema: Or,
714
+ schema: kr,
715
715
  layer: s,
716
716
  setProp: (e, n) => {
717
717
  !t && (typeof n != "object" || !n) && q({ [e]: n });
@@ -761,7 +761,7 @@ function kr({ layer: e, readOnly: t = !1, editTabs: r = null }) {
761
761
  }
762
762
  //#endregion
763
763
  //#region src/editor/params/QuickMotion.jsx
764
- var Ar = [
764
+ var jr = [
765
765
  {
766
766
  value: "breathe",
767
767
  label: "Breathe",
@@ -780,14 +780,14 @@ var Ar = [
780
780
  source: "lfo-square",
781
781
  rate: 8
782
782
  }
783
- ], jr = .2;
784
- function Mr(e) {
783
+ ], Mr = .2;
784
+ function Nr(e) {
785
785
  if (!t(e)) return "off";
786
786
  if (e.bind !== "mod") return "custom";
787
- let n = Ar.find((t) => t.source === e.source && (e.transform?.rate ?? 1) === t.rate);
787
+ let n = jr.find((t) => t.source === e.source && (e.transform?.rate ?? 1) === t.rate);
788
788
  return n ? n.value : "custom";
789
789
  }
790
- function Nr({ schema: e, layer: t, setProp: i, label: a = "Modulate" }) {
790
+ function Pr({ schema: e, layer: t, setProp: i, label: a = "Modulate" }) {
791
791
  let o = c(), s = S(e ?? [], t).filter((e) => e.type === "range" && e.animatable !== !1 && w(e) !== "anim" && e.min != null && e.max != null && !/seed/i.test(e.key));
792
792
  if (!s.length) return null;
793
793
  let l = (e, r) => {
@@ -797,9 +797,9 @@ function Nr({ schema: e, layer: t, setProp: i, label: a = "Modulate" }) {
797
797
  i(e.key, Array.isArray(r) ? (r[0] + r[1]) / 2 : E(a, n.getCtx(), t) ?? e.default ?? e.min);
798
798
  return;
799
799
  }
800
- let o = Ar.find((e) => e.value === r);
800
+ let o = jr.find((e) => e.value === r);
801
801
  if (!o) return;
802
- let s = Number(E(a, n.getCtx(), t) ?? e.default ?? e.min), c = (e.max - e.min) * jr, l = Math.max(e.min, s - c), u = Math.min(e.max, s + c);
802
+ let s = Number(E(a, n.getCtx(), t) ?? e.default ?? e.min), c = (e.max - e.min) * Mr, l = Math.max(e.min, s - c), u = Math.min(e.max, s + c);
803
803
  i(e.key, {
804
804
  bind: "mod",
805
805
  source: o.source,
@@ -813,12 +813,12 @@ function Nr({ schema: e, layer: t, setProp: i, label: a = "Modulate" }) {
813
813
  label: a,
814
814
  divided: !0,
815
815
  children: s.map((e) => {
816
- let n = Mr(t[e.key]), i = [
816
+ let n = Nr(t[e.key]), i = [
817
817
  {
818
818
  value: "off",
819
819
  label: "Off"
820
820
  },
821
- ...Ar.map(({ value: e, label: t }) => ({
821
+ ...jr.map(({ value: e, label: t }) => ({
822
822
  value: e,
823
823
  label: t
824
824
  })),
@@ -845,7 +845,7 @@ function Nr({ schema: e, layer: t, setProp: i, label: a = "Modulate" }) {
845
845
  }
846
846
  //#endregion
847
847
  //#region src/editor/params/InputRows.jsx
848
- var Pr = [
848
+ var Fr = [
849
849
  {
850
850
  value: "off",
851
851
  label: "Off"
@@ -870,13 +870,13 @@ var Pr = [
870
870
  value: "lfo-sine",
871
871
  label: "LFO"
872
872
  }
873
- ], Fr = new Set(Pr.map((e) => e.value));
874
- function Ir({ schema: e, layer: r, setProp: i, inputs: a = null }) {
873
+ ], Ir = new Set(Fr.map((e) => e.value));
874
+ function Lr({ schema: e, layer: r, setProp: i, inputs: a = null }) {
875
875
  let o = c(), s = S(e ?? [], r).filter((e) => e.type === "range" && e.animatable !== !1 && e.min != null && e.max != null && !/seed/i.test(e.key));
876
876
  if (!s.length) return null;
877
877
  let l = new Map(s.map((e) => [e.key, e])), d = (a ?? []).filter((e) => l.has(e)), f = [...d, ...s.map((e) => e.key).filter((e) => !d.includes(e))], p = d.length ? d : f.slice(0, 3), m = (e) => {
878
878
  let n = r[e];
879
- return t(n) && n.bind === "mod" && Fr.has(n.source);
879
+ return t(n) && n.bind === "mod" && Ir.has(n.source);
880
880
  }, h = f.filter(m), g = (e) => {
881
881
  let t = l.get(e);
882
882
  return Number(E(r[e], n.getCtx(), r) ?? t.default ?? t.min);
@@ -895,13 +895,13 @@ function Ir({ schema: e, layer: r, setProp: i, inputs: a = null }) {
895
895
  return /* @__PURE__ */ $(k, {
896
896
  label: "Inputs",
897
897
  divided: !0,
898
- children: [h.map((e) => /* @__PURE__ */ Q(zn, {
898
+ children: [h.map((e) => /* @__PURE__ */ Q(Bn, {
899
899
  size: o,
900
900
  className: "w-full [&>button]:w-full",
901
901
  groups: [{
902
902
  id: "source",
903
903
  label: "Source",
904
- options: Pr
904
+ options: Fr
905
905
  }, {
906
906
  id: "drives",
907
907
  label: "Drives",
@@ -914,7 +914,7 @@ function Ir({ schema: e, layer: r, setProp: i, inputs: a = null }) {
914
914
  source: r[e].source,
915
915
  drives: e
916
916
  },
917
- label: `${Pr.find((t) => t.value === r[e].source)?.label} → ${l.get(e).label}`,
917
+ label: `${Fr.find((t) => t.value === r[e].source)?.label} → ${l.get(e).label}`,
918
918
  onChange: (t, n) => {
919
919
  if (t === "source") {
920
920
  n === "off" ? v(e) : _(e, n);
@@ -935,8 +935,8 @@ function Ir({ schema: e, layer: r, setProp: i, inputs: a = null }) {
935
935
  }
936
936
  //#endregion
937
937
  //#region src/editor/labs/ModelSource.jsx
938
- var Lr = /\.(obj|glb|gltf|stl)$/i, Rr = (e) => Lr.test(e.key ?? e.name ?? ""), zr = (e) => (e.match(Lr)?.[1] ?? "obj").toLowerCase(), Br = (e) => e?.startsWith("data:") ? "Local file" : decodeURIComponent(String(e ?? "").split("/").pop() || "—");
939
- function Vr({ layer: e, setProp: t }) {
938
+ var Rr = /\.(obj|glb|gltf|stl)$/i, zr = (e) => Rr.test(e.key ?? e.name ?? ""), Br = (e) => (e.match(Rr)?.[1] ?? "obj").toLowerCase(), Vr = (e) => e?.startsWith("data:") ? "Local file" : decodeURIComponent(String(e ?? "").split("/").pop() || "—");
939
+ function Hr({ layer: e, setProp: t }) {
940
940
  let n = c(), [r, i] = Z(!1), a = X(null), o = (e, n) => {
941
941
  t("meshSrc", e), t("meshType", n);
942
942
  };
@@ -946,7 +946,7 @@ function Vr({ layer: e, setProp: t }) {
946
946
  children: [
947
947
  /* @__PURE__ */ Q("span", {
948
948
  className: "kol-mono-12 text-meta truncate",
949
- children: Br(e.meshSrc)
949
+ children: Vr(e.meshSrc)
950
950
  }),
951
951
  /* @__PURE__ */ $("div", {
952
952
  className: "grid grid-cols-2 gap-2",
@@ -971,15 +971,15 @@ function Vr({ layer: e, setProp: t }) {
971
971
  let t = e.target.files?.[0];
972
972
  if (e.target.value = "", !t) return;
973
973
  let n = new FileReader();
974
- n.onload = () => o(n.result, zr(t.name)), n.readAsDataURL(t);
974
+ n.onload = () => o(n.result, Br(t.name)), n.readAsDataURL(t);
975
975
  }
976
976
  }),
977
977
  /* @__PURE__ */ Q(Mn, {
978
978
  open: r,
979
- accept: Rr,
979
+ accept: zr,
980
980
  onClose: () => i(!1),
981
981
  onSelect: (e) => {
982
- i(!1), o(Qt(e), zr(e));
982
+ i(!1), o(Qt(e), Br(e));
983
983
  }
984
984
  })
985
985
  ]
@@ -987,7 +987,7 @@ function Vr({ layer: e, setProp: t }) {
987
987
  }
988
988
  //#endregion
989
989
  //#region src/editor/labs/useLabsKeys.js
990
- function Hr(e, t) {
990
+ function Ur(e, t) {
991
991
  Y(() => {
992
992
  let n = (n) => {
993
993
  n.key !== "r" && n.key !== "R" || n.metaKey || n.ctrlKey || n.altKey || wt(n) || (n.preventDefault(), n.shiftKey ? t?.() : e?.());
@@ -997,13 +997,13 @@ function Hr(e, t) {
997
997
  }
998
998
  //#endregion
999
999
  //#region src/editor/labs/LabsParams.jsx
1000
- var Ur = [{
1000
+ var Wr = [{
1001
1001
  value: "effect",
1002
1002
  label: "Effect"
1003
1003
  }, {
1004
1004
  value: "anim",
1005
1005
  label: "Motion"
1006
- }], Wr = [
1006
+ }], Gr = [
1007
1007
  {
1008
1008
  value: "generate",
1009
1009
  label: "Generate"
@@ -1016,7 +1016,7 @@ var Ur = [{
1016
1016
  value: "anim",
1017
1017
  label: "Animation"
1018
1018
  }
1019
- ], Gr = [
1019
+ ], Kr = [
1020
1020
  {
1021
1021
  value: "generate",
1022
1022
  label: "Gen"
@@ -1030,11 +1030,11 @@ var Ur = [{
1030
1030
  label: "Anim"
1031
1031
  }
1032
1032
  ];
1033
- function Kr({ options: e, active: t, onPick: n, spread: r = !1, pills: i = !1 }) {
1033
+ function qr({ options: e, active: t, onPick: n, spread: r = !1, pills: i = !1 }) {
1034
1034
  let o = c();
1035
1035
  return e?.length ? i ? /* @__PURE__ */ Q("div", {
1036
1036
  className: "flex items-center gap-1 flex-wrap",
1037
- children: e.map((e) => /* @__PURE__ */ Q(Hn, {
1037
+ children: e.map((e) => /* @__PURE__ */ Q(Un, {
1038
1038
  size: "xs",
1039
1039
  hash: !1,
1040
1040
  active: e.value === t,
@@ -1052,13 +1052,13 @@ function Kr({ options: e, active: t, onPick: n, spread: r = !1, pills: i = !1 })
1052
1052
  className: a(o)
1053
1053
  }) : null;
1054
1054
  }
1055
- function qr() {
1055
+ function Jr() {
1056
1056
  let { undo: e, redo: t, canUndo: n, canRedo: r } = o(), i = c(), a = (e, t) => e ? t : /* @__PURE__ */ Q("span", {
1057
1057
  "aria-hidden": "true",
1058
1058
  className: "invisible pointer-events-none",
1059
1059
  children: t
1060
1060
  });
1061
- return /* @__PURE__ */ $(Xn, { children: [a(n, /* @__PURE__ */ Q(Un, {
1061
+ return /* @__PURE__ */ $(Zn, { children: [a(n, /* @__PURE__ */ Q(Wn, {
1062
1062
  label: "Undo",
1063
1063
  shortcut: "⌘Z",
1064
1064
  children: /* @__PURE__ */ Q(O, {
@@ -1068,7 +1068,7 @@ function qr() {
1068
1068
  tabIndex: n ? void 0 : -1,
1069
1069
  onClick: e
1070
1070
  })
1071
- })), a(r, /* @__PURE__ */ Q(Un, {
1071
+ })), a(r, /* @__PURE__ */ Q(Wn, {
1072
1072
  label: "Redo",
1073
1073
  shortcut: "⇧⌘Z",
1074
1074
  children: /* @__PURE__ */ Q(O, {
@@ -1080,7 +1080,7 @@ function qr() {
1080
1080
  })
1081
1081
  }))] });
1082
1082
  }
1083
- function Jr({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tabStrip: s, preStrip: l, fx: u = !1, scope: d, ghostLabels: f, children: p }) {
1083
+ function Yr({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tabStrip: s, preStrip: l, fx: u = !1, scope: d, ghostLabels: f, children: p }) {
1084
1084
  let m = c() === "sm", h = I() === "float";
1085
1085
  return /* @__PURE__ */ $("div", {
1086
1086
  className: `flex flex-col gap-5${u ? " kol-labs-fx" : ""}`,
@@ -1091,9 +1091,9 @@ function Jr({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tab
1091
1091
  children: [/* @__PURE__ */ Q("p", {
1092
1092
  className: `${h ? "kol-float-label text-fg-emphasis" : "kol-eyebrow text-fg-96"} flex-1 min-w-0`,
1093
1093
  children: o
1094
- }), /* @__PURE__ */ Q(qr, {})]
1094
+ }), /* @__PURE__ */ Q(Jr, {})]
1095
1095
  }),
1096
- e && /* @__PURE__ */ Q(Kr, {
1096
+ e && /* @__PURE__ */ Q(qr, {
1097
1097
  options: e,
1098
1098
  active: t,
1099
1099
  onPick: n,
@@ -1115,7 +1115,7 @@ function Jr({ chips: e, active: t, onPick: n, spread: i, pills: a, title: o, tab
1115
1115
  ]
1116
1116
  });
1117
1117
  }
1118
- function Yr({ layer: e, showMod: t }) {
1118
+ function Xr({ layer: e, showMod: t }) {
1119
1119
  let n = s(), i = c(), [l, u] = Z("effect");
1120
1120
  Y(() => {
1121
1121
  let e = () => u("effect");
@@ -1157,7 +1157,7 @@ function Yr({ layer: e, showMod: t }) {
1157
1157
  } : e);
1158
1158
  _(e.id, { filters: n });
1159
1159
  };
1160
- Hr(() => {
1160
+ Ur(() => {
1161
1161
  j && _(e.id, { filters: z.map((e, t) => t === 0 ? {
1162
1162
  ...e,
1163
1163
  params: {}
@@ -1183,7 +1183,7 @@ function Yr({ layer: e, showMod: t }) {
1183
1183
  value: e.id,
1184
1184
  label: `${e.label ?? e.id}${e.kind === "pixi" ? " · GPU" : ""}`
1185
1185
  }))];
1186
- return /* @__PURE__ */ $(Jr, {
1186
+ return /* @__PURE__ */ $(Yr, {
1187
1187
  title: "Effects",
1188
1188
  fx: !0,
1189
1189
  tabStrip: /* @__PURE__ */ Q(P, {
@@ -1191,18 +1191,18 @@ function Yr({ layer: e, showMod: t }) {
1191
1191
  tone: "sunken",
1192
1192
  value: l,
1193
1193
  onChange: u,
1194
- options: Ur,
1194
+ options: Wr,
1195
1195
  size: i,
1196
1196
  className: a(i)
1197
1197
  }),
1198
- children: [l === "effect" && /* @__PURE__ */ $(Xn, { children: [
1198
+ children: [l === "effect" && /* @__PURE__ */ $(Zn, { children: [
1199
1199
  /* @__PURE__ */ $(k, {
1200
1200
  label: "Effect stack",
1201
1201
  divided: !0,
1202
1202
  children: [T.length === 0 && /* @__PURE__ */ Q(R, {
1203
1203
  className: "kol-mono-10 text-meta",
1204
1204
  children: "No effects yet — add one below."
1205
- }), /* @__PURE__ */ Q($r, {
1205
+ }), /* @__PURE__ */ Q(ei, {
1206
1206
  ...n,
1207
1207
  from: 0
1208
1208
  })]
@@ -1229,7 +1229,7 @@ function Yr({ layer: e, showMod: t }) {
1229
1229
  })]
1230
1230
  });
1231
1231
  }
1232
- if (!j) return /* @__PURE__ */ Q(Jr, {
1232
+ if (!j) return /* @__PURE__ */ Q(Yr, {
1233
1233
  chips: te,
1234
1234
  active: null,
1235
1235
  onPick: I,
@@ -1240,7 +1240,7 @@ function Yr({ layer: e, showMod: t }) {
1240
1240
  tone: "sunken",
1241
1241
  value: l,
1242
1242
  onChange: u,
1243
- options: Ur,
1243
+ options: Wr,
1244
1244
  size: i,
1245
1245
  className: a(i)
1246
1246
  }),
@@ -1274,7 +1274,7 @@ function Yr({ layer: e, showMod: t }) {
1274
1274
  renderAnimate: re,
1275
1275
  inline: !0
1276
1276
  };
1277
- return /* @__PURE__ */ $(Jr, {
1277
+ return /* @__PURE__ */ $(Yr, {
1278
1278
  chips: te,
1279
1279
  active: j.id,
1280
1280
  onPick: I,
@@ -1288,11 +1288,11 @@ function Yr({ layer: e, showMod: t }) {
1288
1288
  tone: "sunken",
1289
1289
  value: l,
1290
1290
  onChange: u,
1291
- options: Ur,
1291
+ options: Wr,
1292
1292
  size: i,
1293
1293
  className: a(i)
1294
1294
  }),
1295
- children: [l === "effect" && /* @__PURE__ */ $(Xn, { children: [
1295
+ children: [l === "effect" && /* @__PURE__ */ $(Zn, { children: [
1296
1296
  K.length > 0 && /* @__PURE__ */ Q(L, {
1297
1297
  schema: K,
1298
1298
  ...he
@@ -1308,7 +1308,7 @@ function Yr({ layer: e, showMod: t }) {
1308
1308
  view: B,
1309
1309
  tab: "effect",
1310
1310
  onPatch: U,
1311
- levels: /* @__PURE__ */ $(Xn, { children: [
1311
+ levels: /* @__PURE__ */ $(Zn, { children: [
1312
1312
  [
1313
1313
  ["type", "Type"],
1314
1314
  ["category", "Category"],
@@ -1348,11 +1348,11 @@ function Yr({ layer: e, showMod: t }) {
1348
1348
  })]
1349
1349
  }),
1350
1350
  /* @__PURE__ */ Q(Rn, {}),
1351
- pe < G.length && /* @__PURE__ */ $(Xn, { children: [/* @__PURE__ */ Q(L, {
1351
+ pe < G.length && /* @__PURE__ */ $(Zn, { children: [/* @__PURE__ */ Q(L, {
1352
1352
  schema: G.slice(pe),
1353
1353
  ...he
1354
1354
  }), /* @__PURE__ */ Q(Rn, {})] }),
1355
- /* @__PURE__ */ Q(ei, {
1355
+ /* @__PURE__ */ Q(ti, {
1356
1356
  chain: T,
1357
1357
  from: D + 1,
1358
1358
  layer: e,
@@ -1364,8 +1364,8 @@ function Yr({ layer: e, showMod: t }) {
1364
1364
  palette: y,
1365
1365
  showMod: t
1366
1366
  })
1367
- ] }), l === "anim" && /* @__PURE__ */ $(Xn, { children: [
1368
- /* @__PURE__ */ Q(Ir, {
1367
+ ] }), l === "anim" && /* @__PURE__ */ $(Zn, { children: [
1368
+ /* @__PURE__ */ Q(Lr, {
1369
1369
  schema: j.def.params,
1370
1370
  layer: B,
1371
1371
  setProp: H,
@@ -1417,12 +1417,12 @@ function Yr({ layer: e, showMod: t }) {
1417
1417
  onChange: (e) => H("sweeps", e),
1418
1418
  inline: !0
1419
1419
  }),
1420
- /* @__PURE__ */ Q(Nr, {
1420
+ /* @__PURE__ */ Q(Pr, {
1421
1421
  schema: j.def.params,
1422
1422
  layer: B,
1423
1423
  setProp: H
1424
1424
  }),
1425
- /* @__PURE__ */ Q(Qr, {
1425
+ /* @__PURE__ */ Q($r, {
1426
1426
  chain: T,
1427
1427
  layer: e,
1428
1428
  hostView: B,
@@ -1435,13 +1435,13 @@ function Yr({ layer: e, showMod: t }) {
1435
1435
  ] })]
1436
1436
  });
1437
1437
  }
1438
- var Xr = W.filter((e) => !e.kind && !e.first);
1439
- function Zr({ layer: e, edit: t, palette: n, showMod: r }) {
1438
+ var Zr = W.filter((e) => !e.kind && !e.first);
1439
+ function Qr({ layer: e, edit: t, palette: n, showMod: r }) {
1440
1440
  let { addFilter: i, removeFilter: a, toggleFilter: s } = o(), c = x(e), l = c.map(({ def: e, ...t }) => t);
1441
- return /* @__PURE__ */ Q(ei, {
1441
+ return /* @__PURE__ */ Q(ti, {
1442
1442
  chain: c,
1443
1443
  from: 0,
1444
- filters: Xr,
1444
+ filters: Zr,
1445
1445
  layer: e,
1446
1446
  hostView: e,
1447
1447
  addFilter: i,
@@ -1458,7 +1458,7 @@ function Zr({ layer: e, edit: t, palette: n, showMod: r }) {
1458
1458
  showMod: r
1459
1459
  });
1460
1460
  }
1461
- function Qr({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: i, setStagePropAt: a, palette: o, showMod: s }) {
1461
+ function $r({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: i, setStagePropAt: a, palette: o, showMod: s }) {
1462
1462
  let l = c(), u = e.findIndex((e) => e.id === "fx-media"), d = u < 0 ? null : e[u], f = d ? {
1463
1463
  ...n,
1464
1464
  ...d.params,
@@ -1467,7 +1467,7 @@ function Qr({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: i, se
1467
1467
  return /* @__PURE__ */ Q(k, {
1468
1468
  label: "Media",
1469
1469
  divided: !0,
1470
- children: d?.def ? /* @__PURE__ */ $(Xn, { children: [/* @__PURE__ */ Q(L, {
1470
+ children: d?.def ? /* @__PURE__ */ $(Zn, { children: [/* @__PURE__ */ Q(L, {
1471
1471
  schema: d.def.params,
1472
1472
  layer: f,
1473
1473
  setProp: p,
@@ -1497,7 +1497,7 @@ function Qr({ chain: e, layer: t, hostView: n, addFilter: r, removeFilter: i, se
1497
1497
  })
1498
1498
  });
1499
1499
  }
1500
- function $r({ chain: e, from: t = 0, layer: n, hostView: r, toggleFilter: i, removeFilter: a, setStagePropAt: o, palette: s, showMod: l }) {
1500
+ function ei({ chain: e, from: t = 0, layer: n, hostView: r, toggleFilter: i, removeFilter: a, setStagePropAt: o, palette: s, showMod: l }) {
1501
1501
  let u = c();
1502
1502
  return e.slice(t).map((e, c) => {
1503
1503
  let d = c + t, f = e.enabled !== !1, p = {
@@ -1514,7 +1514,7 @@ function $r({ chain: e, from: t = 0, layer: n, hostView: r, toggleFilter: i, rem
1514
1514
  checked: f,
1515
1515
  onChange: () => i(n.id, d),
1516
1516
  label: e.def?.label ?? e.id
1517
- }), /* @__PURE__ */ Q(Un, {
1517
+ }), /* @__PURE__ */ Q(Wn, {
1518
1518
  asChild: !0,
1519
1519
  label: "Delete effect",
1520
1520
  children: /* @__PURE__ */ Q(O, {
@@ -1542,7 +1542,7 @@ function $r({ chain: e, from: t = 0, layer: n, hostView: r, toggleFilter: i, rem
1542
1542
  }, e.key ?? d);
1543
1543
  });
1544
1544
  }
1545
- function ei({ chain: e, from: t = 1, filters: n = null, layer: r, hostView: i, addFilter: a, removeFilter: o, toggleFilter: s, setStagePropAt: l, palette: u, showMod: d }) {
1545
+ function ti({ chain: e, from: t = 1, filters: n = null, layer: r, hostView: i, addFilter: a, removeFilter: o, toggleFilter: s, setStagePropAt: l, palette: u, showMod: d }) {
1546
1546
  let f = c(), p = [{
1547
1547
  value: "",
1548
1548
  label: "Add FX…"
@@ -1553,7 +1553,7 @@ function ei({ chain: e, from: t = 1, filters: n = null, layer: r, hostView: i, a
1553
1553
  return /* @__PURE__ */ $(k, {
1554
1554
  label: "Post-Processing",
1555
1555
  divided: !0,
1556
- children: [/* @__PURE__ */ Q($r, {
1556
+ children: [/* @__PURE__ */ Q(ei, {
1557
1557
  chain: e,
1558
1558
  from: t,
1559
1559
  layer: r,
@@ -1575,7 +1575,7 @@ function ei({ chain: e, from: t = 1, filters: n = null, layer: r, hostView: i, a
1575
1575
  })]
1576
1576
  });
1577
1577
  }
1578
- function ti({ layer: e, showMod: t, tree: n }) {
1578
+ function ni({ layer: e, showMod: t, tree: n }) {
1579
1579
  let r = c(), [i, s] = Z("generate"), { updateLayer: l, palette: u } = o(), { setOnly: d } = _e(), f = ne(e.id, { history: "coalesce" }), p = V(e.loopGroup).find((t) => t.id === e.presetId), m = H(e.loopGroup), g = (n ?? Ae).find((t) => t.groups.includes(e.loopGroup)), _ = g?.labels?.[e.loopGroup] ?? m?.label ?? "", v = g && g.label !== _ ? `${g.label} / ${_}` : _, y = e.loopGroup === "paratype" && p?.sub === "Glyphs" ? B("paratype", "Glyphs") : null, b = y ? y.map((e) => ({
1580
1580
  value: e.id,
1581
1581
  label: e.label
@@ -1585,10 +1585,10 @@ function ti({ layer: e, showMod: t, tree: n }) {
1585
1585
  }, S = () => {
1586
1586
  p && d(e.type, pe(p, e.loopGroup));
1587
1587
  };
1588
- return Hr(S, () => {
1588
+ return Ur(S, () => {
1589
1589
  let t = K(e.loopId)?.params ?? [];
1590
1590
  l(e.id, h(e, A(t, e), ee(), { withFilters: !0 }));
1591
- }), /* @__PURE__ */ $(Jr, {
1591
+ }), /* @__PURE__ */ $(Yr, {
1592
1592
  title: v,
1593
1593
  chips: b,
1594
1594
  active: e.presetId,
@@ -1601,12 +1601,12 @@ function ti({ layer: e, showMod: t, tree: n }) {
1601
1601
  tone: "sunken",
1602
1602
  value: i,
1603
1603
  onChange: s,
1604
- options: r === "sm" ? Wr : Gr,
1604
+ options: r === "sm" ? Gr : Kr,
1605
1605
  size: r,
1606
1606
  className: a(r)
1607
1607
  }),
1608
1608
  children: [
1609
- i === "anim" && /* @__PURE__ */ Q(Ir, {
1609
+ i === "anim" && /* @__PURE__ */ Q(Lr, {
1610
1610
  schema: K(e.loopId)?.params ?? [],
1611
1611
  layer: e,
1612
1612
  setProp: f.setProp,
@@ -1629,17 +1629,17 @@ function ti({ layer: e, showMod: t, tree: n }) {
1629
1629
  inline: !0,
1630
1630
  onReset: S
1631
1631
  }),
1632
- i === "generate" && e.loopId === "scene3d" && e.primitive === "mesh" && /* @__PURE__ */ Q(Vr, {
1632
+ i === "generate" && e.loopId === "scene3d" && e.primitive === "mesh" && /* @__PURE__ */ Q(Hr, {
1633
1633
  layer: e,
1634
1634
  setProp: f.setProp
1635
1635
  }),
1636
- i === "style" && /* @__PURE__ */ Q(Zr, {
1636
+ i === "style" && /* @__PURE__ */ Q(Qr, {
1637
1637
  layer: e,
1638
1638
  edit: f,
1639
1639
  palette: u,
1640
1640
  showMod: t
1641
1641
  }),
1642
- i === "anim" && /* @__PURE__ */ Q(Nr, {
1642
+ i === "anim" && /* @__PURE__ */ Q(Pr, {
1643
1643
  schema: K(e.loopId)?.params ?? [],
1644
1644
  layer: e,
1645
1645
  setProp: f.setProp
@@ -1647,9 +1647,9 @@ function ti({ layer: e, showMod: t, tree: n }) {
1647
1647
  ]
1648
1648
  });
1649
1649
  }
1650
- function ni({ layer: e, showMod: t }) {
1650
+ function ri({ layer: e, showMod: t }) {
1651
1651
  let n = c(), [r, i] = Z("generate"), { updateLayer: s, palette: l } = o(), { setOnly: u } = _e(), d = ne(e.id, { history: "coalesce" }), f = ht.find((t) => t.id === e.presetId), p = mt.find((e) => e.subs.includes(f?.sub))?.label ?? "Kinetic";
1652
- return Hr(() => {
1652
+ return Ur(() => {
1653
1653
  f && u("kinetic", {
1654
1654
  presetId: f.id,
1655
1655
  presetLabel: f.label,
@@ -1663,14 +1663,14 @@ function ni({ layer: e, showMod: t }) {
1663
1663
  comp: r,
1664
1664
  _rollSeed: t
1665
1665
  });
1666
- }), /* @__PURE__ */ Q(Jr, {
1666
+ }), /* @__PURE__ */ Q(Yr, {
1667
1667
  title: p,
1668
1668
  tabStrip: /* @__PURE__ */ Q(P, {
1669
1669
  layout: "joined",
1670
1670
  tone: "sunken",
1671
1671
  value: r,
1672
1672
  onChange: i,
1673
- options: n === "sm" ? Wr : Gr,
1673
+ options: n === "sm" ? Gr : Kr,
1674
1674
  size: n,
1675
1675
  className: a(n)
1676
1676
  }),
@@ -1689,37 +1689,37 @@ function ni({ layer: e, showMod: t }) {
1689
1689
  })
1690
1690
  });
1691
1691
  }
1692
- function ri() {
1692
+ function ii() {
1693
1693
  let { layer: e } = _e(), t = ct(), n = c(), r = ut();
1694
1694
  return Y(() => {
1695
1695
  let e = (e) => {
1696
1696
  e.key !== "m" && e.key !== "M" || e.metaKey || e.ctrlKey || e.altKey || wt(e) || lt();
1697
1697
  };
1698
1698
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1699
- }, []), t.active ? /* @__PURE__ */ Q(Jr, {
1699
+ }, []), t.active ? /* @__PURE__ */ Q(Yr, {
1700
1700
  title: "Morph",
1701
- children: /* @__PURE__ */ Q(kr, {
1701
+ children: /* @__PURE__ */ Q(Ar, {
1702
1702
  layer: e,
1703
- editTabs: n === "sm" ? Wr : Gr
1703
+ editTabs: n === "sm" ? Gr : Kr
1704
1704
  })
1705
- }) : e ? e.type === "photo" ? /* @__PURE__ */ Q(Yr, {
1705
+ }) : e ? e.type === "photo" ? /* @__PURE__ */ Q(Xr, {
1706
1706
  layer: e,
1707
1707
  showMod: r
1708
- }, e.id) : e.type === "loop" ? /* @__PURE__ */ Q(ti, {
1708
+ }, e.id) : e.type === "loop" ? /* @__PURE__ */ Q(ni, {
1709
1709
  layer: e,
1710
1710
  showMod: r
1711
- }, e.id) : e.type === "misc" ? /* @__PURE__ */ Q(ti, {
1711
+ }, e.id) : e.type === "misc" ? /* @__PURE__ */ Q(ni, {
1712
1712
  layer: e,
1713
1713
  showMod: r,
1714
1714
  tree: ve
1715
- }, e.id) : e.type === "kinetic" ? /* @__PURE__ */ Q(ni, {
1715
+ }, e.id) : e.type === "kinetic" ? /* @__PURE__ */ Q(ri, {
1716
1716
  layer: e,
1717
1717
  showMod: r
1718
1718
  }, e.id) : /* @__PURE__ */ Q(R, { children: "This layer has no labs surface." }) : /* @__PURE__ */ Q(R, { children: "Pick an effect or generator from the nav." });
1719
1719
  }
1720
1720
  //#endregion
1721
1721
  //#region src/editor/mobile/CategoryScreen.jsx
1722
- function ii(e) {
1722
+ function ai(e) {
1723
1723
  Y(() => {
1724
1724
  let t = (t) => {
1725
1725
  t.key === "Escape" && e?.();
@@ -1732,8 +1732,8 @@ function ii(e) {
1732
1732
  };
1733
1733
  }, []);
1734
1734
  }
1735
- function ai({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
1736
- return ii(r ?? n), /* @__PURE__ */ Q("div", {
1735
+ function oi({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
1736
+ return ai(r ?? n), /* @__PURE__ */ Q("div", {
1737
1737
  className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
1738
1738
  style: { zIndex: "var(--kol-z-modal)" },
1739
1739
  children: /* @__PURE__ */ $("div", {
@@ -1747,7 +1747,7 @@ function ai({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
1747
1747
  /* @__PURE__ */ Q("div", {
1748
1748
  className: "flex flex-col gap-2",
1749
1749
  children: Ae.map((t) => {
1750
- let n = br[`gen:${t.label}`] ?? "square";
1750
+ let n = xr[`gen:${t.label}`] ?? "square";
1751
1751
  return /* @__PURE__ */ Q(J, {
1752
1752
  tone: "primary",
1753
1753
  size: "lg",
@@ -1785,11 +1785,11 @@ function ai({ onPick: e, onInsert: t, onBack: n, onDismiss: r }) {
1785
1785
  }
1786
1786
  //#endregion
1787
1787
  //#region src/editor/labs/LabsSourcePicker.jsx
1788
- var oi = (e) => /\.svg$/i.test(e.key) || /svg/i.test(e.contentType || "");
1789
- function si(e) {
1788
+ var si = (e) => /\.svg$/i.test(e.key) || /svg/i.test(e.contentType || "");
1789
+ function ci(e) {
1790
1790
  let { patch: t } = ne(e.id), n = X(null), [r, i] = Z(!1), a = e.type === "loop" && e.loopGroup === "distress";
1791
1791
  return {
1792
- nodes: /* @__PURE__ */ $(Xn, { children: [/* @__PURE__ */ Q("input", {
1792
+ nodes: /* @__PURE__ */ $(Zn, { children: [/* @__PURE__ */ Q("input", {
1793
1793
  ref: n,
1794
1794
  type: "file",
1795
1795
  accept: a ? ".svg,image/svg+xml" : "image/*,video/*",
@@ -1817,7 +1817,7 @@ function si(e) {
1817
1817
  }
1818
1818
  }), /* @__PURE__ */ Q(Mn, {
1819
1819
  open: r,
1820
- accept: a ? oi : ["image", "video"],
1820
+ accept: a ? si : ["image", "video"],
1821
1821
  onClose: () => i(!1),
1822
1822
  onSelect: (e, { contentType: n } = {}) => {
1823
1823
  if (a) {
@@ -1855,8 +1855,8 @@ function si(e) {
1855
1855
  label: "Camera"
1856
1856
  }
1857
1857
  ].slice(0, 2);
1858
- function ci({ layer: e }) {
1859
- let t = si(e);
1858
+ function li({ layer: e }) {
1859
+ let t = ci(e);
1860
1860
  return /* @__PURE__ */ $("div", {
1861
1861
  className: "flex flex-col gap-2",
1862
1862
  children: [
@@ -1891,8 +1891,8 @@ function ci({ layer: e }) {
1891
1891
  ]
1892
1892
  });
1893
1893
  }
1894
- function li({ layer: e, title: t, onBack: n }) {
1895
- return ii(n), /* @__PURE__ */ Q("div", {
1894
+ function ui({ layer: e, title: t, onBack: n }) {
1895
+ return ai(n), /* @__PURE__ */ Q("div", {
1896
1896
  className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
1897
1897
  style: { zIndex: "calc(var(--kol-z-sticky) - 2)" },
1898
1898
  children: /* @__PURE__ */ $("div", {
@@ -1909,7 +1909,7 @@ function li({ layer: e, title: t, onBack: n }) {
1909
1909
  children: "Pick the media it works on."
1910
1910
  })]
1911
1911
  }),
1912
- /* @__PURE__ */ Q(ci, { layer: e }),
1912
+ /* @__PURE__ */ Q(li, { layer: e }),
1913
1913
  /* @__PURE__ */ Q(O, {
1914
1914
  tone: "grey",
1915
1915
  size: "lg",
@@ -1925,13 +1925,13 @@ function li({ layer: e, title: t, onBack: n }) {
1925
1925
  }
1926
1926
  //#endregion
1927
1927
  //#region src/editor/components/PanelHeader.jsx
1928
- function ui({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
1928
+ function di({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
1929
1929
  return /* @__PURE__ */ $("div", {
1930
1930
  className: `flex w-full shrink-0 items-center ${r}`,
1931
1931
  children: [/* @__PURE__ */ $("button", {
1932
1932
  className: "kol-helper-12 text-meta flex flex-1 items-center gap-2 py-2.5",
1933
1933
  onClick: t,
1934
- children: [/* @__PURE__ */ Q("span", { children: e }), /* @__PURE__ */ Q(Zn, {
1934
+ children: [/* @__PURE__ */ Q("span", { children: e }), /* @__PURE__ */ Q(Qn, {
1935
1935
  name: "chevron-down",
1936
1936
  size: 16,
1937
1937
  className: "text-oq-48"
@@ -1939,7 +1939,7 @@ function ui({ title: e, onCollapse: t, action: n, className: r = "px-3" }) {
1939
1939
  }), n]
1940
1940
  });
1941
1941
  }
1942
- function di({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children: i }) {
1942
+ function fi({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children: i }) {
1943
1943
  return /* @__PURE__ */ $("div", {
1944
1944
  className: "pointer-events-none fixed bottom-[max(0.75rem,env(safe-area-inset-bottom))] left-[var(--fxr-rail,0px)] right-0 z-10 flex flex-nowrap items-center gap-2 px-3 [&>*]:pointer-events-auto",
1945
1945
  children: [/* @__PURE__ */ Q(J, {
@@ -1952,7 +1952,7 @@ function di({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children
1952
1952
  children: [/* @__PURE__ */ Q("span", {
1953
1953
  className: "truncate",
1954
1954
  children: e
1955
- }), /* @__PURE__ */ Q(Zn, {
1955
+ }), /* @__PURE__ */ Q(Qn, {
1956
1956
  name: "chevron-down",
1957
1957
  size: 16,
1958
1958
  className: "rotate-180 shrink-0"
@@ -1961,13 +1961,13 @@ function di({ label: e, onOpen: t, size: n = "lg", tone: r = "primary", children
1961
1961
  }), i]
1962
1962
  });
1963
1963
  }
1964
- var fi = {
1964
+ var pi = {
1965
1965
  half: "50dvh",
1966
1966
  tall: "85dvh"
1967
- }, pi = 4;
1968
- function mi({ tall: e, onToggle: t, onDrag: n, onResize: r, onResizeEnd: i }) {
1967
+ }, mi = 4;
1968
+ function hi({ tall: e, onToggle: t, onDrag: n, onResize: r, onResizeEnd: i }) {
1969
1969
  let a = X(null);
1970
- Wn(a, { axis: "x" });
1970
+ Gn(a, { axis: "x" });
1971
1971
  let o = X({
1972
1972
  y: null,
1973
1973
  h0: 0,
@@ -1987,7 +1987,7 @@ function mi({ tall: e, onToggle: t, onDrag: n, onResize: r, onResizeEnd: i }) {
1987
1987
  onPointerMove: (e) => {
1988
1988
  if (o.y === null) return;
1989
1989
  let t = e.clientY - o.y;
1990
- Math.abs(t) > pi && (o.moved = !0), o.moved && r && (o.last = o.h0 - t, r(o.last));
1990
+ Math.abs(t) > mi && (o.moved = !0), o.moved && r && (o.last = o.h0 - t, r(o.last));
1991
1991
  },
1992
1992
  onPointerUp: (e) => {
1993
1993
  if (o.y === null) return;
@@ -2009,10 +2009,10 @@ function mi({ tall: e, onToggle: t, onDrag: n, onResize: r, onResizeEnd: i }) {
2009
2009
  }
2010
2010
  //#endregion
2011
2011
  //#region src/editor/labs/LabsCatalogCard.jsx
2012
- var hi = new Set(["#rail/sec:effects"]);
2013
- function gi({ onPicked: e, onClose: t, initialOpen: n = null, hasMedia: r = !0, onNeedMedia: i }) {
2012
+ var gi = new Set(["#rail/sec:effects"]);
2013
+ function _i({ onPicked: e, onClose: t, initialOpen: n = null, hasMedia: r = !0, onNeedMedia: i }) {
2014
2014
  let { items: a, dispatch: o } = An(), [s, c] = Z(n);
2015
- ii(t);
2015
+ ai(t);
2016
2016
  let l = a.find((e) => e.path === s) ?? null, u = l ? l.sub : a;
2017
2017
  return /* @__PURE__ */ Q("div", {
2018
2018
  className: "fixed bottom-0 top-12 md:top-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
@@ -2035,7 +2035,7 @@ function gi({ onPicked: e, onClose: t, initialOpen: n = null, hasMedia: r = !0,
2035
2035
  iconLeft: t.icon,
2036
2036
  iconRight: t.icon,
2037
2037
  onClick: () => {
2038
- if (!l && hi.has(t.path) && !r && i) {
2038
+ if (!l && gi.has(t.path) && !r && i) {
2039
2039
  i(t.path);
2040
2040
  return;
2041
2041
  }
@@ -2061,7 +2061,7 @@ function gi({ onPicked: e, onClose: t, initialOpen: n = null, hasMedia: r = !0,
2061
2061
  }
2062
2062
  //#endregion
2063
2063
  //#region src/editor/labs/sheetLabels.js
2064
- function _i(e) {
2064
+ function vi(e) {
2065
2065
  if (rt().active) return {
2066
2066
  title: "Morph",
2067
2067
  pill: "Morph"
@@ -2071,7 +2071,8 @@ function _i(e) {
2071
2071
  pill: "Labs"
2072
2072
  };
2073
2073
  if (e.type === "loop" || e.type === "misc") return {
2074
- title: `${H(e.loopGroup)?.label ?? "Labs"} · ${e.presetLabel}`,
2074
+ title: H(e.loopGroup)?.label ?? "Labs",
2075
+ kind: e.presetLabel,
2075
2076
  pill: e.presetLabel
2076
2077
  };
2077
2078
  if (e.type === "photo") {
@@ -2089,14 +2090,14 @@ function _i(e) {
2089
2090
  }
2090
2091
  //#endregion
2091
2092
  //#region src/editor/labs/LabsView.jsx
2092
- var vi = .85, yi = .3, bi = 2.5, xi = {
2093
+ var yi = .85, bi = .3, xi = 2.5, Si = {
2093
2094
  0: 1,
2094
2095
  1: .5,
2095
2096
  2: 1,
2096
2097
  3: 1.5,
2097
2098
  4: 2
2098
- }, Si = "px-2 py-1 rounded border border-oq-08 bg-surface-secondary kol-mono-12 text-emphasis tabular-nums";
2099
- function Ci() {
2099
+ }, Ci = "px-2 py-1 rounded border border-oq-08 bg-surface-secondary kol-mono-12 text-emphasis tabular-nums";
2100
+ function wi() {
2100
2101
  let { layer: e } = _e(), { removeLayer: t, layers: r, updateLayer: i, beginTransaction: a, commitTransaction: s, select: c } = o(), [l, u] = Z(null);
2101
2102
  Y(() => {
2102
2103
  let e = (e) => {
@@ -2116,7 +2117,7 @@ function Ci() {
2116
2117
  l,
2117
2118
  c
2118
2119
  ]);
2119
- let d = l && r.find((e) => e.id === l.id && e.type === "kinetic"), f = e?.type === "photo" && !e.src && e.srcType !== "webcam", [m, h] = Z(1), [g, _] = Z(!1), v = jt(g), y = X(null), b = (e) => Math.min(bi, Math.max(yi, e)), x = (e) => h((t) => b(t * (e > 0 ? 1.25 : .8))), { tool: S } = Mt(), C = S === "orbit", w = X(C);
2120
+ let d = l && r.find((e) => e.id === l.id && e.type === "kinetic"), f = e?.type === "photo" && !e.src && e.srcType !== "webcam", [m, h] = Z(1), [g, _] = Z(!1), v = jt(g), y = X(null), b = (e) => Math.min(xi, Math.max(bi, e)), x = (e) => h((t) => b(t * (e > 0 ? 1.25 : .8))), { tool: S } = Mt(), C = S === "orbit", w = X(C);
2120
2121
  w.current = C, Y(() => {
2121
2122
  let e = y.current;
2122
2123
  if (!e) return;
@@ -2131,7 +2132,7 @@ function Ci() {
2131
2132
  _((e) => !e);
2132
2133
  return;
2133
2134
  }
2134
- if (!(p().zoomLock && (e.key === "-" || e.key === "_" || e.key === "+" || e.key === "=" || xi[e.key] !== void 0))) {
2135
+ if (!(p().zoomLock && (e.key === "-" || e.key === "_" || e.key === "+" || e.key === "=" || Si[e.key] !== void 0))) {
2135
2136
  if (e.key === "-" || e.key === "_") {
2136
2137
  x(-1);
2137
2138
  return;
@@ -2140,7 +2141,7 @@ function Ci() {
2140
2141
  x(1);
2141
2142
  return;
2142
2143
  }
2143
- xi[e.key] !== void 0 && h(xi[e.key]);
2144
+ Si[e.key] !== void 0 && h(Si[e.key]);
2144
2145
  }
2145
2146
  }
2146
2147
  };
@@ -2220,8 +2221,8 @@ function Ci() {
2220
2221
  /* @__PURE__ */ Q("div", {
2221
2222
  style: {
2222
2223
  flex: "none",
2223
- width: `${m * vi * 100}%`,
2224
- height: `${m * vi * 100}%`,
2224
+ width: `${m * yi * 100}%`,
2225
+ height: `${m * yi * 100}%`,
2225
2226
  transform: `translate(${T.x}px, ${T.y}px)`
2226
2227
  },
2227
2228
  children: /* @__PURE__ */ Q(tn, { overlay: d ? (e) => /* @__PURE__ */ Q(Nn, {
@@ -2234,17 +2235,17 @@ function Ci() {
2234
2235
  onExit: () => u(null)
2235
2236
  }) : void 0 })
2236
2237
  }),
2237
- f && /* @__PURE__ */ Q(li, {
2238
+ f && /* @__PURE__ */ Q(ui, {
2238
2239
  layer: e,
2239
- title: _i(e).title,
2240
+ title: vi(e).title,
2240
2241
  onBack: () => t(e.id)
2241
2242
  }),
2242
2243
  g && /* @__PURE__ */ Q("div", {
2243
2244
  className: "absolute bottom-3 right-3 z-[var(--kol-z-base)] flex items-center gap-2 [@media(pointer:coarse)]:bottom-1",
2244
- children: /* @__PURE__ */ Q(Un, {
2245
+ children: /* @__PURE__ */ Q(Wn, {
2245
2246
  label: "Framerate — press F to hide",
2246
2247
  children: /* @__PURE__ */ $("span", {
2247
- className: Si,
2248
+ className: Ci,
2248
2249
  children: [v, " fps"]
2249
2250
  })
2250
2251
  })
@@ -2252,8 +2253,8 @@ function Ci() {
2252
2253
  ]
2253
2254
  });
2254
2255
  }
2255
- function wi() {
2256
- let e = X(null), { grabProps: t } = tr(e, {
2256
+ function Ti() {
2257
+ let e = X(null), { grabProps: t } = nr(e, {
2257
2258
  token: "kol-rail",
2258
2259
  side: "right"
2259
2260
  });
@@ -2299,14 +2300,14 @@ function wi() {
2299
2300
  className: "kol-compose-rail kol-compose-rail--inspector",
2300
2301
  children: [/* @__PURE__ */ Q("div", { ...t }), /* @__PURE__ */ Q("div", {
2301
2302
  className: "kol-compose-inspector-body",
2302
- children: /* @__PURE__ */ Q(ri, {})
2303
+ children: /* @__PURE__ */ Q(ii, {})
2303
2304
  })]
2304
2305
  });
2305
2306
  }
2306
- var Ti = qn(null);
2307
- function Ei() {
2308
- let { tall: e, setTall: t, collapseParams: n, setSheetPx: r } = Jn(Ti);
2309
- return /* @__PURE__ */ Q(mi, {
2307
+ var Ei = Jn(null);
2308
+ function Di() {
2309
+ let { tall: e, setTall: t, collapseParams: n, setSheetPx: r } = Yn(Ei);
2310
+ return /* @__PURE__ */ Q(hi, {
2310
2311
  tall: e,
2311
2312
  onToggle: () => {
2312
2313
  r(null), t((e) => !e);
@@ -2317,14 +2318,14 @@ function Ei() {
2317
2318
  }
2318
2319
  });
2319
2320
  }
2320
- var Di = [
2321
+ var Oi = [
2321
2322
  2,
2322
2323
  4,
2323
2324
  8,
2324
2325
  12,
2325
2326
  16
2326
2327
  ];
2327
- function Oi({ paramsOpen: e, setParamsOpen: t, catalog: n, toggleCatalog: r, railHeight: i }) {
2328
+ function ki({ paramsOpen: e, setParamsOpen: t, catalog: n, toggleCatalog: r, railHeight: i }) {
2328
2329
  let { playing: a, loopSeconds: o, play: s, pause: c, stop: l, rewind: u, setLoopSeconds: f } = d(), [p, m] = Z(!0), h = [
2329
2330
  {
2330
2331
  icon: "home-01",
@@ -2399,14 +2400,14 @@ function Oi({ paramsOpen: e, setParamsOpen: t, catalog: n, toggleCatalog: r, rai
2399
2400
  onPress: u
2400
2401
  }
2401
2402
  ],
2402
- sheetFor: { loop: Di.map((e) => ({
2403
+ sheetFor: { loop: Oi.map((e) => ({
2403
2404
  label: `${e} s`,
2404
2405
  checked: o === e,
2405
2406
  onPress: () => f(e)
2406
2407
  })) }
2407
2408
  } : void 0;
2408
2409
  return Y(() => {
2409
- sr({
2410
+ cr({
2410
2411
  items: h,
2411
2412
  actions: g,
2412
2413
  transport: _,
@@ -2420,20 +2421,20 @@ function Oi({ paramsOpen: e, setParamsOpen: t, catalog: n, toggleCatalog: r, rai
2420
2421
  a,
2421
2422
  o,
2422
2423
  i
2423
- ]), Y(() => () => sr(null), []), null;
2424
+ ]), Y(() => () => cr(null), []), null;
2424
2425
  }
2425
- function ki() {
2426
+ function Ai() {
2426
2427
  return /* @__PURE__ */ Q("div", {
2427
2428
  className: "kol-compose-rail kol-compose-rail--inspector",
2428
2429
  children: /* @__PURE__ */ Q("div", {
2429
2430
  className: "kol-compose-inspector-body",
2430
- children: /* @__PURE__ */ Q(ri, {})
2431
+ children: /* @__PURE__ */ Q(ii, {})
2431
2432
  })
2432
2433
  });
2433
2434
  }
2434
- var Ai = {
2435
+ var ji = {
2435
2436
  topbar: () => null,
2436
- canvas: Ci,
2437
+ canvas: wi,
2437
2438
  panels: [
2438
2439
  {
2439
2440
  slot: "canvas.footer",
@@ -2443,7 +2444,7 @@ var Ai = {
2443
2444
  {
2444
2445
  slot: "right.body",
2445
2446
  order: 0,
2446
- Component: wi
2447
+ Component: Ti
2447
2448
  },
2448
2449
  {
2449
2450
  slot: "right.footer",
@@ -2451,18 +2452,18 @@ var Ai = {
2451
2452
  Component: sn
2452
2453
  }
2453
2454
  ]
2454
- }, ji = {
2455
- ...Ai,
2455
+ }, Mi = {
2456
+ ...ji,
2456
2457
  panels: [{
2457
2458
  slot: "right.header",
2458
2459
  order: 0,
2459
- Component: Ei
2460
- }, ...Ai.panels.map((e) => e.Component === wi ? {
2460
+ Component: Di
2461
+ }, ...ji.panels.map((e) => e.Component === Ti ? {
2461
2462
  ...e,
2462
- Component: ki
2463
+ Component: Ai
2463
2464
  } : e)]
2464
2465
  };
2465
- function Mi() {
2466
+ function Ni() {
2466
2467
  let { setAspect: e } = o(), t = X(!1);
2467
2468
  Y(() => {
2468
2469
  if (t.current) return;
@@ -2476,12 +2477,12 @@ function Mi() {
2476
2477
  return () => clearTimeout(e);
2477
2478
  }, [r]);
2478
2479
  }
2479
- function Ni() {
2480
+ function Pi() {
2480
2481
  let { selectedId: e, select: t } = o(), { layer: r, setOnly: i } = _e(), a = kn(qt), c = zt() && !Tn() || a;
2481
2482
  Y(() => {
2482
2483
  c && document.documentElement.removeAttribute("data-rail");
2483
2484
  }, [c]);
2484
- let [l, u] = Z(!0), [d, h] = Z(!1), [g, _] = Z(null), v = g ? `${g}px` : d ? fi.tall : fi.half, y = { "--kol-sheet-h": v }, b = cr(), x = ct(), [S, C] = Z(() => !r);
2485
+ let [l, u] = Z(!0), [d, h] = Z(!1), [g, _] = Z(null), v = g ? `${g}px` : d ? pi.tall : pi.half, y = { "--kol-sheet-h": v }, b = lr(), x = ct(), [S, C] = Z(() => !r);
2485
2486
  Y(() => {
2486
2487
  C(!r);
2487
2488
  }, [r?.id]);
@@ -2515,7 +2516,7 @@ function Ni() {
2515
2516
  return window.addEventListener("kol:open-params", e), window.addEventListener("kol:open-effects", e), () => {
2516
2517
  window.removeEventListener("kol:open-params", e), window.removeEventListener("kol:open-effects", e);
2517
2518
  };
2518
- }, [c]), Bt(), Y(() => (on("labs"), () => on(null)), []), Mi();
2519
+ }, [c]), Bt(), Y(() => (on("labs"), () => on(null)), []), Ni();
2519
2520
  let D = X(!1);
2520
2521
  Y(() => {
2521
2522
  if (D.current) return;
@@ -2589,8 +2590,8 @@ function Ni() {
2589
2590
  "data-empty": r || x.active ? void 0 : "",
2590
2591
  style: y,
2591
2592
  children: [
2592
- /* @__PURE__ */ Q(Er, {}),
2593
- c ? /* @__PURE__ */ $(Ti.Provider, {
2593
+ /* @__PURE__ */ Q(Dr, {}),
2594
+ c ? /* @__PURE__ */ $(Ei.Provider, {
2594
2595
  value: {
2595
2596
  collapseParams: () => u(!1),
2596
2597
  tall: d,
@@ -2602,8 +2603,8 @@ function Ni() {
2602
2603
  children: [/* @__PURE__ */ Q(f.Provider, {
2603
2604
  value: "md",
2604
2605
  children: /* @__PURE__ */ Q(Dt, {
2605
- registry: ji,
2606
- rightIn: (e) => b ? rr(/* @__PURE__ */ Q("div", {
2606
+ registry: Mi,
2607
+ rightIn: (e) => b ? ir(/* @__PURE__ */ Q("div", {
2607
2608
  className: "kol-editor-labs flex flex-col h-full",
2608
2609
  "data-touch": "",
2609
2610
  "data-params": "open",
@@ -2611,15 +2612,15 @@ function Ni() {
2611
2612
  children: e
2612
2613
  }), b) : null
2613
2614
  })
2614
- }), /* @__PURE__ */ Q(Oi, {
2615
+ }), /* @__PURE__ */ Q(ki, {
2615
2616
  paramsOpen: l,
2616
2617
  setParamsOpen: u,
2617
2618
  catalog: S,
2618
2619
  toggleCatalog: () => C((e) => !e),
2619
2620
  railHeight: v
2620
2621
  })]
2621
- }) : /* @__PURE__ */ Q(Dt, { registry: Ai }),
2622
- S && !x.picker && !(x.active && !r) && /* @__PURE__ */ Q(gi, {
2622
+ }) : /* @__PURE__ */ Q(Dt, { registry: ji }),
2623
+ S && !x.picker && !(x.active && !r) && /* @__PURE__ */ Q(_i, {
2623
2624
  initialOpen: w,
2624
2625
  hasMedia: E,
2625
2626
  onNeedMedia: (e) => {
@@ -2638,8 +2639,8 @@ function Ni() {
2638
2639
  ]
2639
2640
  });
2640
2641
  }
2641
- var Pi = "kol.editor.labs-draft";
2642
- function Fi() {
2642
+ var Fi = "kol.editor.labs-draft";
2643
+ function Ii() {
2643
2644
  let e = /\/morph\/?$/.test(typeof window > "u" ? "" : window.location.pathname);
2644
2645
  return Y(() => (q(e ? { active: !0 } : {
2645
2646
  active: !1,
@@ -2648,9 +2649,9 @@ function Fi() {
2648
2649
  active: !1,
2649
2650
  editing: null
2650
2651
  })), [e]), /* @__PURE__ */ $(hn, {
2651
- draftKey: Pi,
2652
+ draftKey: Fi,
2652
2653
  children: [
2653
- /* @__PURE__ */ Q(Ni, {}),
2654
+ /* @__PURE__ */ Q(Pi, {}),
2654
2655
  /* @__PURE__ */ Q(dn, {}),
2655
2656
  /* @__PURE__ */ Q(we, {})
2656
2657
  ]
@@ -2658,9 +2659,9 @@ function Fi() {
2658
2659
  }
2659
2660
  //#endregion
2660
2661
  //#region src/editor/mobile/EffectScreen.jsx
2661
- function Ii({ layer: e, chain: t, onPick: n, onBack: r }) {
2662
+ function Li({ layer: e, chain: t, onPick: n, onBack: r }) {
2662
2663
  let [i, a] = Z(null);
2663
- ii(r);
2664
+ ai(r);
2664
2665
  let { engineHost: o } = G(e), s = o && !t.some((e) => e.def?.kind === "engine"), c = re(W.filter((e) => e.kind !== "engine" || s)), l = c.find((e) => e.id === i) ?? null;
2665
2666
  return /* @__PURE__ */ Q("div", {
2666
2667
  className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center overflow-y-auto p-6",
@@ -2700,7 +2701,7 @@ function Ii({ layer: e, chain: t, onPick: n, onBack: r }) {
2700
2701
  }
2701
2702
  //#endregion
2702
2703
  //#region src/editor/mobile/MobileOverlay.jsx
2703
- var Li = { background: "var(--kol-surface-primary)" }, Ri = [
2704
+ var Ri = { background: "var(--kol-surface-primary)" }, zi = [
2704
2705
  {
2705
2706
  value: "generate",
2706
2707
  label: "Generate"
@@ -2717,30 +2718,30 @@ var Li = { background: "var(--kol-surface-primary)" }, Ri = [
2717
2718
  value: "output",
2718
2719
  label: "Output"
2719
2720
  }
2720
- ], zi = Ri.filter((e) => e.value !== "generate"), Bi = "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-1 [&_.kol-seg-cell]:overflow-hidden [@media(hover:none)]:[&_.kol-seg-cell:hover]:text-[var(--kol-oq-48)]", Vi = {
2721
+ ], Bi = zi.filter((e) => e.value !== "generate"), Vi = "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-1 [&_.kol-seg-cell]:overflow-hidden [@media(hover:none)]:[&_.kol-seg-cell:hover]:text-[var(--kol-oq-48)]", Hi = {
2721
2722
  lg: 9.6,
2722
2723
  sm: 7.2
2723
- }, Hi = 10, Ui = 232;
2724
- function Wi(e, t) {
2725
- let n = t === "sm" ? Ui : Math.min(window.innerWidth, 480) - 24, r = [], i = [], a = 0;
2724
+ }, Ui = 10, Wi = 232;
2725
+ function Gi(e, t) {
2726
+ let n = t === "sm" ? Wi : Math.min(window.innerWidth, 480) - 24, r = [], i = [], a = 0;
2726
2727
  for (let o of e) {
2727
- let e = o.label.length * Vi[t] + Hi, s = Math.max(a, e);
2728
+ let e = o.label.length * Hi[t] + Ui, s = Math.max(a, e);
2728
2729
  i.length && (i.length + 1) * s > n ? (r.push(i), i = [o], a = e) : (i.push(o), a = s);
2729
2730
  }
2730
2731
  return i.length && r.push(i), r;
2731
2732
  }
2732
- function Gi({ cells: e, size: t }) {
2733
- return Wi(e, t).map((e, n) => /* @__PURE__ */ Q(Ln, {
2733
+ function Ki({ cells: e, size: t }) {
2734
+ return Gi(e, t).map((e, n) => /* @__PURE__ */ Q(Ln, {
2734
2735
  layout: "joined",
2735
2736
  value: null,
2736
2737
  onChange: (t) => e.find((e) => e.value === t)?.run(),
2737
2738
  options: e,
2738
2739
  size: t,
2739
2740
  ariaLabel: "Randomize scope",
2740
- className: Bi
2741
+ className: Vi
2741
2742
  }, n));
2742
2743
  }
2743
- var Ki = [
2744
+ var qi = [
2744
2745
  2,
2745
2746
  4,
2746
2747
  8,
@@ -2749,18 +2750,18 @@ var Ki = [
2749
2750
  value: String(e),
2750
2751
  label: `${e}s`
2751
2752
  }));
2752
- function qi({ size: e }) {
2753
+ function Ji({ size: e }) {
2753
2754
  let { loopSeconds: t, setLoopSeconds: n } = d();
2754
2755
  return /* @__PURE__ */ Q(Ln, {
2755
2756
  layout: "joined",
2756
2757
  value: String(t),
2757
2758
  onChange: (e) => n(Number(e)),
2758
- options: Ki,
2759
+ options: qi,
2759
2760
  size: e,
2760
2761
  ariaLabel: "Loop length"
2761
2762
  });
2762
2763
  }
2763
- var Ji = [
2764
+ var Yi = [
2764
2765
  {
2765
2766
  value: "9:16",
2766
2767
  label: "9:16"
@@ -2777,7 +2778,7 @@ var Ji = [
2777
2778
  value: "1:1",
2778
2779
  label: "1:1"
2779
2780
  }
2780
- ], Yi = [
2781
+ ], Xi = [
2781
2782
  {
2782
2783
  value: "5:4",
2783
2784
  label: "5:4"
@@ -2795,20 +2796,20 @@ var Ji = [
2795
2796
  label: "Fill"
2796
2797
  }
2797
2798
  ];
2798
- function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectValue: a, onAspect: s, openEffects: c = !1, rail: l = !1, onRail: u, onSheet: d }) {
2799
+ function Zi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectValue: a, onAspect: s, openEffects: c = !1, rail: l = !1, onRail: u, onSheet: d }) {
2799
2800
  let f = ct(), { updateLayer: p, addFilter: m, removeFilter: g } = o(), { onExportPng: v } = Gt(), [b, S] = Z(!1), [C, w] = Z(!0), [E, D] = Z(!1), [O, k] = Z(!1), [j, ee] = Z("generate"), [te, P] = Z(!1), [F, I] = Z(!1), { aspect: L } = o(), [R, ne] = Z(null), z = _(e);
2800
2801
  Y(() => {
2801
2802
  c && (w(!0), k(!0));
2802
2803
  }, [c]);
2803
2804
  let B = l ? "sm" : "lg", re = l && !!e && C && !b;
2804
2805
  Y(() => (u?.(re), () => u?.(!1)), [re]);
2805
- let U = !l && e && C && !b ? R ? `${R}px` : te ? fi.tall : fi.half : null;
2806
+ let U = !l && e && C && !b ? R ? `${R}px` : te ? pi.tall : pi.half : null;
2806
2807
  Y(() => (d?.(U), () => d?.(null)), [U]);
2807
2808
  let ie = () => {
2808
2809
  let t = e?.type === "loop" && V(e.loopGroup).find((t) => t.id === e.presetId);
2809
2810
  t && p(e.id, pe(t, e.loopGroup));
2810
2811
  };
2811
- if (Hr(ie, () => {
2812
+ if (Ur(ie, () => {
2812
2813
  e?.type === "loop" && p(e.id, h(e, A(K(e.loopId)?.params ?? [], e), z.take(), { withFilters: !0 }));
2813
2814
  }), !e) return null;
2814
2815
  if (b) return /* @__PURE__ */ Q("button", {
@@ -2823,12 +2824,12 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2823
2824
  let t = N(e, z.take());
2824
2825
  t && p(e.id, { filters: t });
2825
2826
  };
2826
- if (!C) return /* @__PURE__ */ $(di, {
2827
+ if (!C) return /* @__PURE__ */ $(fi, {
2827
2828
  label: W ? e.presetLabel : "Media",
2828
2829
  onOpen: () => w(!0),
2829
2830
  size: B,
2830
2831
  children: [
2831
- (W || de.length > 0) && /* @__PURE__ */ Q(Un, {
2832
+ (W || de.length > 0) && /* @__PURE__ */ Q(Wn, {
2832
2833
  label: "Randomize all",
2833
2834
  children: /* @__PURE__ */ Q(J, {
2834
2835
  tone: "primary",
@@ -2839,7 +2840,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2839
2840
  className: "shrink-0"
2840
2841
  })
2841
2842
  }),
2842
- /* @__PURE__ */ Q(Un, {
2843
+ /* @__PURE__ */ Q(Wn, {
2843
2844
  label: "Download",
2844
2845
  children: /* @__PURE__ */ Q(J, {
2845
2846
  tone: "primary",
@@ -2850,7 +2851,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2850
2851
  className: "shrink-0"
2851
2852
  })
2852
2853
  }),
2853
- /* @__PURE__ */ Q(Un, {
2854
+ /* @__PURE__ */ Q(Wn, {
2854
2855
  label: "Hide UI",
2855
2856
  children: /* @__PURE__ */ Q(J, {
2856
2857
  tone: "primary",
@@ -2861,7 +2862,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2861
2862
  className: "shrink-0"
2862
2863
  })
2863
2864
  }),
2864
- /* @__PURE__ */ Q(Un, {
2865
+ /* @__PURE__ */ Q(Wn, {
2865
2866
  label: a === "fill" ? "Back to the frame" : "Fill the screen",
2866
2867
  children: /* @__PURE__ */ Q(J, {
2867
2868
  tone: "primary",
@@ -2875,11 +2876,11 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2875
2876
  })
2876
2877
  ]
2877
2878
  });
2878
- let he = [...W ? Ri : zi, ...W && f.steps.length >= 2 ? [{
2879
+ let he = [...W ? zi : Bi, ...W && f.steps.length >= 2 ? [{
2879
2880
  value: "morph",
2880
2881
  label: "Morph"
2881
2882
  }] : []].filter((e) => (e.value !== "effects" || fe) && (e.value !== "transport" || y("motion"))), ge = he.some((e) => e.value === j) ? j : he[0].value;
2882
- return /* @__PURE__ */ $(Xn, { children: [
2883
+ return /* @__PURE__ */ $(Zn, { children: [
2883
2884
  /* @__PURE__ */ Q(ye, {
2884
2885
  open: F,
2885
2886
  onClose: () => I(!1),
@@ -2887,7 +2888,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2887
2888
  layer: e,
2888
2889
  size: B
2889
2890
  }),
2890
- E && /* @__PURE__ */ Q(ai, {
2891
+ E && /* @__PURE__ */ Q(oi, {
2891
2892
  onPick: (e) => {
2892
2893
  t(e), D(!1);
2893
2894
  },
@@ -2899,7 +2900,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2899
2900
  },
2900
2901
  onDismiss: () => D(!1)
2901
2902
  }),
2902
- O && /* @__PURE__ */ Q(Ii, {
2903
+ O && /* @__PURE__ */ Q(Li, {
2903
2904
  layer: e,
2904
2905
  chain: de,
2905
2906
  onPick: (t) => {
@@ -2909,12 +2910,12 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2909
2910
  }),
2910
2911
  /* @__PURE__ */ $("div", {
2911
2912
  className: l ? "fixed top-0 right-0 bottom-0 z-10 flex w-[var(--kol-sidenav-w,320px)] flex-col overflow-y-auto border-l border-oq-08" : "fixed right-0 left-[var(--fxr-rail,0px)] bottom-0 z-10 flex flex-col pb-[env(safe-area-inset-bottom)]",
2912
- style: l ? Li : {
2913
- ...Li,
2914
- top: `calc(100dvh - ${U ?? fi.half})`
2913
+ style: l ? Ri : {
2914
+ ...Ri,
2915
+ top: `calc(100dvh - ${U ?? pi.half})`
2915
2916
  },
2916
2917
  children: [
2917
- !l && /* @__PURE__ */ Q(mi, {
2918
+ !l && /* @__PURE__ */ Q(hi, {
2918
2919
  tall: te,
2919
2920
  onToggle: () => {
2920
2921
  ne(null), P((e) => !e);
@@ -2924,7 +2925,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2924
2925
  e < 96 && (ne(null), w(!1));
2925
2926
  }
2926
2927
  }),
2927
- /* @__PURE__ */ Q(ui, {
2928
+ /* @__PURE__ */ Q(di, {
2928
2929
  title: ae,
2929
2930
  onCollapse: () => w(!1),
2930
2931
  className: l ? "px-4 pt-2.5 pb-1.5" : "px-3",
@@ -2945,9 +2946,9 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2945
2946
  onChange: ee,
2946
2947
  options: he,
2947
2948
  size: B,
2948
- className: l ? Bi : "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-2 [&_.kol-seg-cell]:overflow-hidden"
2949
+ className: l ? Vi : "[&_.kol-seg-cell]:min-w-0 [&_.kol-seg-cell]:px-2 [&_.kol-seg-cell]:overflow-hidden"
2949
2950
  }),
2950
- ge === "morph" && W && /* @__PURE__ */ Q(kr, {
2951
+ ge === "morph" && W && /* @__PURE__ */ Q(Ar, {
2951
2952
  layer: e,
2952
2953
  readOnly: !0
2953
2954
  }),
@@ -2979,7 +2980,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2979
2980
  onClick: ce,
2980
2981
  children: "Randomize all"
2981
2982
  }),
2982
- /* @__PURE__ */ Q(Un, {
2983
+ /* @__PURE__ */ Q(Wn, {
2983
2984
  label: "What Randomize all rolls",
2984
2985
  children: /* @__PURE__ */ Q(J, {
2985
2986
  tone: "primary",
@@ -2990,7 +2991,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
2990
2991
  className: "shrink-0"
2991
2992
  })
2992
2993
  }),
2993
- /* @__PURE__ */ Q(Un, {
2994
+ /* @__PURE__ */ Q(Wn, {
2994
2995
  label: "Reset to defaults",
2995
2996
  shortcut: "R",
2996
2997
  children: /* @__PURE__ */ Q(J, {
@@ -3004,7 +3005,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
3004
3005
  })
3005
3006
  ]
3006
3007
  }),
3007
- se.length > 0 && /* @__PURE__ */ Q(Gi, {
3008
+ se.length > 0 && /* @__PURE__ */ Q(Ki, {
3008
3009
  size: B,
3009
3010
  cells: [...se.map((e) => ({
3010
3011
  value: e.id,
@@ -3062,7 +3063,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
3062
3063
  iconRight: "trash",
3063
3064
  onClick: () => g(e.id, n),
3064
3065
  children: `${n + 1}. ${t.def?.label ?? t.id}`
3065
- }), i.length > 0 && /* @__PURE__ */ Q(Gi, {
3066
+ }), i.length > 0 && /* @__PURE__ */ Q(Ki, {
3066
3067
  size: B,
3067
3068
  cells: i.map((e) => ({
3068
3069
  value: e.id,
@@ -3078,7 +3079,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
3078
3079
  children: [(() => {
3079
3080
  let e = y("motion").TransportBar;
3080
3081
  return /* @__PURE__ */ Q(e, { size: B });
3081
- })(), /* @__PURE__ */ Q(qi, { size: B })]
3082
+ })(), /* @__PURE__ */ Q(Ji, { size: B })]
3082
3083
  }),
3083
3084
  ge === "output" && /* @__PURE__ */ $("div", {
3084
3085
  className: "flex flex-col gap-2 pt-3",
@@ -3087,7 +3088,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
3087
3088
  layout: "joined",
3088
3089
  value: a,
3089
3090
  onChange: s,
3090
- options: Ji,
3091
+ options: Yi,
3091
3092
  size: B,
3092
3093
  ariaLabel: "Aspect"
3093
3094
  }),
@@ -3095,7 +3096,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
3095
3096
  layout: "joined",
3096
3097
  value: a,
3097
3098
  onChange: s,
3098
- options: Yi,
3099
+ options: Xi,
3099
3100
  size: B,
3100
3101
  ariaLabel: "Aspect (landscape) and fill"
3101
3102
  }),
@@ -3138,7 +3139,7 @@ function Xi({ layer: e, onSwitchCategory: t, onInsert: r, onRestart: i, aspectVa
3138
3139
  }
3139
3140
  //#endregion
3140
3141
  //#region src/editor/mobile/MobileView.jsx
3141
- function Zi({ onGenerate: e, onEffects: t, chromes: n }) {
3142
+ function Qi({ onGenerate: e, onEffects: t, chromes: n }) {
3142
3143
  return /* @__PURE__ */ Q("div", {
3143
3144
  className: "fixed inset-y-0 right-0 left-[var(--fxr-rail,0px)] kol-overlay-scrim flex flex-col items-center justify-center p-6",
3144
3145
  style: { zIndex: "var(--kol-z-modal)" },
@@ -3210,7 +3211,7 @@ function Zi({ onGenerate: e, onEffects: t, chromes: n }) {
3210
3211
  })
3211
3212
  });
3212
3213
  }
3213
- function Qi() {
3214
+ function $i() {
3214
3215
  let { layers: t, addLayer: r, removeLayer: i, updateLayer: a, canvasW: s, canvasH: c, aspect: l, setAspect: u } = o(), { setTool: d } = Mt(), f = zt() && !Tn(), p = vn(), m = () => {
3215
3216
  let e = new URLSearchParams(window.location.search);
3216
3217
  return e.get("open") ? "live" : e.get("start") === "category" ? "category" : "entry";
@@ -3271,7 +3272,7 @@ function Qi() {
3271
3272
  let t = M.current;
3272
3273
  t && t.id === e.pointerId && e.type === "pointerup" && h === "live" && performance.now() - t.t < 350 && Math.hypot(e.clientX - t.x, e.clientY - t.y) < 12 && (I?.type === "loop" ? K(I.loopId) : null)?.group !== "penrose" && n.toggle(), t?.id === e.pointerId && (M.current = null), A.current.pts.delete(e.pointerId), A.current.pts.size < 2 && A.current.start && (A.current.start = null, O(A.current.live));
3273
3274
  };
3274
- nr(), Y(() => (on("randomiser"), () => on(null)), []), Y(() => {
3275
+ rr(), Y(() => (on("randomiser"), () => on(null)), []), Y(() => {
3275
3276
  u("4:5"), d("orbit");
3276
3277
  }, []);
3277
3278
  let I = t.find((e) => e.id === y) ?? (t.length === 1 ? t[0] : null), L = h === "live" && I?.type === "photo" && !I.src && I.srcType !== "webcam";
@@ -3347,19 +3348,19 @@ function Qi() {
3347
3348
  onPointerLeave: F,
3348
3349
  children: /* @__PURE__ */ Q(an, { fit: x })
3349
3350
  }),
3350
- h === "entry" && /* @__PURE__ */ Q(Zi, {
3351
+ h === "entry" && /* @__PURE__ */ Q(Qi, {
3351
3352
  chromes: f,
3352
3353
  onGenerate: () => g("category"),
3353
3354
  onEffects: () => {
3354
3355
  v(!0), z();
3355
3356
  }
3356
3357
  }),
3357
- h === "category" && /* @__PURE__ */ Q(ai, {
3358
+ h === "category" && /* @__PURE__ */ Q(oi, {
3358
3359
  onPick: R,
3359
3360
  onInsert: z,
3360
3361
  onBack: () => g("entry")
3361
3362
  }),
3362
- h === "live" && !L && /* @__PURE__ */ Q(Xi, {
3363
+ h === "live" && !L && /* @__PURE__ */ Q(Zi, {
3363
3364
  layer: I,
3364
3365
  onSwitchCategory: ne,
3365
3366
  onInsert: () => {
@@ -3378,7 +3379,7 @@ function Qi() {
3378
3379
  style: { zIndex: "var(--kol-z-modal)" },
3379
3380
  children: [/* @__PURE__ */ Q("div", {
3380
3381
  className: "flex-1 min-h-0",
3381
- children: /* @__PURE__ */ Q(ci, { layer: I })
3382
+ children: /* @__PURE__ */ Q(li, { layer: I })
3382
3383
  }), /* @__PURE__ */ Q("div", {
3383
3384
  className: "flex justify-center pb-[max(0.75rem,env(safe-area-inset-bottom))]",
3384
3385
  children: /* @__PURE__ */ Q(J, {
@@ -3392,25 +3393,28 @@ function Qi() {
3392
3393
  ]
3393
3394
  });
3394
3395
  }
3395
- function $i() {
3396
+ function ea() {
3396
3397
  return /* @__PURE__ */ $(hn, {
3397
3398
  persistDraft: !1,
3398
- children: [/* @__PURE__ */ Q(Qi, {}), /* @__PURE__ */ Q(dn, {})]
3399
+ children: [/* @__PURE__ */ Q($i, {}), /* @__PURE__ */ Q(dn, {})]
3399
3400
  });
3400
3401
  }
3401
3402
  //#endregion
3402
3403
  //#region src/editor/float/Movable.jsx
3403
- var ea = "button, a, input, select, textarea, [role=button], [role=tab], [role=slider]", ta = (e, t) => Math.max(0, Math.min(e, t));
3404
- function na({ id: e, start: t = {
3404
+ var ta = "button, a, input, select, textarea, [role=button], [role=tab], [role=slider]", na = (e, t) => Math.max(0, Math.min(e, t));
3405
+ function ra({ id: e, start: t = {
3405
3406
  right: 24,
3406
3407
  bottom: 24
3407
3408
  }, onMoved: n, className: r = "", children: i }) {
3408
3409
  let a = `kol-float-pos:${e}`, o = JSON.stringify(t), [s, c] = Z(() => {
3409
3410
  try {
3410
3411
  let e = JSON.parse(localStorage.getItem(a));
3411
- return e?.start === o ? {
3412
+ return e?.start === o ? e.right == null ? {
3412
3413
  left: e.left,
3413
3414
  top: e.top
3415
+ } : {
3416
+ right: e.right,
3417
+ bottom: e.bottom
3414
3418
  } : null;
3415
3419
  } catch {
3416
3420
  return null;
@@ -3421,14 +3425,16 @@ function na({ id: e, start: t = {
3421
3425
  }, [!!s]), /* @__PURE__ */ Q("div", {
3422
3426
  ref: l,
3423
3427
  onPointerDown: (e) => {
3424
- if (e.button !== 0 || e.target.closest(ea)) return;
3428
+ if (e.button !== 0 || e.target.closest(ta)) return;
3425
3429
  let t = l.current, n = t.getBoundingClientRect(), r = t.offsetParent.getBoundingClientRect(), i = e.clientX - n.left, s = e.clientY - n.top, u = null;
3426
3430
  t.setPointerCapture(e.pointerId);
3427
3431
  let d = (t) => {
3428
- !u && Math.hypot(t.clientX - e.clientX, t.clientY - e.clientY) < 4 || (u = {
3429
- left: ta(t.clientX - r.left - i, r.width - n.width),
3430
- top: ta(t.clientY - r.top - s, r.height - n.height)
3431
- }, c(u));
3432
+ if (!u && Math.hypot(t.clientX - e.clientX, t.clientY - e.clientY) < 4) return;
3433
+ let a = na(t.clientX - r.left - i, r.width - n.width), o = na(t.clientY - r.top - s, r.height - n.height);
3434
+ u = {
3435
+ right: r.width - a - n.width,
3436
+ bottom: r.height - o - n.height
3437
+ }, c(u);
3432
3438
  }, f = () => {
3433
3439
  if (t.removeEventListener("pointermove", d), t.removeEventListener("pointerup", f), t.removeEventListener("pointercancel", f), u) try {
3434
3440
  localStorage.setItem(a, JSON.stringify({
@@ -3441,7 +3447,7 @@ function na({ id: e, start: t = {
3441
3447
  },
3442
3448
  style: s ?? t,
3443
3449
  onDoubleClick: (e) => {
3444
- if (!e.target.closest(ea)) {
3450
+ if (!e.target.closest(ta)) {
3445
3451
  c(null);
3446
3452
  try {
3447
3453
  localStorage.removeItem(a);
@@ -3454,7 +3460,7 @@ function na({ id: e, start: t = {
3454
3460
  }
3455
3461
  //#endregion
3456
3462
  //#region src/editor/labs/FloatLabs.jsx
3457
- function ra() {
3463
+ function ia() {
3458
3464
  let { addFilter: e, patchFilter: t } = o(), { layer: n, setOnly: r } = _e(), i = X(null);
3459
3465
  Y(() => {
3460
3466
  n?.type === "photo" && n.src && (i.current = {
@@ -3468,7 +3474,7 @@ function ra() {
3468
3474
  n?.srcType,
3469
3475
  n?.fit
3470
3476
  ]);
3471
- let a = Tr({
3477
+ let a = Er({
3472
3478
  layer: n,
3473
3479
  setOnly: r,
3474
3480
  addFilter: e,
@@ -3482,7 +3488,7 @@ function ra() {
3482
3488
  return a.forEach((e) => {
3483
3489
  if (e.id.startsWith("sec:")) {
3484
3490
  s.push({
3485
- icon: xr[e.id.slice(4)] ?? "square",
3491
+ icon: Sr[e.id.slice(4)] ?? "square",
3486
3492
  label: e.label,
3487
3493
  path: e.id,
3488
3494
  sub: []
@@ -3503,7 +3509,7 @@ function ra() {
3503
3509
  pick: (e) => c.get(e)?.()
3504
3510
  };
3505
3511
  }
3506
- function ia() {
3512
+ function aa() {
3507
3513
  let { layer: e } = _e(), { removeLayer: t } = o(), n = e?.type === "photo" && !e.src && e.srcType !== "webcam";
3508
3514
  return /* @__PURE__ */ $("div", {
3509
3515
  className: "kol-float-labs-stage absolute inset-0 flex items-center justify-center overflow-hidden bg-surface-primary",
@@ -3514,16 +3520,16 @@ function ia() {
3514
3520
  height: "85%"
3515
3521
  },
3516
3522
  children: /* @__PURE__ */ Q(tn, {})
3517
- }), n && /* @__PURE__ */ Q(li, {
3523
+ }), n && /* @__PURE__ */ Q(ui, {
3518
3524
  layer: e,
3519
- title: _i(e).title,
3525
+ title: vi(e).title,
3520
3526
  onBack: () => t(e.id)
3521
3527
  })]
3522
3528
  });
3523
3529
  }
3524
- function aa() {
3525
- Bt(), Mi();
3526
- let e = Gn("(max-width: 767px)"), { layer: t } = _e(), { selectedId: n, select: r } = o();
3530
+ function oa() {
3531
+ Bt(), Ni();
3532
+ let e = Kn("(max-width: 767px)"), { layer: t } = _e(), { selectedId: n, select: r } = o();
3527
3533
  Y(() => {
3528
3534
  t && n !== t.id && r(t.id);
3529
3535
  }, [
@@ -3531,92 +3537,108 @@ function aa() {
3531
3537
  n,
3532
3538
  r
3533
3539
  ]);
3534
- let i = ra(), a = t ? _i(t).title : "Labs", s = i.items.filter((e) => e.sub?.length).map((e) => e.path), [c, l] = Z(e), [u, d] = Z(e), [f, p] = Z(!1), [m, h] = Z(!1);
3540
+ let i = ia(), { title: a, kind: s } = t ? vi(t) : { title: "Labs" }, c = i.items.filter((e) => e.sub?.length).map((e) => e.path), [l, u] = Z(e), [d, f] = Z(e), [p, m] = Z(!1), [h, g] = Z(!1);
3535
3541
  return /* @__PURE__ */ $("div", {
3536
3542
  className: "kol-float-labs kol-editor-shell relative h-dvh overflow-hidden",
3537
3543
  "data-editor-keep-selection": !0,
3538
3544
  children: [
3539
- /* @__PURE__ */ Q(ia, {}),
3540
- u ? /* @__PURE__ */ Q(er, {
3545
+ /* @__PURE__ */ Q(aa, {}),
3546
+ d ? /* @__PURE__ */ Q(tr, {
3541
3547
  items: i.items,
3542
3548
  currentPath: i.active ?? "",
3543
3549
  onNavigate: i.pick,
3544
3550
  title: "Labs",
3545
3551
  breadcrumb: ["Labs", a],
3546
- onRestore: () => d(!1),
3552
+ onRestore: () => f(!1),
3547
3553
  className: "absolute left-6 top-6 z-[var(--kol-z-sticky)]"
3548
- }) : /* @__PURE__ */ Q(Bn, {
3554
+ }) : /* @__PURE__ */ Q(Vn, {
3549
3555
  variant: "float",
3550
3556
  items: i.items,
3551
3557
  currentPath: i.active ?? "",
3552
3558
  onNavigate: i.pick,
3553
3559
  title: "Labs",
3554
3560
  icon: "globe",
3555
- defaultExpanded: s,
3556
- collapsed: c,
3557
- onCollapsedChange: l,
3558
- onHide: () => d(!0),
3561
+ defaultExpanded: c,
3562
+ collapsed: l,
3563
+ onCollapsedChange: u,
3564
+ onHide: () => f(!0),
3559
3565
  collapsibleV: !0,
3560
- collapsedV: m,
3561
- onCollapseV: h,
3562
- footer: c ? void 0 : /* @__PURE__ */ Q($n, {
3563
- onCollapse: () => l(!0),
3564
- onHide: () => d(!0)
3566
+ collapsedV: h,
3567
+ onCollapseV: g,
3568
+ footer: l ? void 0 : /* @__PURE__ */ Q(er, {
3569
+ onCollapse: () => u(!0),
3570
+ onHide: () => f(!0)
3565
3571
  }),
3566
- className: `absolute left-6 top-6 z-[var(--kol-z-sticky)] ${m && !c ? "" : "bottom-6 !h-auto"}`
3572
+ className: `absolute left-6 top-6 z-[var(--kol-z-sticky)] ${h && !l ? "" : "bottom-6 !h-auto"}`
3567
3573
  }),
3568
- !e && /* @__PURE__ */ Q(na, {
3574
+ !e && /* @__PURE__ */ Q(ra, {
3569
3575
  id: "labs-transport",
3570
3576
  start: {
3571
3577
  right: 24,
3572
3578
  bottom: 24
3573
3579
  },
3574
- onMoved: p,
3575
- children: /* @__PURE__ */ Q(cn, {})
3580
+ onMoved: m,
3581
+ children: /* @__PURE__ */ Q(cn, { collapsibleH: !0 })
3576
3582
  }),
3577
3583
  /* @__PURE__ */ Q("div", {
3578
- className: `absolute ${e ? "left-6 right-6 top-[88px]" : "top-6 right-6"} ${!e && !f ? "bottom-24" : "bottom-6"} z-[var(--kol-z-sticky)] flex flex-col pointer-events-none [&>*]:pointer-events-auto`,
3579
- children: /* @__PURE__ */ Q(Qn, {
3580
- title: a || "Parameters",
3584
+ className: `absolute ${e ? "left-6 right-6 top-[88px]" : "top-6 right-6"} ${!e && !p ? "bottom-24" : "bottom-6"} z-[var(--kol-z-sticky)] flex flex-col pointer-events-none [&>*]:pointer-events-auto`,
3585
+ children: /* @__PURE__ */ Q($n, {
3581
3586
  wide: !0,
3582
3587
  width: e ? "100%" : void 0,
3583
3588
  density: "compact",
3584
3589
  surface: "solid",
3585
- collapsibleV: !0,
3586
- defaultCollapsedV: e,
3587
- className: "max-h-full min-h-0 [&_.kol-compose-inspector-body]:!p-0",
3588
- sections: [{
3589
- id: "labs-params",
3590
- label: "Parameters",
3591
- rows: [{
3592
- id: "body",
3593
- render: () => /* @__PURE__ */ Q("div", {
3590
+ className: "max-h-full",
3591
+ windows: [
3592
+ {
3593
+ id: "params",
3594
+ title: a || "Labs",
3595
+ kind: s,
3596
+ defaultCollapsedV: e,
3597
+ className: "[&_.kol-compose-inspector-body]:!p-0",
3598
+ children: t ? /* @__PURE__ */ Q("div", {
3594
3599
  className: "kol-editor-labs",
3595
3600
  children: /* @__PURE__ */ Q("div", {
3596
3601
  className: "kol-compose-inspector-body",
3597
- children: /* @__PURE__ */ Q(ri, {})
3602
+ children: /* @__PURE__ */ Q(ii, {})
3598
3603
  })
3604
+ }) : /* @__PURE__ */ Q(zn, {
3605
+ variant: "float",
3606
+ label: "Parameters"
3599
3607
  })
3600
- }]
3601
- }],
3602
- footer: /* @__PURE__ */ Q("div", {
3603
- className: "kol-editor-labs",
3604
- children: /* @__PURE__ */ Q(sn, {})
3605
- })
3608
+ },
3609
+ {
3610
+ id: "output",
3611
+ title: "Output",
3612
+ defaultCollapsedV: e,
3613
+ children: /* @__PURE__ */ Q("div", {
3614
+ className: "kol-editor-labs",
3615
+ children: /* @__PURE__ */ Q(sn, { part: "output" })
3616
+ })
3617
+ },
3618
+ {
3619
+ id: "file",
3620
+ title: "File",
3621
+ defaultCollapsedV: e,
3622
+ children: /* @__PURE__ */ Q("div", {
3623
+ className: "kol-editor-labs",
3624
+ children: /* @__PURE__ */ Q(sn, { part: "file" })
3625
+ })
3626
+ }
3627
+ ]
3606
3628
  })
3607
3629
  })
3608
3630
  ]
3609
3631
  });
3610
3632
  }
3611
- function oa() {
3633
+ function sa() {
3612
3634
  return /* @__PURE__ */ Q(g.Provider, {
3613
3635
  value: "float",
3614
3636
  children: /* @__PURE__ */ $(hn, {
3615
- draftKey: Pi,
3637
+ draftKey: Fi,
3616
3638
  modalVariant: "float",
3617
- children: [/* @__PURE__ */ Q(aa, {}), /* @__PURE__ */ Q(dn, {})]
3639
+ children: [/* @__PURE__ */ Q(oa, {}), /* @__PURE__ */ Q(dn, {})]
3618
3640
  })
3619
3641
  });
3620
3642
  }
3621
3643
  //#endregion
3622
- export { Lt as AppSettingsSections, Pt as BRAND, On as DesignEditor, On as default, fn as DisplaySettingsDrawer, hn as EditorProviders, Ot as FilesDialog, _n as FloatDesignEditor, oa as FloatLabsView, Ge as GeneratorLibraryProvider, Pi as LABS_DRAFT_KEY, qe as LIBRARY_SLOT_KEYS, Fi as LabsView, un as MODES, $i as MobileView, tn as OutputCanvas, an as OutputStage, xn as OutputView, $t as RAIL_EXTRA_PREFIX, yt as TimelineRail, Xe as UnauthorizedError, bn as VIEW_PATHS, Ft as closeFiles, In as comboLabel, wn as copyStored, Dn as currentView, ln as duplicateStored, Be as getLibraryApi, Le as inviteFromRequest, zt as isMobileDevice, Me as listInviteRequests, Ke as loadLibrary, Ye as mintInvite, It as openFiles, He as readLibraryRaw, te as registerPack, Xt as removeStored, yn as renameStored, Re as requestInvite, Pe as setLibraryApi, Pn as setMediaClient, Vt as setMediaProxyBase, nn as setMode, Sn as setNavigator, pn as setRailExtras, i as setSettingsStore, En as setThumbStored, rn as setWantsDesktop, Wt as shortcutsBySection, Ne as signInLibrary, Ie as signOutLibrary, We as signUpLibrary, ze as subscribeLibrary, bt as timelineView, je as updateAccount, Ue as useAccount, Rt as useFilesDialog, Je as useGeneratorLibrary, Fe as useLibrarySession, An as useRailExtras, Ct as useSettingsSections, Tn as wantsDesktop, gn as withView };
3644
+ export { Lt as AppSettingsSections, Pt as BRAND, On as DesignEditor, On as default, fn as DisplaySettingsDrawer, hn as EditorProviders, Ot as FilesDialog, _n as FloatDesignEditor, sa as FloatLabsView, Ge as GeneratorLibraryProvider, Fi as LABS_DRAFT_KEY, qe as LIBRARY_SLOT_KEYS, Ii as LabsView, un as MODES, ea as MobileView, tn as OutputCanvas, an as OutputStage, xn as OutputView, $t as RAIL_EXTRA_PREFIX, yt as TimelineRail, Xe as UnauthorizedError, bn as VIEW_PATHS, Ft as closeFiles, In as comboLabel, wn as copyStored, Dn as currentView, ln as duplicateStored, Be as getLibraryApi, Le as inviteFromRequest, zt as isMobileDevice, Me as listInviteRequests, Ke as loadLibrary, Ye as mintInvite, It as openFiles, He as readLibraryRaw, te as registerPack, Xt as removeStored, yn as renameStored, Re as requestInvite, Pe as setLibraryApi, Pn as setMediaClient, Vt as setMediaProxyBase, nn as setMode, Sn as setNavigator, pn as setRailExtras, i as setSettingsStore, En as setThumbStored, rn as setWantsDesktop, Wt as shortcutsBySection, Ne as signInLibrary, Ie as signOutLibrary, We as signUpLibrary, ze as subscribeLibrary, bt as timelineView, je as updateAccount, Ue as useAccount, Rt as useFilesDialog, Je as useGeneratorLibrary, Fe as useLibrarySession, An as useRailExtras, Ct as useSettingsSections, Tn as wantsDesktop, gn as withView };