exodeui 2.6.13 → 2.6.14

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.
package/dist/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  var NC = Object.defineProperty;
2
2
  var aC = (i, A, I) => A in i ? NC(i, A, { enumerable: !0, configurable: !0, writable: !0, value: I }) : i[A] = I;
3
- var V = (i, A, I) => aC(i, typeof A != "symbol" ? A + "" : A, I);
3
+ var _ = (i, A, I) => aC(i, typeof A != "symbol" ? A + "" : A, I);
4
4
  import { jsx as kC } from "react/jsx-runtime";
5
- import { forwardRef as yC, useRef as iI, useImperativeHandle as FC, useEffect as WA, useState as MC, useCallback as vA } from "react";
5
+ import { forwardRef as yC, useRef as iI, useImperativeHandle as FC, useEffect as OA, useState as MC, useCallback as vA } from "react";
6
6
  var JC = /* @__PURE__ */ ((i) => (i.Equal = "Equal", i.NotEqual = "NotEqual", i.GreaterThan = "GreaterThan", i.LessThan = "LessThan", i.GreaterEqual = "GreaterEqual", i.LessEqual = "LessEqual", i.IsTrue = "IsTrue", i.IsFalse = "IsFalse", i))(JC || {}), uA = /* @__PURE__ */ ((i) => (i.AND = "AND", i.OR = "OR", i.NOT = "NOT", i.XOR = "XOR", i))(uA || {});
7
7
  let B;
8
8
  const f = new Array(128).fill(void 0);
9
- function H(i) {
9
+ function p(i) {
10
10
  return f[i];
11
11
  }
12
12
  f.push(void 0, null, !0, !1);
13
13
  let $A = f.length;
14
- function j(i) {
14
+ function x(i) {
15
15
  $A === f.length && f.push(f.length + 1);
16
16
  const A = $A;
17
17
  return $A = f[A], f[A] = i, A;
@@ -20,7 +20,7 @@ function DI(i, A) {
20
20
  try {
21
21
  return i.apply(this, A);
22
22
  } catch (I) {
23
- B.__wbindgen_export_0(j(I));
23
+ B.__wbindgen_export_0(x(I));
24
24
  }
25
25
  }
26
26
  const bg = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) : { decode: () => {
@@ -31,24 +31,24 @@ let VA = null;
31
31
  function dI(i, A) {
32
32
  return i >>>= 0, bg.decode((VA !== null && VA.byteLength !== 0 || (VA = new Uint8Array(B.memory.buffer)), VA).subarray(i, i + A));
33
33
  }
34
- function c(i) {
34
+ function t(i) {
35
35
  return i == null;
36
36
  }
37
- let dA = null;
38
- function EA() {
39
- return (dA === null || dA.buffer.detached === !0 || dA.buffer.detached === void 0 && dA.buffer !== B.memory.buffer) && (dA = new DataView(B.memory.buffer)), dA;
37
+ let fA = null;
38
+ function oA() {
39
+ return (fA === null || fA.buffer.detached === !0 || fA.buffer.detached === void 0 && fA.buffer !== B.memory.buffer) && (fA = new DataView(B.memory.buffer)), fA;
40
40
  }
41
41
  function oI(i) {
42
- const A = H(i);
42
+ const A = p(i);
43
43
  return function(I) {
44
44
  I < 132 || (f[I] = $A, $A = I);
45
45
  }(i), A;
46
46
  }
47
- function h(i, A) {
47
+ function s(i, A) {
48
48
  if (!(i instanceof A)) throw new Error(`expected instance of ${A.name}`);
49
49
  }
50
50
  let X = 128;
51
- function P(i) {
51
+ function $(i) {
52
52
  if (X == 1) throw new Error("out of js stack");
53
53
  return f[--X] = i, X;
54
54
  }
@@ -67,22 +67,22 @@ let _A = null;
67
67
  function Zg() {
68
68
  return _A !== null && _A.byteLength !== 0 || (_A = new Uint32Array(B.memory.buffer)), _A;
69
69
  }
70
- let NA = 0;
70
+ let yA = 0;
71
71
  function cI(i, A) {
72
72
  const I = A(4 * i.length, 4) >>> 0;
73
- return Zg().set(i, I / 4), NA = i.length, I;
73
+ return Zg().set(i, I / 4), yA = i.length, I;
74
74
  }
75
- function lA(i, A) {
75
+ function HA(i, A) {
76
76
  const I = A(4 * i.length, 4) >>> 0;
77
- return Tg().set(i, I / 4), NA = i.length, I;
77
+ return Tg().set(i, I / 4), yA = i.length, I;
78
78
  }
79
- const NI = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", AngX: 2, 2: "AngX" }), nA = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Generic: 5, 5: "Generic" }), hA = Object.freeze({ Ball: 0, 0: "Ball", Cuboid: 1, 1: "Cuboid", Capsule: 2, 2: "Capsule", Segment: 3, 3: "Segment", Polyline: 4, 4: "Polyline", Triangle: 5, 5: "Triangle", TriMesh: 6, 6: "TriMesh", HeightField: 7, 7: "HeightField", Compound: 8, 8: "Compound", ConvexPolygon: 9, 9: "ConvexPolygon", RoundCuboid: 10, 10: "RoundCuboid", RoundTriangle: 11, 11: "RoundTriangle", RoundConvexPolygon: 12, 12: "RoundConvexPolygon", HalfSpace: 13, 13: "HalfSpace", Voxels: 14, 14: "Voxels" }), tI = typeof FinalizationRegistry > "u" ? { register: () => {
79
+ const NI = Object.freeze({ LinX: 0, 0: "LinX", LinY: 1, 1: "LinY", AngX: 2, 2: "AngX" }), pA = Object.freeze({ Revolute: 0, 0: "Revolute", Fixed: 1, 1: "Fixed", Prismatic: 2, 2: "Prismatic", Rope: 3, 3: "Rope", Spring: 4, 4: "Spring", Generic: 5, 5: "Generic" }), KA = Object.freeze({ Ball: 0, 0: "Ball", Cuboid: 1, 1: "Cuboid", Capsule: 2, 2: "Capsule", Segment: 3, 3: "Segment", Polyline: 4, 4: "Polyline", Triangle: 5, 5: "Triangle", TriMesh: 6, 6: "TriMesh", HeightField: 7, 7: "HeightField", Compound: 8, 8: "Compound", ConvexPolygon: 9, 9: "ConvexPolygon", RoundCuboid: 10, 10: "RoundCuboid", RoundTriangle: 11, 11: "RoundTriangle", RoundConvexPolygon: 12, 12: "RoundConvexPolygon", HalfSpace: 13, 13: "HalfSpace", Voxels: 14, 14: "Voxels" }), tI = typeof FinalizationRegistry > "u" ? { register: () => {
80
80
  }, unregister: () => {
81
81
  } } : new FinalizationRegistry((i) => B.__wbg_rawbroadphase_free(i >>> 0, 1));
82
- class HA {
82
+ class dA {
83
83
  static __wrap(A) {
84
84
  A >>>= 0;
85
- const I = Object.create(HA.prototype);
85
+ const I = Object.create(dA.prototype);
86
86
  return I.__wbg_ptr = A, tI.register(I, I.__wbg_ptr, I), I;
87
87
  }
88
88
  __destroy_into_raw() {
@@ -97,85 +97,85 @@ class HA {
97
97
  const A = B.rawbroadphase_new();
98
98
  return this.__wbg_ptr = A >>> 0, tI.register(this, this.__wbg_ptr, this), this;
99
99
  }
100
- castRay(A, I, g, C, Q, E, D, o, w, G, s, K) {
100
+ castRay(A, I, g, C, Q, E, D, o, w, h, G, S) {
101
101
  try {
102
- h(A, gA), h(I, u), h(g, _), h(C, a), h(Q, a);
103
- const S = B.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D, o, c(w) ? 4294967297 : w >>> 0, !c(G), c(G) ? 0 : G, !c(s), c(s) ? 0 : s, P(K));
104
- return S === 0 ? void 0 : zI.__wrap(S);
102
+ s(A, BA), s(I, v), s(g, gA), s(C, a), s(Q, a);
103
+ const K = B.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D, o, t(w) ? 4294967297 : w >>> 0, !t(h), t(h) ? 0 : h, !t(G), t(G) ? 0 : G, $(S));
104
+ return K === 0 ? void 0 : zI.__wrap(K);
105
105
  } finally {
106
106
  f[X++] = void 0;
107
107
  }
108
108
  }
109
- castRayAndGetNormal(A, I, g, C, Q, E, D, o, w, G, s, K) {
109
+ castRayAndGetNormal(A, I, g, C, Q, E, D, o, w, h, G, S) {
110
110
  try {
111
- h(A, gA), h(I, u), h(g, _), h(C, a), h(Q, a);
112
- const S = B.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D, o, c(w) ? 4294967297 : w >>> 0, !c(G), c(G) ? 0 : G, !c(s), c(s) ? 0 : s, P(K));
113
- return S === 0 ? void 0 : yI.__wrap(S);
111
+ s(A, BA), s(I, v), s(g, gA), s(C, a), s(Q, a);
112
+ const K = B.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D, o, t(w) ? 4294967297 : w >>> 0, !t(h), t(h) ? 0 : h, !t(G), t(G) ? 0 : G, $(S));
113
+ return K === 0 ? void 0 : yI.__wrap(K);
114
114
  } finally {
115
115
  f[X++] = void 0;
116
116
  }
117
117
  }
118
- intersectionsWithRay(A, I, g, C, Q, E, D, o, w, G, s, K, S) {
118
+ intersectionsWithRay(A, I, g, C, Q, E, D, o, w, h, G, S, K) {
119
119
  try {
120
- h(A, gA), h(I, u), h(g, _), h(C, a), h(Q, a), B.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D, P(o), w, c(G) ? 4294967297 : G >>> 0, !c(s), c(s) ? 0 : s, !c(K), c(K) ? 0 : K, P(S));
120
+ s(A, BA), s(I, v), s(g, gA), s(C, a), s(Q, a), B.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D, $(o), w, t(h) ? 4294967297 : h >>> 0, !t(G), t(G) ? 0 : G, !t(S), t(S) ? 0 : S, $(K));
121
121
  } finally {
122
122
  f[X++] = void 0, f[X++] = void 0;
123
123
  }
124
124
  }
125
- intersectionWithShape(A, I, g, C, Q, E, D, o, w, G, s) {
125
+ intersectionWithShape(A, I, g, C, Q, E, D, o, w, h, G) {
126
126
  try {
127
127
  const J = B.__wbindgen_add_to_stack_pointer(-16);
128
- h(A, gA), h(I, u), h(g, _), h(C, a), h(Q, b), h(E, Y), B.rawbroadphase_intersectionWithShape(J, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D, c(o) ? 4294967297 : o >>> 0, !c(w), c(w) ? 0 : w, !c(G), c(G) ? 0 : G, P(s));
129
- var K = EA().getInt32(J + 0, !0), S = EA().getFloat64(J + 8, !0);
130
- return K === 0 ? void 0 : S;
128
+ s(A, BA), s(I, v), s(g, gA), s(C, a), s(Q, b), s(E, r), B.rawbroadphase_intersectionWithShape(J, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D, t(o) ? 4294967297 : o >>> 0, !t(w), t(w) ? 0 : w, !t(h), t(h) ? 0 : h, $(G));
129
+ var S = oA().getInt32(J + 0, !0), K = oA().getFloat64(J + 8, !0);
130
+ return S === 0 ? void 0 : K;
131
131
  } finally {
132
132
  B.__wbindgen_add_to_stack_pointer(16), f[X++] = void 0;
133
133
  }
134
134
  }
135
- projectPoint(A, I, g, C, Q, E, D, o, w, G) {
135
+ projectPoint(A, I, g, C, Q, E, D, o, w, h) {
136
136
  try {
137
- h(A, gA), h(I, u), h(g, _), h(C, a);
138
- const s = B.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, E, c(D) ? 4294967297 : D >>> 0, !c(o), c(o) ? 0 : o, !c(w), c(w) ? 0 : w, P(G));
139
- return s === 0 ? void 0 : wI.__wrap(s);
137
+ s(A, BA), s(I, v), s(g, gA), s(C, a);
138
+ const G = B.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, E, t(D) ? 4294967297 : D >>> 0, !t(o), t(o) ? 0 : o, !t(w), t(w) ? 0 : w, $(h));
139
+ return G === 0 ? void 0 : wI.__wrap(G);
140
140
  } finally {
141
141
  f[X++] = void 0;
142
142
  }
143
143
  }
144
144
  projectPointAndGetFeature(A, I, g, C, Q, E, D, o, w) {
145
145
  try {
146
- h(A, gA), h(I, u), h(g, _), h(C, a);
147
- const G = B.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, c(E) ? 4294967297 : E >>> 0, !c(D), c(D) ? 0 : D, !c(o), c(o) ? 0 : o, P(w));
148
- return G === 0 ? void 0 : wI.__wrap(G);
146
+ s(A, BA), s(I, v), s(g, gA), s(C, a);
147
+ const h = B.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, t(E) ? 4294967297 : E >>> 0, !t(D), t(D) ? 0 : D, !t(o), t(o) ? 0 : o, $(w));
148
+ return h === 0 ? void 0 : wI.__wrap(h);
149
149
  } finally {
150
150
  f[X++] = void 0;
151
151
  }
152
152
  }
153
- intersectionsWithPoint(A, I, g, C, Q, E, D, o, w, G) {
153
+ intersectionsWithPoint(A, I, g, C, Q, E, D, o, w, h) {
154
154
  try {
155
- h(A, gA), h(I, u), h(g, _), h(C, a), B.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, P(Q), E, c(D) ? 4294967297 : D >>> 0, !c(o), c(o) ? 0 : o, !c(w), c(w) ? 0 : w, P(G));
155
+ s(A, BA), s(I, v), s(g, gA), s(C, a), B.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, $(Q), E, t(D) ? 4294967297 : D >>> 0, !t(o), t(o) ? 0 : o, !t(w), t(w) ? 0 : w, $(h));
156
156
  } finally {
157
157
  f[X++] = void 0, f[X++] = void 0;
158
158
  }
159
159
  }
160
- castShape(A, I, g, C, Q, E, D, o, w, G, s, K, S, J, k) {
160
+ castShape(A, I, g, C, Q, E, D, o, w, h, G, S, K, J, F) {
161
161
  try {
162
- h(A, gA), h(I, u), h(g, _), h(C, a), h(Q, b), h(E, a), h(D, Y);
163
- const y = B.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o, w, G, s, c(K) ? 4294967297 : K >>> 0, !c(S), c(S) ? 0 : S, !c(J), c(J) ? 0 : J, P(k));
162
+ s(A, BA), s(I, v), s(g, gA), s(C, a), s(Q, b), s(E, a), s(D, r);
163
+ const y = B.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o, w, h, G, t(S) ? 4294967297 : S >>> 0, !t(K), t(K) ? 0 : K, !t(J), t(J) ? 0 : J, $(F));
164
164
  return y === 0 ? void 0 : aI.__wrap(y);
165
165
  } finally {
166
166
  f[X++] = void 0;
167
167
  }
168
168
  }
169
- intersectionsWithShape(A, I, g, C, Q, E, D, o, w, G, s, K) {
169
+ intersectionsWithShape(A, I, g, C, Q, E, D, o, w, h, G, S) {
170
170
  try {
171
- h(A, gA), h(I, u), h(g, _), h(C, a), h(Q, b), h(E, Y), B.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, P(D), o, c(w) ? 4294967297 : w >>> 0, !c(G), c(G) ? 0 : G, !c(s), c(s) ? 0 : s, P(K));
171
+ s(A, BA), s(I, v), s(g, gA), s(C, a), s(Q, b), s(E, r), B.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, $(D), o, t(w) ? 4294967297 : w >>> 0, !t(h), t(h) ? 0 : h, !t(G), t(G) ? 0 : G, $(S));
172
172
  } finally {
173
173
  f[X++] = void 0, f[X++] = void 0;
174
174
  }
175
175
  }
176
176
  collidersWithAabbIntersectingAabb(A, I, g, C, Q, E) {
177
177
  try {
178
- h(A, gA), h(I, u), h(g, _), h(C, a), h(Q, a), B.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, P(E));
178
+ s(A, BA), s(I, v), s(g, gA), s(C, a), s(Q, a), B.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, $(E));
179
179
  } finally {
180
180
  f[X++] = void 0;
181
181
  }
@@ -201,7 +201,7 @@ class fI {
201
201
  const Sg = typeof FinalizationRegistry > "u" ? { register: () => {
202
202
  }, unregister: () => {
203
203
  } } : new FinalizationRegistry((i) => B.__wbg_rawcharactercollision_free(i >>> 0, 1));
204
- class Og {
204
+ class Wg {
205
205
  __destroy_into_raw() {
206
206
  const A = this.__wbg_ptr;
207
207
  return this.__wbg_ptr = 0, Sg.unregister(this), A;
@@ -248,10 +248,10 @@ class Og {
248
248
  const YI = typeof FinalizationRegistry > "u" ? { register: () => {
249
249
  }, unregister: () => {
250
250
  } } : new FinalizationRegistry((i) => B.__wbg_rawcolliderset_free(i >>> 0, 1));
251
- class _ {
251
+ class gA {
252
252
  static __wrap(A) {
253
253
  A >>>= 0;
254
- const I = Object.create(_.prototype);
254
+ const I = Object.create(gA.prototype);
255
255
  return I.__wbg_ptr = A, YI.register(I, I.__wbg_ptr, I), I;
256
256
  }
257
257
  __destroy_into_raw() {
@@ -305,7 +305,7 @@ class _ {
305
305
  return I === 0 ? void 0 : a.__wrap(I);
306
306
  }
307
307
  coSetHalfExtents(A, I) {
308
- h(I, a), B.rawcolliderset_coSetHalfExtents(this.__wbg_ptr, A, I.__wbg_ptr);
308
+ s(I, a), B.rawcolliderset_coSetHalfExtents(this.__wbg_ptr, A, I.__wbg_ptr);
309
309
  }
310
310
  coRadius(A) {
311
311
  const I = B.rawcolliderset_coRadius(this.__wbg_ptr, A);
@@ -332,7 +332,7 @@ class _ {
332
332
  try {
333
333
  const C = B.__wbindgen_add_to_stack_pointer(-16);
334
334
  B.rawcolliderset_coVoxelData(C, this.__wbg_ptr, A);
335
- var I = EA().getInt32(C + 0, !0), g = EA().getInt32(C + 4, !0);
335
+ var I = oA().getInt32(C + 0, !0), g = oA().getInt32(C + 4, !0);
336
336
  let Q;
337
337
  return I !== 0 && (Q = UC(I, g).slice(), B.__wbindgen_export_1(I, 4 * g, 4)), Q;
338
338
  } finally {
@@ -356,7 +356,7 @@ class _ {
356
356
  try {
357
357
  const C = B.__wbindgen_add_to_stack_pointer(-16);
358
358
  B.rawcolliderset_coVertices(C, this.__wbg_ptr, A);
359
- var I = EA().getInt32(C + 0, !0), g = EA().getInt32(C + 4, !0);
359
+ var I = oA().getInt32(C + 0, !0), g = oA().getInt32(C + 4, !0);
360
360
  let Q;
361
361
  return I !== 0 && (Q = sg(I, g).slice(), B.__wbindgen_export_1(I, 4 * g, 4)), Q;
362
362
  } finally {
@@ -367,7 +367,7 @@ class _ {
367
367
  try {
368
368
  const C = B.__wbindgen_add_to_stack_pointer(-16);
369
369
  B.rawcolliderset_coIndices(C, this.__wbg_ptr, A);
370
- var I = EA().getInt32(C + 0, !0), g = EA().getInt32(C + 4, !0);
370
+ var I = oA().getInt32(C + 0, !0), g = oA().getInt32(C + 4, !0);
371
371
  let Q;
372
372
  return I !== 0 && (Q = function(E, D) {
373
373
  return E >>>= 0, Zg().subarray(E / 4, E / 4 + D);
@@ -384,7 +384,7 @@ class _ {
384
384
  try {
385
385
  const C = B.__wbindgen_add_to_stack_pointer(-16);
386
386
  B.rawcolliderset_coHeightfieldHeights(C, this.__wbg_ptr, A);
387
- var I = EA().getInt32(C + 0, !0), g = EA().getInt32(C + 4, !0);
387
+ var I = oA().getInt32(C + 0, !0), g = oA().getInt32(C + 4, !0);
388
388
  let Q;
389
389
  return I !== 0 && (Q = sg(I, g).slice(), B.__wbindgen_export_1(I, 4 * g, 4)), Q;
390
390
  } finally {
@@ -399,7 +399,7 @@ class _ {
399
399
  try {
400
400
  const C = B.__wbindgen_add_to_stack_pointer(-16);
401
401
  B.rawcolliderset_coParent(C, this.__wbg_ptr, A);
402
- var I = EA().getInt32(C + 0, !0), g = EA().getFloat64(C + 8, !0);
402
+ var I = oA().getInt32(C + 0, !0), g = oA().getFloat64(C + 8, !0);
403
403
  return I === 0 ? void 0 : g;
404
404
  } finally {
405
405
  B.__wbindgen_add_to_stack_pointer(16);
@@ -451,23 +451,23 @@ class _ {
451
451
  return B.rawcolliderset_coContactForceEventThreshold(this.__wbg_ptr, A);
452
452
  }
453
453
  coContainsPoint(A, I) {
454
- return h(I, a), B.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
454
+ return s(I, a), B.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
455
455
  }
456
456
  coCastShape(A, I, g, C, Q, E, D, o, w) {
457
- h(I, a), h(g, Y), h(C, a), h(Q, b), h(E, a);
458
- const G = B.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D, o, w);
459
- return G === 0 ? void 0 : MI.__wrap(G);
457
+ s(I, a), s(g, r), s(C, a), s(Q, b), s(E, a);
458
+ const h = B.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D, o, w);
459
+ return h === 0 ? void 0 : MI.__wrap(h);
460
460
  }
461
461
  coCastCollider(A, I, g, C, Q, E, D) {
462
- h(I, a), h(C, a);
462
+ s(I, a), s(C, a);
463
463
  const o = B.rawcolliderset_coCastCollider(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, Q, E, D);
464
464
  return o === 0 ? void 0 : aI.__wrap(o);
465
465
  }
466
466
  coIntersectsShape(A, I, g, C) {
467
- return h(I, Y), h(g, a), h(C, b), B.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr) !== 0;
467
+ return s(I, r), s(g, a), s(C, b), B.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr) !== 0;
468
468
  }
469
469
  coContactShape(A, I, g, C, Q) {
470
- h(I, Y), h(g, a), h(C, b);
470
+ s(I, r), s(g, a), s(C, b);
471
471
  const E = B.rawcolliderset_coContactShape(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q);
472
472
  return E === 0 ? void 0 : AI.__wrap(E);
473
473
  }
@@ -476,18 +476,18 @@ class _ {
476
476
  return C === 0 ? void 0 : AI.__wrap(C);
477
477
  }
478
478
  coProjectPoint(A, I, g) {
479
- h(I, a);
479
+ s(I, a);
480
480
  const C = B.rawcolliderset_coProjectPoint(this.__wbg_ptr, A, I.__wbg_ptr, g);
481
481
  return kI.__wrap(C);
482
482
  }
483
483
  coIntersectsRay(A, I, g, C) {
484
- return h(I, a), h(g, a), B.rawcolliderset_coIntersectsRay(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C) !== 0;
484
+ return s(I, a), s(g, a), B.rawcolliderset_coIntersectsRay(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C) !== 0;
485
485
  }
486
486
  coCastRay(A, I, g, C, Q) {
487
- return h(I, a), h(g, a), B.rawcolliderset_coCastRay(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, Q);
487
+ return s(I, a), s(g, a), B.rawcolliderset_coCastRay(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, Q);
488
488
  }
489
489
  coCastRayAndGetNormal(A, I, g, C, Q) {
490
- h(I, a), h(g, a);
490
+ s(I, a), s(g, a);
491
491
  const E = B.rawcolliderset_coCastRayAndGetNormal(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, Q);
492
492
  return E === 0 ? void 0 : FI.__wrap(E);
493
493
  }
@@ -528,7 +528,7 @@ class _ {
528
528
  B.rawcolliderset_coSetActiveCollisionTypes(this.__wbg_ptr, A, I);
529
529
  }
530
530
  coSetShape(A, I) {
531
- h(I, Y), B.rawcolliderset_coSetShape(this.__wbg_ptr, A, I.__wbg_ptr);
531
+ s(I, r), B.rawcolliderset_coSetShape(this.__wbg_ptr, A, I.__wbg_ptr);
532
532
  }
533
533
  coSetContactForceEventThreshold(A, I) {
534
534
  B.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr, A, I);
@@ -540,7 +540,7 @@ class _ {
540
540
  B.rawcolliderset_coSetMass(this.__wbg_ptr, A, I);
541
541
  }
542
542
  coSetMassProperties(A, I, g, C) {
543
- h(g, a), B.rawcolliderset_coSetMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, C);
543
+ s(g, a), B.rawcolliderset_coSetMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, C);
544
544
  }
545
545
  constructor() {
546
546
  const A = B.rawcolliderset_new();
@@ -552,25 +552,25 @@ class _ {
552
552
  contains(A) {
553
553
  return B.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
554
554
  }
555
- createCollider(A, I, g, C, Q, E, D, o, w, G, s, K, S, J, k, y, F, M, U, R, n, e, l, d) {
555
+ createCollider(A, I, g, C, Q, E, D, o, w, h, G, S, K, J, F, y, k, M, U, R, Y, L, l, d) {
556
556
  try {
557
- const oA = B.__wbindgen_add_to_stack_pointer(-16);
558
- h(I, Y), h(g, a), h(C, b), h(D, a), h(d, u), B.rawcolliderset_createCollider(oA, this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, E, D.__wbg_ptr, o, w, G, s, K, S, J, k, y, F, M, U, R, n, e, l, d.__wbg_ptr);
559
- var r = EA().getInt32(oA + 0, !0), $ = EA().getFloat64(oA + 8, !0);
560
- return r === 0 ? void 0 : $;
557
+ const hA = B.__wbindgen_add_to_stack_pointer(-16);
558
+ s(I, r), s(g, a), s(C, b), s(D, a), s(d, v), B.rawcolliderset_createCollider(hA, this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, E, D.__wbg_ptr, o, w, h, G, S, K, J, F, y, k, M, U, R, Y, L, l, d.__wbg_ptr);
559
+ var n = oA().getInt32(hA + 0, !0), IA = oA().getFloat64(hA + 8, !0);
560
+ return n === 0 ? void 0 : IA;
561
561
  } finally {
562
562
  B.__wbindgen_add_to_stack_pointer(16);
563
563
  }
564
564
  }
565
565
  remove(A, I, g, C) {
566
- h(I, YA), h(g, u), B.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
566
+ s(I, rA), s(g, v), B.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
567
567
  }
568
568
  isHandleValid(A) {
569
569
  return B.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
570
570
  }
571
571
  forEachColliderHandle(A) {
572
572
  try {
573
- B.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, P(A));
573
+ B.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, $(A));
574
574
  } finally {
575
575
  f[X++] = void 0;
576
576
  }
@@ -791,7 +791,7 @@ class RC {
791
791
  }
792
792
  render(A, I, g, C, Q, E, D) {
793
793
  try {
794
- h(A, u), h(I, _), h(g, tA), h(C, LA), h(Q, gA), B.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, P(D));
794
+ s(A, v), s(I, gA), s(g, eA), s(C, qA), s(Q, BA), B.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, $(D));
795
795
  } finally {
796
796
  f[X++] = void 0;
797
797
  }
@@ -820,41 +820,41 @@ class PI {
820
820
  }
821
821
  takeIntegrationParameters() {
822
822
  const A = B.rawdeserializedworld_takeIntegrationParameters(this.__wbg_ptr);
823
- return A === 0 ? void 0 : TA.__wrap(A);
823
+ return A === 0 ? void 0 : ZA.__wrap(A);
824
824
  }
825
825
  takeIslandManager() {
826
826
  const A = B.rawdeserializedworld_takeIslandManager(this.__wbg_ptr);
827
- return A === 0 ? void 0 : YA.__wrap(A);
827
+ return A === 0 ? void 0 : rA.__wrap(A);
828
828
  }
829
829
  takeBroadPhase() {
830
830
  const A = B.rawdeserializedworld_takeBroadPhase(this.__wbg_ptr);
831
- return A === 0 ? void 0 : HA.__wrap(A);
831
+ return A === 0 ? void 0 : dA.__wrap(A);
832
832
  }
833
833
  takeNarrowPhase() {
834
834
  const A = B.rawdeserializedworld_takeNarrowPhase(this.__wbg_ptr);
835
- return A === 0 ? void 0 : gA.__wrap(A);
835
+ return A === 0 ? void 0 : BA.__wrap(A);
836
836
  }
837
837
  takeBodies() {
838
838
  const A = B.rawdeserializedworld_takeBodies(this.__wbg_ptr);
839
- return A === 0 ? void 0 : u.__wrap(A);
839
+ return A === 0 ? void 0 : v.__wrap(A);
840
840
  }
841
841
  takeColliders() {
842
842
  const A = B.rawdeserializedworld_takeColliders(this.__wbg_ptr);
843
- return A === 0 ? void 0 : _.__wrap(A);
843
+ return A === 0 ? void 0 : gA.__wrap(A);
844
844
  }
845
845
  takeImpulseJoints() {
846
846
  const A = B.rawdeserializedworld_takeImpulseJoints(this.__wbg_ptr);
847
- return A === 0 ? void 0 : tA.__wrap(A);
847
+ return A === 0 ? void 0 : eA.__wrap(A);
848
848
  }
849
849
  takeMultibodyJoints() {
850
850
  const A = B.rawdeserializedworld_takeMultibodyJoints(this.__wbg_ptr);
851
- return A === 0 ? void 0 : LA.__wrap(A);
851
+ return A === 0 ? void 0 : qA.__wrap(A);
852
852
  }
853
853
  }
854
854
  const Jg = typeof FinalizationRegistry > "u" ? { register: () => {
855
855
  }, unregister: () => {
856
856
  } } : new FinalizationRegistry((i) => B.__wbg_raweventqueue_free(i >>> 0, 1));
857
- class Wg {
857
+ class Og {
858
858
  __destroy_into_raw() {
859
859
  const A = this.__wbg_ptr;
860
860
  return this.__wbg_ptr = 0, Jg.unregister(this), A;
@@ -869,14 +869,14 @@ class Wg {
869
869
  }
870
870
  drainCollisionEvents(A) {
871
871
  try {
872
- B.raweventqueue_drainCollisionEvents(this.__wbg_ptr, P(A));
872
+ B.raweventqueue_drainCollisionEvents(this.__wbg_ptr, $(A));
873
873
  } finally {
874
874
  f[X++] = void 0;
875
875
  }
876
876
  }
877
877
  drainContactForceEvents(A) {
878
878
  try {
879
- B.raweventqueue_drainContactForceEvents(this.__wbg_ptr, P(A));
879
+ B.raweventqueue_drainContactForceEvents(this.__wbg_ptr, $(A));
880
880
  } finally {
881
881
  f[X++] = void 0;
882
882
  }
@@ -888,10 +888,10 @@ class Wg {
888
888
  const Ug = typeof FinalizationRegistry > "u" ? { register: () => {
889
889
  }, unregister: () => {
890
890
  } } : new FinalizationRegistry((i) => B.__wbg_rawgenericjoint_free(i >>> 0, 1));
891
- class sA {
891
+ class SA {
892
892
  static __wrap(A) {
893
893
  A >>>= 0;
894
- const I = Object.create(sA.prototype);
894
+ const I = Object.create(SA.prototype);
895
895
  return I.__wbg_ptr = A, Ug.register(I, I.__wbg_ptr, I), I;
896
896
  }
897
897
  __destroy_into_raw() {
@@ -903,38 +903,38 @@ class sA {
903
903
  B.__wbg_rawgenericjoint_free(A, 0);
904
904
  }
905
905
  static spring(A, I, g, C, Q) {
906
- h(C, a), h(Q, a);
906
+ s(C, a), s(Q, a);
907
907
  const E = B.rawgenericjoint_spring(A, I, g, C.__wbg_ptr, Q.__wbg_ptr);
908
- return sA.__wrap(E);
908
+ return SA.__wrap(E);
909
909
  }
910
910
  static rope(A, I, g) {
911
- h(I, a), h(g, a);
911
+ s(I, a), s(g, a);
912
912
  const C = B.rawgenericjoint_rope(A, I.__wbg_ptr, g.__wbg_ptr);
913
- return sA.__wrap(C);
913
+ return SA.__wrap(C);
914
914
  }
915
915
  static prismatic(A, I, g, C, Q, E) {
916
- h(A, a), h(I, a), h(g, a);
916
+ s(A, a), s(I, a), s(g, a);
917
917
  const D = B.rawgenericjoint_prismatic(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C, Q, E);
918
- return D === 0 ? void 0 : sA.__wrap(D);
918
+ return D === 0 ? void 0 : SA.__wrap(D);
919
919
  }
920
920
  static fixed(A, I, g, C) {
921
- h(A, a), h(I, b), h(g, a), h(C, b);
921
+ s(A, a), s(I, b), s(g, a), s(C, b);
922
922
  const Q = B.rawgenericjoint_fixed(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr);
923
- return sA.__wrap(Q);
923
+ return SA.__wrap(Q);
924
924
  }
925
925
  static revolute(A, I) {
926
- h(A, a), h(I, a);
926
+ s(A, a), s(I, a);
927
927
  const g = B.rawgenericjoint_revolute(A.__wbg_ptr, I.__wbg_ptr);
928
- return g === 0 ? void 0 : sA.__wrap(g);
928
+ return g === 0 ? void 0 : SA.__wrap(g);
929
929
  }
930
930
  }
931
931
  const LI = typeof FinalizationRegistry > "u" ? { register: () => {
932
932
  }, unregister: () => {
933
933
  } } : new FinalizationRegistry((i) => B.__wbg_rawimpulsejointset_free(i >>> 0, 1));
934
- class tA {
934
+ class eA {
935
935
  static __wrap(A) {
936
936
  A >>>= 0;
937
- const I = Object.create(tA.prototype);
937
+ const I = Object.create(eA.prototype);
938
938
  return I.__wbg_ptr = A, LI.register(I, I.__wbg_ptr, I), I;
939
939
  }
940
940
  __destroy_into_raw() {
@@ -971,10 +971,10 @@ class tA {
971
971
  return a.__wrap(I);
972
972
  }
973
973
  jointSetAnchor1(A, I) {
974
- h(I, a), B.rawimpulsejointset_jointSetAnchor1(this.__wbg_ptr, A, I.__wbg_ptr);
974
+ s(I, a), B.rawimpulsejointset_jointSetAnchor1(this.__wbg_ptr, A, I.__wbg_ptr);
975
975
  }
976
976
  jointSetAnchor2(A, I) {
977
- h(I, a), B.rawimpulsejointset_jointSetAnchor2(this.__wbg_ptr, A, I.__wbg_ptr);
977
+ s(I, a), B.rawimpulsejointset_jointSetAnchor2(this.__wbg_ptr, A, I.__wbg_ptr);
978
978
  }
979
979
  jointContactsEnabled(A) {
980
980
  return B.rawimpulsejointset_jointContactsEnabled(this.__wbg_ptr, A) !== 0;
@@ -1011,7 +1011,7 @@ class tA {
1011
1011
  return this.__wbg_ptr = A >>> 0, LI.register(this, this.__wbg_ptr, this), this;
1012
1012
  }
1013
1013
  createJoint(A, I, g, C) {
1014
- return h(A, sA), B.rawimpulsejointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, C);
1014
+ return s(A, SA), B.rawimpulsejointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, C);
1015
1015
  }
1016
1016
  remove(A, I) {
1017
1017
  B.rawimpulsejointset_remove(this.__wbg_ptr, A, I);
@@ -1024,14 +1024,14 @@ class tA {
1024
1024
  }
1025
1025
  forEachJointHandle(A) {
1026
1026
  try {
1027
- B.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, P(A));
1027
+ B.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, $(A));
1028
1028
  } finally {
1029
1029
  f[X++] = void 0;
1030
1030
  }
1031
1031
  }
1032
1032
  forEachJointAttachedToRigidBody(A, I) {
1033
1033
  try {
1034
- B.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, P(I));
1034
+ B.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, $(I));
1035
1035
  } finally {
1036
1036
  f[X++] = void 0;
1037
1037
  }
@@ -1040,10 +1040,10 @@ class tA {
1040
1040
  const eI = typeof FinalizationRegistry > "u" ? { register: () => {
1041
1041
  }, unregister: () => {
1042
1042
  } } : new FinalizationRegistry((i) => B.__wbg_rawintegrationparameters_free(i >>> 0, 1));
1043
- class TA {
1043
+ class ZA {
1044
1044
  static __wrap(A) {
1045
1045
  A >>>= 0;
1046
- const I = Object.create(TA.prototype);
1046
+ const I = Object.create(ZA.prototype);
1047
1047
  return I.__wbg_ptr = A, eI.register(I, I.__wbg_ptr, I), I;
1048
1048
  }
1049
1049
  __destroy_into_raw() {
@@ -1116,10 +1116,10 @@ class TA {
1116
1116
  const rI = typeof FinalizationRegistry > "u" ? { register: () => {
1117
1117
  }, unregister: () => {
1118
1118
  } } : new FinalizationRegistry((i) => B.__wbg_rawislandmanager_free(i >>> 0, 1));
1119
- class YA {
1119
+ class rA {
1120
1120
  static __wrap(A) {
1121
1121
  A >>>= 0;
1122
- const I = Object.create(YA.prototype);
1122
+ const I = Object.create(rA.prototype);
1123
1123
  return I.__wbg_ptr = A, rI.register(I, I.__wbg_ptr, I), I;
1124
1124
  }
1125
1125
  __destroy_into_raw() {
@@ -1136,7 +1136,7 @@ class YA {
1136
1136
  }
1137
1137
  forEachActiveRigidBodyHandle(A) {
1138
1138
  try {
1139
- B.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, P(A));
1139
+ B.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, $(A));
1140
1140
  } finally {
1141
1141
  f[X++] = void 0;
1142
1142
  }
@@ -1163,7 +1163,7 @@ class cC {
1163
1163
  return a.__wrap(A);
1164
1164
  }
1165
1165
  setUp(A) {
1166
- h(A, a), B.rawkinematiccharactercontroller_setUp(this.__wbg_ptr, A.__wbg_ptr);
1166
+ s(A, a), B.rawkinematiccharactercontroller_setUp(this.__wbg_ptr, A.__wbg_ptr);
1167
1167
  }
1168
1168
  normalNudgeFactor() {
1169
1169
  return B.rawkinematiccharactercontroller_normalNudgeFactor(this.__wbg_ptr);
@@ -1229,9 +1229,9 @@ class cC {
1229
1229
  snapToGroundEnabled() {
1230
1230
  return B.rawkinematiccharactercontroller_snapToGroundEnabled(this.__wbg_ptr) !== 0;
1231
1231
  }
1232
- computeColliderMovement(A, I, g, C, Q, E, D, o, w, G, s, K) {
1232
+ computeColliderMovement(A, I, g, C, Q, E, D, o, w, h, G, S) {
1233
1233
  try {
1234
- h(I, HA), h(g, gA), h(C, u), h(Q, _), h(D, a), B.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D.__wbg_ptr, o, c(w) ? 4294967297 : Math.fround(w), G, c(s) ? 4294967297 : s >>> 0, P(K));
1234
+ s(I, dA), s(g, BA), s(C, v), s(Q, gA), s(D, a), B.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E, D.__wbg_ptr, o, t(w) ? 4294967297 : Math.fround(w), h, t(G) ? 4294967297 : G >>> 0, $(S));
1235
1235
  } finally {
1236
1236
  f[X++] = void 0;
1237
1237
  }
@@ -1247,16 +1247,16 @@ class cC {
1247
1247
  return B.rawkinematiccharactercontroller_numComputedCollisions(this.__wbg_ptr) >>> 0;
1248
1248
  }
1249
1249
  computedCollision(A, I) {
1250
- return h(I, Og), B.rawkinematiccharactercontroller_computedCollision(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
1250
+ return s(I, Wg), B.rawkinematiccharactercontroller_computedCollision(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
1251
1251
  }
1252
1252
  }
1253
1253
  const qI = typeof FinalizationRegistry > "u" ? { register: () => {
1254
1254
  }, unregister: () => {
1255
1255
  } } : new FinalizationRegistry((i) => B.__wbg_rawmultibodyjointset_free(i >>> 0, 1));
1256
- class LA {
1256
+ class qA {
1257
1257
  static __wrap(A) {
1258
1258
  A >>>= 0;
1259
- const I = Object.create(LA.prototype);
1259
+ const I = Object.create(qA.prototype);
1260
1260
  return I.__wbg_ptr = A, qI.register(I, I.__wbg_ptr, I), I;
1261
1261
  }
1262
1262
  __destroy_into_raw() {
@@ -1306,7 +1306,7 @@ class LA {
1306
1306
  return this.__wbg_ptr = A >>> 0, qI.register(this, this.__wbg_ptr, this), this;
1307
1307
  }
1308
1308
  createJoint(A, I, g, C) {
1309
- return h(A, sA), B.rawmultibodyjointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, C);
1309
+ return s(A, SA), B.rawmultibodyjointset_createJoint(this.__wbg_ptr, A.__wbg_ptr, I, g, C);
1310
1310
  }
1311
1311
  remove(A, I) {
1312
1312
  B.rawmultibodyjointset_remove(this.__wbg_ptr, A, I);
@@ -1316,14 +1316,14 @@ class LA {
1316
1316
  }
1317
1317
  forEachJointHandle(A) {
1318
1318
  try {
1319
- B.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, P(A));
1319
+ B.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, $(A));
1320
1320
  } finally {
1321
1321
  f[X++] = void 0;
1322
1322
  }
1323
1323
  }
1324
1324
  forEachJointAttachedToRigidBody(A, I) {
1325
1325
  try {
1326
- B.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, P(I));
1326
+ B.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, $(I));
1327
1327
  } finally {
1328
1328
  f[X++] = void 0;
1329
1329
  }
@@ -1332,10 +1332,10 @@ class LA {
1332
1332
  const lI = typeof FinalizationRegistry > "u" ? { register: () => {
1333
1333
  }, unregister: () => {
1334
1334
  } } : new FinalizationRegistry((i) => B.__wbg_rawnarrowphase_free(i >>> 0, 1));
1335
- class gA {
1335
+ class BA {
1336
1336
  static __wrap(A) {
1337
1337
  A >>>= 0;
1338
- const I = Object.create(gA.prototype);
1338
+ const I = Object.create(BA.prototype);
1339
1339
  return I.__wbg_ptr = A, lI.register(I, I.__wbg_ptr, I), I;
1340
1340
  }
1341
1341
  __destroy_into_raw() {
@@ -1351,14 +1351,14 @@ class gA {
1351
1351
  return this.__wbg_ptr = A >>> 0, lI.register(this, this.__wbg_ptr, this), this;
1352
1352
  }
1353
1353
  contact_pairs_with(A, I) {
1354
- B.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, j(I));
1354
+ B.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, x(I));
1355
1355
  }
1356
1356
  contact_pair(A, I) {
1357
1357
  const g = B.rawnarrowphase_contact_pair(this.__wbg_ptr, A, I);
1358
1358
  return g === 0 ? void 0 : VI.__wrap(g);
1359
1359
  }
1360
1360
  intersection_pairs_with(A, I) {
1361
- B.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A, j(I));
1361
+ B.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A, x(I));
1362
1362
  }
1363
1363
  intersection_pair(A, I) {
1364
1364
  return B.rawnarrowphase_intersection_pair(this.__wbg_ptr, A, I) !== 0;
@@ -1434,11 +1434,11 @@ class tC {
1434
1434
  timing_user_changes() {
1435
1435
  return B.rawphysicspipeline_timing_user_changes(this.__wbg_ptr);
1436
1436
  }
1437
- step(A, I, g, C, Q, E, D, o, w, G) {
1438
- h(A, a), h(I, TA), h(g, YA), h(C, HA), h(Q, gA), h(E, u), h(D, _), h(o, tA), h(w, LA), h(G, fI), B.rawphysicspipeline_step(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o.__wbg_ptr, w.__wbg_ptr, G.__wbg_ptr);
1437
+ step(A, I, g, C, Q, E, D, o, w, h) {
1438
+ s(A, a), s(I, ZA), s(g, rA), s(C, dA), s(Q, BA), s(E, v), s(D, gA), s(o, eA), s(w, qA), s(h, fI), B.rawphysicspipeline_step(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o.__wbg_ptr, w.__wbg_ptr, h.__wbg_ptr);
1439
1439
  }
1440
- stepWithEvents(A, I, g, C, Q, E, D, o, w, G, s, K, S, J) {
1441
- h(A, a), h(I, TA), h(g, YA), h(C, HA), h(Q, gA), h(E, u), h(D, _), h(o, tA), h(w, LA), h(G, fI), h(s, Wg), B.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o.__wbg_ptr, w.__wbg_ptr, G.__wbg_ptr, s.__wbg_ptr, j(K), j(S), j(J));
1440
+ stepWithEvents(A, I, g, C, Q, E, D, o, w, h, G, S, K, J) {
1441
+ s(A, a), s(I, ZA), s(g, rA), s(C, dA), s(Q, BA), s(E, v), s(D, gA), s(o, eA), s(w, qA), s(h, fI), s(G, Og), B.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o.__wbg_ptr, w.__wbg_ptr, h.__wbg_ptr, G.__wbg_ptr, x(S), x(K), x(J));
1442
1442
  }
1443
1443
  }
1444
1444
  const tg = typeof FinalizationRegistry > "u" ? { register: () => {
@@ -1473,18 +1473,18 @@ class YC {
1473
1473
  B.rawpidcontroller_reset_integrals(this.__wbg_ptr);
1474
1474
  }
1475
1475
  apply_linear_correction(A, I, g, C, Q) {
1476
- h(I, u), h(C, a), h(Q, a), B.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, Q.__wbg_ptr);
1476
+ s(I, v), s(C, a), s(Q, a), B.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, Q.__wbg_ptr);
1477
1477
  }
1478
1478
  apply_angular_correction(A, I, g, C, Q) {
1479
- h(I, u), B.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C, Q);
1479
+ s(I, v), B.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C, Q);
1480
1480
  }
1481
1481
  linear_correction(A, I, g, C, Q) {
1482
- h(I, u), h(C, a), h(Q, a);
1482
+ s(I, v), s(C, a), s(Q, a);
1483
1483
  const E = B.rawpidcontroller_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C.__wbg_ptr, Q.__wbg_ptr);
1484
1484
  return a.__wrap(E);
1485
1485
  }
1486
1486
  angular_correction(A, I, g, C, Q) {
1487
- return h(I, u), B.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C, Q);
1487
+ return s(I, v), B.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, g, C, Q);
1488
1488
  }
1489
1489
  }
1490
1490
  const Yg = typeof FinalizationRegistry > "u" ? { register: () => {
@@ -1641,10 +1641,10 @@ class FI {
1641
1641
  const nI = typeof FinalizationRegistry > "u" ? { register: () => {
1642
1642
  }, unregister: () => {
1643
1643
  } } : new FinalizationRegistry((i) => B.__wbg_rawrigidbodyset_free(i >>> 0, 1));
1644
- class u {
1644
+ class v {
1645
1645
  static __wrap(A) {
1646
1646
  A >>>= 0;
1647
- const I = Object.create(u.prototype);
1647
+ const I = Object.create(v.prototype);
1648
1648
  return I.__wbg_ptr = A, nI.register(I, I.__wbg_ptr, I), I;
1649
1649
  }
1650
1650
  __destroy_into_raw() {
@@ -1687,7 +1687,7 @@ class u {
1687
1687
  B.rawrigidbodyset_rbSetRotation(this.__wbg_ptr, A, I, g);
1688
1688
  }
1689
1689
  rbSetLinvel(A, I, g) {
1690
- h(I, a), B.rawrigidbodyset_rbSetLinvel(this.__wbg_ptr, A, I.__wbg_ptr, g);
1690
+ s(I, a), B.rawrigidbodyset_rbSetLinvel(this.__wbg_ptr, A, I.__wbg_ptr, g);
1691
1691
  }
1692
1692
  rbSetAngvel(A, I, g) {
1693
1693
  B.rawrigidbodyset_rbSetAngvel(this.__wbg_ptr, A, I, g);
@@ -1699,13 +1699,13 @@ class u {
1699
1699
  B.rawrigidbodyset_rbSetNextKinematicRotation(this.__wbg_ptr, A, I);
1700
1700
  }
1701
1701
  rbRecomputeMassPropertiesFromColliders(A, I) {
1702
- h(I, _), B.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr, A, I.__wbg_ptr);
1702
+ s(I, gA), B.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr, A, I.__wbg_ptr);
1703
1703
  }
1704
1704
  rbSetAdditionalMass(A, I, g) {
1705
1705
  B.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr, A, I, g);
1706
1706
  }
1707
1707
  rbSetAdditionalMassProperties(A, I, g, C, Q) {
1708
- h(g, a), B.rawrigidbodyset_rbSetAdditionalMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, C, Q);
1708
+ s(g, a), B.rawrigidbodyset_rbSetAdditionalMassProperties(this.__wbg_ptr, A, I, g.__wbg_ptr, C, Q);
1709
1709
  }
1710
1710
  rbLinvel(A) {
1711
1711
  const I = B.rawrigidbodyset_rbLinvel(this.__wbg_ptr, A);
@@ -1715,7 +1715,7 @@ class u {
1715
1715
  return B.rawrigidbodyset_rbAngvel(this.__wbg_ptr, A);
1716
1716
  }
1717
1717
  rbVelocityAtPoint(A, I) {
1718
- h(I, a);
1718
+ s(I, a);
1719
1719
  const g = B.rawrigidbodyset_rbVelocityAtPoint(this.__wbg_ptr, A, I.__wbg_ptr);
1720
1720
  return a.__wrap(g);
1721
1721
  }
@@ -1831,10 +1831,10 @@ class u {
1831
1831
  B.rawrigidbodyset_rbResetTorques(this.__wbg_ptr, A, I);
1832
1832
  }
1833
1833
  rbAddForce(A, I, g) {
1834
- h(I, a), B.rawrigidbodyset_rbAddForce(this.__wbg_ptr, A, I.__wbg_ptr, g);
1834
+ s(I, a), B.rawrigidbodyset_rbAddForce(this.__wbg_ptr, A, I.__wbg_ptr, g);
1835
1835
  }
1836
1836
  rbApplyImpulse(A, I, g) {
1837
- h(I, a), B.rawrigidbodyset_rbApplyImpulse(this.__wbg_ptr, A, I.__wbg_ptr, g);
1837
+ s(I, a), B.rawrigidbodyset_rbApplyImpulse(this.__wbg_ptr, A, I.__wbg_ptr, g);
1838
1838
  }
1839
1839
  rbAddTorque(A, I, g) {
1840
1840
  B.rawrigidbodyset_rbAddTorque(this.__wbg_ptr, A, I, g);
@@ -1843,10 +1843,10 @@ class u {
1843
1843
  B.rawrigidbodyset_rbApplyTorqueImpulse(this.__wbg_ptr, A, I, g);
1844
1844
  }
1845
1845
  rbAddForceAtPoint(A, I, g, C) {
1846
- h(I, a), h(g, a), B.rawrigidbodyset_rbAddForceAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
1846
+ s(I, a), s(g, a), B.rawrigidbodyset_rbAddForceAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
1847
1847
  }
1848
1848
  rbApplyImpulseAtPoint(A, I, g, C) {
1849
- h(I, a), h(g, a), B.rawrigidbodyset_rbApplyImpulseAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
1849
+ s(I, a), s(g, a), B.rawrigidbodyset_rbApplyImpulseAtPoint(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C);
1850
1850
  }
1851
1851
  rbAdditionalSolverIterations(A) {
1852
1852
  return B.rawrigidbodyset_rbAdditionalSolverIterations(this.__wbg_ptr, A) >>> 0;
@@ -1871,11 +1871,11 @@ class u {
1871
1871
  const A = B.rawrigidbodyset_new();
1872
1872
  return this.__wbg_ptr = A >>> 0, nI.register(this, this.__wbg_ptr, this), this;
1873
1873
  }
1874
- createRigidBody(A, I, g, C, Q, E, D, o, w, G, s, K, S, J, k, y, F, M, U, R, n, e) {
1875
- return h(I, a), h(g, b), h(D, a), h(o, a), B.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, Q, E, D.__wbg_ptr, o.__wbg_ptr, w, G, s, K, S, J, k, y, F, M, U, R, n, e);
1874
+ createRigidBody(A, I, g, C, Q, E, D, o, w, h, G, S, K, J, F, y, k, M, U, R, Y, L) {
1875
+ return s(I, a), s(g, b), s(D, a), s(o, a), B.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C, Q, E, D.__wbg_ptr, o.__wbg_ptr, w, h, G, S, K, J, F, y, k, M, U, R, Y, L);
1876
1876
  }
1877
1877
  remove(A, I, g, C, Q) {
1878
- h(I, YA), h(g, _), h(C, tA), h(Q, LA), B.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr);
1878
+ s(I, rA), s(g, gA), s(C, eA), s(Q, qA), B.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr);
1879
1879
  }
1880
1880
  len() {
1881
1881
  return B.rawrigidbodyset_len(this.__wbg_ptr) >>> 0;
@@ -1885,13 +1885,13 @@ class u {
1885
1885
  }
1886
1886
  forEachRigidBodyHandle(A) {
1887
1887
  try {
1888
- B.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, P(A));
1888
+ B.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, $(A));
1889
1889
  } finally {
1890
1890
  f[X++] = void 0;
1891
1891
  }
1892
1892
  }
1893
1893
  propagateModifiedBodyPositionsToColliders(A) {
1894
- h(A, _), B.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, A.__wbg_ptr);
1894
+ s(A, gA), B.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, A.__wbg_ptr);
1895
1895
  }
1896
1896
  }
1897
1897
  const lg = typeof FinalizationRegistry > "u" ? { register: () => {
@@ -1946,20 +1946,20 @@ class LC {
1946
1946
  return this.__wbg_ptr = A >>> 0, ng.register(this, this.__wbg_ptr, this), this;
1947
1947
  }
1948
1948
  serializeAll(A, I, g, C, Q, E, D, o, w) {
1949
- return h(A, a), h(I, TA), h(g, YA), h(C, HA), h(Q, gA), h(E, u), h(D, _), h(o, tA), h(w, LA), oI(B.rawserializationpipeline_serializeAll(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o.__wbg_ptr, w.__wbg_ptr));
1949
+ return s(A, a), s(I, ZA), s(g, rA), s(C, dA), s(Q, BA), s(E, v), s(D, gA), s(o, eA), s(w, qA), oI(B.rawserializationpipeline_serializeAll(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o.__wbg_ptr, w.__wbg_ptr));
1950
1950
  }
1951
1951
  deserializeAll(A) {
1952
- const I = B.rawserializationpipeline_deserializeAll(this.__wbg_ptr, j(A));
1952
+ const I = B.rawserializationpipeline_deserializeAll(this.__wbg_ptr, x(A));
1953
1953
  return I === 0 ? void 0 : PI.__wrap(I);
1954
1954
  }
1955
1955
  }
1956
1956
  const Hg = typeof FinalizationRegistry > "u" ? { register: () => {
1957
1957
  }, unregister: () => {
1958
1958
  } } : new FinalizationRegistry((i) => B.__wbg_rawshape_free(i >>> 0, 1));
1959
- class Y {
1959
+ class r {
1960
1960
  static __wrap(A) {
1961
1961
  A >>>= 0;
1962
- const I = Object.create(Y.prototype);
1962
+ const I = Object.create(r.prototype);
1963
1963
  return I.__wbg_ptr = A, Hg.register(I, I.__wbg_ptr, I), I;
1964
1964
  }
1965
1965
  __destroy_into_raw() {
@@ -1972,109 +1972,109 @@ class Y {
1972
1972
  }
1973
1973
  static cuboid(A, I) {
1974
1974
  const g = B.rawshape_cuboid(A, I);
1975
- return Y.__wrap(g);
1975
+ return r.__wrap(g);
1976
1976
  }
1977
1977
  static roundCuboid(A, I, g) {
1978
1978
  const C = B.rawshape_roundCuboid(A, I, g);
1979
- return Y.__wrap(C);
1979
+ return r.__wrap(C);
1980
1980
  }
1981
1981
  static ball(A) {
1982
1982
  const I = B.rawshape_ball(A);
1983
- return Y.__wrap(I);
1983
+ return r.__wrap(I);
1984
1984
  }
1985
1985
  static halfspace(A) {
1986
- h(A, a);
1986
+ s(A, a);
1987
1987
  const I = B.rawshape_halfspace(A.__wbg_ptr);
1988
- return Y.__wrap(I);
1988
+ return r.__wrap(I);
1989
1989
  }
1990
1990
  static capsule(A, I) {
1991
1991
  const g = B.rawshape_capsule(A, I);
1992
- return Y.__wrap(g);
1992
+ return r.__wrap(g);
1993
1993
  }
1994
1994
  static voxels(A, I) {
1995
- h(A, a);
1996
- const g = cI(I, B.__wbindgen_export_2), C = NA, Q = B.rawshape_voxels(A.__wbg_ptr, g, C);
1997
- return Y.__wrap(Q);
1995
+ s(A, a);
1996
+ const g = cI(I, B.__wbindgen_export_2), C = yA, Q = B.rawshape_voxels(A.__wbg_ptr, g, C);
1997
+ return r.__wrap(Q);
1998
1998
  }
1999
1999
  static voxelsFromPoints(A, I) {
2000
- h(A, a);
2001
- const g = lA(I, B.__wbindgen_export_2), C = NA, Q = B.rawshape_voxelsFromPoints(A.__wbg_ptr, g, C);
2002
- return Y.__wrap(Q);
2000
+ s(A, a);
2001
+ const g = HA(I, B.__wbindgen_export_2), C = yA, Q = B.rawshape_voxelsFromPoints(A.__wbg_ptr, g, C);
2002
+ return r.__wrap(Q);
2003
2003
  }
2004
2004
  static polyline(A, I) {
2005
- const g = lA(A, B.__wbindgen_export_2), C = NA, Q = cI(I, B.__wbindgen_export_2), E = NA, D = B.rawshape_polyline(g, C, Q, E);
2006
- return Y.__wrap(D);
2005
+ const g = HA(A, B.__wbindgen_export_2), C = yA, Q = cI(I, B.__wbindgen_export_2), E = yA, D = B.rawshape_polyline(g, C, Q, E);
2006
+ return r.__wrap(D);
2007
2007
  }
2008
2008
  static trimesh(A, I, g) {
2009
- const C = lA(A, B.__wbindgen_export_2), Q = NA, E = cI(I, B.__wbindgen_export_2), D = NA, o = B.rawshape_trimesh(C, Q, E, D, g);
2010
- return o === 0 ? void 0 : Y.__wrap(o);
2009
+ const C = HA(A, B.__wbindgen_export_2), Q = yA, E = cI(I, B.__wbindgen_export_2), D = yA, o = B.rawshape_trimesh(C, Q, E, D, g);
2010
+ return o === 0 ? void 0 : r.__wrap(o);
2011
2011
  }
2012
2012
  static heightfield(A, I) {
2013
- const g = lA(A, B.__wbindgen_export_2), C = NA;
2014
- h(I, a);
2013
+ const g = HA(A, B.__wbindgen_export_2), C = yA;
2014
+ s(I, a);
2015
2015
  const Q = B.rawshape_heightfield(g, C, I.__wbg_ptr);
2016
- return Y.__wrap(Q);
2016
+ return r.__wrap(Q);
2017
2017
  }
2018
2018
  static segment(A, I) {
2019
- h(A, a), h(I, a);
2019
+ s(A, a), s(I, a);
2020
2020
  const g = B.rawshape_segment(A.__wbg_ptr, I.__wbg_ptr);
2021
- return Y.__wrap(g);
2021
+ return r.__wrap(g);
2022
2022
  }
2023
2023
  static triangle(A, I, g) {
2024
- h(A, a), h(I, a), h(g, a);
2024
+ s(A, a), s(I, a), s(g, a);
2025
2025
  const C = B.rawshape_triangle(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr);
2026
- return Y.__wrap(C);
2026
+ return r.__wrap(C);
2027
2027
  }
2028
2028
  static roundTriangle(A, I, g, C) {
2029
- h(A, a), h(I, a), h(g, a);
2029
+ s(A, a), s(I, a), s(g, a);
2030
2030
  const Q = B.rawshape_roundTriangle(A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C);
2031
- return Y.__wrap(Q);
2031
+ return r.__wrap(Q);
2032
2032
  }
2033
2033
  static convexHull(A) {
2034
- const I = lA(A, B.__wbindgen_export_2), g = NA, C = B.rawshape_convexHull(I, g);
2035
- return C === 0 ? void 0 : Y.__wrap(C);
2034
+ const I = HA(A, B.__wbindgen_export_2), g = yA, C = B.rawshape_convexHull(I, g);
2035
+ return C === 0 ? void 0 : r.__wrap(C);
2036
2036
  }
2037
2037
  static roundConvexHull(A, I) {
2038
- const g = lA(A, B.__wbindgen_export_2), C = NA, Q = B.rawshape_roundConvexHull(g, C, I);
2039
- return Q === 0 ? void 0 : Y.__wrap(Q);
2038
+ const g = HA(A, B.__wbindgen_export_2), C = yA, Q = B.rawshape_roundConvexHull(g, C, I);
2039
+ return Q === 0 ? void 0 : r.__wrap(Q);
2040
2040
  }
2041
2041
  static convexPolyline(A) {
2042
- const I = lA(A, B.__wbindgen_export_2), g = NA, C = B.rawshape_convexPolyline(I, g);
2043
- return C === 0 ? void 0 : Y.__wrap(C);
2042
+ const I = HA(A, B.__wbindgen_export_2), g = yA, C = B.rawshape_convexPolyline(I, g);
2043
+ return C === 0 ? void 0 : r.__wrap(C);
2044
2044
  }
2045
2045
  static roundConvexPolyline(A, I) {
2046
- const g = lA(A, B.__wbindgen_export_2), C = NA, Q = B.rawshape_roundConvexPolyline(g, C, I);
2047
- return Q === 0 ? void 0 : Y.__wrap(Q);
2046
+ const g = HA(A, B.__wbindgen_export_2), C = yA, Q = B.rawshape_roundConvexPolyline(g, C, I);
2047
+ return Q === 0 ? void 0 : r.__wrap(Q);
2048
2048
  }
2049
- castShape(A, I, g, C, Q, E, D, o, w, G) {
2050
- h(A, a), h(I, b), h(g, a), h(C, Y), h(Q, a), h(E, b), h(D, a);
2051
- const s = B.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o, w, G);
2052
- return s === 0 ? void 0 : MI.__wrap(s);
2049
+ castShape(A, I, g, C, Q, E, D, o, w, h) {
2050
+ s(A, a), s(I, b), s(g, a), s(C, r), s(Q, a), s(E, b), s(D, a);
2051
+ const G = B.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, D.__wbg_ptr, o, w, h);
2052
+ return G === 0 ? void 0 : MI.__wrap(G);
2053
2053
  }
2054
2054
  intersectsShape(A, I, g, C, Q) {
2055
- return h(A, a), h(I, b), h(g, Y), h(C, a), h(Q, b), B.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr) !== 0;
2055
+ return s(A, a), s(I, b), s(g, r), s(C, a), s(Q, b), B.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr) !== 0;
2056
2056
  }
2057
2057
  contactShape(A, I, g, C, Q, E) {
2058
- h(A, a), h(I, b), h(g, Y), h(C, a), h(Q, b);
2058
+ s(A, a), s(I, b), s(g, r), s(C, a), s(Q, b);
2059
2059
  const D = B.rawshape_contactShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q.__wbg_ptr, E);
2060
2060
  return D === 0 ? void 0 : AI.__wrap(D);
2061
2061
  }
2062
2062
  containsPoint(A, I, g) {
2063
- return h(A, a), h(I, b), h(g, a), B.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr) !== 0;
2063
+ return s(A, a), s(I, b), s(g, a), B.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr) !== 0;
2064
2064
  }
2065
2065
  projectPoint(A, I, g, C) {
2066
- h(A, a), h(I, b), h(g, a);
2066
+ s(A, a), s(I, b), s(g, a);
2067
2067
  const Q = B.rawshape_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C);
2068
2068
  return kI.__wrap(Q);
2069
2069
  }
2070
2070
  intersectsRay(A, I, g, C, Q) {
2071
- return h(A, a), h(I, b), h(g, a), h(C, a), B.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q) !== 0;
2071
+ return s(A, a), s(I, b), s(g, a), s(C, a), B.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q) !== 0;
2072
2072
  }
2073
2073
  castRay(A, I, g, C, Q, E) {
2074
- return h(A, a), h(I, b), h(g, a), h(C, a), B.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, E);
2074
+ return s(A, a), s(I, b), s(g, a), s(C, a), B.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, E);
2075
2075
  }
2076
2076
  castRayAndGetNormal(A, I, g, C, Q, E) {
2077
- h(A, a), h(I, b), h(g, a), h(C, a);
2077
+ s(A, a), s(I, b), s(g, a), s(C, a);
2078
2078
  const D = B.rawshape_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, g.__wbg_ptr, C.__wbg_ptr, Q, E);
2079
2079
  return D === 0 ? void 0 : FI.__wrap(D);
2080
2080
  }
@@ -2205,79 +2205,79 @@ async function jg(i) {
2205
2205
  const A = function() {
2206
2206
  const C = { wbg: {} };
2207
2207
  return C.wbg.__wbg_bind_c8359b1cba058168 = function(Q, E, D, o) {
2208
- return j(H(Q).bind(H(E), H(D), H(o)));
2208
+ return x(p(Q).bind(p(E), p(D), p(o)));
2209
2209
  }, C.wbg.__wbg_buffer_609cc3eee51ed158 = function(Q) {
2210
- return j(H(Q).buffer);
2210
+ return x(p(Q).buffer);
2211
2211
  }, C.wbg.__wbg_call_672a4d21634d4a24 = function() {
2212
2212
  return DI(function(Q, E) {
2213
- return j(H(Q).call(H(E)));
2213
+ return x(p(Q).call(p(E)));
2214
2214
  }, arguments);
2215
2215
  }, C.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
2216
2216
  return DI(function(Q, E, D) {
2217
- return j(H(Q).call(H(E), H(D)));
2217
+ return x(p(Q).call(p(E), p(D)));
2218
2218
  }, arguments);
2219
2219
  }, C.wbg.__wbg_call_833bed5770ea2041 = function() {
2220
2220
  return DI(function(Q, E, D, o) {
2221
- return j(H(Q).call(H(E), H(D), H(o)));
2221
+ return x(p(Q).call(p(E), p(D), p(o)));
2222
2222
  }, arguments);
2223
2223
  }, C.wbg.__wbg_call_b8adc8b1d0a0d8eb = function() {
2224
2224
  return DI(function(Q, E, D, o, w) {
2225
- return j(H(Q).call(H(E), H(D), H(o), H(w)));
2225
+ return x(p(Q).call(p(E), p(D), p(o), p(w)));
2226
2226
  }, arguments);
2227
2227
  }, C.wbg.__wbg_length_3b4f022188ae8db6 = function(Q) {
2228
- return H(Q).length;
2228
+ return p(Q).length;
2229
2229
  }, C.wbg.__wbg_length_a446193dc22c12f8 = function(Q) {
2230
- return H(Q).length;
2230
+ return p(Q).length;
2231
2231
  }, C.wbg.__wbg_new_a12002a7f91c75be = function(Q) {
2232
- return j(new Uint8Array(H(Q)));
2232
+ return x(new Uint8Array(p(Q)));
2233
2233
  }, C.wbg.__wbg_newnoargs_105ed471475aaf50 = function(Q, E) {
2234
- return j(new Function(dI(Q, E)));
2234
+ return x(new Function(dI(Q, E)));
2235
2235
  }, C.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(Q, E, D) {
2236
- return j(new Uint8Array(H(Q), E >>> 0, D >>> 0));
2236
+ return x(new Uint8Array(p(Q), E >>> 0, D >>> 0));
2237
2237
  }, C.wbg.__wbg_newwithbyteoffsetandlength_e6b7e69acd4c7354 = function(Q, E, D) {
2238
- return j(new Float32Array(H(Q), E >>> 0, D >>> 0));
2238
+ return x(new Float32Array(p(Q), E >>> 0, D >>> 0));
2239
2239
  }, C.wbg.__wbg_newwithlength_5a5efe313cfd59f1 = function(Q) {
2240
- return j(new Float32Array(Q >>> 0));
2240
+ return x(new Float32Array(Q >>> 0));
2241
2241
  }, C.wbg.__wbg_now_2c95c9de01293173 = function(Q) {
2242
- return H(Q).now();
2242
+ return p(Q).now();
2243
2243
  }, C.wbg.__wbg_performance_7a3ffd0b17f663ad = function(Q) {
2244
- return j(H(Q).performance);
2244
+ return x(p(Q).performance);
2245
2245
  }, C.wbg.__wbg_rawcontactforceevent_new = function(Q) {
2246
- return j(vI.__wrap(Q));
2246
+ return x(vI.__wrap(Q));
2247
2247
  }, C.wbg.__wbg_rawraycolliderintersection_new = function(Q) {
2248
- return j(yI.__wrap(Q));
2248
+ return x(yI.__wrap(Q));
2249
2249
  }, C.wbg.__wbg_set_10bad9bee0e9c58b = function(Q, E, D) {
2250
- H(Q).set(H(E), D >>> 0);
2250
+ p(Q).set(p(E), D >>> 0);
2251
2251
  }, C.wbg.__wbg_set_65595bdd868b3009 = function(Q, E, D) {
2252
- H(Q).set(H(E), D >>> 0);
2252
+ p(Q).set(p(E), D >>> 0);
2253
2253
  }, C.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
2254
2254
  const Q = typeof global > "u" ? null : global;
2255
- return c(Q) ? 0 : j(Q);
2255
+ return t(Q) ? 0 : x(Q);
2256
2256
  }, C.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
2257
2257
  const Q = typeof globalThis > "u" ? null : globalThis;
2258
- return c(Q) ? 0 : j(Q);
2258
+ return t(Q) ? 0 : x(Q);
2259
2259
  }, C.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
2260
2260
  const Q = typeof self > "u" ? null : self;
2261
- return c(Q) ? 0 : j(Q);
2261
+ return t(Q) ? 0 : x(Q);
2262
2262
  }, C.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
2263
2263
  const Q = typeof window > "u" ? null : window;
2264
- return c(Q) ? 0 : j(Q);
2264
+ return t(Q) ? 0 : x(Q);
2265
2265
  }, C.wbg.__wbindgen_boolean_get = function(Q) {
2266
- const E = H(Q);
2266
+ const E = p(Q);
2267
2267
  return typeof E == "boolean" ? E ? 1 : 0 : 2;
2268
2268
  }, C.wbg.__wbindgen_is_function = function(Q) {
2269
- return typeof H(Q) == "function";
2269
+ return typeof p(Q) == "function";
2270
2270
  }, C.wbg.__wbindgen_is_undefined = function(Q) {
2271
- return H(Q) === void 0;
2271
+ return p(Q) === void 0;
2272
2272
  }, C.wbg.__wbindgen_memory = function() {
2273
- return j(B.memory);
2273
+ return x(B.memory);
2274
2274
  }, C.wbg.__wbindgen_number_get = function(Q, E) {
2275
- const D = H(E), o = typeof D == "number" ? D : void 0;
2276
- EA().setFloat64(Q + 8, c(o) ? 0 : o, !0), EA().setInt32(Q + 0, !c(o), !0);
2275
+ const D = p(E), o = typeof D == "number" ? D : void 0;
2276
+ oA().setFloat64(Q + 8, t(o) ? 0 : o, !0), oA().setInt32(Q + 0, !t(o), !0);
2277
2277
  }, C.wbg.__wbindgen_number_new = function(Q) {
2278
- return j(Q);
2278
+ return x(Q);
2279
2279
  }, C.wbg.__wbindgen_object_clone_ref = function(Q) {
2280
- return j(H(Q));
2280
+ return x(p(Q));
2281
2281
  }, C.wbg.__wbindgen_object_drop_ref = function(Q) {
2282
2282
  oI(Q);
2283
2283
  }, C.wbg.__wbindgen_throw = function(Q, E) {
@@ -2302,7 +2302,7 @@ async function jg(i) {
2302
2302
  }
2303
2303
  }(await i, A);
2304
2304
  return function(C, Q) {
2305
- return B = C.exports, jg.__wbindgen_wasm_module = Q, dA = null, zA = null, PA = null, _A = null, VA = null, B;
2305
+ return B = C.exports, jg.__wbindgen_wasm_module = Q, fA = null, zA = null, PA = null, _A = null, VA = null, B;
2306
2306
  }(I, g);
2307
2307
  }
2308
2308
  class xg {
@@ -2329,7 +2329,7 @@ class N {
2329
2329
  A.x = I.x, A.y = I.y;
2330
2330
  }
2331
2331
  }
2332
- class x {
2332
+ class m {
2333
2333
  static identity() {
2334
2334
  return 0;
2335
2335
  }
@@ -2342,10 +2342,10 @@ class x {
2342
2342
  return b.fromAngle(A);
2343
2343
  }
2344
2344
  }
2345
- var JA, aA, bI, TI, II, xA, iA, ZI, OI, GI, hI, WI, jI, sI, bA;
2345
+ var RA, FA, bI, TI, II, xA, GA, ZI, WI, GI, hI, OI, jI, sI, TA;
2346
2346
  (function(i) {
2347
2347
  i[i.Dynamic = 0] = "Dynamic", i[i.Fixed = 1] = "Fixed", i[i.KinematicPositionBased = 2] = "KinematicPositionBased", i[i.KinematicVelocityBased = 3] = "KinematicVelocityBased";
2348
- })(JA || (JA = {}));
2348
+ })(RA || (RA = {}));
2349
2349
  class xI {
2350
2350
  constructor(A, I, g) {
2351
2351
  this.rawSet = A, this.colliderSet = I, this.handle = g;
@@ -2395,7 +2395,7 @@ class xI {
2395
2395
  }
2396
2396
  rotation() {
2397
2397
  let A = this.rawSet.rbRotation(this.handle);
2398
- return x.fromRaw(A);
2398
+ return m.fromRaw(A);
2399
2399
  }
2400
2400
  nextTranslation() {
2401
2401
  let A = this.rawSet.rbNextTranslation(this.handle);
@@ -2403,7 +2403,7 @@ class xI {
2403
2403
  }
2404
2404
  nextRotation() {
2405
2405
  let A = this.rawSet.rbNextRotation(this.handle);
2406
- return x.fromRaw(A);
2406
+ return m.fromRaw(A);
2407
2407
  }
2408
2408
  setTranslation(A, I) {
2409
2409
  this.rawSet.rbSetTranslation(this.handle, A.x, A.y, I);
@@ -2567,33 +2567,33 @@ class xI {
2567
2567
  return this.rawSet.rbUserTorque(this.handle);
2568
2568
  }
2569
2569
  }
2570
- class UA {
2570
+ class YA {
2571
2571
  constructor(A) {
2572
- this.enabled = !0, this.status = A, this.translation = N.zeros(), this.rotation = x.identity(), this.gravityScale = 1, this.linvel = N.zeros(), this.mass = 0, this.massOnly = !1, this.centerOfMass = N.zeros(), this.translationsEnabledX = !0, this.translationsEnabledY = !0, this.angvel = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0, this.linearDamping = 0, this.angularDamping = 0, this.canSleep = !0, this.sleeping = !1, this.ccdEnabled = !1, this.softCcdPrediction = 0, this.dominanceGroup = 0, this.additionalSolverIterations = 0;
2572
+ this.enabled = !0, this.status = A, this.translation = N.zeros(), this.rotation = m.identity(), this.gravityScale = 1, this.linvel = N.zeros(), this.mass = 0, this.massOnly = !1, this.centerOfMass = N.zeros(), this.translationsEnabledX = !0, this.translationsEnabledY = !0, this.angvel = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0, this.linearDamping = 0, this.angularDamping = 0, this.canSleep = !0, this.sleeping = !1, this.ccdEnabled = !1, this.softCcdPrediction = 0, this.dominanceGroup = 0, this.additionalSolverIterations = 0;
2573
2573
  }
2574
2574
  static dynamic() {
2575
- return new UA(JA.Dynamic);
2575
+ return new YA(RA.Dynamic);
2576
2576
  }
2577
2577
  static kinematicPositionBased() {
2578
- return new UA(JA.KinematicPositionBased);
2578
+ return new YA(RA.KinematicPositionBased);
2579
2579
  }
2580
2580
  static kinematicVelocityBased() {
2581
- return new UA(JA.KinematicVelocityBased);
2581
+ return new YA(RA.KinematicVelocityBased);
2582
2582
  }
2583
2583
  static fixed() {
2584
- return new UA(JA.Fixed);
2584
+ return new YA(RA.Fixed);
2585
2585
  }
2586
2586
  static newDynamic() {
2587
- return new UA(JA.Dynamic);
2587
+ return new YA(RA.Dynamic);
2588
2588
  }
2589
2589
  static newKinematicPositionBased() {
2590
- return new UA(JA.KinematicPositionBased);
2590
+ return new YA(RA.KinematicPositionBased);
2591
2591
  }
2592
2592
  static newKinematicVelocityBased() {
2593
- return new UA(JA.KinematicVelocityBased);
2593
+ return new YA(RA.KinematicVelocityBased);
2594
2594
  }
2595
2595
  static newStatic() {
2596
- return new UA(JA.Fixed);
2596
+ return new YA(RA.Fixed);
2597
2597
  }
2598
2598
  setDominanceGroup(A) {
2599
2599
  return this.dominanceGroup = A, this;
@@ -2696,7 +2696,7 @@ class JI {
2696
2696
  }
2697
2697
  class mg {
2698
2698
  constructor(A) {
2699
- this.raw = A || new u(), this.map = new JI(), A && A.forEachRigidBodyHandle((I) => {
2699
+ this.raw = A || new v(), this.map = new JI(), A && A.forEachRigidBodyHandle((I) => {
2700
2700
  this.map.set(I, new xI(A, null, I));
2701
2701
  });
2702
2702
  }
@@ -2707,7 +2707,7 @@ class mg {
2707
2707
  this.map.forEach((I) => I.finalizeDeserialization(A));
2708
2708
  }
2709
2709
  createRigidBody(A, I) {
2710
- let g = N.intoRaw(I.translation), C = x.intoRaw(I.rotation), Q = N.intoRaw(I.linvel), E = N.intoRaw(I.centerOfMass), D = this.raw.createRigidBody(I.enabled, g, C, I.gravityScale, I.mass, I.massOnly, E, Q, I.angvel, I.principalAngularInertia, I.translationsEnabledX, I.translationsEnabledY, I.rotationsEnabled, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
2710
+ let g = N.intoRaw(I.translation), C = m.intoRaw(I.rotation), Q = N.intoRaw(I.linvel), E = N.intoRaw(I.centerOfMass), D = this.raw.createRigidBody(I.enabled, g, C, I.gravityScale, I.mass, I.massOnly, E, Q, I.angvel, I.principalAngularInertia, I.translationsEnabledX, I.translationsEnabledY, I.rotationsEnabled, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
2711
2711
  g.free(), C.free(), Q.free(), E.free();
2712
2712
  const o = new xI(this.raw, A, D);
2713
2713
  return o.userData = I.userData, this.map.set(D, o), o;
@@ -2739,7 +2739,7 @@ class mg {
2739
2739
  }
2740
2740
  class Xg {
2741
2741
  constructor(A) {
2742
- this.raw = A || new TA();
2742
+ this.raw = A || new ZA();
2743
2743
  }
2744
2744
  free() {
2745
2745
  this.raw && this.raw.free(), this.raw = void 0;
@@ -2801,29 +2801,29 @@ class Xg {
2801
2801
  }
2802
2802
  (function(i) {
2803
2803
  i[i.Revolute = 0] = "Revolute", i[i.Fixed = 1] = "Fixed", i[i.Prismatic = 2] = "Prismatic", i[i.Rope = 3] = "Rope", i[i.Spring = 4] = "Spring";
2804
- })(aA || (aA = {})), function(i) {
2804
+ })(FA || (FA = {})), function(i) {
2805
2805
  i[i.AccelerationBased = 0] = "AccelerationBased", i[i.ForceBased = 1] = "ForceBased";
2806
2806
  }(bI || (bI = {})), function(i) {
2807
2807
  i[i.LinX = 1] = "LinX", i[i.LinY = 2] = "LinY", i[i.LinZ = 4] = "LinZ", i[i.AngX = 8] = "AngX", i[i.AngY = 16] = "AngY", i[i.AngZ = 32] = "AngZ";
2808
2808
  }(TI || (TI = {}));
2809
- class eA {
2809
+ class lA {
2810
2810
  constructor(A, I, g) {
2811
2811
  this.rawSet = A, this.bodySet = I, this.handle = g;
2812
2812
  }
2813
2813
  static newTyped(A, I, g) {
2814
2814
  switch (A.jointType(g)) {
2815
- case nA.Revolute:
2815
+ case pA.Revolute:
2816
2816
  return new zg(A, I, g);
2817
- case nA.Prismatic:
2817
+ case pA.Prismatic:
2818
2818
  return new Pg(A, I, g);
2819
- case nA.Fixed:
2819
+ case pA.Fixed:
2820
2820
  return new vg(A, I, g);
2821
- case nA.Spring:
2821
+ case pA.Spring:
2822
2822
  return new Vg(A, I, g);
2823
- case nA.Rope:
2823
+ case pA.Rope:
2824
2824
  return new ug(A, I, g);
2825
2825
  default:
2826
- return new eA(A, I, g);
2826
+ return new lA(A, I, g);
2827
2827
  }
2828
2828
  }
2829
2829
  finalizeDeserialization(A) {
@@ -2862,7 +2862,7 @@ class eA {
2862
2862
  return this.rawSet.jointContactsEnabled(this.handle);
2863
2863
  }
2864
2864
  }
2865
- class _I extends eA {
2865
+ class _I extends lA {
2866
2866
  limitsEnabled() {
2867
2867
  return this.rawSet.jointLimitsEnabled(this.handle, this.rawAxis());
2868
2868
  }
@@ -2888,11 +2888,11 @@ class _I extends eA {
2888
2888
  this.rawSet.jointConfigureMotor(this.handle, this.rawAxis(), A, I, g, C);
2889
2889
  }
2890
2890
  }
2891
- class vg extends eA {
2891
+ class vg extends lA {
2892
2892
  }
2893
- class ug extends eA {
2893
+ class ug extends lA {
2894
2894
  }
2895
- class Vg extends eA {
2895
+ class Vg extends lA {
2896
2896
  }
2897
2897
  class Pg extends _I {
2898
2898
  rawAxis() {
@@ -2904,55 +2904,55 @@ class zg extends _I {
2904
2904
  return NI.AngX;
2905
2905
  }
2906
2906
  }
2907
- class fA {
2907
+ class bA {
2908
2908
  constructor() {
2909
2909
  }
2910
2910
  static fixed(A, I, g, C) {
2911
- let Q = new fA();
2912
- return Q.anchor1 = A, Q.anchor2 = g, Q.frame1 = I, Q.frame2 = C, Q.jointType = aA.Fixed, Q;
2911
+ let Q = new bA();
2912
+ return Q.anchor1 = A, Q.anchor2 = g, Q.frame1 = I, Q.frame2 = C, Q.jointType = FA.Fixed, Q;
2913
2913
  }
2914
2914
  static spring(A, I, g, C, Q) {
2915
- let E = new fA();
2916
- return E.anchor1 = C, E.anchor2 = Q, E.length = A, E.stiffness = I, E.damping = g, E.jointType = aA.Spring, E;
2915
+ let E = new bA();
2916
+ return E.anchor1 = C, E.anchor2 = Q, E.length = A, E.stiffness = I, E.damping = g, E.jointType = FA.Spring, E;
2917
2917
  }
2918
2918
  static rope(A, I, g) {
2919
- let C = new fA();
2920
- return C.anchor1 = I, C.anchor2 = g, C.length = A, C.jointType = aA.Rope, C;
2919
+ let C = new bA();
2920
+ return C.anchor1 = I, C.anchor2 = g, C.length = A, C.jointType = FA.Rope, C;
2921
2921
  }
2922
2922
  static revolute(A, I) {
2923
- let g = new fA();
2924
- return g.anchor1 = A, g.anchor2 = I, g.jointType = aA.Revolute, g;
2923
+ let g = new bA();
2924
+ return g.anchor1 = A, g.anchor2 = I, g.jointType = FA.Revolute, g;
2925
2925
  }
2926
2926
  static prismatic(A, I, g) {
2927
- let C = new fA();
2928
- return C.anchor1 = A, C.anchor2 = I, C.axis = g, C.jointType = aA.Prismatic, C;
2927
+ let C = new bA();
2928
+ return C.anchor1 = A, C.anchor2 = I, C.axis = g, C.jointType = FA.Prismatic, C;
2929
2929
  }
2930
2930
  intoRaw() {
2931
2931
  let A, I, g = N.intoRaw(this.anchor1), C = N.intoRaw(this.anchor2), Q = !1, E = 0, D = 0;
2932
2932
  switch (this.jointType) {
2933
- case aA.Fixed:
2934
- let o = x.intoRaw(this.frame1), w = x.intoRaw(this.frame2);
2935
- I = sA.fixed(g, o, C, w), o.free(), w.free();
2933
+ case FA.Fixed:
2934
+ let o = m.intoRaw(this.frame1), w = m.intoRaw(this.frame2);
2935
+ I = SA.fixed(g, o, C, w), o.free(), w.free();
2936
2936
  break;
2937
- case aA.Spring:
2938
- I = sA.spring(this.length, this.stiffness, this.damping, g, C);
2937
+ case FA.Spring:
2938
+ I = SA.spring(this.length, this.stiffness, this.damping, g, C);
2939
2939
  break;
2940
- case aA.Rope:
2941
- I = sA.rope(this.length, g, C);
2940
+ case FA.Rope:
2941
+ I = SA.rope(this.length, g, C);
2942
2942
  break;
2943
- case aA.Prismatic:
2944
- A = N.intoRaw(this.axis), this.limitsEnabled && (Q = !0, E = this.limits[0], D = this.limits[1]), I = sA.prismatic(g, C, A, Q, E, D), A.free();
2943
+ case FA.Prismatic:
2944
+ A = N.intoRaw(this.axis), this.limitsEnabled && (Q = !0, E = this.limits[0], D = this.limits[1]), I = SA.prismatic(g, C, A, Q, E, D), A.free();
2945
2945
  break;
2946
- case aA.Revolute:
2947
- I = sA.revolute(g, C);
2946
+ case FA.Revolute:
2947
+ I = SA.revolute(g, C);
2948
2948
  }
2949
2949
  return g.free(), C.free(), I;
2950
2950
  }
2951
2951
  }
2952
2952
  class _g {
2953
2953
  constructor(A) {
2954
- this.raw = A || new tA(), this.map = new JI(), A && A.forEachJointHandle((I) => {
2955
- this.map.set(I, eA.newTyped(A, null, I));
2954
+ this.raw = A || new eA(), this.map = new JI(), A && A.forEachJointHandle((I) => {
2955
+ this.map.set(I, lA.newTyped(A, null, I));
2956
2956
  });
2957
2957
  }
2958
2958
  free() {
@@ -2964,7 +2964,7 @@ class _g {
2964
2964
  createJoint(A, I, g, C, Q) {
2965
2965
  const E = I.intoRaw(), D = this.raw.createJoint(E, g, C, Q);
2966
2966
  E.free();
2967
- let o = eA.newTyped(this.raw, A, D);
2967
+ let o = lA.newTyped(this.raw, A, D);
2968
2968
  return this.map.set(D, o), o;
2969
2969
  }
2970
2970
  remove(A, I) {
@@ -2992,20 +2992,20 @@ class _g {
2992
2992
  return this.map.getAll();
2993
2993
  }
2994
2994
  }
2995
- class ZA {
2995
+ class WA {
2996
2996
  constructor(A, I) {
2997
2997
  this.rawSet = A, this.handle = I;
2998
2998
  }
2999
2999
  static newTyped(A, I) {
3000
3000
  switch (A.jointType(I)) {
3001
- case nA.Revolute:
3001
+ case pA.Revolute:
3002
3002
  return new IC(A, I);
3003
- case nA.Prismatic:
3003
+ case pA.Prismatic:
3004
3004
  return new AC(A, I);
3005
- case nA.Fixed:
3005
+ case pA.Fixed:
3006
3006
  return new $g(A, I);
3007
3007
  default:
3008
- return new ZA(A, I);
3008
+ return new WA(A, I);
3009
3009
  }
3010
3010
  }
3011
3011
  isValid() {
@@ -3018,9 +3018,9 @@ class ZA {
3018
3018
  return this.rawSet.jointContactsEnabled(this.handle);
3019
3019
  }
3020
3020
  }
3021
- class $I extends ZA {
3021
+ class $I extends WA {
3022
3022
  }
3023
- class $g extends ZA {
3023
+ class $g extends WA {
3024
3024
  }
3025
3025
  class AC extends $I {
3026
3026
  rawAxis() {
@@ -3034,8 +3034,8 @@ class IC extends $I {
3034
3034
  }
3035
3035
  class gC {
3036
3036
  constructor(A) {
3037
- this.raw = A || new LA(), this.map = new JI(), A && A.forEachJointHandle((I) => {
3038
- this.map.set(I, ZA.newTyped(this.raw, I));
3037
+ this.raw = A || new qA(), this.map = new JI(), A && A.forEachJointHandle((I) => {
3038
+ this.map.set(I, WA.newTyped(this.raw, I));
3039
3039
  });
3040
3040
  }
3041
3041
  free() {
@@ -3044,7 +3044,7 @@ class gC {
3044
3044
  createJoint(A, I, g, C) {
3045
3045
  const Q = A.intoRaw(), E = this.raw.createJoint(Q, I, g, C);
3046
3046
  Q.free();
3047
- let D = ZA.newTyped(this.raw, E);
3047
+ let D = WA.newTyped(this.raw, E);
3048
3048
  return this.map.set(E, D), D;
3049
3049
  }
3050
3050
  remove(A, I) {
@@ -3085,7 +3085,7 @@ class CC {
3085
3085
  }
3086
3086
  class QC {
3087
3087
  constructor(A) {
3088
- this.raw = A || new YA();
3088
+ this.raw = A || new rA();
3089
3089
  }
3090
3090
  free() {
3091
3091
  this.raw && this.raw.free(), this.raw = void 0;
@@ -3177,46 +3177,46 @@ class EI extends XA {
3177
3177
  }
3178
3178
  class BC {
3179
3179
  constructor(A) {
3180
- this.raw = A || new HA();
3180
+ this.raw = A || new dA();
3181
3181
  }
3182
3182
  free() {
3183
3183
  this.raw && this.raw.free(), this.raw = void 0;
3184
3184
  }
3185
- castRay(A, I, g, C, Q, E, D, o, w, G, s) {
3186
- let K = N.intoRaw(C.origin), S = N.intoRaw(C.dir), J = UI.fromRaw(g, this.raw.castRay(A.raw, I.raw, g.raw, K, S, Q, E, D, o, w, G, s));
3187
- return K.free(), S.free(), J;
3185
+ castRay(A, I, g, C, Q, E, D, o, w, h, G) {
3186
+ let S = N.intoRaw(C.origin), K = N.intoRaw(C.dir), J = UI.fromRaw(g, this.raw.castRay(A.raw, I.raw, g.raw, S, K, Q, E, D, o, w, h, G));
3187
+ return S.free(), K.free(), J;
3188
3188
  }
3189
- castRayAndGetNormal(A, I, g, C, Q, E, D, o, w, G, s) {
3190
- let K = N.intoRaw(C.origin), S = N.intoRaw(C.dir), J = gI.fromRaw(g, this.raw.castRayAndGetNormal(A.raw, I.raw, g.raw, K, S, Q, E, D, o, w, G, s));
3191
- return K.free(), S.free(), J;
3189
+ castRayAndGetNormal(A, I, g, C, Q, E, D, o, w, h, G) {
3190
+ let S = N.intoRaw(C.origin), K = N.intoRaw(C.dir), J = gI.fromRaw(g, this.raw.castRayAndGetNormal(A.raw, I.raw, g.raw, S, K, Q, E, D, o, w, h, G));
3191
+ return S.free(), K.free(), J;
3192
3192
  }
3193
- intersectionsWithRay(A, I, g, C, Q, E, D, o, w, G, s, K) {
3194
- let S = N.intoRaw(C.origin), J = N.intoRaw(C.dir);
3195
- this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, S, J, Q, E, (k) => D(gI.fromRaw(g, k)), o, w, G, s, K), S.free(), J.free();
3193
+ intersectionsWithRay(A, I, g, C, Q, E, D, o, w, h, G, S) {
3194
+ let K = N.intoRaw(C.origin), J = N.intoRaw(C.dir);
3195
+ this.raw.intersectionsWithRay(A.raw, I.raw, g.raw, K, J, Q, E, (F) => D(gI.fromRaw(g, F)), o, w, h, G, S), K.free(), J.free();
3196
3196
  }
3197
- intersectionWithShape(A, I, g, C, Q, E, D, o, w, G, s) {
3198
- let K = N.intoRaw(C), S = x.intoRaw(Q), J = E.intoRaw(), k = this.raw.intersectionWithShape(A.raw, I.raw, g.raw, K, S, J, D, o, w, G, s);
3199
- return K.free(), S.free(), J.free(), k;
3197
+ intersectionWithShape(A, I, g, C, Q, E, D, o, w, h, G) {
3198
+ let S = N.intoRaw(C), K = m.intoRaw(Q), J = E.intoRaw(), F = this.raw.intersectionWithShape(A.raw, I.raw, g.raw, S, K, J, D, o, w, h, G);
3199
+ return S.free(), K.free(), J.free(), F;
3200
3200
  }
3201
- projectPoint(A, I, g, C, Q, E, D, o, w, G) {
3202
- let s = N.intoRaw(C), K = CI.fromRaw(g, this.raw.projectPoint(A.raw, I.raw, g.raw, s, Q, E, D, o, w, G));
3203
- return s.free(), K;
3201
+ projectPoint(A, I, g, C, Q, E, D, o, w, h) {
3202
+ let G = N.intoRaw(C), S = CI.fromRaw(g, this.raw.projectPoint(A.raw, I.raw, g.raw, G, Q, E, D, o, w, h));
3203
+ return G.free(), S;
3204
3204
  }
3205
3205
  projectPointAndGetFeature(A, I, g, C, Q, E, D, o, w) {
3206
- let G = N.intoRaw(C), s = CI.fromRaw(g, this.raw.projectPointAndGetFeature(A.raw, I.raw, g.raw, G, Q, E, D, o, w));
3207
- return G.free(), s;
3206
+ let h = N.intoRaw(C), G = CI.fromRaw(g, this.raw.projectPointAndGetFeature(A.raw, I.raw, g.raw, h, Q, E, D, o, w));
3207
+ return h.free(), G;
3208
3208
  }
3209
- intersectionsWithPoint(A, I, g, C, Q, E, D, o, w, G) {
3210
- let s = N.intoRaw(C);
3211
- this.raw.intersectionsWithPoint(A.raw, I.raw, g.raw, s, Q, E, D, o, w, G), s.free();
3209
+ intersectionsWithPoint(A, I, g, C, Q, E, D, o, w, h) {
3210
+ let G = N.intoRaw(C);
3211
+ this.raw.intersectionsWithPoint(A.raw, I.raw, g.raw, G, Q, E, D, o, w, h), G.free();
3212
3212
  }
3213
- castShape(A, I, g, C, Q, E, D, o, w, G, s, K, S, J, k) {
3214
- let y = N.intoRaw(C), F = x.intoRaw(Q), M = N.intoRaw(E), U = D.intoRaw(), R = EI.fromRaw(g, this.raw.castShape(A.raw, I.raw, g.raw, y, F, M, U, o, w, G, s, K, S, J, k));
3215
- return y.free(), F.free(), M.free(), U.free(), R;
3213
+ castShape(A, I, g, C, Q, E, D, o, w, h, G, S, K, J, F) {
3214
+ let y = N.intoRaw(C), k = m.intoRaw(Q), M = N.intoRaw(E), U = D.intoRaw(), R = EI.fromRaw(g, this.raw.castShape(A.raw, I.raw, g.raw, y, k, M, U, o, w, h, G, S, K, J, F));
3215
+ return y.free(), k.free(), M.free(), U.free(), R;
3216
3216
  }
3217
- intersectionsWithShape(A, I, g, C, Q, E, D, o, w, G, s, K) {
3218
- let S = N.intoRaw(C), J = x.intoRaw(Q), k = E.intoRaw();
3219
- this.raw.intersectionsWithShape(A.raw, I.raw, g.raw, S, J, k, D, o, w, G, s, K), S.free(), J.free(), k.free();
3217
+ intersectionsWithShape(A, I, g, C, Q, E, D, o, w, h, G, S) {
3218
+ let K = N.intoRaw(C), J = m.intoRaw(Q), F = E.intoRaw();
3219
+ this.raw.intersectionsWithShape(A.raw, I.raw, g.raw, K, J, F, D, o, w, h, G, S), K.free(), J.free(), F.free();
3220
3220
  }
3221
3221
  collidersWithAabbIntersectingAabb(A, I, g, C, Q, E) {
3222
3222
  let D = N.intoRaw(C), o = N.intoRaw(Q);
@@ -3225,7 +3225,7 @@ class BC {
3225
3225
  }
3226
3226
  class EC {
3227
3227
  constructor(A) {
3228
- this.raw = A || new gA(), this.tempManifold = new iC(null);
3228
+ this.raw = A || new BA(), this.tempManifold = new iC(null);
3229
3229
  }
3230
3230
  free() {
3231
3231
  this.raw && this.raw.free(), this.raw = void 0;
@@ -3324,200 +3324,200 @@ class mA {
3324
3324
  return A.free(), I;
3325
3325
  }
3326
3326
  }
3327
- class DA {
3327
+ class sA {
3328
3328
  static fromRaw(A, I) {
3329
3329
  const g = A.coShapeType(I);
3330
- let C, Q, E, D, o, w, G;
3330
+ let C, Q, E, D, o, w, h;
3331
3331
  switch (g) {
3332
- case hA.Ball:
3332
+ case KA.Ball:
3333
3333
  return new Ag(A.coRadius(I));
3334
- case hA.Cuboid:
3334
+ case KA.Cuboid:
3335
3335
  return C = A.coHalfExtents(I), new gg(C.x, C.y);
3336
- case hA.RoundCuboid:
3336
+ case KA.RoundCuboid:
3337
3337
  return C = A.coHalfExtents(I), Q = A.coRoundRadius(I), new Cg(C.x, C.y, Q);
3338
- case hA.Capsule:
3338
+ case KA.Capsule:
3339
3339
  return o = A.coHalfHeight(I), w = A.coRadius(I), new Qg(o, w);
3340
- case hA.Segment:
3340
+ case KA.Segment:
3341
3341
  return E = A.coVertices(I), new Bg(N.new(E[0], E[1]), N.new(E[2], E[3]));
3342
- case hA.Polyline:
3342
+ case KA.Polyline:
3343
3343
  return E = A.coVertices(I), D = A.coIndices(I), new Dg(E, D);
3344
- case hA.Triangle:
3344
+ case KA.Triangle:
3345
3345
  return E = A.coVertices(I), new Eg(N.new(E[0], E[1]), N.new(E[2], E[3]), N.new(E[4], E[5]));
3346
- case hA.RoundTriangle:
3346
+ case KA.RoundTriangle:
3347
3347
  return E = A.coVertices(I), Q = A.coRoundRadius(I), new ig(N.new(E[0], E[1]), N.new(E[2], E[3]), N.new(E[4], E[5]), Q);
3348
- case hA.HalfSpace:
3349
- return G = N.fromRaw(A.coHalfspaceNormal(I)), new Ig(G);
3350
- case hA.Voxels:
3351
- const s = A.coVoxelData(I), K = A.coVoxelSize(I);
3352
- return new og(s, K);
3353
- case hA.TriMesh:
3348
+ case KA.HalfSpace:
3349
+ return h = N.fromRaw(A.coHalfspaceNormal(I)), new Ig(h);
3350
+ case KA.Voxels:
3351
+ const G = A.coVoxelData(I), S = A.coVoxelSize(I);
3352
+ return new og(G, S);
3353
+ case KA.TriMesh:
3354
3354
  E = A.coVertices(I), D = A.coIndices(I);
3355
- const S = A.coTriMeshFlags(I);
3356
- return new wg(E, D, S);
3357
- case hA.HeightField:
3358
- const J = A.coHeightfieldScale(I), k = A.coHeightfieldHeights(I);
3359
- return new Gg(k, J);
3360
- case hA.ConvexPolygon:
3355
+ const K = A.coTriMeshFlags(I);
3356
+ return new wg(E, D, K);
3357
+ case KA.HeightField:
3358
+ const J = A.coHeightfieldScale(I), F = A.coHeightfieldHeights(I);
3359
+ return new Gg(F, J);
3360
+ case KA.ConvexPolygon:
3361
3361
  return E = A.coVertices(I), new KI(E, !1);
3362
- case hA.RoundConvexPolygon:
3362
+ case KA.RoundConvexPolygon:
3363
3363
  return E = A.coVertices(I), Q = A.coRoundRadius(I), new SI(E, Q, !1);
3364
3364
  default:
3365
3365
  throw new Error("unknown shape type: " + g);
3366
3366
  }
3367
3367
  }
3368
- castShape(A, I, g, C, Q, E, D, o, w, G) {
3369
- let s = N.intoRaw(A), K = x.intoRaw(I), S = N.intoRaw(g), J = N.intoRaw(Q), k = x.intoRaw(E), y = N.intoRaw(D), F = this.intoRaw(), M = C.intoRaw(), U = XA.fromRaw(null, F.castShape(s, K, S, M, J, k, y, o, w, G));
3370
- return s.free(), K.free(), S.free(), J.free(), k.free(), y.free(), F.free(), M.free(), U;
3368
+ castShape(A, I, g, C, Q, E, D, o, w, h) {
3369
+ let G = N.intoRaw(A), S = m.intoRaw(I), K = N.intoRaw(g), J = N.intoRaw(Q), F = m.intoRaw(E), y = N.intoRaw(D), k = this.intoRaw(), M = C.intoRaw(), U = XA.fromRaw(null, k.castShape(G, S, K, M, J, F, y, o, w, h));
3370
+ return G.free(), S.free(), K.free(), J.free(), F.free(), y.free(), k.free(), M.free(), U;
3371
3371
  }
3372
3372
  intersectsShape(A, I, g, C, Q) {
3373
- let E = N.intoRaw(A), D = x.intoRaw(I), o = N.intoRaw(C), w = x.intoRaw(Q), G = this.intoRaw(), s = g.intoRaw(), K = G.intersectsShape(E, D, s, o, w);
3374
- return E.free(), D.free(), o.free(), w.free(), G.free(), s.free(), K;
3373
+ let E = N.intoRaw(A), D = m.intoRaw(I), o = N.intoRaw(C), w = m.intoRaw(Q), h = this.intoRaw(), G = g.intoRaw(), S = h.intersectsShape(E, D, G, o, w);
3374
+ return E.free(), D.free(), o.free(), w.free(), h.free(), G.free(), S;
3375
3375
  }
3376
3376
  contactShape(A, I, g, C, Q, E) {
3377
- let D = N.intoRaw(A), o = x.intoRaw(I), w = N.intoRaw(C), G = x.intoRaw(Q), s = this.intoRaw(), K = g.intoRaw(), S = mA.fromRaw(s.contactShape(D, o, K, w, G, E));
3378
- return D.free(), o.free(), w.free(), G.free(), s.free(), K.free(), S;
3377
+ let D = N.intoRaw(A), o = m.intoRaw(I), w = N.intoRaw(C), h = m.intoRaw(Q), G = this.intoRaw(), S = g.intoRaw(), K = mA.fromRaw(G.contactShape(D, o, S, w, h, E));
3378
+ return D.free(), o.free(), w.free(), h.free(), G.free(), S.free(), K;
3379
3379
  }
3380
3380
  containsPoint(A, I, g) {
3381
- let C = N.intoRaw(A), Q = x.intoRaw(I), E = N.intoRaw(g), D = this.intoRaw(), o = D.containsPoint(C, Q, E);
3381
+ let C = N.intoRaw(A), Q = m.intoRaw(I), E = N.intoRaw(g), D = this.intoRaw(), o = D.containsPoint(C, Q, E);
3382
3382
  return C.free(), Q.free(), E.free(), D.free(), o;
3383
3383
  }
3384
3384
  projectPoint(A, I, g, C) {
3385
- let Q = N.intoRaw(A), E = x.intoRaw(I), D = N.intoRaw(g), o = this.intoRaw(), w = BI.fromRaw(o.projectPoint(Q, E, D, C));
3385
+ let Q = N.intoRaw(A), E = m.intoRaw(I), D = N.intoRaw(g), o = this.intoRaw(), w = BI.fromRaw(o.projectPoint(Q, E, D, C));
3386
3386
  return Q.free(), E.free(), D.free(), o.free(), w;
3387
3387
  }
3388
3388
  intersectsRay(A, I, g, C) {
3389
- let Q = N.intoRaw(I), E = x.intoRaw(g), D = N.intoRaw(A.origin), o = N.intoRaw(A.dir), w = this.intoRaw(), G = w.intersectsRay(Q, E, D, o, C);
3390
- return Q.free(), E.free(), D.free(), o.free(), w.free(), G;
3389
+ let Q = N.intoRaw(I), E = m.intoRaw(g), D = N.intoRaw(A.origin), o = N.intoRaw(A.dir), w = this.intoRaw(), h = w.intersectsRay(Q, E, D, o, C);
3390
+ return Q.free(), E.free(), D.free(), o.free(), w.free(), h;
3391
3391
  }
3392
3392
  castRay(A, I, g, C, Q) {
3393
- let E = N.intoRaw(I), D = x.intoRaw(g), o = N.intoRaw(A.origin), w = N.intoRaw(A.dir), G = this.intoRaw(), s = G.castRay(E, D, o, w, C, Q);
3394
- return E.free(), D.free(), o.free(), w.free(), G.free(), s;
3393
+ let E = N.intoRaw(I), D = m.intoRaw(g), o = N.intoRaw(A.origin), w = N.intoRaw(A.dir), h = this.intoRaw(), G = h.castRay(E, D, o, w, C, Q);
3394
+ return E.free(), D.free(), o.free(), w.free(), h.free(), G;
3395
3395
  }
3396
3396
  castRayAndGetNormal(A, I, g, C, Q) {
3397
- let E = N.intoRaw(I), D = x.intoRaw(g), o = N.intoRaw(A.origin), w = N.intoRaw(A.dir), G = this.intoRaw(), s = QI.fromRaw(G.castRayAndGetNormal(E, D, o, w, C, Q));
3398
- return E.free(), D.free(), o.free(), w.free(), G.free(), s;
3397
+ let E = N.intoRaw(I), D = m.intoRaw(g), o = N.intoRaw(A.origin), w = N.intoRaw(A.dir), h = this.intoRaw(), G = QI.fromRaw(h.castRayAndGetNormal(E, D, o, w, C, Q));
3398
+ return E.free(), D.free(), o.free(), w.free(), h.free(), G;
3399
3399
  }
3400
3400
  }
3401
3401
  (function(i) {
3402
3402
  i[i.Ball = 0] = "Ball", i[i.Cuboid = 1] = "Cuboid", i[i.Capsule = 2] = "Capsule", i[i.Segment = 3] = "Segment", i[i.Polyline = 4] = "Polyline", i[i.Triangle = 5] = "Triangle", i[i.TriMesh = 6] = "TriMesh", i[i.HeightField = 7] = "HeightField", i[i.ConvexPolygon = 9] = "ConvexPolygon", i[i.RoundCuboid = 10] = "RoundCuboid", i[i.RoundTriangle = 11] = "RoundTriangle", i[i.RoundConvexPolygon = 12] = "RoundConvexPolygon", i[i.HalfSpace = 13] = "HalfSpace", i[i.Voxels = 14] = "Voxels";
3403
- })(iA || (iA = {})), function(i) {
3403
+ })(GA || (GA = {})), function(i) {
3404
3404
  i[i.DELETE_BAD_TOPOLOGY_TRIANGLES = 4] = "DELETE_BAD_TOPOLOGY_TRIANGLES", i[i.ORIENTED = 8] = "ORIENTED", i[i.MERGE_DUPLICATE_VERTICES = 16] = "MERGE_DUPLICATE_VERTICES", i[i.DELETE_DEGENERATE_TRIANGLES = 32] = "DELETE_DEGENERATE_TRIANGLES", i[i.DELETE_DUPLICATE_TRIANGLES = 64] = "DELETE_DUPLICATE_TRIANGLES", i[i.FIX_INTERNAL_EDGES = 144] = "FIX_INTERNAL_EDGES";
3405
3405
  }(ZI || (ZI = {}));
3406
- class Ag extends DA {
3406
+ class Ag extends sA {
3407
3407
  constructor(A) {
3408
- super(), this.type = iA.Ball, this.radius = A;
3408
+ super(), this.type = GA.Ball, this.radius = A;
3409
3409
  }
3410
3410
  intoRaw() {
3411
- return Y.ball(this.radius);
3411
+ return r.ball(this.radius);
3412
3412
  }
3413
3413
  }
3414
- class Ig extends DA {
3414
+ class Ig extends sA {
3415
3415
  constructor(A) {
3416
- super(), this.type = iA.HalfSpace, this.normal = A;
3416
+ super(), this.type = GA.HalfSpace, this.normal = A;
3417
3417
  }
3418
3418
  intoRaw() {
3419
- let A = N.intoRaw(this.normal), I = Y.halfspace(A);
3419
+ let A = N.intoRaw(this.normal), I = r.halfspace(A);
3420
3420
  return A.free(), I;
3421
3421
  }
3422
3422
  }
3423
- class gg extends DA {
3423
+ class gg extends sA {
3424
3424
  constructor(A, I) {
3425
- super(), this.type = iA.Cuboid, this.halfExtents = N.new(A, I);
3425
+ super(), this.type = GA.Cuboid, this.halfExtents = N.new(A, I);
3426
3426
  }
3427
3427
  intoRaw() {
3428
- return Y.cuboid(this.halfExtents.x, this.halfExtents.y);
3428
+ return r.cuboid(this.halfExtents.x, this.halfExtents.y);
3429
3429
  }
3430
3430
  }
3431
- class Cg extends DA {
3431
+ class Cg extends sA {
3432
3432
  constructor(A, I, g) {
3433
- super(), this.type = iA.RoundCuboid, this.halfExtents = N.new(A, I), this.borderRadius = g;
3433
+ super(), this.type = GA.RoundCuboid, this.halfExtents = N.new(A, I), this.borderRadius = g;
3434
3434
  }
3435
3435
  intoRaw() {
3436
- return Y.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
3436
+ return r.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
3437
3437
  }
3438
3438
  }
3439
- class Qg extends DA {
3439
+ class Qg extends sA {
3440
3440
  constructor(A, I) {
3441
- super(), this.type = iA.Capsule, this.halfHeight = A, this.radius = I;
3441
+ super(), this.type = GA.Capsule, this.halfHeight = A, this.radius = I;
3442
3442
  }
3443
3443
  intoRaw() {
3444
- return Y.capsule(this.halfHeight, this.radius);
3444
+ return r.capsule(this.halfHeight, this.radius);
3445
3445
  }
3446
3446
  }
3447
- class Bg extends DA {
3447
+ class Bg extends sA {
3448
3448
  constructor(A, I) {
3449
- super(), this.type = iA.Segment, this.a = A, this.b = I;
3449
+ super(), this.type = GA.Segment, this.a = A, this.b = I;
3450
3450
  }
3451
3451
  intoRaw() {
3452
- let A = N.intoRaw(this.a), I = N.intoRaw(this.b), g = Y.segment(A, I);
3452
+ let A = N.intoRaw(this.a), I = N.intoRaw(this.b), g = r.segment(A, I);
3453
3453
  return A.free(), I.free(), g;
3454
3454
  }
3455
3455
  }
3456
- class Eg extends DA {
3456
+ class Eg extends sA {
3457
3457
  constructor(A, I, g) {
3458
- super(), this.type = iA.Triangle, this.a = A, this.b = I, this.c = g;
3458
+ super(), this.type = GA.Triangle, this.a = A, this.b = I, this.c = g;
3459
3459
  }
3460
3460
  intoRaw() {
3461
- let A = N.intoRaw(this.a), I = N.intoRaw(this.b), g = N.intoRaw(this.c), C = Y.triangle(A, I, g);
3461
+ let A = N.intoRaw(this.a), I = N.intoRaw(this.b), g = N.intoRaw(this.c), C = r.triangle(A, I, g);
3462
3462
  return A.free(), I.free(), g.free(), C;
3463
3463
  }
3464
3464
  }
3465
- class ig extends DA {
3465
+ class ig extends sA {
3466
3466
  constructor(A, I, g, C) {
3467
- super(), this.type = iA.RoundTriangle, this.a = A, this.b = I, this.c = g, this.borderRadius = C;
3467
+ super(), this.type = GA.RoundTriangle, this.a = A, this.b = I, this.c = g, this.borderRadius = C;
3468
3468
  }
3469
3469
  intoRaw() {
3470
- let A = N.intoRaw(this.a), I = N.intoRaw(this.b), g = N.intoRaw(this.c), C = Y.roundTriangle(A, I, g, this.borderRadius);
3470
+ let A = N.intoRaw(this.a), I = N.intoRaw(this.b), g = N.intoRaw(this.c), C = r.roundTriangle(A, I, g, this.borderRadius);
3471
3471
  return A.free(), I.free(), g.free(), C;
3472
3472
  }
3473
3473
  }
3474
- class Dg extends DA {
3474
+ class Dg extends sA {
3475
3475
  constructor(A, I) {
3476
- super(), this.type = iA.Polyline, this.vertices = A, this.indices = I ?? new Uint32Array(0);
3476
+ super(), this.type = GA.Polyline, this.vertices = A, this.indices = I ?? new Uint32Array(0);
3477
3477
  }
3478
3478
  intoRaw() {
3479
- return Y.polyline(this.vertices, this.indices);
3479
+ return r.polyline(this.vertices, this.indices);
3480
3480
  }
3481
3481
  }
3482
- class og extends DA {
3482
+ class og extends sA {
3483
3483
  constructor(A, I) {
3484
- super(), this.type = iA.Voxels, this.data = A, this.voxelSize = I;
3484
+ super(), this.type = GA.Voxels, this.data = A, this.voxelSize = I;
3485
3485
  }
3486
3486
  intoRaw() {
3487
3487
  let A, I = N.intoRaw(this.voxelSize);
3488
- return A = this.data instanceof Int32Array ? Y.voxels(I, this.data) : Y.voxelsFromPoints(I, this.data), I.free(), A;
3488
+ return A = this.data instanceof Int32Array ? r.voxels(I, this.data) : r.voxelsFromPoints(I, this.data), I.free(), A;
3489
3489
  }
3490
3490
  }
3491
- class wg extends DA {
3491
+ class wg extends sA {
3492
3492
  constructor(A, I, g) {
3493
- super(), this.type = iA.TriMesh, this.vertices = A, this.indices = I, this.flags = g;
3493
+ super(), this.type = GA.TriMesh, this.vertices = A, this.indices = I, this.flags = g;
3494
3494
  }
3495
3495
  intoRaw() {
3496
- return Y.trimesh(this.vertices, this.indices, this.flags);
3496
+ return r.trimesh(this.vertices, this.indices, this.flags);
3497
3497
  }
3498
3498
  }
3499
- class KI extends DA {
3499
+ class KI extends sA {
3500
3500
  constructor(A, I) {
3501
- super(), this.type = iA.ConvexPolygon, this.vertices = A, this.skipConvexHullComputation = !!I;
3501
+ super(), this.type = GA.ConvexPolygon, this.vertices = A, this.skipConvexHullComputation = !!I;
3502
3502
  }
3503
3503
  intoRaw() {
3504
- return this.skipConvexHullComputation ? Y.convexPolyline(this.vertices) : Y.convexHull(this.vertices);
3504
+ return this.skipConvexHullComputation ? r.convexPolyline(this.vertices) : r.convexHull(this.vertices);
3505
3505
  }
3506
3506
  }
3507
- class SI extends DA {
3507
+ class SI extends sA {
3508
3508
  constructor(A, I, g) {
3509
- super(), this.type = iA.RoundConvexPolygon, this.vertices = A, this.borderRadius = I, this.skipConvexHullComputation = !!g;
3509
+ super(), this.type = GA.RoundConvexPolygon, this.vertices = A, this.borderRadius = I, this.skipConvexHullComputation = !!g;
3510
3510
  }
3511
3511
  intoRaw() {
3512
- return this.skipConvexHullComputation ? Y.roundConvexPolyline(this.vertices, this.borderRadius) : Y.roundConvexHull(this.vertices, this.borderRadius);
3512
+ return this.skipConvexHullComputation ? r.roundConvexPolyline(this.vertices, this.borderRadius) : r.roundConvexHull(this.vertices, this.borderRadius);
3513
3513
  }
3514
3514
  }
3515
- class Gg extends DA {
3515
+ class Gg extends sA {
3516
3516
  constructor(A, I) {
3517
- super(), this.type = iA.HeightField, this.heights = A, this.scale = I;
3517
+ super(), this.type = GA.HeightField, this.heights = A, this.scale = I;
3518
3518
  }
3519
3519
  intoRaw() {
3520
- let A = N.intoRaw(this.scale), I = Y.heightfield(this.heights, A);
3520
+ let A = N.intoRaw(this.scale), I = r.heightfield(this.heights, A);
3521
3521
  return A.free(), I;
3522
3522
  }
3523
3523
  }
@@ -3528,9 +3528,9 @@ class DC {
3528
3528
  free() {
3529
3529
  this.raw && this.raw.free(), this.raw = void 0;
3530
3530
  }
3531
- step(A, I, g, C, Q, E, D, o, w, G, s, K) {
3532
- let S = N.intoRaw(A);
3533
- s ? this.raw.stepWithEvents(S, I.raw, g.raw, C.raw, Q.raw, E.raw, D.raw, o.raw, w.raw, G.raw, s.raw, K, K ? K.filterContactPair : null, K ? K.filterIntersectionPair : null) : this.raw.step(S, I.raw, g.raw, C.raw, Q.raw, E.raw, D.raw, o.raw, w.raw, G.raw), S.free();
3531
+ step(A, I, g, C, Q, E, D, o, w, h, G, S) {
3532
+ let K = N.intoRaw(A);
3533
+ G ? this.raw.stepWithEvents(K, I.raw, g.raw, C.raw, Q.raw, E.raw, D.raw, o.raw, w.raw, h.raw, G.raw, S, S ? S.filterContactPair : null, S ? S.filterIntersectionPair : null) : this.raw.step(K, I.raw, g.raw, C.raw, Q.raw, E.raw, D.raw, o.raw, w.raw, h.raw), K.free();
3534
3534
  }
3535
3535
  }
3536
3536
  class mI {
@@ -3541,9 +3541,9 @@ class mI {
3541
3541
  this.raw && this.raw.free(), this.raw = void 0;
3542
3542
  }
3543
3543
  serializeAll(A, I, g, C, Q, E, D, o, w) {
3544
- let G = N.intoRaw(A);
3545
- const s = this.raw.serializeAll(G, I.raw, g.raw, C.raw, Q.raw, E.raw, D.raw, o.raw, w.raw);
3546
- return G.free(), s;
3544
+ let h = N.intoRaw(A);
3545
+ const G = this.raw.serializeAll(h, I.raw, g.raw, C.raw, Q.raw, E.raw, D.raw, o.raw, w.raw);
3546
+ return h.free(), G;
3547
3547
  }
3548
3548
  deserializeAll(A) {
3549
3549
  return RI.fromRaw(this.raw.deserializeAll(A));
@@ -3569,7 +3569,7 @@ class GC {
3569
3569
  }
3570
3570
  class hC {
3571
3571
  constructor(A, I, g, C, Q, E) {
3572
- this.params = I, this.bodies = Q, this.colliders = E, this.broadPhase = g, this.narrowPhase = C, this.raw = new cC(A), this.rawCharacterCollision = new Og(), this._applyImpulsesToDynamicBodies = !1, this._characterMass = null;
3572
+ this.params = I, this.bodies = Q, this.colliders = E, this.broadPhase = g, this.narrowPhase = C, this.raw = new cC(A), this.rawCharacterCollision = new Wg(), this._applyImpulsesToDynamicBodies = !1, this._characterMass = null;
3573
3573
  }
3574
3574
  free() {
3575
3575
  this.raw && (this.raw.free(), this.rawCharacterCollision.free()), this.raw = void 0, this.rawCharacterCollision = void 0;
@@ -3676,7 +3676,7 @@ class hC {
3676
3676
  }
3677
3677
  (function(i) {
3678
3678
  i[i.None = 0] = "None", i[i.LinX = 1] = "LinX", i[i.LinY = 2] = "LinY", i[i.LinZ = 4] = "LinZ", i[i.AngZ = 32] = "AngZ", i[i.AllLin = 3] = "AllLin", i[i.AllAng = 32] = "AllAng", i[i.All = 35] = "All";
3679
- })(OI || (OI = {}));
3679
+ })(WI || (WI = {}));
3680
3680
  class sC {
3681
3681
  constructor(A, I, g, C, Q, E) {
3682
3682
  this.params = A, this.bodies = I, this.raw = new YC(g, C, Q, E);
@@ -3715,8 +3715,8 @@ class sC {
3715
3715
  }
3716
3716
  }
3717
3717
  class RI {
3718
- constructor(A, I, g, C, Q, E, D, o, w, G, s, K, S) {
3719
- this.gravity = A, this.integrationParameters = new Xg(I), this.islands = new QC(g), this.broadPhase = new BC(C), this.narrowPhase = new EC(Q), this.bodies = new mg(E), this.colliders = new SC(D), this.impulseJoints = new _g(o), this.multibodyJoints = new gC(w), this.ccdSolver = new CC(G), this.physicsPipeline = new DC(s), this.serializationPipeline = new mI(K), this.debugRenderPipeline = new wC(S), this.characterControllers = /* @__PURE__ */ new Set(), this.pidControllers = /* @__PURE__ */ new Set(), this.impulseJoints.finalizeDeserialization(this.bodies), this.bodies.finalizeDeserialization(this.colliders), this.colliders.finalizeDeserialization(this.bodies);
3718
+ constructor(A, I, g, C, Q, E, D, o, w, h, G, S, K) {
3719
+ this.gravity = A, this.integrationParameters = new Xg(I), this.islands = new QC(g), this.broadPhase = new BC(C), this.narrowPhase = new EC(Q), this.bodies = new mg(E), this.colliders = new SC(D), this.impulseJoints = new _g(o), this.multibodyJoints = new gC(w), this.ccdSolver = new CC(h), this.physicsPipeline = new DC(G), this.serializationPipeline = new mI(S), this.debugRenderPipeline = new wC(K), this.characterControllers = /* @__PURE__ */ new Set(), this.pidControllers = /* @__PURE__ */ new Set(), this.impulseJoints.finalizeDeserialization(this.bodies), this.bodies.finalizeDeserialization(this.colliders), this.colliders.finalizeDeserialization(this.bodies);
3720
3720
  }
3721
3721
  free() {
3722
3722
  this.integrationParameters.free(), this.islands.free(), this.broadPhase.free(), this.narrowPhase.free(), this.bodies.free(), this.colliders.free(), this.impulseJoints.free(), this.multibodyJoints.free(), this.ccdSolver.free(), this.physicsPipeline.free(), this.serializationPipeline.free(), this.debugRenderPipeline.free(), this.characterControllers.forEach((A) => A.free()), this.pidControllers.forEach((A) => A.free()), this.integrationParameters = void 0, this.islands = void 0, this.broadPhase = void 0, this.narrowPhase = void 0, this.bodies = void 0, this.colliders = void 0, this.ccdSolver = void 0, this.impulseJoints = void 0, this.multibodyJoints = void 0, this.physicsPipeline = void 0, this.serializationPipeline = void 0, this.debugRenderPipeline = void 0, this.characterControllers = void 0, this.pidControllers = void 0;
@@ -3851,8 +3851,8 @@ class RI {
3851
3851
  intersectionsWithPoint(A, I, g, C, Q, E, D) {
3852
3852
  this.broadPhase.intersectionsWithPoint(this.narrowPhase, this.bodies, this.colliders, A, this.colliders.castClosure(I), g, C, Q ? Q.handle : null, E ? E.handle : null, this.colliders.castClosure(D));
3853
3853
  }
3854
- castShape(A, I, g, C, Q, E, D, o, w, G, s, K) {
3855
- return this.broadPhase.castShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, Q, E, D, o, w, G ? G.handle : null, s ? s.handle : null, this.colliders.castClosure(K));
3854
+ castShape(A, I, g, C, Q, E, D, o, w, h, G, S) {
3855
+ return this.broadPhase.castShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, C, Q, E, D, o, w, h ? h.handle : null, G ? G.handle : null, this.colliders.castClosure(S));
3856
3856
  }
3857
3857
  intersectionsWithShape(A, I, g, C, Q, E, D, o, w) {
3858
3858
  this.broadPhase.intersectionsWithShape(this.narrowPhase, this.bodies, this.colliders, A, I, g, this.colliders.castClosure(C), Q, E, D ? D.handle : null, o ? o.handle : null, this.colliders.castClosure(w));
@@ -3955,7 +3955,7 @@ class KC {
3955
3955
  }
3956
3956
  class rC {
3957
3957
  constructor(A, I) {
3958
- this.raw = I || new Wg(A);
3958
+ this.raw = I || new Og(A);
3959
3959
  }
3960
3960
  free() {
3961
3961
  this.raw && this.raw.free(), this.raw = void 0;
@@ -3977,7 +3977,7 @@ class rC {
3977
3977
  i[i.NONE = 0] = "NONE", i[i.FILTER_CONTACT_PAIRS = 1] = "FILTER_CONTACT_PAIRS", i[i.FILTER_INTERSECTION_PAIRS = 2] = "FILTER_INTERSECTION_PAIRS";
3978
3978
  })(hI || (hI = {})), function(i) {
3979
3979
  i[i.EMPTY = 0] = "EMPTY", i[i.COMPUTE_IMPULSE = 1] = "COMPUTE_IMPULSE";
3980
- }(WI || (WI = {})), function(i) {
3980
+ }(OI || (OI = {})), function(i) {
3981
3981
  i[i.EXCLUDE_FIXED = 1] = "EXCLUDE_FIXED", i[i.EXCLUDE_KINEMATIC = 2] = "EXCLUDE_KINEMATIC", i[i.EXCLUDE_DYNAMIC = 4] = "EXCLUDE_DYNAMIC", i[i.EXCLUDE_SENSORS = 8] = "EXCLUDE_SENSORS", i[i.EXCLUDE_SOLIDS = 16] = "EXCLUDE_SOLIDS", i[i.ONLY_DYNAMIC = 3] = "ONLY_DYNAMIC", i[i.ONLY_KINEMATIC = 5] = "ONLY_KINEMATIC", i[i.ONLY_FIXED = 6] = "ONLY_FIXED";
3982
3982
  }(jI || (jI = {})), function(i) {
3983
3983
  i[i.DYNAMIC_DYNAMIC = 1] = "DYNAMIC_DYNAMIC", i[i.DYNAMIC_KINEMATIC = 12] = "DYNAMIC_KINEMATIC", i[i.DYNAMIC_FIXED = 2] = "DYNAMIC_FIXED", i[i.KINEMATIC_KINEMATIC = 52224] = "KINEMATIC_KINEMATIC", i[i.KINEMATIC_FIXED = 8704] = "KINEMATIC_FIXED", i[i.FIXED_FIXED = 32] = "FIXED_FIXED", i[i.DEFAULT = 15] = "DEFAULT", i[i.ALL = 60943] = "ALL";
@@ -3990,7 +3990,7 @@ class XI {
3990
3990
  this.handle != null && (this._parent = A.get(this.colliderSet.raw.coParent(this.handle)));
3991
3991
  }
3992
3992
  ensureShapeIsCached() {
3993
- this._shape || (this._shape = DA.fromRaw(this.colliderSet.raw, this.handle));
3993
+ this._shape || (this._shape = sA.fromRaw(this.colliderSet.raw, this.handle));
3994
3994
  }
3995
3995
  get shape() {
3996
3996
  return this.ensureShapeIsCached(), this._shape;
@@ -4008,10 +4008,10 @@ class XI {
4008
4008
  return N.fromRaw(this.colliderSet.raw.coTranslationWrtParent(this.handle));
4009
4009
  }
4010
4010
  rotation() {
4011
- return x.fromRaw(this.colliderSet.raw.coRotation(this.handle));
4011
+ return m.fromRaw(this.colliderSet.raw.coRotation(this.handle));
4012
4012
  }
4013
4013
  rotationWrtParent() {
4014
- return x.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle));
4014
+ return m.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle));
4015
4015
  }
4016
4016
  isSensor() {
4017
4017
  return this.colliderSet.raw.coIsSensor(this.handle);
@@ -4192,19 +4192,19 @@ class XI {
4192
4192
  return g.free(), C.free(), Q;
4193
4193
  }
4194
4194
  castShape(A, I, g, C, Q, E, D, o) {
4195
- let w = N.intoRaw(A), G = N.intoRaw(g), s = x.intoRaw(C), K = N.intoRaw(Q), S = I.intoRaw(), J = XA.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, w, S, G, s, K, E, D, o));
4196
- return w.free(), G.free(), s.free(), K.free(), S.free(), J;
4195
+ let w = N.intoRaw(A), h = N.intoRaw(g), G = m.intoRaw(C), S = N.intoRaw(Q), K = I.intoRaw(), J = XA.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, w, K, h, G, S, E, D, o));
4196
+ return w.free(), h.free(), G.free(), S.free(), K.free(), J;
4197
4197
  }
4198
4198
  castCollider(A, I, g, C, Q, E) {
4199
4199
  let D = N.intoRaw(A), o = N.intoRaw(g), w = EI.fromRaw(this.colliderSet, this.colliderSet.raw.coCastCollider(this.handle, D, I.handle, o, C, Q, E));
4200
4200
  return D.free(), o.free(), w;
4201
4201
  }
4202
4202
  intersectsShape(A, I, g) {
4203
- let C = N.intoRaw(I), Q = x.intoRaw(g), E = A.intoRaw(), D = this.colliderSet.raw.coIntersectsShape(this.handle, E, C, Q);
4203
+ let C = N.intoRaw(I), Q = m.intoRaw(g), E = A.intoRaw(), D = this.colliderSet.raw.coIntersectsShape(this.handle, E, C, Q);
4204
4204
  return C.free(), Q.free(), E.free(), D;
4205
4205
  }
4206
4206
  contactShape(A, I, g, C) {
4207
- let Q = N.intoRaw(I), E = x.intoRaw(g), D = A.intoRaw(), o = mA.fromRaw(this.colliderSet.raw.coContactShape(this.handle, D, Q, E, C));
4207
+ let Q = N.intoRaw(I), E = m.intoRaw(g), D = A.intoRaw(), o = mA.fromRaw(this.colliderSet.raw.coContactShape(this.handle, D, Q, E, C));
4208
4208
  return Q.free(), E.free(), D.free(), o;
4209
4209
  }
4210
4210
  contactCollider(A, I) {
@@ -4221,74 +4221,74 @@ class XI {
4221
4221
  }
4222
4222
  (function(i) {
4223
4223
  i[i.Density = 0] = "Density", i[i.Mass = 1] = "Mass", i[i.MassProps = 2] = "MassProps";
4224
- })(bA || (bA = {}));
4225
- class BA {
4224
+ })(TA || (TA = {}));
4225
+ class DA {
4226
4226
  constructor(A) {
4227
- this.enabled = !0, this.shape = A, this.massPropsMode = bA.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = x.identity(), this.translation = N.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = II.Average, this.restitutionCombineRule = II.Average, this.activeCollisionTypes = sI.DEFAULT, this.activeEvents = GI.NONE, this.activeHooks = hI.NONE, this.mass = 0, this.centerOfMass = N.zeros(), this.contactForceEventThreshold = 0, this.contactSkin = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0;
4227
+ this.enabled = !0, this.shape = A, this.massPropsMode = TA.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = m.identity(), this.translation = N.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = II.Average, this.restitutionCombineRule = II.Average, this.activeCollisionTypes = sI.DEFAULT, this.activeEvents = GI.NONE, this.activeHooks = hI.NONE, this.mass = 0, this.centerOfMass = N.zeros(), this.contactForceEventThreshold = 0, this.contactSkin = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0;
4228
4228
  }
4229
4229
  static ball(A) {
4230
4230
  const I = new Ag(A);
4231
- return new BA(I);
4231
+ return new DA(I);
4232
4232
  }
4233
4233
  static capsule(A, I) {
4234
4234
  const g = new Qg(A, I);
4235
- return new BA(g);
4235
+ return new DA(g);
4236
4236
  }
4237
4237
  static segment(A, I) {
4238
4238
  const g = new Bg(A, I);
4239
- return new BA(g);
4239
+ return new DA(g);
4240
4240
  }
4241
4241
  static triangle(A, I, g) {
4242
4242
  const C = new Eg(A, I, g);
4243
- return new BA(C);
4243
+ return new DA(C);
4244
4244
  }
4245
4245
  static roundTriangle(A, I, g, C) {
4246
4246
  const Q = new ig(A, I, g, C);
4247
- return new BA(Q);
4247
+ return new DA(Q);
4248
4248
  }
4249
4249
  static polyline(A, I) {
4250
4250
  const g = new Dg(A, I);
4251
- return new BA(g);
4251
+ return new DA(g);
4252
4252
  }
4253
4253
  static voxels(A, I) {
4254
4254
  const g = new og(A, I);
4255
- return new BA(g);
4255
+ return new DA(g);
4256
4256
  }
4257
4257
  static trimesh(A, I, g) {
4258
4258
  const C = new wg(A, I, g);
4259
- return new BA(C);
4259
+ return new DA(C);
4260
4260
  }
4261
4261
  static cuboid(A, I) {
4262
4262
  const g = new gg(A, I);
4263
- return new BA(g);
4263
+ return new DA(g);
4264
4264
  }
4265
4265
  static roundCuboid(A, I, g) {
4266
4266
  const C = new Cg(A, I, g);
4267
- return new BA(C);
4267
+ return new DA(C);
4268
4268
  }
4269
4269
  static halfspace(A) {
4270
4270
  const I = new Ig(A);
4271
- return new BA(I);
4271
+ return new DA(I);
4272
4272
  }
4273
4273
  static heightfield(A, I) {
4274
4274
  const g = new Gg(A, I);
4275
- return new BA(g);
4275
+ return new DA(g);
4276
4276
  }
4277
4277
  static convexHull(A) {
4278
4278
  const I = new KI(A, !1);
4279
- return new BA(I);
4279
+ return new DA(I);
4280
4280
  }
4281
4281
  static convexPolyline(A) {
4282
4282
  const I = new KI(A, !0);
4283
- return new BA(I);
4283
+ return new DA(I);
4284
4284
  }
4285
4285
  static roundConvexHull(A, I) {
4286
4286
  const g = new SI(A, I, !1);
4287
- return new BA(g);
4287
+ return new DA(g);
4288
4288
  }
4289
4289
  static roundConvexPolyline(A, I) {
4290
4290
  const g = new SI(A, I, !0);
4291
- return new BA(g);
4291
+ return new DA(g);
4292
4292
  }
4293
4293
  setTranslation(A, I) {
4294
4294
  if (typeof A != "number" || typeof I != "number") throw TypeError("The translation components must be numbers.");
@@ -4307,13 +4307,13 @@ class BA {
4307
4307
  return this.contactSkin = A, this;
4308
4308
  }
4309
4309
  setDensity(A) {
4310
- return this.massPropsMode = bA.Density, this.density = A, this;
4310
+ return this.massPropsMode = TA.Density, this.density = A, this;
4311
4311
  }
4312
4312
  setMass(A) {
4313
- return this.massPropsMode = bA.Mass, this.mass = A, this;
4313
+ return this.massPropsMode = TA.Mass, this.mass = A, this;
4314
4314
  }
4315
4315
  setMassProperties(A, I, g) {
4316
- return this.massPropsMode = bA.MassProps, this.mass = A, N.copy(this.centerOfMass, I), this.principalAngularInertia = g, this;
4316
+ return this.massPropsMode = TA.MassProps, this.mass = A, N.copy(this.centerOfMass, I), this.principalAngularInertia = g, this;
4317
4317
  }
4318
4318
  setRestitution(A) {
4319
4319
  return this.restitution = A, this;
@@ -4348,7 +4348,7 @@ class BA {
4348
4348
  }
4349
4349
  class SC {
4350
4350
  constructor(A) {
4351
- this.raw = A || new _(), this.map = new JI(), A && A.forEachColliderHandle((I) => {
4351
+ this.raw = A || new gA(), this.map = new JI(), A && A.forEachColliderHandle((I) => {
4352
4352
  this.map.set(I, new XI(this, I, null));
4353
4353
  });
4354
4354
  }
@@ -4364,10 +4364,10 @@ class SC {
4364
4364
  createCollider(A, I, g) {
4365
4365
  let C = g != null && g != null;
4366
4366
  if (C && isNaN(g)) throw Error("Cannot create a collider with a parent rigid-body handle that is not a number.");
4367
- let Q = I.shape.intoRaw(), E = N.intoRaw(I.translation), D = x.intoRaw(I.rotation), o = N.intoRaw(I.centerOfMass), w = this.raw.createCollider(I.enabled, Q, E, D, I.massPropsMode, I.mass, o, I.principalAngularInertia, I.density, I.friction, I.restitution, I.frictionCombineRule, I.restitutionCombineRule, I.isSensor, I.collisionGroups, I.solverGroups, I.activeCollisionTypes, I.activeHooks, I.activeEvents, I.contactForceEventThreshold, I.contactSkin, C, C ? g : 0, A.raw);
4367
+ let Q = I.shape.intoRaw(), E = N.intoRaw(I.translation), D = m.intoRaw(I.rotation), o = N.intoRaw(I.centerOfMass), w = this.raw.createCollider(I.enabled, Q, E, D, I.massPropsMode, I.mass, o, I.principalAngularInertia, I.density, I.friction, I.restitution, I.frictionCombineRule, I.restitutionCombineRule, I.isSensor, I.collisionGroups, I.solverGroups, I.activeCollisionTypes, I.activeHooks, I.activeEvents, I.contactForceEventThreshold, I.contactSkin, C, C ? g : 0, A.raw);
4368
4368
  Q.free(), E.free(), D.free(), o.free();
4369
- let G = C ? A.get(g) : null, s = new XI(this, w, G, I.shape);
4370
- return this.map.set(w, s), s;
4369
+ let h = C ? A.get(g) : null, G = new XI(this, w, h, I.shape);
4370
+ return this.map.set(w, G), G;
4371
4371
  }
4372
4372
  remove(A, I, g, C) {
4373
4373
  this.raw.remove(A, I.raw, g.raw, C), this.unmap(A);
@@ -4396,21 +4396,21 @@ function qC(i, A, I, g) {
4396
4396
  function E(w) {
4397
4397
  try {
4398
4398
  o(g.next(w));
4399
- } catch (G) {
4400
- Q(G);
4399
+ } catch (h) {
4400
+ Q(h);
4401
4401
  }
4402
4402
  }
4403
4403
  function D(w) {
4404
4404
  try {
4405
4405
  o(g.throw(w));
4406
- } catch (G) {
4407
- Q(G);
4406
+ } catch (h) {
4407
+ Q(h);
4408
4408
  }
4409
4409
  }
4410
4410
  function o(w) {
4411
- var G;
4412
- w.done ? C(w.value) : (G = w.value, G instanceof I ? G : new I(function(s) {
4413
- s(G);
4411
+ var h;
4412
+ w.done ? C(w.value) : (h = w.value, h instanceof I ? h : new I(function(G) {
4413
+ G(h);
4414
4414
  })).then(E, D);
4415
4415
  }
4416
4416
  o((g = g.apply(i, [])).next());
@@ -4420,15 +4420,15 @@ for (var lC = { byteLength: function(i) {
4420
4420
  var A = fg(i), I = A[0], g = A[1];
4421
4421
  return 3 * (I + g) / 4 - g;
4422
4422
  }, toByteArray: function(i) {
4423
- var A, I, g = fg(i), C = g[0], Q = g[1], E = new nC(function(w, G, s) {
4424
- return 3 * (G + s) / 4 - s;
4423
+ var A, I, g = fg(i), C = g[0], Q = g[1], E = new nC(function(w, h, G) {
4424
+ return 3 * (h + G) / 4 - G;
4425
4425
  }(0, C, Q)), D = 0, o = Q > 0 ? C - 4 : C;
4426
- for (I = 0; I < o; I += 4) A = yA[i.charCodeAt(I)] << 18 | yA[i.charCodeAt(I + 1)] << 12 | yA[i.charCodeAt(I + 2)] << 6 | yA[i.charCodeAt(I + 3)], E[D++] = A >> 16 & 255, E[D++] = A >> 8 & 255, E[D++] = 255 & A;
4427
- return Q === 2 && (A = yA[i.charCodeAt(I)] << 2 | yA[i.charCodeAt(I + 1)] >> 4, E[D++] = 255 & A), Q === 1 && (A = yA[i.charCodeAt(I)] << 10 | yA[i.charCodeAt(I + 1)] << 4 | yA[i.charCodeAt(I + 2)] >> 2, E[D++] = A >> 8 & 255, E[D++] = 255 & A), E;
4426
+ for (I = 0; I < o; I += 4) A = UA[i.charCodeAt(I)] << 18 | UA[i.charCodeAt(I + 1)] << 12 | UA[i.charCodeAt(I + 2)] << 6 | UA[i.charCodeAt(I + 3)], E[D++] = A >> 16 & 255, E[D++] = A >> 8 & 255, E[D++] = 255 & A;
4427
+ return Q === 2 && (A = UA[i.charCodeAt(I)] << 2 | UA[i.charCodeAt(I + 1)] >> 4, E[D++] = 255 & A), Q === 1 && (A = UA[i.charCodeAt(I)] << 10 | UA[i.charCodeAt(I + 1)] << 4 | UA[i.charCodeAt(I + 2)] >> 2, E[D++] = A >> 8 & 255, E[D++] = 255 & A), E;
4428
4428
  }, fromByteArray: function(i) {
4429
4429
  for (var A, I = i.length, g = I % 3, C = [], Q = 16383, E = 0, D = I - g; E < D; E += Q) C.push(pC(i, E, E + Q > D ? D : E + Q));
4430
- return g === 1 ? (A = i[I - 1], C.push(RA[A >> 2] + RA[A << 4 & 63] + "==")) : g === 2 && (A = (i[I - 2] << 8) + i[I - 1], C.push(RA[A >> 10] + RA[A >> 4 & 63] + RA[A << 2 & 63] + "=")), C.join("");
4431
- } }, RA = [], yA = [], nC = typeof Uint8Array < "u" ? Uint8Array : Array, pI = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", jA = 0, HC = pI.length; jA < HC; ++jA) RA[jA] = pI[jA], yA[pI.charCodeAt(jA)] = jA;
4430
+ return g === 1 ? (A = i[I - 1], C.push(LA[A >> 2] + LA[A << 4 & 63] + "==")) : g === 2 && (A = (i[I - 2] << 8) + i[I - 1], C.push(LA[A >> 10] + LA[A >> 4 & 63] + LA[A << 2 & 63] + "=")), C.join("");
4431
+ } }, LA = [], UA = [], nC = typeof Uint8Array < "u" ? Uint8Array : Array, pI = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", jA = 0, HC = pI.length; jA < HC; ++jA) LA[jA] = pI[jA], UA[pI.charCodeAt(jA)] = jA;
4432
4432
  function fg(i) {
4433
4433
  var A = i.length;
4434
4434
  if (A % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
@@ -4436,7 +4436,7 @@ function fg(i) {
4436
4436
  return I === -1 && (I = A), [I, I === A ? 0 : 4 - I % 4];
4437
4437
  }
4438
4438
  function pC(i, A, I) {
4439
- for (var g, C, Q = [], E = A; E < I; E += 3) g = (i[E] << 16 & 16711680) + (i[E + 1] << 8 & 65280) + (255 & i[E + 2]), Q.push(RA[(C = g) >> 18 & 63] + RA[C >> 12 & 63] + RA[C >> 6 & 63] + RA[63 & C]);
4439
+ for (var g, C, Q = [], E = A; E < I; E += 3) g = (i[E] << 16 & 16711680) + (i[E + 1] << 8 & 65280) + (255 & i[E + 2]), Q.push(LA[(C = g) >> 18 & 63] + LA[C >> 12 & 63] + LA[C >> 6 & 63] + LA[63 & C]);
4440
4440
  return Q.join("");
4441
4441
  }
4442
4442
  function dC() {
@@ -4450,7 +4450,7 @@ function fC() {
4450
4450
  try {
4451
4451
  const C = B.__wbindgen_add_to_stack_pointer(-16);
4452
4452
  B.version(C);
4453
- var I = EA().getInt32(C + 0, !0), g = EA().getInt32(C + 4, !0);
4453
+ var I = oA().getInt32(C + 0, !0), g = oA().getInt32(C + 4, !0);
4454
4454
  return i = I, A = g, dI(I, g);
4455
4455
  } finally {
4456
4456
  B.__wbindgen_add_to_stack_pointer(16), B.__wbindgen_export_1(i, A, 1);
@@ -4461,47 +4461,47 @@ function bC(i) {
4461
4461
  var A;
4462
4462
  A = i, B.reserve_memory(A);
4463
4463
  }
4464
- yA[45] = 62, yA[95] = 63;
4465
- var SA = Object.freeze({ __proto__: null, version: fC, reserveMemory: bC, Vector2: xg, VectorOps: N, RotationOps: x, get RigidBodyType() {
4466
- return JA;
4467
- }, RigidBody: xI, RigidBodyDesc: UA, RigidBodySet: mg, IntegrationParameters: Xg, get JointType() {
4468
- return aA;
4464
+ UA[45] = 62, UA[95] = 63;
4465
+ var kA = Object.freeze({ __proto__: null, version: fC, reserveMemory: bC, Vector2: xg, VectorOps: N, RotationOps: m, get RigidBodyType() {
4466
+ return RA;
4467
+ }, RigidBody: xI, RigidBodyDesc: YA, RigidBodySet: mg, IntegrationParameters: Xg, get JointType() {
4468
+ return FA;
4469
4469
  }, get MotorModel() {
4470
4470
  return bI;
4471
4471
  }, get JointAxesMask() {
4472
4472
  return TI;
4473
- }, ImpulseJoint: eA, UnitImpulseJoint: _I, FixedImpulseJoint: vg, RopeImpulseJoint: ug, SpringImpulseJoint: Vg, PrismaticImpulseJoint: Pg, RevoluteImpulseJoint: zg, JointData: fA, ImpulseJointSet: _g, MultibodyJoint: ZA, UnitMultibodyJoint: $I, FixedMultibodyJoint: $g, PrismaticMultibodyJoint: AC, RevoluteMultibodyJoint: IC, MultibodyJointSet: gC, get CoefficientCombineRule() {
4473
+ }, ImpulseJoint: lA, UnitImpulseJoint: _I, FixedImpulseJoint: vg, RopeImpulseJoint: ug, SpringImpulseJoint: Vg, PrismaticImpulseJoint: Pg, RevoluteImpulseJoint: zg, JointData: bA, ImpulseJointSet: _g, MultibodyJoint: WA, UnitMultibodyJoint: $I, FixedMultibodyJoint: $g, PrismaticMultibodyJoint: AC, RevoluteMultibodyJoint: IC, MultibodyJointSet: gC, get CoefficientCombineRule() {
4474
4474
  return II;
4475
- }, CCDSolver: CC, IslandManager: QC, BroadPhase: BC, NarrowPhase: EC, TempContactManifold: iC, Shape: DA, get ShapeType() {
4476
- return iA;
4475
+ }, CCDSolver: CC, IslandManager: QC, BroadPhase: BC, NarrowPhase: EC, TempContactManifold: iC, Shape: sA, get ShapeType() {
4476
+ return GA;
4477
4477
  }, get TriMeshFlags() {
4478
4478
  return ZI;
4479
4479
  }, Ball: Ag, HalfSpace: Ig, Cuboid: gg, RoundCuboid: Cg, Capsule: Qg, Segment: Bg, Triangle: Eg, RoundTriangle: ig, Polyline: Dg, Voxels: og, TriMesh: wg, ConvexPolygon: KI, RoundConvexPolygon: SI, Heightfield: Gg, get ActiveCollisionTypes() {
4480
4480
  return sI;
4481
4481
  }, Collider: XI, get MassPropsMode() {
4482
- return bA;
4483
- }, ColliderDesc: BA, ColliderSet: SC, get FeatureType() {
4482
+ return TA;
4483
+ }, ColliderDesc: DA, ColliderSet: SC, get FeatureType() {
4484
4484
  return xA;
4485
4485
  }, Ray: eC, RayIntersection: QI, RayColliderIntersection: gI, RayColliderHit: UI, PointProjection: BI, PointColliderProjection: CI, ShapeCastHit: XA, ColliderShapeCastHit: EI, ShapeContact: mA, World: RI, PhysicsPipeline: DC, SerializationPipeline: mI, get ActiveEvents() {
4486
4486
  return GI;
4487
4487
  }, TempContactForceEvent: KC, EventQueue: rC, get ActiveHooks() {
4488
4488
  return hI;
4489
4489
  }, get SolverFlags() {
4490
- return WI;
4490
+ return OI;
4491
4491
  }, DebugRenderBuffers: oC, DebugRenderPipeline: wC, get QueryFilterFlags() {
4492
4492
  return jI;
4493
4493
  }, init: dC, CharacterCollision: GC, KinematicCharacterController: hC, get PidAxesMask() {
4494
- return OI;
4494
+ return WI;
4495
4495
  }, PidController: sC });
4496
4496
  class TC {
4497
4497
  constructor() {
4498
- V(this, "world", null);
4499
- V(this, "bodies", /* @__PURE__ */ new Map());
4500
- V(this, "colliders", /* @__PURE__ */ new Map());
4501
- V(this, "initialized", !1);
4498
+ _(this, "world", null);
4499
+ _(this, "bodies", /* @__PURE__ */ new Map());
4500
+ _(this, "colliders", /* @__PURE__ */ new Map());
4501
+ _(this, "initialized", !1);
4502
4502
  }
4503
4503
  async init(A) {
4504
- this.initialized || (await SA.init(), this.world = new SA.World(new SA.Vector2(A.x, A.y)), this.initialized = !0);
4504
+ this.initialized || (await kA.init(), this.world = new kA.World(new kA.Vector2(A.x, A.y)), this.initialized = !0);
4505
4505
  }
4506
4506
  destroy() {
4507
4507
  this.bodies.clear(), this.colliders.clear(), this.world && (this.world.free(), this.world = null), this.initialized = !1;
@@ -4512,32 +4512,32 @@ class TC {
4512
4512
  return;
4513
4513
  }
4514
4514
  this.bodies.has(A.id) && this.removeBody(A.id);
4515
- const I = A.isStatic ? SA.RigidBodyDesc.fixed() : SA.RigidBodyDesc.dynamic();
4515
+ const I = A.isStatic ? kA.RigidBodyDesc.fixed() : kA.RigidBodyDesc.dynamic();
4516
4516
  I.setTranslation(A.x, A.y), A.rotation !== void 0 && I.setRotation(A.rotation);
4517
4517
  const g = this.world.createRigidBody(I);
4518
4518
  let C;
4519
4519
  switch (A.type) {
4520
4520
  case "Rectangle":
4521
- C = SA.ColliderDesc.cuboid(
4521
+ C = kA.ColliderDesc.cuboid(
4522
4522
  A.width / 2,
4523
4523
  A.height / 2
4524
4524
  );
4525
4525
  break;
4526
4526
  case "Ellipse":
4527
- C = SA.ColliderDesc.ball(
4527
+ C = kA.ColliderDesc.ball(
4528
4528
  Math.max(A.width, A.height) / 2
4529
4529
  );
4530
4530
  break;
4531
4531
  case "Triangle":
4532
4532
  case "Star":
4533
4533
  case "Polygon":
4534
- C = SA.ColliderDesc.cuboid(
4534
+ C = kA.ColliderDesc.cuboid(
4535
4535
  A.width / 2,
4536
4536
  A.height / 2
4537
4537
  );
4538
4538
  break;
4539
4539
  default:
4540
- C = SA.ColliderDesc.cuboid(
4540
+ C = kA.ColliderDesc.cuboid(
4541
4541
  A.width / 2,
4542
4542
  A.height / 2
4543
4543
  );
@@ -4577,7 +4577,7 @@ class TC {
4577
4577
  }
4578
4578
  setPosition(A, I, g) {
4579
4579
  const C = this.bodies.get(A);
4580
- C && C.setTranslation(new SA.Vector2(I, g), !0);
4580
+ C && C.setTranslation(new kA.Vector2(I, g), !0);
4581
4581
  }
4582
4582
  setRotation(A, I) {
4583
4583
  const g = this.bodies.get(A);
@@ -4585,46 +4585,46 @@ class TC {
4585
4585
  }
4586
4586
  setVelocity(A, I, g) {
4587
4587
  const C = this.bodies.get(A);
4588
- C && C.setLinvel(new SA.Vector2(I, g), !0);
4588
+ C && C.setLinvel(new kA.Vector2(I, g), !0);
4589
4589
  }
4590
4590
  applyForce(A, I, g) {
4591
4591
  const C = this.bodies.get(A);
4592
- C && C.addForce(new SA.Vector2(I, g), !0);
4592
+ C && C.addForce(new kA.Vector2(I, g), !0);
4593
4593
  }
4594
4594
  applyImpulse(A, I, g) {
4595
4595
  const C = this.bodies.get(A);
4596
- C && C.applyImpulse(new SA.Vector2(I, g), !0);
4596
+ C && C.applyImpulse(new kA.Vector2(I, g), !0);
4597
4597
  }
4598
4598
  }
4599
4599
  class ZC {
4600
4600
  constructor() {
4601
- V(this, "artboard", null);
4602
- V(this, "objectStates", /* @__PURE__ */ new Map());
4601
+ _(this, "artboard", null);
4602
+ _(this, "objectStates", /* @__PURE__ */ new Map());
4603
4603
  // Physics State
4604
- V(this, "physicsEngine", null);
4604
+ _(this, "physicsEngine", null);
4605
4605
  // State Machine State
4606
- V(this, "activeStateMachine", null);
4607
- V(this, "inputs", /* @__PURE__ */ new Map());
4606
+ _(this, "activeStateMachine", null);
4607
+ _(this, "inputs", /* @__PURE__ */ new Map());
4608
4608
  // id -> value
4609
- V(this, "inputNameMap", /* @__PURE__ */ new Map());
4609
+ _(this, "inputNameMap", /* @__PURE__ */ new Map());
4610
4610
  // name -> id[] mapping
4611
- V(this, "layerStates", /* @__PURE__ */ new Map());
4612
- V(this, "imageCache", /* @__PURE__ */ new Map());
4613
- V(this, "layout", { fit: "Contain", alignment: "Center" });
4614
- V(this, "onTrigger");
4615
- V(this, "onInputUpdate");
4616
- V(this, "onComponentChange");
4611
+ _(this, "layerStates", /* @__PURE__ */ new Map());
4612
+ _(this, "imageCache", /* @__PURE__ */ new Map());
4613
+ _(this, "layout", { fit: "Contain", alignment: "Center" });
4614
+ _(this, "onTrigger");
4615
+ _(this, "onInputUpdate");
4616
+ _(this, "onComponentChange");
4617
4617
  // Track triggers that were just fired in the current frame
4618
- V(this, "justFiredTriggers", /* @__PURE__ */ new Set());
4618
+ _(this, "justFiredTriggers", /* @__PURE__ */ new Set());
4619
4619
  // Track currently hovered object for Enter/Leave events
4620
- V(this, "lastHoveredObjectId", null);
4621
- V(this, "_lastPointerPos", null);
4620
+ _(this, "lastHoveredObjectId", null);
4621
+ _(this, "_lastPointerPos", null);
4622
4622
  // Interaction State
4623
- V(this, "focusedId", null);
4624
- V(this, "draggingSliderId", null);
4625
- V(this, "activeDropdownId", null);
4623
+ _(this, "focusedId", null);
4624
+ _(this, "draggingSliderId", null);
4625
+ _(this, "activeDropdownId", null);
4626
4626
  // Trigger Management
4627
- V(this, "activeTriggers", /* @__PURE__ */ new Map());
4627
+ _(this, "activeTriggers", /* @__PURE__ */ new Map());
4628
4628
  }
4629
4629
  setTriggerCallback(A) {
4630
4630
  this.onTrigger = A;
@@ -4759,7 +4759,7 @@ class ZC {
4759
4759
  const o = E.states.find((w) => w.id === D);
4760
4760
  if (o) {
4761
4761
  let w = null;
4762
- o.animationId && (w = this.artboard.animations.find((G) => G.id === o.animationId) || null), w || (w = this.artboard.animations.find((G) => G.name === o.name || G.id === o.name || o.name === "Entry" && G.name === "Rotate") || null), w && (C.push({ animation: w, state: o }), Q = Math.max(Q, w.duration));
4762
+ o.animationId && (w = this.artboard.animations.find((h) => h.id === o.animationId) || null), w || (w = this.artboard.animations.find((h) => h.name === o.name || h.id === o.name || o.name === "Entry" && h.name === "Rotate") || null), w && (C.push({ animation: w, state: o }), Q = Math.max(Q, w.duration));
4763
4763
  }
4764
4764
  }
4765
4765
  }
@@ -4795,7 +4795,7 @@ class ZC {
4795
4795
  } else {
4796
4796
  const o = this.inputNameMap.get(A);
4797
4797
  if (o && o.length > 0) {
4798
- const w = (D = this.activeStateMachine) == null ? void 0 : D.inputs.find((G) => G.id === o[0]);
4798
+ const w = (D = this.activeStateMachine) == null ? void 0 : D.inputs.find((h) => h.id === o[0]);
4799
4799
  w && typeof w.value == "object" && (g = w.value.type);
4800
4800
  }
4801
4801
  }
@@ -4816,11 +4816,11 @@ class ZC {
4816
4816
  let D = !1;
4817
4817
  for (const o of E.transitions)
4818
4818
  this.checkConditions(o.conditions) && (g.push(o.targetStateId), D = !0, C = !0, o.conditions && o.conditions.forEach((w) => {
4819
- var s;
4820
- const G = (s = this.activeStateMachine) == null ? void 0 : s.inputs.find((K) => K.id === w.inputId);
4821
- if (G && typeof G.value == "object" && G.value.type === "Number" && (this.setInternalInput(w.inputId, 0), this.inputNameMap.has(G.name))) {
4822
- const K = this.inputNameMap.get(G.name);
4823
- K == null || K.forEach((S) => this.setInternalInput(S, 0));
4819
+ var G;
4820
+ const h = (G = this.activeStateMachine) == null ? void 0 : G.inputs.find((S) => S.id === w.inputId);
4821
+ if (h && typeof h.value == "object" && h.value.type === "Number" && (this.setInternalInput(w.inputId, 0), this.inputNameMap.has(h.name))) {
4822
+ const S = this.inputNameMap.get(h.name);
4823
+ S == null || S.forEach((K) => this.setInternalInput(K, 0));
4824
4824
  }
4825
4825
  }));
4826
4826
  D || g.push(Q);
@@ -4832,7 +4832,7 @@ class ZC {
4832
4832
  const D = (o = this.activeStateMachine) == null ? void 0 : o.inputs.find((w) => w.id === E.inputId);
4833
4833
  if (D && typeof D.value == "object" && D.value.type === "Number" && (this.setInternalInput(E.inputId, 0), this.inputNameMap.has(D.name))) {
4834
4834
  const w = this.inputNameMap.get(D.name);
4835
- w == null || w.forEach((G) => this.setInternalInput(G, 0));
4835
+ w == null || w.forEach((h) => this.setInternalInput(h, 0));
4836
4836
  }
4837
4837
  }));
4838
4838
  }
@@ -4908,9 +4908,9 @@ class ZC {
4908
4908
  g.add(A);
4909
4909
  const C = (D = (E = this.activeStateMachine) == null ? void 0 : E.logicNodes) == null ? void 0 : D.find((w) => w.id === A);
4910
4910
  if (C) {
4911
- const w = (G, s) => {
4912
- const K = C.inputs.find((S) => S.id === G);
4913
- return K ? K.sourceId ? this.evaluateLogicTree(K.sourceId, K.sourceHandleId, g) : K.value !== void 0 ? K.value : s : s;
4911
+ const w = (h, G) => {
4912
+ const S = C.inputs.find((K) => K.id === h);
4913
+ return S ? S.sourceId ? this.evaluateLogicTree(S.sourceId, S.sourceHandleId, g) : S.value !== void 0 ? S.value : G : G;
4914
4914
  };
4915
4915
  switch (C.op) {
4916
4916
  case uA.AND:
@@ -4927,12 +4927,12 @@ class ZC {
4927
4927
  }
4928
4928
  let Q = this.inputs.get(A);
4929
4929
  if (this.justFiredTriggers.has(A) && (Q = !0), I && Q !== void 0) {
4930
- const w = (o = this.activeStateMachine) == null ? void 0 : o.inputs.find((G) => G.id === A);
4930
+ const w = (o = this.activeStateMachine) == null ? void 0 : o.inputs.find((h) => h.id === A);
4931
4931
  if (w && w.value.type === "Number" && typeof Q == "number") {
4932
- const G = w.value.defaultValue ?? w.value.value;
4933
- if (I === "source-greater") return Q > G;
4934
- if (I === "source-less") return Q < G;
4935
- if (I === "source-equal") return Q === G;
4932
+ const h = w.value.defaultValue ?? w.value.value;
4933
+ if (I === "source-greater") return Q > h;
4934
+ if (I === "source-less") return Q < h;
4935
+ if (I === "source-equal") return Q === h;
4936
4936
  }
4937
4937
  if (I === "source-true") return Q === !0;
4938
4938
  if (I === "source-false") return Q === !1;
@@ -4956,15 +4956,15 @@ class ZC {
4956
4956
  this.applyAnimation(g.animation, I.time);
4957
4957
  }));
4958
4958
  })), this.solveConstraints(), this.activeTriggers.forEach((I, g) => {
4959
- var C, Q, E, D, o, w, G;
4959
+ var C, Q, E, D, o, w, h;
4960
4960
  if (I.phase === "entry")
4961
- I.time += A, I.time >= I.animation.duration && ((E = (Q = (C = this.artboard) == null ? void 0 : C.objects.find((s) => s.id === g)) == null ? void 0 : Q.triggers) == null || E.find((s) => s.id === I.triggerId), I.phase = "hold", I.elapsedHold = 0, I.time = I.animation.duration), this.applyAnimation(I.animation, I.time);
4961
+ I.time += A, I.time >= I.animation.duration && ((E = (Q = (C = this.artboard) == null ? void 0 : C.objects.find((G) => G.id === g)) == null ? void 0 : Q.triggers) == null || E.find((G) => G.id === I.triggerId), I.phase = "hold", I.elapsedHold = 0, I.time = I.animation.duration), this.applyAnimation(I.animation, I.time);
4962
4962
  else if (I.phase === "hold") {
4963
- const s = (w = (o = (D = this.artboard) == null ? void 0 : D.objects.find((S) => S.id === g)) == null ? void 0 : o.triggers) == null ? void 0 : w.find((S) => S.id === I.triggerId), K = (s == null ? void 0 : s.duration) || 0;
4964
- if (I.elapsedHold += A * 1e3, I.elapsedHold >= K)
4965
- if (s != null && s.exitAnimationId) {
4966
- const S = (G = this.artboard) == null ? void 0 : G.animations.find((J) => J.id === s.exitAnimationId);
4967
- S ? (I.phase = "exit", I.animation = S, I.time = 0) : this.activeTriggers.delete(g);
4963
+ const G = (w = (o = (D = this.artboard) == null ? void 0 : D.objects.find((K) => K.id === g)) == null ? void 0 : o.triggers) == null ? void 0 : w.find((K) => K.id === I.triggerId), S = (G == null ? void 0 : G.duration) || 0;
4964
+ if (I.elapsedHold += A * 1e3, I.elapsedHold >= S)
4965
+ if (G != null && G.exitAnimationId) {
4966
+ const K = (h = this.artboard) == null ? void 0 : h.animations.find((J) => J.id === G.exitAnimationId);
4967
+ K ? (I.phase = "exit", I.animation = K, I.time = 0) : this.activeTriggers.delete(g);
4968
4968
  } else
4969
4969
  this.activeTriggers.delete(g);
4970
4970
  } else I.phase === "exit" && (I.time += A, I.time >= I.animation.duration ? this.activeTriggers.delete(g) : this.applyAnimation(I.animation, I.time));
@@ -4999,18 +4999,18 @@ class ZC {
4999
4999
  this._lastPointerPos = { x: D, y: o }, this.updateInput("mouseX", D), this.updateInput("mouseY", o), this.handlePointerEvent(A, D, o);
5000
5000
  }
5001
5001
  handlePointerEvent(A, I, g) {
5002
- var o;
5002
+ var o, w;
5003
5003
  if (!this.artboard) return;
5004
5004
  let C = null;
5005
- const Q = (w, G) => {
5006
- let s = G;
5007
- G === "click" ? s = "onClick" : G === "down" ? s = "onPointerDown" : G === "up" ? s = "onPointerUp" : G === "blur" && (s = "onPointerLeave");
5008
- const K = /* @__PURE__ */ new Set([s]);
5009
- return G === "move" && K.add("onPointerEnter").add("hover").add("onPointerLeave").add("blur"), s === "onClick" && K.add("click"), s === "onPointerDown" && K.add("pointerDown"), s === "onPointerUp" && K.add("pointerUp"), !!((w.interactions || []).some((k) => K.has(k.event)) || (w.triggers || []).some((k) => K.has(k.eventType)));
5005
+ const Q = (h, G) => {
5006
+ let S = G;
5007
+ G === "click" ? S = "onClick" : G === "down" ? S = "onPointerDown" : G === "up" ? S = "onPointerUp" : G === "blur" && (S = "onPointerLeave");
5008
+ const K = /* @__PURE__ */ new Set([S]);
5009
+ return G === "move" && K.add("onPointerEnter").add("hover").add("onPointerLeave").add("blur"), S === "onClick" && K.add("click"), S === "onPointerDown" && K.add("pointerDown"), S === "onPointerUp" && K.add("pointerUp"), !!((h.interactions || []).some((y) => K.has(y.event)) || (h.triggers || []).some((y) => K.has(y.eventType)));
5010
5010
  };
5011
5011
  let E = null;
5012
- for (let w = this.artboard.objects.length - 1; w >= 0; w--) {
5013
- const G = this.artboard.objects[w];
5012
+ for (let h = this.artboard.objects.length - 1; h >= 0; h--) {
5013
+ const G = this.artboard.objects[h];
5014
5014
  if (this.hitTest(G, I, g) && (E || (E = G), Q(G, A))) {
5015
5015
  C = G;
5016
5016
  break;
@@ -5020,16 +5020,16 @@ class ZC {
5020
5020
  const D = (C == null ? void 0 : C.id) || null;
5021
5021
  if (A === "move") {
5022
5022
  if (this.draggingSliderId) {
5023
- const w = this.artboard.objects.find((G) => G.id === this.draggingSliderId);
5024
- w && this.updateSliderValueFromPointer(w, I, g);
5023
+ const h = this.artboard.objects.find((G) => G.id === this.draggingSliderId);
5024
+ h && this.updateSliderValueFromPointer(h, I, g);
5025
5025
  return;
5026
5026
  }
5027
5027
  D !== this.lastHoveredObjectId && (console.log(`[Engine] HOVER CHANGE: ${this.lastHoveredObjectId} -> ${D}`), this.lastHoveredObjectId && this.fireEventForObject(this.lastHoveredObjectId, "onPointerLeave"), D && this.fireEventForObject(D, "onPointerEnter"), this.lastHoveredObjectId = D);
5028
5028
  return;
5029
5029
  }
5030
5030
  if ((A === "up" || A === "blur") && (this.draggingSliderId = null), C) {
5031
- let w = A;
5032
- if (A === "click" ? w = "onClick" : A === "down" ? w = "onPointerDown" : A === "up" ? w = "onPointerUp" : A === "blur" && (w = "onPointerLeave"), this.fireEventForObject(C.id, w), C.type === "Component" && C.variant === "toggle_button" && A === "down") {
5031
+ let h = A;
5032
+ if (A === "click" ? h = "onClick" : A === "down" ? h = "onPointerDown" : A === "up" ? h = "onPointerUp" : A === "blur" && (h = "onPointerLeave"), this.fireEventForObject(C.id, h), C.type === "Component" && C.variant === "toggle_button" && A === "down") {
5033
5033
  const G = C.options || {};
5034
5034
  G.checked = !G.checked, C.inputId && this.setInternalInput(C.inputId, G.checked), this.onComponentChange && this.onComponentChange({
5035
5035
  objectId: C.id,
@@ -5050,29 +5050,29 @@ class ZC {
5050
5050
  });
5051
5051
  }
5052
5052
  if (C.type === "Component" && C.variant === "dropdown" && A === "down") {
5053
- const G = C.options || {}, s = !G.isOpen;
5053
+ const G = C.options || {}, S = !G.isOpen;
5054
5054
  if (G.isOpen) {
5055
- const K = C.geometry.height || 40, S = G.optionsList || [], J = G.itemHeight || 32, k = G.listPadding ?? 4, y = this.objectStates.get(C.id), F = g - (y.y + K / 2 + 4);
5056
- if (F >= 0) {
5057
- const M = Math.floor((F - k) / J);
5058
- if (M >= 0 && M < S.length) {
5059
- const U = S[M];
5060
- G.selectedOption = U, G.isOpen = !1, this.activeDropdownId = null, C.inputId && this.setInternalInput(C.inputId, U), this.onComponentChange && this.onComponentChange({
5055
+ const K = ((o = C.geometry) == null ? void 0 : o.height) ?? C.height ?? 40, J = G.optionsList || [], F = G.itemHeight || 32, y = G.listPadding ?? 4, k = this.getWorldTransform(C.id), M = g - (k.y + K / 2 + 4);
5056
+ if (M >= 0) {
5057
+ const U = Math.floor((M - y) / F);
5058
+ if (U >= 0 && U < J.length) {
5059
+ const R = J[U];
5060
+ G.selectedOption = R, G.isOpen = !1, this.activeDropdownId = null, C.inputId && this.setInternalInput(C.inputId, R), this.onComponentChange && this.onComponentChange({
5061
5061
  objectId: C.id,
5062
5062
  componentName: C.name,
5063
5063
  variant: "dropdown",
5064
5064
  property: "selectedOption",
5065
- value: U
5065
+ value: R
5066
5066
  });
5067
5067
  return;
5068
5068
  }
5069
5069
  }
5070
5070
  }
5071
- if (s && this.activeDropdownId && this.activeDropdownId !== C.id) {
5072
- const K = this.artboard.objects.find((S) => S.id === this.activeDropdownId);
5071
+ if (S && this.activeDropdownId && this.activeDropdownId !== C.id) {
5072
+ const K = this.artboard.objects.find((J) => J.id === this.activeDropdownId);
5073
5073
  K && K.options && (K.options.isOpen = !1);
5074
5074
  }
5075
- G.isOpen = s, this.activeDropdownId = s ? C.id : null;
5075
+ G.isOpen = S, this.activeDropdownId = S ? C.id : null;
5076
5076
  }
5077
5077
  if (C.type === "Component" && C.variant === "button" && A === "down" && this.onComponentChange && this.onComponentChange({
5078
5078
  objectId: C.id,
@@ -5081,7 +5081,7 @@ class ZC {
5081
5081
  property: "click",
5082
5082
  value: !0
5083
5083
  }), A === "click") {
5084
- const G = (o = this.artboard) == null ? void 0 : o.objects.find((s) => s.id === C.id);
5084
+ const G = (w = this.artboard) == null ? void 0 : w.objects.find((S) => S.id === C.id);
5085
5085
  (G == null ? void 0 : G.type) === "Component" && G.variant === "inputbox" ? (this.focusedId = C.id, console.log(`[Engine] Focus set to: ${C.id}`)) : this.focusedId = null;
5086
5086
  }
5087
5087
  } else A === "click" && (this.focusedId = null);
@@ -5132,7 +5132,7 @@ class ZC {
5132
5132
  const o = (g.triggers || []).find((w) => C.has(w.eventType));
5133
5133
  if (o && o.entryAnimationId) {
5134
5134
  console.log(`[Engine] Trigger matched: ${I} (as ${o.eventType}) -> Animation ${o.entryAnimationId}`);
5135
- const w = this.artboard.animations.find((G) => G.id === o.entryAnimationId);
5135
+ const w = this.artboard.animations.find((h) => h.id === o.entryAnimationId);
5136
5136
  w && (this.activeTriggers.set(g.id, {
5137
5137
  triggerId: o.id,
5138
5138
  animation: w,
@@ -5142,52 +5142,74 @@ class ZC {
5142
5142
  }), this.onTrigger && this.onTrigger(o.name, w.name));
5143
5143
  }
5144
5144
  }
5145
+ getWorldTransform(A) {
5146
+ var S;
5147
+ const I = this.objectStates.get(A);
5148
+ if (!I) return { x: 0, y: 0, scaleX: 1, scaleY: 1, rotation: 0 };
5149
+ const g = (S = this.artboard) == null ? void 0 : S.objects.find((K) => K.id === A);
5150
+ if (!g || !g.parentId)
5151
+ return {
5152
+ x: I.x,
5153
+ y: I.y,
5154
+ scaleX: I.scale_x ?? 1,
5155
+ scaleY: I.scale_y ?? 1,
5156
+ rotation: I.rotation ?? 0
5157
+ };
5158
+ const C = this.getWorldTransform(g.parentId), Q = C.rotation * (Math.PI / 180), E = Math.cos(Q), D = Math.sin(Q), o = I.x * C.scaleX, w = I.y * C.scaleY, h = C.x + (o * E - w * D), G = C.y + (o * D + w * E);
5159
+ return {
5160
+ x: h,
5161
+ y: G,
5162
+ scaleX: (I.scale_x ?? 1) * C.scaleX,
5163
+ scaleY: (I.scale_y ?? 1) * C.scaleY,
5164
+ rotation: C.rotation + (I.rotation ?? 0)
5165
+ };
5166
+ }
5145
5167
  hitTest(A, I, g) {
5146
- const C = this.objectStates.get(A.id);
5147
- if (!C) return !1;
5148
- const Q = A.geometry.width || 100, E = A.geometry.height || 100, D = I - C.x, o = g - C.y, w = -(C.rotation || 0) * (Math.PI / 180), G = Math.cos(w), s = Math.sin(w), K = D * G - o * s, S = D * s + o * G, J = C.scale_x !== void 0 ? C.scale_x : 1, k = C.scale_y !== void 0 ? C.scale_y : 1, y = Q * Math.abs(J), F = E * Math.abs(k);
5149
- return Math.abs(K) <= y / 2 && Math.abs(S) <= F / 2;
5168
+ var U, R;
5169
+ if (!this.objectStates.get(A.id)) return !1;
5170
+ const Q = ((U = A.geometry) == null ? void 0 : U.width) ?? A.width ?? 100, E = ((R = A.geometry) == null ? void 0 : R.height) ?? A.height ?? 100, D = this.getWorldTransform(A.id), o = I - D.x, w = g - D.y, h = -D.rotation * (Math.PI / 180), G = Math.cos(h), S = Math.sin(h), K = o * G - w * S, J = o * S + w * G, F = D.scaleX, y = D.scaleY, k = Q * Math.abs(F), M = E * Math.abs(y);
5171
+ return Math.abs(K) <= k / 2 && Math.abs(J) <= M / 2;
5150
5172
  }
5151
5173
  updateSliderValueFromPointer(A, I, g) {
5152
- const C = this.objectStates.get(A.id);
5153
- if (!C) return;
5154
- const Q = A.options || {}, E = A.geometry.width || 200, D = I - C.x, o = g - C.y, w = -(C.rotation || 0) * (Math.PI / 180), G = Math.cos(w), s = Math.sin(w), K = D * G - o * s, S = Q.thumbWidth ?? 16, J = E - S;
5155
- let y = (K + J / 2) / J;
5156
- y = Math.max(0, Math.min(1, y));
5157
- const F = Q.min ?? 0, M = Q.max ?? 100, U = Q.step || 1;
5158
- let R = F + y * (M - F);
5159
- U > 0 && (R = Math.round(R / U) * U), R = Math.max(F, Math.min(M, R)), Q.value !== R && (Q.value = R, A.inputId && this.setInternalInput(A.inputId, R), this.onComponentChange && this.onComponentChange({
5174
+ var L;
5175
+ if (!this.objectStates.get(A.id)) return;
5176
+ const Q = A.options || {}, E = ((L = A.geometry) == null ? void 0 : L.width) ?? A.width ?? 200, D = this.getWorldTransform(A.id), o = I - D.x, w = g - D.y, h = -D.rotation * (Math.PI / 180), G = Math.cos(h), S = Math.sin(h), K = o * G - w * S, J = Q.thumbWidth ?? 16, F = E - J;
5177
+ let k = (K + F / 2) / F;
5178
+ k = Math.max(0, Math.min(1, k));
5179
+ const M = Q.min ?? 0, U = Q.max ?? 100, R = Q.step || 1;
5180
+ let Y = M + k * (U - M);
5181
+ R > 0 && (Y = Math.round(Y / R) * R), Y = Math.max(M, Math.min(U, Y)), Q.value !== Y && (Q.value = Y, A.inputId && this.setInternalInput(A.inputId, Y), this.onComponentChange && this.onComponentChange({
5160
5182
  objectId: A.id,
5161
5183
  componentName: A.name,
5162
5184
  variant: "slider",
5163
5185
  property: "value",
5164
- value: R
5186
+ value: Y
5165
5187
  }));
5166
5188
  }
5167
5189
  applyAnimation(A, I) {
5168
5190
  A.tracks.forEach((g) => {
5169
- var o, w, G;
5170
- const C = (o = this.artboard) == null ? void 0 : o.objects.find((s) => s.id === g.object_id);
5191
+ var o, w, h;
5192
+ const C = (o = this.artboard) == null ? void 0 : o.objects.find((G) => G.id === g.object_id);
5171
5193
  if (((w = C == null ? void 0 : C.physics) == null ? void 0 : w.enabled) && C.physics.bodyType !== "Static" && (["x", "y", "rotation"].includes(g.property) || g.property.startsWith("transform.")))
5172
5194
  return;
5173
5195
  const E = this.objectStates.get(g.object_id);
5174
5196
  if (!E) return;
5175
5197
  const D = this.interpolate(g.keyframes, I);
5176
5198
  if (g.property.includes(".")) {
5177
- const s = g.property.split(".");
5178
- let K = E;
5179
- for (let S = 0; S < s.length - 1; S++)
5180
- K[s[S]] || (K[s[S]] = {}), K = K[s[S]];
5181
- s.includes("shadow") && s.includes("color"), K[s[s.length - 1]] = D;
5199
+ const G = (g.property || "").split(".");
5200
+ let S = E;
5201
+ for (let K = 0; K < G.length - 1; K++)
5202
+ S[G[K]] || (S[G[K]] = {}), S = S[G[K]];
5203
+ G.includes("shadow") && G.includes("color"), S[G[G.length - 1]] = D;
5182
5204
  } else
5183
5205
  E[g.property] = D;
5184
- if (this.physicsEngine && ((G = C == null ? void 0 : C.physics) != null && G.enabled) && C.physics.bodyType === "Static")
5206
+ if (this.physicsEngine && ((h = C == null ? void 0 : C.physics) != null && h.enabled) && C.physics.bodyType === "Static")
5185
5207
  if (g.property === "x" || g.property === "transform.x") {
5186
- const s = this.physicsEngine.getPosition(g.object_id);
5187
- s && this.physicsEngine.setPosition(g.object_id, D, s.y);
5208
+ const G = this.physicsEngine.getPosition(g.object_id);
5209
+ G && this.physicsEngine.setPosition(g.object_id, D, G.y);
5188
5210
  } else if (g.property === "y" || g.property === "transform.y") {
5189
- const s = this.physicsEngine.getPosition(g.object_id);
5190
- s && this.physicsEngine.setPosition(g.object_id, s.x, D);
5211
+ const G = this.physicsEngine.getPosition(g.object_id);
5212
+ G && this.physicsEngine.setPosition(g.object_id, G.x, D);
5191
5213
  } else (g.property === "rotation" || g.property === "transform.rotation") && this.physicsEngine.setRotation(g.object_id, D * (Math.PI / 180));
5192
5214
  });
5193
5215
  }
@@ -5211,18 +5233,18 @@ class ZC {
5211
5233
  return g.value + (C.value - g.value) * E;
5212
5234
  }
5213
5235
  interpolateColor(A, I, g) {
5214
- const C = (s) => {
5215
- const K = s.replace("#", "");
5236
+ const C = (G) => {
5237
+ const S = G.replace("#", "");
5216
5238
  return {
5217
- r: parseInt(K.substring(0, 2), 16),
5218
- g: parseInt(K.substring(2, 4), 16),
5219
- b: parseInt(K.substring(4, 6), 16)
5239
+ r: parseInt(S.substring(0, 2), 16),
5240
+ g: parseInt(S.substring(2, 4), 16),
5241
+ b: parseInt(S.substring(4, 6), 16)
5220
5242
  };
5221
- }, Q = C(A), E = C(I), D = Math.round(Q.r + (E.r - Q.r) * g), o = Math.round(Q.g + (E.g - Q.g) * g), w = Math.round(Q.b + (E.b - Q.b) * g), G = (s) => {
5222
- const K = Math.max(0, Math.min(255, s)).toString(16);
5223
- return K.length === 1 ? "0" + K : K;
5243
+ }, Q = C(A), E = C(I), D = Math.round(Q.r + (E.r - Q.r) * g), o = Math.round(Q.g + (E.g - Q.g) * g), w = Math.round(Q.b + (E.b - Q.b) * g), h = (G) => {
5244
+ const S = Math.max(0, Math.min(255, G)).toString(16);
5245
+ return S.length === 1 ? "0" + S : S;
5224
5246
  };
5225
- return `#${G(D)}${G(o)}${G(w)}`;
5247
+ return `#${h(D)}${h(o)}${h(w)}`;
5226
5248
  }
5227
5249
  render(A, I, g) {
5228
5250
  if (!this.artboard)
@@ -5241,9 +5263,9 @@ class ZC {
5241
5263
  let w = this.imageCache.get(o);
5242
5264
  if (w || (w = new Image(), w.src = o, this.imageCache.set(o, w)), w.complete && w.naturalWidth > 0) {
5243
5265
  A.save(), A.globalAlpha = this.artboard.backgroundOpacity ?? 1;
5244
- const G = w.naturalWidth / w.naturalHeight, s = C / Q;
5245
- let K, S, J, k;
5246
- s > G ? (K = C, S = C / G) : (S = Q, K = Q * G), J = -K / 2, k = -S / 2, A.drawImage(w, J, k, K, S), A.restore();
5266
+ const h = w.naturalWidth / w.naturalHeight, G = C / Q;
5267
+ let S, K, J, F;
5268
+ G > h ? (S = C, K = C / h) : (K = Q, S = Q * h), J = -S / 2, F = -K / 2, A.drawImage(w, J, F, S, K), A.restore();
5247
5269
  }
5248
5270
  }
5249
5271
  A.beginPath(), A.rect(-C / 2, -Q / 2, C, Q), A.clip();
@@ -5254,13 +5276,13 @@ class ZC {
5254
5276
  }
5255
5277
  calculateTransform(A, I, g, C, Q, E) {
5256
5278
  let D = 1, o = 1, w = 1;
5257
- const G = g / C, s = A / I;
5279
+ const h = g / C, G = A / I;
5258
5280
  switch (Q) {
5259
5281
  case "Contain":
5260
- s > G ? w = I / C : w = A / g, D = o = w;
5282
+ G > h ? w = I / C : w = A / g, D = o = w;
5261
5283
  break;
5262
5284
  case "Cover":
5263
- s > G ? w = A / g : w = I / C, D = o = w;
5285
+ G > h ? w = A / g : w = I / C, D = o = w;
5264
5286
  break;
5265
5287
  case "Fill":
5266
5288
  D = A / g, o = I / C;
@@ -5281,373 +5303,408 @@ class ZC {
5281
5303
  D = o = 1;
5282
5304
  break;
5283
5305
  }
5284
- const K = g * D, S = C * o;
5285
- let J = 0, k = 0;
5286
- return E.includes("Left") ? J = 0 : E.includes("Right") ? J = A - K : J = (A - K) / 2, E.includes("Top") ? k = 0 : E.includes("Bottom") ? k = I - S : k = (I - S) / 2, { scaleX: D, scaleY: o, tx: J, ty: k };
5306
+ const S = g * D, K = C * o;
5307
+ let J = 0, F = 0;
5308
+ return E.includes("Left") ? J = 0 : E.includes("Right") ? J = A - S : J = (A - S) / 2, E.includes("Top") ? F = 0 : E.includes("Bottom") ? F = I - K : F = (I - K) / 2, { scaleX: D, scaleY: o, tx: J, ty: F };
5287
5309
  }
5288
5310
  mapFontWeight(A) {
5289
5311
  const I = A.toLowerCase();
5290
5312
  return /^\d+$/.test(I) ? I : I.includes("thin") ? "100" : I.includes("extra light") || I.includes("extralight") ? "200" : I.includes("light") ? "300" : I.includes("medium") ? "500" : I.includes("semibold") || I.includes("semi bold") ? "600" : I.includes("bold") ? "700" : I.includes("extra bold") || I.includes("extrabold") ? "800" : I.includes("black") || I.includes("heavy") ? "900" : "400";
5291
5313
  }
5292
5314
  renderObject(A, I, g) {
5293
- var J;
5315
+ var F;
5294
5316
  const C = this.objectStates.get(I.id);
5295
5317
  if (!C) {
5296
5318
  console.warn("No state for object:", I.id);
5297
5319
  return;
5298
5320
  }
5299
- A.roundRect || (A.roundRect = (k, y, F, M, U) => (this.drawRoundRect(A, k, y, F, M, U), A));
5321
+ A.roundRect || (A.roundRect = (y, k, M, U, R) => (this.drawRoundRect(A, y, k, M, U, R), A));
5300
5322
  const Q = C.geometry || I.geometry;
5301
5323
  if (C.visible === !1)
5302
5324
  return;
5303
5325
  const E = Q.width || 0, D = Q.height || 0, o = C.x, w = C.y;
5304
5326
  A.save();
5305
- const G = A.globalAlpha, s = C.opacity !== void 0 ? C.opacity : 1;
5306
- A.globalAlpha = G * s;
5307
- const K = C.compositeOperation || C.blendMode;
5308
- if (K && K !== "Normal") {
5309
- const k = K.toLowerCase();
5310
- ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"].includes(k) && (A.globalCompositeOperation = k);
5327
+ const h = A.globalAlpha, G = C.opacity !== void 0 ? C.opacity : 1;
5328
+ A.globalAlpha = h * G;
5329
+ const S = C.compositeOperation || C.blendMode;
5330
+ if (S && S !== "Normal") {
5331
+ const y = S.toLowerCase();
5332
+ ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"].includes(y) && (A.globalCompositeOperation = y);
5311
5333
  }
5312
5334
  A.translate(o, w), A.rotate(C.rotation * Math.PI / 180), A.scale(C.scale_x, C.scale_y);
5313
- const S = C.style || I.style;
5335
+ const K = C.style || I.style;
5314
5336
  if (Q.type === "Text") {
5315
- let k = Q.text || "";
5337
+ let y = Q.text || "";
5316
5338
  if (Q.textInputId) {
5317
- const L = this.inputs.get(Q.textInputId);
5318
- L !== void 0 && (k = String(L), C.geometry && C.geometry.type === "Text" && (C.geometry.text = k));
5339
+ const c = this.inputs.get(Q.textInputId);
5340
+ c !== void 0 && (y = String(c), C.geometry && C.geometry.type === "Text" && (C.geometry.text = y));
5319
5341
  }
5320
- let y = k;
5321
- const F = Q.textCase || "none";
5322
- F === "uppercase" ? y = y.toUpperCase() : F === "lowercase" ? y = y.toLowerCase() : F === "capitalize" && (y = y.replace(/\b\w/g, (L) => L.toUpperCase()));
5323
- let M = ((J = Q.fontWeight) == null ? void 0 : J.toString()) || "400", U = "normal";
5324
- M.toLowerCase().includes("italic") && (U = "italic", M = M.replace(/italic/gi, "").trim() || "400");
5325
- const R = this.mapFontWeight(M), n = Math.max(1, Q.fontSize || 16);
5326
- A.font = `${U} ${R} ${n}px "${Q.fontFamily || "Inter"}", sans-serif`;
5327
- const e = Q.textVerticalAlign || "top";
5328
- let l = -D / 2;
5329
- e === "middle" || e === "center" ? (A.textBaseline = "middle", l = 0) : e === "bottom" ? (A.textBaseline = "bottom", l = D / 2) : (A.textBaseline = "top", l = -D / 2);
5330
- const d = Q.textAlign || "left";
5331
- A.textAlign = d;
5332
- let r = -E / 2;
5333
- d === "center" && (r = 0), d === "right" && (r = E / 2);
5334
- const $ = Q.letterSpacing || 0, oA = Q.paragraphSpacing || 0, z = (Q.lineHeight || 1.2) * n, v = (Q.width || E || 200) + 15, T = (L) => {
5335
- if ($ === 0) return A.measureText(L).width;
5342
+ let k = y || "";
5343
+ Q.segments && Array.isArray(Q.segments) && (k = Q.segments.map((c) => c && c.text ? c.text : "").join(""));
5344
+ const M = Q.textCase || "none";
5345
+ M === "uppercase" ? k = k.toUpperCase() : M === "lowercase" ? k = k.toLowerCase() : M === "capitalize" && (k = k.replace(/\b\w/g, (c) => c.toUpperCase()));
5346
+ let U = ((F = Q.fontWeight) == null ? void 0 : F.toString()) || "400", R = "normal";
5347
+ U.toLowerCase().includes("italic") && (R = "italic", U = U.replace(/italic/gi, "").trim() || "400");
5348
+ const Y = this.mapFontWeight(U), L = Math.max(1, Q.fontSize || 16);
5349
+ A.font = `${R} ${Y} ${L}px "${Q.fontFamily || "Inter"}", sans-serif`;
5350
+ const l = Q.textVerticalAlign || "top";
5351
+ let d = -D / 2;
5352
+ l === "middle" || l === "center" ? (A.textBaseline = "middle", d = 0) : l === "bottom" ? (A.textBaseline = "bottom", d = D / 2) : (A.textBaseline = "top", d = -D / 2);
5353
+ const n = Q.textAlign || "left";
5354
+ A.textAlign = n;
5355
+ let IA = -E / 2;
5356
+ n === "center" && (IA = 0), n === "right" && (IA = E / 2);
5357
+ const hA = Q.letterSpacing || 0, u = Q.paragraphSpacing || 0, j = (Q.lineHeight || 1.2) * L, Z = (Q.width || E || 200) + 15, V = (c) => {
5358
+ if (hA === 0) return A.measureText(c).width;
5336
5359
  let q = 0;
5337
- for (let t = 0; t < L.length; t++)
5338
- q += A.measureText(L[t]).width + $;
5339
- return q - $;
5340
- }, W = [], m = y.split(`
5360
+ for (let e = 0; e < c.length; e++)
5361
+ q += A.measureText(c[e]).width + hA;
5362
+ return q - hA;
5363
+ }, T = [], O = String(k || "").split(`
5341
5364
  `);
5342
- m.forEach((L, q) => {
5343
- const t = L.split(" ");
5344
- let p = "";
5345
- for (let O = 0; O < t.length; O++) {
5346
- const AA = p + t[O] + " ";
5347
- T(AA.trim()) > v && O > 0 ? (W.push({ text: p.trim(), isParaEnd: !1 }), p = t[O] + " ") : p = AA;
5365
+ O.forEach((c, q) => {
5366
+ const e = String(c || "").split(" ");
5367
+ let H = "";
5368
+ for (let W = 0; W < e.length; W++) {
5369
+ const wA = H + e[W] + " ";
5370
+ V(wA.trim()) > Z && W > 0 ? (T.push({ text: H.trim(), isParaEnd: !1 }), H = e[W] + " ") : H = wA;
5348
5371
  }
5349
- W.push({ text: p.trim(), isParaEnd: q < m.length - 1 });
5372
+ T.push({ text: H.trim(), isParaEnd: q < O.length - 1 });
5350
5373
  });
5351
- let Z = l, CA = W.length * z;
5352
- if (oA > 0) {
5353
- const L = W.filter((q, t) => q.isParaEnd && t < W.length - 1).length;
5354
- CA += L * oA;
5374
+ let QA = d, MA = T.length * j;
5375
+ if (u > 0) {
5376
+ const c = T.filter((q, e) => q.isParaEnd && e < T.length - 1).length;
5377
+ MA += c * u;
5355
5378
  }
5356
- e === "middle" || e === "center" ? Z -= CA / 2 - n / 2 : e === "bottom" && (Z -= CA - n);
5357
- const FA = (L, q, t, p) => {
5358
- if ($ === 0)
5359
- p ? A.strokeText(L, q, t) : A.fillText(L, q, t);
5379
+ l === "middle" || l === "center" ? QA -= MA / 2 - L / 2 : l === "bottom" && (QA -= MA - L);
5380
+ const P = (c, q, e, H, W) => {
5381
+ if (hA === 0 && (!Q.segments || Q.segments.length === 0))
5382
+ H ? A.strokeText(c, q, e) : A.fillText(c, q, e);
5360
5383
  else {
5361
- const O = T(L);
5362
- let AA = q;
5363
- d === "center" ? AA -= O / 2 : d === "right" && (AA -= O);
5364
- let MA = AA;
5365
- for (let KA = 0; KA < L.length; KA++) {
5366
- const kA = L[KA];
5367
- p ? A.strokeText(kA, MA, t) : A.fillText(kA, MA, t), MA += A.measureText(kA).width + $;
5384
+ const wA = V(c);
5385
+ let NA = q;
5386
+ n === "center" ? NA -= wA / 2 : n === "right" && (NA -= wA);
5387
+ let JA = NA;
5388
+ for (let AA = 0; AA < c.length; AA++) {
5389
+ const z = c[AA];
5390
+ if (Q.segments && Q.segments.length > 0) {
5391
+ const EA = W + AA;
5392
+ let iA = 0;
5393
+ const CA = Q.segments.find((aA) => {
5394
+ if (!aA || typeof aA.text != "string") return !1;
5395
+ const cA = iA;
5396
+ return iA += aA.text.length, EA >= cA && EA < iA;
5397
+ });
5398
+ if (CA && (CA.fill && (H ? A.strokeStyle = CA.fill.color || A.strokeStyle : A.fillStyle = CA.fill.color || A.fillStyle), CA.fontSize || CA.fontFamily || CA.fontWeight)) {
5399
+ const aA = CA.fontWeight ? this.mapFontWeight(CA.fontWeight.toString()) : Y, cA = CA.fontSize || L, tA = CA.fontFamily || Q.fontFamily || "Inter";
5400
+ A.font = `${R} ${aA} ${cA}px "${tA}", sans-serif`;
5401
+ }
5402
+ }
5403
+ H ? A.strokeText(z, JA, e) : A.fillText(z, JA, e), Q.segments && Q.segments.length > 0 && (A.font = `${R} ${Y} ${L}px "${Q.fontFamily || "Inter"}", sans-serif`), JA += A.measureText(z).width + hA;
5368
5404
  }
5369
5405
  }
5370
5406
  };
5371
- if (S.fill) {
5372
- const L = A.globalAlpha;
5373
- A.fillStyle = S.fill.color, A.globalAlpha = L * (S.fill.opacity ?? 1);
5374
- let q = Z;
5375
- W.forEach((t) => {
5376
- FA(t.text, r, q, !1), q += z + (t.isParaEnd ? oA : 0);
5377
- }), A.globalAlpha = L;
5407
+ if (K.fill) {
5408
+ const c = A.globalAlpha, q = this.createCanvasFill(A, K.fill, E, D);
5409
+ A.fillStyle = q || K.fill.color || "#000000", A.globalAlpha = c * (K.fill.opacity ?? 1);
5410
+ let e = 0, H = QA;
5411
+ T.forEach((W) => {
5412
+ const wA = k.indexOf(W.text, e);
5413
+ wA !== -1 && (P(W.text, IA, H, !1, wA), e = wA + W.text.length, H += j + (W.isParaEnd ? u : 0));
5414
+ }), A.globalAlpha = c;
5378
5415
  }
5379
- if (S.stroke && S.stroke.width > 0) {
5380
- const L = A.globalAlpha;
5381
- A.strokeStyle = S.stroke.color, A.lineWidth = S.stroke.width, A.globalAlpha = L * (S.stroke.opacity ?? 1);
5382
- let q = Z;
5383
- W.forEach((t) => {
5384
- FA(t.text, r, q, !0), q += z + (t.isParaEnd ? oA : 0);
5385
- }), A.globalAlpha = L;
5416
+ if (K.stroke && K.stroke.width > 0) {
5417
+ const c = A.globalAlpha;
5418
+ A.strokeStyle = K.stroke.color, A.lineWidth = K.stroke.width, A.globalAlpha = c * (K.stroke.opacity ?? 1);
5419
+ let q = 0, e = QA;
5420
+ T.forEach((H) => {
5421
+ const W = k.indexOf(H.text, q);
5422
+ W !== -1 && (P(H.text, IA, e, !0, W), q = W + H.text.length, e += j + (H.isParaEnd ? u : 0));
5423
+ }), A.globalAlpha = c;
5386
5424
  }
5387
5425
  } else if (Q.type === "Image") {
5388
- const k = Q.src;
5389
- if (k) {
5390
- let y = this.imageCache.get(k);
5391
- y || (y = new Image(), y.onload = () => {
5392
- }, y.onerror = () => {
5393
- console.error(`[ExodeUI] Image load failed: ${k.substring(0, 100)}${k.length > 100 ? "..." : ""}`);
5394
- }, y.src = k, this.imageCache.set(k, y)), y.complete && y.naturalWidth > 0 && A.drawImage(y, -E / 2, -D / 2, E, D);
5426
+ const y = Q.src;
5427
+ if (y) {
5428
+ let k = this.imageCache.get(y);
5429
+ k || (k = new Image(), k.onload = () => {
5430
+ }, k.onerror = () => {
5431
+ console.error(`[ExodeUI] Image load failed: ${y.substring(0, 100)}${y.length > 100 ? "..." : ""}`);
5432
+ }, k.src = y, this.imageCache.set(y, k)), k.complete && k.naturalWidth > 0 && A.drawImage(k, -E / 2, -D / 2, E, D);
5395
5433
  }
5396
5434
  } else if (Q.type === "SVG") {
5397
- const k = Q.svgContent;
5398
- if (k) {
5399
- const y = S.palette || [], F = I.id + "_" + y.join("_");
5400
- let M = this.imageCache.get(F);
5401
- if (!M) {
5402
- M = new Image();
5403
- let U = k;
5404
- Q.colors && Q.colors.length > 0 && y.length > 0 && Q.colors.forEach((e, l) => {
5405
- if (y[l]) {
5406
- const d = e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), r = new RegExp(d, "gi");
5407
- U = U.replace(r, y[l]);
5435
+ const y = Q.svgContent;
5436
+ if (y) {
5437
+ const k = K.palette || [], M = I.id + "_" + k.join("_");
5438
+ let U = this.imageCache.get(M);
5439
+ if (!U) {
5440
+ U = new Image();
5441
+ let R = y;
5442
+ Q.colors && Q.colors.length > 0 && k.length > 0 && Q.colors.forEach((l, d) => {
5443
+ if (k[d]) {
5444
+ const n = l.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), IA = new RegExp(n, "gi");
5445
+ R = R.replace(IA, k[d]);
5408
5446
  }
5409
5447
  });
5410
- const R = new Blob([U], { type: "image/svg+xml" }), n = URL.createObjectURL(R);
5411
- M.src = n, this.imageCache.set(F, M);
5448
+ const Y = new Blob([R], { type: "image/svg+xml" }), L = URL.createObjectURL(Y);
5449
+ U.src = L, this.imageCache.set(M, U);
5412
5450
  }
5413
- M.complete && M.naturalWidth > 0 && A.drawImage(M, -E / 2, -D / 2, E, D);
5451
+ U.complete && U.naturalWidth > 0 && A.drawImage(U, -E / 2, -D / 2, E, D);
5414
5452
  }
5415
5453
  } else if (Q.type === "LineGraph")
5416
5454
  this.renderLineGraph(A, Q, E, D);
5417
5455
  else if (I.type === "Shape") {
5418
5456
  if (A.beginPath(), Q.type === "Rectangle") {
5419
- const k = Q.corner_radius ?? Q.cornerRadius ?? 0;
5420
- A.roundRect(-E / 2, -D / 2, E, D, k);
5457
+ const y = Q.corner_radius ?? Q.cornerRadius ?? 0;
5458
+ A.roundRect(-E / 2, -D / 2, E, D, y);
5421
5459
  } else if (Q.type === "Ellipse")
5422
5460
  A.ellipse(0, 0, E / 2, D / 2, 0, 0, Math.PI * 2);
5423
5461
  else if (Q.type === "Triangle")
5424
5462
  A.moveTo(0, -D / 2), A.lineTo(E / 2, D / 2), A.lineTo(-E / 2, D / 2), A.closePath();
5425
5463
  else if (Q.type === "Star") {
5426
- const k = Q.inner_radius || 20, y = Q.outer_radius || 50, F = Q.points || 5;
5427
- for (let M = 0; M < F * 2; M++) {
5428
- const U = M * Math.PI / F - Math.PI / 2, R = M % 2 === 0 ? y : k, n = R * Math.cos(U), e = R * Math.sin(U);
5429
- M === 0 ? A.moveTo(n, e) : A.lineTo(n, e);
5464
+ const y = Q.inner_radius || 20, k = Q.outer_radius || 50, M = Q.points || 5;
5465
+ for (let U = 0; U < M * 2; U++) {
5466
+ const R = U * Math.PI / M - Math.PI / 2, Y = U % 2 === 0 ? k : y, L = Y * Math.cos(R), l = Y * Math.sin(R);
5467
+ U === 0 ? A.moveTo(L, l) : A.lineTo(L, l);
5430
5468
  }
5431
5469
  A.closePath();
5432
5470
  }
5433
- if (A.save(), S.shadow && S.shadow.opacity > 0) {
5434
- if (A.shadowColor = S.shadow.color, S.shadow.opacity < 1 && S.shadow.color.startsWith("#")) {
5435
- const k = parseInt(S.shadow.color.slice(1, 3), 16), y = parseInt(S.shadow.color.slice(3, 5), 16), F = parseInt(S.shadow.color.slice(5, 7), 16);
5436
- A.shadowColor = `rgba(${k}, ${y}, ${F}, ${S.shadow.opacity})`;
5471
+ if (A.save(), K.shadow && K.shadow.opacity > 0) {
5472
+ if (A.shadowColor = K.shadow.color, K.shadow.opacity < 1 && K.shadow.color.startsWith("#")) {
5473
+ const y = parseInt(K.shadow.color.slice(1, 3), 16), k = parseInt(K.shadow.color.slice(3, 5), 16), M = parseInt(K.shadow.color.slice(5, 7), 16);
5474
+ A.shadowColor = `rgba(${y}, ${k}, ${M}, ${K.shadow.opacity})`;
5437
5475
  }
5438
- A.shadowBlur = S.shadow.blur, A.shadowOffsetX = S.shadow.offsetX, A.shadowOffsetY = S.shadow.offsetY;
5476
+ A.shadowBlur = K.shadow.blur, A.shadowOffsetX = K.shadow.offsetX, A.shadowOffsetY = K.shadow.offsetY;
5439
5477
  }
5440
- if (S.blur && S.blur.amount > 0 && (A.filter = `blur(${S.blur.amount}px)`), S.fill) {
5441
- const k = A.globalAlpha, y = this.createCanvasFill(A, S.fill, E, D);
5442
- y ? A.fillStyle = y : A.fillStyle = S.fill.color || "transparent", A.globalAlpha = k * (S.fill.opacity ?? 1), A.fill(), A.globalAlpha = k;
5478
+ if (K.blur && K.blur.amount > 0 && (A.filter = `blur(${K.blur.amount}px)`), K.fill) {
5479
+ const y = A.globalAlpha, k = this.createCanvasFill(A, K.fill, E, D);
5480
+ k ? A.fillStyle = k : A.fillStyle = K.fill.color || "transparent", A.globalAlpha = y * (K.fill.opacity ?? 1), A.fill(), A.globalAlpha = y;
5443
5481
  }
5444
- if (S.stroke && S.stroke.width > 0) {
5445
- const k = A.globalAlpha;
5446
- A.strokeStyle = S.stroke.color, A.lineWidth = S.stroke.width, A.globalAlpha = k * (S.stroke.opacity ?? 1), A.stroke(), A.globalAlpha = k;
5482
+ if (K.stroke && K.stroke.width > 0) {
5483
+ const y = A.globalAlpha;
5484
+ A.strokeStyle = K.stroke.color, A.lineWidth = K.stroke.width, A.globalAlpha = y * (K.stroke.opacity ?? 1), A.stroke(), A.globalAlpha = y;
5447
5485
  }
5448
5486
  A.restore();
5487
+ } else if (I.type === "Frame" || I.type === "Group" && !I.isStructuralGroup) {
5488
+ const y = I.width || E, k = I.height || D, M = I.cornerRadius ?? I.corner_radius ?? 0;
5489
+ if (A.save(), K.shadow && K.shadow.opacity > 0) {
5490
+ if (A.shadowColor = K.shadow.color, K.shadow.opacity < 1 && K.shadow.color.startsWith("#")) {
5491
+ const R = parseInt(K.shadow.color.slice(1, 3), 16), Y = parseInt(K.shadow.color.slice(3, 5), 16), L = parseInt(K.shadow.color.slice(5, 7), 16);
5492
+ A.shadowColor = `rgba(${R}, ${Y}, ${L}, ${K.shadow.opacity})`;
5493
+ }
5494
+ A.shadowBlur = K.shadow.blur, A.shadowOffsetX = K.shadow.offsetX, A.shadowOffsetY = K.shadow.offsetY;
5495
+ }
5496
+ if (A.beginPath(), A.roundRect(-y / 2, -k / 2, y, k, M), K.fill && K.fill.type !== "None") {
5497
+ const R = A.globalAlpha, Y = this.createCanvasFill(A, K.fill, y, k);
5498
+ A.fillStyle = Y || K.fill.color || "transparent", A.globalAlpha = R * (K.fill.opacity ?? 1), A.fill(), A.globalAlpha = R;
5499
+ }
5500
+ if (K.stroke && K.stroke.width > 0 && K.stroke.isEnabled !== !1) {
5501
+ const R = A.globalAlpha;
5502
+ A.strokeStyle = K.stroke.color || "#000000", A.lineWidth = K.stroke.width, A.globalAlpha = R * (K.stroke.opacity ?? 1), A.stroke(), A.globalAlpha = R;
5503
+ }
5504
+ A.restore(), I.clipsContent !== !1 && I.children && I.children.length > 0 && (A.save(), A.beginPath(), A.roundRect(-y / 2, -k / 2, y, k, M), A.clip());
5449
5505
  } else I.type === "Component" && I.variant === "inputbox" ? this.renderInputBox(A, I) : I.type === "Component" && I.variant === "button" ? this.renderButton(A, I) : I.type === "Component" && I.variant === "toggle_button" ? this.renderToggleButton(A, I) : I.type === "Component" && I.variant === "toggle" ? this.renderToggle(A, I) : I.type === "Component" && I.variant === "slider" ? this.renderSlider(A, I) : I.type === "Component" && I.variant === "dropdown" && this.renderDropdown(A, I);
5450
- I.children && I.children.length > 0 && I.children.forEach((k) => {
5451
- const y = g.get(k);
5452
- y && this.renderObject(A, y, g);
5453
- }), A.restore();
5506
+ const J = (I.type === "Frame" || I.type === "Group" && !I.isStructuralGroup) && I.clipsContent !== !1 && I.children && I.children.length > 0;
5507
+ I.children && I.children.length > 0 && I.children.forEach((y) => {
5508
+ const k = g.get(y);
5509
+ k && this.renderObject(A, k, g);
5510
+ }), J && A.restore(), A.restore();
5454
5511
  }
5455
5512
  renderInputBox(A, I) {
5456
- var AA, MA, KA, kA;
5457
- const g = ((MA = (AA = I.objectStates) == null ? void 0 : AA.get(I.id)) == null ? void 0 : MA.options) || I.options || {}, C = ((KA = I.geometry) == null ? void 0 : KA.width) || 250, Q = ((kA = I.geometry) == null ? void 0 : kA.height) || 45, E = this.focusedId === I.id, D = this.lastHoveredObjectId === I.id, o = g.previewState || "default", w = o !== "default" ? o : E ? "focused" : D ? "hovered" : "default", G = g.label || { visible: !0, text: "Label" }, s = g.helperText || { visible: !1, text: "Helper text" }, K = g.leftIcon || { visible: !1 }, S = g.rightIcon || { visible: !1 }, J = g.multiline === !0, k = g.cornerRadius ?? 8, y = g.corners || { tl: k, tr: k, bl: k, br: k }, F = [y.tl, y.tr, y.br, y.bl];
5458
- let M = g.backgroundColor || "rgba(31, 41, 55, 1)", U = g.borderColor || "rgba(55, 65, 81, 1)", R = g.borderWidth ?? 1.5, n = g.color || "#ffffff", e = g.placeholderColor || "rgba(156, 163, 175, 1)", l = g.fontSize || 14;
5459
- const d = `${w}Style`, r = g[d];
5460
- r ? (r.backgroundColor !== void 0 && (M = r.backgroundColor), r.borderColor !== void 0 && (U = r.borderColor), r.borderWidth !== void 0 && (R = r.borderWidth), r.color !== void 0 && (n = r.color), r.placeholderColor !== void 0 && (e = r.placeholderColor), r.fontSize !== void 0 && (l = r.fontSize)) : w === "focused" ? (U = g.focusBorderColor || "rgba(59, 130, 246, 1)", R = Math.max(R, 2)) : w === "hovered" || w === "hover" ? (U = g.hoverBorderColor || U, M = g.hoverBackgroundColor || M) : w === "disabled" ? (M = g.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", U = g.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : w === "error" && (U = "rgba(239, 68, 68, 1)", R = Math.max(R, 2)), A.beginPath(), A.roundRect(-C / 2, -Q / 2, C, Q, F), A.fillStyle = M, A.fill(), R > 0 && (A.strokeStyle = U, A.lineWidth = R, A.stroke(), (w === "focused" || w === "focus") && (A.save(), A.beginPath(), A.roundRect(-C / 2 - 2, -Q / 2 - 2, C + 4, Q + 4, F.map((QA) => QA + 2)), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore()));
5461
- const $ = (QA, IA) => {
5462
- if (!QA.visible || !QA.svgPath) return;
5463
- const wA = QA.size || 14, GA = QA.offset ?? 16, cA = QA.color || "#ffffff", pA = IA ? -(C / 2) + GA : C / 2 - GA, OA = QA.svgPath;
5464
- if (A.save(), A.translate(pA, 0), !OA.startsWith("<svg")) {
5465
- const rA = new Path2D(OA), qA = wA / 24;
5466
- A.scale(qA, qA), A.translate(-12, -12), A.fillStyle = cA, A.fill(rA);
5513
+ var W, wA, NA, JA;
5514
+ const g = ((wA = (W = I.objectStates) == null ? void 0 : W.get(I.id)) == null ? void 0 : wA.options) || I.options || {}, C = ((NA = I.geometry) == null ? void 0 : NA.width) || 250, Q = ((JA = I.geometry) == null ? void 0 : JA.height) || 45, E = this.focusedId === I.id, D = this.lastHoveredObjectId === I.id, o = g.previewState || "default", w = o !== "default" ? o : E ? "focused" : D ? "hovered" : "default", h = g.label || { visible: !0, text: "Label" }, G = g.helperText || { visible: !1, text: "Helper text" }, S = g.leftIcon || { visible: !1 }, K = g.rightIcon || { visible: !1 }, J = g.multiline === !0, F = g.cornerRadius ?? 8, y = g.corners || { tl: F, tr: F, bl: F, br: F }, k = [y.tl, y.tr, y.br, y.bl];
5515
+ let M = g.backgroundColor || "rgba(31, 41, 55, 1)", U = g.borderColor || "rgba(55, 65, 81, 1)", R = g.borderWidth ?? 1.5, Y = g.color || "#ffffff", L = g.placeholderColor || "rgba(156, 163, 175, 1)", l = g.fontSize || 14;
5516
+ const d = `${w}Style`, n = g[d];
5517
+ n ? (n.backgroundColor !== void 0 && (M = n.backgroundColor), n.borderColor !== void 0 && (U = n.borderColor), n.borderWidth !== void 0 && (R = n.borderWidth), n.color !== void 0 && (Y = n.color), n.placeholderColor !== void 0 && (L = n.placeholderColor), n.fontSize !== void 0 && (l = n.fontSize)) : w === "focused" ? (U = g.focusBorderColor || "rgba(59, 130, 246, 1)", R = Math.max(R, 2)) : w === "hovered" || w === "hover" ? (U = g.hoverBorderColor || U, M = g.hoverBackgroundColor || M) : w === "disabled" ? (M = g.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", U = g.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : w === "error" && (U = "rgba(239, 68, 68, 1)", R = Math.max(R, 2)), A.beginPath(), A.roundRect(-C / 2, -Q / 2, C, Q, k), A.fillStyle = M, A.fill(), R > 0 && (A.strokeStyle = U, A.lineWidth = R, A.stroke(), (w === "focused" || w === "focus") && (A.save(), A.beginPath(), A.roundRect(-C / 2 - 2, -Q / 2 - 2, C + 4, Q + 4, k.map((AA) => AA + 2)), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore()));
5518
+ const IA = (AA, z) => {
5519
+ if (!AA.visible || !AA.svgPath) return;
5520
+ const EA = AA.size || 14, iA = AA.offset ?? 16, CA = AA.color || "#ffffff", aA = z ? -(C / 2) + iA : C / 2 - iA, cA = AA.svgPath;
5521
+ if (A.save(), A.translate(aA, 0), !cA.startsWith("<svg")) {
5522
+ const tA = new Path2D(cA), nA = EA / 24;
5523
+ A.scale(nA, nA), A.translate(-12, -12), A.fillStyle = CA, A.fill(tA);
5467
5524
  }
5468
5525
  A.restore();
5469
5526
  };
5470
- $(K, !0), $(S, !1);
5471
- const oA = g.text || "", z = g.placeholder || "Enter text...", v = !oA, T = oA || z, W = v ? e : n, m = l, Z = g.fontFamily || "Inter", CA = g.fontWeight || 400;
5472
- A.font = `${CA} ${m}px "${Z}", sans-serif`, A.fillStyle = W, A.textAlign = "left", A.textBaseline = J ? "top" : "middle";
5473
- const FA = g.inputPadding ?? 16, L = K.visible ? (K.offset ?? 16) + (K.size || 14) / 2 + 8 : FA, q = S.visible ? (S.offset ?? 16) + (S.size || 14) / 2 + 8 : FA, t = -(C / 2) + L, p = C - L - q, O = g.inputType === "password" ? "•".repeat(T.length) : T;
5474
- if (A.save(), A.beginPath(), A.rect(t - 2, -Q / 2 + 4, p + 4, Q - 8), A.clip(), J) {
5475
- const QA = O.split(`
5527
+ IA(S, !0), IA(K, !1);
5528
+ const hA = g.text || "", u = g.placeholder || "Enter text...", j = !hA, Z = hA || u, V = j ? L : Y, T = l, O = g.fontFamily || "Inter", QA = g.fontWeight || 400;
5529
+ A.font = `${QA} ${T}px "${O}", sans-serif`, A.fillStyle = V, A.textAlign = "left", A.textBaseline = J ? "top" : "middle";
5530
+ const MA = g.inputPadding ?? 16, P = S.visible ? (S.offset ?? 16) + (S.size || 14) / 2 + 8 : MA, c = K.visible ? (K.offset ?? 16) + (K.size || 14) / 2 + 8 : MA, q = -(C / 2) + P, e = C - P - c, H = g.inputType === "password" ? "•".repeat(Z.length) : Z;
5531
+ if (A.save(), A.beginPath(), A.rect(q - 2, -Q / 2 + 4, e + 4, Q - 8), A.clip(), J) {
5532
+ const AA = H.split(`
5476
5533
  `);
5477
- let IA = -Q / 2 + FA;
5478
- const wA = m * 1.2;
5479
- let GA = 0;
5480
- QA.forEach((cA, pA) => {
5481
- const OA = cA.split(" ");
5482
- let rA = "";
5483
- for (let qA = 0; qA < OA.length; qA++) {
5484
- const hg = rA + OA[qA] + " ";
5485
- A.measureText(hg).width > p && qA > 0 ? (A.fillText(rA, t, IA), rA = OA[qA] + " ", IA += wA) : rA = hg;
5534
+ let z = -Q / 2 + MA;
5535
+ const EA = T * 1.2;
5536
+ let iA = 0;
5537
+ AA.forEach((CA, aA) => {
5538
+ const cA = CA.split(" ");
5539
+ let tA = "";
5540
+ for (let nA = 0; nA < cA.length; nA++) {
5541
+ const hg = tA + cA[nA] + " ";
5542
+ A.measureText(hg).width > e && nA > 0 ? (A.fillText(tA, q, z), tA = cA[nA] + " ", z += EA) : tA = hg;
5486
5543
  }
5487
- A.fillText(rA, t, IA), GA = A.measureText(rA).width, pA < QA.length - 1 && (IA += wA, GA = 0);
5488
- }), E && !v && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(t + GA, IA, 1.5, m);
5544
+ A.fillText(tA, q, z), iA = A.measureText(tA).width, aA < AA.length - 1 && (z += EA, iA = 0);
5545
+ }), E && !j && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(q + iA, z, 1.5, T);
5489
5546
  } else {
5490
- const IA = A.measureText(O).width;
5491
- let wA = 0;
5492
- if (IA > p && (wA = IA - p), A.fillText(O, t - wA, 0), E && !v && Math.floor(performance.now() / 500) % 2 === 0) {
5493
- const cA = t + IA - wA;
5494
- A.fillRect(cA, -(m / 2), 1.5, m);
5547
+ const z = A.measureText(H).width;
5548
+ let EA = 0;
5549
+ if (z > e && (EA = z - e), A.fillText(H, q - EA, 0), E && !j && Math.floor(performance.now() / 500) % 2 === 0) {
5550
+ const CA = q + z - EA;
5551
+ A.fillRect(CA, -(T / 2), 1.5, T);
5495
5552
  }
5496
5553
  }
5497
- if (A.restore(), G.visible !== !1) {
5498
- const QA = G.text || "Label", IA = G.fontSize || 12, wA = G.color || "rgba(156, 163, 175, 1)", GA = G.offset ?? 8;
5499
- A.font = `600 ${IA}px "${Z}", sans-serif`, A.fillStyle = wA, A.textAlign = "left", A.textBaseline = "bottom";
5500
- const cA = -(C / 2), pA = -(Q / 2) - GA;
5501
- A.fillText(QA, cA, pA);
5554
+ if (A.restore(), h.visible !== !1) {
5555
+ const AA = h.text || "Label", z = h.fontSize || 12, EA = h.color || "rgba(156, 163, 175, 1)", iA = h.offset ?? 8;
5556
+ A.font = `600 ${z}px "${O}", sans-serif`, A.fillStyle = EA, A.textAlign = "left", A.textBaseline = "bottom";
5557
+ const CA = -(C / 2), aA = -(Q / 2) - iA;
5558
+ A.fillText(AA, CA, aA);
5502
5559
  }
5503
- if (s.visible === !0) {
5504
- const QA = s.text || "Helper text", IA = s.fontSize || 11, wA = w === "error" ? "rgba(239, 68, 68, 1)" : s.color || "rgba(156, 163, 175, 1)", GA = s.offset ?? 6;
5505
- A.font = `400 ${IA}px "${Z}", sans-serif`, A.fillStyle = wA, A.textAlign = "left", A.textBaseline = "top";
5506
- const cA = -(C / 2), pA = Q / 2 + GA;
5507
- A.fillText(QA, cA, pA);
5560
+ if (G.visible === !0) {
5561
+ const AA = G.text || "Helper text", z = G.fontSize || 11, EA = w === "error" ? "rgba(239, 68, 68, 1)" : G.color || "rgba(156, 163, 175, 1)", iA = G.offset ?? 6;
5562
+ A.font = `400 ${z}px "${O}", sans-serif`, A.fillStyle = EA, A.textAlign = "left", A.textBaseline = "top";
5563
+ const CA = -(C / 2), aA = Q / 2 + iA;
5564
+ A.fillText(AA, CA, aA);
5508
5565
  }
5509
5566
  }
5510
5567
  renderSlider(A, I) {
5511
- const { geometry: g, options: C } = I, Q = g.width || 200, E = C || {}, D = E.value ?? 50, o = E.min ?? 0, G = (E.max ?? 100) - o, s = G === 0 ? 0 : (D - o) / G, K = E.trackHeight || 4, S = E.trackRoundedness ?? 2, J = E.trackShape ?? "Rectangle", k = E.trackPath || "", y = E.activeColor || "#3b82f6", F = E.inactiveColor || "#374151", M = E.thumbShape || "Ellipse", U = E.thumbWidth ?? 16, R = E.thumbHeight ?? 16, n = E.thumbRoundedness ?? 0, e = E.thumbColor || "#ffffff", l = E.thumbPath || "", d = E.thumbIcon || "", r = E.showValueTooltip ?? !1, $ = E.tooltipBgColor || "#333333", oA = E.tooltipColor || "#ffffff", z = E.tooltipOffsetX ?? 0, v = E.tooltipOffsetY ?? -25, T = (L, q, t, p, O, AA, MA) => {
5512
- if ((L === "Custom" || L === "Icon") && MA)
5568
+ const { geometry: g, options: C } = I, Q = g.width || 200, E = C || {}, D = E.value ?? 50, o = E.min ?? 0, h = (E.max ?? 100) - o, G = h === 0 ? 0 : (D - o) / h, S = E.trackHeight || 4, K = E.trackRoundedness ?? 2, J = E.trackShape ?? "Rectangle", F = E.trackPath || "", y = E.activeColor || "#3b82f6", k = E.inactiveColor || "#374151", M = E.thumbShape || "Ellipse", U = E.thumbWidth ?? 16, R = E.thumbHeight ?? 16, Y = E.thumbRoundedness ?? 0, L = E.thumbColor || "#ffffff", l = E.thumbPath || "", d = E.thumbIcon || "", n = E.showValueTooltip ?? !1, IA = E.tooltipBgColor || "#333333", hA = E.tooltipColor || "#ffffff", u = E.tooltipOffsetX ?? 0, j = E.tooltipOffsetY ?? -25, Z = (P, c, q, e, H, W, wA) => {
5569
+ if ((P === "Custom" || P === "Icon") && wA)
5513
5570
  try {
5514
- const KA = new Path2D(MA);
5515
- if (A.save(), A.translate(q, t), L === "Icon") {
5516
- const kA = Math.min(p, O) / 24;
5517
- A.scale(kA, kA), A.translate(-12, -12);
5571
+ const NA = new Path2D(wA);
5572
+ if (A.save(), A.translate(c, q), P === "Icon") {
5573
+ const JA = Math.min(e, H) / 24;
5574
+ A.scale(JA, JA), A.translate(-12, -12);
5518
5575
  }
5519
- A.fill(KA), A.restore();
5576
+ A.fill(NA), A.restore();
5520
5577
  return;
5521
- } catch (KA) {
5522
- console.error("Error drawing slider shape in engine:", KA);
5578
+ } catch (NA) {
5579
+ console.error("Error drawing slider shape in engine:", NA);
5523
5580
  }
5524
- if (A.beginPath(), L === "Ellipse")
5525
- A.ellipse(q, t, p / 2, O / 2, 0, 0, Math.PI * 2);
5526
- else if (L === "Rectangle")
5527
- A.roundRect(q - p / 2, t - O / 2, p, O, AA);
5528
- else if (L === "Triangle")
5529
- A.moveTo(q, t - O / 2), A.lineTo(q + p / 2, t + O / 2), A.lineTo(q - p / 2, t + O / 2), A.closePath();
5530
- else if (L === "Diamond")
5531
- A.moveTo(q, t - O / 2), A.lineTo(q + p / 2, t), A.lineTo(q, t + O / 2), A.lineTo(q - p / 2, t), A.closePath();
5532
- else if (L === "Star") {
5533
- const kA = Math.min(p, O) / 2, QA = kA / 2;
5534
- for (let IA = 0; IA < 5 * 2; IA++) {
5535
- const wA = IA % 2 === 0 ? kA : QA, GA = IA * Math.PI / 5 - Math.PI / 2;
5536
- A.lineTo(q + wA * Math.cos(GA), t + wA * Math.sin(GA));
5581
+ if (A.beginPath(), P === "Ellipse")
5582
+ A.ellipse(c, q, e / 2, H / 2, 0, 0, Math.PI * 2);
5583
+ else if (P === "Rectangle")
5584
+ A.roundRect(c - e / 2, q - H / 2, e, H, W);
5585
+ else if (P === "Triangle")
5586
+ A.moveTo(c, q - H / 2), A.lineTo(c + e / 2, q + H / 2), A.lineTo(c - e / 2, q + H / 2), A.closePath();
5587
+ else if (P === "Diamond")
5588
+ A.moveTo(c, q - H / 2), A.lineTo(c + e / 2, q), A.lineTo(c, q + H / 2), A.lineTo(c - e / 2, q), A.closePath();
5589
+ else if (P === "Star") {
5590
+ const JA = Math.min(e, H) / 2, AA = JA / 2;
5591
+ for (let z = 0; z < 5 * 2; z++) {
5592
+ const EA = z % 2 === 0 ? JA : AA, iA = z * Math.PI / 5 - Math.PI / 2;
5593
+ A.lineTo(c + EA * Math.cos(iA), q + EA * Math.sin(iA));
5537
5594
  }
5538
5595
  A.closePath();
5539
- } else L === "Line" && (A.moveTo(q - p / 2, t), A.lineTo(q + p / 2, t));
5596
+ } else P === "Line" && (A.moveTo(c - e / 2, q), A.lineTo(c + e / 2, q));
5540
5597
  A.fill();
5541
5598
  };
5542
- A.fillStyle = F, J === "Line" ? (A.strokeStyle = F, A.lineWidth = K, A.beginPath(), A.moveTo(-Q / 2, 0), A.lineTo(Q / 2, 0), A.stroke()) : T(J, 0, 0, Q, K, S, k);
5543
- const W = Q * s, m = -Q / 2 + W;
5544
- if (W > 0 && (A.fillStyle = y, J === "Line" ? (A.strokeStyle = y, A.lineWidth = K, A.beginPath(), A.moveTo(-Q / 2, 0), A.lineTo(m, 0), A.stroke()) : J === "Rectangle" && (A.beginPath(), A.roundRect(-Q / 2, -K / 2, W, K, S), A.fill())), A.save(), A.translate(m, 0), A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4, A.shadowOffsetY = 1, A.fillStyle = e, T(M, 0, 0, U, R, n, M === "Icon" ? d : l), A.restore(), r) {
5545
- A.save(), A.translate(m + z, v);
5546
- const L = Math.round(D).toString();
5599
+ A.fillStyle = k, J === "Line" ? (A.strokeStyle = k, A.lineWidth = S, A.beginPath(), A.moveTo(-Q / 2, 0), A.lineTo(Q / 2, 0), A.stroke()) : Z(J, 0, 0, Q, S, K, F);
5600
+ const V = Q * G, T = -Q / 2 + V;
5601
+ if (V > 0 && (A.fillStyle = y, J === "Line" ? (A.strokeStyle = y, A.lineWidth = S, A.beginPath(), A.moveTo(-Q / 2, 0), A.lineTo(T, 0), A.stroke()) : J === "Rectangle" && (A.beginPath(), A.roundRect(-Q / 2, -S / 2, V, S, K), A.fill())), A.save(), A.translate(T, 0), A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4, A.shadowOffsetY = 1, A.fillStyle = L, Z(M, 0, 0, U, R, Y, M === "Icon" ? d : l), A.restore(), n) {
5602
+ A.save(), A.translate(T + u, j);
5603
+ const P = Math.round(D).toString();
5547
5604
  A.font = "10px Inter, sans-serif";
5548
- const q = A.measureText(L), t = 6, p = 4, O = q.width + t * 2, AA = 14 + p;
5549
- A.beginPath(), A.roundRect(-O / 2, -AA / 2, O, AA, 4), A.fillStyle = $, A.fill(), A.fillStyle = oA, A.textAlign = "center", A.textBaseline = "middle", A.fillText(L, 0, 0), A.restore();
5605
+ const c = A.measureText(P), q = 6, e = 4, H = c.width + q * 2, W = 14 + e;
5606
+ A.beginPath(), A.roundRect(-H / 2, -W / 2, H, W, 4), A.fillStyle = IA, A.fill(), A.fillStyle = hA, A.textAlign = "center", A.textBaseline = "middle", A.fillText(P, 0, 0), A.restore();
5550
5607
  }
5551
- const Z = E.label || {}, CA = E.helperText || {}, FA = E.fontFamily || "Inter";
5552
- if (Z.visible !== !1) {
5553
- const L = Z.text || "Label", q = Z.fontSize || 12, t = Z.color || "rgba(156, 163, 175, 1)", p = Z.offset ?? 8;
5554
- A.font = `600 ${q}px "${FA}", sans-serif`, A.fillStyle = t, A.textAlign = "left", A.textBaseline = "bottom";
5555
- const O = -(Q / 2), AA = -(K / 2) - p;
5556
- A.fillText(L, O, AA);
5608
+ const O = E.label || {}, QA = E.helperText || {}, MA = E.fontFamily || "Inter";
5609
+ if (O.visible !== !1) {
5610
+ const P = O.text || "Label", c = O.fontSize || 12, q = O.color || "rgba(156, 163, 175, 1)", e = O.offset ?? 8;
5611
+ A.font = `600 ${c}px "${MA}", sans-serif`, A.fillStyle = q, A.textAlign = "left", A.textBaseline = "bottom";
5612
+ const H = -(Q / 2), W = -(S / 2) - e;
5613
+ A.fillText(P, H, W);
5557
5614
  }
5558
- if (CA.visible === !0) {
5559
- const L = CA.text || "Helper text", q = CA.fontSize || 11, t = CA.color || "rgba(156, 163, 175, 1)", p = CA.offset ?? 6;
5560
- A.font = `400 ${q}px "${FA}", sans-serif`, A.fillStyle = t, A.textAlign = "left", A.textBaseline = "top";
5561
- const O = -(Q / 2), AA = K / 2 + p;
5562
- A.fillText(L, O, AA);
5615
+ if (QA.visible === !0) {
5616
+ const P = QA.text || "Helper text", c = QA.fontSize || 11, q = QA.color || "rgba(156, 163, 175, 1)", e = QA.offset ?? 6;
5617
+ A.font = `400 ${c}px "${MA}", sans-serif`, A.fillStyle = q, A.textAlign = "left", A.textBaseline = "top";
5618
+ const H = -(Q / 2), W = S / 2 + e;
5619
+ A.fillText(P, H, W);
5563
5620
  }
5564
5621
  }
5565
5622
  renderDropdown(A, I) {
5566
5623
  if (!this.objectStates.get(I.id)) return;
5567
- const C = I.options || {}, Q = I.geometry.width || 160, E = I.geometry.height || 40, D = -Q / 2, o = -E / 2, w = C.cornerRadius ?? 6, G = C.isOpen || !1, s = C.disabled || !1, K = this.lastHoveredObjectId === I.id;
5568
- let S = C.backgroundColor || "#ffffff", J = C.borderColor || "#e5e7eb", k = C.color || "#333333";
5569
- s ? (S = C.disabledBackgroundColor || "#f3f4f6", J = C.disabledBorderColor || "#e5e7eb", k = C.disabledColor || "#9ca3af") : G ? (S = C.activeBackgroundColor || S, J = C.activeBorderColor || J, k = C.activeColor || k) : K && (S = C.hoverBackgroundColor || S, J = C.hoverBorderColor || J, k = C.hoverColor || k), A.beginPath();
5570
- const y = (z, v, T, W, m, Z) => {
5571
- W < 0 && (W = 0), m < 0 && (m = 0), Z = Math.min(Z, Math.min(W, m) / 2), z.moveTo(v + Z, T), z.lineTo(v + W - Z, T), z.arcTo(v + W, T, v + W, T + Z, Z), z.lineTo(v + W, T + m - Z), z.arcTo(v + W, T + m, v + W - Z, T + m, Z), z.lineTo(v + Z, T + m), z.arcTo(v, T + m, v, T + m - Z, Z), z.lineTo(v, T + Z), z.arcTo(v, T, v + Z, T, Z), z.closePath();
5624
+ const C = I.options || {}, Q = I.geometry.width || 160, E = I.geometry.height || 40, D = -Q / 2, o = -E / 2, w = C.cornerRadius ?? 6, h = C.isOpen || !1, G = C.disabled || !1, S = this.lastHoveredObjectId === I.id;
5625
+ let K = C.backgroundColor || "#ffffff", J = C.borderColor || "#e5e7eb", F = C.color || "#333333";
5626
+ G ? (K = C.disabledBackgroundColor || "#f3f4f6", J = C.disabledBorderColor || "#e5e7eb", F = C.disabledColor || "#9ca3af") : h ? (K = C.activeBackgroundColor || K, J = C.activeBorderColor || J, F = C.activeColor || F) : S && (K = C.hoverBackgroundColor || K, J = C.hoverBorderColor || J, F = C.hoverColor || F), A.beginPath();
5627
+ const y = (u, j, Z, V, T, O) => {
5628
+ V < 0 && (V = 0), T < 0 && (T = 0), O = Math.min(O, Math.min(V, T) / 2), u.moveTo(j + O, Z), u.lineTo(j + V - O, Z), u.arcTo(j + V, Z, j + V, Z + O, O), u.lineTo(j + V, Z + T - O), u.arcTo(j + V, Z + T, j + V - O, Z + T, O), u.lineTo(j + O, Z + T), u.arcTo(j, Z + T, j, Z + T - O, O), u.lineTo(j, Z + O), u.arcTo(j, Z, j + O, Z, O), u.closePath();
5572
5629
  };
5573
- y(A, D, o, Q, E, w), A.fillStyle = S, A.fill();
5574
- const F = C.borderWidth ?? 1;
5575
- F > 0 && (A.strokeStyle = J, A.lineWidth = F, A.stroke());
5576
- const M = 12, U = C.chevronType || "chevron", R = C.chevronSize || 16, n = (G ? C.openIconColor : C.closedIconColor) || C.chevronColor || "#6b7280";
5630
+ y(A, D, o, Q, E, w), A.fillStyle = K, A.fill();
5631
+ const k = C.borderWidth ?? 1;
5632
+ k > 0 && (A.strokeStyle = J, A.lineWidth = k, A.stroke());
5633
+ const M = 12, U = C.chevronType || "chevron", R = C.chevronSize || 16, Y = (h ? C.openIconColor : C.closedIconColor) || C.chevronColor || "#6b7280";
5577
5634
  if (U !== "none") {
5578
- const z = D + Q - M - R / 2;
5579
- A.save(), A.translate(z, 0);
5580
- const v = G ? C.openIconAngle ?? 180 : C.closedIconAngle ?? 0;
5581
- if (A.rotate(v * Math.PI / 180), A.strokeStyle = n, A.fillStyle = n, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", U === "chevron")
5635
+ const u = D + Q - M - R / 2;
5636
+ A.save(), A.translate(u, 0);
5637
+ const j = h ? C.openIconAngle ?? 180 : C.closedIconAngle ?? 0;
5638
+ if (A.rotate(j * Math.PI / 180), A.strokeStyle = Y, A.fillStyle = Y, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", U === "chevron")
5582
5639
  A.beginPath(), A.moveTo(-R / 2, -R * 0.2), A.lineTo(0, R * 0.2), A.lineTo(R / 2, -R * 0.2), A.stroke();
5583
5640
  else if (U === "custom" || U === "path") {
5584
- const T = G && C.openIconPath || C.closedIconPath;
5585
- if (T) {
5586
- const W = new Path2D(T);
5641
+ const Z = h && C.openIconPath || C.closedIconPath;
5642
+ if (Z) {
5643
+ const V = new Path2D(Z);
5587
5644
  A.save();
5588
- const m = R / 24;
5589
- A.scale(m, m), A.translate(-12, -12), A.fill(W), A.restore();
5645
+ const T = R / 24;
5646
+ A.scale(T, T), A.translate(-12, -12), A.fill(V), A.restore();
5590
5647
  }
5591
5648
  }
5592
5649
  A.restore();
5593
5650
  }
5594
- const e = C.selectedOption || C.placeholder || "Select...", l = C.fontSize || 14, d = C.fontWeight || 400, r = C.fontFamily || "Inter, sans-serif";
5595
- A.font = `${d} ${l}px ${r}`, A.fillStyle = !C.selectedOption && C.placeholder ? "#9ca3af" : k, s && (A.fillStyle = C.disabledColor || "#9ca3af"), A.textAlign = "left", A.textBaseline = "middle";
5596
- const $ = U === "none" ? 0 : R + 8, oA = Q - M * 2 - $;
5597
- if (A.save(), A.beginPath(), A.rect(D + M, o, oA, E), A.clip(), A.fillText(e, D + M, 0), A.restore(), G && !s) {
5598
- const z = o + E + 4, v = C.optionsList || [], T = C.itemHeight || 32, W = C.listPadding ?? 4, m = v.length * T + W * 2, Z = C.listCornerRadius ?? w;
5599
- A.save(), A.shadowColor = "rgba(0,0,0,0.15)", A.shadowBlur = 12, A.shadowOffsetY = 6, A.beginPath(), y(A, D, z, Q, m, Z), A.fillStyle = C.listBackgroundColor || "#ffffff", A.fill();
5600
- const CA = C.listBorderWidth ?? 1;
5601
- CA > 0 && (A.shadowColor = "transparent", A.strokeStyle = C.listBorderColor || J, A.lineWidth = CA, A.stroke()), A.restore();
5602
- const FA = C.itemFontSize || l, L = C.itemFontFamily || r;
5603
- A.font = `${d} ${FA}px ${L}`, v.forEach((q, t) => {
5604
- const p = z + W + t * T;
5605
- if (q === C.selectedOption)
5606
- A.fillStyle = C.itemSelectedBackgroundColor || C.listHoverColor || "#f3f4f6", A.fillRect(D + CA, p, Q - CA * 2, T), A.fillStyle = C.itemSelectedColor || C.activeColor || k || "#374151";
5607
- else if (A.fillStyle = C.listTextColor || k || "#333333", this.activeDropdownId === I.id && this._lastPointerPos) {
5608
- const AA = this.objectStates.get(I.id);
5609
- if (AA) {
5610
- const MA = this._lastPointerPos.y - (AA.y + E / 2 + 4 + W), KA = Math.floor(MA / T);
5611
- t === KA && (A.fillStyle = C.itemHoverBackgroundColor || C.listHoverColor || "#f9fafb", A.fillRect(D + CA, p, Q - CA * 2, T), A.fillStyle = C.itemHoverColor || k);
5651
+ const L = C.selectedOption || C.placeholder || "Select...", l = C.fontSize || 14, d = C.fontWeight || 400, n = C.fontFamily || "Inter, sans-serif";
5652
+ A.font = `${d} ${l}px ${n}`, A.fillStyle = !C.selectedOption && C.placeholder ? "#9ca3af" : F, G && (A.fillStyle = C.disabledColor || "#9ca3af"), A.textAlign = "left", A.textBaseline = "middle";
5653
+ const IA = U === "none" ? 0 : R + 8, hA = Q - M * 2 - IA;
5654
+ if (A.save(), A.beginPath(), A.rect(D + M, o, hA, E), A.clip(), A.fillText(L, D + M, 0), A.restore(), h && !G) {
5655
+ const u = o + E + 4, j = C.optionsList || [], Z = C.itemHeight || 32, V = C.listPadding ?? 4, T = j.length * Z + V * 2, O = C.listCornerRadius ?? w;
5656
+ A.save(), A.shadowColor = "rgba(0,0,0,0.15)", A.shadowBlur = 12, A.shadowOffsetY = 6, A.beginPath(), y(A, D, u, Q, T, O), A.fillStyle = C.listBackgroundColor || "#ffffff", A.fill();
5657
+ const QA = C.listBorderWidth ?? 1;
5658
+ QA > 0 && (A.shadowColor = "transparent", A.strokeStyle = C.listBorderColor || J, A.lineWidth = QA, A.stroke()), A.restore();
5659
+ const MA = C.itemFontSize || l, P = C.itemFontFamily || n;
5660
+ A.font = `${d} ${MA}px ${P}`, j.forEach((c, q) => {
5661
+ const e = u + V + q * Z;
5662
+ if (c === C.selectedOption)
5663
+ A.fillStyle = C.itemSelectedBackgroundColor || C.listHoverColor || "#f3f4f6", A.fillRect(D + QA, e, Q - QA * 2, Z), A.fillStyle = C.itemSelectedColor || C.activeColor || F || "#374151";
5664
+ else if (A.fillStyle = C.listTextColor || F || "#333333", this.activeDropdownId === I.id && this._lastPointerPos) {
5665
+ const W = this.objectStates.get(I.id);
5666
+ if (W) {
5667
+ const wA = this._lastPointerPos.y - (W.y + E / 2 + 4 + V), NA = Math.floor(wA / Z);
5668
+ q === NA && (A.fillStyle = C.itemHoverBackgroundColor || C.listHoverColor || "#f9fafb", A.fillRect(D + QA, e, Q - QA * 2, Z), A.fillStyle = C.itemHoverColor || F);
5612
5669
  }
5613
5670
  }
5614
- A.fillText(q, D + M, p + T / 2);
5671
+ A.fillText(c, D + M, e + Z / 2);
5615
5672
  });
5616
5673
  }
5617
5674
  }
5618
5675
  renderButton(A, I) {
5619
- var M, U, R, n;
5620
- const g = I.options || {}, C = ((M = I.geometry) == null ? void 0 : M.width) || 120, Q = ((U = I.geometry) == null ? void 0 : U.height) || 40, E = -C / 2, D = -Q / 2, o = this.lastHoveredObjectId === I.id, w = g.cornerRadius ?? 8, G = g.bgShape || "Rectangle", s = o ? ((R = g.hoverStyle) == null ? void 0 : R.backgroundColor) || g.buttonBgColor || "#3b82f6" : g.buttonBgColor || "#3b82f6", K = g.label || {}, S = o ? ((n = g.hoverStyle) == null ? void 0 : n.textColor) || K.color || "#ffffff" : K.color || "#ffffff", J = g.icon || { enabled: !1 };
5621
- A.save(), A.beginPath(), G === "Rectangle" ? A.roundRect(E, D, C, Q, w) : G === "Ellipse" || G === "Circle" ? A.ellipse(0, 0, C / 2, Q / 2, 0, 0, Math.PI * 2) : G === "Pill" && A.roundRect(E, D, C, Q, Q / 2), A.fillStyle = s, A.fill();
5622
- const k = K.fontSize || 14, y = K.fontFamily || "Inter";
5623
- A.font = `${K.fontWeight || 400} ${k}px "${y}", sans-serif`, A.fillStyle = S, A.textAlign = "center", A.textBaseline = "middle";
5624
- let F = 0;
5676
+ var M, U, R, Y;
5677
+ const g = I.options || {}, C = ((M = I.geometry) == null ? void 0 : M.width) || 120, Q = ((U = I.geometry) == null ? void 0 : U.height) || 40, E = -C / 2, D = -Q / 2, o = this.lastHoveredObjectId === I.id, w = g.cornerRadius ?? 8, h = g.bgShape || "Rectangle", G = o ? ((R = g.hoverStyle) == null ? void 0 : R.backgroundColor) || g.buttonBgColor || "#3b82f6" : g.buttonBgColor || "#3b82f6", S = g.label || {}, K = o ? ((Y = g.hoverStyle) == null ? void 0 : Y.textColor) || S.color || "#ffffff" : S.color || "#ffffff", J = g.icon || { enabled: !1 };
5678
+ A.save(), A.beginPath(), h === "Rectangle" ? A.roundRect(E, D, C, Q, w) : h === "Ellipse" || h === "Circle" ? A.ellipse(0, 0, C / 2, Q / 2, 0, 0, Math.PI * 2) : h === "Pill" && A.roundRect(E, D, C, Q, Q / 2), A.fillStyle = G, A.fill();
5679
+ const F = S.fontSize || 14, y = S.fontFamily || "Inter";
5680
+ A.font = `${S.fontWeight || 400} ${F}px "${y}", sans-serif`, A.fillStyle = K, A.textAlign = "center", A.textBaseline = "middle";
5681
+ let k = 0;
5625
5682
  if (J.enabled && J.svgPath) {
5626
- const e = J.size || 16, l = J.gap || 8, d = J.position === "left" ? -(A.measureText(K.text || "").width / 2 + e / 2 + l / 2) : A.measureText(K.text || "").width / 2 + e / 2 + l / 2;
5683
+ const L = J.size || 16, l = J.gap || 8, d = J.position === "left" ? -(A.measureText(S.text || "").width / 2 + L / 2 + l / 2) : A.measureText(S.text || "").width / 2 + L / 2 + l / 2;
5627
5684
  A.save(), A.translate(d, 0);
5628
- const r = new Path2D(J.svgPath), $ = e / 24;
5629
- A.scale($, $), A.translate(-12, -12), A.fillStyle = J.color || S, A.fill(r), A.restore(), F = J.position === "left" ? e / 2 + l / 2 : -(e / 2 + l / 2);
5685
+ const n = new Path2D(J.svgPath), IA = L / 24;
5686
+ A.scale(IA, IA), A.translate(-12, -12), A.fillStyle = J.color || K, A.fill(n), A.restore(), k = J.position === "left" ? L / 2 + l / 2 : -(L / 2 + l / 2);
5630
5687
  }
5631
- A.fillText(K.text || "Button", F, 0), A.restore();
5688
+ A.fillText(S.text || "Button", k, 0), A.restore();
5632
5689
  }
5633
5690
  renderToggleButton(A, I) {
5634
- var k, y;
5635
- const g = I.options || {}, C = g.checked ?? !1, Q = ((k = I.geometry) == null ? void 0 : k.width) || 120, E = ((y = I.geometry) == null ? void 0 : y.height) || 40, D = -Q / 2, o = -E / 2, w = g.cornerRadius ?? 8, G = g.label || {}, s = C ? g.activeColor || "#3b82f6" : g.inactiveColor || "#374151", K = C ? g.activeTextColor || "#ffffff" : g.inactiveTextColor || "#9ca3af";
5636
- A.save(), A.beginPath(), A.roundRect(D, o, Q, E, w), A.fillStyle = s, A.fill();
5637
- const S = G.fontSize || 14, J = G.fontFamily || "Inter";
5638
- A.font = `${G.fontWeight || 600} ${S}px "${J}", sans-serif`, A.fillStyle = K, A.textAlign = "center", A.textBaseline = "middle", A.fillText(G.text || "Toggle", 0, 0), A.restore();
5691
+ var F, y;
5692
+ const g = I.options || {}, C = g.checked ?? !1, Q = ((F = I.geometry) == null ? void 0 : F.width) || 120, E = ((y = I.geometry) == null ? void 0 : y.height) || 40, D = -Q / 2, o = -E / 2, w = g.cornerRadius ?? 8, h = g.label || {}, G = C ? g.activeColor || "#3b82f6" : g.inactiveColor || "#374151", S = C ? g.activeTextColor || "#ffffff" : g.inactiveTextColor || "#9ca3af";
5693
+ A.save(), A.beginPath(), A.roundRect(D, o, Q, E, w), A.fillStyle = G, A.fill();
5694
+ const K = h.fontSize || 14, J = h.fontFamily || "Inter";
5695
+ A.font = `${h.fontWeight || 600} ${K}px "${J}", sans-serif`, A.fillStyle = S, A.textAlign = "center", A.textBaseline = "middle", A.fillText(h.text || "Toggle", 0, 0), A.restore();
5639
5696
  }
5640
5697
  renderToggle(A, I) {
5641
- var F, M;
5642
- const g = I.options || {}, C = ((F = I.geometry) == null ? void 0 : F.width) || 52, Q = ((M = I.geometry) == null ? void 0 : M.height) || 30, E = -C / 2, D = -Q / 2, o = g.checked ?? !1, w = g.cornerRadius ?? Q / 2;
5698
+ var k, M;
5699
+ const g = I.options || {}, C = ((k = I.geometry) == null ? void 0 : k.width) || 52, Q = ((M = I.geometry) == null ? void 0 : M.height) || 30, E = -C / 2, D = -Q / 2, o = g.checked ?? !1, w = g.cornerRadius ?? Q / 2;
5643
5700
  A.beginPath(), A.roundRect(E, D, C, Q, w), A.fillStyle = o ? g.activeColor || "#10b981" : g.inactiveColor || "#374151", g.disabled && (A.globalAlpha *= 0.5), A.fill();
5644
- const G = 3, s = Q - G * 2, K = s / 2, S = E + G, J = E + C - G - s, k = o ? J : S, y = D + G;
5645
- if (A.beginPath(), A.arc(k + K, y + K, K, 0, Math.PI * 2), A.fillStyle = g.knobColor || "#ffffff", A.fill(), g.disabled && (A.globalAlpha *= 2), g.label && g.label.text) {
5646
- const U = g.label, R = U.fontSize || 14, n = U.fontWeight || 400, e = U.fontFamily || "Inter";
5647
- A.font = `${n} ${R}px "${e}", sans-serif`, A.fillStyle = U.color || "#f3f4f6", A.textBaseline = "middle";
5701
+ const h = 3, G = Q - h * 2, S = G / 2, K = E + h, J = E + C - h - G, F = o ? J : K, y = D + h;
5702
+ if (A.beginPath(), A.arc(F + S, y + S, S, 0, Math.PI * 2), A.fillStyle = g.knobColor || "#ffffff", A.fill(), g.disabled && (A.globalAlpha *= 2), g.label && g.label.text) {
5703
+ const U = g.label, R = U.fontSize || 14, Y = U.fontWeight || 400, L = U.fontFamily || "Inter";
5704
+ A.font = `${Y} ${R}px "${L}", sans-serif`, A.fillStyle = U.color || "#f3f4f6", A.textBaseline = "middle";
5648
5705
  const l = U.gap || 10;
5649
- let d = 0, r = 0;
5650
- U.position === "left" ? (A.textAlign = "right", d = E - l, r = 0) : U.position === "right" ? (A.textAlign = "left", d = E + C + l, r = 0) : U.position === "top" ? (A.textAlign = "center", d = 0, r = D - l, A.textBaseline = "bottom") : U.position === "bottom" ? (A.textAlign = "center", d = 0, r = D + Q + l, A.textBaseline = "top") : (A.textAlign = "left", d = E + C + l, r = 0), A.fillText(U.text, d, r);
5706
+ let d = 0, n = 0;
5707
+ U.position === "left" ? (A.textAlign = "right", d = E - l, n = 0) : U.position === "right" ? (A.textAlign = "left", d = E + C + l, n = 0) : U.position === "top" ? (A.textAlign = "center", d = 0, n = D - l, A.textBaseline = "bottom") : U.position === "bottom" ? (A.textAlign = "center", d = 0, n = D + Q + l, A.textBaseline = "top") : (A.textAlign = "left", d = E + C + l, n = 0), A.fillText(U.text, d, n);
5651
5708
  }
5652
5709
  }
5653
5710
  renderLineGraph(A, I, g, C) {
@@ -5666,86 +5723,86 @@ class ZC {
5666
5723
  pointFill: I.pointFill || "#ffffff",
5667
5724
  pointStrokeColor: I.pointStrokeColor || I.lineColor || "#3b82f6",
5668
5725
  pointStrokeWidth: I.pointStrokeWidth || 2
5669
- }]), !Q || Q.length === 0 || !Q.some((k) => k.data && k.data.length >= 2)) {
5726
+ }]), !Q || Q.length === 0 || !Q.some((F) => F.data && F.data.length >= 2)) {
5670
5727
  A.save(), A.fillStyle = "#6366f1", A.font = "12px Inter, system-ui, sans-serif", A.textAlign = "center", A.textBaseline = "middle", A.fillText("NO DATA", 0, 0), A.restore();
5671
5728
  return;
5672
5729
  }
5673
5730
  let E = 1 / 0, D = -1 / 0, o = 0;
5674
- if (Q.forEach((k) => {
5675
- let y = k.data;
5676
- if (k.isVarEnabled && k.inputId) {
5677
- let F = this.inputs.get(k.inputId);
5678
- if (F === void 0) {
5679
- const M = this.inputNameMap.get(k.inputId);
5680
- M && M.length > 0 && (F = this.inputs.get(M[0]));
5731
+ if (Q.forEach((F) => {
5732
+ let y = F.data;
5733
+ if (F.isVarEnabled && F.inputId) {
5734
+ let k = this.inputs.get(F.inputId);
5735
+ if (k === void 0) {
5736
+ const M = this.inputNameMap.get(F.inputId);
5737
+ M && M.length > 0 && (k = this.inputs.get(M[0]));
5681
5738
  }
5682
- F && Array.isArray(F) && (y = F);
5739
+ k && Array.isArray(k) && (y = k);
5683
5740
  }
5684
5741
  if (y && y.length > 0) {
5685
- const F = y.filter((M) => typeof M == "number" && !isNaN(M));
5686
- F.length > 0 && (E = Math.min(E, ...F), D = Math.max(D, ...F), o = Math.max(o, y.length));
5742
+ const k = y.filter((M) => typeof M == "number" && !isNaN(M));
5743
+ k.length > 0 && (E = Math.min(E, ...k), D = Math.max(D, ...k), o = Math.max(o, y.length));
5687
5744
  }
5688
- k._resolvedData = y;
5745
+ F._resolvedData = y;
5689
5746
  }), o < 2) return;
5690
- const w = D - E, G = g / (o - 1), s = (k) => {
5691
- const y = w === 0 ? 0.5 : (k - E) / w;
5747
+ const w = D - E, h = g / (o - 1), G = (F) => {
5748
+ const y = w === 0 ? 0.5 : (F - E) / w;
5692
5749
  return C / 2 - y * C;
5693
- }, K = (k) => k * G - g / 2, S = I.axisColor || "#333333";
5694
- if (I.showXAxis && (A.beginPath(), A.strokeStyle = I.xAxisColor || S, A.lineWidth = 1, A.moveTo(-g / 2, C / 2), A.lineTo(g / 2, C / 2), A.stroke()), I.showYAxis && (A.beginPath(), A.strokeStyle = I.yAxisColor || S, A.lineWidth = 1, A.moveTo(-g / 2, -C / 2), A.lineTo(-g / 2, C / 2), A.stroke()), A.fillStyle = I.axisLabelColor || "#333333", A.font = `${I.axisLabelFontSize || 10}px Inter, sans-serif`, I.showXLabels) {
5750
+ }, S = (F) => F * h - g / 2, K = I.axisColor || "#333333";
5751
+ if (I.showXAxis && (A.beginPath(), A.strokeStyle = I.xAxisColor || K, A.lineWidth = 1, A.moveTo(-g / 2, C / 2), A.lineTo(g / 2, C / 2), A.stroke()), I.showYAxis && (A.beginPath(), A.strokeStyle = I.yAxisColor || K, A.lineWidth = 1, A.moveTo(-g / 2, -C / 2), A.lineTo(-g / 2, C / 2), A.stroke()), A.fillStyle = I.axisLabelColor || "#333333", A.font = `${I.axisLabelFontSize || 10}px Inter, sans-serif`, I.showXLabels) {
5695
5752
  A.textAlign = "center", A.textBaseline = "top";
5696
- for (let k = 0; k < o; k++) {
5697
- const y = K(k);
5698
- A.fillText(`${k + 1}`, y, C / 2 + 5);
5753
+ for (let F = 0; F < o; F++) {
5754
+ const y = S(F);
5755
+ A.fillText(`${F + 1}`, y, C / 2 + 5);
5699
5756
  }
5700
5757
  }
5701
5758
  if (I.showYLabels) {
5702
5759
  A.textAlign = "right", A.textBaseline = "middle";
5703
- const k = -g / 2 - 5, y = (D + E) / 2;
5704
- A.fillText(D.toFixed(1), k, s(D)), A.fillText(y.toFixed(1), k, s(y)), A.fillText(E.toFixed(1), k, s(E));
5760
+ const F = -g / 2 - 5, y = (D + E) / 2;
5761
+ A.fillText(D.toFixed(1), F, G(D)), A.fillText(y.toFixed(1), F, G(y)), A.fillText(E.toFixed(1), F, G(E));
5705
5762
  }
5706
5763
  const J = 10;
5707
- if (Q.forEach((k) => {
5708
- const y = k._resolvedData;
5764
+ if (Q.forEach((F) => {
5765
+ const y = F._resolvedData;
5709
5766
  if (!(!y || y.length < 2)) {
5710
- if (k.showArea) {
5711
- if (A.beginPath(), A.moveTo(K(0), C / 2), A.lineTo(K(0), s(y[0])), k.smoothing && y.length > 2)
5767
+ if (F.showArea) {
5768
+ if (A.beginPath(), A.moveTo(S(0), C / 2), A.lineTo(S(0), G(y[0])), F.smoothing && y.length > 2)
5712
5769
  for (let M = 0; M < y.length - 1; M++) {
5713
- const U = y[M === 0 ? M : M - 1], R = y[M], n = y[M + 1], e = y[M + 1 === y.length - 1 ? M + 1 : M + 2];
5770
+ const U = y[M === 0 ? M : M - 1], R = y[M], Y = y[M + 1], L = y[M + 1 === y.length - 1 ? M + 1 : M + 2];
5714
5771
  for (let l = 1; l <= J; l++) {
5715
- const d = l / J, r = this._catmullRom(U, R, n, e, d);
5716
- A.lineTo(K(M + d), s(r));
5772
+ const d = l / J, n = this._catmullRom(U, R, Y, L, d);
5773
+ A.lineTo(S(M + d), G(n));
5717
5774
  }
5718
5775
  }
5719
5776
  else
5720
5777
  for (let M = 1; M < y.length; M++)
5721
- A.lineTo(K(M), s(y[M]));
5722
- A.lineTo(K(y.length - 1), C / 2), A.closePath();
5723
- const F = A.globalAlpha;
5724
- A.globalAlpha = F * (I.areaOpacity ?? 0.3), A.fillStyle = k.areaColor || "rgba(139, 92, 246, 0.2)", A.fill(), A.globalAlpha = F;
5778
+ A.lineTo(S(M), G(y[M]));
5779
+ A.lineTo(S(y.length - 1), C / 2), A.closePath();
5780
+ const k = A.globalAlpha;
5781
+ A.globalAlpha = k * (I.areaOpacity ?? 0.3), A.fillStyle = F.areaColor || "rgba(139, 92, 246, 0.2)", A.fill(), A.globalAlpha = k;
5725
5782
  }
5726
- if (A.beginPath(), A.strokeStyle = k.lineColor || "#3b82f6", A.lineWidth = k.lineWidth || 2, A.lineJoin = "round", A.lineCap = "round", A.moveTo(K(0), s(y[0])), k.smoothing && y.length > 2)
5727
- for (let F = 0; F < y.length - 1; F++) {
5728
- const M = y[F === 0 ? F : F - 1], U = y[F], R = y[F + 1], n = y[F + 1 === y.length - 1 ? F + 1 : F + 2];
5729
- for (let e = 1; e <= J; e++) {
5730
- const l = e / J, d = this._catmullRom(M, U, R, n, l);
5731
- A.lineTo(K(F + l), s(d));
5783
+ if (A.beginPath(), A.strokeStyle = F.lineColor || "#3b82f6", A.lineWidth = F.lineWidth || 2, A.lineJoin = "round", A.lineCap = "round", A.moveTo(S(0), G(y[0])), F.smoothing && y.length > 2)
5784
+ for (let k = 0; k < y.length - 1; k++) {
5785
+ const M = y[k === 0 ? k : k - 1], U = y[k], R = y[k + 1], Y = y[k + 1 === y.length - 1 ? k + 1 : k + 2];
5786
+ for (let L = 1; L <= J; L++) {
5787
+ const l = L / J, d = this._catmullRom(M, U, R, Y, l);
5788
+ A.lineTo(S(k + l), G(d));
5732
5789
  }
5733
5790
  }
5734
5791
  else
5735
- for (let F = 1; F < y.length; F++)
5736
- A.lineTo(K(F), s(y[F]));
5737
- A.stroke(), k.showPoints && y.forEach((F, M) => {
5738
- const U = K(M), R = s(F);
5739
- A.beginPath(), A.arc(U, R, (k.pointSize || 6) / 2, 0, Math.PI * 2), A.fillStyle = k.pointFill || "#ffffff", A.fill(), A.strokeStyle = k.pointStrokeColor || k.lineColor || "#3b82f6", A.lineWidth = k.pointStrokeWidth || 1, A.stroke();
5792
+ for (let k = 1; k < y.length; k++)
5793
+ A.lineTo(S(k), G(y[k]));
5794
+ A.stroke(), F.showPoints && y.forEach((k, M) => {
5795
+ const U = S(M), R = G(k);
5796
+ A.beginPath(), A.arc(U, R, (F.pointSize || 6) / 2, 0, Math.PI * 2), A.fillStyle = F.pointFill || "#ffffff", A.fill(), A.strokeStyle = F.pointStrokeColor || F.lineColor || "#3b82f6", A.lineWidth = F.pointStrokeWidth || 1, A.stroke();
5740
5797
  });
5741
5798
  }
5742
5799
  }), I.showLegend && Q.length > 0) {
5743
- const k = g / 2 - 10;
5800
+ const F = g / 2 - 10;
5744
5801
  let y = -C / 2 + 15;
5745
- const F = I.legendFontSize || 10, M = F + 5;
5746
- A.font = `${F}px Inter, sans-serif`, A.textAlign = "right", A.textBaseline = "alphabetic", Q.forEach((U) => {
5747
- const n = U.label || "Series", e = A.measureText(n).width;
5748
- A.beginPath(), A.rect(k - e - 8 - 5, y - (8 / 2 + 2), 8, 8), A.fillStyle = U.lineColor || "#3b82f6", A.fill(), A.fillStyle = I.legendColor || "#333333", A.fillText(n, k, y), y += M;
5802
+ const k = I.legendFontSize || 10, M = k + 5;
5803
+ A.font = `${k}px Inter, sans-serif`, A.textAlign = "right", A.textBaseline = "alphabetic", Q.forEach((U) => {
5804
+ const Y = U.label || "Series", L = A.measureText(Y).width;
5805
+ A.beginPath(), A.rect(F - L - 8 - 5, y - (8 / 2 + 2), 8, 8), A.fillStyle = U.lineColor || "#3b82f6", A.fill(), A.fillStyle = I.legendColor || "#333333", A.fillText(Y, F, y), y += M;
5749
5806
  });
5750
5807
  }
5751
5808
  }
@@ -5754,27 +5811,27 @@ class ZC {
5754
5811
  return (2 * I - 2 * g + E + D) * w + (-3 * I + 3 * g - 2 * E - D) * o + E * Q + I;
5755
5812
  }
5756
5813
  createCanvasFill(A, I, g, C) {
5757
- var Q, E, D, o, w, G;
5814
+ var Q, E, D, o, w, h;
5758
5815
  if (!I || I.type === "None") return null;
5759
5816
  if (I.type === "Solid")
5760
5817
  return I.color;
5761
5818
  if (I.type === "LinearGradient" && I.stops) {
5762
- const s = (((Q = I.start) == null ? void 0 : Q[0]) ?? 0) * g - g / 2, K = (((E = I.start) == null ? void 0 : E[1]) ?? 0) * C - C / 2, S = (((D = I.end) == null ? void 0 : D[0]) ?? 1) * g - g / 2, J = (((o = I.end) == null ? void 0 : o[1]) ?? 0) * C - C / 2, k = A.createLinearGradient(s, K, S, J);
5763
- return I.stops.forEach((y) => k.addColorStop(y.offset, y.color)), k;
5819
+ const G = (((Q = I.start) == null ? void 0 : Q[0]) ?? 0) * g - g / 2, S = (((E = I.start) == null ? void 0 : E[1]) ?? 0) * C - C / 2, K = (((D = I.end) == null ? void 0 : D[0]) ?? 1) * g - g / 2, J = (((o = I.end) == null ? void 0 : o[1]) ?? 0) * C - C / 2, F = A.createLinearGradient(G, S, K, J);
5820
+ return I.stops.forEach((y) => F.addColorStop(y.offset, y.color)), F;
5764
5821
  }
5765
5822
  if (I.type === "RadialGradient" && I.stops) {
5766
- const s = (((w = I.center) == null ? void 0 : w[0]) ?? 0.5) * g - g / 2, K = (((G = I.center) == null ? void 0 : G[1]) ?? 0.5) * C - C / 2, S = (I.radius ?? 0.5) * Math.max(g, C), J = A.createRadialGradient(s, K, 0, s, K, S);
5767
- return I.stops.forEach((k) => J.addColorStop(k.offset, k.color)), J;
5823
+ const G = (((w = I.center) == null ? void 0 : w[0]) ?? 0.5) * g - g / 2, S = (((h = I.center) == null ? void 0 : h[1]) ?? 0.5) * C - C / 2, K = (I.radius ?? 0.5) * Math.max(g, C), J = A.createRadialGradient(G, S, 0, G, S, K);
5824
+ return I.stops.forEach((F) => J.addColorStop(F.offset, F.color)), J;
5768
5825
  }
5769
5826
  if (I.type === "Pattern" && I.url) {
5770
- let s = this.imageCache.get(I.url);
5771
- if (s || (s = new Image(), s.src = I.url, this.imageCache.set(I.url, s)), s.complete && s.naturalWidth > 0) {
5772
- const K = A.createPattern(s, "repeat");
5773
- if (K && (I.scaleX !== void 0 || I.offsetX !== void 0)) {
5774
- const S = new DOMMatrix(), J = I.scaleX ?? 1, k = I.scaleY ?? 1, y = I.offsetX ?? 0, F = I.offsetY ?? 0, M = I.rotation ?? 0;
5775
- S.translateSelf(y, F), S.rotateSelf(M), S.scaleSelf(J, k), K.setTransform(S);
5827
+ let G = this.imageCache.get(I.url);
5828
+ if (G || (G = new Image(), G.src = I.url, this.imageCache.set(I.url, G)), G.complete && G.naturalWidth > 0) {
5829
+ const S = A.createPattern(G, "repeat");
5830
+ if (S && (I.scaleX !== void 0 || I.offsetX !== void 0)) {
5831
+ const K = new DOMMatrix(), J = I.scaleX ?? 1, F = I.scaleY ?? 1, y = I.offsetX ?? 0, k = I.offsetY ?? 0, M = I.rotation ?? 0;
5832
+ K.translateSelf(y, k), K.rotateSelf(M), K.scaleSelf(J, F), S.setTransform(K);
5776
5833
  }
5777
- return K;
5834
+ return S;
5778
5835
  }
5779
5836
  }
5780
5837
  return I.color || null;
@@ -5789,24 +5846,24 @@ class ZC {
5789
5846
  }
5790
5847
  let o = [0, 0, 0, 0];
5791
5848
  typeof D == "number" ? o = [D, D, D, D] : Array.isArray(D) && (D.length === 1 ? o = [D[0], D[0], D[0], D[0]] : D.length === 2 ? o = [D[0], D[1], D[0], D[1]] : D.length === 4 && (o = D));
5792
- const w = Math.min(Math.abs(C) / 2, Math.abs(Q) / 2), G = Math.max(0, Math.min(Number(o[0]) || 0, w)), s = Math.max(0, Math.min(Number(o[1]) || 0, w)), K = Math.max(0, Math.min(Number(o[2]) || 0, w)), S = Math.max(0, Math.min(Number(o[3]) || 0, w));
5793
- A.moveTo(I + G, g), A.lineTo(I + C - s, g), s > 0 ? A.arcTo(I + C, g, I + C, g + s, s) : A.lineTo(I + C, g), A.lineTo(I + C, g + Q - K), K > 0 ? A.arcTo(I + C, g + Q, I + C - K, g + Q, K) : A.lineTo(I + C, g + Q), A.lineTo(I + S, g + Q), S > 0 ? A.arcTo(I, g + Q, I, g + Q - S, S) : A.lineTo(I, g + Q), A.lineTo(I, g + G), G > 0 ? A.arcTo(I, g, I + G, g, G) : A.lineTo(I, g), A.closePath();
5849
+ const w = Math.min(Math.abs(C) / 2, Math.abs(Q) / 2), h = Math.max(0, Math.min(Number(o[0]) || 0, w)), G = Math.max(0, Math.min(Number(o[1]) || 0, w)), S = Math.max(0, Math.min(Number(o[2]) || 0, w)), K = Math.max(0, Math.min(Number(o[3]) || 0, w));
5850
+ A.moveTo(I + h, g), A.lineTo(I + C - G, g), G > 0 ? A.arcTo(I + C, g, I + C, g + G, G) : A.lineTo(I + C, g), A.lineTo(I + C, g + Q - S), S > 0 ? A.arcTo(I + C, g + Q, I + C - S, g + Q, S) : A.lineTo(I + C, g + Q), A.lineTo(I + K, g + Q), K > 0 ? A.arcTo(I, g + Q, I, g + Q - K, K) : A.lineTo(I, g + Q), A.lineTo(I, g + h), h > 0 ? A.arcTo(I, g, I + h, g, h) : A.lineTo(I, g), A.closePath();
5794
5851
  }
5795
5852
  }
5796
5853
  const XC = yC(
5797
- ({ artboard: i, src: A, className: I, style: g, autoPlay: C = !0, fit: Q = "Contain", alignment: E = "Center", onReady: D, onTrigger: o, onInputUpdate: w, onComponentChange: G }, s) => {
5798
- const K = iI(null), S = iI(new ZC()), J = iI(), k = iI(0);
5799
- FC(s, () => K.current), WA(() => {
5800
- console.log("[ExodeUI] Layout Effect - Component Updated/Mounted"), S.current.setLayout(Q, E);
5801
- }, [Q, E]), WA(() => {
5802
- o && S.current.setTriggerCallback(o);
5803
- }, [o]), WA(() => {
5804
- w && S.current.setInputUpdateCallback(w);
5805
- }, [w]), WA(() => {
5806
- G && S.current.setComponentChangeCallback(G);
5807
- }, [G]), WA(() => {
5854
+ ({ artboard: i, src: A, className: I, style: g, autoPlay: C = !0, fit: Q = "Contain", alignment: E = "Center", onReady: D, onTrigger: o, onInputUpdate: w, onComponentChange: h }, G) => {
5855
+ const S = iI(null), K = iI(new ZC()), J = iI(), F = iI(0);
5856
+ FC(G, () => S.current), OA(() => {
5857
+ console.log("[ExodeUI] Layout Effect - Component Updated/Mounted"), K.current.setLayout(Q, E);
5858
+ }, [Q, E]), OA(() => {
5859
+ o && K.current.setTriggerCallback(o);
5860
+ }, [o]), OA(() => {
5861
+ w && K.current.setInputUpdateCallback(w);
5862
+ }, [w]), OA(() => {
5863
+ h && K.current.setComponentChangeCallback(h);
5864
+ }, [h]), OA(() => {
5808
5865
  (async () => {
5809
- const M = S.current;
5866
+ const M = K.current;
5810
5867
  let U = i;
5811
5868
  if (!U && A)
5812
5869
  try {
@@ -5817,43 +5874,43 @@ const XC = yC(
5817
5874
  }
5818
5875
  U && (M.load(U), D && D(M));
5819
5876
  })();
5820
- }, [i, A]), WA(() => {
5821
- const F = S.current, M = K.current;
5877
+ }, [i, A]), OA(() => {
5878
+ const k = K.current, M = S.current;
5822
5879
  if (!M) return;
5823
5880
  const U = M.getContext("2d");
5824
5881
  if (!U) return;
5825
- const R = (n) => {
5826
- k.current || (k.current = n);
5827
- const e = (n - k.current) / 1e3;
5828
- k.current = n, C && F.advance(e);
5829
- const l = window.devicePixelRatio || 1, d = M.getBoundingClientRect(), r = Math.floor(d.width * l), $ = Math.floor(d.height * l);
5830
- (M.width !== r || M.height !== $) && (M.width = r, M.height = $), F.render(U, r, $), J.current = requestAnimationFrame(R);
5882
+ const R = (Y) => {
5883
+ F.current || (F.current = Y);
5884
+ const L = (Y - F.current) / 1e3;
5885
+ F.current = Y, C && k.advance(L);
5886
+ const l = window.devicePixelRatio || 1, d = M.getBoundingClientRect(), n = Math.floor(d.width * l), IA = Math.floor(d.height * l);
5887
+ (M.width !== n || M.height !== IA) && (M.width = n, M.height = IA), k.render(U, n, IA), J.current = requestAnimationFrame(R);
5831
5888
  };
5832
5889
  return J.current = requestAnimationFrame(R), () => {
5833
5890
  J.current && cancelAnimationFrame(J.current);
5834
5891
  };
5835
5892
  }, [C]);
5836
- const y = (F, M) => {
5837
- const U = F.currentTarget.getBoundingClientRect(), R = F.clientX - U.left, n = F.clientY - U.top, e = U.width, l = U.height;
5838
- S.current.handlePointerInput(M, R, n, e, l);
5893
+ const y = (k, M) => {
5894
+ const U = k.currentTarget.getBoundingClientRect(), R = k.clientX - U.left, Y = k.clientY - U.top, L = U.width, l = U.height;
5895
+ K.current.handlePointerInput(M, R, Y, L, l);
5839
5896
  };
5840
5897
  return /* @__PURE__ */ kC(
5841
5898
  "canvas",
5842
5899
  {
5843
- ref: K,
5900
+ ref: S,
5844
5901
  style: { width: "100%", height: "100%", outline: "none", ...g },
5845
5902
  className: I,
5846
5903
  tabIndex: 0,
5847
- onPointerDown: (F) => {
5904
+ onPointerDown: (k) => {
5848
5905
  var M;
5849
- y(F, "down"), (M = K.current) == null || M.focus();
5906
+ y(k, "down"), (M = S.current) == null || M.focus();
5850
5907
  },
5851
- onPointerUp: (F) => y(F, "up"),
5852
- onPointerMove: (F) => y(F, "move"),
5853
- onPointerLeave: (F) => y(F, "blur"),
5854
- onClick: (F) => y(F, "click"),
5855
- onKeyDown: (F) => {
5856
- F.key === "Backspace" || F.key === "Enter" || F.key, S.current.handleKeyDown(F.nativeEvent);
5908
+ onPointerUp: (k) => y(k, "up"),
5909
+ onPointerMove: (k) => y(k, "move"),
5910
+ onPointerLeave: (k) => y(k, "blur"),
5911
+ onClick: (k) => y(k, "click"),
5912
+ onKeyDown: (k) => {
5913
+ k.key === "Backspace" || k.key === "Enter" || k.key, K.current.handleKeyDown(k.nativeEvent);
5857
5914
  }
5858
5915
  }
5859
5916
  );