@algorisys/tinyfly 0.127.0 → 0.128.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,5 +1,5 @@
1
- import { H as we, A as Ot, R as de, B as _e, D as hn, E as Eo, F as pt, G as Or, I as be, J as Ir, K as so, L as To, M as Hr, N as jr, O as ba, P as Ao, Q as ya, S as Cr, T as _r, U as xr, V as Fe, W as Nr, X as De, Y as wa, Z as ka, _ as Zo, $ as Rr, a0 as Ke, a1 as Ue, a2 as Ne, a3 as zr, a4 as Kr, a5 as Wr, a6 as va, a7 as He, a8 as Ae, a9 as Sa, aa as Fr, ab as ao, ac as We, ad as Ma, ae as Dr, af as Lr, ag as $a, ah as Br, ai as qr, aj as Gr, ak as Yr, al as Ur, i as Xr, h as Vr, c as Jr, j as Zr, f as Qr, d as ei, b as ti, e as ni, C as oi, am as si, an as ai, ao as ri, ap as ii, aq as li, ar as hi, as as ci, at as di } from "./cricket-play-a5jHHZVh.js";
2
- import { au as Uu, av as Xu, aw as Vu, ax as Ju, ay as Zu, az as Qu, aA as eg, aB as tg, aC as ng, aD as og, aE as sg, aF as ag, aG as rg, aH as ig, aI as lg, aJ as hg, aK as cg, aL as dg, aM as fg, aN as ug, aO as gg, aP as pg, aQ as mg, aR as bg, aS as yg, aT as wg, aU as kg, aV as vg, aW as Sg, aX as Mg, aY as $g, aZ as Eg, a_ as Tg, a$ as Ag, b0 as Pg, b1 as Og, b2 as Ig, b3 as Hg, b4 as jg, b5 as Cg, b6 as _g, b7 as xg, b8 as Ng, b9 as Rg, ba as zg, bb as Kg, bc as Wg, bd as Fg, be as Dg, bf as Lg, bg as Bg, bh as qg, bi as Gg, bj as Yg, bk as Ug, bl as Xg, bm as Vg, bn as Jg, bo as Zg, bp as Qg, bq as ep, br as tp, bs as np, bt as op, bu as sp, bv as ap, bw as rp, bx as ip, by as lp, bz as hp, bA as cp, bB as dp, bC as fp, bD as up, bE as gp, bF as pp, bG as mp, bH as bp, bI as yp, bJ as wp, bK as kp, bL as vp } from "./cricket-play-a5jHHZVh.js";
1
+ import { H as we, A as Ot, R as de, B as _e, D as hn, E as Eo, F as pt, G as Or, I as be, J as Ir, K as so, L as To, M as Hr, N as jr, O as ba, P as Ao, Q as ya, S as Cr, T as _r, U as xr, V as Fe, W as Nr, X as De, Y as wa, Z as ka, _ as Zo, $ as Rr, a0 as We, a1 as Ue, a2 as Ne, a3 as zr, a4 as Wr, a5 as Kr, a6 as va, a7 as He, a8 as Ae, a9 as Sa, aa as Fr, ab as ao, ac as Ke, ad as Ma, ae as Dr, af as Lr, ag as $a, ah as Br, ai as qr, aj as Gr, ak as Yr, al as Ur, i as Xr, h as Vr, c as Jr, j as Zr, f as Qr, d as ei, b as ti, e as ni, C as oi, am as si, an as ai, ao as ri, ap as ii, aq as li, ar as hi, as as ci, at as di } from "./cricket-play-qqm3aXd-.js";
2
+ import { au as Uu, av as Xu, aw as Vu, ax as Ju, ay as Zu, az as Qu, aA as eg, aB as tg, aC as ng, aD as og, aE as sg, aF as ag, aG as rg, aH as ig, aI as lg, aJ as hg, aK as cg, aL as dg, aM as fg, aN as ug, aO as gg, aP as pg, aQ as mg, aR as bg, aS as yg, aT as wg, aU as kg, aV as vg, aW as Sg, aX as Mg, aY as $g, aZ as Eg, a_ as Tg, a$ as Ag, b0 as Pg, b1 as Og, b2 as Ig, b3 as Hg, b4 as jg, b5 as Cg, b6 as _g, b7 as xg, b8 as Ng, b9 as Rg, ba as zg, bb as Wg, bc as Kg, bd as Fg, be as Dg, bf as Lg, bg as Bg, bh as qg, bi as Gg, bj as Yg, bk as Ug, bl as Xg, bm as Vg, bn as Jg, bo as Zg, bp as Qg, bq as ep, br as tp, bs as np, bt as op, bu as sp, bv as ap, bw as rp, bx as ip, by as lp, bz as hp, bA as cp, bB as dp, bC as fp, bD as up, bE as gp, bF as pp, bG as mp, bH as bp, bI as yp, bJ as wp, bK as kp, bL as vp } from "./cricket-play-qqm3aXd-.js";
3
3
  import { getEasingFunction as Et, hashSeed as Xe, mat4 as oe, vec3 as ke, quat as Ge, Timeline as ve, unknownName as ce, createRandom as Tt, springFollow as on, closestName as ro } from "@algorisys/tinyfly";
4
4
  import { f as cn, h as fi, a as Ea } from "./load-scene-oWNsYYC1.js";
5
5
  import { l as Ta, f as Aa } from "./shading-0lPgnXmD.js";
@@ -859,7 +859,7 @@ const Nt = { type: "back", mode: "out", overshoot: 1.1 }, $e = "ease-out-cubic",
859
859
  charleston: Ni,
860
860
  tap: Ri,
861
861
  popping: zi
862
- }, mt = (e, n) => (e % n + n) % n, ts = (e) => e * e * (3 - 2 * e), Ki = (e) => Object.fromEntries(
862
+ }, mt = (e, n) => (e % n + n) % n, ts = (e) => e * e * (3 - 2 * e), Wi = (e) => Object.fromEntries(
863
863
  ["left", "right"].flatMap((n) => Object.entries(we[e]).map(([t, o]) => [`hand.${n}.${t}`, o]))
864
864
  );
865
865
  function zn(e, n = !1) {
@@ -885,7 +885,7 @@ function zn(e, n = !1) {
885
885
  "arm.left.bend": -35 * f,
886
886
  "arm.right.bend": -35 * f,
887
887
  smile: 0.9,
888
- ...Ki(n ? "hold" : "spread")
888
+ ...Wi(n ? "hold" : "spread")
889
889
  };
890
890
  if (!n)
891
891
  for (const p of Object.keys(r)) p.startsWith("arm.") && (u[p] += (r[p] - u[p]) * f);
@@ -937,7 +937,7 @@ function Ca(e, n, t) {
937
937
  const o = Mn(e.pose), r = Co(e).hip, a = Hr(e.character.plan, o, e.character.height), s = Ce(Ce(t, e.position), r), i = jr(s, (o.roll ?? 0) * Math.PI / 180), l = Sn(a.root, ba(i, -(o.turn ?? 0) * Math.PI / 2));
938
938
  return so(e.character.plan, o, n, l, { height: e.character.height });
939
939
  }
940
- function Wi(e, n, t, o = "toe") {
940
+ function Ki(e, n, t, o = "toe") {
941
941
  const r = `leg.${n}`, a = o === "toe" ? 3 : 2;
942
942
  let s = { ...e, pose: Mn(e.pose), position: [...e.position] };
943
943
  for (let l = 0; l < 6; l++) {
@@ -987,7 +987,7 @@ function Fi(e, n) {
987
987
  return Array.from({ length: t }, (h, d) => {
988
988
  const f = l(e, d);
989
989
  if (n.plantFeet === !1) return { ...f, planted: !1 };
990
- const u = l(c.start, d), p = St(u, `leg.${c.side}`, 3), g = Wi(f, c.side, p);
990
+ const u = l(c.start, d), p = St(u, `leg.${c.side}`, 3), g = Ki(f, c.side, p);
991
991
  return {
992
992
  ...f,
993
993
  pose: ya(f.pose, g.pose, c.weight),
@@ -1370,13 +1370,13 @@ function _o(e, n, t, o) {
1370
1370
  }
1371
1371
  function xo(e) {
1372
1372
  const { part: n } = e;
1373
- return n.glow && e.glow > 0 && n.fill ? Ka(n.fill, n.glow.color, e.glow) : n.fill;
1373
+ return n.glow && e.glow > 0 && n.fill ? Wa(n.fill, n.glow.color, e.glow) : n.fill;
1374
1374
  }
1375
1375
  function ol(e, n, t) {
1376
1376
  const { part: o } = e;
1377
1377
  if (!o.fill) return;
1378
1378
  const r = za(o.fill, n.light, n.fog ?? 0, t.fog);
1379
- return o.glow && e.glow > 0 ? Ka(r, o.glow.color, e.glow) : r;
1379
+ return o.glow && e.glow > 0 ? Wa(r, o.glow.color, e.glow) : r;
1380
1380
  }
1381
1381
  function Ra(e, n) {
1382
1382
  const t = xo(e);
@@ -1437,7 +1437,7 @@ function za(e, n, t, o) {
1437
1437
  const s = o ? Mt(o) : void 0;
1438
1438
  return s && t > 0 && (a = a.map((i, l) => i + (s[l] - i) * t)), No(a);
1439
1439
  }
1440
- function Ka(e, n, t) {
1440
+ function Wa(e, n, t) {
1441
1441
  const o = Mt(e), r = Mt(n);
1442
1442
  return !o || !r ? t < 0.5 ? e : n : No(o.map((a, s) => a + (r[s] - a) * t));
1443
1443
  }
@@ -1479,8 +1479,8 @@ function dl(e, n, t, o, r) {
1479
1479
  k.bones.forEach((O, v) => {
1480
1480
  const y = m[v], S = m[v + 1], w = ke.distance(y, S), [T, I] = O.width ?? [1, 1], C = h * P * (T + I) / 2;
1481
1481
  if (w > 1e-6) {
1482
- const j = ke.lerp(y, S, 0.5), K = cl(ke.normalize(ke.subtract(S, y)));
1483
- f(n.cylinder, oe.multiply(oe.translation(j), oe.multiply(K, oe.scaling([C, w, C]))), i);
1482
+ const j = ke.lerp(y, S, 0.5), W = cl(ke.normalize(ke.subtract(S, y)));
1483
+ f(n.cylinder, oe.multiply(oe.translation(j), oe.multiply(W, oe.scaling([C, w, C]))), i);
1484
1484
  }
1485
1485
  u(y, h * P * T, i), u(S, h * P * I, i);
1486
1486
  }), k.id.startsWith("arm.") && u(m[m.length - 1], h * 1.5, l);
@@ -1623,7 +1623,7 @@ function ml(e) {
1623
1623
  for (; n.length > 0 && (n[n.length - 1].viseme === "rest" || n[n.length - 1].weight === is); ) n.pop();
1624
1624
  return n;
1625
1625
  }
1626
- function Wa(e, n = {}) {
1626
+ function Ka(e, n = {}) {
1627
1627
  const t = n.fields?.mouth ?? "mouth", o = n.fields?.mouthWidth ?? "mouthWidth", r = n.energy ?? 1, a = ml(e.text), s = [{ time: e.start, value: Ze.rest.mouth }], i = [{ time: e.start, value: Ze.rest.mouthWidth }], l = a.reduce((h, d) => h + d.weight, 0), c = e.end - e.start;
1628
1628
  if (l > 0 && c > 0) {
1629
1629
  let h = e.start;
@@ -1641,7 +1641,7 @@ function Wa(e, n = {}) {
1641
1641
  function Af(e, n, t = {}) {
1642
1642
  const o = {};
1643
1643
  for (const r of [...n].sort((a, s) => a.start - s.start))
1644
- for (const [a, s] of Object.entries(Wa(r, t))) {
1644
+ for (const [a, s] of Object.entries(Ka(r, t))) {
1645
1645
  const i = o[a] ??= [], l = i.length > 0 ? i[i.length - 1].time : -1 / 0;
1646
1646
  i.push(...s.filter((c) => c.time > l));
1647
1647
  }
@@ -1654,7 +1654,7 @@ function zo(e, n, t, o = {}) {
1654
1654
  const f = n.find((p) => p.target === e && p.property === d);
1655
1655
  let u = f ? [...f.keyframes] : [{ time: 0, value: l(d, 0) }];
1656
1656
  for (const p of t) {
1657
- const g = Wa(p, o)[d];
1657
+ const g = Ka(p, o)[d];
1658
1658
  g[0] = { ...g[0], value: l(d, p.start) }, g[g.length - 1] = { ...g[g.length - 1], value: l(d, p.end) }, u = [...u.filter((b) => b.time < p.start || b.time > p.end), ...g], u.sort((b, $) => b.time - $.time);
1659
1659
  }
1660
1660
  h.push({ id: f?.id ?? `${e}-${d}`, target: e, property: d, keyframes: u });
@@ -1868,7 +1868,7 @@ const Tl = {
1868
1868
  tired: 0.8,
1869
1869
  run: 3.6,
1870
1870
  shove: 0.7
1871
- }, co = Object.keys(De), Kn = Object.keys(Fe), Wn = Object.keys(ka), Al = 0.25, Pl = 700 / 180, Ol = 200, Il = 300;
1871
+ }, co = Object.keys(De), Wn = Object.keys(Fe), Kn = Object.keys(ka), Al = 0.25, Pl = 700 / 180, Ol = 200, Il = 300;
1872
1872
  function Hl(e) {
1873
1873
  if (!Array.isArray(e)) return [{ beat: -1, message: `Beats must be an array of { do: … } objects (got ${typeof e}).` }];
1874
1874
  const n = [...co, "face", "spin", "dance", "hold", "pose", "gag", "place", "say", "look"], t = [];
@@ -1877,7 +1877,7 @@ function Hl(e) {
1877
1877
  if (!o || typeof o != "object" || Array.isArray(o)) return a("Each beat must be an object like { do: 'walk', to: [x, z] }.");
1878
1878
  const s = o, i = { duration: "for", path: "through", position: "to", heading: "toward", direction: "toward" };
1879
1879
  for (const c of Object.keys(s)) ps.includes(c) || a(ce("beat field", c, ps, i[c]));
1880
- const l = typeof s.do == "string" ? Kn.includes(s.do) ? "pose" : Wn.includes(s.do) ? "gag" : s.do === "turn" ? "face" : void 0 : void 0;
1880
+ const l = typeof s.do == "string" ? Wn.includes(s.do) ? "pose" : Kn.includes(s.do) ? "gag" : s.do === "turn" ? "face" : void 0 : void 0;
1881
1881
  if (typeof s.do != "string" || !n.includes(s.do)) return a(ce("character 3D beat", s.do, n, l));
1882
1882
  for (const c of ["at", "for", "turns", "bpm", "beats"]) {
1883
1883
  const h = s[c];
@@ -1887,7 +1887,7 @@ function Hl(e) {
1887
1887
  const c = s.look ?? s.toward;
1888
1888
  Array.isArray(c) && (c.length === 2 || c.length === 3) && c.every((d) => typeof d == "number" && Number.isFinite(d)) || c === "camera" || a("`look` needs `look`: a point [x, z] or [x, y, z] to look at, or `camera`.");
1889
1889
  }
1890
- s.do === "pose" && !(typeof s.pose == "object" && s.pose !== null) && !Kn.includes(s.pose) && a(ce("pose", s.pose, Kn)), s.do === "gag" && !Wn.includes(s.gag) && a(ce("gag", s.gag, Wn));
1890
+ s.do === "pose" && !(typeof s.pose == "object" && s.pose !== null) && !Wn.includes(s.pose) && a(ce("pose", s.pose, Wn)), s.do === "gag" && !Kn.includes(s.gag) && a(ce("gag", s.gag, Kn));
1891
1891
  }), t;
1892
1892
  }
1893
1893
  function Pf(e, n, t) {
@@ -1925,7 +1925,7 @@ ${o.map((v) => ` beat ${v.beat}: ${v.message}`).join(`
1925
1925
  }, $ = (v, y, S) => {
1926
1926
  const w = La([[i, l], ...y.through ?? [y.to]]);
1927
1927
  if (w.length < 2) return S;
1928
- const T = g(S, bt(w[0].point, w[1].point)), I = w[w.length - 1].at, C = y.speed ?? Tl[v] * Math.sqrt(r / 1.7), j = y.for ?? I / C * 1e3, K = wa(v, r), G = Et("ease-in-out"), Y = Math.min(Il, j / 4);
1928
+ const T = g(S, bt(w[0].point, w[1].point)), I = w[w.length - 1].at, C = y.speed ?? Tl[v] * Math.sqrt(r / 1.7), j = y.for ?? I / C * 1e3, W = wa(v, r), G = Et("ease-in-out"), Y = Math.min(Il, j / 4);
1929
1929
  f.push({ time: T, value: v }), p("walking", T, 0), u("walking", T + Y, 1, "ease-out"), u("walking", T + j - Y, 1), u("walking", T + j, 0, "ease-in");
1930
1930
  const ne = h;
1931
1931
  let B = c;
@@ -1933,9 +1933,9 @@ ${o.map((v) => ` beat ${v.beat}: ${v.message}`).join(`
1933
1933
  const N = T + qa(G, H / I) * j, { point: R, direction: M } = Ba(w, H);
1934
1934
  B += pn(B, bt([0, 0], M));
1935
1935
  const _ = H === 0 ? p : u;
1936
- if (_("x", N, R[0]), _("z", N, R[1]), _("rotateY", N, B), _("walk", N, ne + H / K), H >= I) break;
1936
+ if (_("x", N, R[0]), _("z", N, R[1]), _("rotateY", N, B), _("walk", N, ne + H / W), H >= I) break;
1937
1937
  }
1938
- return h = ne + I / K, [i, l] = w[w.length - 1].point, c = B, T + j;
1938
+ return h = ne + I / W, [i, l] = w[w.length - 1].point, c = B, T + j;
1939
1939
  }, A = [], k = [];
1940
1940
  let m = 0;
1941
1941
  for (const v of n) {
@@ -1948,13 +1948,13 @@ ${o.map((v) => ` beat ${v.beat}: ${v.message}`).join(`
1948
1948
  else if (v.do === "dance") {
1949
1949
  const w = vt[v.dance], T = v.bpm ?? w.bpm, I = v.beats ?? (v.for !== void 0 ? v.for * T / 6e4 : w.beats);
1950
1950
  S = y + (v.for ?? I * 6e4 / T);
1951
- const C = { ...a }, j = Math.max(1, Math.ceil(I * 16)), K = Array.from({ length: j + 1 }, (Y, ne) => fn(v.dance, I * ne / j, C).pose), G = Math.min(150, (S - y) / 4);
1952
- for (const Y of Object.keys(K[0])) {
1951
+ const C = { ...a }, j = Math.max(1, Math.ceil(I * 16)), W = Array.from({ length: j + 1 }, (Y, ne) => fn(v.dance, I * ne / j, C).pose), G = Math.min(150, (S - y) / 4);
1952
+ for (const Y of Object.keys(W[0])) {
1953
1953
  const ne = s(Y, C);
1954
- Y === "turn" || Y === "roll" || K.every((B) => B[Y] === ne) || (p(Y, y, ne), K.slice(1).forEach((B, H) => {
1954
+ Y === "turn" || Y === "roll" || W.every((B) => B[Y] === ne) || (p(Y, y, ne), W.slice(1).forEach((B, H) => {
1955
1955
  const N = y + (S - y) * (H + 1) / j, R = Math.min(1, (N - y) / G), M = R * R * (3 - 2 * R);
1956
1956
  u(Y, N, ne + (B[Y] - ne) * M);
1957
- }), a[Y] = K[j][Y]);
1957
+ }), a[Y] = W[j][Y]);
1958
1958
  }
1959
1959
  } else if (v.do === "hold") S = y + (v.for ?? 1e3);
1960
1960
  else if (v.do === "place")
@@ -2240,7 +2240,7 @@ function Lt() {
2240
2240
  const r = e.get(t);
2241
2241
  return r ? [...r].sort((a, s) => a.time - s.time)[r.length - 1].value : o;
2242
2242
  },
2243
- valueAt: (t, o) => Ko(e.get(t), o),
2243
+ valueAt: (t, o) => Wo(e.get(t), o),
2244
2244
  cutAfter(t, o) {
2245
2245
  for (const r of t) e.set(r, (e.get(r) ?? []).filter((a) => a.time <= o));
2246
2246
  },
@@ -2254,7 +2254,7 @@ function Lt() {
2254
2254
  }
2255
2255
  };
2256
2256
  }
2257
- function Ko(e, n) {
2257
+ function Wo(e, n) {
2258
2258
  if (!e || e.length === 0) return 0;
2259
2259
  const t = [...e].sort((o, r) => o.time - r.time);
2260
2260
  if (n <= t[0].time) return t[0].value;
@@ -2265,7 +2265,7 @@ function Ko(e, n) {
2265
2265
  }
2266
2266
  return t[t.length - 1].value;
2267
2267
  }
2268
- function Wt(e) {
2268
+ function Kt(e) {
2269
2269
  const n = [...e ?? []].sort((t, o) => t.time - o.time);
2270
2270
  return n.slice(1).flatMap((t, o) => t.value !== n[o].value ? [{ start: n[o].time, end: t.time }] : []);
2271
2271
  }
@@ -2305,7 +2305,7 @@ function Tn(e) {
2305
2305
  }
2306
2306
  };
2307
2307
  }
2308
- function Wo(e, n, { ground: t, every: o, floors: r }) {
2308
+ function Ko(e, n, { ground: t, every: o, floors: r }) {
2309
2309
  if (r.every((k) => k.windows.length === 0)) return e;
2310
2310
  const a = e.find((k) => k.target === n && k.property === "y"), s = new ve({ id: `${n}-ride`, tracks: a ? [a] : [] }), i = (k) => a ? Number(s.getStateAtTime(k).values.get(n)?.get("y") ?? 0) : 0, l = (k) => {
2311
2311
  const m = t + i(k);
@@ -2354,7 +2354,7 @@ function me(e, n, t, o) {
2354
2354
  height: o
2355
2355
  };
2356
2356
  }
2357
- const Kl = {
2357
+ const Wl = {
2358
2358
  background: "#1e1e2e",
2359
2359
  gutter: "#6c7086",
2360
2360
  text: "#cdd6f4",
@@ -2385,9 +2385,9 @@ const Kl = {
2385
2385
  move: "a token; { at, to: an anchor name or { x, y }, duration? }: move the word there",
2386
2386
  fling: "a token; { at, velocity?, spin?, gravity?, duration? }: throw or kick the word away on a spinning arc"
2387
2387
  }
2388
- }, Wl = 0.9, Fl = 8;
2388
+ }, Kl = 0.9, Fl = 8;
2389
2389
  function Rf(e) {
2390
- const n = { ...Kl, ...e.theme }, t = e.code.replace(/\t/g, " ").replace(/\n$/, "").split(`
2390
+ const n = { ...Wl, ...e.theme }, t = e.code.replace(/\t/g, " ").replace(/\n$/, "").split(`
2391
2391
  `), o = e.fontSize ?? 16, r = (e.lineHeight ?? 1.6) * o, a = (e.charWidth ?? 0.6) * o, s = e.padding ?? 12, i = e.lineNumbers === !1 ? 0 : (String(t.length).length + 2) * a, l = Math.max(1, ...t.map((H) => H.length)), c = e.width ?? s * 2 + i + l * a, h = s * 2 + t.length * r, d = e.x + s + i, f = new Set(e.hidden ?? []), u = e.language ?? "plain";
2392
2392
  if (!uo.includes(u)) throw new Error(`codePanel: ${ce("language", u, uo)}`);
2393
2393
  const p = t.map((H) => ql(H, u).flatMap((N) => Array.from(N.text, () => n[N.kind]))), g = Lt(), b = Tn(g), $ = [], A = /* @__PURE__ */ new Map(), k = [], m = [], P = (H) => {
@@ -2404,7 +2404,7 @@ function Rf(e) {
2404
2404
  const R = N + 1;
2405
2405
  j[`line.${R}.highlight`] = 0, j[`line.${R}.strike`] = 0, j[`line.${R}.wipe`] = 0, j[`line.${R}.reveal`] = f.has(R) ? 0 : 1, j[`line.${R}.shift`] = 0;
2406
2406
  });
2407
- const K = {
2407
+ const W = {
2408
2408
  type: "custom",
2409
2409
  x: e.x,
2410
2410
  y: e.y,
@@ -2439,9 +2439,9 @@ function Rf(e) {
2439
2439
  ...k.filter((q) => q.line === ae).map((q) => ({ column: q.column, length: q.text.length, piece: q, insert: void 0 })),
2440
2440
  ...m.filter((q) => q.line === ae).map((q) => ({ column: q.column, length: 0, piece: void 0, insert: q }))
2441
2441
  ].sort((q, le) => q.column - le.column || q.length - le.length);
2442
- let W = 0, U = _;
2442
+ let K = 0, U = _;
2443
2443
  for (const q of E) {
2444
- ee(ae, W, Math.min(q.column, se), U, D), U += (q.column - W) * a;
2444
+ ee(ae, K, Math.min(q.column, se), U, D), U += (q.column - K) * a;
2445
2445
  let le = q.length, L = "";
2446
2446
  if (q.piece) {
2447
2447
  const z = q.piece.written ?? "", J = M(`piece.${q.piece.id}.write`);
@@ -2449,9 +2449,9 @@ function Rf(e) {
2449
2449
  } else q.insert && (le = q.insert.chars * M(`insert.${q.insert.id}.open`), q.insert.text && (L = q.insert.text.slice(0, Math.round(M(`insert.${q.insert.id}.type`) * q.insert.text.length))));
2450
2450
  H.fillStyle = n.text;
2451
2451
  for (let z = 0; z < L.length; z++) L[z] !== " " && H.fillText(L[z], U + z * a, D);
2452
- U += le * a, W = q.column + q.length;
2452
+ U += le * a, K = q.column + q.length;
2453
2453
  }
2454
- ee(ae, W, Math.max(W, se), U, D);
2454
+ ee(ae, K, Math.max(K, se), U, D);
2455
2455
  const te = M(`line.${ae}.strike`);
2456
2456
  te > 0 && (H.strokeStyle = n.strike, H.lineWidth = Math.max(1.5, o / 10), H.beginPath(), H.moveTo(_, D), H.lineTo(_ + Z * Math.min(1, te), D), H.stroke()), H.restore();
2457
2457
  });
@@ -2498,7 +2498,7 @@ function Rf(e) {
2498
2498
  }, B = {
2499
2499
  kind: "code",
2500
2500
  about: sn,
2501
- target: K,
2501
+ target: W,
2502
2502
  lines: t,
2503
2503
  box: w(e.x, e.y, c, h),
2504
2504
  line(H, N = 1 / 0) {
@@ -2592,9 +2592,9 @@ function Rf(e) {
2592
2592
  ride(H, N, R) {
2593
2593
  const M = t.map((_, V) => {
2594
2594
  const ee = g.keys(`line.${V + 1}.shift`) ?? [];
2595
- return { top: T(V + 1), offset: (F) => -Ko(ee, F) * r, windows: Wt(ee) };
2595
+ return { top: T(V + 1), offset: (F) => -Wo(ee, F) * r, windows: Kt(ee) };
2596
2596
  });
2597
- return Wo(H, N, { ground: R.ground, every: R.every ?? et, floors: M });
2597
+ return Ko(H, N, { ground: R.ground, every: R.every ?? et, floors: M });
2598
2598
  },
2599
2599
  tracks: g.tracks,
2600
2600
  anchor(H, N = 1 / 0) {
@@ -2640,7 +2640,7 @@ function Dl(e, n, t, o, r) {
2640
2640
  const a = Fl * t;
2641
2641
  if (a > 0.2 && "filter" in e && (e.filter = `blur(${a.toFixed(1)}px)`), e.globalAlpha *= 1 - t, n.style === "fly") {
2642
2642
  const s = n.from === "right" ? -1 : 1;
2643
- e.translate(s * t * Wl * r, 0), e.rotate(s * t * 0.08);
2643
+ e.translate(s * t * Kl * r, 0), e.rotate(s * t * 0.08);
2644
2644
  } else {
2645
2645
  const s = 1 + 0.08 * t, i = o.left + o.width / 2, l = o.top + o.height / 2;
2646
2646
  e.translate(i, l), e.scale(s, s), e.translate(-i, -l);
@@ -2881,16 +2881,16 @@ function zf(e) {
2881
2881
  m.font = `${S.size}px ${t.font}`, m.fillStyle = S.color;
2882
2882
  const T = y.written;
2883
2883
  if (T) {
2884
- const K = v(`piece.${y.id}.write`) * T.length, G = y.home.x - e.x - T.length * w / 2;
2885
- for (let Y = 0; Y < Math.ceil(K); Y++)
2886
- T[Y] !== " " && (m.globalAlpha = t.opacity * Math.min(1, K - Y), m.fillText(T[Y], G + (Y + 0.5) * w, y.home.y - e.y));
2884
+ const W = v(`piece.${y.id}.write`) * T.length, G = y.home.x - e.x - T.length * w / 2;
2885
+ for (let Y = 0; Y < Math.ceil(W); Y++)
2886
+ T[Y] !== " " && (m.globalAlpha = t.opacity * Math.min(1, W - Y), m.fillText(T[Y], G + (Y + 0.5) * w, y.home.y - e.y));
2887
2887
  }
2888
2888
  const I = v(`piece.${y.id}.opacity`) * Math.min(1, v(`text.${y.item}.write`) * S.item.text.length - y.column);
2889
2889
  if (I <= 0) continue;
2890
2890
  m.save();
2891
2891
  const C = { x: y.home.x - e.x, y: y.home.y - e.y }, j = { x: v(`piece.${y.id}.x`), y: v(`piece.${y.id}.y`) };
2892
2892
  Dn(m, me(C.x + j.x - y.home.width / 2, C.y + j.y - y.home.height / 2, y.home.width, y.home.height), v(`piece.${y.id}.erase`)), Math.hypot(j.x, j.y) < 1 && Dn(m, S.box, v(`text.${y.item}.erase`)), m.globalAlpha = t.opacity * Math.min(1, I), m.translate(C.x + j.x, C.y + j.y), m.rotate(v(`piece.${y.id}.rotate`) * Math.PI / 180);
2893
- for (let K = 0; K < y.text.length; K++) y.text[K] !== " " && m.fillText(y.text[K], (K + 0.5 - y.text.length / 2) * w, 0);
2893
+ for (let W = 0; W < y.text.length; W++) y.text[W] !== " " && m.fillText(y.text[W], (W + 0.5 - y.text.length / 2) * w, 0);
2894
2894
  m.restore();
2895
2895
  }
2896
2896
  m.restore();
@@ -3138,7 +3138,7 @@ const As = ["bar", "line", "pie", "donut"], Ps = 'system-ui, -apple-system, "Seg
3138
3138
  pull: "slice anchors; { at, duration?, on? }: pull the slice out from the centre (on: false puts it back)"
3139
3139
  }
3140
3140
  }, Zl = 600, Ql = 500, eh = 200, th = 400, nh = 0.14, oh = Math.PI * 2;
3141
- function Kf(e) {
3141
+ function Wf(e) {
3142
3142
  if (!As.includes(e.kind)) throw new Error(`chart: ${ce("kind", e.kind, As)}`);
3143
3143
  const n = typeof e.theme == "string" ? e.theme : "light";
3144
3144
  if (!(n in Jt)) throw new Error(`chart: ${ce("theme", n, Object.keys(Jt))}`);
@@ -3152,46 +3152,46 @@ function Kf(e) {
3152
3152
  if (i.has(E.id)) throw new Error(`chart: two series are called "${E.id}"`);
3153
3153
  i.add(E.id);
3154
3154
  }
3155
- const l = new Map(s.map((E, W) => [E.id, W])), c = (E) => s[l.get(E)].color ?? (l.get(E) === 0 ? t.color : t.palette[l.get(E) % t.palette.length]), h = /* @__PURE__ */ new Set(), d = (E, W) => {
3156
- const U = E.values?.[W.id] ?? (e.series ? void 0 : E.value) ?? E.value;
3155
+ const l = new Map(s.map((E, K) => [E.id, K])), c = (E) => s[l.get(E)].color ?? (l.get(E) === 0 ? t.color : t.palette[l.get(E) % t.palette.length]), h = /* @__PURE__ */ new Set(), d = (E, K) => {
3156
+ const U = E.values?.[K.id] ?? (e.series ? void 0 : E.value) ?? E.value;
3157
3157
  if (typeof U != "number" || !Number.isFinite(U))
3158
- throw new Error(a ? `chart: "${E.id}" needs a value for series "${W.id}" (\`values: { ${W.id}: … }\`)` : `chart: "${E.id}" needs a \`value\`, a number`);
3158
+ throw new Error(a ? `chart: "${E.id}" needs a value for series "${K.id}" (\`values: { ${K.id}: … }\`)` : `chart: "${E.id}" needs a \`value\`, a number`);
3159
3159
  return U;
3160
3160
  };
3161
3161
  for (const E of e.data) {
3162
3162
  if (typeof E?.id != "string" || !E.id || /[:.]/.test(E.id)) throw new Error(`chart: every datum needs an \`id\` without ":" or "." (got ${JSON.stringify(E?.id)})`);
3163
3163
  if (h.has(E.id)) throw new Error(`chart: two data are called "${E.id}"`);
3164
- for (const W of s) d(E, W);
3164
+ for (const K of s) d(E, K);
3165
3165
  h.add(E.id);
3166
3166
  }
3167
- const f = o === "bar" ? "bar" : o === "line" ? "point" : "slice", u = Math.max(...e.data.flatMap((E) => s.map((W) => d(E, W)))), p = r ? e.data.reduce((E, W) => E + d(W, s[0]), 0) : e.max ?? sh(u * 1.1);
3167
+ const f = o === "bar" ? "bar" : o === "line" ? "point" : "slice", u = Math.max(...e.data.flatMap((E) => s.map((K) => d(E, K)))), p = r ? e.data.reduce((E, K) => E + d(K, s[0]), 0) : e.max ?? sh(u * 1.1);
3168
3168
  if (!r && !(p > 0)) throw new Error(`chart: \`max\` must be above 0 (got ${p})`);
3169
3169
  const g = Math.max(10, Math.min(16, e.height / 20)), b = a && e.legend !== !1, $ = r ? void 0 : e.axis?.x, A = r ? void 0 : e.axis?.y, k = e.title ? g * 2.3 : g * 0.5, m = {
3170
3170
  left: g * 3.6 + (A ? g * 1.5 : 0),
3171
3171
  right: e.width - g,
3172
3172
  top: (e.title ? g * 3 : g * 1.6) + (b ? g * 1.6 : 0),
3173
3173
  bottom: e.height - g * 2.4 - ($ ? g * 1.4 : 0)
3174
- }, P = m.bottom - m.top, O = (m.right - m.left) / e.data.length, v = a ? O * 0.72 / s.length : O * 0.6, y = a ? v * 0.86 : v, S = Math.max(4, g * 0.35), w = P / p, T = new Map(e.data.map((E, W) => [E.id, W])), I = (E) => m.left + O * (T.get(E) + 0.5), C = (E, W) => a ? I(E) - O * 0.36 + v * l.get(W) + (v - y) / 2 : I(E) - y / 2, j = (E, W) => C(E, W) + y / 2, K = e.height - g * 1.2, G = {
3174
+ }, P = m.bottom - m.top, O = (m.right - m.left) / e.data.length, v = a ? O * 0.72 / s.length : O * 0.6, y = a ? v * 0.86 : v, S = Math.max(4, g * 0.35), w = P / p, T = new Map(e.data.map((E, K) => [E.id, K])), I = (E) => m.left + O * (T.get(E) + 0.5), C = (E, K) => a ? I(E) - O * 0.36 + v * l.get(K) + (v - y) / 2 : I(E) - y / 2, j = (E, K) => C(E, K) + y / 2, W = e.height - g * 1.2, G = {
3175
3175
  cx: e.width / 2,
3176
- cy: (m.top + K) / 2,
3177
- r: Math.max(10, Math.min(e.width / 2, (K - m.top) / 2) - g * 2.6)
3176
+ cy: (m.top + W) / 2,
3177
+ r: Math.max(10, Math.min(e.width / 2, (W - m.top) / 2) - g * 2.6)
3178
3178
  }, Y = o === "donut" ? G.r * 0.55 : 0, ne = o === "donut" ? (Y + G.r) / 2 : G.r * 0.62, B = /* @__PURE__ */ new Map();
3179
3179
  if (b) {
3180
3180
  let E = m.right;
3181
- for (const W of [...s].reverse()) {
3182
- const U = W.label ?? W.id, te = g * 0.62 * U.length + g * 1.9;
3183
- B.set(W.id, me(E - te, k, te, g * 1.4)), E -= te + g * 0.6;
3181
+ for (const K of [...s].reverse()) {
3182
+ const U = K.label ?? K.id, te = g * 0.62 * U.length + g * 1.9;
3183
+ B.set(K.id, me(E - te, k, te, g * 1.4)), E -= te + g * 0.6;
3184
3184
  }
3185
3185
  }
3186
- const H = Lt(), N = Tn(H), R = {}, M = (E, W, U) => a ? `${f}.${E}.${W}.${U}` : `${f}.${E}.${U}`;
3186
+ const H = Lt(), N = Tn(H), R = {}, M = (E, K, U) => a ? `${f}.${E}.${K}.${U}` : `${f}.${E}.${U}`;
3187
3187
  for (const E of e.data)
3188
- for (const W of s)
3189
- R[M(E.id, W.id, "value")] = d(E, W), R[M(E.id, W.id, "show")] = E.hidden ? 0 : 1, R[M(E.id, W.id, "highlight")] = 0, r && (R[M(E.id, W.id, "pull")] = 0);
3190
- const _ = (E, W) => H.keys(E)?.length ? Ko(H.keys(E), W) : R[E], V = (E, W, U) => _(M(E, W, "value"), U) * (o === "bar" ? _(M(E, W, "show"), U) : 1) * w, ee = (E) => {
3191
- const W = s[0].id, U = e.data.map((L) => Math.max(0, E(M(L.id, W, "value"))) * Math.max(0, Math.min(1, E(M(L.id, W, "show"))))), te = U.reduce((L, z) => L + z, 0), q = /* @__PURE__ */ new Map();
3188
+ for (const K of s)
3189
+ R[M(E.id, K.id, "value")] = d(E, K), R[M(E.id, K.id, "show")] = E.hidden ? 0 : 1, R[M(E.id, K.id, "highlight")] = 0, r && (R[M(E.id, K.id, "pull")] = 0);
3190
+ const _ = (E, K) => H.keys(E)?.length ? Wo(H.keys(E), K) : R[E], V = (E, K, U) => _(M(E, K, "value"), U) * (o === "bar" ? _(M(E, K, "show"), U) : 1) * w, ee = (E) => {
3191
+ const K = s[0].id, U = e.data.map((L) => Math.max(0, E(M(L.id, K, "value"))) * Math.max(0, Math.min(1, E(M(L.id, K, "show"))))), te = U.reduce((L, z) => L + z, 0), q = /* @__PURE__ */ new Map();
3192
3192
  let le = -Math.PI / 2;
3193
3193
  return e.data.forEach((L, z) => {
3194
- const J = te > 0 ? oh * U[z] / te : 0, he = le + J / 2, fe = Math.max(0, Math.min(1, E(M(L.id, W, "pull")))) * G.r * nh;
3194
+ const J = te > 0 ? oh * U[z] / te : 0, he = le + J / 2, fe = Math.max(0, Math.min(1, E(M(L.id, K, "pull")))) * G.r * nh;
3195
3195
  q.set(L.id, {
3196
3196
  start: le,
3197
3197
  sweep: J,
@@ -3200,43 +3200,43 @@ function Kf(e) {
3200
3200
  centre: { x: G.cx + Math.cos(he) * (ne + fe), y: G.cy + Math.sin(he) * (ne + fe) }
3201
3201
  }), le += J;
3202
3202
  }), q;
3203
- }, F = (E) => ee((W) => _(W, E)), Q = (E) => {
3204
- const { kind: W, rest: U } = $t(E), te = (q) => tt("chart", E, ut, q);
3205
- if (W === "box") {
3203
+ }, F = (E) => ee((K) => _(K, E)), Q = (E) => {
3204
+ const { kind: K, rest: U } = $t(E), te = (q) => tt("chart", E, ut, q);
3205
+ if (K === "box") {
3206
3206
  if (U) throw te("box takes no arguments");
3207
3207
  return { kind: "box" };
3208
3208
  }
3209
- if (W === "legend") {
3209
+ if (K === "legend") {
3210
3210
  if (!B.has(U)) throw te(b ? `there is no series "${U}" (series: ${s.map((q) => q.id).join(", ")})` : "only a chart with several series has a legend");
3211
3211
  return { kind: "legend", series: U };
3212
3212
  }
3213
- if (W === "bar" || W === "point" || W === "slice" || W === "label" || W === "value") {
3214
- if (!U) throw te(`write it ${W}:ID`);
3213
+ if (K === "bar" || K === "point" || K === "slice" || K === "label" || K === "value") {
3214
+ if (!U) throw te(`write it ${K}:ID`);
3215
3215
  const q = U.indexOf(":"), le = q < 0 ? U : U.slice(0, q), L = q < 0 ? s[0].id : U.slice(q + 1);
3216
3216
  if (!T.has(le)) throw te(`there is no "${le}" (data: ${[...T.keys()].join(", ")})`);
3217
3217
  if (!i.has(L)) throw te(`there is no series "${L}" (series: ${s.map((z) => z.id).join(", ")})`);
3218
- if (W === "label" && q >= 0) throw te("a label is one per datum: label:ID");
3219
- if ((W === "bar" || W === "point" || W === "slice") && W !== f) throw te(`a ${o} chart has ${f}s, not ${W}s: ${f}:${le}`);
3220
- return { kind: W, id: le, series: L };
3218
+ if (K === "label" && q >= 0) throw te("a label is one per datum: label:ID");
3219
+ if ((K === "bar" || K === "point" || K === "slice") && K !== f) throw te(`a ${o} chart has ${f}s, not ${K}s: ${f}:${le}`);
3220
+ return { kind: K, id: le, series: L };
3221
3221
  }
3222
3222
  throw te();
3223
- }, ae = (E, W) => {
3223
+ }, ae = (E, K) => {
3224
3224
  if (E.kind === "box") return me(0, 0, e.width, e.height);
3225
3225
  if (E.kind === "legend") return B.get(E.series);
3226
3226
  if (r) {
3227
- const L = F(W).get(E.id), z = Math.max(g * 1.5, G.r * 0.42);
3227
+ const L = F(K).get(E.id), z = Math.max(g * 1.5, G.r * 0.42);
3228
3228
  if (E.kind === "slice") return me(L.centre.x - z / 2, L.centre.y - z / 2, z, z);
3229
3229
  const J = x(L);
3230
3230
  return E.kind === "label" ? J : L.sweep >= 0.3 ? me(L.centre.x - g * 1.6, L.centre.y - g * 0.65, g * 3.2, g * 1.3) : me(J.left, J.bottom, J.width, g * 1.3);
3231
3231
  }
3232
- const U = E.kind === "label" ? I(E.id) : j(E.id, E.series), te = m.bottom - V(E.id, E.series, W);
3232
+ const U = E.kind === "label" ? I(E.id) : j(E.id, E.series), te = m.bottom - V(E.id, E.series, K);
3233
3233
  if (E.kind === "bar") return me(U - y / 2, te, y, m.bottom - te);
3234
3234
  if (E.kind === "point") return me(I(E.id) - S, te - S, S * 2, S * 2);
3235
3235
  if (E.kind === "label") return me(U - O / 2, m.bottom + g * 0.4, O, g * 1.4);
3236
3236
  const q = te - (o === "line" ? S : 0) - g * 0.3, le = a && o === "bar" ? v : O;
3237
3237
  return me((o === "line" ? I(E.id) : U) - le / 2, q - g * 1.3, le, g * 1.3);
3238
3238
  }, x = (E) => {
3239
- const W = G.r + E.out + g * 0.9, U = { x: G.cx + Math.cos(E.mid) * W, y: G.cy + Math.sin(E.mid) * W }, te = g * 4.2, q = Math.cos(E.mid), le = q > 0.2 ? U.x : q < -0.2 ? U.x - te : U.x - te / 2;
3239
+ const K = G.r + E.out + g * 0.9, U = { x: G.cx + Math.cos(E.mid) * K, y: G.cy + Math.sin(E.mid) * K }, te = g * 4.2, q = Math.cos(E.mid), le = q > 0.2 ? U.x : q < -0.2 ? U.x - te : U.x - te / 2;
3240
3240
  return me(le, U.y - g * 0.7, te, g * 1.4);
3241
3241
  }, X = (E) => me(e.x + E.left, e.y + E.top, E.width, E.height), D = (E) => `${e.prefix ?? ""}${E.toFixed(e.decimals ?? 0)}${e.suffix ?? ""}`, Z = /* @__PURE__ */ new Map(), se = {
3242
3242
  type: "custom",
@@ -3251,8 +3251,8 @@ function Kf(e) {
3251
3251
  props: Object.fromEntries(Object.keys(R).map((E) => [E, ih(E)])),
3252
3252
  actions: ut.edits
3253
3253
  },
3254
- draw(E, W) {
3255
- const U = W.props ?? {}, te = (L) => Number(U[L] ?? R[L] ?? 0);
3254
+ draw(E, K) {
3255
+ const U = K.props ?? {}, te = (L) => Number(U[L] ?? R[L] ?? 0);
3256
3256
  if (E.save(), E.fillStyle = t.background, Os(E, 0, 0, e.width, e.height, 8), E.fill(), E.font = `${g}px ${t.font}`, E.textBaseline = "middle", e.title && (E.fillStyle = t.text, E.textAlign = "left", E.font = `600 ${g * 1.2}px ${t.font}`, E.fillText(e.title, r ? g : m.left, g * 1.5), E.font = `${g}px ${t.font}`), b) {
3257
3257
  E.textAlign = "left";
3258
3258
  for (const L of s) {
@@ -3301,20 +3301,20 @@ function Kf(e) {
3301
3301
  E.strokeStyle = t.text, E.lineWidth = 1.5, E.beginPath(), E.moveTo(m.left, m.bottom), E.lineTo(m.right, m.bottom), E.stroke(), E.restore();
3302
3302
  }
3303
3303
  };
3304
- function re(E, W) {
3305
- const U = s[0].id, te = ee(W);
3304
+ function re(E, K) {
3305
+ const U = s[0].id, te = ee(K);
3306
3306
  e.data.forEach((q, le) => {
3307
3307
  const L = te.get(q.id);
3308
3308
  if (L.sweep <= 1e-4) return;
3309
- const z = Z.get(q.id), J = z ? { x: W(`piece.${z.id}.x`), y: W(`piece.${z.id}.y`) } : { x: 0, y: 0 }, he = z ? W(`piece.${z.id}.rotate`) * Math.PI / 180 : 0, fe = z ? W(`piece.${z.id}.opacity`) : 1;
3309
+ const z = Z.get(q.id), J = z ? { x: K(`piece.${z.id}.x`), y: K(`piece.${z.id}.y`) } : { x: 0, y: 0 }, he = z ? K(`piece.${z.id}.rotate`) * Math.PI / 180 : 0, fe = z ? K(`piece.${z.id}.opacity`) : 1;
3310
3310
  if (fe <= 0) return;
3311
3311
  E.save(), E.globalAlpha = fe;
3312
3312
  const pe = { x: G.cx + Math.cos(L.mid) * L.out, y: G.cy + Math.sin(L.mid) * L.out };
3313
- E.translate(L.centre.x + J.x, L.centre.y + J.y), E.rotate(he), E.translate(-L.centre.x, -L.centre.y), E.beginPath(), E.arc(pe.x, pe.y, G.r, L.start, L.start + L.sweep), Y > 0 ? E.arc(pe.x, pe.y, Y, L.start + L.sweep, L.start, !0) : E.lineTo(pe.x, pe.y), E.closePath(), E.fillStyle = Ln(t.palette[le % t.palette.length], t.highlight, W(M(q.id, U, "highlight"))), E.fill(), E.strokeStyle = t.background, E.lineWidth = Math.max(1.5, g * 0.15), E.stroke(), e.values !== !1 && L.sweep >= 0.3 && (E.fillStyle = t.background, E.font = `600 ${g}px ${t.font}`, E.textAlign = "center", E.fillText(D(W(M(q.id, U, "value"))), L.centre.x, L.centre.y), E.font = `${g}px ${t.font}`), E.restore();
3313
+ E.translate(L.centre.x + J.x, L.centre.y + J.y), E.rotate(he), E.translate(-L.centre.x, -L.centre.y), E.beginPath(), E.arc(pe.x, pe.y, G.r, L.start, L.start + L.sweep), Y > 0 ? E.arc(pe.x, pe.y, Y, L.start + L.sweep, L.start, !0) : E.lineTo(pe.x, pe.y), E.closePath(), E.fillStyle = Ln(t.palette[le % t.palette.length], t.highlight, K(M(q.id, U, "highlight"))), E.fill(), E.strokeStyle = t.background, E.lineWidth = Math.max(1.5, g * 0.15), E.stroke(), e.values !== !1 && L.sweep >= 0.3 && (E.fillStyle = t.background, E.font = `600 ${g}px ${t.font}`, E.textAlign = "center", E.fillText(D(K(M(q.id, U, "value"))), L.centre.x, L.centre.y), E.font = `${g}px ${t.font}`), E.restore();
3314
3314
  const ge = x(L), Te = Math.cos(L.mid);
3315
3315
  E.globalAlpha = fe, E.fillStyle = t.text, E.textAlign = Te > 0.2 ? "left" : Te < -0.2 ? "right" : "center";
3316
3316
  const Pt = Te > 0.2 ? ge.left : Te < -0.2 ? ge.right : ge.left + ge.width / 2;
3317
- E.fillText(q.label ?? q.id, Pt, ge.top + ge.height / 2), e.values !== !1 && L.sweep < 0.3 && (E.globalAlpha = fe * 0.8, E.fillText(D(W(M(q.id, U, "value"))), Pt, ge.bottom + g * 0.65)), E.globalAlpha = 1;
3317
+ E.fillText(q.label ?? q.id, Pt, ge.top + ge.height / 2), e.values !== !1 && L.sweep < 0.3 && (E.globalAlpha = fe * 0.8, E.fillText(D(K(M(q.id, U, "value"))), Pt, ge.bottom + g * 0.65)), E.globalAlpha = 1;
3318
3318
  });
3319
3319
  }
3320
3320
  const ie = {
@@ -3324,22 +3324,22 @@ function Kf(e) {
3324
3324
  target: se,
3325
3325
  max: p,
3326
3326
  box: me(e.x, e.y, e.width, e.height),
3327
- anchor(E, W = 1 / 0) {
3328
- return X(ae(Q(E), W));
3327
+ anchor(E, K = 1 / 0) {
3328
+ return X(ae(Q(E), K));
3329
3329
  },
3330
3330
  piece(E) {
3331
- const W = Q(E);
3332
- if (W.kind !== "slice")
3331
+ const K = Q(E);
3332
+ if (K.kind !== "slice")
3333
3333
  throw new Error(r ? `chart: a piece is a slice, slice:ID, not "${E}"` : `chart: a ${f} is not a piece; slices of a pie or donut are (slice:ID). Change a ${f} with edit('set' | 'show' | 'highlight', …)`);
3334
- const U = Z.get(W.id);
3334
+ const U = Z.get(K.id);
3335
3335
  if (U) return U;
3336
- const te = { id: Z.size + 1, datum: W.id, home: X(ae(W, 0)) };
3337
- Z.set(W.id, te);
3336
+ const te = { id: Z.size + 1, datum: K.id, home: X(ae(K, 0)) };
3337
+ Z.set(K.id, te);
3338
3338
  for (const q of ["x", "y", "rotate"]) R[`piece.${te.id}.${q}`] = 0;
3339
3339
  return R[`piece.${te.id}.opacity`] = 1, te;
3340
3340
  },
3341
- edit(E, W, U) {
3342
- const te = Array.isArray(W) ? W : [W];
3341
+ edit(E, K, U) {
3342
+ const te = Array.isArray(K) ? K : [K];
3343
3343
  if (te.length === 0) throw new Error(`chart.edit: ${E} takes at least one anchor`);
3344
3344
  if (!(E in ut.edits)) throw An("chart", E, ut);
3345
3345
  if (E === "pull" && !r) throw new Error(`chart.edit: pull takes slice anchors of a pie or donut; a ${o} chart has ${f}s`);
@@ -3357,24 +3357,24 @@ function Kf(e) {
3357
3357
  }
3358
3358
  return ie;
3359
3359
  },
3360
- follow(E, W) {
3361
- return N.follow(E, W), ie;
3360
+ follow(E, K) {
3361
+ return N.follow(E, K), ie;
3362
3362
  },
3363
- fling(E, W) {
3364
- return N.fling(E, W), ie;
3363
+ fling(E, K) {
3364
+ return N.fling(E, K), ie;
3365
3365
  },
3366
- move(E, W) {
3367
- return N.move(E, W), ie;
3366
+ move(E, K) {
3367
+ return N.move(E, K), ie;
3368
3368
  },
3369
- ride(E, W, U) {
3369
+ ride(E, K, U) {
3370
3370
  if (o !== "bar") return E;
3371
3371
  const te = e.data.flatMap(
3372
3372
  (q) => s.map((le) => {
3373
- const L = V(q.id, le.id, 0), z = [...Wt(H.keys(M(q.id, le.id, "value"))), ...Wt(H.keys(M(q.id, le.id, "show")))];
3373
+ const L = V(q.id, le.id, 0), z = [...Kt(H.keys(M(q.id, le.id, "value"))), ...Kt(H.keys(M(q.id, le.id, "show")))];
3374
3374
  return { top: e.y + m.bottom - L, offset: (J) => L - V(q.id, le.id, J), windows: z };
3375
3375
  })
3376
3376
  );
3377
- return Wo(E, W, { ground: U.ground, every: U.every ?? et, floors: te });
3377
+ return Ko(E, K, { ground: U.ground, every: U.every ?? et, floors: te });
3378
3378
  },
3379
3379
  tracks: H.tracks
3380
3380
  };
@@ -3708,7 +3708,7 @@ const lh = {
3708
3708
  label: "Girl",
3709
3709
  group: "family",
3710
3710
  scale: 0.66,
3711
- options: { build: "child", hair: { style: "bob", color: Ke.chestnut }, ears: !0, outfit: { shirt: "#e86a92", trousers: "#4a5b8c", bottom: "skirt" } }
3711
+ options: { build: "child", hair: { style: "bob", color: We.chestnut }, ears: !0, outfit: { shirt: "#e86a92", trousers: "#4a5b8c", bottom: "skirt" } }
3712
3712
  },
3713
3713
  youngMan: {
3714
3714
  label: "Young man",
@@ -3720,7 +3720,7 @@ const lh = {
3720
3720
  label: "Young woman",
3721
3721
  group: "family",
3722
3722
  scale: 0.96,
3723
- options: { build: "slim", hair: { style: "highPonytail", color: Ke.auburn }, ears: !0, outfit: { shirt: "#f0b43c", trousers: "#36507a" } }
3723
+ options: { build: "slim", hair: { style: "highPonytail", color: We.auburn }, ears: !0, outfit: { shirt: "#f0b43c", trousers: "#36507a" } }
3724
3724
  },
3725
3725
  man: {
3726
3726
  label: "Man",
@@ -3732,7 +3732,7 @@ const lh = {
3732
3732
  label: "Woman",
3733
3733
  group: "family",
3734
3734
  scale: 0.95,
3735
- options: { build: "curvy", hair: { style: "shoulderWaves", color: Ke.black }, ears: !0, outfit: { shirt: "#9b5fc0", trousers: "#2f2f3a", sleeves: "long" } }
3735
+ options: { build: "curvy", hair: { style: "shoulderWaves", color: We.black }, ears: !0, outfit: { shirt: "#9b5fc0", trousers: "#2f2f3a", sleeves: "long" } }
3736
3736
  },
3737
3737
  grandpa: {
3738
3738
  label: "Grandpa",
@@ -3740,8 +3740,8 @@ const lh = {
3740
3740
  scale: 0.96,
3741
3741
  options: {
3742
3742
  build: "stocky",
3743
- hair: { style: "receding", color: Ke.gray },
3744
- facialHair: { style: "shortBoxed", color: Ke.white },
3743
+ hair: { style: "receding", color: We.gray },
3744
+ facialHair: { style: "shortBoxed", color: We.white },
3745
3745
  glasses: "square",
3746
3746
  ears: !0,
3747
3747
  outfit: { shirt: "#b98a5a", trousers: "#4b4440", sleeves: "long", collar: !0 }
@@ -3751,13 +3751,13 @@ const lh = {
3751
3751
  label: "Grandma",
3752
3752
  group: "family",
3753
3753
  scale: 0.9,
3754
- options: { build: "short", hair: { style: "topBun", color: Ke.white }, glasses: "round", ears: !0, outfit: { shirt: "#5d9fa8", trousers: "#5a4a5e", sleeves: "long", bottom: "skirt" } }
3754
+ options: { build: "short", hair: { style: "topBun", color: We.white }, glasses: "round", ears: !0, outfit: { shirt: "#5d9fa8", trousers: "#5a4a5e", sleeves: "long", bottom: "skirt" } }
3755
3755
  },
3756
3756
  doctor: {
3757
3757
  label: "Doctor",
3758
3758
  group: "work",
3759
3759
  scale: 0.97,
3760
- options: { build: "slim", hair: { style: "lowPonytail", color: Ke.black }, ears: !0, outfit: { shirt: "#8fb8d8", trousers: "#36507a", over: "labCoat", collar: !0 } }
3760
+ options: { build: "slim", hair: { style: "lowPonytail", color: We.black }, ears: !0, outfit: { shirt: "#8fb8d8", trousers: "#36507a", over: "labCoat", collar: !0 } }
3761
3761
  },
3762
3762
  cook: {
3763
3763
  label: "Cook",
@@ -3787,13 +3787,13 @@ const lh = {
3787
3787
  label: "Farmer",
3788
3788
  group: "work",
3789
3789
  scale: 0.97,
3790
- options: { build: "stocky", hair: { style: "shoulderStraight", color: Ke.blond }, hat: "sunHat", ears: !0, outfit: { shirt: "#d64535", trousers: "#4f6b3a", sleeves: "long" } }
3790
+ options: { build: "stocky", hair: { style: "shoulderStraight", color: We.blond }, hat: "sunHat", ears: !0, outfit: { shirt: "#d64535", trousers: "#4f6b3a", sleeves: "long" } }
3791
3791
  },
3792
3792
  ...lh,
3793
3793
  ...hh,
3794
3794
  ...ch
3795
3795
  };
3796
- function Wf(e, n = 300, t = {}) {
3796
+ function Kf(e, n = 300, t = {}) {
3797
3797
  const o = Qa[e];
3798
3798
  if (!o) throw new Error(`castMember: unknown cast member '${e}'`);
3799
3799
  return { ...o.options, height: Math.round(n * o.scale), ...t };
@@ -3912,7 +3912,7 @@ function Uf(e, n, t, o = {}) {
3912
3912
  if (!m) {
3913
3913
  const P = {};
3914
3914
  for (const [v, y] of f(k * dt) ?? []) P[v] = y;
3915
- const O = Ne(t, Kr(P, i, o.gaits)).head.center;
3915
+ const O = Ne(t, Wr(P, i, o.gaits)).head.center;
3916
3916
  u.set(k, m = { x: O.x, y: O.y });
3917
3917
  }
3918
3918
  return m;
@@ -4226,7 +4226,7 @@ function jh(e, n, t = {}) {
4226
4226
  return tr(e, Fo(r, t.rig ?? Ph, t));
4227
4227
  }
4228
4228
  function Ch(e, n, t = {}) {
4229
- const o = t.rest ?? be, r = Wr(n, o), a = n.map((s, i) => ({ time: s.time, pose: { ...o, ...r[i] }, easing: s.easing, act: s.act }));
4229
+ const o = t.rest ?? be, r = Kr(n, o), a = n.map((s, i) => ({ time: s.time, pose: { ...o, ...r[i] }, easing: s.easing, act: s.act }));
4230
4230
  return tr(e, Fo(a, t.rig ?? Hh, t));
4231
4231
  }
4232
4232
  const js = Ae.shocked, _h = Ae.scared, ot = {
@@ -4411,7 +4411,7 @@ function ar(e = {}) {
4411
4411
  for (const [t, o] of Object.entries(e.actions ?? {})) n[t] = o.summary;
4412
4412
  return n;
4413
4413
  }
4414
- const mo = ["do", "at", "for", "to", "toward", "mood", "say", "pose", "target", "onto"], Kh = {
4414
+ const mo = ["do", "at", "for", "to", "toward", "mood", "say", "pose", "target", "onto"], Wh = {
4415
4415
  action: "do",
4416
4416
  type: "do",
4417
4417
  verb: "do",
@@ -4452,7 +4452,7 @@ function wn(e, n = {}) {
4452
4452
  }
4453
4453
  const f = l;
4454
4454
  for (const g of Object.keys(f))
4455
- mo.includes(g) || h(ce("beat field", g, mo, Kh[g.toLowerCase()]));
4455
+ mo.includes(g) || h(ce("beat field", g, mo, Wh[g.toLowerCase()]));
4456
4456
  const u = f.do;
4457
4457
  if (u === void 0) {
4458
4458
  h(`A beat needs \`do\` (what happens). Actions: ${o.join(", ")}`);
@@ -4518,7 +4518,7 @@ function Do(e, n = {}, t = 0) {
4518
4518
  return Do(a, n, t + 1);
4519
4519
  });
4520
4520
  }
4521
- function Wh(e) {
4521
+ function Kh(e) {
4522
4522
  return e.length === 0 ? 0 : Math.max(...e.map((n) => n.after));
4523
4523
  }
4524
4524
  const Ns = {
@@ -4530,7 +4530,7 @@ const Ns = {
4530
4530
  tired: 1500,
4531
4531
  shove: 1300,
4532
4532
  run: 560
4533
- }, Fh = 450, Dh = 2.4, Lh = 160, Rs = 2.5, Bh = 200, qh = 340, Gh = 1.1, zs = [380, 900], Yh = 0.35, en = 300, Gn = 150, Uh = 260, Xh = 1.2, Yn = 160, Ks = 400, jt = 300, Vh = 450, Ws = 500, Un = 350, Fs = 150, Jh = 120, Xn = 180, Ds = 420, Zh = 300, Ls = 300, Qh = 140, Vn = 150, Bs = 450, ec = 450, Jn = 150, qs = 350, Gs = 400, tc = 12, nc = 600, Ys = 90, Us = 400, oc = 200, sc = 0.09, Xs = 350, Re = 450, Zn = 1200, ac = 700, ft = 320, ze = 220, rc = 65, ic = 700, Vs = (e) => e in ot, lc = (e) => e in He;
4533
+ }, Fh = 450, Dh = 2.4, Lh = 160, Rs = 2.5, Bh = 200, qh = 340, Gh = 1.1, zs = [380, 900], Yh = 0.35, en = 300, Gn = 150, Uh = 260, Xh = 1.2, Yn = 160, Ws = 400, jt = 300, Vh = 450, Ks = 500, Un = 350, Fs = 150, Jh = 120, Xn = 180, Ds = 420, Zh = 300, Ls = 300, Qh = 140, Vn = 150, Bs = 450, ec = 450, Jn = 150, qs = 350, Gs = 400, tc = 12, nc = 600, Ys = 90, Us = 400, oc = 200, sc = 0.09, Xs = 350, Re = 450, Zn = 1200, ac = 700, ft = 320, ze = 220, rc = 65, ic = 700, Vs = (e) => e in ot, lc = (e) => e in He;
4534
4534
  function hc(e) {
4535
4535
  return Math.max(ic, Array.from(e).length * rc);
4536
4536
  }
@@ -4546,22 +4546,22 @@ function Lo(e, n, t = {}) {
4546
4546
  let f = c, u = h, p = t.facing ?? 1, g = t.start ?? de, b = 0, $ = 0;
4547
4547
  const A = [{ time: 0, pose: g }], k = [{ time: 0, value: 0 }], m = [{ time: 0, value: 0 }], P = [{ time: 0, value: 0 }], O = [{ time: 0, value: 0 }], v = [{ time: 0, value: "walk" }], y = [{ time: 0, value: p }], S = [], w = [], T = [], I = (M, _, V, ee) => {
4548
4548
  g = { ...g, ..._ }, V && (g = pt(g, V)), A.push({ time: M, pose: g, ...ee === !1 ? { act: ee } : {} });
4549
- }, C = (M, _, V) => (I(M + ft / 2, { turn: 0 }, V), y.push({ time: M + ft / 2, value: p }, { time: M + ft / 2 + 1, value: _ }), p = _, I(M + ft, { turn: 1 }), M + ft), j = (M) => M < f ? -1 : 1, K = (M, _, V) => j(_) !== p ? C(M, j(_), V) : M, G = (M, _, V, ee = "arm") => {
4550
- const F = ee === "arm", Q = We({ ...M, ...F ? { rightShoulder: 0, rightElbow: 0 } : { rightHip: 0, rightKnee: 0 } }, { height: d, facing: p }), ae = F ? Q.shoulders.right : Q.hip, x = F ? Q.elbows.right : Q.knees.right, X = (se, re) => Math.atan2(p * se, re) * 180 / Math.PI, Z = ((X(_ - (f + ae.x), V - (u + ae.y)) - X(x.x - ae.x, x.y - ae.y)) % 360 + 360) % 360;
4549
+ }, C = (M, _, V) => (I(M + ft / 2, { turn: 0 }, V), y.push({ time: M + ft / 2, value: p }, { time: M + ft / 2 + 1, value: _ }), p = _, I(M + ft, { turn: 1 }), M + ft), j = (M) => M < f ? -1 : 1, W = (M, _, V) => j(_) !== p ? C(M, j(_), V) : M, G = (M, _, V, ee = "arm") => {
4550
+ const F = ee === "arm", Q = Ke({ ...M, ...F ? { rightShoulder: 0, rightElbow: 0 } : { rightHip: 0, rightKnee: 0 } }, { height: d, facing: p }), ae = F ? Q.shoulders.right : Q.hip, x = F ? Q.elbows.right : Q.knees.right, X = (se, re) => Math.atan2(p * se, re) * 180 / Math.PI, Z = ((X(_ - (f + ae.x), V - (u + ae.y)) - X(x.x - ae.x, x.y - ae.y)) % 360 + 360) % 360;
4551
4551
  return Z > 270 ? Z - 360 : Z;
4552
4552
  }, Y = (M, _, V, ee) => {
4553
- const F = ee === "arm", Q = We({ ...M, ...F ? { rightShoulder: 90, rightElbow: 0, rightWrist: 0 } : { rightHip: 90, rightKnee: 0 } }, { height: d, facing: p }), ae = F ? Q.shoulders.right : Q.hip, x = F ? { x: (Q.hands.right.x + Q.fingertips.right.x) / 2, y: (Q.hands.right.y + Q.fingertips.right.y) / 2 } : Q.feet.right, X = Math.hypot(x.x - ae.x, x.y - ae.y) * ((F ? t.reach?.arm : t.reach?.leg) ?? 1), D = V - (u + ae.y), Z = Math.abs(D) < X ? Math.sqrt(X * X - D * D) : X * 0.1;
4553
+ const F = ee === "arm", Q = Ke({ ...M, ...F ? { rightShoulder: 90, rightElbow: 0, rightWrist: 0 } : { rightHip: 90, rightKnee: 0 } }, { height: d, facing: p }), ae = F ? Q.shoulders.right : Q.hip, x = F ? { x: (Q.hands.right.x + Q.fingertips.right.x) / 2, y: (Q.hands.right.y + Q.fingertips.right.y) / 2 } : Q.feet.right, X = Math.hypot(x.x - ae.x, x.y - ae.y) * ((F ? t.reach?.arm : t.reach?.leg) ?? 1), D = V - (u + ae.y), Z = Math.abs(D) < X ? Math.sqrt(X * X - D * D) : X * 0.1;
4554
4554
  return _ - ae.x - p * Z;
4555
4555
  }, ne = (M) => {
4556
- const _ = We(M, { height: d, facing: p });
4556
+ const _ = Ke(M, { height: d, facing: p });
4557
4557
  return { x: f + (_.hands.right.x + _.fingertips.right.x) / 2, y: u + (_.hands.right.y + _.fingertips.right.y) / 2 };
4558
4558
  }, B = (M, _, V) => {
4559
- const ee = { ...M, rightWrist: 0, rightElbow: 0, rightShoulder: G(M, _, V) }, F = We(ee, { height: d, facing: p }), Q = { x: f + F.shoulders.right.x, y: u + F.shoulders.right.y }, ae = { x: f + F.elbows.right.x, y: u + F.elbows.right.y }, x = ne(ee), X = Math.hypot(ae.x - Q.x, ae.y - Q.y), D = Math.hypot(x.x - ae.x, x.y - ae.y), Z = Math.min(X + D - 0.01, Math.max(Math.abs(X - D) + 0.01, Math.hypot(_ - Q.x, V - Q.y))), se = (U) => U * 180 / Math.PI, re = se(Math.acos((X * X + Z * Z - D * D) / (2 * X * Z))), ie = 180 - se(Math.acos((X * X + D * D - Z * Z) / (2 * X * D)));
4560
- let E = { rightShoulder: ee.rightShoulder, rightElbow: 0 }, W = 1 / 0;
4559
+ const ee = { ...M, rightWrist: 0, rightElbow: 0, rightShoulder: G(M, _, V) }, F = Ke(ee, { height: d, facing: p }), Q = { x: f + F.shoulders.right.x, y: u + F.shoulders.right.y }, ae = { x: f + F.elbows.right.x, y: u + F.elbows.right.y }, x = ne(ee), X = Math.hypot(ae.x - Q.x, ae.y - Q.y), D = Math.hypot(x.x - ae.x, x.y - ae.y), Z = Math.min(X + D - 0.01, Math.max(Math.abs(X - D) + 0.01, Math.hypot(_ - Q.x, V - Q.y))), se = (U) => U * 180 / Math.PI, re = se(Math.acos((X * X + Z * Z - D * D) / (2 * X * Z))), ie = 180 - se(Math.acos((X * X + D * D - Z * Z) / (2 * X * D)));
4560
+ let E = { rightShoulder: ee.rightShoulder, rightElbow: 0 }, K = 1 / 0;
4561
4561
  for (const U of [1, -1])
4562
4562
  for (const te of [1, -1]) {
4563
- const q = { rightShoulder: ee.rightShoulder + U * re, rightElbow: te * ie }, le = { ...M, rightWrist: 0, ...q }, L = ne(le), J = Math.hypot(L.x - _, L.y - V) - We(le, { height: d, facing: p }).elbows.right.y * 1e-3;
4564
- J < W && (W = J, E = q);
4563
+ const q = { rightShoulder: ee.rightShoulder + U * re, rightElbow: te * ie }, le = { ...M, rightWrist: 0, ...q }, L = ne(le), J = Math.hypot(L.x - _, L.y - V) - Ke(le, { height: d, facing: p }).elbows.right.y * 1e-3;
4564
+ J < K && (K = J, E = q);
4565
4565
  }
4566
4566
  return E;
4567
4567
  }, H = (M, _, V) => Math.abs(_ - f) < 2 ? M : (k.push({ time: M, value: f - c }, { time: M + V, value: _ - c, easing: "ease-in-out" }), f = _, M + V);
@@ -4585,32 +4585,32 @@ function Lo(e, n, t = {}) {
4585
4585
  v.push({ time: se, value: "run" }), O.push({ time: se, value: 0 }, { time: se + 80, value: 1, easing: "ease-out" }, { time: ie, value: 1 }, { time: ie + 120, value: 0 }), P.push({ time: se, value: b }, { time: re, value: b + Rs, easing: "ease-in" }), b += Rs + (ie - re) / Ns.run * 1.5, P.push({ time: ie, value: b }), k.push({ time: re, value: f - c }, { time: ie, value: x - c, easing: "ease-in" }), T.push({ kind: "dust", time: re, x: f, y: u, length: 900 }), f = x, I(ie, {}), V = ie;
4586
4586
  } else if (M.do === "leap") {
4587
4587
  const x = M.to ?? f, X = M.onto ?? u;
4588
- let D = x === f ? _ : K(_, x, M.mood);
4588
+ let D = x === f ? _ : W(_, x, M.mood);
4589
4589
  g.turn < 1 && (D += ze, I(D, { turn: 1 }, M.mood));
4590
4590
  const Z = { leftShoulder: 35, rightShoulder: 35, leftElbow: -50, rightElbow: -50 };
4591
4591
  I(D + Bh, { stretch: 0.75, bend: 12, leftHip: 22, rightHip: 22, ...Z }, M.mood, !1);
4592
4592
  const se = D + qh;
4593
4593
  I(se - 40, { stretch: 0.72 }, void 0, !1), I(se, { stretch: 1.2, bend: -6, leftShoulder: 140, rightShoulder: 140, leftElbow: 20, rightElbow: 20, leftHip: 4, rightHip: 4 }, void 0, !1);
4594
- const re = Math.hypot(x - f, X - u), ie = M.for ?? Math.min(zs[1], Math.max(zs[0], 300 + re * Gh)), E = Math.min(u, X) - Yh * d, W = Math.sqrt(u - E), U = Math.sqrt(X - E), te = se + ie * W / (W + U), q = se + ie;
4594
+ const re = Math.hypot(x - f, X - u), ie = M.for ?? Math.min(zs[1], Math.max(zs[0], 300 + re * Gh)), E = Math.min(u, X) - Yh * d, K = Math.sqrt(u - E), U = Math.sqrt(X - E), te = se + ie * K / (K + U), q = se + ie;
4595
4595
  I(te, { stretch: 1, bend: 4, leftHip: -55, leftKnee: -80, rightHip: 55, rightKnee: 80, leftShoulder: 110, rightShoulder: 110 }, void 0, !1), I(q, { stretch: 0.72, bend: 12, leftShoulder: 75, rightShoulder: 75, leftElbow: 0, rightElbow: 0, leftHip: 18, rightHip: 18, leftKnee: 0, rightKnee: 0 }, void 0, !1), I(q + 180, { stretch: 1.05, bend: -3 }, void 0, !1), I(q + 340, { stretch: 1, bend: 0, leftHip: de.leftHip, rightHip: de.rightHip, leftShoulder: de.leftShoulder, rightShoulder: de.rightShoulder, leftElbow: de.leftElbow, rightElbow: de.rightElbow }, void 0, !1), k.push({ time: se, value: f - c }, { time: q, value: x - c }), m.push(
4596
4596
  { time: se, value: u - h },
4597
4597
  { time: te, value: E - h, easing: "ease-out-quad" },
4598
4598
  { time: q, value: X - h, easing: "ease-in-quad" }
4599
4599
  ), f = x, u = X, T.push({ kind: "dust", time: q, x: f, y: u, length: 500 }), V = q + 340, ee = q;
4600
4600
  } else if (M.do === "point" && M.target) {
4601
- const x = M.target, X = K(_, x.x, M.mood), D = { ...g, ...M.mood ? Ae[M.mood] : {}, turn: Math.max(g.turn, 0.6), rightElbow: 0, rightWrist: 0, ...Q }, Z = We(D, { height: d, facing: p }).head.center, se = Math.abs(x.x - (f + Z.x)), re = x.y - (u + Z.y), ie = X + Re;
4601
+ const x = M.target, X = W(_, x.x, M.mood), D = { ...g, ...M.mood ? Ae[M.mood] : {}, turn: Math.max(g.turn, 0.6), rightElbow: 0, rightWrist: 0, ...Q }, Z = Ke(D, { height: d, facing: p }).head.center, se = Math.abs(x.x - (f + Z.x)), re = x.y - (u + Z.y), ie = X + Re;
4602
4602
  I(ie, { ...D, rightShoulder: G(D, x.x, x.y), lookX: 1, lookY: cc(re / Math.max(1, Math.hypot(se, re))) * 0.8 }), V = ie + (M.for ?? Zn), ee = ie, F = V;
4603
4603
  } else if (M.do === "swipe") {
4604
- const x = M.target ?? { x: f + p * d * 0.5, y: u - d * 0.6 }, X = j(x.x), D = K(_, x.x, M.mood), Z = X === 1 ? x.left ?? x.x : x.right ?? x.x, se = X === 1 ? x.right ?? x.x : x.left ?? x.x, re = { ...g, turn: 1, lean: -10, bend: -8, rightElbow: 40, lookX: 1, ...Q };
4604
+ const x = M.target ?? { x: f + p * d * 0.5, y: u - d * 0.6 }, X = j(x.x), D = W(_, x.x, M.mood), Z = X === 1 ? x.left ?? x.x : x.right ?? x.x, se = X === 1 ? x.right ?? x.x : x.left ?? x.x, re = { ...g, turn: 1, lean: -10, bend: -8, rightElbow: 40, lookX: 1, ...Q };
4605
4605
  I(D + en, { ...re, rightShoulder: G(re, f - p * d * 0.3, u - d * 1.1) }, M.mood, !1);
4606
4606
  const ie = { ...g, lean: 6, bend: 4, rightElbow: 0, rightWrist: 0 }, E = { ...g, lean: 14, bend: 12, rightElbow: 0, rightWrist: 0 };
4607
4607
  H(D, Y(ie, Z, x.y, "arm"), en + Gn), I(D + en + Gn, { lean: -12 }, void 0, !1);
4608
- const W = D + en + Gn + 80;
4609
- I(W, { ...ie, rightShoulder: G(ie, Z, x.y) }, void 0, !1);
4610
- const U = W + (M.for ?? Math.max(Uh, Math.abs(se - Z) / Xh));
4611
- k.push({ time: W, value: f - c }), f = Y(E, se, x.y, "arm"), k.push({ time: U, value: f - c }), I(U, { ...E, rightShoulder: G(E, se, x.y) }, void 0, !1), I(U + Yn, { lean: 16, bend: 14, rightShoulder: G(g, se + X * d * 0.4, x.y + d * 0.25) }, void 0, !1), I(U + Yn + Ks, { lean: 0, bend: 0, rightShoulder: de.rightShoulder, rightElbow: de.rightElbow }), V = U + Yn + Ks, ee = W, F = U;
4608
+ const K = D + en + Gn + 80;
4609
+ I(K, { ...ie, rightShoulder: G(ie, Z, x.y) }, void 0, !1);
4610
+ const U = K + (M.for ?? Math.max(Uh, Math.abs(se - Z) / Xh));
4611
+ k.push({ time: K, value: f - c }), f = Y(E, se, x.y, "arm"), k.push({ time: U, value: f - c }), I(U, { ...E, rightShoulder: G(E, se, x.y) }, void 0, !1), I(U + Yn, { lean: 16, bend: 14, rightShoulder: G(g, se + X * d * 0.4, x.y + d * 0.25) }, void 0, !1), I(U + Yn + Ws, { lean: 0, bend: 0, rightShoulder: de.rightShoulder, rightElbow: de.rightElbow }), V = U + Yn + Ws, ee = K, F = U;
4612
4612
  } else if (M.do === "grab" && M.target) {
4613
- const x = M.target, X = K(_, x.x, M.mood), D = x.y > u - d * 0.5, Z = {
4613
+ const x = M.target, X = W(_, x.x, M.mood), D = x.y > u - d * 0.5, Z = {
4614
4614
  ...g,
4615
4615
  turn: 1,
4616
4616
  rightElbow: 0,
@@ -4621,14 +4621,14 @@ function Lo(e, n, t = {}) {
4621
4621
  lookY: D ? 0.8 : 0,
4622
4622
  ...Q
4623
4623
  }, re = H(X, Y(Z, x.x, x.y, "arm"), jt) + Vh;
4624
- I(re, { ...Z, rightShoulder: G(Z, x.x, x.y) }, M.mood, !1), I(re + 120, {}, void 0, !1), I(re + Ws, { bend: 0, lean: -3, stretch: 1, rightShoulder: 165, rightElbow: 20, lookY: -0.6 }), V = re + Ws + 150, ee = re;
4624
+ I(re, { ...Z, rightShoulder: G(Z, x.x, x.y) }, M.mood, !1), I(re + 120, {}, void 0, !1), I(re + Ks, { bend: 0, lean: -3, stretch: 1, rightShoulder: 165, rightElbow: 20, lookY: -0.6 }), V = re + Ks + 150, ee = re;
4625
4625
  } else if (M.do === "throw") {
4626
- const x = M.target?.x ?? M.to ?? f + p * d, X = K(_, x, M.mood), D = { ...g, turn: 1, lean: -12, bend: -10, rightElbow: 60, stretch: 0.95, lookX: 1, lookY: -0.3, ...Q };
4626
+ const x = M.target?.x ?? M.to ?? f + p * d, X = W(_, x, M.mood), D = { ...g, turn: 1, lean: -12, bend: -10, rightElbow: 60, stretch: 0.95, lookX: 1, lookY: -0.3, ...Q };
4627
4627
  I(X + Un, { ...D, rightShoulder: G(D, f - p * d * 0.4, u - d * 1.05) }, M.mood, !1), I(X + Un + Fs, { lean: -14 }, void 0, !1);
4628
4628
  const Z = X + Un + Fs + Jh, se = { ...g, lean: 14, bend: 12, rightElbow: 0, stretch: 1.04 };
4629
4629
  A.push({ time: Z, pose: g = { ...se, rightShoulder: G(se, f + p * d, u - d * 1.1) }, easing: "ease-in", act: !1 }), I(Z + Xn, { lean: 18, bend: 14, rightShoulder: 55, stretch: 1 }, void 0, !1), I(Z + Xn + Ds, { lean: 0, bend: 0, rightShoulder: de.rightShoulder, rightElbow: de.rightElbow, lookY: 0 }), V = Z + Xn + Ds, ee = Z, F = Z;
4630
4630
  } else if (M.do === "kick" && M.target) {
4631
- const x = M.target, X = K(_, x.x, M.mood), D = { ...g, turn: 1, lean: -12, bend: -6, rightKnee: 0, leftShoulder: 100, rightShoulder: 70 }, Z = H(X, Y(D, x.x, x.y, "leg"), Zh), se = { leftShoulder: 70, rightShoulder: 50, leftElbow: -20, rightElbow: 20 };
4631
+ const x = M.target, X = W(_, x.x, M.mood), D = { ...g, turn: 1, lean: -12, bend: -6, rightKnee: 0, leftShoulder: 100, rightShoulder: 70 }, Z = H(X, Y(D, x.x, x.y, "leg"), Zh), se = { leftShoulder: 70, rightShoulder: 50, leftElbow: -20, rightElbow: 20 };
4632
4632
  I(Z + Ls, { turn: 1, lean: 8, bend: 6, rightHip: -40, rightKnee: 80, lookX: 1, lookY: 0.7, ...se, ...Q }, M.mood, !1);
4633
4633
  const re = Z + Ls + Qh, ie = G(D, x.x, x.y, "leg");
4634
4634
  A.push({ time: re, pose: g = { ...g, ...D, rightHip: ie }, easing: "ease-in", act: !1 }), I(re + Vn, { lean: -15, rightHip: ie + 20 }, void 0, !1), I(re + Vn + Bs, {
@@ -4643,13 +4643,13 @@ function Lo(e, n, t = {}) {
4643
4643
  lookY: 0
4644
4644
  }), V = re + Vn + Bs, ee = re;
4645
4645
  } else if (M.do === "put" && M.target) {
4646
- const x = M.target, X = K(_, x.x, M.mood), D = x.y > u - d * 0.5, Z = { ...g, turn: 1, rightElbow: 0, rightWrist: 0, bend: D ? 35 : 0, lean: D ? 12 : 0, stretch: D ? 0.75 : 1, lookX: 1, lookY: D ? 0.8 : 0, ...Q }, re = H(X, Y(Z, x.x, x.y, "arm"), jt) + ec;
4646
+ const x = M.target, X = W(_, x.x, M.mood), D = x.y > u - d * 0.5, Z = { ...g, turn: 1, rightElbow: 0, rightWrist: 0, bend: D ? 35 : 0, lean: D ? 12 : 0, stretch: D ? 0.75 : 1, lookX: 1, lookY: D ? 0.8 : 0, ...Q }, re = H(X, Y(Z, x.x, x.y, "arm"), jt) + ec;
4647
4647
  I(re, { ...Z, rightShoulder: G(Z, x.x, x.y) }, M.mood, !1), I(re + Jn, {}, void 0, !1), I(re + Jn + qs, { bend: 0, lean: 0, stretch: 1, rightShoulder: de.rightShoulder, rightElbow: de.rightElbow, lookY: 0 }), V = re + Jn + qs, ee = re;
4648
4648
  } else if (M.do === "write" && M.target) {
4649
- const x = M.target, X = x.left ?? x.x, D = x.right ?? x.x, Z = K(_, (X + D) / 2, M.mood), se = { ...g, turn: 1, rightElbow: 0, rightWrist: 0, ...Ae.thinking, lookX: 1, lookY: 0, ...Q }, re = (L) => Y(se, L, x.y, "arm") + p * d * 0.08, ie = (L) => {
4649
+ const x = M.target, X = x.left ?? x.x, D = x.right ?? x.x, Z = W(_, (X + D) / 2, M.mood), se = { ...g, turn: 1, rightElbow: 0, rightWrist: 0, ...Ae.thinking, lookX: 1, lookY: 0, ...Q }, re = (L) => Y(se, L, x.y, "arm") + p * d * 0.08, ie = (L) => {
4650
4650
  const z = ne({ ...se, ...B(se, L, x.y), rightWrist: 0 });
4651
4651
  return Math.hypot(z.x - L, z.y - x.y) < 2;
4652
- }, E = p === 1 ? X : D, W = H(Z, re((X + D) / 2), jt), U = !ie(X) || !ie(D), te = U ? H(W, re(X), jt) + Gs : W + Gs;
4652
+ }, E = p === 1 ? X : D, K = H(Z, re((X + D) / 2), jt), U = !ie(X) || !ie(D), te = U ? H(K, re(X), jt) + Gs : K + Gs;
4653
4653
  I(te, { ...se, ...B(se, U ? X : E, x.y) }, M.mood, !1);
4654
4654
  const q = M.for ?? Math.max(nc, Math.abs(D - X) * tc);
4655
4655
  U && k.push({ time: te, value: f - c });
@@ -4662,13 +4662,13 @@ function Lo(e, n, t = {}) {
4662
4662
  const le = te + q;
4663
4663
  I(le, B(se, D, x.y), void 0, !1), I(le + Us, { rightShoulder: de.rightShoulder, rightElbow: de.rightElbow, ...Ae.happy }), V = le + Us, ee = te, F = le;
4664
4664
  } else if (M.do === "push" && M.target) {
4665
- const x = M.target, X = M.to ?? x.x, D = K(_, f + (X >= x.x ? 1 : -1), M.mood), Z = p === 1 ? x.left ?? x.x : x.right ?? x.x, se = { ...g, turn: 1, lean: 16, bend: 8, rightWrist: 0, leftWrist: 0, lookX: 1, ...Q }, re = Y(se, Z, x.y, "arm"), ie = H(D, re + p * d * 0.06, jt), E = B(se, Z, x.y), W = { ...se, ...E, leftShoulder: -E.rightShoulder, leftElbow: -E.rightElbow }, U = ie + oc;
4666
- I(U, W, M.mood, !1);
4665
+ const x = M.target, X = M.to ?? x.x, D = W(_, f + (X >= x.x ? 1 : -1), M.mood), Z = p === 1 ? x.left ?? x.x : x.right ?? x.x, se = { ...g, turn: 1, lean: 16, bend: 8, rightWrist: 0, leftWrist: 0, lookX: 1, ...Q }, re = Y(se, Z, x.y, "arm"), ie = H(D, re + p * d * 0.06, jt), E = B(se, Z, x.y), K = { ...se, ...E, leftShoulder: -E.rightShoulder, leftElbow: -E.rightElbow }, U = ie + oc;
4666
+ I(U, K, M.mood, !1);
4667
4667
  const te = Math.abs(X - x.x), q = U + (M.for ?? Math.max(600, te / sc)), le = te / ao("shove", d);
4668
4668
  v.push({ time: U, value: "shove" }), O.push({ time: U, value: 0 }, { time: U + ze, value: 1, easing: "ease-out" }, { time: q - ze, value: 1 }, { time: q, value: 0, easing: "ease-in" }), P.push({ time: U, value: b }, { time: q, value: b + le }), b += le, k.push({ time: U, value: f - c }, { time: q, value: f + (X - x.x) - c }), f += X - x.x, I(q, {}, void 0, !1), I(q + Xs, { lean: 0, bend: 0, rightShoulder: de.rightShoulder, leftShoulder: de.leftShoulder, rightElbow: de.rightElbow, leftElbow: de.leftElbow }), V = q + Xs, ee = U, F = q;
4669
4669
  } else if (ae) {
4670
4670
  const x = M.mood ? pt(g, M.mood) : g, X = ae.steps(x, M), D = nr(X, { at: _, from: x });
4671
- A.push(...D), g = D[D.length - 1].pose, V = _ + Math.max(Wh(X), M.for ?? 0);
4671
+ A.push(...D), g = D[D.length - 1].pose, V = _ + Math.max(Kh(X), M.for ?? 0);
4672
4672
  } else if (Vs(M.do)) {
4673
4673
  const x = Cs(M.do, { at: _, from: M.mood ? pt(g, M.mood) : g });
4674
4674
  A.push(...x), g = x[x.length - 1].pose, V = _ + yn(M.do), M.do === "take" && T.push({ kind: "dust", time: _ + 900, x: f, y: u, length: 500 }), M.do === "land" && T.push({ kind: "dust", time: _ + 120, x: f, y: u, length: 500 });
@@ -4928,7 +4928,7 @@ function tu(e, n, t, o = {}) {
4928
4928
  return { tracks: g ? [...u, ...p, Ic(e, g, r.tracks, n, o)] : [...u, ...p], duration: r.duration, lines: r.lines, keys: l, beats: r.beats, effects: r.effects };
4929
4929
  }
4930
4930
  function vc(e) {
4931
- const n = $a({ "arm.left.spread": 90, "arm.left.elbow": 0, "arm.left.bend": 0, "leg.left.knee": 0 }), t = Ne(e, n).points, o = Math.hypot(t["hand.left"].x - t["shoulder.left"].x, t["hand.left"].y - t["shoulder.left"].y), r = Math.hypot(t["toe.left"].x - t["hip.left"].x, t["toe.left"].y - t["hip.left"].y), a = We({ ...de, rightShoulder: 90, rightElbow: 0, rightWrist: 0 }, { height: e.height, facing: 1 }), s = We({ ...de, rightHip: 90, rightKnee: 0 }, { height: e.height, facing: 1 }), i = { x: (a.hands.right.x + a.fingertips.right.x) / 2, y: (a.hands.right.y + a.fingertips.right.y) / 2 }, l = Math.hypot(i.x - a.shoulders.right.x, i.y - a.shoulders.right.y), c = Math.hypot(s.feet.right.x - s.hip.x, s.feet.right.y - s.hip.y);
4931
+ const n = $a({ "arm.left.spread": 90, "arm.left.elbow": 0, "arm.left.bend": 0, "leg.left.knee": 0 }), t = Ne(e, n).points, o = Math.hypot(t["hand.left"].x - t["shoulder.left"].x, t["hand.left"].y - t["shoulder.left"].y), r = Math.hypot(t["toe.left"].x - t["hip.left"].x, t["toe.left"].y - t["hip.left"].y), a = Ke({ ...de, rightShoulder: 90, rightElbow: 0, rightWrist: 0 }, { height: e.height, facing: 1 }), s = Ke({ ...de, rightHip: 90, rightKnee: 0 }, { height: e.height, facing: 1 }), i = { x: (a.hands.right.x + a.fingertips.right.x) / 2, y: (a.hands.right.y + a.fingertips.right.y) / 2 }, l = Math.hypot(i.x - a.shoulders.right.x, i.y - a.shoulders.right.y), c = Math.hypot(s.feet.right.x - s.hip.x, s.feet.right.y - s.hip.y);
4932
4932
  return { arm: l > 0 ? o / l : 1, leg: c > 0 ? r / c : 1 };
4933
4933
  }
4934
4934
  const Sc = { point: "arm", grab: "arm", put: "arm", write: "arm", swipe: "arm", push: "arm", kick: "leg" }, Mc = /* @__PURE__ */ new Set(["point", "grab", "put", "kick"]);
@@ -4945,7 +4945,7 @@ function $c(e, n, t, o, r, a, s) {
4945
4945
  const p = u.contact, g = u.release ?? u.contact;
4946
4946
  e.forEach((b, $) => {
4947
4947
  if (b.time < p - 1 || b.time > g + 1) return;
4948
- const A = a(b.time), k = We(n[$], { height: r.height, facing: A < 0 ? -1 : 1 }), m = c(b.time), P = Mc.has(h.do) && h.target ? { x: h.target.x - m.x, y: h.target.y - m.y } : void 0, O = { x: (k.hands.right.x + k.fingertips.right.x) / 2, y: (k.hands.right.y + k.fingertips.right.y) / 2 }, v = P ?? (f === "arm" ? O : k.toes.right), y = A < 0 ? "right" : "left", S = `${f}.${y}`;
4948
+ const A = a(b.time), k = Ke(n[$], { height: r.height, facing: A < 0 ? -1 : 1 }), m = c(b.time), P = Mc.has(h.do) && h.target ? { x: h.target.x - m.x, y: h.target.y - m.y } : void 0, O = { x: (k.hands.right.x + k.fingertips.right.x) / 2, y: (k.hands.right.y + k.fingertips.right.y) / 2 }, v = P ?? (f === "arm" ? O : k.toes.right), y = A < 0 ? "right" : "left", S = `${f}.${y}`;
4949
4949
  let w = b.pose;
4950
4950
  if (h.do === "point")
4951
4951
  w = Ue(r, w, S, v);
@@ -5303,7 +5303,7 @@ function zc(e, n, t, o = {}) {
5303
5303
  const r = o.radius ?? 11;
5304
5304
  e.save(), e.beginPath(), e.arc(n, t, r, 0, Math.PI * 2), e.fillStyle = o.color ?? At, e.fill(), e.lineWidth = 3, e.strokeStyle = o.ink ?? rt, e.stroke(), e.beginPath(), e.arc(n - r * 0.27, t - r * 0.27, r * 0.27, 0, Math.PI * 2), e.fillStyle = "#fca5a5", e.fill(), e.restore();
5305
5305
  }
5306
- function Kc(e, n, t, o = {}) {
5306
+ function Wc(e, n, t, o = {}) {
5307
5307
  if (t <= 0 || n.length < 2) return null;
5308
5308
  const r = vn(n, t);
5309
5309
  e.save(), e.strokeStyle = o.color ?? At, e.lineWidth = o.width ?? 16, e.lineCap = "round", e.lineJoin = "round", e.beginPath(), e.moveTo(r[0].x, r[0].y);
@@ -5350,11 +5350,11 @@ function bu(e, n, t, o = {}) {
5350
5350
  for (const f of n.marks) {
5351
5351
  if (t <= f.at) continue;
5352
5352
  const u = hr(n, f), p = cr(u, je(Ee(t, f.at, f.duration)));
5353
- u.forEach((g, b) => Kc(e, g, p[b], { color: f.color, width: f.width }));
5353
+ u.forEach((g, b) => Wc(e, g, p[b], { color: f.color, width: f.width }));
5354
5354
  }
5355
5355
  return e.restore(), Rc(n, t);
5356
5356
  }
5357
- const Wc = {
5357
+ const Kc = {
5358
5358
  atmosphere: {
5359
5359
  "drawRain(ctx, time, { x, y, width, height, drops?, opacity?, color?, speed?, length?, slant?, lineWidth?, seed? })": "rain streaks falling in a box (a window, the frame), clipped to it; seeded, a pure function of time",
5360
5360
  "drawBlinds(ctx, { x, y, width, height, opacity?, slope?, spacing?, band?, color? })": "key light through venetian blinds: slanted bright bands",
@@ -5817,16 +5817,16 @@ const to = (() => {
5817
5817
  return [e[0] / n, e[1] / n, e[2] / n];
5818
5818
  })(), r0 = Math.cos(35 * So);
5819
5819
  function mr(e, n, t, o, r = {}) {
5820
- const a = e.derive ? { ...n, ...e.derive(n) } : n, s = Uo(e, a), i = t.toView([0, 0, 0]), l = (j) => (K) => [j[0] * K[0] + j[4] * K[1] + j[8] * K[2], j[1] * K[0] + j[5] * K[1] + j[9] * K[2], j[2] * K[0] + j[6] * K[1] + j[10] * K[2]], c = Ft(e, a), h = r.slice === void 0 ? null : oe.invert(c), d = h ? e.parts.map((j) => ({ part: j, mesh: ln(j.shape), local: oe.multiply(h, s.get(j.id)), whole: j.shape.type === "tube" })) : void 0, f = d ? n0(d, r.slice) : void 0, u = d ? gr(d.map((j) => ({ part: j.part.id, mesh: j.mesh, ...Yo(j.mesh, j.local) }))) : void 0, p = (j, K, G, Y) => {
5821
- const ne = (z) => t.toView(oe.transformPoint(G, z)), B = K.vertices.map(ne), H = B.map((z) => t.toScreen(z)), N = r.perspective ? r.near : void 0, R = (z) => z.map((J) => t.toScreen(J)), M = (z) => N === void 0 ? z : Qs(z, N), _ = (z) => N === void 0 ? [z] : Xc(z, N), V = l(G), ee = K.faces.map((z) => {
5820
+ const a = e.derive ? { ...n, ...e.derive(n) } : n, s = Uo(e, a), i = t.toView([0, 0, 0]), l = (j) => (W) => [j[0] * W[0] + j[4] * W[1] + j[8] * W[2], j[1] * W[0] + j[5] * W[1] + j[9] * W[2], j[2] * W[0] + j[6] * W[1] + j[10] * W[2]], c = Ft(e, a), h = r.slice === void 0 ? null : oe.invert(c), d = h ? e.parts.map((j) => ({ part: j, mesh: ln(j.shape), local: oe.multiply(h, s.get(j.id)), whole: j.shape.type === "tube" })) : void 0, f = d ? n0(d, r.slice) : void 0, u = d ? gr(d.map((j) => ({ part: j.part.id, mesh: j.mesh, ...Yo(j.mesh, j.local) }))) : void 0, p = (j, W, G, Y) => {
5821
+ const ne = (z) => t.toView(oe.transformPoint(G, z)), B = W.vertices.map(ne), H = B.map((z) => t.toScreen(z)), N = r.perspective ? r.near : void 0, R = (z) => z.map((J) => t.toScreen(J)), M = (z) => N === void 0 ? z : Qs(z, N), _ = (z) => N === void 0 ? [z] : Xc(z, N), V = l(G), ee = W.faces.map((z) => {
5822
5822
  const J = t.toView(V(z.normal)), he = [J[0] - i[0], J[1] - i[1], J[2] - i[2]], fe = Math.hypot(...he) || 1;
5823
5823
  return [he[0] / fe, he[1] / fe, he[2] / fe];
5824
- }), F = u && Y ? pr(j.id, K, Y, fr(Y), u) : void 0, Q = (z) => F?.[z] ?? !1, ae = ee.map((z, J) => {
5824
+ }), F = u && Y ? pr(j.id, W, Y, fr(Y), u) : void 0, Q = (z) => F?.[z] ?? !1, ae = ee.map((z, J) => {
5825
5825
  if (Q(J)) return !1;
5826
5826
  if (!r.perspective) return z[2] > 1e-6;
5827
- const fe = K.faces[J].corners.reduce((pe, ge) => [pe[0] + B[ge][0], pe[1] + B[ge][1], pe[2] + B[ge][2]], [0, 0, 0]);
5827
+ const fe = W.faces[J].corners.reduce((pe, ge) => [pe[0] + B[ge][0], pe[1] + B[ge][1], pe[2] + B[ge][2]], [0, 0, 0]);
5828
5828
  return -(z[0] * fe[0] + z[1] * fe[1] + z[2] * fe[2]) > 1e-9;
5829
- }), x = (z) => K.faces[z].corners.reduce((J, he) => J + B[he][2], 0) / K.faces[z].corners.length, X = K.faces.map((z, J) => ({ face: z, i: J })).filter(({ i: z }) => ae[z]).map(({ face: z, i: J }) => ({
5829
+ }), x = (z) => W.faces[z].corners.reduce((J, he) => J + B[he][2], 0) / W.faces[z].corners.length, X = W.faces.map((z, J) => ({ face: z, i: J })).filter(({ i: z }) => ae[z]).map(({ face: z, i: J }) => ({
5830
5830
  i: J,
5831
5831
  solved: {
5832
5832
  points: N === void 0 ? z.corners.map((he) => H[he]) : R(M(z.corners.map((he) => B[he]))),
@@ -5837,30 +5837,30 @@ function mr(e, n, t, o, r = {}) {
5837
5837
  if (r.light) {
5838
5838
  const z = l(G);
5839
5839
  for (const { i: J, solved: he } of X) {
5840
- const fe = K.faces[J].corners, pe = fe.reduce((Cn, Pr) => {
5841
- const _n = oe.transformPoint(G, K.vertices[Pr]);
5840
+ const fe = W.faces[J].corners, pe = fe.reduce((Cn, Pr) => {
5841
+ const _n = oe.transformPoint(G, W.vertices[Pr]);
5842
5842
  return [Cn[0] + _n[0] / fe.length, Cn[1] + _n[1] / fe.length, Cn[2] + _n[2] / fe.length];
5843
- }, [0, 0, 0]), ge = z(K.faces[J].normal), Te = Math.hypot(...ge) || 1, Pt = r.light(pe, [ge[0] / Te, ge[1] / Te, ge[2] / Te]);
5843
+ }, [0, 0, 0]), ge = z(W.faces[J].normal), Te = Math.hypot(...ge) || 1, Pt = r.light(pe, [ge[0] / Te, ge[1] / Te, ge[2] / Te]);
5844
5844
  he.light = Pt.light, he.fog = Pt.fog;
5845
5845
  }
5846
5846
  }
5847
- const D = X.map((z) => z.solved), Z = i0(K), se = [], re = [];
5847
+ const D = X.map((z) => z.solved), Z = i0(W), se = [], re = [];
5848
5848
  for (const [z, J] of Z) {
5849
5849
  const he = J.filter((pe) => ae[pe]).length;
5850
5850
  if (he === 0) continue;
5851
- const fe = J.length === 2 && he === 2 && K.creases !== !1 && ee[J[0]][0] * ee[J[1]][0] + ee[J[0]][1] * ee[J[1]][1] + ee[J[0]][2] * ee[J[1]][2] < r0;
5852
- J.length === 1 && (K.joined || c0(K, z)) || (J.length === 1 || he === 1 || fe) && (se.push(z.split("-").map(Number)), re.push(J.filter((pe) => ae[pe]).reduce((pe, ge) => x(ge) > x(pe) ? ge : pe)));
5851
+ const fe = J.length === 2 && he === 2 && W.creases !== !1 && ee[J[0]][0] * ee[J[1]][0] + ee[J[0]][1] * ee[J[1]][1] + ee[J[0]][2] * ee[J[1]][2] < r0;
5852
+ J.length === 1 && (W.joined || c0(W, z)) || (J.length === 1 || he === 1 || fe) && (se.push(z.split("-").map(Number)), re.push(J.filter((pe) => ae[pe]).reduce((pe, ge) => x(ge) > x(pe) ? ge : pe)));
5853
5853
  }
5854
- const ie = (z) => K.faces.findIndex((J) => J.corners.length > 4 && Math.sign(f0(K.vertices[z], J.normal)) > 0), E = (K.marks ?? []).filter(([z]) => ie(z) < 0 || ae[ie(z)]), W = ([z, J]) => N === void 0 ? [[H[z], H[J]]] : _([B[z], B[J]]).map(R), U = E.flatMap(W), te = (z) => N === void 0 ? [z.map((J) => H[J])] : _(z.map((J) => B[J])).map(R);
5854
+ const ie = (z) => W.faces.findIndex((J) => J.corners.length > 4 && Math.sign(f0(W.vertices[z], J.normal)) > 0), E = (W.marks ?? []).filter(([z]) => ie(z) < 0 || ae[ie(z)]), K = ([z, J]) => N === void 0 ? [[H[z], H[J]]] : _([B[z], B[J]]).map(R), U = E.flatMap(K), te = (z) => N === void 0 ? [z.map((J) => H[J])] : _(z.map((J) => B[J])).map(R);
5855
5855
  if (r.slice !== void 0) {
5856
5856
  const z = /* @__PURE__ */ new Map();
5857
5857
  se.forEach((J, he) => z.set(re[he], [...z.get(re[he]) ?? [], J]));
5858
5858
  for (const { i: J, solved: he } of X) {
5859
5859
  he.edges = ia(z.get(J) ?? []).flatMap(te);
5860
- const fe = K.faces[J].corners;
5860
+ const fe = W.faces[J].corners;
5861
5861
  he.center = fe.reduce((ge, Te) => [ge[0] + B[Te][0] / fe.length, ge[1] + B[Te][1] / fe.length, ge[2] + B[Te][2] / fe.length], [0, 0, 0]), he.normal = ee[J];
5862
5862
  const pe = X[X.length - 1].i;
5863
- he.marks = E.filter(([ge]) => (ie(ge) >= 0 ? ie(ge) : pe) === J).flatMap(W);
5863
+ he.marks = E.filter(([ge]) => (ie(ge) >= 0 ? ie(ge) : pe) === J).flatMap(K);
5864
5864
  }
5865
5865
  }
5866
5866
  const q = j.glow ? Math.max(0, Math.min(1, ye(e, a, j.glow.control))) : 0, le = j.fade ? Math.max(0, Math.min(1, ye(e, a, j.fade.control))) : 0, L = j.fade ? Math.max(0, Math.min(1, j.fade.from + (j.fade.to - j.fade.from) * le)) : 1;
@@ -5873,7 +5873,7 @@ function mr(e, n, t, o, r = {}) {
5873
5873
  glow: q,
5874
5874
  opacity: L,
5875
5875
  ...j.shape.type === "tube" ? { spine: d0(_(j.shape.points.map(ne)).map(R)) } : {},
5876
- ...K.walls ? { cut: !0 } : {}
5876
+ ...W.walls ? { cut: !0 } : {}
5877
5877
  };
5878
5878
  }, g = new Map(d?.map((j) => [j.part.id, j.local])), $ = (f ? f.pieces.map((j) => ({
5879
5879
  part: j.part,
@@ -5882,33 +5882,33 @@ function mr(e, n, t, o, r = {}) {
5882
5882
  m: j.cut ? c : s.get(j.part.id),
5883
5883
  local: j.cut ? oe.identity() : g.get(j.part.id),
5884
5884
  cell: j.cell
5885
- })) : e.parts.map((j) => ({ part: j, mesh: ln(j.shape), m: s.get(j.id), local: void 0, cell: void 0 }))).map((j) => ({ cell: j.cell, solved: p(j.part, j.mesh, j.m, j.local) })), A = $.map((j) => j.solved), k = (j) => j.filter((K) => K.faces.length > 0 && K.opacity > 0.01).sort((K, G) => K.depth - G.depth);
5885
+ })) : e.parts.map((j) => ({ part: j, mesh: ln(j.shape), m: s.get(j.id), local: void 0, cell: void 0 }))).map((j) => ({ cell: j.cell, solved: p(j.part, j.mesh, j.m, j.local) })), A = $.map((j) => j.solved), k = (j) => j.filter((W) => W.faces.length > 0 && W.opacity > 0.01).sort((W, G) => W.depth - G.depth);
5886
5886
  let m;
5887
5887
  if (f) {
5888
5888
  const j = new Map(e.parts.map((G) => {
5889
5889
  const Y = s.get(G.id), ne = ln(G.shape).vertices;
5890
5890
  return [G.id, ne.reduce((B, H) => B + t.toView(oe.transformPoint(Y, H))[2], 0) / Math.max(1, ne.length)];
5891
- })), K = /* @__PURE__ */ new Map();
5891
+ })), W = /* @__PURE__ */ new Map();
5892
5892
  for (const G of $) {
5893
5893
  const Y = G.cell.join(",");
5894
- K.has(Y) || K.set(Y, { cell: G.cell, parts: [] }), K.get(Y).parts.push(G.solved), G.solved.depth = j.get(G.solved.part.id);
5894
+ W.has(Y) || W.set(Y, { cell: G.cell, parts: [] }), W.get(Y).parts.push(G.solved), G.solved.depth = j.get(G.solved.part.id);
5895
5895
  }
5896
- m = [...K.values()].map(({ cell: G, parts: Y }) => ({ depth: t.toView(oe.transformPoint(c, f.middle(G)))[2], parts: k(Y) })).filter((G) => G.parts.length > 0);
5896
+ m = [...W.values()].map(({ cell: G, parts: Y }) => ({ depth: t.toView(oe.transformPoint(c, f.middle(G)))[2], parts: k(Y) })).filter((G) => G.parts.length > 0);
5897
5897
  }
5898
5898
  const P = {};
5899
- for (const [j, K] of Object.entries(e.anchors ?? {})) {
5900
- const G = K.part ? s.get(K.part) : Ft(e, a);
5901
- if (!G) throw new Error(`prop rig: anchor "${j}" is on "${K.part}", which is not a part`);
5902
- const Y = t.toView(oe.transformPoint(G, K.at));
5899
+ for (const [j, W] of Object.entries(e.anchors ?? {})) {
5900
+ const G = W.part ? s.get(W.part) : Ft(e, a);
5901
+ if (!G) throw new Error(`prop rig: anchor "${j}" is on "${W.part}", which is not a part`);
5902
+ const Y = t.toView(oe.transformPoint(G, W.at));
5903
5903
  P[j] = { point: t.toScreen(Y), depth: Y[2] };
5904
5904
  }
5905
- const [O, v] = e.footprint ?? [e.length * 0.45, e.length], y = Math.max(0, ye(e, a, "lift")), S = Math.max(0, ye(e, a, "size")) / (1 + y * 0.8), w = Array.from({ length: 24 }, (j, K) => {
5906
- const G = Math.PI * 2 * K / 24;
5905
+ const [O, v] = e.footprint ?? [e.length * 0.45, e.length], y = Math.max(0, ye(e, a, "lift")), S = Math.max(0, ye(e, a, "size")) / (1 + y * 0.8), w = Array.from({ length: 24 }, (j, W) => {
5906
+ const G = Math.PI * 2 * W / 24;
5907
5907
  return t.toView([Math.cos(G) * O * 0.55 * S, 0, Math.sin(G) * v * 0.55 * S]);
5908
5908
  }), T = r.perspective ? r.near : void 0, I = {
5909
5909
  points: (T === void 0 ? w : Qs(w, T)).map((j) => t.toScreen(j)),
5910
5910
  opacity: 0.16 * S
5911
- }, C = A.filter((j) => j.part.seeThrough && j.opacity > 0.01).flatMap((j) => j.faces.map((K) => K.points));
5911
+ }, C = A.filter((j) => j.part.seeThrough && j.opacity > 0.01).flatMap((j) => j.faces.map((W) => W.points));
5912
5912
  return { under: k(A.filter((j) => !j.part.overRider)), over: k(A.filter((j) => j.part.overRider)), ...m ? { cells: m } : {}, anchors: P, openings: C, shadow: I, pxPerUnit: o, sizePx: e.height * o };
5913
5913
  }
5914
5914
  const ra = /* @__PURE__ */ new WeakMap();
@@ -6117,18 +6117,18 @@ function ju(e, n = {}) {
6117
6117
  const y = g(O), { values: S, origin: w, solved: T } = A(v);
6118
6118
  if (y.kind === "box") return me(w.x - e.width / 2, w.y - e.height, e.width, e.height);
6119
6119
  if (y.kind === "anchor") {
6120
- const j = T.anchors[y.name].point, K = p0 * e.propScale;
6121
- return me(w.x + j.x - K / 2, w.y + j.y - K / 2, K, K);
6120
+ const j = T.anchors[y.name].point, W = p0 * e.propScale;
6121
+ return me(w.x + j.x - W / 2, w.y + j.y - W / 2, W, W);
6122
6122
  }
6123
6123
  if (y.kind === "part") return C(/* @__PURE__ */ new Set([y.name]), `part "${y.name}" is`);
6124
6124
  const I = b(y.name);
6125
6125
  if (I.size === 0) return me(w.x - e.width / 2, w.y - e.height, e.width, e.height);
6126
6126
  return C(I, `the parts control "${y.name}" moves are`);
6127
- function C(j, K) {
6127
+ function C(j, W) {
6128
6128
  const G = [...T.under, ...T.over].filter((N) => j.has(N.part.id)).flatMap((N) => N.faces.flatMap((R) => R.points));
6129
6129
  if (G.length === 0) {
6130
6130
  const N = Number.isFinite(v) ? `at ${v} ms` : "after its edits";
6131
- throw new Error(`${t.kind}: ${K} turned away from the viewer ${N}; aim at an anchor (${a.map((R) => `anchor:${R}`).join(", ") || "none"}) or box`);
6131
+ throw new Error(`${t.kind}: ${W} turned away from the viewer ${N}; aim at an anchor (${a.map((R) => `anchor:${R}`).join(", ") || "none"}) or box`);
6132
6132
  }
6133
6133
  const Y = G.map((N) => N.x), ne = G.map((N) => N.y), B = Math.min(...Y), H = Math.min(...ne);
6134
6134
  return me(w.x + B, w.y + H, Math.max(...Y) - B, Math.max(...ne) - H);
@@ -6199,15 +6199,15 @@ function ju(e, n = {}) {
6199
6199
  },
6200
6200
  ride(O, v, y) {
6201
6201
  const S = [
6202
- ...r.flatMap((T) => Wt(i.keys(T))),
6203
- ...(n.tracks ?? []).flatMap((T) => Wt(T.keyframes.filter((I) => typeof I.value == "number")))
6202
+ ...r.flatMap((T) => Kt(i.keys(T))),
6203
+ ...(n.tracks ?? []).flatMap((T) => Kt(T.keyframes.filter((I) => typeof I.value == "number")))
6204
6204
  ];
6205
6205
  if (S.length === 0) return O;
6206
6206
  const w = [...a.map((T) => `anchor:${T}`), ...s.map((T) => `part:${T}`)].flatMap((T) => {
6207
6207
  const I = m(T, 0);
6208
6208
  return I ? [{ top: I.top, offset: (C) => (m(T, C)?.top ?? I.top) - I.top, windows: S }] : [];
6209
6209
  });
6210
- return Wo(O, v, { ground: y.ground, every: y.every ?? et, floors: w });
6210
+ return Ko(O, v, { ground: y.ground, every: y.every ?? et, floors: w });
6211
6211
  },
6212
6212
  tracks: i.tracks
6213
6213
  };
@@ -6951,18 +6951,18 @@ function z0(e = {}) {
6951
6951
  }
6952
6952
  }
6953
6953
  },
6954
- acting: K0,
6954
+ acting: W0,
6955
6955
  colors: { body: a.blanket }
6956
6956
  };
6957
6957
  }
6958
- const K0 = {
6958
+ const W0 = {
6959
6959
  depth: { give: 1, roll: 1, squash: 1, size: 0 },
6960
6960
  limits: { give: 0.03, roll: 0.5, squash: 0.03 },
6961
6961
  eyes: [],
6962
6962
  headTurns: {},
6963
6963
  drift: []
6964
6964
  };
6965
- function W0(e = {}) {
6965
+ function K0(e = {}) {
6966
6966
  const n = e.width ?? 0.9, t = e.height ?? 2.05, o = e.hinge ?? "left", r = { frame: "#d9d2c3", door: "#7a4b2a", handle: "#c9a227", beyond: "#2a2f3a", ...e.colors }, a = 0.1, s = o === "left" ? 1 : -1, i = s > 0 ? [[0, 0], [-n, 0], [-n, t], [0, t]] : [[0, 0], [n, 0], [n, t], [0, t]], c = {
6967
6967
  parts: [
6968
6968
  { id: "post-left", shape: { type: "box", size: [a, t + a, a] }, at: [n / 2 + a / 2, (t + a) / 2, 0], fill: r.frame },
@@ -8203,7 +8203,7 @@ function yd(e = {}) {
8203
8203
  stoop: 10
8204
8204
  });
8205
8205
  }
8206
- const Dt = { car: w0, truck: k0, bus: v0, tractor: S0, cart: M0, trainCar: $0, bike: E0, motorbike: T0, tree: A0, house: I0, chair: C0, desk: N0, bed: z0, door: W0, wheelchair: L0, helicopter: G0, airplane: U0, horse: nd, dog: od, cat: sd, cow: ad, goat: rd, rabbit: id, squirrel: ld, songbird: fd, crow: ud, chicken: gd, pigeon: pd, duck: md, owl: bd, parrot: yd };
8206
+ const Dt = { car: w0, truck: k0, bus: v0, tractor: S0, cart: M0, trainCar: $0, bike: E0, motorbike: T0, tree: A0, house: I0, chair: C0, desk: N0, bed: z0, door: K0, wheelchair: L0, helicopter: G0, airplane: U0, horse: nd, dog: od, cat: sd, cow: ad, goat: rd, rabbit: id, squirrel: ld, songbird: fd, crow: ud, chicken: gd, pigeon: pd, duck: md, owl: bd, parrot: yd };
8207
8207
  function Er(e, n = {}) {
8208
8208
  const t = Dt[e];
8209
8209
  if (!t) throw new Error(ce("prop preset", e, Object.keys(Dt)));
@@ -8303,8 +8303,8 @@ ${r.map((S) => ` beat ${S.beat}: ${S.message}`).join(`
8303
8303
  turnTo(S, w) {
8304
8304
  const T = typeof w == "number" ? w : $o[w], I = h.turn, j = [T - 4, T, T + 4].map((G) => ({ t: G, d: Math.abs(G - I) })).sort((G, Y) => G.d - Y.d || Math.abs(G.t) - Math.abs(Y.t))[0];
8305
8305
  if (j.d < 1e-3) return S;
8306
- const K = S + wd * Math.max(1, j.d);
8307
- return A.key(K, { turn: j.t }), K;
8306
+ const W = S + wd * Math.max(1, j.d);
8307
+ return A.key(W, { turn: j.t }), W;
8308
8308
  },
8309
8309
  effect(S) {
8310
8310
  u.push(S);
@@ -8484,7 +8484,7 @@ function Pd(e, n = {}) {
8484
8484
  "softCartoonCharacter(name, options?)": "Original youngMan / youngWoman / childBoy / childGirl story presets. Children have larger head proportions, shorter limbs and rounded torsos; every face, hair, build, hand, clothing and material option can be overridden.",
8485
8485
  "face.projection": "Organic default volume follows the head axes, keeps both eyes in three-quarter views and projects a small nose above the mouth; opaque hair covers features. cartoon keeps the classic face slide.",
8486
8486
  "outfitPreset(category, overrides?)": "Fresh JSON Everyday / Formal / Casual wardrobe defaults for every actor; top: tshirt | shirt | blouse | dress, trouserStyle: plain | jeans | cargo, colours, sleeves, bottoms, collar and tie are editable.",
8487
- "figure: 'bean'": "The white outlined stick figure: one smooth stroked outline per limb (no seams at elbows, knees or the front arm's shoulder), a shaped body (rounded shoulders, slight waist, fuller hips), big oval eyes, mittens and cartoon shoes; every pose, gait, dance and turn works. Always drawn clean; the near arm is in front of the body in both limb modes. `bean: { limbs: tube | line, halo (a pale edge on line limbs), torso, limbWidth, lineWidth, outlineWidth, fill, shirt, sleeves: short | long | none, trousers, shoes (a dark shoe gets a shine), coat (a trench coat: lapels, belt and buckle, buttons, knee hem, sleeves to the wrist), fedora, shades (aviators in place of the eyes; brows still show) }`; an `outfit`'s shirt, trousers and sleeves colour it. `castMember('beanMan' | 'beanWoman' | 'beanKid' | 'beanBoss' | 'beanDetective' | 'beanStick', h)`.",
8487
+ "figure: 'bean'": "The white outlined stick figure: one smooth stroked outline per limb (no seams at elbows, knees or the front arm's shoulder), a shaped body (rounded shoulders, slight waist, fuller hips), big oval eyes, mittens and cartoon shoes; every pose, gait, dance and turn works. Always drawn clean; the near arm is in front of the body in both limb modes. `bean: { limbs: tube | line, halo (a pale edge on line limbs), torso, limbWidth, lineWidth, outlineWidth, fill, shirt, sleeves: short | long | none, trousers, shoes (a dark shoe gets a shine), tie (a necktie down the chest), coat (a trench coat: lapels, belt and buckle, buttons, knee hem, sleeves to the wrist), fedora, shades (aviators in place of the eyes; brows still show) }`; an `outfit`'s shirt, trousers, sleeves and tie colour it. `castMember('beanMan' | 'beanWoman' | 'beanKid' | 'beanBoss' | 'beanDetective' | 'beanStick', h)`.",
8488
8488
  hands: "`dot` | `cartoon` (with `handStyle: glove | natural`) | `mitten` (a plain oval mitten; the bean figure's default)",
8489
8489
  leafOutfit: "Organic-only JSON garment { top?, color?, accent?, length? }; curved leaves follow torso/thighs at native part depths. Everyday basicOutfit also follows organic contours."
8490
8490
  },
@@ -8496,7 +8496,7 @@ function Pd(e, n = {}) {
8496
8496
  gags: Object.keys(ka),
8497
8497
  builds: Object.keys(hi),
8498
8498
  hair: Object.keys(li),
8499
- hairColors: { ...Ke },
8499
+ hairColors: { ...We },
8500
8500
  facialHair: Object.keys(ii),
8501
8501
  glasses: Object.keys(ri),
8502
8502
  hats: Object.keys(ai),
@@ -8505,7 +8505,7 @@ function Pd(e, n = {}) {
8505
8505
  heldItems: Object.fromEntries(Object.entries(si).map(([o, r]) => [o, r.hands])),
8506
8506
  handMeetings: Object.keys(bn)
8507
8507
  },
8508
- noir: Wc,
8508
+ noir: Kc,
8509
8509
  cosmic: Uc,
8510
8510
  codePanel: {
8511
8511
  languages: uo,
@@ -8707,7 +8707,7 @@ function Nu(e, n = {}) {
8707
8707
  "",
8708
8708
  `Prop beat fields: ${ue(t.props.beatFields)}. Every prop has the controls ${Object.keys(t.props.commonControls).map((a) => `\`${a}\``).join(", ")} and the actions ${Object.keys(t.props.commonActions).map((a) => `\`${a}\``).join(", ")}.`,
8709
8709
  "",
8710
- "Scenery: `scenery({ x, y, width, height, kind: sky | room, hour, clouds, wind, rain, snow, horizon: hills | city | flat })` is a canvas target whose values `hour` (0–24), `clouds`, `rain`, `snow` (0–1) and `wind` (−1..1) are tracks (`set(prop, { at, value, duration })`, `tracks(id)`; `anchor('sun' | 'moon' | 'horizon' | 'ground', time)`); the same `wind` streams hair (`hairFollowTracks(…, { wind })`). `scenePreset('park' | 'street' | 'office' | 'home', { width, height })` lays out scenery and props as data; `buildScene` builds them into targets.",
8710
+ "Scenery: `scenery({ x, y, width, height, kind: sky | room, hour, clouds, wind, rain, snow, horizon: hills | city | flat })` is a canvas target whose values `hour` (0–24), `clouds`, `rain`, `snow` (0–1) and `wind` (−1..1) are tracks (`set(prop, { at, value, duration })`, `tracks(id)`; `anchor('sun' | 'moon' | 'horizon' | 'ground', time)`); the same `wind` streams hair (`hairFollowTracks(…, { wind })`). `scenePreset('park' | 'street' | 'office' | 'home', { width, height })` lays out scenery and props as data; `buildScene` builds them into targets (`ink` and `lineWidth` outline its props to match the characters).",
8711
8711
  "",
8712
8712
  "| Preset | Family | Actions (needs) | Controls | Anchors |",
8713
8713
  "|---|---|---|---|---|",
@@ -8733,7 +8733,7 @@ function Nu(e, n = {}) {
8733
8733
  "- `outfit`: `{ top: tshirt | shirt | blouse | dress, trouserStyle: plain | jeans | cargo, shirt: top colour, trousers: bottom colour, sleeves: short | long | none, bottom: trousers | shorts | skirt, collar, tie: colour, over: apron | labCoat | hoodie | cardigan | overalls | sari, overColor, shoes: boots, shoeColor }`",
8734
8734
  `- \`castMember(name, height)\`: ${ue(t.character.cast)}`,
8735
8735
  "- Face marks (pose fields, 0–1): `blush`, `tears`, `sweat`; close-up fields `pupil` (size, 1 usual), `lid` (upper lids lowered, 0–1), `bulge` (eyes out of the head, 0–1); `face: { nose: true, inPupil(ctx, pupil) }`; `drawCharacterHead(ctx, who, pose, { x, y, radius })` draws just the head big",
8736
- `- Face styles: ${ue(t.character.faceStyles)}; \`face: { style: 'anime', iris: '#4b7fce', lashes: true, ageLines: 0.8 }\` uses coloured eyes and the same expressions, blinks and gaze. \`ANIME_CAST\` contains eight age presets, also available through \`castMember\`. \`face: { style: 'oval' }\` (the bean figure's default) draws big white oval eyes with small pupils that follow \`lookX\`/\`lookY\`, lids for \`lid\`, \`blink\` and half-open eyes, and heavy brows for \`brow.*\`/\`browTilt\`; glasses grow to fit round them.`,
8736
+ `- Face styles: ${ue(t.character.faceStyles)}; \`face: { style: 'anime', iris: '#4b7fce', lashes: true, ageLines: 0.8 }\` uses coloured eyes and the same expressions, blinks and gaze. \`ANIME_CAST\` contains eight age presets, also available through \`castMember\`. \`face: { style: 'oval' }\` (the bean figure's default) draws big white oval eyes with small pupils that follow \`lookX\`/\`lookY\`, lids for \`lid\`, \`blink\` and half-open eyes, and heavy brows for \`brow.*\`/\`browTilt\`; glasses grow to fit round them. \`eyeScale\` (0.5–1.2) and \`eyeAspect\` (0.45–1.2, below 1 rounder) size oval eyes too, for big googly comedy eyes.`,
8737
8737
  `- Face shapes: ${ue(t.character.faceShapes)}; \`face: { shape: 'angular', jawWidth: 0.74, chinWidth: 0.14, eyeScale: 0.8, eyeAspect: 0.65 }\` sets a tapered 3D jaw and narrower anime eyes; \`jawRoundness: 1\` softens the cheek/chin corners (default 0 keeps sharp jaws). \`MANGA_CAST\` contains four original young adult presets; hair styles \`mangaSpikes\` and \`mangaSweep\` remain editable.`,
8738
8738
  "- Hair in motion (pose fields): `hair.swing` (degrees round the head, + toward its left), `hair.trail` (head radii back), `hair.lift` (head radii up); key them with `hairFollowTracks(target, tracks, who)` after the character's tracks, or `hairFollow` + `hairMotionAt` when posing per frame",
8739
8739
  `- \`holding\`: ${Object.entries(t.character.heldItems).map(([a, s]) => `\`${a}\` (${s === "both" ? "both" : s === "either" ? "one hand or both" : "left or right"})`).join(", ")}; pose fields \`held.left\`, \`held.right\`, \`held.both\` (below 0.5 lets go); \`handGrip(joints, side)\``,
@@ -8915,7 +8915,7 @@ function _d(e) {
8915
8915
  }
8916
8916
  return n;
8917
8917
  }
8918
- function Ku(e, n, t) {
8918
+ function Wu(e, n, t) {
8919
8919
  const o = (s) => `${s.target}\0${s.property}`, r = new Map(n.map((s) => [o(s), s]));
8920
8920
  return [...e.map((s) => {
8921
8921
  const i = r.get(o(s));
@@ -8925,7 +8925,7 @@ function Ku(e, n, t) {
8925
8925
  return { ...s, keyframes: c };
8926
8926
  }), ...r.values()];
8927
8927
  }
8928
- function Wu(e) {
8928
+ function Ku(e) {
8929
8929
  const n = new ve({ id: `${e.leaderId}-tow`, tracks: e.leaderTracks.filter((u) => u.target === e.leaderId) }), t = e.every ?? 33, o = e.towed, r = o.x + o.width / 2, a = o.props, s = o.prop.wheelRadius, i = [], l = [], c = [];
8930
8930
  let h = a.wheelSpin ?? 0, d;
8931
8931
  for (let u = e.start; ; u = Math.min(e.end, u + t)) {
@@ -8985,7 +8985,7 @@ function Rd(e, n) {
8985
8985
  return t ? `#${[0, 2, 4].map((r) => Math.round(parseInt(t[1].slice(r, r + 2), 16) * Math.max(0, Math.min(1, n)))).map((r) => r.toString(16).padStart(2, "0")).join("")}` : e;
8986
8986
  }
8987
8987
  const zd = cn(Ea(1, 2e-3, 28));
8988
- function Kd(e, n, t) {
8988
+ function Wd(e, n, t) {
8989
8989
  const o = e.rig, [r, a] = o.footprint ?? [o.length * 0.45, o.length], s = Math.max(0, ye(o, n, "lift")), i = Math.max(0, ye(o, n, "size")) / (1 + s * 0.8);
8990
8990
  return {
8991
8991
  mesh: zd,
@@ -8993,7 +8993,7 @@ function Kd(e, n, t) {
8993
8993
  material: { color: "#000000", shading: "unlit", opacity: 0.16 * i }
8994
8994
  };
8995
8995
  }
8996
- const Wd = /* @__PURE__ */ new Set([
8996
+ const Kd = /* @__PURE__ */ new Set([
8997
8997
  "x",
8998
8998
  "y",
8999
8999
  "z",
@@ -9025,7 +9025,7 @@ const Wd = /* @__PURE__ */ new Set([
9025
9025
  resolve({ object: e, prepared: n, values: t, world: o, camera: r, lights: a = [], fog: s, toScreen: i }) {
9026
9026
  const l = e, c = n, h = { ...l.values };
9027
9027
  for (const [v, y] of t)
9028
- typeof y == "number" && !Wd.has(v) && (h[v] = y);
9028
+ typeof y == "number" && !Kd.has(v) && (h[v] = y);
9029
9029
  h.turn = 0, h.tilt = 0;
9030
9030
  const d = oe.multiply(r.view, o), f = {
9031
9031
  toView: (v) => oe.transformPoint(d, v),
@@ -9033,12 +9033,12 @@ const Wd = /* @__PURE__ */ new Set([
9033
9033
  }, u = f.toView([0, c.rig.height / 2, 0]);
9034
9034
  if (-u[2] <= r.near) return null;
9035
9035
  if (l.look === "mesh") {
9036
- const v = l0(c.rig, h), y = v.map(({ part: T, local: I }) => ({ part: T.id, mesh: kn(T.shape), ...Yo(kn(T.shape), I) })), S = gr(y), w = v.map((T, I) => ({ ...T, hidden: pr(T.part.id, y[I].mesh, T.local, y[I].key, S) })).filter(({ opacity: T }) => T > 0.01).map(({ part: T, matrix: I, glow: C, opacity: j, hidden: K }) => ({
9037
- mesh: xd(T.shape, K),
9036
+ const v = l0(c.rig, h), y = v.map(({ part: T, local: I }) => ({ part: T.id, mesh: kn(T.shape), ...Yo(kn(T.shape), I) })), S = gr(y), w = v.map((T, I) => ({ ...T, hidden: pr(T.part.id, y[I].mesh, T.local, y[I].key, S) })).filter(({ opacity: T }) => T > 0.01).map(({ part: T, matrix: I, glow: C, opacity: j, hidden: W }) => ({
9037
+ mesh: xd(T.shape, W),
9038
9038
  world: oe.multiply(o, I),
9039
9039
  material: Nd(T, { glow: C, opacity: j }, { shading: l.shading, ink: l.ink, outline: l.outline })
9040
9040
  }));
9041
- return { meshes: l.shadow === !1 ? w : [Kd(c, h, o), ...w] };
9041
+ return { meshes: l.shadow === !1 ? w : [Wd(c, h, o), ...w] };
9042
9042
  }
9043
9043
  const p = i(u), g = i(f.toView([0, c.rig.height / 2 + 1, 0])), b = Math.hypot(g.x - p.x, g.y - p.y), $ = a.length === 0 ? void 0 : (v, y) => {
9044
9044
  const S = oe.transformPoint(o, v), w = [o[0] * y[0] + o[4] * y[1] + o[8] * y[2], o[1] * y[0] + o[5] * y[1] + o[9] * y[2], o[2] * y[0] + o[6] * y[1] + o[10] * y[2]], T = Math.hypot(...w) || 1;
@@ -9105,17 +9105,17 @@ ${r.map((k) => ` beat ${k.beat}: ${k.message}`).join(`
9105
9105
  d(Y, v, a[Y]), h(Y, v + T, ne, "ease-out"), C || (h(Y, v + S - T, ne), h(Y, v + S, 0, "ease-in")), a[Y] = C ? ne : 0;
9106
9106
  I !== void 0 && (d("lift", v, a.lift), h("lift", v + Math.min(S * 0.35, 1400), I, "ease-out"), h("lift", v + S, I), a.lift = I);
9107
9107
  const j = { ...a };
9108
- let K = l;
9108
+ let W = l;
9109
9109
  for (let Y = 0; ; Y = Math.min(y, Y + Dd)) {
9110
9110
  const ne = v + qa(w, Y / y) * S, { point: B, direction: H } = Ba(O, Y);
9111
- K += pn(K, bt([0, 0], H)), h("x", ne, B[0]), h("z", ne, B[1]), h("rotateY", ne, K);
9111
+ W += pn(W, bt([0, 0], H)), h("x", ne, B[0]), h("z", ne, B[1]), h("rotateY", ne, W);
9112
9112
  for (const [N, R] of Object.entries(k.perMetre ?? {})) h(N, ne, j[N] + Y * R);
9113
9113
  for (const [N, R] of Object.entries(k.perSecond ?? {})) h(N, ne, j[N] + (ne - v) / 1e3 * R);
9114
9114
  if (Y >= y) break;
9115
9115
  }
9116
9116
  for (const [Y, ne] of Object.entries(k.perMetre ?? {})) a[Y] = j[Y] + y * ne;
9117
9117
  for (const [Y, ne] of Object.entries(k.perSecond ?? {})) a[Y] = j[Y] + S / 1e3 * ne;
9118
- return [s, i] = O[O.length - 1].point, l = K, v + S;
9118
+ return [s, i] = O[O.length - 1].point, l = W, v + S;
9119
9119
  }, p = (k, m) => {
9120
9120
  const P = Object.fromEntries(Object.entries(k).filter(([v]) => !["at", "to", "through", "toward"].includes(v))), O = vd(e, n, [P], { start: { ...a, turn: 1 }, scale: 100, style: o.style, exaggeration: o.exaggeration });
9121
9121
  for (const v of O.tracks) {
@@ -9181,9 +9181,9 @@ const ma = (e, n) => {
9181
9181
  function Bu(e) {
9182
9182
  const n = `${e.scene}/${e.propId}`, t = new ve({ id: `${e.propId}-ride-3d`, tracks: e.propTracks.filter((b) => b.target === n) }), o = e.placement ?? {}, [r, a, s] = o.position ?? [0, 0, 0], i = e.prop.rig, l = Ao({ ...e.character, height: 1 }), c = { ...be, ...e.pose ?? Ar.seated }, h = To(l.plan, c, { height: e.height ?? 1.7, contact: l.contact }).hip, d = e.facing ?? 0, f = e.every ?? 33, u = { x: [], y: [], z: [], rotateY: [] };
9183
9183
  for (let b = e.start; ; b = Math.min(e.end, b + f)) {
9184
- const $ = t.getStateAtTime(b).values.get(n) ?? /* @__PURE__ */ new Map(), A = (j, K) => {
9184
+ const $ = t.getStateAtTime(b).values.get(n) ?? /* @__PURE__ */ new Map(), A = (j, W) => {
9185
9185
  const G = $.get(j);
9186
- return typeof G == "number" ? G : K;
9186
+ return typeof G == "number" ? G : W;
9187
9187
  }, k = { ...o.values };
9188
9188
  for (const j of Object.keys(i.controls)) k[j] = A(j, o.values?.[j] ?? ye(i, {}, j));
9189
9189
  for (const j of ["pitch", "roll", "squash", "lift", "lean", "size"]) k[j] = A(j, o.values?.[j] ?? ye(i, {}, j));
@@ -9191,9 +9191,9 @@ function Bu(e) {
9191
9191
  if (!m) throw new Error(`propRide3D: ${e.prop.kind} has no anchor "${e.anchor}" (it has ${Object.keys(i.anchors ?? {}).join(", ") || "none"})`);
9192
9192
  const P = A("rotateY", o.heading ?? 0), O = ma(m, P), v = [A("x", r) + O[0], A("y", a) + O[1], A("z", s) + O[2]], y = P + d, S = ma(h, y);
9193
9193
  let w = [v[0] - S[0], v[1] - S[1], v[2] - S[2]];
9194
- const T = (j, K) => {
9195
- const G = K * K * (3 - 2 * K);
9196
- return [j[0] + (w[0] - j[0]) * G, w[1] * G + Vd * Math.sin(Math.PI * K), j[1] + (w[2] - j[1]) * G];
9194
+ const T = (j, W) => {
9195
+ const G = W * W * (3 - 2 * W);
9196
+ return [j[0] + (w[0] - j[0]) * G, w[1] * G + Vd * Math.sin(Math.PI * W), j[1] + (w[2] - j[1]) * G];
9197
9197
  }, I = e.mount ? Math.max(1, e.mount.for ?? 450) : 0, C = e.dismount ? Math.max(1, e.dismount.for ?? 450) : 0;
9198
9198
  if (e.mount && b < e.start + I ? w = T(e.mount.from, (b - e.start) / I) : e.dismount && b > e.end - C && (w = T(e.dismount.to, (e.end - b) / C)), u.x.push({ time: b, value: w[0] }), u.y.push({ time: b, value: w[1] }), u.z.push({ time: b, value: w[2] }), u.rotateY.push({ time: b, value: y }), b >= e.end) break;
9199
9199
  }
@@ -9223,7 +9223,7 @@ const Zd = {
9223
9223
  [18.5, "#4c3f78", "#f08a5a"],
9224
9224
  [20.5, "#17203f", "#2d3660"],
9225
9225
  [24, "#0b1530", "#1b2a4a"]
9226
- ], Kt = (e, n, t) => {
9226
+ ], Wt = (e, n, t) => {
9227
9227
  const o = (s) => [1, 3, 5].map((i) => parseInt(s.slice(i, i + 2), 16)), [r, a] = [o(e), o(n)];
9228
9228
  return `#${r.map((s, i) => Math.round(s + (a[i] - s) * t).toString(16).padStart(2, "0")).join("")}`;
9229
9229
  }, Qd = (e) => {
@@ -9236,7 +9236,7 @@ function ef(e) {
9236
9236
  const [o, r, a] = Ct[t - 1], [s, i, l] = Ct[t];
9237
9237
  if (n <= s) {
9238
9238
  const c = (n - o) / (s - o);
9239
- return { top: Kt(r, i, c), bottom: Kt(a, l, c) };
9239
+ return { top: Wt(r, i, c), bottom: Wt(a, l, c) };
9240
9240
  }
9241
9241
  }
9242
9242
  return { top: Ct[0][1], bottom: Ct[0][2] };
@@ -9256,29 +9256,29 @@ function af(e) {
9256
9256
  const I = tf(w, T), C = I < 0 ? 0.5 : I, j = s - t;
9257
9257
  return { x: 0.1 * o + 0.8 * o * C, y: I < 0 ? j + r * 0.2 : j - Math.sin(C * Math.PI) * j * 0.8, up: I >= 0 };
9258
9258
  }, O = (w, T, I, C, j) => {
9259
- const K = T("hour"), { top: G, bottom: Y } = ef(K), ne = w.createLinearGradient(0, C.y, 0, C.ground);
9259
+ const W = T("hour"), { top: G, bottom: Y } = ef(W), ne = w.createLinearGradient(0, C.y, 0, C.ground);
9260
9260
  ne.addColorStop(0, G), ne.addColorStop(1, Y), w.fillStyle = ne, w.fillRect(C.x, C.y, C.w, C.ground - C.y);
9261
- const B = Qd(K);
9261
+ const B = Qd(W);
9262
9262
  if (B < 0.6) {
9263
9263
  w.fillStyle = "#ffffff", w.globalAlpha = (0.6 - B) / 0.6 * 0.9;
9264
9264
  for (const F of g)
9265
9265
  w.beginPath(), w.arc(C.x + F.u * C.w, C.y + F.v * (C.ground - C.y), F.size, 0, Math.PI * 2), w.fill();
9266
9266
  w.globalAlpha = 1;
9267
9267
  }
9268
- const H = P(K, 6), N = P(K, 18), R = Math.min(C.w, C.h) * 0.06;
9268
+ const H = P(W, 6), N = P(W, 18), R = Math.min(C.w, C.h) * 0.06;
9269
9269
  if (H.up && (w.fillStyle = i.sun, w.beginPath(), w.arc(C.x + H.x / o * C.w, C.y + H.y / r * C.h, R, 0, Math.PI * 2), w.fill()), N.up) {
9270
9270
  const F = C.x + N.x / o * C.w, Q = C.y + N.y / r * C.h;
9271
9271
  w.fillStyle = i.moon, w.beginPath(), w.arc(F, Q, R * 0.8, 0, Math.PI * 2), w.fill(), w.fillStyle = G, w.beginPath(), w.arc(F - R * 0.35, Q - R * 0.15, R * 0.7, 0, Math.PI * 2), w.fill();
9272
9272
  }
9273
9273
  const M = Math.max(0, Math.min(1, T("clouds"))), _ = Math.max(-1, Math.min(1, T("wind"))), V = Math.round(M * f.length);
9274
- w.fillStyle = Kt("#ffffff", i.cloud === "#ffffff" ? "#ffffff" : i.cloud, 1), w.globalAlpha = 0.55 + 0.4 * B;
9274
+ w.fillStyle = Wt("#ffffff", i.cloud === "#ffffff" ? "#ffffff" : i.cloud, 1), w.globalAlpha = 0.55 + 0.4 * B;
9275
9275
  for (let F = 0; F < V; F++) {
9276
9276
  const Q = f[F], ae = ((Q.u * C.w + _ * I * 0.012 * (0.6 + Q.size * 0.5)) % (C.w * 1.4) + C.w * 1.4) % (C.w * 1.4) - C.w * 0.2, x = C.x + ae, X = C.y + (0.08 + Q.v * 0.42) * (C.ground - C.y), D = Math.min(C.w, C.h) * 0.07 * Q.size;
9277
9277
  for (let Z = 0; Z < Q.puffs; Z++)
9278
9278
  w.beginPath(), w.ellipse(x + (Z - (Q.puffs - 1) / 2) * D * 0.9, X + Z % 2 * D * 0.25, D * (Z % 2 ? 0.8 : 1), D * 0.62, 0, 0, Math.PI * 2), w.fill();
9279
9279
  }
9280
9280
  w.globalAlpha = 1;
9281
- const ee = (F) => Kt(Kt(F, "#0b1530", 0.65), F, B);
9281
+ const ee = (F) => Wt(Wt(F, "#0b1530", 0.65), F, B);
9282
9282
  if (l === "hills") {
9283
9283
  w.fillStyle = ee(i.hills), w.beginPath(), w.moveTo(C.x, C.ground);
9284
9284
  const F = 40;
@@ -9305,10 +9305,10 @@ function af(e) {
9305
9305
  }
9306
9306
  w.fillStyle = ee(i.ground), w.fillRect(C.x, C.ground, C.w, C.y + C.h - C.ground);
9307
9307
  }, v = (w, T, I, C) => {
9308
- const j = Math.max(-1, Math.min(1, T("wind"))), K = Math.max(0, Math.min(1, T("rain"))), G = Math.max(0, Math.min(1, T("snow")));
9309
- if (K > 0) {
9310
- w.strokeStyle = i.rain, w.globalAlpha = 0.35 + 0.45 * K, w.lineWidth = 1.2, w.lineCap = "round";
9311
- const Y = C.h * 0.05, ne = j * 0.45, B = Math.round(K * u.length);
9308
+ const j = Math.max(-1, Math.min(1, T("wind"))), W = Math.max(0, Math.min(1, T("rain"))), G = Math.max(0, Math.min(1, T("snow")));
9309
+ if (W > 0) {
9310
+ w.strokeStyle = i.rain, w.globalAlpha = 0.35 + 0.45 * W, w.lineWidth = 1.2, w.lineCap = "round";
9311
+ const Y = C.h * 0.05, ne = j * 0.45, B = Math.round(W * u.length);
9312
9312
  w.beginPath();
9313
9313
  for (let H = 0; H < B; H++) {
9314
9314
  const N = u[H], R = ((N.v * C.h + I * N.speed * 0.9) % C.h + C.h) % C.h, M = ((N.u * C.w + R * ne) % C.w + C.w) % C.w;
@@ -9342,11 +9342,11 @@ function af(e) {
9342
9342
  draw(w, T, I) {
9343
9343
  const C = T.props ?? {}, j = (G) => Number(C[G] ?? A[G] ?? 0);
9344
9344
  w.save();
9345
- const K = { x: 0, y: 0, w: o, h: r, ground: s - t };
9345
+ const W = { x: 0, y: 0, w: o, h: r, ground: s - t };
9346
9346
  if (a === "sky")
9347
- O(w, j, I, K), v(w, j, I, K);
9348
- else if (w.fillStyle = i.wall, w.fillRect(0, 0, o, K.ground), w.fillStyle = i.floor, w.fillRect(0, K.ground, o, r - K.ground), w.fillStyle = i.skirting, w.fillRect(0, K.ground - r * 0.012, o, r * 0.012), c) {
9349
- const G = o * 0.26, Y = K.ground * 0.5, ne = o * 0.62, B = K.ground * 0.14;
9347
+ O(w, j, I, W), v(w, j, I, W);
9348
+ else if (w.fillStyle = i.wall, w.fillRect(0, 0, o, W.ground), w.fillStyle = i.floor, w.fillRect(0, W.ground, o, r - W.ground), w.fillStyle = i.skirting, w.fillRect(0, W.ground - r * 0.012, o, r * 0.012), c) {
9349
+ const G = o * 0.26, Y = W.ground * 0.5, ne = o * 0.62, B = W.ground * 0.14;
9350
9350
  w.fillStyle = i.frame, w.fillRect(ne - 6, B - 6, G + 12, Y + 12), w.save(), w.beginPath(), w.rect(ne, B, G, Y), w.clip(), O(w, j, I, { x: ne, y: B, w: G, h: Y, ground: B + Y * 0.8 }), v(w, j, I, { x: ne, y: B, w: G, h: Y }), w.restore(), w.strokeStyle = i.frame, w.lineWidth = 4, w.beginPath(), w.moveTo(ne + G / 2, B), w.lineTo(ne + G / 2, B + Y), w.moveTo(ne, B + Y / 2), w.lineTo(ne + G, B + Y / 2), w.stroke();
9351
9351
  }
9352
9352
  w.restore();
@@ -9414,8 +9414,8 @@ function lf(e, n) {
9414
9414
  }
9415
9415
  }
9416
9416
  function qu(e, n) {
9417
- const t = lf(e, n), o = af(t.scenery), r = t.props.map((a) => u0({ x: a.x, y: o.ground, prop: Er(a.preset), scale: a.scale, values: { turn: a.turn ?? 0, ...a.values } }));
9418
- return { scenery: o, props: r, ground: o.ground };
9417
+ const t = lf(e, n), o = af(t.scenery), r = { ...n.ink !== void 0 ? { ink: n.ink } : {}, ...n.lineWidth !== void 0 ? { lineWidth: n.lineWidth } : {} }, a = t.props.map((s) => u0({ x: s.x, y: o.ground, prop: Er(s.preset), scale: s.scale, values: { turn: s.turn ?? 0, ...s.values }, ...r }));
9418
+ return { scenery: o, props: a, ground: o.ground };
9419
9419
  }
9420
9420
  export {
9421
9421
  yt as ACTING_STYLES,
@@ -9430,7 +9430,7 @@ export {
9430
9430
  Zu as BEAN_SOLE,
9431
9431
  mo as BEAT_FIELDS,
9432
9432
  zt as BEAT_MOMENTS,
9433
- K0 as BED_ACTING,
9433
+ W0 as BED_ACTING,
9434
9434
  cd as BIRD_ACTING,
9435
9435
  vs as BOARD_MARKS,
9436
9436
  Vt as BOARD_THEMES,
@@ -9448,7 +9448,7 @@ export {
9448
9448
  uo as CODE_LANGUAGES,
9449
9449
  Za as CODE_PANEL_EDITS,
9450
9450
  sn as CODE_SURFACE,
9451
- Kl as CODE_THEME,
9451
+ Wl as CODE_THEME,
9452
9452
  Uc as COSMIC_KIT,
9453
9453
  _t as COSMIC_SKIES,
9454
9454
  at as DANCE_STYLES,
@@ -9464,7 +9464,7 @@ export {
9464
9464
  De as GAITS,
9465
9465
  Ns as GAIT_CYCLE_MS,
9466
9466
  ri as GLASSES_STYLES,
9467
- Ke as HAIR_COLORS,
9467
+ We as HAIR_COLORS,
9468
9468
  eg as HAIR_STILL,
9469
9469
  li as HAIR_STYLES,
9470
9470
  bn as HAND_MEETINGS,
@@ -9490,7 +9490,7 @@ export {
9490
9490
  lr as NOIR_AMBER,
9491
9491
  qo as NOIR_CREAM,
9492
9492
  rt as NOIR_INK,
9493
- Wc as NOIR_KIT,
9493
+ Kc as NOIR_KIT,
9494
9494
  At as NOIR_RED,
9495
9495
  ng as OUTFIT_PRESETS,
9496
9496
  He as POSES,
@@ -9559,10 +9559,10 @@ export {
9559
9559
  Rc as caseBoardMarkerTip,
9560
9560
  Qn as caseCardBox,
9561
9561
  hr as caseMarkPath,
9562
- Wf as castMember,
9562
+ Kf as castMember,
9563
9563
  sd as cat,
9564
9564
  C0 as chair,
9565
- Wt as changingWindows,
9565
+ Kt as changingWindows,
9566
9566
  Ao as character,
9567
9567
  mg as characterAt,
9568
9568
  bg as characterHandPose,
@@ -9571,13 +9571,13 @@ export {
9571
9571
  Of as characterLookAtTracks,
9572
9572
  Tf as characterObjects,
9573
9573
  xr as characterPartsInView,
9574
- Kr as characterPoseOf,
9574
+ Wr as characterPoseOf,
9575
9575
  wg as characterPoseTracks,
9576
9576
  tu as characterScript,
9577
9577
  Pf as characterScript3D,
9578
9578
  kc as characterStrideLength,
9579
9579
  kg as characterTarget,
9580
- Kf as chart,
9580
+ Wf as chart,
9581
9581
  wn as checkBeats,
9582
9582
  sr as checkCast,
9583
9583
  Hl as checkCharacterBeats3D,
@@ -9616,7 +9616,7 @@ export {
9616
9616
  Hp as describeTarget,
9617
9617
  N0 as desk,
9618
9618
  od as dog,
9619
- W0 as door,
9619
+ K0 as door,
9620
9620
  vg as drawBeanFedora,
9621
9621
  ou as drawBlinds,
9622
9622
  ku as drawBokeh,
@@ -9640,7 +9640,7 @@ export {
9640
9640
  Vf as drawImpactStars,
9641
9641
  Mu as drawIsoCube,
9642
9642
  Ou as drawLabelChip,
9643
- Kc as drawMarkerStroke,
9643
+ Wc as drawMarkerStroke,
9644
9644
  uu as drawNameCard,
9645
9645
  gu as drawNarrationBox,
9646
9646
  jl as drawPencil,
@@ -9716,8 +9716,8 @@ export {
9716
9716
  wa as humanGaitStrideLength,
9717
9717
  Ir as humanPlan,
9718
9718
  $a as humanPose,
9719
- Kg as illustrationTones,
9720
- Wg as isHeld,
9719
+ Wg as illustrationTones,
9720
+ Kg as isHeld,
9721
9721
  Dc as isoCubeFaces,
9722
9722
  Fg as jointsInScene,
9723
9723
  Dg as jointsToScene,
@@ -9727,7 +9727,7 @@ export {
9727
9727
  lu as lightFlicker,
9728
9728
  iu as lightningFlash,
9729
9729
  xc as lineReveal,
9730
- Wa as lipSyncKeyframes,
9730
+ Ka as lipSyncKeyframes,
9731
9731
  zo as lipSyncOver,
9732
9732
  Af as lipSyncTracks,
9733
9733
  za as lit,
@@ -9741,7 +9741,7 @@ export {
9741
9741
  Lr as mirrorHumanPose,
9742
9742
  ki as mirrorPose,
9743
9743
  Gg as mittenAt,
9744
- Ka as mixColors,
9744
+ Wa as mixColors,
9745
9745
  hn as mixHandPoses,
9746
9746
  ya as mixPoses,
9747
9747
  T0 as motorbike,
@@ -9762,7 +9762,7 @@ export {
9762
9762
  eu as persona,
9763
9763
  Tn as pieceMotion,
9764
9764
  pd as pigeon,
9765
- Wi as plantDanceFoot,
9765
+ Ki as plantDanceFoot,
9766
9766
  Po as pointAlong,
9767
9767
  Vg as pointOnHead,
9768
9768
  On as popIn,
@@ -9783,7 +9783,7 @@ export {
9783
9783
  kn as propShapeMesh,
9784
9784
  ju as propSurface,
9785
9785
  u0 as propTarget,
9786
- Wu as propTow,
9786
+ Ku as propTow,
9787
9787
  a0 as propView,
9788
9788
  it as quadruped,
9789
9789
  id as rabbit,
@@ -9791,7 +9791,7 @@ export {
9791
9791
  vc as reachOf,
9792
9792
  er as resolveActingStyle,
9793
9793
  Zg as resolveBean,
9794
- Wr as resolveCharacterPoseKeys,
9794
+ Kr as resolveCharacterPoseKeys,
9795
9795
  Qg as resolveFacialHair,
9796
9796
  ep as resolveGait,
9797
9797
  tp as resolveGlasses,
@@ -9805,7 +9805,7 @@ export {
9805
9805
  va as resolvePoseKeys,
9806
9806
  hp as resolveStickFrame,
9807
9807
  cp as resolveStickPose,
9808
- Wo as rideFloors,
9808
+ Ko as rideFloors,
9809
9809
  dp as rotateAbout,
9810
9810
  Ho as routineBeats,
9811
9811
  fp as rubberLimb,
@@ -9830,14 +9830,14 @@ export {
9830
9830
  ml as soundsOf,
9831
9831
  hc as speechDuration,
9832
9832
  El as speechLength,
9833
- Ku as spliceTracks,
9833
+ Wu as spliceTracks,
9834
9834
  ld as squirrel,
9835
9835
  To as stagePlanSpace,
9836
9836
  If as stageSpots,
9837
- Wh as stepsDuration,
9837
+ Kh as stepsDuration,
9838
9838
  nr as stepsToKeys,
9839
9839
  Sa as stickFigureAt,
9840
- We as stickFigureJoints,
9840
+ Ke as stickFigureJoints,
9841
9841
  Ma as stickFigureTarget,
9842
9842
  Zi as stickToHuman,
9843
9843
  mp as strideLength,
@@ -9852,7 +9852,7 @@ export {
9852
9852
  A0 as tree,
9853
9853
  k0 as truck,
9854
9854
  Ml as tubeMesh,
9855
- Ko as valueAt,
9855
+ Wo as valueAt,
9856
9856
  Ve as vehicle,
9857
9857
  vp as walkPose,
9858
9858
  L0 as wheelchair,