@algorisys/tinyfly 0.86.2 → 0.88.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 (38) hide show
  1. package/README.md +7 -4
  2. package/bin/tinyfly.mjs +44 -6
  3. package/lib/addons/adapters.js +389 -281
  4. package/lib/addons/characters.js +3 -3
  5. package/lib/addons/load-scene-CQvcFWGJ.js +331 -0
  6. package/lib/addons/maps.js +1 -1
  7. package/lib/addons/scene-3d-webgl.js +52 -49
  8. package/lib/addons/scene-3d.js +299 -215
  9. package/lib/addons/shading-o5T_v9DT.js +89 -0
  10. package/lib/addons/{sketch-CA8ZXhxI.js → sketch-CYPUbk3Q.js} +2 -2
  11. package/lib/browser/tinyfly-scene-3d-webgl.iife.js +4 -2
  12. package/lib/browser/tinyfly-scene-3d.iife.js +2 -2
  13. package/lib/browser/tinyfly.iife.js +4 -4
  14. package/lib/browser/tinyfly.js +2204 -2043
  15. package/lib/browser/tinyfly.umd.js +4 -4
  16. package/lib/engine/tinyfly-engine.js +149 -106
  17. package/lib/engine/tinyfly-engine.umd.cjs +2 -2
  18. package/lib/headless/headless.js +165 -18
  19. package/lib/types/adapters/canvas/bloom.d.ts +33 -0
  20. package/lib/types/adapters/canvas/index.d.ts +3 -0
  21. package/lib/types/adapters/canvas/offscreen.d.ts +13 -0
  22. package/lib/types/adapters/canvas/trail.d.ts +57 -0
  23. package/lib/types/browser/index.d.ts +4 -0
  24. package/lib/types/engine/path/index.d.ts +2 -0
  25. package/lib/types/engine/path/trail.d.ts +79 -0
  26. package/lib/types/headless/index.d.ts +1 -0
  27. package/lib/types/headless/loop-check.d.ts +41 -0
  28. package/lib/types/headless/node-video.d.ts +8 -0
  29. package/lib/types/headless/video-scene.d.ts +9 -1
  30. package/lib/types/scene-3d/resolve-scene.d.ts +6 -0
  31. package/lib/types/scene-3d/scene-3d-adapter.d.ts +9 -1
  32. package/lib/types/scene-3d/scene-types.d.ts +42 -2
  33. package/lib/types/scene-3d/strokes.d.ts +30 -0
  34. package/lib/types/scene-3d/webgl/gl-data.d.ts +1 -0
  35. package/lib/types/scene-3d/webgl/shaders.d.ts +1 -1
  36. package/package.json +1 -1
  37. package/lib/addons/load-scene-vp14_Jj-.js +0 -324
  38. package/lib/addons/shading-ByG9UXd0.js +0 -85
@@ -1,118 +1,115 @@
1
- import { h as F, e as _, i as Y, a as G, b as g, p as D, t as U, g as W, c as $, q as N, F as z, s as H, d as V } from "./dom-adapter-Cphr2HZn.js";
2
- import { D as Pe } from "./dom-adapter-Cphr2HZn.js";
3
- import { createTrack as q, parsePath as C, mat4 as m } from "@algorisys/tinyfly";
4
- import { p as j, s as Z } from "./sketch-CA8ZXhxI.js";
5
- import { b as Se, a as Re, c as xe } from "./sketch-CA8ZXhxI.js";
6
- function J(r) {
1
+ import { h as U, e as _, i as O, a as W, b as N, p as H, t as V, g as z, c as B, q, F as j, s as Z, d as J } from "./dom-adapter-Cphr2HZn.js";
2
+ import { D as Ce } from "./dom-adapter-Cphr2HZn.js";
3
+ import { createTrack as Q, parsePath as L, ribbon as K, ribbonHeadCap as ee, mat4 as b } from "@algorisys/tinyfly";
4
+ import { p as te, s as ie } from "./sketch-CYPUbk3Q.js";
5
+ import { c as Ie, a as Ye, b as _e } from "./sketch-CYPUbk3Q.js";
6
+ function oe(n) {
7
7
  const e = /* @__PURE__ */ new Map();
8
- for (const { name: t, element: i } of r)
9
- e.set(t, O(i));
8
+ for (const { name: t, element: i } of n)
9
+ e.set(t, F(i));
10
10
  return { measurements: e };
11
11
  }
12
- function K(r, e, t = {}) {
13
- const i = t.duration ?? 600, s = t.easing ?? "ease-out", o = t.scale !== !1, a = t.idPrefix ?? "flip", n = [];
12
+ function se(n, e, t = {}) {
13
+ const i = t.duration ?? 600, o = t.easing ?? "ease-out", s = t.scale !== !1, a = t.idPrefix ?? "flip", r = [];
14
14
  for (const { name: c, element: l } of e) {
15
- const h = r.measurements.get(c);
15
+ const h = n.measurements.get(c);
16
16
  if (!h) continue;
17
- const f = O(l), p = h.left + h.width / 2 - (f.left + f.width / 2), u = h.top + h.height / 2 - (f.top + f.height / 2);
18
- if ((p !== 0 || u !== 0) && n.push(
19
- T(`${a}-${c}-x`, c, "x", p, 0, i, s),
20
- T(`${a}-${c}-y`, c, "y", u, 0, i, s)
21
- ), o && f.width > 0 && f.height > 0) {
22
- const d = h.width / f.width, y = h.height / f.height;
23
- d !== 1 && n.push(T(`${a}-${c}-sx`, c, "scaleX", d, 1, i, s)), y !== 1 && n.push(T(`${a}-${c}-sy`, c, "scaleY", y, 1, i, s));
17
+ const f = F(l), m = h.left + h.width / 2 - (f.left + f.width / 2), u = h.top + h.height / 2 - (f.top + f.height / 2);
18
+ if ((m !== 0 || u !== 0) && r.push(
19
+ T(`${a}-${c}-x`, c, "x", m, 0, i, o),
20
+ T(`${a}-${c}-y`, c, "y", u, 0, i, o)
21
+ ), s && f.width > 0 && f.height > 0) {
22
+ const p = h.width / f.width, d = h.height / f.height;
23
+ p !== 1 && r.push(T(`${a}-${c}-sx`, c, "scaleX", p, 1, i, o)), d !== 1 && r.push(T(`${a}-${c}-sy`, c, "scaleY", d, 1, i, o));
24
24
  }
25
25
  }
26
- return n;
26
+ return r;
27
27
  }
28
- function de(r, e, t = {}) {
29
- const i = J(r);
30
- return e(), K(i, r, t);
28
+ function Me(n, e, t = {}) {
29
+ const i = oe(n);
30
+ return e(), se(i, n, t);
31
31
  }
32
- function T(r, e, t, i, s, o, a) {
33
- return q({
34
- id: r,
32
+ function T(n, e, t, i, o, s, a) {
33
+ return Q({
34
+ id: n,
35
35
  target: e,
36
36
  property: t,
37
37
  keyframes: [
38
38
  { time: 0, value: i },
39
- { time: o, value: s, easing: a }
39
+ { time: s, value: o, easing: a }
40
40
  ]
41
41
  });
42
42
  }
43
- function O(r) {
44
- const e = r;
43
+ function F(n) {
44
+ const e = n;
45
45
  if (typeof e.getBoundingClientRect != "function")
46
46
  return { left: 0, top: 0, width: 0, height: 0 };
47
47
  const t = e.getBoundingClientRect();
48
48
  return { left: t.left, top: t.top, width: t.width, height: t.height };
49
49
  }
50
- function I(r, e, t = {}) {
51
- const i = t.highlight ?? "#ffffff", s = t.halfWidth ?? 0.12, o = -0.2 + r * 1.4, a = [{ offset: 0, color: e }], n = [
52
- { offset: o - s, color: e },
53
- { offset: o, color: i },
54
- { offset: o + s, color: e }
50
+ function G(n, e, t = {}) {
51
+ const i = t.highlight ?? "#ffffff", o = t.halfWidth ?? 0.12, s = -0.2 + n * 1.4, a = [{ offset: 0, color: e }], r = [
52
+ { offset: s - o, color: e },
53
+ { offset: s, color: i },
54
+ { offset: s + o, color: e }
55
55
  ];
56
- for (const c of n)
56
+ for (const c of r)
57
57
  c.offset > 0 && c.offset < 1 && a.push(c);
58
58
  return a.push({ offset: 1, color: e }), a.sort((c, l) => c.offset - l.offset), a;
59
59
  }
60
- const M = 12;
61
- function R(r) {
60
+ const k = 12;
61
+ function x(n) {
62
62
  const e = [];
63
63
  let t, i = -1;
64
- for (const s of C(r).segments) {
65
- if (s.type === "L") {
66
- (!t || i !== s.subpath) && (t = { kind: "line", points: [{ x: s.startX, y: s.startY }], length: 0 }, i = s.subpath, e.push(t)), t.points.push({ x: s.endX, y: s.endY }), t.length += s.length;
64
+ for (const o of L(n).segments) {
65
+ if (o.type === "L") {
66
+ (!t || i !== o.subpath) && (t = { kind: "line", points: [{ x: o.startX, y: o.startY }], length: 0 }, i = o.subpath, e.push(t)), t.points.push({ x: o.endX, y: o.endY }), t.length += o.length;
67
67
  continue;
68
68
  }
69
69
  t = void 0;
70
- const [o, a, n, c, l, h] = s.points, f = [];
71
- for (let p = 0; p <= M; p++) {
72
- const u = p / M, d = 1 - u;
70
+ const [s, a, r, c, l, h] = o.points, f = [];
71
+ for (let m = 0; m <= k; m++) {
72
+ const u = m / k, p = 1 - u;
73
73
  f.push({
74
- x: d * d * d * s.startX + 3 * d * d * u * o + 3 * d * u * u * n + u * u * u * l,
75
- y: d * d * d * s.startY + 3 * d * d * u * a + 3 * d * u * u * c + u * u * u * h
74
+ x: p * p * p * o.startX + 3 * p * p * u * s + 3 * p * u * u * r + u * u * u * l,
75
+ y: p * p * p * o.startY + 3 * p * p * u * a + 3 * p * u * u * c + u * u * u * h
76
76
  });
77
77
  }
78
- e.push({ kind: "curve", points: f, length: s.length });
78
+ e.push({ kind: "curve", points: f, length: o.length });
79
79
  }
80
80
  return e;
81
81
  }
82
- function Q(r, e, t, i, s = 0) {
83
- const o = Math.max(0, Math.min(s, t / 2, i / 2));
84
- if (o === 0) return R(`M${r},${e} H${r + t} V${e + i} H${r} Z`);
85
- const a = r + t, n = e + i;
86
- return R(
87
- `M${r + o},${e} H${a - o} A${o},${o} 0 0 1 ${a},${e + o} V${n - o} A${o},${o} 0 0 1 ${a - o},${n} H${r + o} A${o},${o} 0 0 1 ${r},${n - o} V${e + o} A${o},${o} 0 0 1 ${r + o},${e} Z`
82
+ function ne(n, e, t, i, o = 0) {
83
+ const s = Math.max(0, Math.min(o, t / 2, i / 2));
84
+ if (s === 0) return x(`M${n},${e} H${n + t} V${e + i} H${n} Z`);
85
+ const a = n + t, r = e + i;
86
+ return x(
87
+ `M${n + s},${e} H${a - s} A${s},${s} 0 0 1 ${a},${e + s} V${r - s} A${s},${s} 0 0 1 ${a - s},${r} H${n + s} A${s},${s} 0 0 1 ${n},${r - s} V${e + s} A${s},${s} 0 0 1 ${n + s},${e} Z`
88
88
  );
89
89
  }
90
- function b(r, e, t, i) {
91
- const o = e.reduce((n, c) => n + c.length, 0) * Math.min(1, Math.max(0, t));
90
+ function M(n, e, t, i) {
91
+ const s = e.reduce((r, c) => r + c.length, 0) * Math.min(1, Math.max(0, t));
92
92
  let a = 0;
93
- i || r.beginPath();
94
- for (const n of e) {
95
- const c = n.length === 0 ? o >= a ? 1 : 0 : Math.min(1, Math.max(0, (o - a) / n.length));
96
- if (a += n.length, i) {
97
- n.kind === "curve" ? i.curve(n.points, c) : i.line(n.points, c);
93
+ i || n.beginPath();
94
+ for (const r of e) {
95
+ const c = r.length === 0 ? s >= a ? 1 : 0 : Math.min(1, Math.max(0, (s - a) / r.length));
96
+ if (a += r.length, i) {
97
+ r.kind === "curve" ? i.curve(r.points, c) : i.line(r.points, c);
98
98
  continue;
99
99
  }
100
100
  if (c <= 0) continue;
101
- const l = j(n.points, c);
102
- r.moveTo(l[0].x, l[0].y);
103
- for (const h of l.slice(1)) r.lineTo(h.x, h.y);
101
+ const l = te(r.points, c);
102
+ n.moveTo(l[0].x, l[0].y);
103
+ for (const h of l.slice(1)) n.lineTo(h.x, h.y);
104
104
  }
105
- i || r.stroke();
105
+ i || n.stroke();
106
106
  }
107
- function pe(r) {
108
- return typeof r == "object" && r !== null && "type" in r;
109
- }
110
- function ee(r, e, t) {
107
+ function g(n, e, t) {
111
108
  if (typeof OffscreenCanvas < "u") return new OffscreenCanvas(e, t);
112
- const i = r.canvas;
109
+ const i = n.canvas;
113
110
  if (i?.ownerDocument) {
114
- const s = i.ownerDocument.createElement("canvas");
115
- return s.width = e, s.height = t, s;
111
+ const o = i.ownerDocument.createElement("canvas");
112
+ return o.width = e, o.height = t, o;
116
113
  }
117
114
  try {
118
115
  return i?.constructor ? new i.constructor(e, t) : null;
@@ -120,7 +117,10 @@ function ee(r, e, t) {
120
117
  return null;
121
118
  }
122
119
  }
123
- class x {
120
+ function Se(n) {
121
+ return typeof n == "object" && n !== null && "type" in n;
122
+ }
123
+ class R {
124
124
  targets = /* @__PURE__ */ new Map();
125
125
  targetOrder = [];
126
126
  // Store animation offsets separately - these are applied via ctx.translate() during rendering
@@ -181,19 +181,19 @@ class x {
181
181
  applyState(e) {
182
182
  this.time = e.currentTime;
183
183
  for (const [t, i] of e.values) {
184
- const s = this.targets.get(t);
185
- if (!s) continue;
186
- const o = this.aliases.get(t) ?? t, a = this.animationOffsets.get(o) ?? { x: 0, y: 0 };
187
- for (const [n, c] of i)
188
- if (x.OFFSET_PROPERTIES.has(n) && typeof c == "number")
189
- n === "x" || n === "motionPathX" ? a.x = c : (n === "y" || n === "motionPathY") && (a.y = c);
190
- else if (s.type === "custom" && s.props && (n in s.props || s.acceptsProp?.(n)))
191
- s.props[n] = c;
184
+ const o = this.targets.get(t);
185
+ if (!o) continue;
186
+ const s = this.aliases.get(t) ?? t, a = this.animationOffsets.get(s) ?? { x: 0, y: 0 };
187
+ for (const [r, c] of i)
188
+ if (R.OFFSET_PROPERTIES.has(r) && typeof c == "number")
189
+ r === "x" || r === "motionPathX" ? a.x = c : (r === "y" || r === "motionPathY") && (a.y = c);
190
+ else if (o.type === "custom" && o.props && (r in o.props || o.acceptsProp?.(r)))
191
+ o.props[r] = c;
192
192
  else {
193
- const l = x.PROPERTY_MAP[n] ?? n;
194
- s[l] = c;
193
+ const l = R.PROPERTY_MAP[r] ?? r;
194
+ o[l] = c;
195
195
  }
196
- this.animationOffsets.set(o, a);
196
+ this.animationOffsets.set(s, a);
197
197
  }
198
198
  }
199
199
  /**
@@ -210,32 +210,32 @@ class x {
210
210
  for (const t of this.targetOrder) {
211
211
  const i = this.targets.get(t);
212
212
  if (!i) continue;
213
- const s = this.animationOffsets.get(t) ?? { x: 0, y: 0 };
214
- this.renderTarget(e, i, s);
213
+ const o = this.animationOffsets.get(t) ?? { x: 0, y: 0 };
214
+ this.renderTarget(e, i, o);
215
215
  }
216
216
  }
217
217
  /**
218
218
  * Render a single target.
219
219
  */
220
220
  renderTarget(e, t, i) {
221
- if (e.save(), t.opacity !== void 0 && (e.globalAlpha = t.opacity), F(t)) {
222
- const o = _(t, i, { x: this.getPivotX(t), y: this.getPivotY(t) });
223
- if (t.backfaceVisibility === "hidden" && Y(o)) {
221
+ if (e.save(), t.opacity !== void 0 && (e.globalAlpha = t.opacity), U(t)) {
222
+ const s = _(t, i, { x: this.getPivotX(t), y: this.getPivotY(t) });
223
+ if (t.backfaceVisibility === "hidden" && O(s)) {
224
224
  e.restore();
225
225
  return;
226
226
  }
227
- G(o) ? (e.transform(...g(o)), this.drawContent(e, t)) : this.drawInPerspective(e, t, o), e.restore();
227
+ W(s) ? (e.transform(...N(s)), this.drawContent(e, t)) : this.drawInPerspective(e, t, s), e.restore();
228
228
  return;
229
229
  }
230
230
  if ((i.x !== 0 || i.y !== 0) && e.translate(i.x, i.y), t.rotate !== void 0 || t.rotateX !== void 0 || t.rotateY !== void 0 || t.scale !== void 0 || t.scaleX !== void 0 || t.scaleY !== void 0 || t.skewX !== void 0 || t.skewY !== void 0) {
231
- const o = this.getPivotX(t), a = this.getPivotY(t);
232
- e.translate(o, a), t.rotate !== void 0 && e.rotate(t.rotate * Math.PI / 180);
233
- let n = t.scaleX ?? 1, c = t.scaleY ?? 1;
234
- if (t.rotateX !== void 0 && (c *= Math.cos(t.rotateX * Math.PI / 180)), t.rotateY !== void 0 && (n *= Math.cos(t.rotateY * Math.PI / 180)), t.scale !== void 0 ? e.scale(t.scale, t.scale) : (n !== 1 || c !== 1) && e.scale(n, c), t.skewX !== void 0 || t.skewY !== void 0) {
231
+ const s = this.getPivotX(t), a = this.getPivotY(t);
232
+ e.translate(s, a), t.rotate !== void 0 && e.rotate(t.rotate * Math.PI / 180);
233
+ let r = t.scaleX ?? 1, c = t.scaleY ?? 1;
234
+ if (t.rotateX !== void 0 && (c *= Math.cos(t.rotateX * Math.PI / 180)), t.rotateY !== void 0 && (r *= Math.cos(t.rotateY * Math.PI / 180)), t.scale !== void 0 ? e.scale(t.scale, t.scale) : (r !== 1 || c !== 1) && e.scale(r, c), t.skewX !== void 0 || t.skewY !== void 0) {
235
235
  const l = (t.skewX ?? 0) * Math.PI / 180, h = (t.skewY ?? 0) * Math.PI / 180;
236
236
  e.transform(1, Math.tan(h), Math.tan(l), 1, 0, 0);
237
237
  }
238
- e.translate(-o, -a);
238
+ e.translate(-s, -a);
239
239
  }
240
240
  this.drawContent(e, t), e.restore();
241
241
  }
@@ -245,20 +245,20 @@ class x {
245
245
  * there. The triangles overlap by a pixel so no anti-aliased seam shows.
246
246
  */
247
247
  drawInPerspective(e, t, i) {
248
- const o = e.globalAlpha < 1 ? this.perspectiveLayer(e) : null;
249
- if (o) {
250
- o.ctx.setTransform(e.getTransform()), this.drawMesh(o.ctx, t, i), e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.drawImage(o.canvas, 0, 0), e.restore();
248
+ const s = e.globalAlpha < 1 ? this.perspectiveLayer(e) : null;
249
+ if (s) {
250
+ s.ctx.setTransform(e.getTransform()), this.drawMesh(s.ctx, t, i), e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.drawImage(s.canvas, 0, 0), e.restore();
251
251
  return;
252
252
  }
253
253
  this.drawMesh(e, t, i);
254
254
  }
255
255
  drawMesh(e, t, i) {
256
- const s = this.contentBounds(e, t);
257
- for (const o of D(i, s)) {
258
- const a = U(o.source, o.target);
256
+ const o = this.contentBounds(e, t);
257
+ for (const s of H(i, o)) {
258
+ const a = V(s.source, s.target);
259
259
  if (!a) continue;
260
- const [n, c, l] = W(o.target, 1);
261
- e.save(), e.beginPath(), e.moveTo(n.x, n.y), e.lineTo(c.x, c.y), e.lineTo(l.x, l.y), e.closePath(), e.clip(), e.transform(...a), this.drawContent(e, t), e.restore();
260
+ const [r, c, l] = z(s.target, 1);
261
+ e.save(), e.beginPath(), e.moveTo(r.x, r.y), e.lineTo(c.x, c.y), e.lineTo(l.x, l.y), e.closePath(), e.clip(), e.transform(...a), this.drawContent(e, t), e.restore();
262
262
  }
263
263
  }
264
264
  /** A cleared offscreen canvas the size of `ctx`'s, reused frame to frame; null where none can be made. */
@@ -266,11 +266,11 @@ class x {
266
266
  const t = e.canvas?.width ?? 0, i = e.canvas?.height ?? 0;
267
267
  if (!(t > 0 && i > 0)) return null;
268
268
  if (!this.layer || this.layer.width !== t || this.layer.height !== i) {
269
- const o = ee(e, t, i), a = o?.getContext("2d");
270
- if (this.layer = o && a ? { canvas: o, ctx: a, width: t, height: i } : null, !this.layer) return null;
269
+ const s = g(e, t, i), a = s?.getContext("2d");
270
+ if (this.layer = s && a ? { canvas: s, ctx: a, width: t, height: i } : null, !this.layer) return null;
271
271
  }
272
- const s = this.layer.ctx;
273
- return s.setTransform(1, 0, 0, 1, 0, 0), s.globalAlpha = 1, s.clearRect(0, 0, t, i), this.layer;
272
+ const o = this.layer.ctx;
273
+ return o.setTransform(1, 0, 0, 1, 0, 0), o.globalAlpha = 1, o.clearRect(0, 0, t, i), this.layer;
274
274
  }
275
275
  /**
276
276
  * Everything a target paints, generously: its box, measured text, a path's
@@ -280,26 +280,26 @@ class x {
280
280
  contentBounds(e, t) {
281
281
  let i = this.getTargetBounds(t);
282
282
  if (t.type === "text") {
283
- const o = t.fontSize ?? 16;
284
- e.save(), e.font = `${t.fontWeight ?? 400} ${o}px ${t.fontFamily ?? "sans-serif"}`;
283
+ const s = t.fontSize ?? 16;
284
+ e.save(), e.font = `${t.fontWeight ?? 400} ${s}px ${t.fontFamily ?? "sans-serif"}`;
285
285
  const a = e.measureText(t.text).width;
286
286
  e.restore();
287
- const n = t.textAlign ?? "left", c = n === "center" ? t.x - a / 2 : n === "right" ? t.x - a : t.x, l = (t.textBaseline ?? "top") === "top" ? t.y : t.y - o;
288
- i = { x: c, y: l, width: a, height: o * 1.4 };
287
+ const r = t.textAlign ?? "left", c = r === "center" ? t.x - a / 2 : r === "right" ? t.x - a : t.x, l = (t.textBaseline ?? "top") === "top" ? t.y : t.y - s;
288
+ i = { x: c, y: l, width: a, height: s * 1.4 };
289
289
  } else if (t.type === "path") {
290
- const o = [], a = [];
291
- for (const n of C(t.d).segments) {
292
- o.push(n.startX, n.endX), a.push(n.startY, n.endY);
293
- for (let c = 0; c + 1 < n.points.length; c += 2)
294
- o.push(n.points[c]), a.push(n.points[c + 1]);
290
+ const s = [], a = [];
291
+ for (const r of L(t.d).segments) {
292
+ s.push(r.startX, r.endX), a.push(r.startY, r.endY);
293
+ for (let c = 0; c + 1 < r.points.length; c += 2)
294
+ s.push(r.points[c]), a.push(r.points[c + 1]);
295
295
  }
296
- if (o.length > 0) {
297
- const n = Math.min(...o), c = Math.min(...a);
298
- i = { x: t.x + n, y: t.y + c, width: Math.max(...o) - n, height: Math.max(...a) - c };
296
+ if (s.length > 0) {
297
+ const r = Math.min(...s), c = Math.min(...a);
298
+ i = { x: t.x + r, y: t.y + c, width: Math.max(...s) - r, height: Math.max(...a) - c };
299
299
  }
300
300
  }
301
- const s = (t.lineWidth ?? 1) + 2 + 3 * Math.max(t.blur ?? 0, t.glow ?? 0, t.shadowBlur ?? 0) + Math.max(Math.abs(t.shadowX ?? 0), Math.abs(t.shadowY ?? 0));
302
- return { x: i.x - s, y: i.y - s, width: i.width + 2 * s, height: i.height + 2 * s };
301
+ const o = (t.lineWidth ?? 1) + 2 + 3 * Math.max(t.blur ?? 0, t.glow ?? 0, t.shadowBlur ?? 0) + Math.max(Math.abs(t.shadowX ?? 0), Math.abs(t.shadowY ?? 0));
302
+ return { x: i.x - o, y: i.y - o, width: i.width + 2 * o, height: i.height + 2 * o };
303
303
  }
304
304
  /**
305
305
  * Paint a target in the current transform: its fill and stroke styles,
@@ -307,10 +307,10 @@ class x {
307
307
  */
308
308
  drawContent(e, t) {
309
309
  t.fillStyle && (e.fillStyle = this.resolveFillStyle(e, t)), t.strokeStyle && (e.strokeStyle = t.strokeStyle), t.lineWidth !== void 0 && (e.lineWidth = t.lineWidth);
310
- const i = $(t);
310
+ const i = B(t);
311
311
  if (i && (e.filter = i), t.clipTop !== void 0 || t.clipRight !== void 0 || t.clipBottom !== void 0 || t.clipLeft !== void 0) {
312
- const s = this.getTargetBounds(t), o = s.x + (t.clipLeft ?? 0) / 100 * s.width, a = s.x + s.width - (t.clipRight ?? 0) / 100 * s.width, n = s.y + (t.clipTop ?? 0) / 100 * s.height, c = s.y + s.height - (t.clipBottom ?? 0) / 100 * s.height;
313
- e.beginPath(), e.rect(o, n, Math.max(0, a - o), Math.max(0, c - n)), e.clip();
312
+ const o = this.getTargetBounds(t), s = o.x + (t.clipLeft ?? 0) / 100 * o.width, a = o.x + o.width - (t.clipRight ?? 0) / 100 * o.width, r = o.y + (t.clipTop ?? 0) / 100 * o.height, c = o.y + o.height - (t.clipBottom ?? 0) / 100 * o.height;
313
+ e.beginPath(), e.rect(s, r, Math.max(0, a - s), Math.max(0, c - r)), e.clip();
314
314
  }
315
315
  switch (t.type) {
316
316
  case "rect":
@@ -343,26 +343,26 @@ class x {
343
343
  const i = t.fillStyle;
344
344
  if (!i) return "transparent";
345
345
  if (typeof i == "string") return i;
346
- const s = this.getTargetBounds(t);
347
- return i.type === "linear" ? this.createLinearGradient(e, i, s) : this.createRadialGradient(e, i, s);
346
+ const o = this.getTargetBounds(t);
347
+ return i.type === "linear" ? this.createLinearGradient(e, i, o) : this.createRadialGradient(e, i, o);
348
348
  }
349
349
  /**
350
350
  * Create a canvas linear gradient from a LinearGradient definition.
351
351
  */
352
352
  createLinearGradient(e, t, i) {
353
- const s = (t.angle - 90) * (Math.PI / 180), o = i.x + i.width / 2, a = i.y + i.height / 2, n = Math.max(i.width, i.height), c = o - Math.cos(s) * n / 2, l = a - Math.sin(s) * n / 2, h = o + Math.cos(s) * n / 2, f = a + Math.sin(s) * n / 2, p = e.createLinearGradient(c, l, h, f);
353
+ const o = (t.angle - 90) * (Math.PI / 180), s = i.x + i.width / 2, a = i.y + i.height / 2, r = Math.max(i.width, i.height), c = s - Math.cos(o) * r / 2, l = a - Math.sin(o) * r / 2, h = s + Math.cos(o) * r / 2, f = a + Math.sin(o) * r / 2, m = e.createLinearGradient(c, l, h, f);
354
354
  for (const u of t.stops)
355
- p.addColorStop(u.offset, u.color);
356
- return p;
355
+ m.addColorStop(u.offset, u.color);
356
+ return m;
357
357
  }
358
358
  /**
359
359
  * Create a canvas radial gradient from a RadialGradient definition.
360
360
  */
361
361
  createRadialGradient(e, t, i) {
362
- const s = i.x + i.width * t.centerX, o = i.y + i.height * t.centerY, a = Math.max(i.width, i.height) * t.radius, n = e.createRadialGradient(s, o, 0, s, o, a);
362
+ const o = i.x + i.width * t.centerX, s = i.y + i.height * t.centerY, a = Math.max(i.width, i.height) * t.radius, r = e.createRadialGradient(o, s, 0, o, s, a);
363
363
  for (const c of t.stops)
364
- n.addColorStop(c.offset, c.color);
365
- return n;
364
+ r.addColorStop(c.offset, c.color);
365
+ return r;
366
366
  }
367
367
  /**
368
368
  * Get target bounding box for gradient calculations.
@@ -401,25 +401,25 @@ class x {
401
401
  * Draw a shape outline-first: the fill (clean) once the outline is complete,
402
402
  * then the outline up to `drawOn`, in pencil strokes when sketched.
403
403
  */
404
- renderOutlined(e, t, i, s) {
405
- const o = Math.min(1, Math.max(0, t.drawOn ?? 1));
406
- if (i && t.fillStyle && o >= 1 && i(), !t.strokeStyle || o <= 0) return;
407
- const a = t.sketch ? Z(e, t.sketch, this.time) : void 0;
408
- a && (e.lineCap = t.lineCap ?? "round", e.lineJoin = t.lineJoin ?? "round"), s(o, a);
404
+ renderOutlined(e, t, i, o) {
405
+ const s = Math.min(1, Math.max(0, t.drawOn ?? 1));
406
+ if (i && t.fillStyle && s >= 1 && i(), !t.strokeStyle || s <= 0) return;
407
+ const a = t.sketch ? ie(e, t.sketch, this.time) : void 0;
408
+ a && (e.lineCap = t.lineCap ?? "round", e.lineJoin = t.lineJoin ?? "round"), o(s, a);
409
409
  }
410
410
  /**
411
411
  * Render a rectangle.
412
412
  */
413
413
  renderRect(e, t) {
414
414
  if (this.drawsOutline(t)) {
415
- const { x: i, y: s, width: o, height: a } = t;
415
+ const { x: i, y: o, width: s, height: a } = t;
416
416
  return this.renderOutlined(
417
417
  e,
418
418
  t,
419
419
  () => {
420
- e.beginPath(), t.borderRadius && t.borderRadius > 0 ? this.roundRect(e, i, s, o, a, t.borderRadius) : e.rect(i, s, o, a), e.fill();
420
+ e.beginPath(), t.borderRadius && t.borderRadius > 0 ? this.roundRect(e, i, o, s, a, t.borderRadius) : e.rect(i, o, s, a), e.fill();
421
421
  },
422
- (n, c) => b(e, Q(i, s, o, a, t.borderRadius), n, c)
422
+ (r, c) => M(e, ne(i, o, s, a, t.borderRadius), r, c)
423
423
  );
424
424
  }
425
425
  e.beginPath(), t.borderRadius && t.borderRadius > 0 ? this.roundRect(e, t.x, t.y, t.width, t.height, t.borderRadius) : e.rect(t.x, t.y, t.width, t.height), t.fillStyle && e.fill(), t.strokeStyle && e.stroke(), e.closePath();
@@ -427,25 +427,25 @@ class x {
427
427
  /**
428
428
  * Draw a rounded rectangle path.
429
429
  */
430
- roundRect(e, t, i, s, o, a) {
431
- const n = Math.min(a, s / 2, o / 2);
432
- e.moveTo(t + n, i), e.lineTo(t + s - n, i), e.arcTo(t + s, i, t + s, i + n, n), e.lineTo(t + s, i + o - n), e.arcTo(t + s, i + o, t + s - n, i + o, n), e.lineTo(t + n, i + o), e.arcTo(t, i + o, t, i + o - n, n), e.lineTo(t, i + n), e.arcTo(t, i, t + n, i, n);
430
+ roundRect(e, t, i, o, s, a) {
431
+ const r = Math.min(a, o / 2, s / 2);
432
+ e.moveTo(t + r, i), e.lineTo(t + o - r, i), e.arcTo(t + o, i, t + o, i + r, r), e.lineTo(t + o, i + s - r), e.arcTo(t + o, i + s, t + o - r, i + s, r), e.lineTo(t + r, i + s), e.arcTo(t, i + s, t, i + s - r, r), e.lineTo(t, i + r), e.arcTo(t, i, t + r, i, r);
433
433
  }
434
434
  /**
435
435
  * Render a circle.
436
436
  */
437
437
  renderCircle(e, t) {
438
438
  if (this.drawsOutline(t)) {
439
- const { x: i, y: s, radius: o } = t;
439
+ const { x: i, y: o, radius: s } = t;
440
440
  return this.renderOutlined(
441
441
  e,
442
442
  t,
443
443
  () => {
444
- e.beginPath(), e.arc(i, s, o, 0, Math.PI * 2), e.fill();
444
+ e.beginPath(), e.arc(i, o, s, 0, Math.PI * 2), e.fill();
445
445
  },
446
- (a, n) => {
447
- if (n) return n.circle(i, s, o, a);
448
- e.beginPath(), e.arc(i, s, o, -Math.PI / 2, -Math.PI / 2 + Math.PI * 2 * a), e.stroke();
446
+ (a, r) => {
447
+ if (r) return r.circle(i, o, s, a);
448
+ e.beginPath(), e.arc(i, o, s, -Math.PI / 2, -Math.PI / 2 + Math.PI * 2 * a), e.stroke();
449
449
  }
450
450
  );
451
451
  }
@@ -455,11 +455,11 @@ class x {
455
455
  * Render text.
456
456
  */
457
457
  renderText(e, t) {
458
- const i = t.fontSize ?? 16, s = t.fontFamily ?? "sans-serif", o = t.fontWeight ?? 400;
459
- if (e.font = `${o} ${i}px ${s}`, e.textAlign = t.textAlign ?? "left", e.textBaseline = t.textBaseline ?? "top", t.fillStyle) {
458
+ const i = t.fontSize ?? 16, o = t.fontFamily ?? "sans-serif", s = t.fontWeight ?? 400;
459
+ if (e.font = `${s} ${i}px ${o}`, e.textAlign = t.textAlign ?? "left", e.textBaseline = t.textBaseline ?? "top", t.fillStyle) {
460
460
  if (t.shine !== void 0 && typeof t.fillStyle == "string") {
461
- const a = e.measureText(t.text).width, n = t.textAlign ?? "left", c = n === "center" ? t.x - a / 2 : n === "right" ? t.x - a : t.x, l = e.createLinearGradient(c, t.y, c + a, t.y);
462
- for (const h of I(t.shine, t.fillStyle))
461
+ const a = e.measureText(t.text).width, r = t.textAlign ?? "left", c = r === "center" ? t.x - a / 2 : r === "right" ? t.x - a : t.x, l = e.createLinearGradient(c, t.y, c + a, t.y);
462
+ for (const h of G(t.shine, t.fillStyle))
463
463
  l.addColorStop(h.offset, h.color);
464
464
  e.fillStyle = l;
465
465
  }
@@ -475,12 +475,12 @@ class x {
475
475
  const i = [
476
476
  { x: t.x, y: t.y },
477
477
  { x: t.x2, y: t.y2 }
478
- ], s = Math.hypot(t.x2 - t.x, t.y2 - t.y);
478
+ ], o = Math.hypot(t.x2 - t.x, t.y2 - t.y);
479
479
  return this.renderOutlined(
480
480
  e,
481
481
  t,
482
482
  void 0,
483
- (o, a) => b(e, [{ kind: "line", points: i, length: s }], o, a)
483
+ (s, a) => M(e, [{ kind: "line", points: i, length: o }], s, a)
484
484
  );
485
485
  }
486
486
  e.beginPath(), e.moveTo(t.x, t.y), e.lineTo(t.x2, t.y2), t.strokeStyle && e.stroke(), e.closePath();
@@ -496,7 +496,7 @@ class x {
496
496
  e,
497
497
  t,
498
498
  () => e.fill(i),
499
- (s, o) => b(e, R(t.d), s, o)
499
+ (o, s) => M(e, x(t.d), o, s)
500
500
  );
501
501
  t.fillStyle && e.fill(i), t.strokeStyle && e.stroke(i);
502
502
  }
@@ -506,13 +506,13 @@ class x {
506
506
  renderImage(e, t) {
507
507
  if (!t.image) return;
508
508
  t.opacity !== void 0 && (e.globalAlpha = t.opacity);
509
- const { x: i, y: s, width: o, height: a } = t, n = t.objectFit ?? "fill", c = t.borderRadius ?? 0, l = t.image, h = l.naturalWidth || l.videoWidth || l.width || o, f = l.naturalHeight || l.videoHeight || l.height || a;
510
- let p = i, u = s, d = o, y = a;
511
- if (n !== "fill" && h > 0 && f > 0) {
512
- const w = n === "cover" ? Math.max(o / h, a / f) : Math.min(o / h, a / f);
513
- d = h * w, y = f * w, p = i + (o - d) / 2, u = s + (a - y) / 2;
509
+ const { x: i, y: o, width: s, height: a } = t, r = t.objectFit ?? "fill", c = t.borderRadius ?? 0, l = t.image, h = l.naturalWidth || l.videoWidth || l.width || s, f = l.naturalHeight || l.videoHeight || l.height || a;
510
+ let m = i, u = o, p = s, d = a;
511
+ if (r !== "fill" && h > 0 && f > 0) {
512
+ const y = r === "cover" ? Math.max(s / h, a / f) : Math.min(s / h, a / f);
513
+ p = h * y, d = f * y, m = i + (s - p) / 2, u = o + (a - d) / 2;
514
514
  }
515
- e.save(), e.beginPath(), c > 0 && typeof e.roundRect == "function" ? e.roundRect(i, s, o, a, c) : e.rect(i, s, o, a), e.clip(), e.drawImage(t.image, p, u, d, y), e.restore();
515
+ e.save(), e.beginPath(), c > 0 && typeof e.roundRect == "function" ? e.roundRect(i, o, s, a, c) : e.rect(i, o, s, a), e.clip(), e.drawImage(t.image, m, u, p, d), e.restore();
516
516
  }
517
517
  /**
518
518
  * Render a custom target by calling its draw function in local coordinates.
@@ -615,12 +615,114 @@ class x {
615
615
  */
616
616
  static loadImage(e) {
617
617
  return new Promise((t, i) => {
618
- const s = new Image();
619
- s.onload = () => t(s), s.onerror = i, s.src = e;
618
+ const o = new Image();
619
+ o.onload = () => t(o), o.onerror = i, o.src = e;
620
620
  });
621
621
  }
622
622
  }
623
- const S = "http://www.w3.org/2000/svg", te = /* @__PURE__ */ new Set([
623
+ function re(n, e) {
624
+ const t = n.length / 4, i = new Float32Array(t * 3), o = Math.min(0.999, Math.max(0, e));
625
+ for (let s = 0; s < t; s++) {
626
+ const a = n[s * 4] / 255, r = n[s * 4 + 1] / 255, c = n[s * 4 + 2] / 255, l = n[s * 4 + 3] / 255, h = Math.max(a, r, c);
627
+ if (h <= o) continue;
628
+ const f = (h - o) / (1 - o) * l / h;
629
+ i[s * 3] = a * f, i[s * 3 + 1] = r * f, i[s * 3 + 2] = c * f;
630
+ }
631
+ return i;
632
+ }
633
+ function E(n, e, t, i, o) {
634
+ const s = new Float32Array(n.length), a = o ? t : e, r = o ? e : t, c = (h, f) => (o ? h * e + f : f * e + h) * 3, l = i * 2 + 1;
635
+ for (let h = 0; h < a; h++)
636
+ for (let f = 0; f < 3; f++) {
637
+ let m = 0;
638
+ for (let u = -i; u <= i; u++) m += n[c(h, Math.min(r - 1, Math.max(0, u))) + f];
639
+ for (let u = 0; u < r; u++) {
640
+ s[c(h, u) + f] = m / l;
641
+ const p = n[c(h, Math.max(0, u - i)) + f], d = n[c(h, Math.min(r - 1, u + i + 1)) + f];
642
+ m += d - p;
643
+ }
644
+ }
645
+ return s;
646
+ }
647
+ function X(n, e, t, i) {
648
+ const o = Math.max(1, Math.round(i / Math.sqrt(3)));
649
+ let s = n;
650
+ for (let a = 0; a < 3; a++)
651
+ s = E(s, e, t, o, !0), s = E(s, e, t, o, !1);
652
+ return s;
653
+ }
654
+ function xe(n, e = {}) {
655
+ const t = n.canvas, i = t.width, o = t.height;
656
+ if (!(i > 0 && o > 0)) return;
657
+ const s = Math.max(1, Math.round(e.downsample ?? 4)), a = Math.max(1, Math.ceil(i / s)), r = Math.max(1, Math.ceil(o / s)), c = g(n, a, r), l = c?.getContext("2d");
658
+ if (!c || !l) return;
659
+ l.imageSmoothingEnabled = !0, l.drawImage(n.canvas, 0, 0, a, r);
660
+ const h = re(l.getImageData(0, 0, a, r).data, e.threshold ?? 0.55), f = (e.radius ?? Math.max(i, o) * 0.02) / s, m = X(h, a, r, f), u = X(h, a, r, f * 3), p = e.halo ?? 0.6, d = l.createImageData(a, r);
661
+ for (let y = 0; y < a * r; y++) {
662
+ for (let w = 0; w < 3; w++) d.data[y * 4 + w] = Math.round(Math.min(1, m[y * 3 + w] + u[y * 3 + w] * p) * 255);
663
+ d.data[y * 4 + 3] = 255;
664
+ }
665
+ l.putImageData(d, 0, 0), n.save(), n.setTransform(1, 0, 0, 1, 0, 0), n.globalCompositeOperation = "lighter", n.globalAlpha = Math.max(0, e.strength ?? 0.9), n.imageSmoothingEnabled = !0, n.drawImage(c, 0, 0, i, o), n.restore();
666
+ }
667
+ function Re(n, e, t) {
668
+ const i = t.width ?? 6, o = t.taper ?? 1, s = t.fade ?? 1, a = t.opacity ?? 1, r = t.blend === "add";
669
+ if (n.save(), e.length >= 2) {
670
+ const l = le(e, i, o, s, a);
671
+ r ? (n.globalCompositeOperation = "lighter", A(n, l, t.color)) : ce(n, l, t.color);
672
+ }
673
+ const c = e[e.length - 1];
674
+ if (t.head && c && t.head.radius > 0) {
675
+ r && (n.globalCompositeOperation = "lighter");
676
+ const l = t.head.color ?? t.color, h = n.createRadialGradient(c.at.x, c.at.y, 0, c.at.x, c.at.y, t.head.radius);
677
+ h.addColorStop(0, l), h.addColorStop(0.35, l), h.addColorStop(1, ae(n, l)), n.globalAlpha = a, n.fillStyle = h, n.beginPath(), n.arc(c.at.x, c.at.y, t.head.radius, 0, Math.PI * 2), n.fill();
678
+ }
679
+ n.restore();
680
+ }
681
+ function ae(n, e) {
682
+ n.fillStyle = e;
683
+ const t = String(n.fillStyle), i = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i.exec(t);
684
+ if (i) return `rgba(${parseInt(i[1], 16)}, ${parseInt(i[2], 16)}, ${parseInt(i[3], 16)}, 0)`;
685
+ const o = /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i.exec(t);
686
+ return o ? `rgba(${o[1]}, ${o[2]}, ${o[3]}, 0)` : "rgba(0, 0, 0, 0)";
687
+ }
688
+ function le(n, e, t, i, o) {
689
+ const s = n.map((l) => ({ x: l.at.x, y: l.at.y, width: e * (1 - t * l.age) })), a = K(s), r = ee(s) ?? void 0, c = [];
690
+ for (let l = 0; l + 1 < n.length; l++) {
691
+ const h = (n[l].age + n[l + 1].age) / 2, f = o * (1 - i * h);
692
+ if (f <= 0) continue;
693
+ const m = l + 2 === n.length;
694
+ c.push({ corners: [a.left[l], a.left[l + 1], a.right[l + 1], a.right[l]], alpha: f, ...m && r && { cap: r } });
695
+ }
696
+ return c;
697
+ }
698
+ function A(n, e, t) {
699
+ n.fillStyle = t;
700
+ for (const i of e) {
701
+ const [o, s, a, r] = i.corners;
702
+ n.globalAlpha = Math.min(1, i.alpha), n.beginPath(), n.moveTo(o.x, o.y), n.lineTo(s.x, s.y), i.cap && n.arc(i.cap.x, i.cap.y, i.cap.radius, i.cap.start, i.cap.start - Math.PI, !0), n.lineTo(a.x, a.y), n.lineTo(r.x, r.y), n.closePath(), n.fill();
703
+ }
704
+ }
705
+ function ce(n, e, t) {
706
+ const i = typeof n.getTransform == "function" ? n.getTransform() : null, o = (d) => i ? { x: i.a * d.x + i.c * d.y + i.e, y: i.b * d.x + i.d * d.y + i.f } : d, s = i ? Math.sqrt(Math.abs(i.a * i.d - i.b * i.c)) : 1, a = e.map((d) => ({
707
+ ...d,
708
+ corners: d.corners.map(o),
709
+ ...d.cap && { cap: { ...d.cap, ...o(d.cap), radius: d.cap.radius * s, start: d.cap.start + (i ? Math.atan2(i.b, i.a) : 0) } }
710
+ }));
711
+ let r = 1 / 0, c = 1 / 0, l = -1 / 0, h = -1 / 0;
712
+ for (const d of a) {
713
+ const y = d.cap ? [{ x: d.cap.x - d.cap.radius, y: d.cap.y - d.cap.radius }, { x: d.cap.x + d.cap.radius, y: d.cap.y + d.cap.radius }] : [];
714
+ for (const w of [...d.corners, ...y])
715
+ r = Math.min(r, w.x), c = Math.min(c, w.y), l = Math.max(l, w.x), h = Math.max(h, w.y);
716
+ }
717
+ if (!(l > r && h > c)) return;
718
+ const f = Math.floor(r) - 1, m = Math.floor(c) - 1, u = i ? g(n, Math.ceil(l) + 1 - f, Math.ceil(h) + 1 - m) : null, p = u?.getContext("2d");
719
+ if (!u || !p) {
720
+ A(n, e, t);
721
+ return;
722
+ }
723
+ p.translate(-f, -m), p.globalCompositeOperation = "lighter", A(p, a, t), n.save(), n.setTransform(1, 0, 0, 1, 0, 0), n.globalAlpha = 1, n.drawImage(u, f, m), n.restore();
724
+ }
725
+ const S = "http://www.w3.org/2000/svg", he = /* @__PURE__ */ new Set([
624
726
  "fill",
625
727
  "stroke",
626
728
  "d",
@@ -640,7 +742,7 @@ const S = "http://www.w3.org/2000/svg", te = /* @__PURE__ */ new Set([
640
742
  "height",
641
743
  "viewBox",
642
744
  "preserveAspectRatio"
643
- ]), A = {
745
+ ]), C = {
644
746
  strokeWidth: "stroke-width",
645
747
  strokeLinecap: "stroke-linecap",
646
748
  strokeLinejoin: "stroke-linejoin",
@@ -651,7 +753,7 @@ const S = "http://www.w3.org/2000/svg", te = /* @__PURE__ */ new Set([
651
753
  strokeOpacity: "stroke-opacity",
652
754
  borderRadius: "rx"
653
755
  // Map CSS borderRadius to SVG rx
654
- }, ie = /* @__PURE__ */ new Set([
756
+ }, fe = /* @__PURE__ */ new Set([
655
757
  "x",
656
758
  // Position x treated as translateX
657
759
  "y",
@@ -672,8 +774,8 @@ const S = "http://www.w3.org/2000/svg", te = /* @__PURE__ */ new Set([
672
774
  "motionPathX",
673
775
  "motionPathY",
674
776
  "motionPathRotate"
675
- ]), se = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]);
676
- class ye {
777
+ ]), ue = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]);
778
+ class Ae {
677
779
  targets = /* @__PURE__ */ new Map();
678
780
  /**
679
781
  * Register an SVG element as an animation target.
@@ -704,8 +806,8 @@ class ye {
704
806
  */
705
807
  applyState(e) {
706
808
  for (const [t, i] of e.values) {
707
- const s = this.targets.get(t);
708
- s && this.applyProperties(s, i);
809
+ const o = this.targets.get(t);
810
+ o && this.applyProperties(o, i);
709
811
  }
710
812
  }
711
813
  /**
@@ -713,25 +815,25 @@ class ye {
713
815
  */
714
816
  applyProperties(e, t) {
715
817
  const i = {};
716
- let s = null;
717
- const o = {}, a = {}, n = {};
818
+ let o = null;
819
+ const s = {}, a = {}, r = {};
718
820
  let c = !1;
719
821
  for (const [l, h] of t)
720
- l !== "drawOn" && (ie.has(l) ? i[l] = h : l === "quaternion" ? s = N(h) : l === "originX" || l === "originY" ? typeof h == "number" && (o[l] = h) : l === "perspective" ? typeof h == "number" && (i.perspective = h) : se.has(l) ? typeof h == "number" && (a[l] = h) : z.has(l) ? (n[l] = h, c = !0) : l === "text" ? typeof h == "string" && H(e, h) : l === "shine" ? typeof h == "number" && this.applyShine(e, h) : l === "opacity" ? (e.setAttribute("fill-opacity", String(h)), e.setAttribute("stroke-opacity", String(h))) : this.applyAttribute(e, l, h));
721
- if (Object.keys(i).length > 0 || s) {
722
- const l = this.buildCssTransformString(i, s);
723
- e.style.transform = l, V(e);
822
+ l !== "drawOn" && (fe.has(l) ? i[l] = h : l === "quaternion" ? o = q(h) : l === "originX" || l === "originY" ? typeof h == "number" && (s[l] = h) : l === "perspective" ? typeof h == "number" && (i.perspective = h) : ue.has(l) ? typeof h == "number" && (a[l] = h) : j.has(l) ? (r[l] = h, c = !0) : l === "text" ? typeof h == "string" && Z(e, h) : l === "shine" ? typeof h == "number" && this.applyShine(e, h) : l === "opacity" ? (e.setAttribute("fill-opacity", String(h)), e.setAttribute("stroke-opacity", String(h))) : this.applyAttribute(e, l, h));
823
+ if (Object.keys(i).length > 0 || o) {
824
+ const l = this.buildCssTransformString(i, o);
825
+ e.style.transform = l, J(e);
724
826
  }
725
- if (Object.keys(o).length > 0) {
827
+ if (Object.keys(s).length > 0) {
726
828
  const l = e.style;
727
- l.transformBox = "fill-box", l.transformOrigin = `${o.originX ?? 50}% ${o.originY ?? 50}%`;
829
+ l.transformBox = "fill-box", l.transformOrigin = `${s.originX ?? 50}% ${s.originY ?? 50}%`;
728
830
  }
729
831
  if (Object.keys(a).length > 0) {
730
- const l = a.clipTop ?? 0, h = a.clipRight ?? 0, f = a.clipBottom ?? 0, p = a.clipLeft ?? 0;
731
- e.style.clipPath = `inset(${l}% ${h}% ${f}% ${p}%)`;
832
+ const l = a.clipTop ?? 0, h = a.clipRight ?? 0, f = a.clipBottom ?? 0, m = a.clipLeft ?? 0;
833
+ e.style.clipPath = `inset(${l}% ${h}% ${f}% ${m}%)`;
732
834
  }
733
835
  if (c) {
734
- const l = $(n);
836
+ const l = B(r);
735
837
  l && (e.style.filter = l);
736
838
  }
737
839
  }
@@ -741,14 +843,14 @@ class ye {
741
843
  buildCssTransformString(e, t = null) {
742
844
  const i = [];
743
845
  e.perspective !== void 0 && e.perspective > 0 && i.push(`perspective(${e.perspective}px)`);
744
- const s = e.motionPathX ?? e.x ?? e.translateX, o = e.motionPathY ?? e.y ?? e.translateY;
745
- e.z !== void 0 ? i.push(`translate3d(${s ?? 0}px, ${o ?? 0}px, ${e.z}px)`) : (s !== void 0 || o !== void 0) && i.push(`translate(${s ?? 0}px, ${o ?? 0}px)`);
846
+ const o = e.motionPathX ?? e.x ?? e.translateX, s = e.motionPathY ?? e.y ?? e.translateY;
847
+ e.z !== void 0 ? i.push(`translate3d(${o ?? 0}px, ${s ?? 0}px, ${e.z}px)`) : (o !== void 0 || s !== void 0) && i.push(`translate(${o ?? 0}px, ${s ?? 0}px)`);
746
848
  const a = e.motionPathRotate ?? e.rotate ?? e.rotateZ;
747
849
  if (a !== void 0 && i.push(`rotate(${a}deg)`), e.rotateX !== void 0 && i.push(`rotateX(${e.rotateX}deg)`), e.rotateY !== void 0 && i.push(`rotateY(${e.rotateY}deg)`), t && i.push(t), e.scale !== void 0)
748
850
  i.push(`scale(${e.scale})`);
749
851
  else if (e.scaleX !== void 0 || e.scaleY !== void 0) {
750
- const n = e.scaleX ?? 1, c = e.scaleY ?? 1;
751
- i.push(`scale(${n}, ${c})`);
852
+ const r = e.scaleX ?? 1, c = e.scaleY ?? 1;
853
+ i.push(`scale(${r}, ${c})`);
752
854
  }
753
855
  return e.skewX !== void 0 && i.push(`skewX(${e.skewX}deg)`), e.skewY !== void 0 && i.push(`skewY(${e.skewY}deg)`), i.join(" ");
754
856
  }
@@ -761,29 +863,29 @@ class ye {
761
863
  * gradient lives in the owner SVG's <defs> and is reused across frames.
762
864
  */
763
865
  applyShine(e, t) {
764
- const i = e.ownerSVGElement, s = e.ownerDocument;
765
- if (!i || !s) return;
766
- const o = e;
767
- o.dataset.shineBase || (o.dataset.shineBase = e.getAttribute("fill") || "#000000");
768
- const a = o.dataset.shineBase;
769
- let n = i.querySelector("defs");
770
- n || (n = s.createElementNS(S, "defs"), i.insertBefore(n, i.firstChild));
771
- let c = o.dataset.shineGrad, l = c ? n.querySelector(`#${c}`) : null;
772
- for (l || (c = `tinyfly-shine-${Math.random().toString(36).slice(2, 9)}`, o.dataset.shineGrad = c, l = s.createElementNS(S, "linearGradient"), l.setAttribute("id", c), n.appendChild(l)); l.firstChild; ) l.removeChild(l.firstChild);
773
- for (const h of I(t, a)) {
774
- const f = s.createElementNS(S, "stop");
866
+ const i = e.ownerSVGElement, o = e.ownerDocument;
867
+ if (!i || !o) return;
868
+ const s = e;
869
+ s.dataset.shineBase || (s.dataset.shineBase = e.getAttribute("fill") || "#000000");
870
+ const a = s.dataset.shineBase;
871
+ let r = i.querySelector("defs");
872
+ r || (r = o.createElementNS(S, "defs"), i.insertBefore(r, i.firstChild));
873
+ let c = s.dataset.shineGrad, l = c ? r.querySelector(`#${c}`) : null;
874
+ for (l || (c = `tinyfly-shine-${Math.random().toString(36).slice(2, 9)}`, s.dataset.shineGrad = c, l = o.createElementNS(S, "linearGradient"), l.setAttribute("id", c), r.appendChild(l)); l.firstChild; ) l.removeChild(l.firstChild);
875
+ for (const h of G(t, a)) {
876
+ const f = o.createElementNS(S, "stop");
775
877
  f.setAttribute("offset", String(h.offset)), f.setAttribute("stop-color", h.color), l.appendChild(f);
776
878
  }
777
879
  e.setAttribute("fill", `url(#${c})`);
778
880
  }
779
881
  applyAttribute(e, t, i) {
780
- let s = t;
781
- A[t] ? s = A[t] : te.has(t) && (s = t);
782
- const o = Array.isArray(i) ? i.join(" ") : String(i);
783
- e.setAttribute(s, o);
882
+ let o = t;
883
+ C[t] ? o = C[t] : he.has(t) && (o = t);
884
+ const s = Array.isArray(i) ? i.join(" ") : String(i);
885
+ e.setAttribute(o, s);
784
886
  }
785
887
  }
786
- const oe = `
888
+ const de = `
787
889
  attribute vec2 a_position;
788
890
  attribute vec2 a_texCoord;
789
891
  uniform mat4 u_matrix;
@@ -793,7 +895,7 @@ void main() {
793
895
  gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);
794
896
  v_texCoord = a_texCoord;
795
897
  }
796
- `, ne = `
898
+ `, pe = `
797
899
  precision mediump float;
798
900
  uniform vec4 u_color;
799
901
  uniform sampler2D u_texture;
@@ -804,7 +906,7 @@ void main() {
804
906
  vec4 color = u_useTexture ? texture2D(u_texture, v_texCoord) : u_color;
805
907
  gl_FragColor = vec4(color.rgb, color.a * u_opacity);
806
908
  }
807
- `, re = /* @__PURE__ */ new Set([
909
+ `, me = /* @__PURE__ */ new Set([
808
910
  "x",
809
911
  "y",
810
912
  "width",
@@ -825,7 +927,7 @@ void main() {
825
927
  "motionPathY",
826
928
  "motionPathRotate"
827
929
  ]);
828
- class me {
930
+ class ge {
829
931
  gl;
830
932
  program;
831
933
  positionBuffer;
@@ -836,7 +938,7 @@ class me {
836
938
  basePositions = /* @__PURE__ */ new Map();
837
939
  locations;
838
940
  constructor(e) {
839
- this.gl = e, this.program = le(e, oe, ne), this.locations = {
941
+ this.gl = e, this.program = be(e, de, pe), this.locations = {
840
942
  position: e.getAttribLocation(this.program, "a_position"),
841
943
  texCoord: e.getAttribLocation(this.program, "a_texCoord"),
842
944
  matrix: e.getUniformLocation(this.program, "u_matrix"),
@@ -844,7 +946,7 @@ class me {
844
946
  texture: e.getUniformLocation(this.program, "u_texture"),
845
947
  useTexture: e.getUniformLocation(this.program, "u_useTexture"),
846
948
  opacity: e.getUniformLocation(this.program, "u_opacity")
847
- }, this.positionBuffer = E(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]), this.texCoordBuffer = E(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
949
+ }, this.positionBuffer = I(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]), this.texCoordBuffer = I(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
848
950
  }
849
951
  registerTarget(e, t) {
850
952
  this.targets.set(e, t), this.basePositions.set(e, { x: t.x, y: t.y });
@@ -863,92 +965,92 @@ class me {
863
965
  /** Apply engine state to the registered targets. */
864
966
  applyState(e) {
865
967
  for (const [t, i] of e.values) {
866
- const s = this.targets.get(t);
867
- if (!s) continue;
868
- const o = this.basePositions.get(t) ?? { x: 0, y: 0 };
869
- for (const [a, n] of i)
870
- this.applyProperty(s, o, a, n);
968
+ const o = this.targets.get(t);
969
+ if (!o) continue;
970
+ const s = this.basePositions.get(t) ?? { x: 0, y: 0 };
971
+ for (const [a, r] of i)
972
+ this.applyProperty(o, s, a, r);
871
973
  }
872
974
  }
873
- applyProperty(e, t, i, s) {
874
- if (typeof s == "number") {
975
+ applyProperty(e, t, i, o) {
976
+ if (typeof o == "number") {
875
977
  if (i === "x" || i === "motionPathX") {
876
- e.x = t.x + s;
978
+ e.x = t.x + o;
877
979
  return;
878
980
  }
879
981
  if (i === "y" || i === "motionPathY") {
880
- e.y = t.y + s;
982
+ e.y = t.y + o;
881
983
  return;
882
984
  }
883
985
  if (i === "rotateZ" || i === "motionPathRotate") {
884
- e.rotate = s;
986
+ e.rotate = o;
885
987
  return;
886
988
  }
887
- if (re.has(i)) {
888
- e[i] = s;
989
+ if (me.has(i)) {
990
+ e[i] = o;
889
991
  return;
890
992
  }
891
993
  }
892
- typeof s == "string" && i === "fill" && (e.fill = s), i === "quaternion" && Array.isArray(s) && (e.quaternion = s);
994
+ typeof o == "string" && i === "fill" && (e.fill = o), i === "quaternion" && Array.isArray(o) && (e.quaternion = o);
893
995
  }
894
996
  /** Draw every registered target. */
895
997
  render() {
896
998
  const e = this.gl, { width: t, height: i } = e.canvas;
897
- e.viewport(0, 0, t, i), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), e.useProgram(this.program), X(e, this.positionBuffer, this.locations.position), X(e, this.texCoordBuffer, this.locations.texCoord);
898
- for (const [s, o] of this.targets)
899
- this.drawTarget(s, o, t, i);
900
- }
901
- drawTarget(e, t, i, s) {
902
- const o = this.gl;
903
- if (t.backfaceVisibility === "hidden" && Y(B(t))) return;
904
- const a = ae(t, i, s);
905
- if (o.uniformMatrix4fv(this.locations.matrix, !1, a), o.uniform1f(this.locations.opacity, t.opacity ?? 1), t.texture)
906
- o.bindTexture(o.TEXTURE_2D, this.textureFor(e, t.texture)), o.uniform1i(this.locations.useTexture, 1), o.uniform1i(this.locations.texture, 0);
999
+ e.viewport(0, 0, t, i), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), e.useProgram(this.program), Y(e, this.positionBuffer, this.locations.position), Y(e, this.texCoordBuffer, this.locations.texCoord);
1000
+ for (const [o, s] of this.targets)
1001
+ this.drawTarget(o, s, t, i);
1002
+ }
1003
+ drawTarget(e, t, i, o) {
1004
+ const s = this.gl;
1005
+ if (t.backfaceVisibility === "hidden" && O(D(t))) return;
1006
+ const a = ye(t, i, o);
1007
+ if (s.uniformMatrix4fv(this.locations.matrix, !1, a), s.uniform1f(this.locations.opacity, t.opacity ?? 1), t.texture)
1008
+ s.bindTexture(s.TEXTURE_2D, this.textureFor(e, t.texture)), s.uniform1i(this.locations.useTexture, 1), s.uniform1i(this.locations.texture, 0);
907
1009
  else {
908
- o.uniform1i(this.locations.useTexture, 0);
909
- const [n, c, l] = ce(t.fill ?? "#ffffff");
910
- o.uniform4f(this.locations.color, n, c, l, 1);
1010
+ s.uniform1i(this.locations.useTexture, 0);
1011
+ const [r, c, l] = we(t.fill ?? "#ffffff");
1012
+ s.uniform4f(this.locations.color, r, c, l, 1);
911
1013
  }
912
- o.drawArrays(o.TRIANGLES, 0, 6);
1014
+ s.drawArrays(s.TRIANGLES, 0, 6);
913
1015
  }
914
1016
  textureFor(e, t) {
915
1017
  const i = this.textures.get(e);
916
1018
  if (i) return i;
917
- const s = this.gl, o = s.createTexture();
918
- return s.bindTexture(s.TEXTURE_2D, o), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_S, s.CLAMP_TO_EDGE), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_T, s.CLAMP_TO_EDGE), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MIN_FILTER, s.LINEAR), s.texImage2D(s.TEXTURE_2D, 0, s.RGBA, s.RGBA, s.UNSIGNED_BYTE, t), this.textures.set(e, o), o;
1019
+ const o = this.gl, s = o.createTexture();
1020
+ return o.bindTexture(o.TEXTURE_2D, s), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_WRAP_S, o.CLAMP_TO_EDGE), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_WRAP_T, o.CLAMP_TO_EDGE), o.texParameteri(o.TEXTURE_2D, o.TEXTURE_MIN_FILTER, o.LINEAR), o.texImage2D(o.TEXTURE_2D, 0, o.RGBA, o.RGBA, o.UNSIGNED_BYTE, t), this.textures.set(e, s), s;
919
1021
  }
920
1022
  /** Release GL resources. */
921
1023
  destroy() {
922
1024
  this.clearTargets(), this.gl.deleteProgram(this.program), this.gl.deleteBuffer(this.positionBuffer), this.gl.deleteBuffer(this.texCoordBuffer);
923
1025
  }
924
1026
  }
925
- function we(r, e, t) {
926
- const i = (r.scale ?? r.scaleX ?? 1) * r.width, s = (r.scale ?? r.scaleY ?? 1) * r.height, o = (r.originX ?? 50) / 100, a = (r.originY ?? 50) / 100, n = (r.rotate ?? 0) * Math.PI / 180, c = Math.cos(n), l = Math.sin(n), h = -o, f = -a, p = c * i, u = l * i, d = -l * s, y = c * s, w = r.x + p * h + d * f, L = r.y + u * h + y * f, v = 2 / e, P = -2 / t;
1027
+ function ke(n, e, t) {
1028
+ const i = (n.scale ?? n.scaleX ?? 1) * n.width, o = (n.scale ?? n.scaleY ?? 1) * n.height, s = (n.originX ?? 50) / 100, a = (n.originY ?? 50) / 100, r = (n.rotate ?? 0) * Math.PI / 180, c = Math.cos(r), l = Math.sin(r), h = -s, f = -a, m = c * i, u = l * i, p = -l * o, d = c * o, y = n.x + m * h + p * f, w = n.y + u * h + d * f, v = 2 / e, P = -2 / t;
927
1029
  return new Float32Array([
928
- p * v,
1030
+ m * v,
929
1031
  u * P,
930
1032
  0,
931
- d * v,
932
- y * P,
1033
+ p * v,
1034
+ d * P,
933
1035
  0,
934
- w * v - 1,
935
- L * P + 1,
1036
+ y * v - 1,
1037
+ w * P + 1,
936
1038
  1
937
1039
  ]);
938
1040
  }
939
- function B(r) {
940
- const e = (r.originX ?? 50) / 100, t = (r.originY ?? 50) / 100, i = { x: r.x, y: r.y }, s = m.multiply(
941
- m.translation([r.x, r.y, 0]),
942
- m.multiply(m.scaling([r.width, r.height, 1]), m.translation([-e, -t, 0]))
1041
+ function D(n) {
1042
+ const e = (n.originX ?? 50) / 100, t = (n.originY ?? 50) / 100, i = { x: n.x, y: n.y }, o = b.multiply(
1043
+ b.translation([n.x, n.y, 0]),
1044
+ b.multiply(b.scaling([n.width, n.height, 1]), b.translation([-e, -t, 0]))
943
1045
  );
944
- return m.multiply(_(r, { x: 0, y: 0 }, i), s);
1046
+ return b.multiply(_(n, { x: 0, y: 0 }, i), o);
945
1047
  }
946
- function ae(r, e, t) {
1048
+ function ye(n, e, t) {
947
1049
  const i = [2 / e, 0, 0, 0, 0, -2 / t, 0, 0, 0, 0, 0, 0, -1, 1, 0, 1];
948
- return new Float32Array(m.multiply(i, B(r)));
1050
+ return new Float32Array(b.multiply(i, D(n)));
949
1051
  }
950
- function ce(r) {
951
- const e = r.trim().replace("#", "");
1052
+ function we(n) {
1053
+ const e = n.trim().replace("#", "");
952
1054
  return e.length === 3 ? [
953
1055
  Number.parseInt(e[0] + e[0], 16) / 255,
954
1056
  Number.parseInt(e[1] + e[1], 16) / 255,
@@ -959,47 +1061,53 @@ function ce(r) {
959
1061
  Number.parseInt(e.slice(4, 6), 16) / 255
960
1062
  ] : [1, 1, 1];
961
1063
  }
962
- function le(r, e, t) {
963
- const i = r.createProgram();
1064
+ function be(n, e, t) {
1065
+ const i = n.createProgram();
964
1066
  if (!i) throw new Error("WebGLAdapter: could not create a program");
965
- if (r.attachShader(i, k(r, r.VERTEX_SHADER, e)), r.attachShader(i, k(r, r.FRAGMENT_SHADER, t)), r.linkProgram(i), !r.getProgramParameter(i, r.LINK_STATUS))
966
- throw new Error(`WebGLAdapter: program link failed — ${r.getProgramInfoLog(i)}`);
1067
+ if (n.attachShader(i, $(n, n.VERTEX_SHADER, e)), n.attachShader(i, $(n, n.FRAGMENT_SHADER, t)), n.linkProgram(i), !n.getProgramParameter(i, n.LINK_STATUS))
1068
+ throw new Error(`WebGLAdapter: program link failed — ${n.getProgramInfoLog(i)}`);
967
1069
  return i;
968
1070
  }
969
- function k(r, e, t) {
970
- const i = r.createShader(e);
1071
+ function $(n, e, t) {
1072
+ const i = n.createShader(e);
971
1073
  if (!i) throw new Error("WebGLAdapter: could not create a shader");
972
- if (r.shaderSource(i, t), r.compileShader(i), !r.getShaderParameter(i, r.COMPILE_STATUS))
973
- throw new Error(`WebGLAdapter: shader compile failed — ${r.getShaderInfoLog(i)}`);
1074
+ if (n.shaderSource(i, t), n.compileShader(i), !n.getShaderParameter(i, n.COMPILE_STATUS))
1075
+ throw new Error(`WebGLAdapter: shader compile failed — ${n.getShaderInfoLog(i)}`);
974
1076
  return i;
975
1077
  }
976
- function E(r, e) {
977
- const t = r.createBuffer();
1078
+ function I(n, e) {
1079
+ const t = n.createBuffer();
978
1080
  if (!t) throw new Error("WebGLAdapter: could not create a buffer");
979
- return r.bindBuffer(r.ARRAY_BUFFER, t), r.bufferData(r.ARRAY_BUFFER, new Float32Array(e), r.STATIC_DRAW), t;
1081
+ return n.bindBuffer(n.ARRAY_BUFFER, t), n.bufferData(n.ARRAY_BUFFER, new Float32Array(e), n.STATIC_DRAW), t;
980
1082
  }
981
- function X(r, e, t) {
982
- t < 0 || (r.bindBuffer(r.ARRAY_BUFFER, e), r.enableVertexAttribArray(t), r.vertexAttribPointer(t, 2, r.FLOAT, !1, 0, 0));
1083
+ function Y(n, e, t) {
1084
+ t < 0 || (n.bindBuffer(n.ARRAY_BUFFER, e), n.enableVertexAttribArray(t), n.vertexAttribPointer(t, 2, n.FLOAT, !1, 0, 0));
983
1085
  }
984
1086
  export {
985
- x as CanvasAdapter,
986
- Pe as DOMAdapter,
987
- ye as SVGAdapter,
988
- me as WebGLAdapter,
989
- Se as boilFrame,
990
- K as buildFlipTracks,
991
- b as drawOutline,
992
- de as flip,
993
- pe as isGradient,
994
- ce as parseColor,
995
- j as partialPath,
996
- Re as pathLength,
997
- R as pathOutline,
998
- xe as pointAlong,
999
- we as quadMatrix,
1000
- ae as quadMatrix3d,
1001
- J as recordFlipState,
1002
- Q as rectOutline,
1003
- H as setTextContent,
1004
- Z as sketchPen
1087
+ R as CanvasAdapter,
1088
+ Ce as DOMAdapter,
1089
+ Ae as SVGAdapter,
1090
+ ge as WebGLAdapter,
1091
+ xe as applyBloom,
1092
+ Ie as boilFrame,
1093
+ X as boxBlur,
1094
+ re as brightPass,
1095
+ se as buildFlipTracks,
1096
+ g as canvasLike,
1097
+ M as drawOutline,
1098
+ Re as drawTrail,
1099
+ Me as flip,
1100
+ Se as isGradient,
1101
+ we as parseColor,
1102
+ te as partialPath,
1103
+ Ye as pathLength,
1104
+ x as pathOutline,
1105
+ _e as pointAlong,
1106
+ ke as quadMatrix,
1107
+ ye as quadMatrix3d,
1108
+ oe as recordFlipState,
1109
+ ne as rectOutline,
1110
+ Z as setTextContent,
1111
+ ie as sketchPen,
1112
+ le as trailQuads
1005
1113
  };