@pixerate/editor 0.249.0 → 0.250.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.
Files changed (69) hide show
  1. package/dist/animation-editor/index.cjs +114 -113
  2. package/dist/animation-editor/index.js +7 -6
  3. package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-2FHFLSEG.js} +4 -3
  4. package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-QGRXOKDA.cjs} +7 -6
  5. package/dist/canvas/index.cjs +71 -15
  6. package/dist/canvas/index.d.cts +1 -0
  7. package/dist/canvas/index.d.ts +1 -0
  8. package/dist/canvas/index.js +58 -2
  9. package/dist/canvas/stickers.d.cts +35 -0
  10. package/dist/canvas/stickers.d.ts +35 -0
  11. package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
  12. package/dist/{chunk-UBRJOIR5.js → chunk-3TWOCSCY.js} +1 -1
  13. package/dist/{chunk-ZEYMKDYS.cjs → chunk-4JNWA3VT.cjs} +53 -20
  14. package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
  15. package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
  16. package/dist/{chunk-LJRCU3BJ.cjs → chunk-ATK6ABN3.cjs} +15 -13
  17. package/dist/{chunk-H4AOUUBE.cjs → chunk-GT77U7QG.cjs} +18 -16
  18. package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
  19. package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
  20. package/dist/{chunk-PZP2SZIZ.js → chunk-KDLBJ6QR.js} +1 -1
  21. package/dist/{chunk-LP2MCSBE.cjs → chunk-M2VKFE5L.cjs} +86 -86
  22. package/dist/{chunk-DOIU7VJG.js → chunk-NOHJP5TK.js} +1 -1
  23. package/dist/{chunk-O75V4ZS3.js → chunk-NTRAVM2I.js} +1 -1
  24. package/dist/{chunk-J7T5QZ45.js → chunk-OTEPAQJX.js} +4 -2
  25. package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
  26. package/dist/{chunk-6BIDVPED.js → chunk-SMSGP2HQ.js} +1 -1
  27. package/dist/chunk-SZTI6EER.js +13 -0
  28. package/dist/{chunk-EJLRBS5Q.js → chunk-U4NUOKBT.js} +4 -2
  29. package/dist/chunk-U67EN7GG.cjs +13 -0
  30. package/dist/{chunk-5RH3VXAK.js → chunk-WKH5ZAUA.js} +45 -12
  31. package/dist/{chunk-IOFVM3L3.cjs → chunk-WPUXGDH4.cjs} +2 -2
  32. package/dist/{chunk-2SMMZDMG.cjs → chunk-X7WRL5ZZ.cjs} +35 -35
  33. package/dist/{chunk-WLJZZHUZ.cjs → chunk-YM6ZBTXG.cjs} +23 -23
  34. package/dist/{chunk-KYX7NZ5V.cjs → chunk-YW43M56C.cjs} +1 -1
  35. package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
  36. package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
  37. package/dist/effects/helpers.d.cts +6 -0
  38. package/dist/effects/helpers.d.ts +6 -0
  39. package/dist/effects/index.cjs +62 -60
  40. package/dist/effects/index.js +5 -3
  41. package/dist/effects/tools.d.cts +6 -0
  42. package/dist/effects/tools.d.ts +6 -0
  43. package/dist/image-editor/effects.d.cts +1 -1
  44. package/dist/image-editor/effects.d.ts +1 -1
  45. package/dist/image-editor/index.cjs +814 -791
  46. package/dist/image-editor/index.d.cts +1 -0
  47. package/dist/image-editor/index.d.ts +1 -0
  48. package/dist/image-editor/index.js +35 -12
  49. package/dist/image-editor/stickers.d.cts +9 -0
  50. package/dist/image-editor/stickers.d.ts +9 -0
  51. package/dist/paint-editor/index.cjs +165 -164
  52. package/dist/paint-editor/index.js +8 -7
  53. package/dist/stickers/index.cjs +22 -16
  54. package/dist/stickers/index.d.cts +1 -1
  55. package/dist/stickers/index.d.ts +1 -1
  56. package/dist/stickers/index.js +9 -3
  57. package/dist/stickers/tools.d.cts +57 -1
  58. package/dist/stickers/tools.d.ts +57 -1
  59. package/dist/vector/index.cjs +1003 -969
  60. package/dist/vector/index.d.cts +1 -0
  61. package/dist/vector/index.d.ts +1 -0
  62. package/dist/vector/index.js +40 -6
  63. package/dist/vector/stickers.d.cts +11 -0
  64. package/dist/vector/stickers.d.ts +11 -0
  65. package/dist/video-editor/index.cjs +344 -344
  66. package/dist/video-editor/index.js +4 -4
  67. package/package.json +1 -1
  68. package/skills/pixerate-image-editor/SKILL.md +1 -1
  69. package/skills/pixerate-stickers/SKILL.md +13 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
2
2
 
3
- var _chunk2SMMZDMGcjs = require('../chunk-2SMMZDMG.cjs');
3
+ var _chunkX7WRL5ZZcjs = require('../chunk-X7WRL5ZZ.cjs');
4
4
 
5
5
 
6
6
 
@@ -16,7 +16,7 @@ var _chunkDGWOGQJ5cjs = require('../chunk-DGWOGQJ5.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkK5DS2JTAcjs = require('../chunk-K5DS2JTA.cjs');
19
+ var _chunkZ3BRH4JKcjs = require('../chunk-Z3BRH4JK.cjs');
20
20
 
21
21
 
22
22
 
@@ -39,9 +39,9 @@ var _chunkK5DS2JTAcjs = require('../chunk-K5DS2JTA.cjs');
39
39
 
40
40
 
41
41
 
42
- var _chunkIOFVM3L3cjs = require('../chunk-IOFVM3L3.cjs');
43
- require('../chunk-H4AOUUBE.cjs');
44
- require('../chunk-ZEYMKDYS.cjs');
42
+ var _chunkWPUXGDH4cjs = require('../chunk-WPUXGDH4.cjs');
43
+ require('../chunk-GT77U7QG.cjs');
44
+ require('../chunk-4JNWA3VT.cjs');
45
45
  require('../chunk-CVFAAZXE.cjs');
46
46
 
47
47
 
@@ -51,6 +51,7 @@ require('../chunk-CVFAAZXE.cjs');
51
51
 
52
52
  var _chunkGF2RBSDMcjs = require('../chunk-GF2RBSDM.cjs');
53
53
  require('../chunk-NM3G4VQT.cjs');
54
+ require('../chunk-U67EN7GG.cjs');
54
55
 
55
56
 
56
57
  var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
@@ -70,7 +71,7 @@ var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
70
71
 
71
72
 
72
73
 
73
- var _chunkGHCSC2WPcjs = require('../chunk-GHCSC2WP.cjs');
74
+ var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
74
75
  require('../chunk-WOFXZ3XU.cjs');
75
76
  require('../chunk-I7NJPHWV.cjs');
76
77
  require('../chunk-3K6HWEXZ.cjs');
@@ -505,11 +506,11 @@ function shotLayersShapeProblems(shot, name) {
505
506
  if (layer.effect === void 0 && layer.subject === void 0) problems.push(`${where} needs an "effect", a "subject" or both.`);
506
507
  if (layer.effect !== void 0 && (typeof layer.effect !== "string" || !layer.effect)) problems.push(`${where}: "effect" must be an effect id.`);
507
508
  if (layer.subject !== void 0) {
508
- const kind = _chunkK5DS2JTAcjs.effectSubjectKind.call(void 0, layer.subject);
509
+ const kind = _chunkZ3BRH4JKcjs.effectSubjectKind.call(void 0, layer.subject);
509
510
  if (kind === "video") problems.push(`${where}: an animation layer cannot play a video; use { "image" }, { "svg" }, { "text" } or { "slot" } (the video editor plays video).`);
510
511
  else if (!kind || !String(layer.subject[kind]).trim()) problems.push(`${where}: "subject" must be { "image": url }, { "svg": markup }, { "text": words } or { "slot": name }.`);
511
512
  }
512
- if (layer.role !== void 0 && !_chunkGHCSC2WPcjs.EFFECT_LAYER_ROLES.includes(layer.role)) problems.push(`${where}: "role" must be one of ${_chunkGHCSC2WPcjs.EFFECT_LAYER_ROLES.join(", ")}.`);
513
+ if (layer.role !== void 0 && !_chunkISIO63Q5cjs.EFFECT_LAYER_ROLES.includes(layer.role)) problems.push(`${where}: "role" must be one of ${_chunkISIO63Q5cjs.EFFECT_LAYER_ROLES.join(", ")}.`);
513
514
  if (layer.rect !== void 0) {
514
515
  const r = layer.rect;
515
516
  if (!isObject(r) || !["x", "y", "width", "height"].every((k) => isNum(r[k])) || !(r.width > 0 && r.height > 0)) problems.push(`${where}: "rect" must be { x, y, width, height } in artwork units, width and height > 0.`);
@@ -701,7 +702,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
701
702
  function motionTextLayout(nodes, id) {
702
703
  const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
703
704
  if (!group || group.type !== "group") return null;
704
- const letters = _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _8 => _8.get, 'call', _9 => _9(p.id), 'optionalAccess', _10 => _10.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
705
+ const letters = _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _8 => _8.get, 'call', _9 => _9(p.id), 'optionalAccess', _10 => _10.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
705
706
  if (!letters.length) return null;
706
707
  const lines = [];
707
708
  for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
@@ -786,21 +787,21 @@ function indexMotionNodes(nodes) {
786
787
  const out = /* @__PURE__ */ new Map();
787
788
  const walk = (list, parentWorld, ancestors) => {
788
789
  for (const node of list) {
789
- const local = _chunkIOFVM3L3cjs.vectorNodeBounds.call(void 0, node);
790
- const bounds = _chunkIOFVM3L3cjs.vectorNodeBounds.call(void 0, node, parentWorld);
790
+ const local = _chunkWPUXGDH4cjs.vectorNodeBounds.call(void 0, node);
791
+ const bounds = _chunkWPUXGDH4cjs.vectorNodeBounds.call(void 0, node, parentWorld);
791
792
  const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
792
793
  if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
793
- if (node.type === "group") walk(node.children, _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
794
+ if (node.type === "group") walk(node.children, _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
794
795
  }
795
796
  };
796
- walk(nodes, _chunkIOFVM3L3cjs.IDENTITY_MATRIX, []);
797
+ walk(nodes, _chunkWPUXGDH4cjs.IDENTITY_MATRIX, []);
797
798
  indexCache.set(nodes, out);
798
799
  return out;
799
800
  }
800
801
  var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
801
802
  function firstPaint(node, key) {
802
803
  if (node.type === "path") return solid(node[key]);
803
- for (const p of _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node)) {
804
+ for (const p of _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node)) {
804
805
  const s = solid(p[key]);
805
806
  if (s) return s;
806
807
  }
@@ -808,7 +809,7 @@ function firstPaint(node, key) {
808
809
  }
809
810
  function strokeReach(node) {
810
811
  let reach = 0;
811
- for (const p of node.type === "path" ? [node] : _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node)) {
812
+ for (const p of node.type === "path" ? [node] : _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node)) {
812
813
  if (p.stroke == null || p.stroke === "none") continue;
813
814
  const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
814
815
  reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
@@ -878,7 +879,7 @@ function motionRestValue(entry, property, artwork) {
878
879
  case "stroke":
879
880
  return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
880
881
  case "strokeWidth": {
881
- const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node)[0] : void 0;
882
+ const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node)[0] : void 0;
882
883
  return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
883
884
  }
884
885
  case "shape":
@@ -989,12 +990,12 @@ function resolveMotionCamera(camera, scene) {
989
990
  const r = camera;
990
991
  return { x: r.x, y: r.y, width: r.width, height: r.height };
991
992
  }
992
- function motionPathLength(node, parentWorld = _chunkIOFVM3L3cjs.IDENTITY_MATRIX) {
993
+ function motionPathLength(node, parentWorld = _chunkWPUXGDH4cjs.IDENTITY_MATRIX) {
993
994
  let longest = 0;
994
- const paths = node.type === "path" ? [node] : _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node);
995
+ const paths = node.type === "path" ? [node] : _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node);
995
996
  for (const p of paths) {
996
997
  try {
997
- longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
998
+ longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
998
999
  } catch (e2) {
999
1000
  }
1000
1001
  }
@@ -1130,9 +1131,9 @@ function compileMotionScene(scene) {
1130
1131
  const start = t;
1131
1132
  let cursor = start;
1132
1133
  const f = motionShotTimeScale(shot);
1133
- const moveIn = shot.camera ? _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, shot.camera.in) : void 0;
1134
- const transitionMs = index > 0 && shot.transition ? (_nullishCoalesce(shot.transition.ms, () => ( _chunkGHCSC2WPcjs.EFFECT_TRANSITION_MS))) * f : 0;
1135
- const moveDuring = shot.camera ? _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, shot.camera.during) : void 0;
1134
+ const moveIn = shot.camera ? _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, shot.camera.in) : void 0;
1135
+ const transitionMs = index > 0 && shot.transition ? (_nullishCoalesce(shot.transition.ms, () => ( _chunkISIO63Q5cjs.EFFECT_TRANSITION_MS))) * f : 0;
1136
+ const moveDuring = shot.camera ? _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, shot.camera.during) : void 0;
1136
1137
  let playsIn = false;
1137
1138
  if (shot.camera) {
1138
1139
  const framed = motionCameraFramed(shot.camera);
@@ -1270,12 +1271,12 @@ function compileMotionScene(scene) {
1270
1271
  const order2 = _nullishCoalesce(o.order, () => ( "together"));
1271
1272
  const pace = _nullishCoalesce(o.pace, () => ( "time"));
1272
1273
  if (order2 === "together" && pace === "time") return null;
1273
- const paths = entry.node.type === "path" ? [entry.node] : _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, entry.node);
1274
+ const paths = entry.node.type === "path" ? [entry.node] : _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, entry.node);
1274
1275
  let list = paths.map((p) => {
1275
1276
  const at = nodes.get(p.id);
1276
1277
  let first = { x: 0, y: 0 };
1277
1278
  try {
1278
- const m = _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _42 => _42.parentWorld]), () => ( _chunkIOFVM3L3cjs.IDENTITY_MATRIX)), { effects: false })[0];
1279
+ const m = _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _42 => _42.parentWorld]), () => ( _chunkWPUXGDH4cjs.IDENTITY_MATRIX)), { effects: false })[0];
1279
1280
  if (m && m.type === "M") first = { x: m.x, y: m.y };
1280
1281
  } catch (e3) {
1281
1282
  }
@@ -1387,17 +1388,17 @@ function compileMotionScene(scene) {
1387
1388
  let dx = _nullishCoalesce(_optionalChain([command3, 'access', _45 => _45.by, 'optionalAccess', _46 => _46.x]), () => ( 0));
1388
1389
  let dy = _nullishCoalesce(_optionalChain([command3, 'access', _47 => _47.by, 'optionalAccess', _48 => _48.y]), () => ( 0));
1389
1390
  if (command3.to) {
1390
- const inv = _chunkIOFVM3L3cjs.invertMatrix.call(void 0, entry.parentWorld);
1391
- const target = _chunkIOFVM3L3cjs.applyMatrix.call(void 0, inv, command3.to);
1391
+ const inv = _chunkWPUXGDH4cjs.invertMatrix.call(void 0, entry.parentWorld);
1392
+ const target = _chunkWPUXGDH4cjs.applyMatrix.call(void 0, inv, command3.to);
1392
1393
  dx = target.x - (entry.center.x + num2("x"));
1393
1394
  dy = target.y - (entry.center.y + num2("y"));
1394
1395
  }
1395
1396
  if (_optionalChain([command3, 'access', _49 => _49.via, 'optionalAccess', _50 => _50.length])) {
1396
- const inv = _chunkIOFVM3L3cjs.invertMatrix.call(void 0, entry.parentWorld);
1397
+ const inv = _chunkWPUXGDH4cjs.invertMatrix.call(void 0, entry.parentWorld);
1397
1398
  const x0 = num2("x");
1398
1399
  const y0 = num2("y");
1399
1400
  const add = command3.blend === "add";
1400
- const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkIOFVM3L3cjs.applyMatrix.call(void 0, inv, p)).map((p) => ({ x: p.x - entry.center.x - x0, y: p.y - entry.center.y - y0 })), { x: dx, y: dy }];
1401
+ const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkWPUXGDH4cjs.applyMatrix.call(void 0, inv, p)).map((p) => ({ x: p.x - entry.center.x - x0, y: p.y - entry.center.y - y0 })), { x: dx, y: dy }];
1401
1402
  const times = _optionalChain([command3, 'access', _51 => _51.times, 'optionalAccess', _52 => _52.length]) === command3.via.length ? [start, ...command3.times.map((f) => start + f * (end - start)), end] : smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
1402
1403
  for (const axis of ["x", "y"]) {
1403
1404
  const base = add ? 0 : axis === "x" ? x0 : y0;
@@ -1501,7 +1502,7 @@ function motionShotAt(timeline, time) {
1501
1502
  // src/animation-editor/camera.ts
1502
1503
  var windowCache = /* @__PURE__ */ new WeakMap();
1503
1504
  function motionShotCameraMove(shot, role) {
1504
- return _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'optionalAccess', _55 => _55.camera, 'optionalAccess', _56 => _56[role === "transition" ? "in" : "during"]]));
1505
+ return _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'optionalAccess', _55 => _55.camera, 'optionalAccess', _56 => _56[role === "transition" ? "in" : "during"]]));
1505
1506
  }
1506
1507
  var motionCameraStage = (scene) => ({ width: scene.artwork.width, height: scene.artwork.height });
1507
1508
  var effectsPlayCamera = (provider) => !!provider && provider.capabilities.supportsCamera === true && typeof provider.cameraView === "function";
@@ -1523,7 +1524,7 @@ function motionCameraWindows(scene, provider) {
1523
1524
  const track = timeline.tracks.get(motionTrackKey("", "camera"));
1524
1525
  const boxView = (t) => {
1525
1526
  const b = trackValue(track, t);
1526
- return _chunkGHCSC2WPcjs.cameraViewOfBox.call(void 0, Array.isArray(b) ? { x: b[0], y: b[1], width: b[2], height: b[3] } : full, stage);
1527
+ return _chunkISIO63Q5cjs.cameraViewOfBox.call(void 0, Array.isArray(b) ? { x: b[0], y: b[1], width: b[2], height: b[3] } : full, stage);
1527
1528
  };
1528
1529
  const view = (move, values, from, to, u, ms2) => {
1529
1530
  try {
@@ -1539,7 +1540,7 @@ function motionCameraWindows(scene, provider) {
1539
1540
  const eases = timing.commandsStart > timing.start && !!_optionalChain([track, 'optionalAccess', _57 => _57.some, 'call', _58 => _58((seg) => seg.shot === timing.id)]);
1540
1541
  const framed = !!_optionalChain([track, 'optionalAccess', _59 => _59.some, 'call', _60 => _60((seg) => seg.shot === timing.id)]);
1541
1542
  if (timing.cameraIn && timing.commandsStart > timing.start) {
1542
- const spec = _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'access', _61 => _61.camera, 'optionalAccess', _62 => _62.in]));
1543
+ const spec = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'access', _61 => _61.camera, 'optionalAccess', _62 => _62.in]));
1543
1544
  const from = _nullishCoalesce(carry, () => ( boxView(timing.start)));
1544
1545
  const to = boxView(timing.commandsStart);
1545
1546
  if (view(spec.move, spec.values, from, to, 0, timing.commandsStart - timing.start)) {
@@ -1551,7 +1552,7 @@ function motionCameraWindows(scene, provider) {
1551
1552
  carry = null;
1552
1553
  } else if (framed) carry = null;
1553
1554
  if (timing.cameraDuring && timing.end > timing.commandsEnd) {
1554
- const spec = _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'access', _63 => _63.camera, 'optionalAccess', _64 => _64.during]));
1555
+ const spec = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'access', _63 => _63.camera, 'optionalAccess', _64 => _64.during]));
1555
1556
  const from = _nullishCoalesce(carry, () => ( boxView(timing.commandsEnd)));
1556
1557
  const ms2 = timing.end - timing.commandsEnd;
1557
1558
  const last = view(spec.move, spec.values, from, from, 1, ms2);
@@ -1568,8 +1569,8 @@ var lerp = (a, b, t) => a + (b - a) * t;
1568
1569
  var smooth = (t) => t * t * (3 - 2 * t);
1569
1570
  function easeViews(from, to, u, stage) {
1570
1571
  const k = smooth(Math.min(1, Math.max(0, u)));
1571
- const a = _chunkGHCSC2WPcjs.cameraBoxOfView.call(void 0, from, stage);
1572
- const b = _chunkGHCSC2WPcjs.cameraBoxOfView.call(void 0, to, stage);
1572
+ const a = _chunkISIO63Q5cjs.cameraBoxOfView.call(void 0, from, stage);
1573
+ const b = _chunkISIO63Q5cjs.cameraBoxOfView.call(void 0, to, stage);
1573
1574
  const zoom = from.zoom * Math.pow(to.zoom / from.zoom, k);
1574
1575
  const cx = lerp(a.x + a.width / 2, b.x + b.width / 2, k);
1575
1576
  const cy = lerp(a.y + a.height / 2, b.y + b.height / 2, k);
@@ -1601,7 +1602,7 @@ function motionCameraViewAt(scene, time, provider) {
1601
1602
  return retaken ? null : before.after;
1602
1603
  }
1603
1604
  function motionCameraBox(view, scene) {
1604
- return _chunkGHCSC2WPcjs.cameraBoxOfView.call(void 0, view, motionCameraStage(scene));
1605
+ return _chunkISIO63Q5cjs.cameraBoxOfView.call(void 0, view, motionCameraStage(scene));
1605
1606
  }
1606
1607
  function motionCameraTransform(view, width) {
1607
1608
  if (!view || !view.tilt && !view.turn) return "";
@@ -1642,7 +1643,7 @@ async function checkMotionCameraMoves(scene, provider) {
1642
1643
  const spec = shot.camera[field];
1643
1644
  if (spec === void 0) continue;
1644
1645
  try {
1645
- await _chunkGHCSC2WPcjs.resolveCameraMoveSpec.call(void 0, provider, spec, role);
1646
+ await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, provider, spec, role);
1646
1647
  } catch (error) {
1647
1648
  const code = error.code === "invalid_values" || /preset/.test(error.message) ? "camera-move-values" : "camera-move-unknown";
1648
1649
  issues.push(_chunkDGWOGQJ5cjs.motionIssue.call(void 0, code, error.message, { shot: shot.id }));
@@ -1670,7 +1671,7 @@ function motionLayerSpans(scene) {
1670
1671
  (_nullishCoalesce(shot.layers, () => ( []))).forEach((layer, index) => {
1671
1672
  const start = at(shotIndex2, layer.from, shots[shotIndex2].start);
1672
1673
  const end = Math.max(start, at(shotIndex2, _nullishCoalesce(layer.until, () => ( { shots: 1 })), total));
1673
- out.push({ layer, shot: shot.id, shotIndex: shotIndex2, index, role: _chunkK5DS2JTAcjs.effectLayerRole.call(void 0, layer), start, end });
1674
+ out.push({ layer, shot: shot.id, shotIndex: shotIndex2, index, role: _chunkZ3BRH4JKcjs.effectLayerRole.call(void 0, layer), start, end });
1674
1675
  });
1675
1676
  });
1676
1677
  spanCache.set(scene, out);
@@ -1765,7 +1766,7 @@ var MotionLayersEngine = (_class = class {
1765
1766
  __init6() {this.generation = 0}
1766
1767
 
1767
1768
  constructor(options = {}) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);
1768
- this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkGHCSC2WPcjs.EffectsSlot)()));
1769
+ this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkISIO63Q5cjs.EffectsSlot)()));
1769
1770
  this.host = _nullishCoalesce(options.host, () => ( null));
1770
1771
  this.frameSvg = options.frameSvg;
1771
1772
  this.options = { scale: _nullishCoalesce(options.scale, () => ( 1)), maxSize: _nullishCoalesce(options.maxSize, () => ( 1280)), fps: _nullishCoalesce(options.fps, () => ( 30)), maxEntries: _nullishCoalesce(options.maxEntries, () => ( 160)) };
@@ -1885,8 +1886,8 @@ var MotionLayersEngine = (_class = class {
1885
1886
  const effect = layer.effect;
1886
1887
  this.request(key, { layer: layer.id }, async () => {
1887
1888
  const d = await this.describe(effect);
1888
- const values = _chunkGHCSC2WPcjs.resolveEffectValues.call(void 0, d, layer.values);
1889
- const input = _chunkK5DS2JTAcjs.effectLayerInput.call(void 0, d);
1889
+ const values = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, layer.values);
1890
+ const input = _chunkZ3BRH4JKcjs.effectLayerInput.call(void 0, d);
1890
1891
  const inputs = layer.subject && input ? { [input]: await this.subjectPixels(layer.subject, size) } : void 0;
1891
1892
  const pixels = await this.pool.render(provider, effect, size, { time, values, ...inputs ? { inputs } : {} });
1892
1893
  return host.encode(pixels);
@@ -1907,7 +1908,7 @@ var MotionLayersEngine = (_class = class {
1907
1908
  const fromKey = `from:${sceneId(scene)}:${active.shot}:${size.width}x${size.height}`;
1908
1909
  this.request(key, { transition: active.shot }, async () => {
1909
1910
  const d = await this.describe(t.effect);
1910
- const values = _chunkGHCSC2WPcjs.resolveEffectValues.call(void 0, d, t.values);
1911
+ const values = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, t.values);
1911
1912
  frameSvg(scene, Math.max(0, active.start - 1e-3));
1912
1913
  frameSvg(scene, at);
1913
1914
  await this.idleExcept(key);
@@ -2020,13 +2021,13 @@ function morphBetween(a, b) {
2020
2021
  let inner = morphCache.get(a);
2021
2022
  if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
2022
2023
  let morph = inner.get(b);
2023
- if (!morph) inner.set(b, morph = _chunk2SMMZDMGcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
2024
+ if (!morph) inner.set(b, morph = _chunkX7WRL5ZZcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
2024
2025
  return morph;
2025
2026
  }
2026
2027
  function shapeIn(entry, shape) {
2027
2028
  if (shape === entry) return entry.node;
2028
- const m = _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkIOFVM3L3cjs.invertMatrix.call(void 0, entry.parentWorld));
2029
- return { ...shape.node, ..._chunkIOFVM3L3cjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
2029
+ const m = _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkWPUXGDH4cjs.invertMatrix.call(void 0, entry.parentWorld));
2030
+ return { ...shape.node, ..._chunkWPUXGDH4cjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
2030
2031
  }
2031
2032
  function shapeAt(entry, timeline, nodes, time) {
2032
2033
  const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
@@ -2046,7 +2047,7 @@ function shapeAt(entry, timeline, nodes, time) {
2046
2047
  function motionFollowRoute(entry, path) {
2047
2048
  if (!path || path.node.type !== "path") return null;
2048
2049
  try {
2049
- return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkIOFVM3L3cjs.invertMatrix.call(void 0, entry.parentWorld));
2050
+ return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkWPUXGDH4cjs.invertMatrix.call(void 0, entry.parentWorld));
2050
2051
  } catch (e6) {
2051
2052
  return null;
2052
2053
  }
@@ -2080,9 +2081,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
2080
2081
  const scaleX = read("scaleX", 1);
2081
2082
  const scaleY = read("scaleY", 1);
2082
2083
  const c = entry.center;
2083
- let matrix = _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkIOFVM3L3cjs.rotateMatrix.call(void 0, rotation, c)), _chunkIOFVM3L3cjs.translateMatrix.call(void 0, dx, dy));
2084
+ let matrix = _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkWPUXGDH4cjs.rotateMatrix.call(void 0, rotation, c)), _chunkWPUXGDH4cjs.translateMatrix.call(void 0, dx, dy));
2084
2085
  const along = follow ? followAt(entry, timeline, nodes, time) : null;
2085
- if (along) matrix = _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, matrix, _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkIOFVM3L3cjs.rotateMatrix.call(void 0, along.angle)), _chunkIOFVM3L3cjs.translateMatrix.call(void 0, along.x, along.y)));
2086
+ if (along) matrix = _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, matrix, _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkWPUXGDH4cjs.rotateMatrix.call(void 0, along.angle)), _chunkWPUXGDH4cjs.translateMatrix.call(void 0, along.x, along.y)));
2086
2087
  return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
2087
2088
  }
2088
2089
  function motionNodeClips(id, timeline, time) {
@@ -2149,7 +2150,7 @@ function motionFrameAt(scene, time, options = {}) {
2149
2150
  const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
2150
2151
  const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
2151
2152
  if (start > 0 || end < 1) {
2152
- const trim = _chunkIOFVM3L3cjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
2153
+ const trim = _chunkWPUXGDH4cjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
2153
2154
  p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
2154
2155
  }
2155
2156
  }
@@ -2163,8 +2164,8 @@ function motionFrameAt(scene, time, options = {}) {
2163
2164
  if (o >= 1) delete out.opacity;
2164
2165
  }
2165
2166
  const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
2166
- if (offset && !_chunkIOFVM3L3cjs.isIdentityMatrix.call(void 0, offset.matrix)) {
2167
- const m = _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _chunkIOFVM3L3cjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
2167
+ if (offset && !_chunkWPUXGDH4cjs.isIdentityMatrix.call(void 0, offset.matrix)) {
2168
+ const m = _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _chunkWPUXGDH4cjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
2168
2169
  out = { ...out, transform: m };
2169
2170
  }
2170
2171
  return out;
@@ -2185,8 +2186,8 @@ function motionFrameToSvg(scene, time, options = {}) {
2185
2186
  const wrap = { ...options.wrap };
2186
2187
  for (const [id, clips] of Object.entries(frame.clips))
2187
2188
  wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
2188
- if (!motionSceneHasLayers(scene)) return withCameraViewEffects(withViewBox(_chunkIOFVM3L3cjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera), frame.view, frame.camera, prefix);
2189
- const art = _chunkIOFVM3L3cjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap, background: false });
2189
+ if (!motionSceneHasLayers(scene)) return withCameraViewEffects(withViewBox(_chunkWPUXGDH4cjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera), frame.view, frame.camera, prefix);
2190
+ const art = _chunkWPUXGDH4cjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap, background: false });
2190
2191
  let svg = withViewBox(withMotionShotLayers(art, scene, time, frame.camera, options.layers, options.background !== false), frame.camera);
2191
2192
  const transition = options.transitions === false ? null : motionTransitionAt(scene, time);
2192
2193
  if (transition) {
@@ -2377,8 +2378,8 @@ function visibleAt(timeline, id, time, node) {
2377
2378
  if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
2378
2379
  const circle = clip("clipCircle");
2379
2380
  if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
2380
- const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
2381
- const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node).length === 0 || _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node).some((p) => {
2381
+ const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
2382
+ const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node).length === 0 || _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node).some((p) => {
2382
2383
  const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
2383
2384
  return typeof v !== "number" || v > 0.01;
2384
2385
  }));
@@ -2465,7 +2466,7 @@ function checkMotionScene(scene) {
2465
2466
  }
2466
2467
  for (const id of targets) {
2467
2468
  const node = nodes.get(id).node;
2468
- const paths = node.type === "path" ? [node] : _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node);
2469
+ const paths = node.type === "path" ? [node] : _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node);
2469
2470
  if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
2470
2471
  issues.push(_chunkDGWOGQJ5cjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient ${key}; it switches to ${color} at the end instead of blending.`, { ...where, ids: [id] }));
2471
2472
  }
@@ -2478,7 +2479,7 @@ function checkMotionScene(scene) {
2478
2479
  else
2479
2480
  for (const id of targets) {
2480
2481
  const node = nodes.get(id).node;
2481
- const paths = node.type === "path" ? [node] : _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node);
2482
+ const paths = node.type === "path" ? [node] : _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node);
2482
2483
  if (paths.some((p) => typeof p[key] !== "string"))
2483
2484
  issues.push(_chunkDGWOGQJ5cjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient or no ${key}, so a colour pulse cannot tint it; give it a solid ${key} or pulse the ${key === "fill" ? "stroke" : "fill"}.`, { ...where, ids: [id] }));
2484
2485
  }
@@ -2923,7 +2924,7 @@ function motionNodePose(scene, id, time) {
2923
2924
  if (!entry) throw new Error(`There is no element ${_chunkDGWOGQJ5cjs.namedWithSuggestion.call(void 0, id, [...indexMotionNodes(scene.artwork.nodes).keys()])} in the artwork.`);
2924
2925
  const timeline = compileMotionScene(scene);
2925
2926
  const drawn = indexMotionNodes(motionFrameAt(scene, time).document.nodes).get(id);
2926
- const centre = _chunkIOFVM3L3cjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
2927
+ const centre = _chunkWPUXGDH4cjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
2927
2928
  const paint = (property) => _nullishCoalesce(trackValue(timeline.tracks.get(motionTrackKey(id, property)), time), () => ( motionRestValue(entry, property, scene.artwork)));
2928
2929
  const fill = paint("fill");
2929
2930
  const stroke = paint("stroke");
@@ -3270,7 +3271,7 @@ function toFlairSvgMotion(scene, options = {}) {
3270
3271
  raw: (t) => transformAt(t, true)
3271
3272
  });
3272
3273
  }
3273
- const paths = node.type === "path" ? [node] : _chunkIOFVM3L3cjs.collectPathNodes.call(void 0, node);
3274
+ const paths = node.type === "path" ? [node] : _chunkWPUXGDH4cjs.collectPathNodes.call(void 0, node);
3274
3275
  for (const path of paths) {
3275
3276
  if (pathsSeen.has(path.id)) continue;
3276
3277
  pathsSeen.add(path.id);
@@ -3292,7 +3293,7 @@ function toFlairSvgMotion(scene, options = {}) {
3292
3293
  if (shapeSegments.length) {
3293
3294
  if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
3294
3295
  else {
3295
- const inverse = _chunkIOFVM3L3cjs.invertMatrix.call(void 0, _chunkIOFVM3L3cjs.nodeMatrix.call(void 0, node));
3296
+ const inverse = _chunkWPUXGDH4cjs.invertMatrix.call(void 0, _chunkWPUXGDH4cjs.nodeMatrix.call(void 0, node));
3296
3297
  channels.push({
3297
3298
  id,
3298
3299
  kind: "attr",
@@ -3301,9 +3302,9 @@ function toFlairSvgMotion(scene, options = {}) {
3301
3302
  exact: () => false,
3302
3303
  value: (t) => {
3303
3304
  const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
3304
- const now = _chunkIOFVM3L3cjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _151 => _151(frame.document.nodes), 'access', _152 => _152.get, 'call', _153 => _153(id), 'optionalAccess', _154 => _154.node]));
3305
+ const now = _chunkWPUXGDH4cjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _151 => _151(frame.document.nodes), 'access', _152 => _152.get, 'call', _153 => _153(id), 'optionalAccess', _154 => _154.node]));
3305
3306
  if (!now || now.type !== "path") return "";
3306
- const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, now, _chunkIOFVM3L3cjs.IDENTITY_MATRIX, { effects: false }), inverse);
3307
+ const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, now, _chunkWPUXGDH4cjs.IDENTITY_MATRIX, { effects: false }), inverse);
3307
3308
  return _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
3308
3309
  }
3309
3310
  });
@@ -3324,7 +3325,7 @@ function toFlairSvgMotion(scene, options = {}) {
3324
3325
  if (w) return `${w.move}@${w.shot}`;
3325
3326
  const seg = camera.find((x) => t >= x.start - 1e-6 && t < Math.max(x.end, x.start + 1e-3));
3326
3327
  const shot = seg ? scene.shots.find((x) => x.id === seg.shot) : void 0;
3327
- const move = _optionalChain([_chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'optionalAccess', _155 => _155.camera, 'optionalAccess', _156 => _156.in])), 'optionalAccess', _157 => _157.move]);
3328
+ const move = _optionalChain([_chunkISIO63Q5cjs.cameraMoveParts.call(void 0, _optionalChain([shot, 'optionalAccess', _155 => _155.camera, 'optionalAccess', _156 => _156.in])), 'optionalAccess', _157 => _157.move]);
3328
3329
  return move && shot ? `${move}@${shot.id}` : void 0;
3329
3330
  };
3330
3331
  const unplayed = scene.shots.filter((x) => x.camera && (x.camera.in !== void 0 || x.camera.during !== void 0) && !windows.some((w) => w.shot === x.id));
@@ -3443,7 +3444,7 @@ function toFlairSvgMotion(scene, options = {}) {
3443
3444
  }
3444
3445
  if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
3445
3446
  if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
3446
- let svg = _chunkIOFVM3L3cjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkIOFVM3L3cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
3447
+ let svg = _chunkWPUXGDH4cjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkWPUXGDH4cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
3447
3448
  if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
3448
3449
  let motion = { svg, animate };
3449
3450
  if (_optionalChain([scene, 'access', _160 => _160.controls, 'optionalAccess', _161 => _161.length])) {
@@ -3541,14 +3542,14 @@ function easingOf(ease, fallback) {
3541
3542
  return fallback;
3542
3543
  }
3543
3544
  function poseOf(value, entry) {
3544
- const t = _chunkIOFVM3L3cjs.parseSvgTransform.call(void 0, String(value));
3545
- const o = _chunkIOFVM3L3cjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkIOFVM3L3cjs.invertMatrix.call(void 0, _chunkIOFVM3L3cjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
3545
+ const t = _chunkWPUXGDH4cjs.parseSvgTransform.call(void 0, String(value));
3546
+ const o = _chunkWPUXGDH4cjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkWPUXGDH4cjs.invertMatrix.call(void 0, _chunkWPUXGDH4cjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
3546
3547
  const sx = Math.hypot(o[0], o[1]);
3547
3548
  if (!(sx > 1e-9)) return null;
3548
3549
  const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
3549
3550
  if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
3550
3551
  const c = entry.center;
3551
- const moved = _chunkIOFVM3L3cjs.applyMatrix.call(void 0, o, c);
3552
+ const moved = _chunkWPUXGDH4cjs.applyMatrix.call(void 0, o, c);
3552
3553
  return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
3553
3554
  }
3554
3555
  var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
@@ -3633,7 +3634,7 @@ function fromFlairSvgMotion(input, options = {}) {
3633
3634
  const notes = [];
3634
3635
  if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
3635
3636
  const { motion, controls } = resolvePlaceholders(input, notes);
3636
- const artwork = _chunkIOFVM3L3cjs.parseVectorSvg.call(void 0, motion.svg);
3637
+ const artwork = _chunkWPUXGDH4cjs.parseVectorSvg.call(void 0, motion.svg);
3637
3638
  const nodes = indexMotionNodes(artwork.nodes);
3638
3639
  const byStep = /* @__PURE__ */ new Map();
3639
3640
  for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
@@ -3880,9 +3881,9 @@ function toLottie(scene, options = {}) {
3880
3881
  const items = [];
3881
3882
  const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
3882
3883
  const geometryAt = (t) => {
3883
- if (!shapeSegments.length) return _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, path);
3884
+ if (!shapeSegments.length) return _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, path);
3884
3885
  const now = _optionalChain([indexMotionNodes, 'call', _170 => _170(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _171 => _171.get, 'call', _172 => _172(path.id), 'optionalAccess', _173 => _173.node]);
3885
- return now && now.type === "path" ? _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, _chunkIOFVM3L3cjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, path);
3886
+ return now && now.type === "path" ? _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, _chunkWPUXGDH4cjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, path);
3886
3887
  };
3887
3888
  const rest = lottieContours(_chunkGF2RBSDMcjs.toBezierPath.call(void 0, geometryAt(0)), round4);
3888
3889
  rest.forEach((contour, n2) => {
@@ -3955,13 +3956,13 @@ function toLottie(scene, options = {}) {
3955
3956
  const innerTr = STATIC_TR();
3956
3957
  if (node.type === "path") inner = [...pathShapes(node)];
3957
3958
  else if (node.type === "text" || node.type === "instance") {
3958
- const drawn = _chunkIOFVM3L3cjs.expandVectorAppearance.call(void 0, node);
3959
+ const drawn = _chunkWPUXGDH4cjs.expandVectorAppearance.call(void 0, node);
3959
3960
  inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
3960
- notes.push(`"${node.id}": text is exported as its outlines${_chunkIOFVM3L3cjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3961
+ notes.push(`"${node.id}": text is exported as its outlines${_chunkWPUXGDH4cjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3961
3962
  } else {
3962
3963
  inner = shown(node.children).reverse().map(nodeGroup);
3963
- const m = _chunkIOFVM3L3cjs.nodeMatrix.call(void 0, node);
3964
- if (m !== _chunkIOFVM3L3cjs.IDENTITY_MATRIX) {
3964
+ const m = _chunkWPUXGDH4cjs.nodeMatrix.call(void 0, node);
3965
+ if (m !== _chunkWPUXGDH4cjs.IDENTITY_MATRIX) {
3965
3966
  const parts = staticParts(m);
3966
3967
  if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
3967
3968
  else {
@@ -3974,7 +3975,7 @@ function toLottie(scene, options = {}) {
3974
3975
  const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
3975
3976
  return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
3976
3977
  };
3977
- const artwork = { ...scene.artwork, nodes: _chunkIOFVM3L3cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3978
+ const artwork = { ...scene.artwork, nodes: _chunkWPUXGDH4cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3978
3979
  const content = shown(artwork.nodes).reverse().map(nodeGroup);
3979
3980
  if (artwork.background && rgba(artwork.background))
3980
3981
  content.push({ ty: "gr", nm: "Background", it: [{ ty: "rc", nm: "Background", p: { a: 0, k: [artwork.width / 2, artwork.height / 2] }, s: { a: 0, k: [artwork.width, artwork.height] }, r: { a: 0, k: 0 } }, { ty: "fl", c: { a: 0, k: rgba(artwork.background).map(round4) }, o: { a: 0, k: 100 }, r: 1 }, STATIC_TR()] });
@@ -4073,11 +4074,11 @@ function preset(prst, w, h) {
4073
4074
  const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
4074
4075
  switch (prst) {
4075
4076
  case "rect":
4076
- return [_chunkIOFVM3L3cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4077
+ return [_chunkWPUXGDH4cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4077
4078
  case "roundRect":
4078
- return [_chunkIOFVM3L3cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
4079
+ return [_chunkWPUXGDH4cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
4079
4080
  case "ellipse":
4080
- return [_chunkIOFVM3L3cjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4081
+ return [_chunkWPUXGDH4cjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4081
4082
  case "triangle":
4082
4083
  return poly([[w / 2, 0], [w, h], [0, h]]);
4083
4084
  case "rtTriangle":
@@ -4185,7 +4186,7 @@ function shapes(ctx, tree, map) {
4185
4186
  let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
4186
4187
  if (!subpaths) {
4187
4188
  if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
4188
- subpaths = [_chunkIOFVM3L3cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4189
+ subpaths = [_chunkWPUXGDH4cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4189
4190
  }
4190
4191
  const style = kid(el, "style");
4191
4192
  const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
@@ -4428,7 +4429,7 @@ var kindHint = (d) => {
4428
4429
  function withPreset(d, preset2, values) {
4429
4430
  if (preset2 === void 0) return values;
4430
4431
  const p = d.presets.find((x) => x.name === preset2);
4431
- if (!p) throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`"${d.id}" has no preset "${preset2}"; ${d.presets.length ? `its presets are ${d.presets.map((x) => `"${x.name}"`).join(", ")}` : "it has no presets"}.`, d.id);
4432
+ if (!p) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" has no preset "${preset2}"; ${d.presets.length ? `its presets are ${d.presets.map((x) => `"${x.name}"`).join(", ")}` : "it has no presets"}.`, d.id);
4432
4433
  return { ...p.values, ..._nullishCoalesce(values, () => ( {})) };
4433
4434
  }
4434
4435
  async function resolveMotionShotLayer(provider, layer) {
@@ -4438,27 +4439,27 @@ async function resolveMotionShotLayer(provider, layer) {
4438
4439
  const { provider: _p, name: _n, ...rest } = layer;
4439
4440
  return rest;
4440
4441
  }
4441
- if (!provider) throw new (0, _chunkGHCSC2WPcjs.NoEffectsProviderError)();
4442
+ if (!provider) throw new (0, _chunkISIO63Q5cjs.NoEffectsProviderError)();
4442
4443
  const d = await provider.describe(layer.effect);
4443
- if (!_chunkK5DS2JTAcjs.effectLayerOffered.call(void 0, d)) throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) cannot be a layer; ${kindHint(d)}. A layer's effect is a generator, filter, overlay or title (search_effects with use "generator", "filter", "overlay" or "title").`, d.id);
4444
- const input = _chunkK5DS2JTAcjs.effectLayerInput.call(void 0, d);
4445
- if (layer.subject && !input) throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) draws its own picture and takes no subject; leave "subject" out, or pick a filter to change the subject.`, d.id);
4446
- if (!layer.subject && input && _optionalChain([d, 'access', _198 => _198.inputs, 'access', _199 => _199.find, 'call', _200 => _200((i) => i.name === input), 'optionalAccess', _201 => _201.required])) throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) changes a picture; give a "subject": { "image": url }, { "svg": markup }, { "text": words } or { "slot": name }.`, d.id);
4444
+ if (!_chunkZ3BRH4JKcjs.effectLayerOffered.call(void 0, d)) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) cannot be a layer; ${kindHint(d)}. A layer's effect is a generator, filter, overlay or title (search_effects with use "generator", "filter", "overlay" or "title").`, d.id);
4445
+ const input = _chunkZ3BRH4JKcjs.effectLayerInput.call(void 0, d);
4446
+ if (layer.subject && !input) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) draws its own picture and takes no subject; leave "subject" out, or pick a filter to change the subject.`, d.id);
4447
+ if (!layer.subject && input && _optionalChain([d, 'access', _198 => _198.inputs, 'access', _199 => _199.find, 'call', _200 => _200((i) => i.name === input), 'optionalAccess', _201 => _201.required])) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) changes a picture; give a "subject": { "image": url }, { "svg": markup }, { "text": words } or { "slot": name }.`, d.id);
4447
4448
  const values = withPreset(d, layer.preset, layer.values);
4448
- _chunkGHCSC2WPcjs.resolveEffectValues.call(void 0, d, values);
4449
+ _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, values);
4449
4450
  const out = { ...layer, provider: provider.id, name: d.name };
4450
4451
  if (values && Object.keys(values).length) out.values = values;
4451
4452
  else delete out.values;
4452
4453
  return out;
4453
4454
  }
4454
4455
  async function resolveMotionShotTransition(provider, transition) {
4455
- if (!provider) throw new (0, _chunkGHCSC2WPcjs.NoEffectsProviderError)();
4456
+ if (!provider) throw new (0, _chunkISIO63Q5cjs.NoEffectsProviderError)();
4456
4457
  const d = await provider.describe(transition.effect);
4457
- if (!d.uses.includes("transition") || d.kind === "camera") throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is not a transition (${kindHint(d)}); search_effects with use "transition" lists them.`, d.id);
4458
+ if (!d.uses.includes("transition") || d.kind === "camera") throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is not a transition (${kindHint(d)}); search_effects with use "transition" lists them.`, d.id);
4458
4459
  if (transition.ms !== void 0 && !(transition.ms > 0 && transition.ms <= 6e4)) throw new Error(`A transition's "ms" is from 1 to 60000; got ${transition.ms}.`);
4459
4460
  const values = withPreset(d, transition.preset, transition.values);
4460
- _chunkGHCSC2WPcjs.resolveEffectValues.call(void 0, d, values);
4461
- const out = { ...transition, ms: _nullishCoalesce(transition.ms, () => ( _chunkGHCSC2WPcjs.EFFECT_TRANSITION_MS)), provider: provider.id, name: d.name };
4461
+ _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, values);
4462
+ const out = { ...transition, ms: _nullishCoalesce(transition.ms, () => ( _chunkISIO63Q5cjs.EFFECT_TRANSITION_MS)), provider: provider.id, name: d.name };
4462
4463
  if (values && Object.keys(values).length) out.values = values;
4463
4464
  else delete out.values;
4464
4465
  return out;
@@ -4574,7 +4575,7 @@ function nextMotionEffectInstance(scene) {
4574
4575
  walk(scene.artwork.nodes);
4575
4576
  for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
4576
4577
  }
4577
- var motionArtworkSvg = (artwork) => _chunkIOFVM3L3cjs.vectorDocumentToSvg.call(void 0, artwork);
4578
+ var motionArtworkSvg = (artwork) => _chunkWPUXGDH4cjs.vectorDocumentToSvg.call(void 0, artwork);
4578
4579
  var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
4579
4580
  function motionCommandsFromEffect(artwork, motion, source) {
4580
4581
  const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
@@ -4653,7 +4654,7 @@ var AnimationEditorController = (_class2 = class {
4653
4654
 
4654
4655
 
4655
4656
  /** The effects provider slot (see `setEffectsProvider`). */
4656
- __init9() {this.effects = new (0, _chunkGHCSC2WPcjs.EffectsSlot)()}
4657
+ __init9() {this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)()}
4657
4658
  /** Renders shot layer and transition pictures for frames (see `MotionLayersEngine`). */
4658
4659
 
4659
4660
 
@@ -4847,7 +4848,7 @@ var AnimationEditorController = (_class2 = class {
4847
4848
  try {
4848
4849
  plan = await work();
4849
4850
  } catch (error) {
4850
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
4851
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
4851
4852
  throw error;
4852
4853
  }
4853
4854
  const r = this.apply({ op: "replace_scene", scene: plan.scene }, plan.label, { merge });
@@ -4858,11 +4859,11 @@ var AnimationEditorController = (_class2 = class {
4858
4859
  }
4859
4860
  async describeFor(effect, kinds) {
4860
4861
  const provider = this.effects.require();
4861
- if (!provider.applyVectorEffect) throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`${provider.name} has no vector or motion effects.`);
4862
+ if (!provider.applyVectorEffect) throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`${provider.name} has no vector or motion effects.`);
4862
4863
  const d = await provider.describe(effect);
4863
4864
  if (!kinds.includes(d.kind)) {
4864
4865
  const hint = d.kind === "motion" ? "apply it to nodes with apply_effect" : d.kind === "vector" ? "add it with add_vector_effect" : "it draws pixels, which scenes cannot hold";
4865
- throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect: ${hint}.`, d.id);
4866
+ throw new (0, _chunkISIO63Q5cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect: ${hint}.`, d.id);
4866
4867
  }
4867
4868
  return d;
4868
4869
  }
@@ -4883,7 +4884,7 @@ var AnimationEditorController = (_class2 = class {
4883
4884
  return this.effectEdit(async () => {
4884
4885
  this.knownNodes(targets);
4885
4886
  const d = await this.describeFor(effect, ["motion"]);
4886
- const values = _chunkGHCSC2WPcjs.resolveEffectValues.call(void 0, d, options.values);
4887
+ const values = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, options.values);
4887
4888
  const instance = _nullishCoalesce(options.instance, () => ( nextMotionEffectInstance(this.scene)));
4888
4889
  const motion = await this.effects.require().applyVectorEffect(d.id, { svg: motionArtworkSvg(this.scene.artwork), nodeIds: [...targets] }, values);
4889
4890
  const source = { instance, effect: d.id, provider: this.effects.require().id, name: d.name, values };
@@ -4908,7 +4909,7 @@ var AnimationEditorController = (_class2 = class {
4908
4909
  let given = options.values;
4909
4910
  let place = options.box;
4910
4911
  if (options.path) {
4911
- const controls = _chunkGHCSC2WPcjs.pathControlsOf.call(void 0, d);
4912
+ const controls = _chunkISIO63Q5cjs.pathControlsOf.call(void 0, d);
4912
4913
  if (!controls.length) throw new Error(`"${d.id}" does not draw along a path. Find one that does with search_effects accepts ["path"] (kind vector).`);
4913
4914
  const control = _nullishCoalesce(options.control, () => ( (controls.length === 1 ? controls[0] : void 0)));
4914
4915
  if (!control) throw new Error(`"${d.id}" has several path controls (${controls.join(", ")}); pass control.`);
@@ -4918,7 +4919,7 @@ var AnimationEditorController = (_class2 = class {
4918
4919
  const entry = indexMotionNodes(this.scene.artwork.nodes).get(options.path.node);
4919
4920
  if (!entry) throw new Error(`There is no node "${options.path.node}"; find_animation_elements lists the artwork's nodes.`);
4920
4921
  if (entry.node.type !== "path") throw new Error(`Node "${options.path.node}" is a ${entry.node.type}, not a path; pass a path node (find_animation_elements shows each node's type).`);
4921
- value = _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, _chunkIOFVM3L3cjs.vectorPathWorldBezier.call(void 0, entry.node, entry.parentWorld, { effects: false }));
4922
+ value = _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, _chunkWPUXGDH4cjs.vectorPathWorldBezier.call(void 0, entry.node, entry.parentWorld, { effects: false }));
4922
4923
  place ??= "viewBox";
4923
4924
  } else {
4924
4925
  const provider = this.effects.require();
@@ -4928,7 +4929,7 @@ var AnimationEditorController = (_class2 = class {
4928
4929
  }
4929
4930
  given = { ..._nullishCoalesce(given, () => ( {})), [control]: value };
4930
4931
  }
4931
- const values = _chunkGHCSC2WPcjs.resolveEffectValues.call(void 0, d, given);
4932
+ const values = _chunkISIO63Q5cjs.resolveEffectValues.call(void 0, d, given);
4932
4933
  const instance = _nullishCoalesce(options.instance, () => ( nextMotionEffectInstance(this.scene)));
4933
4934
  const motion = await this.effects.require().applyVectorEffect(d.id, motionArtworkSvg(this.scene.artwork), values);
4934
4935
  const source = { instance, effect: d.id, provider: this.effects.require().id, name: d.name, values };
@@ -4952,7 +4953,7 @@ var AnimationEditorController = (_class2 = class {
4952
4953
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4953
4954
  else throw new Error(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4954
4955
  }
4955
- const merged = { ...base, ..._chunkGHCSC2WPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4956
+ const merged = { ...base, ..._chunkISIO63Q5cjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4956
4957
  const { scene: bare, place } = withoutMotionEffect(this.scene, instance);
4957
4958
  const provider = this.effects.require();
4958
4959
  const source = { instance, effect: d.id, provider: provider.id, name: d.name, values: merged };
@@ -5007,12 +5008,12 @@ var AnimationEditorController = (_class2 = class {
5007
5008
  if (!found) return this.refuse(`There is no shot "${shot}"; the shots are ${this.scene.shots.map((s) => `"${s.id}"`).join(", ") || "none yet"}.`);
5008
5009
  let resolved;
5009
5010
  try {
5010
- resolved = await _chunkGHCSC2WPcjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
5011
+ resolved = await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
5011
5012
  } catch (error) {
5012
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5013
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5013
5014
  throw error;
5014
5015
  }
5015
- const field = _chunkGHCSC2WPcjs.cameraMoveField.call(void 0, role);
5016
+ const field = _chunkISIO63Q5cjs.cameraMoveField.call(void 0, role);
5016
5017
  const current = this.scene.shots.find((s) => s.id === shot);
5017
5018
  if (!current) return this.refuse(`Shot "${shot}" was removed while the move was checked.`);
5018
5019
  const parts = role === "transition" && resolved.spec.ms === void 0 ? { ...resolved.spec, ms: resolved.description.camera.durationMs } : resolved.spec;
@@ -5026,7 +5027,7 @@ var AnimationEditorController = (_class2 = class {
5026
5027
  clearShotCameraMove(shot, role) {
5027
5028
  const found = this.scene.shots.find((s) => s.id === shot);
5028
5029
  if (!found) return this.refuse(`There is no shot "${shot}"; the shots are ${this.scene.shots.map((s) => `"${s.id}"`).join(", ") || "none yet"}.`);
5029
- const field = _chunkGHCSC2WPcjs.cameraMoveField.call(void 0, role);
5030
+ const field = _chunkISIO63Q5cjs.cameraMoveField.call(void 0, role);
5030
5031
  if (_optionalChain([found, 'access', _232 => _232.camera, 'optionalAccess', _233 => _233[field]]) === void 0) return this.refuse(`Shot "${shot}" has no camera "${field}" move to clear${_optionalChain([found, 'access', _234 => _234.camera, 'optionalAccess', _235 => _235[field === "in" ? "during" : "in"]]) !== void 0 ? `; it has a "${field === "in" ? "during" : "in"}" move (role ${role === "hold" ? "transition" : "hold"})` : ""}.`);
5031
5032
  const rest = { ...found.camera };
5032
5033
  delete rest[field];
@@ -5168,7 +5169,7 @@ var AnimationEditorController = (_class2 = class {
5168
5169
  try {
5169
5170
  plan = await work();
5170
5171
  } catch (error) {
5171
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5172
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5172
5173
  throw error;
5173
5174
  }
5174
5175
  const id = this.scene.shots[plan.shot].id;
@@ -5250,7 +5251,7 @@ var AnimationEditorController = (_class2 = class {
5250
5251
  const { provider: _p, name: _n, ...given } = transition;
5251
5252
  resolved = await resolveMotionShotTransition(this.effects.provider, given);
5252
5253
  } catch (error) {
5253
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5254
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5254
5255
  throw error;
5255
5256
  }
5256
5257
  if (!this.scene.shots.some((s) => s.id === shot)) return this.refuse(`Shot "${shot}" was removed while the transition was checked.`);
@@ -5282,9 +5283,9 @@ var AnimationEditorController = (_class2 = class {
5282
5283
  const mode = _nullishCoalesce(options.mode, () => ( "replace"));
5283
5284
  let filled;
5284
5285
  try {
5285
- filled = await _chunkK5DS2JTAcjs.fillEffectTemplate.call(void 0, this.effects.provider, template, values, options.name ? { name: options.name } : {});
5286
+ filled = await _chunkZ3BRH4JKcjs.fillEffectTemplate.call(void 0, this.effects.provider, template, values, options.name ? { name: options.name } : {});
5286
5287
  } catch (error) {
5287
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5288
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refuse(error.message);
5288
5289
  throw error;
5289
5290
  }
5290
5291
  const provider = this.effects.provider.id;
@@ -6179,7 +6180,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
6179
6180
  handler: ({ svg }) => {
6180
6181
  let artwork;
6181
6182
  try {
6182
- artwork = _chunkIOFVM3L3cjs.parseVectorSvg.call(void 0, svg);
6183
+ artwork = _chunkWPUXGDH4cjs.parseVectorSvg.call(void 0, svg);
6183
6184
  } catch (error) {
6184
6185
  throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
6185
6186
  }
@@ -6984,7 +6985,7 @@ function animationCameraMoveTools(controller, ctx) {
6984
6985
  shot: { type: "string", minLength: 1, description: "A shot id from get_animation." },
6985
6986
  role: ROLE,
6986
6987
  move: { type: "string", minLength: 1, description: "A camera move id of that role from list_camera_moves." },
6987
- ms: { type: "number", minimum: 0, maximum: _chunkGHCSC2WPcjs.CAMERA_MOVE_MAX_MS, description: `How long a transition takes, ms (0\u2013${_chunkGHCSC2WPcjs.CAMERA_MOVE_MAX_MS}; default the move's durationMs). Not for a hold, which plays across the shot's hold.` },
6988
+ ms: { type: "number", minimum: 0, maximum: _chunkISIO63Q5cjs.CAMERA_MOVE_MAX_MS, description: `How long a transition takes, ms (0\u2013${_chunkISIO63Q5cjs.CAMERA_MOVE_MAX_MS}; default the move's durationMs). Not for a hold, which plays across the shot's hold.` },
6988
6989
  preset: { type: "string", minLength: 1, description: "A preset of the move by name, from describe_effect; its values are written out on the shot." },
6989
6990
  values: ctx.valuesSchema("Control values over the move's defaults (and the preset's), from describe_effect")
6990
6991
  },
@@ -7057,7 +7058,7 @@ var fields = (ctx) => ({
7057
7058
  preset: { type: "string", minLength: 1, description: "A preset of the effect by name, from describe_effect; its values are written out on the layer." },
7058
7059
  values: ctx.valuesSchema("Control values over the effect's defaults (and the preset's), from describe_effect"),
7059
7060
  subject: SUBJECT,
7060
- role: { type: "string", enum: [..._chunkGHCSC2WPcjs.EFFECT_LAYER_ROLES], description: "background: under the artwork; subject: over the artwork; overlay: over everything. Default subject with a rect, else background." },
7061
+ role: { type: "string", enum: [..._chunkISIO63Q5cjs.EFFECT_LAYER_ROLES], description: "background: under the artwork; subject: over the artwork; overlay: over everything. Default subject with a rect, else background." },
7061
7062
  rect: RECT,
7062
7063
  from: TIME("starts", "0: as its shot starts"),
7063
7064
  until: TIME("stops", '{ "shots": 1 }: as the next shot starts'),
@@ -7147,7 +7148,7 @@ function animationShotLayerTools(controller, ctx) {
7147
7148
  properties: {
7148
7149
  shot: { ...SHOT2, description: "A shot id from get_animation (not the first shot)." },
7149
7150
  effect: { ...ctx.effectIdSchema(["transition"]), description: "A transition effect id from search_effects (use transition)." },
7150
- ms: { type: "number", exclusiveMinimum: 0, maximum: 6e4, description: `How long it takes, ms (default ${_chunkGHCSC2WPcjs.EFFECT_TRANSITION_MS}).` },
7151
+ ms: { type: "number", exclusiveMinimum: 0, maximum: 6e4, description: `How long it takes, ms (default ${_chunkISIO63Q5cjs.EFFECT_TRANSITION_MS}).` },
7151
7152
  preset: { type: "string", minLength: 1, description: "A preset of the transition by name, from describe_effect." },
7152
7153
  values: ctx.valuesSchema("Control values over the transition's defaults (and the preset's)")
7153
7154
  },
@@ -7183,7 +7184,7 @@ function createAnimationEffectsToolProvider(controller, options = {}) {
7183
7184
  if (!r.ok) throw new Error(r.error);
7184
7185
  return { target, effect: info(r.effect), effects: controller.appliedEffects().filter((e) => e.targets.includes(target)).map(info), ...r.notes.length ? { notes: r.notes } : {} };
7185
7186
  };
7186
- return withAnimationPlayback(_chunkGHCSC2WPcjs.createEffectToolProvider.call(void 0, {
7187
+ return withAnimationPlayback(_chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
7187
7188
  id: _nullishCoalesce(options.id, () => ( "animation-effects")),
7188
7189
  namespace: options.namespace,
7189
7190
  title: "Animation effects",
@@ -7218,7 +7219,7 @@ function createAnimationEffectsToolProvider(controller, options = {}) {
7218
7219
  extraTools: (ctx) => [
7219
7220
  ...animationCameraMoveTools(controller, ctx),
7220
7221
  ...animationShotLayerTools(controller, ctx),
7221
- ..._chunkK5DS2JTAcjs.effectTemplateTools.call(void 0,
7222
+ ..._chunkZ3BRH4JKcjs.effectTemplateTools.call(void 0,
7222
7223
  {
7223
7224
  provider: () => controller.effectsProvider,
7224
7225
  fillDetails: "mode replace (default) makes a new scene from the template's shots, the size of its stage; mode append adds its shots after the current ones, scaled to the artwork. Each shot keeps its framing and camera moves, its layers and its transition; its title and caption become overlay word layers. Returns { template, mode, shots (new shot ids), layers (new layer ids), openSlots, notes }. Check the result with render_animation_frame.",