@kolkrabbi/design-editor 0.14.0 → 0.16.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,21 +1,22 @@
1
- import { Bt as e, C as t, M as n, b as r, ft as i, gt as a, h as o, ht as s, j as c, l, mt as u, n as d, p as f, pt as p, t as m, tn as h, u as g } from "./EditorIcon-BbFMmc1G.js";
2
- import { _, a as v, d as y, f as b, g as x, h as S, i as ee, l as C, m as w, p as te, r as ne, s as T, u as E, y as D } from "./TreePicker-DlEXH2kw.js";
3
- import { t as re } from "./labels-B10g9Um5.js";
4
- import { Button as O, Dropdown as ie, Input as ae, LabeledControl as k, MenuDropdownItem as oe, PopoverPanel as se, SegmentedToggle as A, Slider as j, Textarea as ce, ToggleCheckbox as le, ViewToggle as ue, usePopover as de } from "@kolkrabbi/kol-component";
5
- import { Fragment as fe, useEffect as pe, useMemo as me, useRef as M, useState as N } from "react";
6
- import { Fragment as he, jsx as P, jsxs as F } from "react/jsx-runtime";
1
+ import { A as e, It as t, S as n, Zt as r, c as i, ct as a, dt as o, f as s, ft as c, j as l, l as u, lt as d, m as f, t as p, ut as m, y as h } from "./rolls-CkmuE-Ya.js";
2
+ import { _ as g, a as _, d as v, f as y, g as b, h as x, i as S, l as C, m as w, p as ee, r as te, s as ne, u as T, y as E } from "./TreePicker-D5XZT0Zi.js";
3
+ import { t as D } from "./labels-B10g9Um5.js";
4
+ import { Button as O, Dropdown as re, Input as ie, LabeledControl as ae, MenuDropdownItem as oe, PopoverPanel as se, SegmentedToggle as k, Slider as A, Textarea as ce, TimelineDock as le, ToggleCheckbox as ue, Tooltip as j, ViewToggle as de, glyphSize as fe, usePopover as pe } from "@kolkrabbi/kol-component";
5
+ import { Fragment as me, useEffect as he, useMemo as ge, useRef as _e, useState as M } from "react";
6
+ import { Fragment as ve, jsx as N, jsxs as P } from "react/jsx-runtime";
7
+ import { Icon as F } from "@kolkrabbi/kol-icons";
7
8
  //#region src/kinetic/paths.js
8
- var ge = Math.PI * 2, I = (e) => Math.round(e * 100) / 100;
9
- function _e(e) {
9
+ var ye = Math.PI * 2, I = (e) => Math.round(e * 100) / 100;
10
+ function be(e) {
10
11
  return e.map((e, t) => `${t === 0 ? "M" : "L"} ${I(e[0])} ${I(e[1])}`).join(" ");
11
12
  }
12
- var ve = [
13
+ var xe = [
13
14
  [.12, .55],
14
15
  [.37, .32],
15
16
  [.63, .68],
16
17
  [.88, .45]
17
18
  ];
18
- function ye(e, t, n) {
19
+ function Se(e, t, n) {
19
20
  let r = e.map(([e, r]) => [e * t, r * n]);
20
21
  if (r.length < 2) return `M ${I(t / 2)} ${I(n / 2)} L ${I(t / 2 + 1)} ${I(n / 2)}`;
21
22
  let i = `M ${I(r[0][0])} ${I(r[0][1])}`;
@@ -25,7 +26,7 @@ function ye(e, t, n) {
25
26
  }
26
27
  return i;
27
28
  }
28
- var be = (e) => e === "array", xe = (e) => e === "radial", L = (e) => e === "rings", Se = {
29
+ var L = (e) => e === "array", Ce = (e) => e === "radial", we = (e) => e === "rings", Te = {
29
30
  amp: .4,
30
31
  freq: 2,
31
32
  turns: 3,
@@ -38,8 +39,8 @@ var be = (e) => e === "array", xe = (e) => e === "radial", L = (e) => e === "rin
38
39
  twist: .5,
39
40
  grow: .6
40
41
  };
41
- function Ce(e, t, n, r = {}) {
42
- let i = t / 2, a = n / 2, o = Math.min(t, n) * .12, s = r.amp ?? Se.amp, c = Math.max(1, Math.round(r.freq ?? Se.freq)), l = Math.max(1, Math.round(r.turns ?? Se.turns)), u = r.radius ?? Se.radius;
42
+ function Ee(e, t, n, r = {}) {
43
+ let i = t / 2, a = n / 2, o = Math.min(t, n) * .12, s = r.amp ?? Te.amp, c = Math.max(1, Math.round(r.freq ?? Te.freq)), l = Math.max(1, Math.round(r.turns ?? Te.turns)), u = r.radius ?? Te.radius;
43
44
  switch (e) {
44
45
  case "arc": {
45
46
  let e = n * .62, r = e - s * n * .7;
@@ -66,21 +67,21 @@ function Ce(e, t, n, r = {}) {
66
67
  let e = [];
67
68
  for (let r = 0; r <= 120; r++) {
68
69
  let i = r / 120;
69
- e.push([o + i * (t - 2 * o), a + s * n * .32 * Math.sin(i * c * ge)]);
70
+ e.push([o + i * (t - 2 * o), a + s * n * .32 * Math.sin(i * c * ye)]);
70
71
  }
71
72
  return {
72
- d: _e(e),
73
+ d: be(e),
73
74
  closed: !1
74
75
  };
75
76
  }
76
77
  case "spiral": {
77
78
  let e = Math.min(t, n) * .45 * u, r = [];
78
79
  for (let t = 0; t <= 420; t++) {
79
- let n = t / 420, o = n * l * ge, s = n * e;
80
+ let n = t / 420, o = n * l * ye, s = n * e;
80
81
  r.push([i + Math.cos(o) * s, a + Math.sin(o) * s]);
81
82
  }
82
83
  return {
83
- d: _e(r),
84
+ d: be(r),
84
85
  closed: !1
85
86
  };
86
87
  }
@@ -91,12 +92,12 @@ function Ce(e, t, n, r = {}) {
91
92
  r.push([o + c * (t - 2 * o), a + (i % 2 == 0 ? -1 : 1) * s * n * .28]);
92
93
  }
93
94
  return {
94
- d: _e(r),
95
+ d: be(r),
95
96
  closed: !1
96
97
  };
97
98
  }
98
99
  case "custom": return {
99
- d: ye(Array.isArray(r.points) && r.points.length >= 2 ? r.points : ve, t, n),
100
+ d: Se(Array.isArray(r.points) && r.points.length >= 2 ? r.points : xe, t, n),
100
101
  closed: !1
101
102
  };
102
103
  default: {
@@ -110,7 +111,7 @@ function Ce(e, t, n, r = {}) {
110
111
  }
111
112
  //#endregion
112
113
  //#region src/kinetic/presets.js
113
- var we = "#0b0d12", Te = "#e8e4dc", R = {
114
+ var De = "#0b0d12", Oe = "#e8e4dc", R = {
114
115
  text: "Kinetic",
115
116
  font: "gullhamrar",
116
117
  fontSize: 120,
@@ -133,7 +134,7 @@ var we = "#0b0d12", Te = "#e8e4dc", R = {
133
134
  showPath: !1,
134
135
  path: {
135
136
  type: "line",
136
- ...Se
137
+ ...Te
137
138
  },
138
139
  motion: {
139
140
  mode: "none",
@@ -161,12 +162,12 @@ var we = "#0b0d12", Te = "#e8e4dc", R = {
161
162
  }
162
163
  }
163
164
  };
164
- function Ee(e, t = {}) {
165
- let n = y(e), r = E(n);
165
+ function ke(e, t = {}) {
166
+ let n = v(e), r = T(n);
166
167
  for (let e of n.axes) t[e.tag] != null && (r[e.tag] = t[e.tag]);
167
168
  return r;
168
169
  }
169
- function De(e = {}, t = 0) {
170
+ function Ae(e = {}, t = 0) {
170
171
  let n = {
171
172
  id: e.id || `i${t}`,
172
173
  ...R,
@@ -194,21 +195,21 @@ function De(e = {}, t = 0) {
194
195
  vf2: { ...e.morph?.vf2 || {} }
195
196
  }
196
197
  };
197
- return n.vf = Ee(n.font, e.vf), n;
198
+ return n.vf = ke(n.font, e.vf), n;
198
199
  }
199
200
  var z = (e) => ({
200
- bg: we,
201
- instances: [De({
201
+ bg: De,
202
+ instances: [Ae({
202
203
  font: "rot",
203
- fill: Te,
204
+ fill: Oe,
204
205
  ...e
205
206
  }, 0)]
206
- }), Oe = "#16202E", B = (...e) => ({
207
- bg: Oe,
208
- instances: e.map((e, t) => De(e, t))
209
- }), ke = (e, ...t) => ({
207
+ }), je = "#16202E", B = (...e) => ({
208
+ bg: je,
209
+ instances: e.map((e, t) => Ae(e, t))
210
+ }), Me = (e, ...t) => ({
210
211
  bg: e,
211
- instances: t.map((e, t) => De(e, t))
212
+ instances: t.map((e, t) => Ae(e, t))
212
213
  }), V = [
213
214
  {
214
215
  id: "sunburst",
@@ -672,7 +673,7 @@ var z = (e) => ({
672
673
  id: "baseline-light",
673
674
  label: "On paper",
674
675
  sub: "Lines",
675
- comp: ke("#f4f1ea", {
676
+ comp: Me("#f4f1ea", {
676
677
  text: "Reykjavik",
677
678
  font: "malromur",
678
679
  fontSize: 130,
@@ -1010,7 +1011,7 @@ var z = (e) => ({
1010
1011
  id: "malromur-heavy",
1011
1012
  label: "Heavy swing",
1012
1013
  sub: "Weight",
1013
- comp: ke("#f4f1ea", {
1014
+ comp: Me("#f4f1ea", {
1014
1015
  text: "Malromur",
1015
1016
  font: "malromur",
1016
1017
  fontSize: 130,
@@ -1926,7 +1927,7 @@ var z = (e) => ({
1926
1927
  id: "grid-and-ring",
1927
1928
  label: "Grid + ring",
1928
1929
  sub: "Composite",
1929
- comp: ke("#0a0b14", {
1930
+ comp: Me("#0a0b14", {
1930
1931
  id: "a",
1931
1932
  text: "echo",
1932
1933
  font: "rot",
@@ -1961,24 +1962,24 @@ var z = (e) => ({
1961
1962
  }
1962
1963
  })
1963
1964
  }
1964
- ], Ae = (e) => V.find((t) => t.id === e) || V[0], je = [
1965
+ ], Ne = (e) => V.find((t) => t.id === e) || V[0], Pe = [
1965
1966
  "Radial",
1966
1967
  "Rings",
1967
1968
  "Path"
1968
- ], Me = [{
1969
+ ], Fe = [{
1969
1970
  label: "Type",
1970
- subs: je
1971
+ subs: Pe
1971
1972
  }, {
1972
1973
  label: "Kinetic",
1973
- subs: [...new Set(V.map((e) => e.sub))].filter((e) => !je.includes(e))
1974
- }], Ne = (e) => structuredClone(e.comp), H = {
1974
+ subs: [...new Set(V.map((e) => e.sub))].filter((e) => !Pe.includes(e))
1975
+ }], Ie = (e) => structuredClone(e.comp), H = {
1975
1976
  dLen: 0,
1976
1977
  dNormal: 0,
1977
1978
  scale: 1,
1978
1979
  dRot: 0,
1979
1980
  opacity: 1,
1980
1981
  vf: null
1981
- }, Pe = {
1982
+ }, Le = {
1982
1983
  none: () => H,
1983
1984
  march: (e) => ({
1984
1985
  ...H,
@@ -1989,79 +1990,79 @@ var z = (e) => ({
1989
1990
  dLen: e.u * e.pathLen * Math.max(1, Math.round(e.m.cycles || 1))
1990
1991
  }),
1991
1992
  vfwave: (e) => {
1992
- let t = Math.max(1, Math.round(e.m.cycles || 1)), n = .5 + .5 * Math.sin(e.u * x * t - e.i * (e.m.phase ?? .5));
1993
+ let t = Math.max(1, Math.round(e.m.cycles || 1)), n = .5 + .5 * Math.sin(e.u * b * t - e.i * (e.m.phase ?? .5));
1993
1994
  return {
1994
1995
  ...H,
1995
- vf: { [e.axisTag]: D(e.axisMin, e.axisMax, n) }
1996
+ vf: { [e.axisTag]: E(e.axisMin, e.axisMax, n) }
1996
1997
  };
1997
1998
  },
1998
1999
  glyphwave: (e) => {
1999
- let t = Math.max(1, Math.round(e.m.cycles || 1)), n = Math.sin(e.u * x * t - e.i * (e.m.phase ?? .5));
2000
+ let t = Math.max(1, Math.round(e.m.cycles || 1)), n = Math.sin(e.u * b * t - e.i * (e.m.phase ?? .5));
2000
2001
  return {
2001
2002
  ...H,
2002
2003
  dNormal: (e.m.amp ?? .3) * e.sizePx * n
2003
2004
  };
2004
2005
  },
2005
2006
  cascade: (e) => {
2006
- let t = Math.max(1, Math.round(e.m.cycles || 1)), n = .5 + .5 * Math.sin(e.u * x * t - e.i * (e.m.phase ?? .6));
2007
+ let t = Math.max(1, Math.round(e.m.cycles || 1)), n = .5 + .5 * Math.sin(e.u * b * t - e.i * (e.m.phase ?? .6));
2007
2008
  return {
2008
2009
  ...H,
2009
- scale: D(.25, 1, n),
2010
- opacity: D(.15, 1, n)
2010
+ scale: E(.25, 1, n),
2011
+ opacity: E(.15, 1, n)
2011
2012
  };
2012
2013
  },
2013
2014
  sweep: (e) => {
2014
- let t = Re(e);
2015
+ let t = Ve(e);
2015
2016
  return {
2016
2017
  ...H,
2017
- scale: D(.25, 1, t),
2018
- opacity: D(.12, 1, t)
2018
+ scale: E(.25, 1, t),
2019
+ opacity: E(.12, 1, t)
2019
2020
  };
2020
2021
  },
2021
2022
  sweepWeight: (e) => {
2022
- let t = Re(e);
2023
+ let t = Ve(e);
2023
2024
  return {
2024
2025
  ...H,
2025
- vf: { [e.axisTag]: D(e.axisMin, e.axisMax, t) }
2026
+ vf: { [e.axisTag]: E(e.axisMin, e.axisMax, t) }
2026
2027
  };
2027
2028
  },
2028
2029
  sweepShift: (e) => {
2029
- let t = Re(e);
2030
+ let t = Ve(e);
2030
2031
  return {
2031
2032
  ...H,
2032
2033
  dNormal: t * .6 * e.sizePx
2033
2034
  };
2034
2035
  }
2035
- }, Fe = (e) => e - Math.floor(e);
2036
- function Ie(e, t) {
2036
+ }, Re = (e) => e - Math.floor(e);
2037
+ function ze(e, t) {
2037
2038
  if (t <= 0) return 0;
2038
2039
  let n = Math.min(1, e / t);
2039
2040
  return 1 - n * n * (3 - 2 * n);
2040
2041
  }
2041
- function Le(e, t, n, r, i, a) {
2042
- let o = Fe(r * i), s = Math.max(.02, a * .5), c = (e) => {
2043
- let t = Math.abs(Fe(e) - o);
2044
- return Ie(Math.min(t, 1 - t), s);
2042
+ function Be(e, t, n, r, i, a) {
2043
+ let o = Re(r * i), s = Math.max(.02, a * .5), c = (e) => {
2044
+ let t = Math.abs(Re(e) - o);
2045
+ return ze(Math.min(t, 1 - t), s);
2045
2046
  };
2046
2047
  switch (e) {
2047
2048
  case "y": return c(n);
2048
2049
  case "diagonal": return c(.5 + (t - .5) * .7071 + (n - .5) * .7071);
2049
2050
  case "radial": return c(Math.hypot(t - .5, n - .5) / .7071);
2050
- case "angular": return c(Math.atan2(n - .5, t - .5) / x + .5);
2051
+ case "angular": return c(Math.atan2(n - .5, t - .5) / b + .5);
2051
2052
  case "wave": {
2052
2053
  let e = Math.max(1, Math.round(1 + (1 - a) * 6));
2053
- return .5 + .5 * Math.sin((t * e - r * i) * x);
2054
+ return .5 + .5 * Math.sin((t * e - r * i) * b);
2054
2055
  }
2055
2056
  default: return c(t);
2056
2057
  }
2057
2058
  }
2058
- var Re = (e) => Le(e.m.field || "x", e.nx ?? .5, e.ny ?? .5, e.u, Math.max(1, Math.round(e.m.cycles || 1)), e.m.amp ?? .35);
2059
- function ze(e, t) {
2060
- return (Pe[e] || Pe.none)(t);
2059
+ var Ve = (e) => Be(e.m.field || "x", e.nx ?? .5, e.ny ?? .5, e.u, Math.max(1, Math.round(e.m.cycles || 1)), e.m.amp ?? .35);
2060
+ function He(e, t) {
2061
+ return (Le[e] || Le.none)(t);
2061
2062
  }
2062
2063
  //#endregion
2063
2064
  //#region src/kinetic/features.js
2064
- var Be = [
2065
+ var Ue = [
2065
2066
  {
2066
2067
  tag: "liga",
2067
2068
  label: "Ligatures"
@@ -2103,7 +2104,7 @@ var Be = [
2103
2104
  label: "Stylistic set 2"
2104
2105
  }
2105
2106
  ];
2106
- function Ve(e) {
2107
+ function We(e) {
2107
2108
  if (!e) return "normal";
2108
2109
  let t = [];
2109
2110
  for (let [n, r] of Object.entries(e)) t.push(`"${n}" ${+!!r}`);
@@ -2111,11 +2112,11 @@ function Ve(e) {
2111
2112
  }
2112
2113
  //#endregion
2113
2114
  //#region src/kinetic/KineticType.js
2114
- var He = "http://www.w3.org/2000/svg", U = (e) => e - Math.floor(e), W = (e) => document.createElementNS(He, e);
2115
- function Ue(e, t) {
2115
+ var Ge = "http://www.w3.org/2000/svg", U = (e) => e - Math.floor(e), W = (e) => document.createElementNS(Ge, e);
2116
+ function Ke(e, t) {
2116
2117
  return !e || !t || t === "none" ? e || "" : t === "upper" ? e.toUpperCase() : t === "lower" ? e.toLowerCase() : t === "title" ? e.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
2117
2118
  }
2118
- function We(e) {
2119
+ function qe(e) {
2119
2120
  if (!e) return {
2120
2121
  bg: "#16202E",
2121
2122
  instances: []
@@ -2130,11 +2131,11 @@ function We(e) {
2130
2131
  }]
2131
2132
  };
2132
2133
  }
2133
- var Ge = class {
2134
+ var Je = class {
2134
2135
  constructor(e) {
2135
- this.host = e, this.params = We(null), this.w = 0, this.h = 0, this._rt = /* @__PURE__ */ new Map(), this._instSig = "", this._needsRemeasure = !1;
2136
+ this.host = e, this.params = qe(null), this.w = 0, this.h = 0, this._rt = /* @__PURE__ */ new Map(), this._instSig = "", this._needsRemeasure = !1;
2136
2137
  let t = W("svg");
2137
- t.setAttribute("xmlns", He), t.style.display = "block", t.style.maxWidth = "100%", t.style.maxHeight = "100%", t.style.pointerEvents = "none", t.style.overflow = "hidden", this._clipApplied = !0, this.bg = W("rect"), this.layer = W("g"), this.measEl = W("text"), this.measEl.setAttribute("x", "0"), this.measEl.setAttribute("y", "0"), this.measEl.style.visibility = "hidden", t.append(this.bg, this.layer, this.measEl), e.appendChild(t), this.svg = t, e.__kolKineticEngine = this, typeof document < "u" && document.fonts && document.fonts.ready.then(() => {
2138
+ t.setAttribute("xmlns", Ge), t.style.display = "block", t.style.maxWidth = "100%", t.style.maxHeight = "100%", t.style.pointerEvents = "none", t.style.overflow = "hidden", this._clipApplied = !0, this.bg = W("rect"), this.layer = W("g"), this.measEl = W("text"), this.measEl.setAttribute("x", "0"), this.measEl.setAttribute("y", "0"), this.measEl.style.visibility = "hidden", t.append(this.bg, this.layer, this.measEl), e.appendChild(t), this.svg = t, e.__kolKineticEngine = this, typeof document < "u" && document.fonts && document.fonts.ready.then(() => {
2138
2139
  this._needsRemeasure = !0;
2139
2140
  }).catch(() => {});
2140
2141
  }
@@ -2143,10 +2144,10 @@ var Ge = class {
2143
2144
  for (let e of this._rt.values()) e.cache = null;
2144
2145
  }
2145
2146
  setComposition(e) {
2146
- this.params = We(e);
2147
+ this.params = qe(e);
2147
2148
  }
2148
2149
  renderAt(e) {
2149
- !this.w || !this.h || this._render(_(e));
2150
+ !this.w || !this.h || this._render(g(e));
2150
2151
  }
2151
2152
  getInstanceRect(e) {
2152
2153
  let t = this._rt.get(e);
@@ -2227,7 +2228,7 @@ var Ge = class {
2227
2228
  }
2228
2229
  }
2229
2230
  _measure(e, t, n, r) {
2230
- let i = t.letterSpacing || 0, a = Ve(t.opentype), o = `${r}|${n.family}|${t.fontSize}|${i}|${w(t.vf)}|${a}`;
2231
+ let i = t.letterSpacing || 0, a = We(t.opentype), o = `${r}|${n.family}|${t.fontSize}|${i}|${w(t.vf)}|${a}`;
2231
2232
  if (e.cache && e.cache.key === o) return e.cache;
2232
2233
  let s = this.measEl;
2233
2234
  s.style.fontFamily = `'${n.family}'`, s.style.fontSize = `${t.fontSize}px`, s.style.letterSpacing = `${i}px`, s.style.fontVariationSettings = w(t.vf), s.style.fontFeatureSettings = a, s.textContent = r;
@@ -2248,43 +2249,43 @@ var Ge = class {
2248
2249
  }, e.cache;
2249
2250
  }
2250
2251
  _renderInstance(e, t, n) {
2251
- let r = y(e.font), i = e.phase ? U(n + e.phase) : n, o = Ue(e.text || "", e.case), c = Math.max(1, Math.round(e.multiply || 1)), l = c > 1 && o ? Array(c).fill(o).join(" ") : o, u = e.path?.type || "line", d = (e.offset?.x || 0) * this.w, f = (e.offset?.y || 0) * this.h;
2252
- if (t.group.setAttribute("transform", `translate(${d.toFixed(2)} ${f.toFixed(2)})`), e.morph?.on && !xe(u) && !L(u)) {
2253
- let n = r.url, o = e.morph.face2 ? y(e.morph.face2) : null, c = o ? o.url : n, d = a(n), f = a(c);
2252
+ let r = v(e.font), i = e.phase ? U(n + e.phase) : n, a = Ke(e.text || "", e.case), s = Math.max(1, Math.round(e.multiply || 1)), l = s > 1 && a ? Array(s).fill(a).join(" ") : a, u = e.path?.type || "line", d = (e.offset?.x || 0) * this.w, f = (e.offset?.y || 0) * this.h;
2253
+ if (t.group.setAttribute("transform", `translate(${d.toFixed(2)} ${f.toFixed(2)})`), e.morph?.on && !Ce(u) && !we(u)) {
2254
+ let n = r.url, a = e.morph.face2 ? v(e.morph.face2) : null, s = a ? a.url : n, d = c(n), f = c(s);
2254
2255
  if (d && f) {
2255
2256
  this._setKind(t, "morph"), this._renderMorph(e, t, i, d, f, r, l, u);
2256
2257
  return;
2257
2258
  }
2258
- d || s(n).catch(() => {}), !f && c !== n && s(c).catch(() => {});
2259
+ d || o(n).catch(() => {}), !f && s !== n && o(s).catch(() => {});
2259
2260
  }
2260
- if (this._setKind(t, "text"), be(u)) {
2261
+ if (this._setKind(t, "text"), L(u)) {
2261
2262
  t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
2262
2263
  let n = Math.max(1, Math.round(e.path?.rows ?? 2)), a = Math.max(1, Math.round(e.path?.cols ?? 3));
2263
2264
  if (this._ensureGlyphs(t, l, r, n * a), !l.length) return;
2264
2265
  this._measure(t, e, r, l), this._placeArray(e, t, r, i, t.glyphEls, n, a);
2265
2266
  return;
2266
2267
  }
2267
- if (xe(u) || L(u)) {
2268
+ if (Ce(u) || we(u)) {
2268
2269
  t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
2269
2270
  let n = Math.max(1, Math.round(e.path?.count ?? 12));
2270
2271
  if (this._ensureGlyphs(t, l, r, n), !l.length) return;
2271
- this._measure(t, e, r, l), xe(u) ? this._placeRadial(e, t, r, i, t.glyphEls, n) : this._placeRings(e, t, r, i, t.glyphEls, n);
2272
+ this._measure(t, e, r, l), Ce(u) ? this._placeRadial(e, t, r, i, t.glyphEls, n) : this._placeRings(e, t, r, i, t.glyphEls, n);
2272
2273
  return;
2273
2274
  }
2274
- let p = Ce(u, this.w, this.h, e.path || {});
2275
+ let p = Ee(u, this.w, this.h, e.path || {});
2275
2276
  t.closed = p.closed, t.pathEl.setAttribute("d", p.d), t.pathEl.setAttribute("stroke", e.showPath ? e.fill || "#888" : "none"), t.pathEl.setAttribute("stroke-width", +!!e.showPath), t.pathEl.style.opacity = e.showPath ? .25 : 0, this._ensureGlyphs(t, l, r, 1), l.length && (this._measure(t, e, r, l), this._placeOnPath(e, t, r, i, t.glyphEls));
2276
2277
  }
2277
2278
  _styleGlyph(e, t, n, r) {
2278
2279
  e.style.fontFamily = `'${n.family}'`, e.style.fontSize = `${t.fontSize}px`, e.style.fontStyle = t.italic ? "italic" : "normal", e.style.fontVariationSettings = w(r.vf ? {
2279
2280
  ...t.vf,
2280
2281
  ...r.vf
2281
- } : t.vf), e.style.fontFeatureSettings = Ve(t.opentype), e.setAttribute("fill", t.fill || "#e8e4dc"), e.setAttribute("opacity", r.opacity);
2282
+ } : t.vf), e.style.fontFeatureSettings = We(t.opentype), e.setAttribute("fill", t.fill || "#e8e4dc"), e.setAttribute("opacity", r.opacity);
2282
2283
  }
2283
2284
  _anim(e, t, n) {
2284
2285
  let r = e.motions && e.motions.length ? [e.motion, ...e.motions] : [e.motion], i = 0, a = 0, o = 0, s = 1, c = 1, l = null;
2285
2286
  for (let e of r) {
2286
2287
  if (!e || (e.mode || "none") === "none") continue;
2287
- let r = n.axes.find((t) => t.tag === (e.axis || n.axes[0] && n.axes[0].tag)), u = ze(e.mode, {
2288
+ let r = n.axes.find((t) => t.tag === (e.axis || n.axes[0] && n.axes[0].tag)), u = He(e.mode, {
2288
2289
  ...t,
2289
2290
  m: e,
2290
2291
  axisTag: r ? r.tag : "wght",
@@ -2321,8 +2322,8 @@ var Ge = class {
2321
2322
  };
2322
2323
  }
2323
2324
  return t.pathEl.getPointAtLength(m(e));
2324
- }, g = Math.min(i.length, s.length), v = _(e.stagger || 0), y = Math.max(1, Math.round(e.multiply || 1)), b = (s.length + 2) / y;
2325
- for (let t = 0; t < g; t++) {
2325
+ }, _ = Math.min(i.length, s.length), v = g(e.stagger || 0), y = Math.max(1, Math.round(e.multiply || 1)), b = (s.length + 2) / y;
2326
+ for (let t = 0; t < _; t++) {
2326
2327
  let a = u + s[t], c = h(a), l = v && y > 1 ? U(r + v * Math.floor(t / b) / y) : r, f = this._anim(e, {
2327
2328
  i: t,
2328
2329
  n: s.length,
@@ -2340,7 +2341,7 @@ var Ge = class {
2340
2341
  if (!s) return;
2341
2342
  let { centers: c, total: l } = s, u = c.length;
2342
2343
  if (!u) return;
2343
- let d = Math.min(this.w, this.h) * .08, f = (this.w - 2 * d) / o, p = (this.h - 2 * d) / a, m = _(e.stagger || 0), h = a * o;
2344
+ let d = Math.min(this.w, this.h) * .08, f = (this.w - 2 * d) / o, p = (this.h - 2 * d) / a, m = g(e.stagger || 0), h = a * o;
2344
2345
  for (let t = 0; t < h; t++) {
2345
2346
  let a = Math.floor(t / o), s = d + t % o * f + f / 2, g = d + a * p + p / 2, _ = s - l / 2, v = m ? U(r + m * t / h) : r;
2346
2347
  for (let r = 0; r < u; r++) {
@@ -2364,13 +2365,13 @@ var Ge = class {
2364
2365
  if (!o) return;
2365
2366
  let { centers: s } = o, c = s.length;
2366
2367
  if (!c) return;
2367
- let l = this.w / 2, u = this.h / 2, d = Math.min(this.w, this.h) * .5, f = d * Math.max(0, Math.min(.95, e.path?.inner ?? .12)), p = Math.round(e.path?.spin ?? 1), m = _(e.stagger || 0);
2368
+ let l = this.w / 2, u = this.h / 2, d = Math.min(this.w, this.h) * .5, f = d * Math.max(0, Math.min(.95, e.path?.inner ?? .12)), p = Math.round(e.path?.spin ?? 1), m = g(e.stagger || 0);
2368
2369
  for (let t = 0; t < a; t++) {
2369
- let o = a > 1 ? t / (a - 1) : 0, h = p + (m ? Math.round(m * 2 * o) : 0), g = t / a * x + r * x * h, _ = m ? U(r + m * t / a) : r, v = Math.cos(g), y = Math.sin(g), b = g * 180 / Math.PI;
2370
+ let o = a > 1 ? t / (a - 1) : 0, h = p + (m ? Math.round(m * 2 * o) : 0), g = t / a * b + r * b * h, _ = m ? U(r + m * t / a) : r, v = Math.cos(g), y = Math.sin(g), x = g * 180 / Math.PI;
2370
2371
  for (let r = 0; r < c; r++) {
2371
2372
  let o = t * c + r, p = i[o];
2372
2373
  if (!p) continue;
2373
- let m = f + s[r], h = l + v * m, g = u + y * m, x = this._anim(e, {
2374
+ let m = f + s[r], h = l + v * m, g = u + y * m, b = this._anim(e, {
2374
2375
  i: o,
2375
2376
  n: a * c,
2376
2377
  u: _,
@@ -2378,8 +2379,8 @@ var Ge = class {
2378
2379
  pathLen: d,
2379
2380
  nx: this.w ? h / this.w : .5,
2380
2381
  ny: this.h ? g / this.h : .5
2381
- }, n), S = m + x.dLen, ee = l + v * S, C = u + y * S;
2382
- p.setAttribute("transform", `translate(${ee.toFixed(2)} ${C.toFixed(2)}) rotate(${(b + x.dRot).toFixed(2)}) translate(0 ${(-x.dNormal).toFixed(2)}) scale(${x.scale.toFixed(3)})`), this._styleGlyph(p, e, n, x);
2382
+ }, n), S = m + b.dLen, C = l + v * S, w = u + y * S;
2383
+ p.setAttribute("transform", `translate(${C.toFixed(2)} ${w.toFixed(2)}) rotate(${(x + b.dRot).toFixed(2)}) translate(0 ${(-b.dNormal).toFixed(2)}) scale(${b.scale.toFixed(3)})`), this._styleGlyph(p, e, n, b);
2383
2384
  }
2384
2385
  }
2385
2386
  }
@@ -2388,22 +2389,22 @@ var Ge = class {
2388
2389
  if (!o) return;
2389
2390
  let { centers: s, total: c } = o, l = s.length;
2390
2391
  if (!l) return;
2391
- let u = this.w / 2, d = this.h / 2, f = Math.min(this.w, this.h) * .5 * Math.max(.1, Math.min(1, e.path?.radius ?? .92)), p = f * Math.max(.02, Math.min(.95, e.path?.inner ?? .14)), m = Math.round(e.path?.spin ?? 1), h = e.path?.twist ?? .5, g = e.path?.grow ?? .6, v = _(e.stagger || 0);
2392
+ let u = this.w / 2, d = this.h / 2, f = Math.min(this.w, this.h) * .5 * Math.max(.1, Math.min(1, e.path?.radius ?? .92)), p = f * Math.max(.02, Math.min(.95, e.path?.inner ?? .14)), m = Math.round(e.path?.spin ?? 1), h = e.path?.twist ?? .5, _ = e.path?.grow ?? .6, v = g(e.stagger || 0);
2392
2393
  for (let t = 0; t < a; t++) {
2393
- let o = a > 1 ? t / (a - 1) : 0, _ = Math.max(1, p + o * (f - p)), y = m + (v ? Math.round(v * 2 * o) : 0), b = r * x * y + o * h * x, S = v ? U(r + v * t / a) : r, ee = 1 + g * o;
2394
+ let o = a > 1 ? t / (a - 1) : 0, g = Math.max(1, p + o * (f - p)), y = m + (v ? Math.round(v * 2 * o) : 0), x = r * b * y + o * h * b, S = v ? U(r + v * t / a) : r, C = 1 + _ * o;
2394
2395
  for (let r = 0; r < l; r++) {
2395
2396
  let o = t * l + r, f = i[o];
2396
2397
  if (!f) continue;
2397
- let p = b + (s[r] - c / 2) / _, m = u + Math.cos(p) * _, h = d + Math.sin(p) * _, g = this._anim(e, {
2398
+ let p = x + (s[r] - c / 2) / g, m = u + Math.cos(p) * g, h = d + Math.sin(p) * g, _ = this._anim(e, {
2398
2399
  i: o,
2399
2400
  n: a * l,
2400
2401
  u: S,
2401
2402
  sizePx: e.fontSize,
2402
- pathLen: x * _,
2403
+ pathLen: b * g,
2403
2404
  nx: this.w ? m / this.w : .5,
2404
2405
  ny: this.h ? h / this.h : .5
2405
- }, n), v = p + g.dLen / _, y = _ - g.dNormal, C = u + Math.cos(v) * y, w = d + Math.sin(v) * y, te = v * 180 / Math.PI + 90 + g.dRot;
2406
- f.setAttribute("transform", `translate(${C.toFixed(2)} ${w.toFixed(2)}) rotate(${te.toFixed(2)}) scale(${(g.scale * ee).toFixed(3)})`), this._styleGlyph(f, e, n, g);
2406
+ }, n), v = p + _.dLen / g, y = g - _.dNormal, w = u + Math.cos(v) * y, ee = d + Math.sin(v) * y, te = v * 180 / Math.PI + 90 + _.dRot;
2407
+ f.setAttribute("transform", `translate(${w.toFixed(2)} ${ee.toFixed(2)}) rotate(${te.toFixed(2)}) scale(${(_.scale * C).toFixed(3)})`), this._styleGlyph(f, e, n, _);
2407
2408
  }
2408
2409
  }
2409
2410
  }
@@ -2411,11 +2412,11 @@ var Ge = class {
2411
2412
  e.kind !== t && (e.kind = t, e.glyphG.textContent = "", e.glyphEls = [], e.morphEls = [], e.glyphKey = "", e.morphKey = "", e.morphPoolKey = "", e.cache = null);
2412
2413
  }
2413
2414
  _renderMorph(e, t, n, r, i, a, o, s) {
2414
- let c = e.fontSize, l = a.axes || [], d = {};
2415
- for (let t of l) d[t.tag] = e.vf?.[t.tag] ?? t.def;
2416
- let f = !!e.morph.face2, p = {};
2417
- if (!f) for (let t of l) p[t.tag] = e.morph.vf2?.[t.tag] ?? t.max;
2418
- let m = c * .12 + (e.letterSpacing || 0), h = e.morph.mode || "morph", g = e.morph.blend ?? .5, _ = e.morph.curve || "flat", v = e.morph.cp1 || {
2415
+ let c = e.fontSize, l = a.axes || [], u = {};
2416
+ for (let t of l) u[t.tag] = e.vf?.[t.tag] ?? t.def;
2417
+ let d = !!e.morph.face2, f = {};
2418
+ if (!d) for (let t of l) f[t.tag] = e.morph.vf2?.[t.tag] ?? t.max;
2419
+ let p = c * .12 + (e.letterSpacing || 0), h = e.morph.mode || "morph", g = e.morph.blend ?? .5, _ = e.morph.curve || "flat", v = e.morph.cp1 || {
2419
2420
  x: .33,
2420
2421
  y: .33
2421
2422
  }, y = e.morph.cp2 || {
@@ -2426,8 +2427,8 @@ var Ge = class {
2426
2427
  e.font,
2427
2428
  e.morph.face2 || "",
2428
2429
  c,
2429
- d,
2430
- p,
2430
+ u,
2431
+ f,
2431
2432
  h,
2432
2433
  g,
2433
2434
  _,
@@ -2438,33 +2439,33 @@ var Ge = class {
2438
2439
  ]), S = x !== t.morphKey;
2439
2440
  if (S) {
2440
2441
  t.morphKey = x;
2441
- let e = u(r, i, o, c, {
2442
+ let e = m(r, i, o, c, {
2442
2443
  mode: h,
2443
2444
  blend: g,
2444
2445
  curve: _,
2445
2446
  cp1: v,
2446
2447
  cp2: y,
2447
- coordsA: d,
2448
- coordsB: p,
2448
+ coordsA: u,
2449
+ coordsB: f,
2449
2450
  axes: l,
2450
- gap: m
2451
+ gap: p
2451
2452
  });
2452
2453
  t.morphData = e;
2453
2454
  let n = [], a = 0;
2454
2455
  for (let t of e.glyphs) n.push(a + t.advance / 2), a += t.advance;
2455
2456
  t.morphCenters = n, t.morphTotal = e.totalAdvance;
2456
2457
  }
2457
- let ee = t.morphData?.glyphs.length || 0;
2458
- if (!o.length || !ee) {
2458
+ let C = t.morphData?.glyphs.length || 0;
2459
+ if (!o.length || !C) {
2459
2460
  t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0;
2460
2461
  return;
2461
2462
  }
2462
- let C = be(s), w = C ? Math.max(1, Math.round(e.path?.rows ?? 2)) : 1, te = C ? Math.max(1, Math.round(e.path?.cols ?? 3)) : 1, ne = C ? w * te : 1, T = this._ensureMorphPool(t, ee, ne, h);
2463
- if ((S || T) && this._refreshMorphPaths(t, ne, h, b), C) {
2464
- t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0, this._placeMorphArray(e, t, a, n, w, te);
2463
+ let w = L(s), ee = w ? Math.max(1, Math.round(e.path?.rows ?? 2)) : 1, te = w ? Math.max(1, Math.round(e.path?.cols ?? 3)) : 1, ne = w ? ee * te : 1, T = this._ensureMorphPool(t, C, ne, h);
2464
+ if ((S || T) && this._refreshMorphPaths(t, ne, h, b), w) {
2465
+ t.pathEl.setAttribute("d", ""), t.pathEl.style.opacity = 0, this._placeMorphArray(e, t, a, n, ee, te);
2465
2466
  return;
2466
2467
  }
2467
- let E = Ce(s, this.w, this.h, e.path || {});
2468
+ let E = Ee(s, this.w, this.h, e.path || {});
2468
2469
  t.closed = E.closed, t.pathEl.setAttribute("d", E.d), t.pathEl.setAttribute("stroke", e.showPath ? e.fill || "#888" : "none"), t.pathEl.setAttribute("stroke-width", +!!e.showPath), t.pathEl.style.opacity = e.showPath ? .25 : 0, this._placeMorphOnPath(e, t, a, n);
2469
2470
  }
2470
2471
  _ensureMorphPool(e, t, n, r) {
@@ -2509,8 +2510,8 @@ var Ge = class {
2509
2510
  };
2510
2511
  }
2511
2512
  return t.pathEl.getPointAtLength(p(e));
2512
- }, h = e.italic ? " skewX(-12)" : "", g = Math.min(i.length, a.length), v = _(e.stagger || 0), y = Math.max(1, Math.round(e.multiply || 1)), b = (a.length + 2) / y;
2513
- for (let t = 0; t < g; t++) {
2513
+ }, h = e.italic ? " skewX(-12)" : "", _ = Math.min(i.length, a.length), v = g(e.stagger || 0), y = Math.max(1, Math.round(e.multiply || 1)), b = (a.length + 2) / y;
2514
+ for (let t = 0; t < _; t++) {
2514
2515
  let o = l + a[t], c = m(o), d = v && y > 1 ? U(r + v * Math.floor(t / b) / y) : r, f = this._anim(e, {
2515
2516
  i: t,
2516
2517
  n: a.length,
@@ -2528,7 +2529,7 @@ var Ge = class {
2528
2529
  if (!s || !o) return;
2529
2530
  let l = s.length;
2530
2531
  if (!l) return;
2531
- let u = Math.min(this.w, this.h) * .08, d = (this.w - 2 * u) / a, f = (this.h - 2 * u) / i, p = e.italic ? " skewX(-12)" : "", m = _(e.stagger || 0), h = i * a;
2532
+ let u = Math.min(this.w, this.h) * .08, d = (this.w - 2 * u) / a, f = (this.h - 2 * u) / i, p = e.italic ? " skewX(-12)" : "", m = g(e.stagger || 0), h = i * a;
2532
2533
  for (let t = 0; t < h; t++) {
2533
2534
  let i = Math.floor(t / a), g = u + t % a * d + d / 2, _ = u + i * f + f / 2, v = g - c / 2, y = m ? U(r + m * t / h) : r;
2534
2535
  for (let r = 0; r < l; r++) {
@@ -2553,7 +2554,7 @@ var Ge = class {
2553
2554
  ...e,
2554
2555
  ...t
2555
2556
  } : e)
2556
- }), Ke = (e, t) => ({
2557
+ }), Ye = (e, t) => ({
2557
2558
  ...e,
2558
2559
  instances: (e.instances ?? []).map((e, n, r) => ({
2559
2560
  ...e,
@@ -2565,11 +2566,11 @@ var Ge = class {
2565
2566
  } }, n), J = (e, t, n = 0) => K(e, { motion: {
2566
2567
  ...G(e, n)?.motion ?? {},
2567
2568
  ...t
2568
- } }, n), Y = (e, t = 0) => G(e, t)?.path?.type ?? "line", X = (e, t = 0) => G(e, t)?.motion?.mode ?? "none", qe = (e, t = 0) => ![
2569
+ } }, n), Y = (e, t = 0) => G(e, t)?.path?.type ?? "line", Xe = (e, t = 0) => G(e, t)?.motion?.mode ?? "none", Ze = (e, t = 0) => ![
2569
2570
  "radial",
2570
2571
  "rings",
2571
2572
  "array"
2572
- ].includes(Y(e, t)), Je = [
2573
+ ].includes(Y(e, t)), Qe = [
2573
2574
  {
2574
2575
  value: "line",
2575
2576
  label: "Line"
@@ -2614,24 +2615,24 @@ var Ge = class {
2614
2615
  value: "rings",
2615
2616
  label: "Rings"
2616
2617
  }
2617
- ], Z = (e, t = 0) => G(e, t)?.morph ?? {}, Q = (e, t, n = 0) => K(e, { morph: {
2618
+ ], X = (e, t = 0) => G(e, t)?.morph ?? {}, Z = (e, t, n = 0) => K(e, { morph: {
2618
2619
  ...G(e, n)?.morph ?? {},
2619
2620
  ...t
2620
- } }, n), Ye = (e, t, n, r = 0) => Q(e, { vf2: {
2621
- ...Z(e, r).vf2 ?? {},
2621
+ } }, n), $e = (e, t, n, r = 0) => Z(e, { vf2: {
2622
+ ...X(e, r).vf2 ?? {},
2622
2623
  [t]: n
2623
- } }, r), Xe = (e, t = 0) => !["radial", "rings"].includes(Y(e, t)), Ze = (e, t = 0) => Xe(e, t) && !!Z(e, t).on, Qe = (e, t = 0) => Z(e, t).mode ?? "morph", $e = (e, t = 0) => Ze(e, t) && ["morph", "fade"].includes(Qe(e, t)), $ = (e, t, n = 0) => y(G(e, n)?.font).axes.find((e) => e.tag === t), et = (e, t, n, r = 0) => {
2624
+ } }, r), et = (e, t = 0) => !["radial", "rings"].includes(Y(e, t)), Q = (e, t = 0) => et(e, t) && !!X(e, t).on, tt = (e, t = 0) => X(e, t).mode ?? "morph", nt = (e, t = 0) => Q(e, t) && ["morph", "fade"].includes(tt(e, t)), $ = (e, t, n = 0) => v(G(e, n)?.font).axes.find((e) => e.tag === t), rt = (e, t, n, r = 0) => {
2624
2625
  let i = $(e, t, r), a = i ? Math.min(i.max, Math.max(i.min, n)) : n;
2625
- return Ye(e, t, Math.round(a), r);
2626
- }, tt = (e, t, n, r = 0) => {
2626
+ return $e(e, t, Math.round(a), r);
2627
+ }, it = (e, t, n, r = 0) => {
2627
2628
  let i = $(e, t, r), a = i ? Math.min(i.max, Math.max(i.min, n)) : n;
2628
2629
  return K(e, { vf: {
2629
2630
  ...G(e, r)?.vf ?? {},
2630
2631
  [t]: Math.round(a)
2631
2632
  } }, r);
2632
- }, nt = (e) => ({
2633
+ }, at = (e) => ({
2633
2634
  key: `vf${e[0].toUpperCase()}${e.slice(1)}`,
2634
- label: T[e] || e,
2635
+ label: ne[e] || e,
2635
2636
  tab: "style",
2636
2637
  section: "Axes",
2637
2638
  type: "range",
@@ -2640,8 +2641,8 @@ var Ge = class {
2640
2641
  max: (t, n = 0) => $(t, e, n)?.max ?? 1e3,
2641
2642
  when: (t, n = 0) => !!$(t, e, n),
2642
2643
  get: (t, n = 0) => G(t, n)?.vf?.[e] ?? $(t, e, n)?.def ?? 0,
2643
- set: (t, n, r = 0) => tt(t, e, n, r)
2644
- }), rt = (e, t = 0) => Ze(e, t) && Qe(e, t) === "morph" && (Z(e, t).curve ?? "flat") === "custom", it = (e, t) => ({
2644
+ set: (t, n, r = 0) => it(t, e, n, r)
2645
+ }), ot = (e, t = 0) => Q(e, t) && tt(e, t) === "morph" && (X(e, t).curve ?? "flat") === "custom", st = (e, t) => ({
2645
2646
  key: `morphC${e}${t}`,
2646
2647
  label: `P${e} ${t.toUpperCase()}`,
2647
2648
  tab: "style",
@@ -2651,16 +2652,16 @@ var Ge = class {
2651
2652
  max: 1,
2652
2653
  step: .01,
2653
2654
  noRandom: !0,
2654
- when: rt,
2655
- get: (n, r = 0) => Z(n, r)[`cp${e}`]?.[t] ?? (e === 1 ? .33 : .66),
2656
- set: (n, r, i = 0) => Q(n, { [`cp${e}`]: {
2657
- ...Z(n, i)[`cp${e}`] ?? {
2655
+ when: ot,
2656
+ get: (n, r = 0) => X(n, r)[`cp${e}`]?.[t] ?? (e === 1 ? .33 : .66),
2657
+ set: (n, r, i = 0) => Z(n, { [`cp${e}`]: {
2658
+ ...X(n, i)[`cp${e}`] ?? {
2658
2659
  x: e === 1 ? .33 : .66,
2659
2660
  y: e === 1 ? .33 : .66
2660
2661
  },
2661
2662
  [t]: r
2662
2663
  } }, i)
2663
- }), at = [
2664
+ }), ct = [
2664
2665
  {
2665
2666
  key: "bg",
2666
2667
  label: "Background",
@@ -2692,7 +2693,7 @@ var Ge = class {
2692
2693
  get: (e, t = 0) => G(e, t)?.font,
2693
2694
  set: (e, t, n = 0) => K(e, {
2694
2695
  font: t,
2695
- vf: Ee(t, G(e, n)?.vf)
2696
+ vf: ke(t, G(e, n)?.vf)
2696
2697
  }, n)
2697
2698
  },
2698
2699
  {
@@ -2770,7 +2771,7 @@ var Ge = class {
2770
2771
  tab: "style",
2771
2772
  type: "select",
2772
2773
  noRandom: !0,
2773
- when: qe,
2774
+ when: Ze,
2774
2775
  options: [
2775
2776
  {
2776
2777
  value: "start",
@@ -2797,12 +2798,12 @@ var Ge = class {
2797
2798
  max: 24,
2798
2799
  step: 1,
2799
2800
  noRandom: !0,
2800
- when: qe,
2801
+ when: Ze,
2801
2802
  get: (e, t = 0) => G(e, t)?.multiply ?? 1,
2802
2803
  set: (e, t, n = 0) => K(e, { multiply: Math.round(t) }, n)
2803
2804
  },
2804
- nt("wdth"),
2805
- nt("wght"),
2805
+ at("wdth"),
2806
+ at("wght"),
2806
2807
  {
2807
2808
  key: "arrangement",
2808
2809
  label: "Arrangement",
@@ -2810,7 +2811,7 @@ var Ge = class {
2810
2811
  section: "Arrangement",
2811
2812
  type: "select",
2812
2813
  noRandom: !0,
2813
- options: Je,
2814
+ options: Qe,
2814
2815
  get: Y,
2815
2816
  set: (e, t, n = 0) => q(e, { type: t }, n)
2816
2817
  },
@@ -3009,7 +3010,7 @@ var Ge = class {
3009
3010
  section: "Arrangement",
3010
3011
  type: "select",
3011
3012
  noRandom: !0,
3012
- when: qe,
3013
+ when: Ze,
3013
3014
  options: [{
3014
3015
  value: "flow",
3015
3016
  label: "Flow"
@@ -3027,7 +3028,7 @@ var Ge = class {
3027
3028
  section: "Arrangement",
3028
3029
  type: "select",
3029
3030
  noRandom: !0,
3030
- when: qe,
3031
+ when: Ze,
3031
3032
  options: [{
3032
3033
  value: "off",
3033
3034
  label: "Off"
@@ -3077,7 +3078,7 @@ var Ge = class {
3077
3078
  section: "Morph",
3078
3079
  type: "select",
3079
3080
  noRandom: !0,
3080
- when: Xe,
3081
+ when: et,
3081
3082
  options: [{
3082
3083
  value: "off",
3083
3084
  label: "Off"
@@ -3085,8 +3086,8 @@ var Ge = class {
3085
3086
  value: "on",
3086
3087
  label: "On"
3087
3088
  }],
3088
- get: (e, t = 0) => Z(e, t).on ? "on" : "off",
3089
- set: (e, t, n = 0) => Q(e, { on: t === "on" }, n)
3089
+ get: (e, t = 0) => X(e, t).on ? "on" : "off",
3090
+ set: (e, t, n = 0) => Z(e, { on: t === "on" }, n)
3090
3091
  },
3091
3092
  {
3092
3093
  key: "morphMode",
@@ -3094,10 +3095,10 @@ var Ge = class {
3094
3095
  tab: "style",
3095
3096
  section: "Morph",
3096
3097
  type: "select",
3097
- when: Ze,
3098
- options: p,
3099
- get: Qe,
3100
- set: (e, t, n = 0) => Q(e, { mode: t }, n)
3098
+ when: Q,
3099
+ options: d,
3100
+ get: tt,
3101
+ set: (e, t, n = 0) => Z(e, { mode: t }, n)
3101
3102
  },
3102
3103
  {
3103
3104
  key: "morphFace2",
@@ -3106,13 +3107,13 @@ var Ge = class {
3106
3107
  section: "Morph",
3107
3108
  type: "select",
3108
3109
  noRandom: !0,
3109
- when: $e,
3110
+ when: nt,
3110
3111
  options: (e, t = 0) => [{
3111
3112
  value: "",
3112
3113
  label: "Off"
3113
3114
  }, ...C.filter((n) => n.value !== G(e, t)?.font)],
3114
- get: (e, t = 0) => Z(e, t).face2 ?? "",
3115
- set: (e, t, n = 0) => Q(e, { face2: t }, n)
3115
+ get: (e, t = 0) => X(e, t).face2 ?? "",
3116
+ set: (e, t, n = 0) => Z(e, { face2: t }, n)
3116
3117
  },
3117
3118
  {
3118
3119
  key: "morphVf2Wdth",
@@ -3123,9 +3124,9 @@ var Ge = class {
3123
3124
  min: 64,
3124
3125
  max: 172,
3125
3126
  step: 1,
3126
- when: (e, t = 0) => $e(e, t) && !Z(e, t).face2 && !!$(e, "wdth", t),
3127
- get: (e, t = 0) => Z(e, t).vf2?.wdth ?? $(e, "wdth", t)?.max ?? 172,
3128
- set: (e, t, n = 0) => et(e, "wdth", t, n)
3127
+ when: (e, t = 0) => nt(e, t) && !X(e, t).face2 && !!$(e, "wdth", t),
3128
+ get: (e, t = 0) => X(e, t).vf2?.wdth ?? $(e, "wdth", t)?.max ?? 172,
3129
+ set: (e, t, n = 0) => rt(e, "wdth", t, n)
3129
3130
  },
3130
3131
  {
3131
3132
  key: "morphVf2Wght",
@@ -3136,9 +3137,9 @@ var Ge = class {
3136
3137
  min: 100,
3137
3138
  max: 900,
3138
3139
  step: 1,
3139
- when: (e, t = 0) => $e(e, t) && !Z(e, t).face2 && !!$(e, "wght", t),
3140
- get: (e, t = 0) => Z(e, t).vf2?.wght ?? $(e, "wght", t)?.max ?? 900,
3141
- set: (e, t, n = 0) => et(e, "wght", t, n)
3140
+ when: (e, t = 0) => nt(e, t) && !X(e, t).face2 && !!$(e, "wght", t),
3141
+ get: (e, t = 0) => X(e, t).vf2?.wght ?? $(e, "wght", t)?.max ?? 900,
3142
+ set: (e, t, n = 0) => rt(e, "wght", t, n)
3142
3143
  },
3143
3144
  {
3144
3145
  key: "morphCurve",
@@ -3146,15 +3147,15 @@ var Ge = class {
3146
3147
  tab: "style",
3147
3148
  section: "Morph",
3148
3149
  type: "select",
3149
- when: (e, t = 0) => Ze(e, t) && Qe(e, t) === "morph",
3150
- options: i,
3151
- get: (e, t = 0) => Z(e, t).curve ?? "flat",
3152
- set: (e, t, n = 0) => Q(e, { curve: t }, n)
3150
+ when: (e, t = 0) => Q(e, t) && tt(e, t) === "morph",
3151
+ options: a,
3152
+ get: (e, t = 0) => X(e, t).curve ?? "flat",
3153
+ set: (e, t, n = 0) => Z(e, { curve: t }, n)
3153
3154
  },
3154
- it(1, "x"),
3155
- it(1, "y"),
3156
- it(2, "x"),
3157
- it(2, "y"),
3155
+ st(1, "x"),
3156
+ st(1, "y"),
3157
+ st(2, "x"),
3158
+ st(2, "y"),
3158
3159
  {
3159
3160
  key: "morphBlend",
3160
3161
  label: "Blend",
@@ -3164,9 +3165,9 @@ var Ge = class {
3164
3165
  min: 0,
3165
3166
  max: 1,
3166
3167
  step: .01,
3167
- when: (e, t = 0) => Ze(e, t) && Qe(e, t) !== "random",
3168
- get: (e, t = 0) => Z(e, t).blend ?? .5,
3169
- set: (e, t, n = 0) => Q(e, { blend: t }, n)
3168
+ when: (e, t = 0) => Q(e, t) && tt(e, t) !== "random",
3169
+ get: (e, t = 0) => X(e, t).blend ?? .5,
3170
+ set: (e, t, n = 0) => Z(e, { blend: t }, n)
3170
3171
  },
3171
3172
  {
3172
3173
  key: "morphSeed",
@@ -3177,9 +3178,9 @@ var Ge = class {
3177
3178
  min: 0,
3178
3179
  max: 1,
3179
3180
  step: .01,
3180
- when: (e, t = 0) => Ze(e, t) && Qe(e, t) === "random",
3181
- get: (e, t = 0) => Z(e, t).blend ?? .5,
3182
- set: (e, t, n = 0) => Q(e, { blend: t }, n)
3181
+ when: (e, t = 0) => Q(e, t) && tt(e, t) === "random",
3182
+ get: (e, t = 0) => X(e, t).blend ?? .5,
3183
+ set: (e, t, n = 0) => Z(e, { blend: t }, n)
3183
3184
  },
3184
3185
  {
3185
3186
  key: "mode",
@@ -3225,7 +3226,7 @@ var Ge = class {
3225
3226
  label: "Sweep shift"
3226
3227
  }
3227
3228
  ],
3228
- get: X,
3229
+ get: Xe,
3229
3230
  set: (e, t, n = 0) => J(e, { mode: t }, n)
3230
3231
  },
3231
3232
  {
@@ -3238,7 +3239,7 @@ var Ge = class {
3238
3239
  step: 1,
3239
3240
  rMin: 1,
3240
3241
  rMax: 3,
3241
- when: (e, t = 0) => X(e, t) !== "none",
3242
+ when: (e, t = 0) => Xe(e, t) !== "none",
3242
3243
  get: (e, t = 0) => G(e, t)?.motion?.cycles ?? 1,
3243
3244
  set: (e, t, n = 0) => J(e, { cycles: Math.round(t) }, n)
3244
3245
  },
@@ -3257,7 +3258,7 @@ var Ge = class {
3257
3258
  "sweep",
3258
3259
  "sweepWeight",
3259
3260
  "sweepShift"
3260
- ].includes(X(e, t)),
3261
+ ].includes(Xe(e, t)),
3261
3262
  get: (e, t = 0) => G(e, t)?.motion?.amp ?? .3,
3262
3263
  set: (e, t, n = 0) => J(e, { amp: t }, n)
3263
3264
  },
@@ -3275,7 +3276,7 @@ var Ge = class {
3275
3276
  "vfwave",
3276
3277
  "glyphwave",
3277
3278
  "cascade"
3278
- ].includes(X(e, t)),
3279
+ ].includes(Xe(e, t)),
3279
3280
  get: (e, t = 0) => G(e, t)?.motion?.phase ?? .5,
3280
3281
  set: (e, t, n = 0) => J(e, { phase: t }, n)
3281
3282
  },
@@ -3284,10 +3285,10 @@ var Ge = class {
3284
3285
  label: "Axis",
3285
3286
  tab: "anim",
3286
3287
  type: "select",
3287
- when: (e, t = 0) => ["vfwave", "sweepWeight"].includes(X(e, t)) && y(G(e, t)?.font).axes.length > 1,
3288
- options: (e, t = 0) => y(G(e, t)?.font).axes.map((e) => ({
3288
+ when: (e, t = 0) => ["vfwave", "sweepWeight"].includes(Xe(e, t)) && v(G(e, t)?.font).axes.length > 1,
3289
+ options: (e, t = 0) => v(G(e, t)?.font).axes.map((e) => ({
3289
3290
  value: e.tag,
3290
- label: T[e.tag] || e.tag
3291
+ label: ne[e.tag] || e.tag
3291
3292
  })),
3292
3293
  get: (e, t = 0) => G(e, t)?.motion?.axis ?? "wght",
3293
3294
  set: (e, t, n = 0) => J(e, { axis: t }, n)
@@ -3301,7 +3302,7 @@ var Ge = class {
3301
3302
  "sweep",
3302
3303
  "sweepWeight",
3303
3304
  "sweepShift"
3304
- ].includes(X(e, t)),
3305
+ ].includes(Xe(e, t)),
3305
3306
  options: [
3306
3307
  {
3307
3308
  value: "x",
@@ -3340,7 +3341,7 @@ var Ge = class {
3340
3341
  max: 1,
3341
3342
  step: .01,
3342
3343
  get: (e) => G(e)?.stagger ?? 0,
3343
- set: (e, t) => Ke(e, (e, n, r) => ({
3344
+ set: (e, t) => Ye(e, (e, n, r) => ({
3344
3345
  stagger: t,
3345
3346
  phase: r > 1 ? n / r * t : 0
3346
3347
  }))
@@ -3359,18 +3360,18 @@ var Ge = class {
3359
3360
  get: (e, t = 0) => G(e, t)?.path?.spin ?? 1,
3360
3361
  set: (e, t, n = 0) => q(e, { spin: Math.round(t) }, n)
3361
3362
  }
3362
- ], ot = (e, t, n = 0) => typeof e.options == "function" ? e.options(t, n) : e.options ?? [], st = (e, t, n = 0) => ({
3363
+ ], lt = (e, t, n = 0) => typeof e.options == "function" ? e.options(t, n) : e.options ?? [], ut = (e, t, n = 0) => ({
3363
3364
  min: typeof e.min == "function" ? e.min(t, n) : e.min,
3364
3365
  max: typeof e.max == "function" ? e.max(t, n) : e.max
3365
3366
  });
3366
- function ct(e, t = 0, n = Math.random) {
3367
+ function dt(e, t = 0, n = Math.random) {
3367
3368
  let r = e;
3368
- for (let e of at) if (!(e.noRandom || e.type === "color") && !(e.when && !e.when(r, t))) {
3369
+ for (let e of ct) if (!(e.noRandom || e.type === "color") && !(e.when && !e.when(r, t))) {
3369
3370
  if (e.type === "range") {
3370
- let i = st(e, r, t), a = e.rMin ?? i.min, o = e.rMax ?? i.max, s = e.step ?? 1, c = a + n() * (o - a);
3371
+ let i = ut(e, r, t), a = e.rMin ?? i.min, o = e.rMax ?? i.max, s = e.step ?? 1, c = a + n() * (o - a);
3371
3372
  r = e.set(r, Math.min(o, Math.max(a, Number((Math.round(c / s) * s).toFixed(4)))), t);
3372
3373
  } else if (e.type === "select") {
3373
- let i = ot(e, r, t);
3374
+ let i = lt(e, r, t);
3374
3375
  i.length && (r = e.set(r, i[Math.floor(n() * i.length)].value, t));
3375
3376
  }
3376
3377
  }
@@ -3378,7 +3379,7 @@ function ct(e, t = 0, n = Math.random) {
3378
3379
  }
3379
3380
  //#endregion
3380
3381
  //#region src/editor/compose/inspectors/KineticPanel.jsx
3381
- var lt = {
3382
+ var ft = {
3382
3383
  key: "morphBlend",
3383
3384
  label: "Morph blend",
3384
3385
  type: "range",
@@ -3386,21 +3387,21 @@ var lt = {
3386
3387
  max: 1,
3387
3388
  step: .01,
3388
3389
  default: .5
3389
- }, ut = new Set([
3390
+ }, pt = new Set([
3390
3391
  "mode",
3391
3392
  "cycles",
3392
3393
  "motionAmp",
3393
3394
  "motionPhase",
3394
3395
  "axis",
3395
3396
  "field"
3396
- ]), dt = {
3397
+ ]), mt = {
3397
3398
  mode: "glyphwave",
3398
3399
  cycles: 1,
3399
3400
  phase: .5,
3400
3401
  amp: .3,
3401
3402
  axis: "wght",
3402
3403
  field: "x"
3403
- }, ft = new Set([
3404
+ }, ht = new Set([
3404
3405
  "align",
3405
3406
  "italic",
3406
3407
  "fill",
@@ -3408,187 +3409,190 @@ var lt = {
3408
3409
  "vfWght",
3409
3410
  "offsetX",
3410
3411
  "offsetY"
3411
- ]), pt = {
3412
+ ]), gt = {
3412
3413
  lineHeight: 0,
3413
3414
  display: "inline-flex",
3414
3415
  alignItems: "center",
3415
3416
  justifyContent: "center"
3416
- }, mt = (e, t) => e ? String.fromCharCode(97 + t.indexOf(e) % 26) : null;
3417
- function ht({ layer: e, setProp: n, updateLayer: r, palette: i, renderAnimate: a, tab: o, tabStrip: s, picker: u = !0 }) {
3418
- let p = t(), m = e.comp ?? {
3417
+ }, _t = (e, t) => e ? String.fromCharCode(97 + t.indexOf(e) % 26) : null;
3418
+ function vt({ layer: t, setProp: r, updateLayer: a, palette: o, renderAnimate: c, tab: l, tabStrip: d, picker: f = !0 }) {
3419
+ let m = n(), h = t.comp ?? {
3419
3420
  bg: "#0b0d12",
3420
3421
  instances: []
3421
- }, h = m.instances ?? [], [_, y] = N(0), b = Math.min(_, Math.max(0, h.length - 1)), x = (t) => {
3422
- y(t), window.dispatchEvent(new CustomEvent("kol:kinetic-element", { detail: {
3423
- id: e.id,
3424
- index: t,
3422
+ }, g = h.instances ?? [], [v, y] = M(0), b = Math.min(v, Math.max(0, g.length - 1)), x = (e) => {
3423
+ y(e), window.dispatchEvent(new CustomEvent("kol:kinetic-element", { detail: {
3424
+ id: t.id,
3425
+ index: e,
3425
3426
  from: "panel"
3426
3427
  } }));
3427
3428
  };
3428
- pe(() => {
3429
- let t = (t) => {
3430
- t.detail?.id === e.id && t.detail.from === "canvas" && y(t.detail.index);
3429
+ he(() => {
3430
+ let e = (e) => {
3431
+ e.detail?.id === t.id && e.detail.from === "canvas" && y(e.detail.index);
3431
3432
  };
3432
- return window.addEventListener("kol:kinetic-element", t), () => window.removeEventListener("kol:kinetic-element", t);
3433
- }, [e.id]);
3434
- let [S, C] = N([]), w = (e) => C((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), te = (e) => {
3435
- let t = h[e]?.group;
3436
- return t ? h.reduce((e, n, r) => n.group === t ? [...e, r] : e, []) : [e];
3437
- }, [ne, T] = N(0), E = h[b]?.motions ?? [], D = Math.min(ne, E.length), re = (e) => ({
3433
+ return window.addEventListener("kol:kinetic-element", e), () => window.removeEventListener("kol:kinetic-element", e);
3434
+ }, [t.id]);
3435
+ let [C, w] = M([]), ee = (e) => w((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), te = (e) => {
3436
+ let t = g[e]?.group;
3437
+ return t ? g.reduce((e, n, r) => n.group === t ? [...e, r] : e, []) : [e];
3438
+ }, [ne, T] = M(0), E = g[b]?.motions ?? [], D = Math.min(ne, E.length), ie = (e) => ({
3438
3439
  ...e,
3439
3440
  instances: (e.instances ?? []).map((e, t) => t === b ? {
3440
3441
  ...e,
3441
3442
  motion: { ...e.motions?.[D - 1] ?? {} }
3442
3443
  } : e)
3443
- }), ae = (e) => ut.has(e.key) && D > 0 ? re(m) : m, oe = (t) => {
3444
- t && (r(e.id, {
3445
- presetId: t.id,
3446
- presetLabel: t.label,
3447
- comp: Ne(t)
3444
+ }), oe = (e) => pt.has(e.key) && D > 0 ? ie(h) : h, se = (e) => {
3445
+ e && (a(t.id, {
3446
+ presetId: e.id,
3447
+ presetLabel: e.label,
3448
+ comp: Ie(e)
3448
3449
  }), y(0), T(0));
3449
- }, se = (e) => n("comp", e), A = (t) => r(e.id, { comp: {
3450
- ...m,
3451
- instances: t
3452
- } }), j = (e, t) => se({
3453
- ...m,
3454
- instances: h.map((n, r) => r === e ? {
3450
+ }, k = (e) => r("comp", e), A = (e) => a(t.id, { comp: {
3451
+ ...h,
3452
+ instances: e
3453
+ } }), le = (e, t) => k({
3454
+ ...h,
3455
+ instances: g.map((n, r) => r === e ? {
3455
3456
  ...n,
3456
3457
  ...t
3457
3458
  } : n)
3458
- }), le = () => {
3459
- if (S.length < 2) return;
3460
- let e = new Set(h.map((e) => e.group).filter(Boolean)), t = 1;
3459
+ }), ue = () => {
3460
+ if (C.length < 2) return;
3461
+ let e = new Set(g.map((e) => e.group).filter(Boolean)), t = 1;
3461
3462
  for (; e.has(`g${t}`);) t++;
3462
- A(h.map((e) => S.includes(e.id) ? {
3463
+ A(g.map((e) => C.includes(e.id) ? {
3463
3464
  ...e,
3464
3465
  group: `g${t}`
3465
- } : e)), C([]);
3466
- }, de = () => {
3467
- S.length && (A(h.map((e) => S.includes(e.id) ? {
3466
+ } : e)), w([]);
3467
+ }, fe = () => {
3468
+ C.length && (A(g.map((e) => C.includes(e.id) ? {
3468
3469
  ...e,
3469
3470
  group: null
3470
- } : e)), C([]));
3471
- }, me = (e, t) => {
3472
- if (ut.has(e.key) && D > 0) {
3473
- let n = e.set(re(m), t, b).instances?.[b]?.motion ?? {};
3474
- j(b, { motions: E.map((e, t) => t === D - 1 ? n : e) });
3471
+ } : e)), w([]));
3472
+ }, pe = (e, t) => {
3473
+ if (pt.has(e.key) && D > 0) {
3474
+ let n = e.set(ie(h), t, b).instances?.[b]?.motion ?? {};
3475
+ le(b, { motions: E.map((e, t) => t === D - 1 ? n : e) });
3475
3476
  return;
3476
3477
  }
3477
3478
  let n = te(b);
3478
- if (n.length > 1 && ft.has(e.key)) {
3479
- let r = m;
3479
+ if (n.length > 1 && ht.has(e.key)) {
3480
+ let r = h;
3480
3481
  if (e.key === "fontSize") {
3481
- let i = Number(e.get(m, b)) || 1, a = t / i;
3482
+ let i = Number(e.get(h, b)) || 1, a = t / i;
3482
3483
  for (let t of n) {
3483
- let n = Number(e.get(m, t)) || i;
3484
+ let n = Number(e.get(h, t)) || i;
3484
3485
  r = e.set(r, Math.max(8, Math.min(1200, Math.round(n * a))), t);
3485
3486
  }
3486
3487
  } else if (e.key === "offsetX" || e.key === "offsetY") {
3487
- let i = t - (Number(e.get(m, b)) || 0);
3488
- for (let t of n) r = e.set(r, (Number(e.get(m, t)) || 0) + i, t);
3488
+ let i = t - (Number(e.get(h, b)) || 0);
3489
+ for (let t of n) r = e.set(r, (Number(e.get(h, t)) || 0) + i, t);
3489
3490
  } else for (let i of n) r = e.set(r, t, i);
3490
- se(r);
3491
+ k(r);
3491
3492
  return;
3492
3493
  }
3493
- se(e.set(m, t, b));
3494
- }, M = l(e), ge = () => {
3495
- let t = M.take();
3496
- r(e.id, {
3497
- comp: ct(m, b, g(t >>> 0)),
3498
- _rollSeed: t
3494
+ k(e.set(h, t, b));
3495
+ }, ge = i(t), _e = () => {
3496
+ let e = ge.take();
3497
+ a(t.id, {
3498
+ comp: dt(h, b, u(e >>> 0)),
3499
+ _rollSeed: e
3499
3500
  });
3500
- }, I = () => {
3501
- let t = M.take(), n = g(t >>> 0), i = m;
3502
- h.forEach((e, t) => {
3503
- i = ct(i, t, n);
3504
- }), r(e.id, {
3505
- comp: i,
3506
- _rollSeed: t
3501
+ }, F = () => {
3502
+ let e = ge.take(), n = u(e >>> 0), r = h;
3503
+ g.forEach((e, t) => {
3504
+ r = dt(r, t, n);
3505
+ }), a(t.id, {
3506
+ comp: r,
3507
+ _rollSeed: e
3507
3508
  });
3508
- }, _e = (t, n) => {
3509
- let i = v(t, n);
3510
- r(e.id, {
3511
- themeId: t,
3509
+ }, ye = (e, n) => {
3510
+ let r = _(e, n);
3511
+ a(t.id, {
3512
+ themeId: e,
3512
3513
  themeInvert: n,
3513
3514
  comp: {
3514
- ...m,
3515
- bg: i.bg,
3516
- instances: h.map((e) => ({
3515
+ ...h,
3516
+ bg: r.bg,
3517
+ instances: g.map((e) => ({
3517
3518
  ...e,
3518
- fill: i.fg
3519
+ fill: r.fg
3519
3520
  }))
3520
3521
  }
3521
3522
  });
3522
- }, ve = (e) => se({
3523
- ...m,
3524
- instances: h.map((t) => ({
3523
+ }, I = (e) => k({
3524
+ ...h,
3525
+ instances: g.map((t) => ({
3525
3526
  ...t,
3526
3527
  fill: e
3527
3528
  }))
3528
- }), ye = o === "labs-effect" ? "style" : o, be = at.filter((e) => e.tab === ye && (!e.when || e.when(ae(e), b))), xe = h.some((e) => e?.morph?.on), L = h[b];
3529
- return /* @__PURE__ */ F(he, { children: [
3530
- u && /* @__PURE__ */ P(gt, {
3531
- layer: e,
3532
- onPreset: oe
3529
+ }), be = l === "labs-effect" ? "style" : l, xe = ct.filter((e) => e.tab === be && (!e.when || e.when(oe(e), b))), Se = g.some((e) => e?.morph?.on), L = g[b];
3530
+ return /* @__PURE__ */ P(ve, { children: [
3531
+ f && /* @__PURE__ */ N(yt, {
3532
+ layer: t,
3533
+ onPreset: se
3533
3534
  }),
3534
- /* @__PURE__ */ F("div", {
3535
+ /* @__PURE__ */ P("div", {
3535
3536
  className: "flex flex-col gap-1",
3536
3537
  children: [
3537
- /* @__PURE__ */ P("span", {
3538
+ /* @__PURE__ */ N("span", {
3538
3539
  className: "kol-helper-10 text-meta",
3539
3540
  children: "Elements"
3540
3541
  }),
3541
- /* @__PURE__ */ P(_t, {
3542
- insts: h,
3542
+ /* @__PURE__ */ N(bt, {
3543
+ insts: g,
3543
3544
  idx: b,
3544
3545
  onSelect: x,
3545
3546
  onWrite: A,
3546
- marked: S,
3547
- onMark: w,
3548
- onGroup: le,
3549
- onUngroup: de
3547
+ marked: C,
3548
+ onMark: ee,
3549
+ onGroup: ue,
3550
+ onUngroup: fe
3550
3551
  }),
3551
- /* @__PURE__ */ P(O, {
3552
- variant: "primary",
3553
- size: p,
3554
- className: "w-full",
3555
- title: "Edit elements on the canvas (click to select, drag to move, corners to scale)",
3556
- onClick: () => window.dispatchEvent(new CustomEvent("kol:kinetic-edit", { detail: {
3557
- id: e.id,
3558
- index: b
3559
- } })),
3560
- children: "Edit on canvas"
3552
+ /* @__PURE__ */ N(j, {
3553
+ label: "Edit elements on the canvas (click to select, drag to move, corners to scale)",
3554
+ children: /* @__PURE__ */ N(O, {
3555
+ "aria-label": "Edit elements on the canvas (click to select, drag to move, corners to scale)",
3556
+ variant: "primary",
3557
+ size: m,
3558
+ className: "w-full",
3559
+ onClick: () => window.dispatchEvent(new CustomEvent("kol:kinetic-edit", { detail: {
3560
+ id: t.id,
3561
+ index: b
3562
+ } })),
3563
+ children: "Edit on canvas"
3564
+ })
3561
3565
  })
3562
3566
  ]
3563
3567
  }),
3564
- s,
3565
- (o === "generate" || o === "labs-effect") && /* @__PURE__ */ F(he, { children: [
3566
- /* @__PURE__ */ P(k, {
3568
+ d,
3569
+ (l === "generate" || l === "labs-effect") && /* @__PURE__ */ P(ve, { children: [
3570
+ /* @__PURE__ */ N(ae, {
3567
3571
  label: "Text",
3568
- children: /* @__PURE__ */ P(ce, {
3572
+ children: /* @__PURE__ */ N(ce, {
3569
3573
  variant: "filled",
3570
- size: p,
3574
+ size: m,
3571
3575
  rows: 2,
3572
3576
  axis: "y",
3573
- value: h[b]?.text ?? "",
3574
- onChange: (e) => j(b, { text: e.target.value })
3577
+ value: g[b]?.text ?? "",
3578
+ onChange: (e) => le(b, { text: e.target.value })
3575
3579
  })
3576
3580
  }),
3577
- /* @__PURE__ */ F("div", {
3581
+ /* @__PURE__ */ P("div", {
3578
3582
  className: "grid grid-cols-2 gap-2",
3579
- children: [/* @__PURE__ */ P(k, {
3583
+ children: [/* @__PURE__ */ N(ae, {
3580
3584
  label: "Theme",
3581
- children: /* @__PURE__ */ P(ie, {
3585
+ children: /* @__PURE__ */ N(re, {
3582
3586
  variant: "subtle",
3583
- size: p,
3587
+ size: m,
3584
3588
  className: "w-full",
3585
- options: ee,
3586
- value: e.themeId ?? "kol",
3587
- onChange: (t) => _e(t, !!e.themeInvert)
3589
+ options: S,
3590
+ value: t.themeId ?? "kol",
3591
+ onChange: (e) => ye(e, !!t.themeInvert)
3588
3592
  })
3589
- }), /* @__PURE__ */ P(k, {
3593
+ }), /* @__PURE__ */ N(ae, {
3590
3594
  label: "Invert",
3591
- children: /* @__PURE__ */ P(ue, {
3595
+ children: /* @__PURE__ */ N(de, {
3592
3596
  options: [{
3593
3597
  value: "off",
3594
3598
  label: "Off"
@@ -3596,108 +3600,108 @@ function ht({ layer: e, setProp: n, updateLayer: r, palette: i, renderAnimate: a
3596
3600
  value: "on",
3597
3601
  label: "On"
3598
3602
  }],
3599
- viewMode: e.themeInvert ? "on" : "off",
3600
- onViewChange: (t) => _e(e.themeId ?? "kol", t === "on")
3603
+ viewMode: t.themeInvert ? "on" : "off",
3604
+ onViewChange: (e) => ye(t.themeId ?? "kol", e === "on")
3601
3605
  })
3602
3606
  })]
3603
3607
  }),
3604
- /* @__PURE__ */ P(f, {
3608
+ /* @__PURE__ */ N(s, {
3605
3609
  label: "Text colour",
3606
- value: h[0]?.fill,
3607
- onChange: (e) => ve(c(e, i) ?? e),
3608
- palette: i
3610
+ value: g[0]?.fill,
3611
+ onChange: (t) => I(e(t, o) ?? t),
3612
+ palette: o
3609
3613
  }),
3610
- /* @__PURE__ */ F("div", {
3614
+ /* @__PURE__ */ P("div", {
3611
3615
  className: "grid grid-cols-2 gap-2",
3612
- children: [/* @__PURE__ */ P(O, {
3616
+ children: [/* @__PURE__ */ N(O, {
3613
3617
  variant: "primary",
3614
- size: p,
3615
- onClick: ge,
3618
+ size: m,
3619
+ onClick: _e,
3616
3620
  children: "Randomise"
3617
- }), /* @__PURE__ */ P(O, {
3621
+ }), /* @__PURE__ */ N(O, {
3618
3622
  variant: "primary",
3619
- size: p,
3620
- onClick: I,
3623
+ size: m,
3624
+ onClick: F,
3621
3625
  children: "All elements"
3622
3626
  })]
3623
3627
  }),
3624
- /* @__PURE__ */ P(d, { seed: M })
3628
+ /* @__PURE__ */ N(p, { seed: ge })
3625
3629
  ] }),
3626
- o === "anim" && /* @__PURE__ */ P(yt, {
3630
+ l === "anim" && /* @__PURE__ */ N(St, {
3627
3631
  motions: E,
3628
3632
  mIdx: D,
3629
3633
  onSelect: T,
3630
3634
  onAdd: () => {
3631
- A(h.map((e, t) => t === b ? {
3635
+ A(g.map((e, t) => t === b ? {
3632
3636
  ...e,
3633
- motions: [...E, { ...dt }]
3637
+ motions: [...E, { ...mt }]
3634
3638
  } : e)), T(E.length + 1);
3635
3639
  },
3636
3640
  onRemove: () => {
3637
- D !== 0 && (A(h.map((e, t) => t === b ? {
3641
+ D !== 0 && (A(g.map((e, t) => t === b ? {
3638
3642
  ...e,
3639
3643
  motions: E.filter((e, t) => t !== D - 1)
3640
3644
  } : e)), T(D - 1));
3641
3645
  }
3642
3646
  }),
3643
- o !== "generate" && be.map((t, n) => /* @__PURE__ */ F(fe, { children: [
3644
- t.key === "arrangement" && /* @__PURE__ */ F(he, { children: [/* @__PURE__ */ P("span", {
3647
+ l !== "generate" && xe.map((e, n) => /* @__PURE__ */ P(me, { children: [
3648
+ e.key === "arrangement" && /* @__PURE__ */ P(ve, { children: [/* @__PURE__ */ N("span", {
3645
3649
  className: "kol-helper-10 text-meta",
3646
3650
  children: "OpenType"
3647
- }), /* @__PURE__ */ P(bt, {
3651
+ }), /* @__PURE__ */ N(Ct, {
3648
3652
  value: L?.opentype ?? {},
3649
- onToggle: (e, t) => j(b, { opentype: {
3653
+ onToggle: (e, t) => le(b, { opentype: {
3650
3654
  ...L?.opentype ?? {},
3651
3655
  [e]: t
3652
3656
  } })
3653
3657
  })] }),
3654
- t.section && t.section !== be[n - 1]?.section && /* @__PURE__ */ P("span", {
3658
+ e.section && e.section !== xe[n - 1]?.section && /* @__PURE__ */ N("span", {
3655
3659
  className: "kol-helper-10 text-meta",
3656
- children: t.section
3660
+ children: e.section
3657
3661
  }),
3658
- /* @__PURE__ */ P(vt, {
3659
- knob: t,
3660
- comp: ae(t),
3662
+ /* @__PURE__ */ N(xt, {
3663
+ knob: e,
3664
+ comp: oe(e),
3661
3665
  idx: b,
3662
- palette: i,
3663
- onWrite: me
3666
+ palette: o,
3667
+ onWrite: pe
3664
3668
  }),
3665
- t.key === "showPath" && L?.path?.type === "custom" && /* @__PURE__ */ P(xt, {
3669
+ e.key === "showPath" && L?.path?.type === "custom" && /* @__PURE__ */ N(wt, {
3666
3670
  inst: L,
3667
- layer: e,
3668
- onPoints: (e) => j(b, { path: {
3671
+ layer: t,
3672
+ onPoints: (e) => le(b, { path: {
3669
3673
  ...L?.path ?? {},
3670
3674
  points: e
3671
3675
  } })
3672
3676
  })
3673
- ] }, t.key)),
3674
- o === "anim" && xe && /* @__PURE__ */ P(St, {
3675
- layer: e,
3676
- setProp: n,
3677
- insts: h,
3678
- renderAnimate: a
3677
+ ] }, e.key)),
3678
+ l === "anim" && Se && /* @__PURE__ */ N(Tt, {
3679
+ layer: t,
3680
+ setProp: r,
3681
+ insts: g,
3682
+ renderAnimate: c
3679
3683
  })
3680
3684
  ] });
3681
3685
  }
3682
- function gt({ layer: e, onPreset: t }) {
3683
- return /* @__PURE__ */ P(ne, {
3684
- tree: Me,
3686
+ function yt({ layer: e, onPreset: t }) {
3687
+ return /* @__PURE__ */ N(te, {
3688
+ tree: Fe,
3685
3689
  presets: V,
3686
3690
  current: V.find((t) => t.id === e.presetId) ?? V[0],
3687
3691
  onPick: t
3688
3692
  });
3689
3693
  }
3690
- function _t({ insts: e, idx: n, onSelect: r, onWrite: i, marked: a, onMark: o, onGroup: s, onUngroup: c }) {
3691
- let l = t(), u = () => {
3694
+ function bt({ insts: e, idx: t, onSelect: r, onWrite: i, marked: a, onMark: o, onGroup: s, onUngroup: c }) {
3695
+ let l = n(), u = () => {
3692
3696
  let t = e.length;
3693
3697
  for (; e.some((e) => e.id === `i${t}`);) t++;
3694
3698
  return `i${t}`;
3695
3699
  }, d = () => {
3696
- let t = {
3700
+ let n = {
3697
3701
  id: u(),
3698
3702
  text: "Text"
3699
3703
  };
3700
- e[n]?.fill && (t.fill = e[n].fill), i([...e, De(t, e.length)]), r(e.length);
3704
+ e[t]?.fill && (n.fill = e[t].fill), i([...e, Ae(n, e.length)]), r(e.length);
3701
3705
  }, f = (t) => {
3702
3706
  let n = {
3703
3707
  ...structuredClone(e[t]),
@@ -3706,82 +3710,84 @@ function _t({ insts: e, idx: n, onSelect: r, onWrite: i, marked: a, onMark: o, o
3706
3710
  a.splice(t + 1, 0, n), i(a), r(t + 1);
3707
3711
  }, p = (t) => {
3708
3712
  e.length <= 1 || (i(e.filter((e, n) => n !== t)), r(Math.min(t, e.length - 2)));
3709
- }, h = (t) => {
3710
- let a = n + t;
3713
+ }, m = (n) => {
3714
+ let a = t + n;
3711
3715
  if (a < 0 || a >= e.length) return;
3712
- let o = [...e], [s] = o.splice(n, 1);
3716
+ let o = [...e], [s] = o.splice(t, 1);
3713
3717
  o.splice(a, 0, s), i(o), r(a);
3714
- }, g = [...new Set(e.map((e) => e.group).filter(Boolean))];
3715
- return /* @__PURE__ */ F(he, { children: [
3716
- /* @__PURE__ */ P("div", {
3718
+ }, h = [...new Set(e.map((e) => e.group).filter(Boolean))];
3719
+ return /* @__PURE__ */ P(ve, { children: [
3720
+ /* @__PURE__ */ N("div", {
3717
3721
  className: "flex flex-col gap-1",
3718
- children: e.map((t, i) => {
3719
- let s = mt(t.group, g);
3720
- return /* @__PURE__ */ F("div", {
3722
+ children: e.map((n, i) => {
3723
+ let s = _t(n.group, h);
3724
+ return /* @__PURE__ */ P("div", {
3721
3725
  onClick: () => r(i),
3722
- className: `flex items-center gap-2 pl-2 pr-1 py-1 rounded cursor-pointer kol-helper-12 ${i === n ? "bg-[color-mix(in_srgb,var(--kol-accent-primary)_26%,transparent)] text-emphasis" : "text-body hover:bg-fg-04 hover:text-emphasis"}`,
3726
+ className: `flex items-center gap-2 pl-2 pr-1 py-1 rounded cursor-pointer kol-helper-12 ${i === t ? "bg-[color-mix(in_srgb,var(--kol-accent-primary)_26%,transparent)] text-emphasis" : "text-body hover:bg-oq-04 hover:text-emphasis"}`,
3723
3727
  children: [
3724
- /* @__PURE__ */ P("span", {
3728
+ /* @__PURE__ */ N("span", {
3725
3729
  onClick: (e) => e.stopPropagation(),
3726
3730
  className: "shrink-0",
3727
3731
  style: { lineHeight: 0 },
3728
- children: /* @__PURE__ */ P(le, {
3729
- checked: a.includes(t.id),
3730
- onChange: () => o(t.id)
3732
+ children: /* @__PURE__ */ N(ue, {
3733
+ checked: a.includes(n.id),
3734
+ onChange: () => o(n.id)
3731
3735
  })
3732
3736
  }),
3733
- /* @__PURE__ */ P("span", {
3737
+ /* @__PURE__ */ N("span", {
3734
3738
  className: "kol-helper-10 text-meta shrink-0",
3735
3739
  children: i + 1
3736
3740
  }),
3737
- /* @__PURE__ */ P("span", {
3741
+ /* @__PURE__ */ N("span", {
3738
3742
  className: "truncate flex-1 min-w-0",
3739
- children: t.text || "—"
3743
+ children: n.text || "—"
3740
3744
  }),
3741
- s && /* @__PURE__ */ F("span", {
3745
+ s && /* @__PURE__ */ P("span", {
3742
3746
  className: "shrink-0 kol-helper-10 text-meta",
3743
3747
  children: ["grp ", s]
3744
3748
  }),
3745
- /* @__PURE__ */ P(O, {
3746
- iconComponent: m,
3747
- variant: "ghost",
3748
- size: l,
3749
- quiet: !0,
3750
- iconOnly: "duplicate",
3751
- iconSize: 12,
3752
- "aria-label": "Duplicate element",
3753
- title: "Duplicate element",
3754
- onClick: (e) => {
3755
- e.stopPropagation(), f(i);
3756
- }
3749
+ /* @__PURE__ */ N(j, {
3750
+ label: "Duplicate element",
3751
+ children: /* @__PURE__ */ N(O, {
3752
+ variant: "ghost",
3753
+ size: l,
3754
+ quiet: !0,
3755
+ iconOnly: "copy",
3756
+ iconSize: 12,
3757
+ "aria-label": "Duplicate element",
3758
+ onClick: (e) => {
3759
+ e.stopPropagation(), f(i);
3760
+ }
3761
+ })
3757
3762
  }),
3758
- /* @__PURE__ */ P(O, {
3759
- iconComponent: m,
3760
- variant: "ghost",
3761
- size: l,
3762
- quiet: !0,
3763
- iconOnly: "close",
3764
- iconSize: 10,
3765
- "aria-label": "Remove element",
3766
- title: "Remove element",
3767
- disabled: e.length <= 1,
3768
- onClick: (e) => {
3769
- e.stopPropagation(), p(i);
3770
- }
3763
+ /* @__PURE__ */ N(j, {
3764
+ label: "Remove element",
3765
+ children: /* @__PURE__ */ N(O, {
3766
+ variant: "ghost",
3767
+ size: l,
3768
+ quiet: !0,
3769
+ iconOnly: "x",
3770
+ iconSize: 10,
3771
+ "aria-label": "Remove element",
3772
+ disabled: e.length <= 1,
3773
+ onClick: (e) => {
3774
+ e.stopPropagation(), p(i);
3775
+ }
3776
+ })
3771
3777
  })
3772
3778
  ]
3773
- }, t.id ?? i);
3779
+ }, n.id ?? i);
3774
3780
  })
3775
3781
  }),
3776
- /* @__PURE__ */ F("div", {
3782
+ /* @__PURE__ */ P("div", {
3777
3783
  className: "grid grid-cols-2 gap-1",
3778
- children: [/* @__PURE__ */ P(O, {
3784
+ children: [/* @__PURE__ */ N(O, {
3779
3785
  variant: "primary",
3780
3786
  size: l,
3781
3787
  disabled: a.length < 2,
3782
3788
  onClick: s,
3783
3789
  children: "Group"
3784
- }), /* @__PURE__ */ P(O, {
3790
+ }), /* @__PURE__ */ N(O, {
3785
3791
  variant: "primary",
3786
3792
  size: l,
3787
3793
  disabled: !a.length,
@@ -3789,11 +3795,10 @@ function _t({ insts: e, idx: n, onSelect: r, onWrite: i, marked: a, onMark: o, o
3789
3795
  children: "Ungroup"
3790
3796
  })]
3791
3797
  }),
3792
- /* @__PURE__ */ F("div", {
3798
+ /* @__PURE__ */ P("div", {
3793
3799
  className: "flex items-center gap-1",
3794
3800
  children: [
3795
- /* @__PURE__ */ P(O, {
3796
- iconComponent: m,
3801
+ /* @__PURE__ */ N(O, {
3797
3802
  variant: "primary",
3798
3803
  size: l,
3799
3804
  className: "flex-1",
@@ -3802,123 +3807,130 @@ function _t({ insts: e, idx: n, onSelect: r, onWrite: i, marked: a, onMark: o, o
3802
3807
  onClick: d,
3803
3808
  children: "Add element"
3804
3809
  }),
3805
- /* @__PURE__ */ P(O, {
3806
- variant: "ghost",
3807
- size: l,
3808
- quiet: !0,
3809
- style: pt,
3810
- "aria-label": "Move element up",
3811
- title: "Move element up",
3812
- disabled: n <= 0,
3813
- onClick: () => h(-1),
3814
- children: /* @__PURE__ */ P(m, {
3815
- name: "chevron-down",
3816
- size: 12,
3817
- style: { transform: "rotate(180deg)" }
3810
+ /* @__PURE__ */ N(j, {
3811
+ label: "Move element up",
3812
+ children: /* @__PURE__ */ N(O, {
3813
+ variant: "ghost",
3814
+ size: l,
3815
+ quiet: !0,
3816
+ style: gt,
3817
+ "aria-label": "Move element up",
3818
+ disabled: t <= 0,
3819
+ onClick: () => m(-1),
3820
+ children: /* @__PURE__ */ N(F, {
3821
+ name: "chevron-down",
3822
+ size: 12,
3823
+ style: { transform: "rotate(180deg)" }
3824
+ })
3818
3825
  })
3819
3826
  }),
3820
- /* @__PURE__ */ P(O, {
3821
- variant: "ghost",
3822
- size: l,
3823
- quiet: !0,
3824
- style: pt,
3825
- "aria-label": "Move element down",
3826
- title: "Move element down",
3827
- disabled: n >= e.length - 1,
3828
- onClick: () => h(1),
3829
- children: /* @__PURE__ */ P(m, {
3830
- name: "chevron-down",
3831
- size: 12
3827
+ /* @__PURE__ */ N(j, {
3828
+ label: "Move element down",
3829
+ children: /* @__PURE__ */ N(O, {
3830
+ variant: "ghost",
3831
+ size: l,
3832
+ quiet: !0,
3833
+ style: gt,
3834
+ "aria-label": "Move element down",
3835
+ disabled: t >= e.length - 1,
3836
+ onClick: () => m(1),
3837
+ children: /* @__PURE__ */ N(F, {
3838
+ name: "chevron-down",
3839
+ size: 12
3840
+ })
3832
3841
  })
3833
3842
  })
3834
3843
  ]
3835
3844
  })
3836
3845
  ] });
3837
3846
  }
3838
- function vt({ knob: e, comp: n, idx: r, palette: i, onWrite: a }) {
3839
- let o = t(), s = e.get(n, r), l = (t) => a(e, t);
3840
- if (e.type === "color") return /* @__PURE__ */ P(f, {
3841
- label: e.label,
3842
- value: s,
3843
- onChange: (e) => l(c(e, i) ?? e),
3844
- palette: i
3847
+ function xt({ knob: t, comp: r, idx: i, palette: a, onWrite: o }) {
3848
+ let c = n(), l = t.get(r, i), u = (e) => o(t, e);
3849
+ if (t.type === "color") return /* @__PURE__ */ N(s, {
3850
+ label: t.label,
3851
+ value: l,
3852
+ onChange: (t) => u(e(t, a) ?? t),
3853
+ palette: a
3845
3854
  });
3846
- if (e.type === "select") return /* @__PURE__ */ P(k, {
3847
- label: e.label,
3848
- children: /* @__PURE__ */ P(ie, {
3855
+ if (t.type === "select") return /* @__PURE__ */ N(ae, {
3856
+ label: t.label,
3857
+ children: /* @__PURE__ */ N(re, {
3849
3858
  variant: "subtle",
3850
- size: o,
3859
+ size: c,
3851
3860
  className: "w-full",
3852
- options: ot(e, n, r),
3853
- value: s,
3854
- onChange: l
3861
+ options: lt(t, r, i),
3862
+ value: l,
3863
+ onChange: u
3855
3864
  })
3856
3865
  });
3857
- let { min: u, max: d } = st(e, n, r);
3858
- return /* @__PURE__ */ P(k, {
3859
- label: e.label,
3860
- children: /* @__PURE__ */ P(j, {
3861
- min: u,
3862
- max: d,
3863
- step: e.step ?? 1,
3864
- value: typeof s == "number" ? s : u,
3865
- onChange: l
3866
+ let { min: d, max: f } = ut(t, r, i);
3867
+ return /* @__PURE__ */ N(ae, {
3868
+ label: t.label,
3869
+ children: /* @__PURE__ */ N(A, {
3870
+ min: d,
3871
+ max: f,
3872
+ step: t.step ?? 1,
3873
+ value: typeof l == "number" ? l : d,
3874
+ onChange: u
3866
3875
  })
3867
3876
  });
3868
3877
  }
3869
- function yt({ motions: e, mIdx: n, onSelect: r, onAdd: i, onRemove: a }) {
3870
- let o = t(), s = [{
3878
+ function St({ motions: e, mIdx: t, onSelect: r, onAdd: i, onRemove: a }) {
3879
+ let o = n(), s = [{
3871
3880
  value: "0",
3872
3881
  label: "1"
3873
3882
  }, ...e.map((e, t) => ({
3874
3883
  value: String(t + 1),
3875
3884
  label: String(t + 2)
3876
3885
  }))];
3877
- return /* @__PURE__ */ F("div", {
3886
+ return /* @__PURE__ */ P("div", {
3878
3887
  className: "flex flex-col gap-1",
3879
- children: [/* @__PURE__ */ P("span", {
3888
+ children: [/* @__PURE__ */ N("span", {
3880
3889
  className: "kol-helper-10 text-meta",
3881
3890
  children: "Motion layers"
3882
- }), /* @__PURE__ */ F("div", {
3891
+ }), /* @__PURE__ */ P("div", {
3883
3892
  className: "flex items-center gap-1",
3884
3893
  children: [
3885
- /* @__PURE__ */ P("div", {
3894
+ /* @__PURE__ */ N("div", {
3886
3895
  className: "flex-1 min-w-0",
3887
- children: /* @__PURE__ */ P(A, {
3888
- value: String(n),
3896
+ children: /* @__PURE__ */ N(k, {
3897
+ variant: "filled",
3898
+ value: String(t),
3889
3899
  onChange: (e) => r(Number(e)),
3890
3900
  options: s
3891
3901
  })
3892
3902
  }),
3893
- /* @__PURE__ */ P(O, {
3894
- iconComponent: m,
3895
- variant: "ghost",
3896
- size: o,
3897
- quiet: !0,
3898
- iconOnly: "plus",
3899
- iconSize: 12,
3900
- "aria-label": "Add motion layer",
3901
- title: "Add motion layer",
3902
- onClick: i
3903
+ /* @__PURE__ */ N(j, {
3904
+ label: "Add motion layer",
3905
+ children: /* @__PURE__ */ N(O, {
3906
+ variant: "ghost",
3907
+ size: o,
3908
+ quiet: !0,
3909
+ iconOnly: "plus",
3910
+ iconSize: 12,
3911
+ "aria-label": "Add motion layer",
3912
+ onClick: i
3913
+ })
3903
3914
  }),
3904
- /* @__PURE__ */ P(O, {
3905
- iconComponent: m,
3906
- variant: "ghost",
3907
- size: o,
3908
- quiet: !0,
3909
- iconOnly: "close",
3910
- iconSize: 10,
3911
- "aria-label": "Remove motion layer",
3912
- title: "Remove motion layer (the primary can only be set to None)",
3913
- disabled: n === 0,
3914
- onClick: a
3915
+ /* @__PURE__ */ N(j, {
3916
+ label: "Remove motion layer (the primary can only be set to None)",
3917
+ children: /* @__PURE__ */ N(O, {
3918
+ variant: "ghost",
3919
+ size: o,
3920
+ quiet: !0,
3921
+ iconOnly: "x",
3922
+ iconSize: 10,
3923
+ "aria-label": "Remove motion layer",
3924
+ disabled: t === 0,
3925
+ onClick: a
3926
+ })
3915
3927
  })
3916
3928
  ]
3917
3929
  })]
3918
3930
  });
3919
3931
  }
3920
- function bt({ value: e = {}, onToggle: t }) {
3921
- let [n, r] = N(!1), i = de({
3932
+ function Ct({ value: e = {}, onToggle: t }) {
3933
+ let [n, r] = M(!1), i = pe({
3922
3934
  open: n,
3923
3935
  onOpenChange: r,
3924
3936
  placement: "bottom-start",
@@ -3926,10 +3938,10 @@ function bt({ value: e = {}, onToggle: t }) {
3926
3938
  flip: !1,
3927
3939
  matchReferenceWidth: !0,
3928
3940
  role: "listbox"
3929
- }), a = Be.filter((t) => e[t.tag]).length;
3930
- return /* @__PURE__ */ F("div", {
3941
+ }), a = Ue.filter((t) => e[t.tag]).length;
3942
+ return /* @__PURE__ */ P("div", {
3931
3943
  className: "relative w-full",
3932
- children: [/* @__PURE__ */ F("button", {
3944
+ children: [/* @__PURE__ */ P("button", {
3933
3945
  ref: i.refs.setReference,
3934
3946
  ...i.getReferenceProps(),
3935
3947
  type: "button",
@@ -3944,7 +3956,7 @@ function bt({ value: e = {}, onToggle: t }) {
3944
3956
  },
3945
3957
  "aria-haspopup": "listbox",
3946
3958
  "aria-expanded": n,
3947
- children: [/* @__PURE__ */ P("span", { children: a ? `${a} feature${a > 1 ? "s" : ""}` : "None" }), /* @__PURE__ */ P(m, {
3959
+ children: [/* @__PURE__ */ N("span", { children: a ? `${a} feature${a > 1 ? "s" : ""}` : "None" }), /* @__PURE__ */ N(F, {
3948
3960
  name: "chevron-down",
3949
3961
  size: 10,
3950
3962
  className: "ml-auto",
@@ -3953,7 +3965,7 @@ function bt({ value: e = {}, onToggle: t }) {
3953
3965
  transition: "transform 300ms"
3954
3966
  }
3955
3967
  })]
3956
- }), /* @__PURE__ */ P(se, {
3968
+ }), /* @__PURE__ */ N(se, {
3957
3969
  popover: i,
3958
3970
  panel: !1,
3959
3971
  focus: !1,
@@ -3963,12 +3975,12 @@ function bt({ value: e = {}, onToggle: t }) {
3963
3975
  borderRadius: "0 0 4px 4px",
3964
3976
  zIndex: 200
3965
3977
  },
3966
- children: /* @__PURE__ */ P("div", {
3978
+ children: /* @__PURE__ */ N("div", {
3967
3979
  className: "flex max-h-[300px] flex-col items-stretch overflow-y-auto",
3968
3980
  role: "listbox",
3969
- children: Be.map((n) => /* @__PURE__ */ P(oe, {
3981
+ children: Ue.map((n) => /* @__PURE__ */ N(oe, {
3970
3982
  onClick: () => t(n.tag, !e[n.tag]),
3971
- shortcut: e[n.tag] ? /* @__PURE__ */ P(m, {
3983
+ shortcut: e[n.tag] ? /* @__PURE__ */ N(F, {
3972
3984
  name: "check",
3973
3985
  size: 11
3974
3986
  }) : void 0,
@@ -3978,8 +3990,8 @@ function bt({ value: e = {}, onToggle: t }) {
3978
3990
  })]
3979
3991
  });
3980
3992
  }
3981
- function xt({ inst: e, layer: n, onPoints: r }) {
3982
- let i = t(), a = M(null), o = M(null), s = e?.path?.points, c = Array.isArray(s) && s.length >= 2 ? s : ve, l = n.w > 0 && n.h > 0 ? n.w / n.h : 1, u = Ce("custom", 100, 100, { points: c }).d, d = (e) => (t) => {
3993
+ function wt({ inst: e, layer: t, onPoints: r }) {
3994
+ let i = n(), a = _e(null), o = _e(null), s = e?.path?.points, c = Array.isArray(s) && s.length >= 2 ? s : xe, l = t.w > 0 && t.h > 0 ? t.w / t.h : 1, u = Ee("custom", 100, 100, { points: c }).d, d = (e) => (t) => {
3983
3995
  t.preventDefault(), t.stopPropagation(), t.currentTarget.setPointerCapture(t.pointerId), o.current = { i: e };
3984
3996
  }, f = (e) => {
3985
3997
  let t = o.current, n = a.current;
@@ -3994,24 +4006,24 @@ function xt({ inst: e, layer: n, onPoints: r }) {
3994
4006
  e.currentTarget.releasePointerCapture(e.pointerId);
3995
4007
  } catch {}
3996
4008
  };
3997
- return /* @__PURE__ */ F("div", {
4009
+ return /* @__PURE__ */ P("div", {
3998
4010
  className: "flex flex-col gap-2",
3999
- children: [/* @__PURE__ */ F("div", {
4011
+ children: [/* @__PURE__ */ P("div", {
4000
4012
  ref: a,
4001
4013
  className: "relative w-full rounded border border-oq-08 overflow-hidden",
4002
4014
  style: { aspectRatio: `${l}` },
4003
- children: [/* @__PURE__ */ P("svg", {
4015
+ children: [/* @__PURE__ */ N("svg", {
4004
4016
  className: "absolute inset-0 w-full h-full",
4005
4017
  viewBox: "0 0 100 100",
4006
4018
  preserveAspectRatio: "none",
4007
- children: /* @__PURE__ */ P("path", {
4019
+ children: /* @__PURE__ */ N("path", {
4008
4020
  d: u,
4009
4021
  fill: "none",
4010
4022
  stroke: "var(--kol-accent-primary)",
4011
4023
  strokeWidth: 1.5,
4012
4024
  vectorEffect: "non-scaling-stroke"
4013
4025
  })
4014
- }), c.map((e, t) => /* @__PURE__ */ P("div", {
4026
+ }), c.map((e, t) => /* @__PURE__ */ N("div", {
4015
4027
  onPointerDown: d(t),
4016
4028
  onPointerMove: f,
4017
4029
  onPointerUp: p,
@@ -4028,14 +4040,14 @@ function xt({ inst: e, layer: n, onPoints: r }) {
4028
4040
  boxShadow: "0 0 0 1px rgba(0,0,0,0.5)"
4029
4041
  }
4030
4042
  }, t))]
4031
- }), /* @__PURE__ */ F("div", {
4043
+ }), /* @__PURE__ */ P("div", {
4032
4044
  className: "grid grid-cols-2 gap-2",
4033
- children: [/* @__PURE__ */ P(O, {
4045
+ children: [/* @__PURE__ */ N(O, {
4034
4046
  variant: "primary",
4035
4047
  size: i,
4036
4048
  onClick: () => r([...c, [.5, .5]]),
4037
4049
  children: "Add point"
4038
- }), /* @__PURE__ */ P(O, {
4050
+ }), /* @__PURE__ */ N(O, {
4039
4051
  variant: "primary",
4040
4052
  size: i,
4041
4053
  disabled: c.length <= 2,
@@ -4045,275 +4057,167 @@ function xt({ inst: e, layer: n, onPoints: r }) {
4045
4057
  })]
4046
4058
  });
4047
4059
  }
4048
- function St({ layer: e, setProp: t, insts: n, renderAnimate: r }) {
4049
- let i = lt, a = e[i.key], s = o(a), c = n.find((e) => e?.morph?.on)?.morph?.blend ?? i.default, l = typeof a == "number" ? a : c, u = s ? /* @__PURE__ */ P("div", {
4060
+ function Tt({ layer: e, setProp: t, insts: n, renderAnimate: r }) {
4061
+ let i = ft, a = e[i.key], o = f(a), s = n.find((e) => e?.morph?.on)?.morph?.blend ?? i.default, c = typeof a == "number" ? a : s, l = o ? /* @__PURE__ */ N("div", {
4050
4062
  className: "kol-helper-12 text-meta italic px-1",
4051
4063
  children: "animated"
4052
- }) : /* @__PURE__ */ P(j, {
4064
+ }) : /* @__PURE__ */ N(A, {
4053
4065
  min: i.min,
4054
4066
  max: i.max,
4055
4067
  step: i.step,
4056
- value: l,
4068
+ value: c,
4057
4069
  onChange: (e) => t(i.key, e)
4058
4070
  });
4059
- return /* @__PURE__ */ P(k, {
4071
+ return /* @__PURE__ */ N(ae, {
4060
4072
  label: i.label,
4061
- children: /* @__PURE__ */ F("div", {
4073
+ children: /* @__PURE__ */ P("div", {
4062
4074
  className: "flex items-center gap-2",
4063
- children: [/* @__PURE__ */ P("div", {
4075
+ children: [/* @__PURE__ */ N("div", {
4064
4076
  className: "flex-1 min-w-0",
4065
- children: u
4077
+ children: l
4066
4078
  }), r(i)]
4067
4079
  })
4068
4080
  });
4069
4081
  }
4070
4082
  //#endregion
4071
4083
  //#region src/editor/params/TimelineDock.jsx
4072
- function Ct(e, t = []) {
4084
+ function Et(e, t = []) {
4073
4085
  for (let n of e) {
4074
4086
  for (let e in n) {
4075
4087
  let r = n[e];
4076
- o(r) && r.bind === "track" && t.push({
4077
- layer: n,
4088
+ f(r) && r.bind === "track" && t.push({
4089
+ id: `${n.id}:${e}`,
4090
+ layerId: n.id,
4078
4091
  key: e,
4092
+ label: `${D(n)} · ${e}`,
4079
4093
  keys: r.keys
4080
4094
  });
4081
4095
  }
4082
- Array.isArray(n.children) && Ct(n.children, t);
4096
+ Array.isArray(n.children) && Et(n.children, t);
4083
4097
  }
4084
4098
  return t;
4085
4099
  }
4086
- function wt() {
4087
- let { layers: t, updateLayer: r } = n(), { t: i, seek: a } = e(), o = me(() => Ct(t), [t]), [s, c] = N(null);
4088
- if (o.length === 0) return null;
4089
- let l = (e, t) => {
4090
- let n = [...t].sort((e, t) => e.t - t.t);
4091
- r(e.layer.id, { [e.key]: {
4092
- bind: "track",
4093
- keys: n
4094
- } });
4095
- };
4096
- return /* @__PURE__ */ F("div", {
4097
- className: "border-t border-oq-08 px-4 py-2 flex flex-col gap-1 select-none",
4098
- style: { background: "var(--kol-surface-primary)" },
4099
- children: [
4100
- /* @__PURE__ */ P(Tt, {
4101
- t: i,
4102
- seek: a
4103
- }),
4104
- o.map((e) => /* @__PURE__ */ P(Dt, {
4105
- track: e,
4106
- t: i,
4107
- selected: s,
4108
- setSelected: c,
4109
- writeKeys: l
4110
- }, `${e.layer.id}:${e.key}`)),
4111
- /* @__PURE__ */ P(kt, {
4112
- tracks: o,
4113
- selected: s,
4114
- setSelected: c,
4115
- writeKeys: l
4116
- })
4117
- ]
4100
+ function Dt() {
4101
+ let { layers: e, updateLayer: n } = l(), { t: r, seek: i } = t(), a = ge(() => Et(e), [e]);
4102
+ return /* @__PURE__ */ N(le, {
4103
+ tracks: a,
4104
+ t: r,
4105
+ onSeek: i,
4106
+ onChange: (e, t) => {
4107
+ let r = a.find((t) => t.id === e);
4108
+ r && n(r.layerId, { [r.key]: {
4109
+ bind: "track",
4110
+ keys: t
4111
+ } });
4112
+ },
4113
+ easingOptions: h
4118
4114
  });
4119
4115
  }
4120
- function Tt({ t: e, seek: t }) {
4121
- let n = M(null), r = (e) => {
4122
- let t = n.current.getBoundingClientRect();
4123
- return Math.min(1, Math.max(0, (e.clientX - t.left) / t.width));
4124
- };
4125
- return /* @__PURE__ */ F("div", {
4126
- className: "flex items-center gap-3",
4127
- children: [/* @__PURE__ */ P("span", {
4128
- className: "kol-mono-12 text-meta tabular-nums shrink-0 text-right",
4129
- style: { width: 120 },
4130
- children: e.toFixed(2)
4131
- }), /* @__PURE__ */ P("div", {
4132
- ref: n,
4133
- className: "relative flex-1 h-4 cursor-ew-resize rounded",
4134
- style: { background: "var(--kol-fg-04)" },
4135
- onPointerDown: (e) => {
4136
- e.currentTarget.setPointerCapture(e.pointerId), t(r(e));
4116
+ //#endregion
4117
+ //#region src/editor/params/TransportBar.jsx
4118
+ function Ot({ seconds: e, onCommit: t, size: n }) {
4119
+ let r = String(e), [i, a] = M(r), [o, s] = M(!1);
4120
+ return he(() => {
4121
+ o || a(r);
4122
+ }, [r, o]), /* @__PURE__ */ N(j, {
4123
+ label: "Loop length",
4124
+ triggerClassName: "flex w-full",
4125
+ children: /* @__PURE__ */ N(ie, {
4126
+ type: "text",
4127
+ inputMode: "decimal",
4128
+ variant: "property",
4129
+ size: n,
4130
+ affordance: "Loop /",
4131
+ unit: "s",
4132
+ chars: 3,
4133
+ "aria-label": "Loop length in seconds",
4134
+ value: i,
4135
+ onFocus: (e) => {
4136
+ s(!0), e.target.select();
4137
4137
  },
4138
- onPointerMove: (e) => {
4139
- e.buttons & 1 && t(r(e));
4138
+ onChange: (e) => a(e.target.value),
4139
+ onBlur: () => {
4140
+ s(!1);
4141
+ let e = Number(i.trim());
4142
+ if (i.trim() === "" || !Number.isFinite(e)) {
4143
+ a(r);
4144
+ return;
4145
+ }
4146
+ t(e);
4140
4147
  },
4141
- children: /* @__PURE__ */ P(Et, { t: e })
4142
- })]
4143
- });
4144
- }
4145
- function Et({ t: e }) {
4146
- return /* @__PURE__ */ P("span", {
4147
- "aria-hidden": "true",
4148
- className: "absolute top-0 bottom-0",
4149
- style: {
4150
- left: `${e * 100}%`,
4151
- width: 1.5,
4152
- background: "var(--kol-accent-primary)"
4153
- }
4154
- });
4155
- }
4156
- function Dt({ track: e, t, selected: n, setSelected: r, writeKeys: i }) {
4157
- let a = M(null), o = M(null), [, s] = N(0), c = (e) => {
4158
- let t = a.current.getBoundingClientRect();
4159
- return Math.min(1, Math.max(0, (e.clientX - t.left) / t.width));
4160
- }, l = (t) => n && n.layerId === e.layer.id && n.key === e.key && n.index === t, u = (t) => {
4161
- if (t.target.dataset.diamond !== void 0) return;
4162
- let n = c(t), a = Ot(e.keys, n), o = [...e.keys, {
4163
- t: n,
4164
- v: a,
4165
- easing: "linear"
4166
- }].sort((e, t) => e.t - t.t);
4167
- i(e, o), r({
4168
- layerId: e.layer.id,
4169
- key: e.key,
4170
- index: o.findIndex((e) => e.t === n)
4171
- });
4172
- }, d = (t) => (n) => {
4173
- if (n.stopPropagation(), n.altKey) {
4174
- e.keys.length > 1 && (i(e, e.keys.filter((e, n) => n !== t)), r(null));
4175
- return;
4176
- }
4177
- n.currentTarget.setPointerCapture(n.pointerId), o.current = {
4178
- index: t,
4179
- t: e.keys[t].t
4180
- }, r({
4181
- layerId: e.layer.id,
4182
- key: e.key,
4183
- index: t
4184
- });
4185
- }, f = (e) => (t) => {
4186
- !o.current || o.current.index !== e || (o.current.t = c(t), s((e) => e + 1));
4187
- }, p = (t) => () => {
4188
- if (!o.current || o.current.index !== t) return;
4189
- let n = {
4190
- ...e.keys[t],
4191
- t: o.current.t
4192
- }, a = e.keys.map((e, r) => r === t ? n : e);
4193
- o.current = null, i(e, a), r(null);
4194
- };
4195
- return /* @__PURE__ */ F("div", {
4196
- className: "flex items-center gap-3",
4197
- children: [/* @__PURE__ */ F("span", {
4198
- className: "kol-helper-10 text-meta truncate shrink-0 text-right",
4199
- style: { width: 120 },
4200
- title: `${re(e.layer)} · ${e.key}`,
4201
- children: [
4202
- re(e.layer),
4203
- " · ",
4204
- e.key
4205
- ]
4206
- }), /* @__PURE__ */ F("div", {
4207
- ref: a,
4208
- className: "relative flex-1 h-5 rounded cursor-copy",
4209
- style: { background: "var(--kol-fg-04)" },
4210
- onPointerDown: u,
4211
- children: [/* @__PURE__ */ P(Et, { t }), e.keys.map((e, t) => {
4212
- let n = o.current?.index === t ? o.current.t : e.t;
4213
- return /* @__PURE__ */ P("span", {
4214
- "data-diamond": "",
4215
- onPointerDown: d(t),
4216
- onPointerMove: f(t),
4217
- onPointerUp: p(t),
4218
- title: `t=${n.toFixed(2)} v=${typeof e.v == "number" ? Math.round(e.v * 100) / 100 : e.v} (alt-click deletes)`,
4219
- className: "absolute top-1/2 cursor-grab",
4220
- style: {
4221
- left: `${n * 100}%`,
4222
- width: 9,
4223
- height: 9,
4224
- transform: "translate(-50%, -50%) rotate(45deg)",
4225
- background: l(t) ? "var(--kol-accent-primary)" : "var(--kol-fg-emphasis)",
4226
- borderRadius: 1.5
4227
- }
4228
- }, t);
4229
- })]
4230
- })]
4148
+ onKeyDown: (e) => {
4149
+ e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (a(r), s(!1), e.currentTarget.blur());
4150
+ },
4151
+ inputClassName: "text-center"
4152
+ })
4231
4153
  });
4232
4154
  }
4233
- function Ot(e, t) {
4234
- if (e.length === 0) return 0;
4235
- if (t <= e[0].t) return e[0].v;
4236
- let n = e[e.length - 1];
4237
- if (t >= n.t) return n.v;
4238
- let r = 0;
4239
- for (; r < e.length - 1 && e[r + 1].t <= t;) r++;
4240
- let i = e[r], a = e[r + 1];
4241
- if (typeof i.v != "number" || typeof a.v != "number") return i.v;
4242
- let o = a.t - i.t || 1;
4243
- return i.v + (a.v - i.v) * ((t - i.t) / o);
4244
- }
4245
- function kt({ tracks: e, selected: t, setSelected: n, writeKeys: i }) {
4246
- if (!t) return null;
4247
- let a = e.find((e) => e.layer.id === t.layerId && e.key === t.key), o = a?.keys[t.index];
4248
- if (!o) return null;
4249
- let s = (e) => {
4250
- i(a, a.keys.map((n, r) => r === t.index ? {
4251
- ...n,
4252
- ...e
4253
- } : n));
4254
- }, c = typeof o.v == "number";
4255
- return /* @__PURE__ */ F("div", {
4256
- className: "flex items-center gap-2 pt-1",
4155
+ var kt = (e, t) => /* @__PURE__ */ N(F, {
4156
+ name: e,
4157
+ size: fe(t, !0)
4158
+ });
4159
+ function At({ size: e = "sm" }) {
4160
+ let { playing: n, loopSeconds: r, play: i, pause: a, stop: o, rewind: s, setLoopSeconds: c } = t();
4161
+ return /* @__PURE__ */ P("div", {
4162
+ className: "flex items-center gap-2",
4257
4163
  children: [
4258
- /* @__PURE__ */ F("span", {
4259
- className: "kol-helper-10 text-meta shrink-0",
4260
- children: ["key @ ", o.t.toFixed(2)]
4261
- }),
4262
- /* @__PURE__ */ P(ae, {
4263
- variant: "ghost",
4264
- size: "sm",
4265
- chars: 7,
4266
- type: c ? "number" : "text",
4267
- value: String(o.v),
4268
- onChange: (e) => s({ v: c ? Number(e.target.value) || 0 : e.target.value })
4269
- }),
4270
- /* @__PURE__ */ P(ie, {
4271
- variant: "subtle",
4272
- size: "sm",
4273
- options: r,
4274
- value: Array.isArray(o.easing) ? "linear" : o.easing ?? "linear",
4275
- onChange: (e) => s({ easing: e })
4164
+ /* @__PURE__ */ N(k, {
4165
+ size: e,
4166
+ ariaLabel: "Playback",
4167
+ value: n ? "play" : "pause",
4168
+ onChange: (e) => e === "play" ? i() : a(),
4169
+ options: [{
4170
+ value: "play",
4171
+ ariaLabel: "Play",
4172
+ tooltip: "Play (Space)",
4173
+ label: kt("play", e)
4174
+ }, {
4175
+ value: "pause",
4176
+ ariaLabel: "Pause",
4177
+ tooltip: "Pause (Space)",
4178
+ label: kt("pause", e)
4179
+ }]
4276
4180
  }),
4277
- /* @__PURE__ */ P("button", {
4278
- type: "button",
4279
- className: "kol-helper-10 text-meta hover:text-emphasis px-2",
4280
- style: {
4281
- background: "transparent",
4282
- border: "none",
4283
- cursor: "pointer"
4284
- },
4285
- onClick: () => {
4286
- a.keys.length > 1 && i(a, a.keys.filter((e, n) => n !== t.index)), n(null);
4287
- },
4288
- children: "Delete key"
4181
+ /* @__PURE__ */ N("div", {
4182
+ className: "flex-1 min-w-0",
4183
+ children: /* @__PURE__ */ N(Ot, {
4184
+ seconds: r,
4185
+ onCommit: c,
4186
+ size: e
4187
+ })
4289
4188
  }),
4290
- /* @__PURE__ */ P("button", {
4291
- type: "button",
4292
- className: "kol-helper-10 text-meta hover:text-emphasis px-2 ml-auto",
4293
- style: {
4294
- background: "transparent",
4295
- border: "none",
4296
- cursor: "pointer"
4297
- },
4298
- onClick: () => n(null),
4299
- children: "Close"
4189
+ /* @__PURE__ */ N(k, {
4190
+ size: e,
4191
+ ariaLabel: "Reset",
4192
+ value: null,
4193
+ onChange: (e) => e === "stop" ? o() : s(),
4194
+ options: [{
4195
+ value: "stop",
4196
+ ariaLabel: "Stop",
4197
+ label: kt("stop", e)
4198
+ }, {
4199
+ value: "rewind",
4200
+ ariaLabel: "Rewind",
4201
+ label: kt("rewind", e)
4202
+ }]
4300
4203
  })
4301
4204
  ]
4302
4205
  });
4303
4206
  }
4304
4207
  //#endregion
4305
4208
  //#region src/packs/motion.js
4306
- var At = {
4209
+ var jt = {
4307
4210
  layerTypes: ["kinetic"],
4308
- kineticPresetById: Ae,
4309
- presetComp: Ne,
4310
- KineticType: Ge,
4311
- loadFonts: te,
4312
- warmFontCss: S,
4313
- kineticFontCss: b,
4314
- KineticPanel: ht,
4315
- TimelineDock: wt
4211
+ kineticPresetById: Ne,
4212
+ presetComp: Ie,
4213
+ KineticType: Je,
4214
+ loadFonts: ee,
4215
+ warmFontCss: x,
4216
+ kineticFontCss: y,
4217
+ KineticPanel: vt,
4218
+ TimelineDock: Dt,
4219
+ TransportBar: At
4316
4220
  };
4317
- h("motion", At);
4221
+ r("motion", jt);
4318
4222
  //#endregion
4319
- export { V as a, ct as i, wt as n, Me as o, ht as r, Ne as s, At as t };
4223
+ export { V as a, dt as i, Dt as n, Fe as o, vt as r, Ie as s, jt as t };