@caperjs/core 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/build/index.mjs +1 -1
  2. package/build/internal/buildFlags.mjs +63 -18
  3. package/build/internal/schema.mjs +53 -0
  4. package/build/plugins/pwa.mjs +13 -7
  5. package/cli/doctor.mjs +53 -2
  6. package/cli/doctor.test.mjs +80 -1
  7. package/cli/native.mjs +126 -15
  8. package/cli/native.test.mjs +219 -3
  9. package/extras/llms.txt +35 -3
  10. package/lib/{CaptionsPlugin-COrofpHN.js → CaptionsPlugin-CAgQBcA1.js} +7 -7
  11. package/lib/{CaptionsPlugin-COrofpHN.js.map → CaptionsPlugin-CAgQBcA1.js.map} +1 -1
  12. package/lib/{DataAdapter-T-22-_D1.js → DataAdapter-CbyqWMo-.js} +5 -5
  13. package/lib/{DataAdapter-T-22-_D1.js.map → DataAdapter-CbyqWMo-.js.map} +1 -1
  14. package/lib/{DebugRenderer-ZN692Pbg.js → DebugRenderer-Bdkpyyt6.js} +2 -2
  15. package/lib/{DebugRenderer-ZN692Pbg.js.map → DebugRenderer-Bdkpyyt6.js.map} +1 -1
  16. package/lib/{DevToolsPlugin-CQXFoj1T.js → DevToolsPlugin-Cq5HHN9K.js} +2 -2
  17. package/lib/{DevToolsPlugin-CQXFoj1T.js.map → DevToolsPlugin-Cq5HHN9K.js.map} +1 -1
  18. package/lib/{GSAPPlugin-CNkncyXS.js → GSAPPlugin-D-ujhVYo.js} +2 -2
  19. package/lib/{GSAPPlugin-CNkncyXS.js.map → GSAPPlugin-D-ujhVYo.js.map} +1 -1
  20. package/lib/{LayoutPlugin-BuJgr9bd.js → LayoutPlugin-DqbwBm-X.js} +4 -4
  21. package/lib/{LayoutPlugin-BuJgr9bd.js.map → LayoutPlugin-DqbwBm-X.js.map} +1 -1
  22. package/lib/{ScreenDebugPlugin-kz9Mr6j1.js → ScreenDebugPlugin-CyT8UxEa.js} +3 -3
  23. package/lib/{ScreenDebugPlugin-kz9Mr6j1.js.map → ScreenDebugPlugin-CyT8UxEa.js.map} +1 -1
  24. package/lib/{SpinePlugin-DDzD-Qxd.js → SpinePlugin-DyXJyA3x.js} +2 -2
  25. package/lib/{SpinePlugin-DDzD-Qxd.js.map → SpinePlugin-DyXJyA3x.js.map} +1 -1
  26. package/lib/{StatsPlugin-tyFGzVjy.js → StatsPlugin-CEhgzWby.js} +4 -4
  27. package/lib/{StatsPlugin-tyFGzVjy.js.map → StatsPlugin-CEhgzWby.js.map} +1 -1
  28. package/lib/{VoiceOverPlugin-rTNz_9eb.js → VoiceOverPlugin-CSpNZjpJ.js} +2 -2
  29. package/lib/{VoiceOverPlugin-rTNz_9eb.js.map → VoiceOverPlugin-CSpNZjpJ.js.map} +1 -1
  30. package/lib/caper.mjs +126 -129
  31. package/lib/caper.mjs.map +1 -1
  32. package/lib/{const-Cj14a5U2.js → const-Bca54QyV.js} +235 -227
  33. package/lib/{const-Cj14a5U2.js.map → const-Bca54QyV.js.map} +1 -1
  34. package/lib/core/Application.d.ts +4 -0
  35. package/lib/core/Application.d.ts.map +1 -1
  36. package/lib/core/interfaces/IApplicationOptions.d.ts +21 -0
  37. package/lib/core/interfaces/IApplicationOptions.d.ts.map +1 -1
  38. package/lib/plugins/OrientationPlugin.d.ts +57 -0
  39. package/lib/plugins/OrientationPlugin.d.ts.map +1 -0
  40. package/lib/plugins/OrientationPlugin.test.d.ts +2 -0
  41. package/lib/plugins/OrientationPlugin.test.d.ts.map +1 -0
  42. package/lib/plugins/defaults.d.ts.map +1 -1
  43. package/lib/plugins/index.d.ts +1 -0
  44. package/lib/plugins/index.d.ts.map +1 -1
  45. package/lib/{registries-DmNGVLAi.js → registries-C1nPl8B3.js} +593 -502
  46. package/lib/registries-C1nPl8B3.js.map +1 -0
  47. package/lib/ui/UICanvas.d.ts +10 -2
  48. package/lib/ui/UICanvas.d.ts.map +1 -1
  49. package/lib/utils/index.d.ts +1 -0
  50. package/lib/utils/index.d.ts.map +1 -1
  51. package/lib/utils/orientation.d.ts +44 -0
  52. package/lib/utils/orientation.test.d.ts +2 -0
  53. package/lib/utils/orientation.test.d.ts.map +1 -0
  54. package/package.json +1 -1
  55. package/src/core/Application.ts +10 -0
  56. package/src/core/interfaces/IApplicationOptions.ts +21 -0
  57. package/src/plugins/OrientationPlugin.test.ts +252 -0
  58. package/src/plugins/OrientationPlugin.ts +178 -0
  59. package/src/plugins/defaults.ts +6 -0
  60. package/src/plugins/index.ts +1 -0
  61. package/src/ui/UICanvas.test.ts +23 -1
  62. package/src/ui/UICanvas.ts +22 -3
  63. package/src/utils/index.ts +1 -0
  64. package/src/utils/orientation.d.ts +44 -0
  65. package/src/utils/orientation.js +37 -0
  66. package/src/utils/orientation.test.ts +30 -0
  67. package/src/version.ts +1 -1
  68. package/lib/registries-DmNGVLAi.js.map +0 -1
package/lib/caper.mjs CHANGED
@@ -1,21 +1,21 @@
1
- import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, D as s, Dt as c, E as l, Et as u, F as d, Ft as f, G as ee, H as te, Ht as ne, I as re, It as ie, J as p, K as ae, L as oe, Lt as se, M as ce, Mt as le, N as ue, Nt as de, O as fe, Ot as pe, P as me, Pt as he, Q as ge, R as m, Rt as _e, S as h, St as ve, T as ye, Tt as be, U as xe, Ut as Se, V as Ce, Vt as g, W as we, X as Te, Y as Ee, Z as De, _ as Oe, _t as ke, a as Ae, at as je, b as _, bt as Me, c as Ne, ct as v, d as y, dt as b, et as Pe, f as Fe, ft as Ie, g as Le, gt as Re, h as ze, ht as Be, i as Ve, it as He, j as Ue, jt as We, k as Ge, kt as x, l as Ke, lt as qe, m as Je, mt as Ye, n as Xe, nt as Ze, o as Qe, ot as $e, p as S, pt as et, q as C, r as w, rt as tt, s as nt, st as rt, t as it, tt as at, u as ot, ut as st, v as ct, vt as lt, w as ut, wt as dt, x as ft, xt as pt, y as mt, yt as ht, z as gt, zt as _t } from "./registries-DmNGVLAi.js";
2
- import { A as vt, C as yt, D as bt, E as xt, F as St, I as Ct, L as wt, M as Tt, N as Et, O as Dt, P as Ot, S as kt, T as At, _ as T, a as jt, b as Mt, c as Nt, d as Pt, f as Ft, g as E, h as It, i as Lt, j as Rt, k as zt, l as Bt, m as Vt, n as Ht, o as Ut, p as Wt, r as Gt, s as Kt, u as qt, v as Jt, w as Yt, x as Xt, y as Zt } from "./const-Cj14a5U2.js";
3
- import { n as Qt, t as D } from "./padding-1kHDpGlQ.js";
4
- import { r as $t, t as en } from "./DataAdapter-T-22-_D1.js";
5
- import { t as tn } from "./ScreenDebugPlugin-kz9Mr6j1.js";
6
- import { CanvasTextMetrics as O, Container as nn, Graphics as k, Point as A, Polygon as rn, Rectangle as an, Sprite as on, Texture as j, isMobile as M } from "pixi.js";
7
- import { gsap as N } from "gsap";
1
+ import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, D as s, Dt as c, E as l, Et as u, F as d, Ft as f, G as ee, Gt as te, H as ne, Ht as re, I as ie, It as ae, J as oe, Jt as se, K as ce, Kt as le, L as p, Lt as ue, M as de, Mt as fe, N as pe, Nt as me, O as he, Ot as ge, P as _e, Pt as ve, Q as ye, Qt as be, R as xe, Rt as m, S as h, St as Se, T as Ce, Tt as we, U as Te, Ut as Ee, V as De, Vt as Oe, W as ke, Wt as g, X as _, Xt as v, Y as y, Yt as Ae, Z as je, Zt as Me, _ as b, _t as x, a as Ne, at as S, b as Pe, bt as Fe, c as Ie, ct as C, d as Le, dt as Re, et as ze, f as Be, ft as Ve, g as He, gt as w, h as Ue, ht as We, i as Ge, it as Ke, j as qe, jt as Je, k as Ye, kt as Xe, l as Ze, lt as Qe, m as $e, mt as et, n as tt, nt, o as rt, ot as it, p as T, pt as at, q as ot, qt as st, r as E, rt as D, s as ct, st as lt, t as ut, tt as dt, u as ft, ut as pt, v as mt, vt as ht, w as O, wt as gt, x as _t, xt as vt, y as yt, yt as bt, z as xt, zt as St } from "./registries-C1nPl8B3.js";
2
+ import { A as Ct, C as wt, D as Tt, E as Et, F as Dt, I as Ot, L as kt, M as At, N as jt, O as Mt, P as Nt, R as Pt, S as Ft, T as It, _ as k, a as Lt, b as Rt, c as zt, d as Bt, f as Vt, g as Ht, h as Ut, i as Wt, j as Gt, k as Kt, l as qt, m as Jt, n as Yt, o as Xt, p as Zt, r as Qt, s as $t, u as en, v as A, w as tn, x as nn, y as rn } from "./const-Bca54QyV.js";
3
+ import { n as an, t as j } from "./padding-1kHDpGlQ.js";
4
+ import { r as on, t as sn } from "./DataAdapter-CbyqWMo-.js";
5
+ import { t as cn } from "./ScreenDebugPlugin-CyT8UxEa.js";
6
+ import { CanvasTextMetrics as M, Container as ln, Graphics as N, Point as P, Polygon as un, Rectangle as dn, Sprite as fn, Texture as F } from "pixi.js";
7
+ import { gsap as I } from "gsap";
8
8
  //#region src/utils/array.ts
9
- function sn(e) {
9
+ function pn(e) {
10
10
  let t, n;
11
- for (let r = 0; r < e.length; ++r) n = g(0, e.length), t = e[r], e[r] = e[n], e[n] = t;
11
+ for (let r = 0; r < e.length; ++r) n = v(0, e.length), t = e[r], e[r] = e[n], e[n] = t;
12
12
  }
13
- function cn(e) {
14
- return e[g(0, e.length)];
13
+ function mn(e) {
14
+ return e[v(0, e.length)];
15
15
  }
16
16
  //#endregion
17
17
  //#region src/utils/canvas.ts
18
- function ln(e) {
18
+ function hn(e) {
19
19
  let t = e.getContext("webgl");
20
20
  if (t) {
21
21
  let e = t.getExtension("WEBGL_lose_context");
@@ -26,13 +26,13 @@ function ln(e) {
26
26
  }
27
27
  //#endregion
28
28
  //#region src/utils/color.ts
29
- function un(e) {
29
+ function gn(e) {
30
30
  return `#${e.toString(16)}`;
31
31
  }
32
- function dn(e) {
32
+ function _n(e) {
33
33
  return parseInt(e.replace(/^#/, ""), 16);
34
34
  }
35
- var fn = class e {
35
+ var vn = class e {
36
36
  static {
37
37
  this.WHITE = new e(255, 255, 255);
38
38
  }
@@ -100,91 +100,88 @@ var fn = class e {
100
100
  };
101
101
  //#endregion
102
102
  //#region src/utils/define.ts
103
- function pn(e) {
103
+ function yn(e) {
104
104
  return e;
105
105
  }
106
- function mn(e) {
106
+ function bn(e) {
107
107
  return e;
108
108
  }
109
- function hn(e) {
109
+ function xn(e) {
110
110
  return e;
111
111
  }
112
- function gn(e) {
112
+ function Sn(e) {
113
113
  return e;
114
114
  }
115
- function _n(e) {
115
+ function Cn(e) {
116
116
  return e;
117
117
  }
118
118
  //#endregion
119
119
  //#region src/utils/pixi.ts
120
- function vn(e, t) {
120
+ function wn(e, t) {
121
121
  e.parent && e.parent.worldTransform.apply(e.position, e.position), t.worldTransform.applyInverse(e.position, e.position), e.parent?.removeChild(e), t.addChild(e);
122
122
  }
123
- function yn(e) {
123
+ function Tn(e) {
124
124
  return Math.sqrt(e.width * e.width + e.height * e.height);
125
125
  }
126
- function bn(e) {
126
+ function En(e) {
127
127
  let t = e.parent;
128
128
  t && (t.removeChild(e), t.addChild(e));
129
129
  }
130
- function xn(e) {
130
+ function Dn(e) {
131
131
  let t = e.parent;
132
132
  t && (t.removeChild(e), t.addChildAt(e, 0));
133
133
  }
134
- function Sn(e, t) {
135
- if (e instanceof rn) {
134
+ function On(e, t) {
135
+ if (e instanceof un) {
136
136
  for (let n = 0; n < e.points.length; n += 2) e.points[n] += t.x, e.points[n + 1] += t.y;
137
137
  return e;
138
138
  } else return e.x += t.x, e.y += t.y, e;
139
139
  }
140
- function Cn(e, t) {
140
+ function kn(e, t) {
141
141
  return e.x += t.x, e.y += t.y, e;
142
142
  }
143
- function P(e, t, n = "width") {
143
+ function L(e, t, n = "width") {
144
144
  let r = n === "width" ? "y" : "x", i = n === "width" ? "x" : "y";
145
145
  e[n] = t, e.scale[r] = e.scale[i];
146
146
  }
147
- function F(e, t) {
148
- P(e, t, "width");
147
+ function R(e, t) {
148
+ L(e, t, "width");
149
149
  }
150
- function I(e, t) {
151
- P(e, t, "height");
150
+ function z(e, t) {
151
+ L(e, t, "height");
152
152
  }
153
- function wn(e, t, n = "width") {
153
+ function An(e, t, n = "width") {
154
154
  let r;
155
155
  r = t?.width && t?.height ? {
156
156
  x: t.width,
157
157
  y: t.height
158
- } : v(t), n === "width" ? (F(e, r.x), e.height < r.y && I(e, r.y)) : (I(e, r.y), e.width < r.x && F(e, r.x));
158
+ } : w(t), n === "width" ? (R(e, r.x), e.height < r.y && z(e, r.y)) : (z(e, r.y), e.width < r.x && R(e, r.x));
159
159
  }
160
160
  //#endregion
161
- //#region src/utils/platform.ts
162
- var Tn = typeof window < "u" ? window.devicePixelRatio > 1 || window.matchMedia && window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches : !1, L = typeof window < "u" ? "ontouchstart" in window || navigator.maxTouchPoints > 0 : !1, En = typeof window < "u" ? "__TAURI_INTERNALS__" in window : !1, R = M.any, z = M.android.device, Dn = M.apple.device;
163
- //#endregion
164
161
  //#region src/utils/rect.ts
165
- function On(e, t) {
162
+ function jn(e, t) {
166
163
  return e.x += t.x, e.y += t.y, e;
167
164
  }
168
- function kn(e, t) {
169
- return t === void 0 && (t = new A()), t.set(e.x + e.width * .5, e.y + e.height * .5), t;
165
+ function Mn(e, t) {
166
+ return t === void 0 && (t = new P()), t.set(e.x + e.width * .5, e.y + e.height * .5), t;
170
167
  }
171
- function An(e, t) {
168
+ function Nn(e, t) {
172
169
  return e.x *= t, e.y *= t, e.width *= t, e.height *= t, e;
173
170
  }
174
- function jn(e, t) {
175
- return t === void 0 && (t = new A()), t.set(e.width, e.height), t;
171
+ function Pn(e, t) {
172
+ return t === void 0 && (t = new P()), t.set(e.width, e.height), t;
176
173
  }
177
174
  //#endregion
178
175
  //#region src/utils/set.ts
179
- function Mn(e, t) {
176
+ function Fn(e, t) {
180
177
  let n = /* @__PURE__ */ new Set();
181
178
  for (let r of e) t(r) && n.add(r);
182
179
  return n;
183
180
  }
184
- function Nn(e) {
181
+ function In(e) {
185
182
  return e?.values().next().value;
186
183
  }
187
- function Pn(e) {
184
+ function Ln(e) {
188
185
  let t;
189
186
  for (let n of e) t = n;
190
187
  return t;
@@ -192,11 +189,11 @@ function Pn(e) {
192
189
  //#endregion
193
190
  //#region src/utils/text.ts
194
191
  function B(e, t) {
195
- let n = O.measureText(e.text, e.style), r = n.lines, i = n.lineHeight, a = e.toLocal(new A(t.pageX, t.pageY)), o = 0, s = Infinity, c = 0;
192
+ let n = M.measureText(e.text, e.style), r = n.lines, i = n.lineHeight, a = e.toLocal(new P(t.pageX, t.pageY)), o = 0, s = Infinity, c = 0;
196
193
  for (let t = 0; t < r.length; t++) {
197
194
  let n = r[t];
198
195
  for (let r = 0; r <= n.length; r++) {
199
- let l = n.substring(0, r), u = O.measureText(l, e.style).width, d = t * i, f = Math.hypot(u - a.x, d - a.y);
196
+ let l = n.substring(0, r), u = M.measureText(l, e.style).width, d = t * i, f = Math.hypot(u - a.x, d - a.y);
200
197
  f < s && (s = f, o = c + r);
201
198
  }
202
199
  c += n.length;
@@ -205,35 +202,35 @@ function B(e, t) {
205
202
  }
206
203
  //#endregion
207
204
  //#region src/version.ts
208
- var V = "0.7.2", H = "8.22.0", Fn = " ........ ..... ............ ............. ........... \n ............. ....... ................ ............. .............. \n .............. ......... ............... ............. .............. \n ..... ........... .............. ............ .............. \n ..... ...... ...... .............. ............. ............. \n .............. ...... ..... ............ ............. ..... ...... \n ................... ..... ..... ............. ..... ....... \n ................ .......... ............. ..... ..... ";
205
+ var V = "0.7.4", H = "8.22.0", Rn = " ........ ..... ............ ............. ........... \n ............. ....... ................ ............. .............. \n .............. ......... ............... ............. .............. \n ..... ........... .............. ............ .............. \n ..... ...... ...... .............. ............. ............. \n .............. ...... ..... ............ ............. ..... ...... \n ................... ..... ..... ............. ..... ....... \n ................ .......... ............. ..... ..... ";
209
206
  function U() {
210
- let e = `\n${Fn}\n\n v${V} | %cPixi.js v${H} %c| %chttps://github.com/anthonysapp/caper\n\n`;
207
+ let e = `\n${Rn}\n\n v${V} | %cPixi.js v${H} %c| %chttps://github.com/anthonysapp/caper\n\n`;
211
208
  console.log(e, "color: #E91E63; font-weight: 600;", "color: inherit;", "color: #00BCD4; text-decoration: underline;");
212
209
  }
213
210
  //#endregion
214
211
  //#region src/webgl-check.ts
215
- function In() {
212
+ function zn() {
216
213
  if (typeof document > "u") return;
217
214
  let e = document.createElement("canvas");
218
215
  e.getContext("webgl") || e.getContext("experimental-webgl") || console.error("Your browser does not support WebGL.");
219
216
  }
220
217
  //#endregion
221
218
  //#region src/plugins/actions/methods.ts
222
- function Ln(e) {
223
- return e ?? d;
219
+ function Bn(e) {
220
+ return e ?? p;
224
221
  }
225
- function Rn(e, t, n = !0) {
222
+ function Vn(e, t, n = !0) {
226
223
  return n && (t = {
227
- ...m,
224
+ ...r,
228
225
  ...t
229
226
  }), t;
230
227
  }
231
- function zn(e) {
228
+ function Hn(e) {
232
229
  return e || [];
233
230
  }
234
231
  //#endregion
235
232
  //#region src/plugins/breakpoints/methods.ts
236
- function Bn(e) {
233
+ function Un(e) {
237
234
  return {
238
235
  tiers: e.tiers,
239
236
  modes: e.modes ?? {}
@@ -243,7 +240,7 @@ function Bn(e) {
243
240
  //#region src/plugins/input/touch/constants.ts
244
241
  var W = /* @__PURE__ */ function(e) {
245
242
  return e.None = "none", e.Left = "left", e.Top = "top", e.Bottom = "bottom", e.Right = "right", e.TopLeft = "top_left", e.TopRight = "top_right", e.BottomLeft = "bottom_left", e.BottomRight = "bottom_right", e;
246
- }({}), Vn = [
243
+ }({}), Wn = [
247
244
  W.None,
248
245
  W.Left,
249
246
  W.Top,
@@ -256,20 +253,20 @@ var W = /* @__PURE__ */ function(e) {
256
253
  ];
257
254
  //#endregion
258
255
  //#region src/plugins/input/methods.ts
259
- function Hn(e, t, n) {
256
+ function Gn(e, t, n) {
260
257
  return n || [];
261
258
  }
262
259
  //#endregion
263
260
  //#region src/core/globals.ts
264
- var G = 200, Un = "CaperApplication";
265
- function Wn() {
261
+ var G = 200, Kn = "CaperApplication";
262
+ function qn() {
266
263
  try {
267
264
  return globalThis.Caper?.__dev === !0;
268
265
  } catch {
269
266
  return !1;
270
267
  }
271
268
  }
272
- function Gn() {
269
+ function Jn() {
273
270
  try {
274
271
  return !1;
275
272
  } catch {
@@ -299,13 +296,13 @@ function q() {
299
296
  return a.promise;
300
297
  }), t;
301
298
  }
302
- function Kn() {
299
+ function Yn() {
303
300
  q();
304
301
  }
305
302
  function J(e) {
306
- return e.config?.id || Un;
303
+ return e.config?.id || Kn;
307
304
  }
308
- function qn(e) {
305
+ function Xn(e) {
309
306
  let t = J(e), n = [], r, i = [], a = (e) => {
310
307
  n.push(e), n.length > G && n.splice(0, n.length - G);
311
308
  }, o = () => r ? r() : void 0, s = (e) => {
@@ -379,8 +376,8 @@ function qn(e) {
379
376
  }
380
377
  function Y(e) {
381
378
  let t = q(), n = J(e);
382
- if (t.apps.set(n, e), t.app = e, Wn() || e.config?.automation === !0 || Gn()) {
383
- let r = qn(e);
379
+ if (t.apps.set(n, e), t.app = e, qn() || e.config?.automation === !0 || Jn()) {
380
+ let r = Xn(e);
384
381
  t.automation[n] = r, e.automation = r;
385
382
  }
386
383
  }
@@ -394,21 +391,21 @@ function X(e) {
394
391
  }
395
392
  //#endregion
396
393
  //#region src/core/create.ts
397
- var Jn = "caper-game-container";
394
+ var Zn = "caper-game-container";
398
395
  function Z(e) {
399
396
  let t = document.createElement("div");
400
397
  return t.setAttribute("id", e), document.body.appendChild(t), t;
401
398
  }
402
- async function Q() {
399
+ async function Qn() {
403
400
  return new Promise((e) => {
404
401
  document.readyState === "complete" || document.readyState === "interactive" ? e(!0) : document.addEventListener("DOMContentLoaded", () => {
405
402
  e(!0);
406
403
  });
407
404
  });
408
405
  }
409
- async function Yn(e = { id: "CaperApplication" }, t = Jn, n = !0) {
410
- let { defaultFactoryMethods: r } = await import("./const-Cj14a5U2.js").then((e) => e.t);
411
- Te(r), await Q(), In(), n && U();
406
+ async function $n(e = { id: "CaperApplication" }, t = Zn, n = !0) {
407
+ let { defaultFactoryMethods: r } = await import("./const-Bca54QyV.js").then((e) => e.t);
408
+ ye(r), await Qn(), zn(), n && U();
412
409
  let i = null;
413
410
  if (typeof t == "string" ? (i = document.getElementById(t), i ||= Z(t)) : t instanceof HTMLElement ? i = t : t === window && (i = document.body), !i) throw Error("You passed in a DOM Element, but none was found. If you instead pass in a string, a container will be created for you, using the string for its id.");
414
411
  e.resizeToContainer && (e.resizeTo = i), e.useLayout && (e.layout = {
@@ -417,7 +414,7 @@ async function Yn(e = { id: "CaperApplication" }, t = Jn, n = !0) {
417
414
  debugModificationCount: 0,
418
415
  throttle: 100
419
416
  }), e.container = i;
420
- let a = new (e.application || w)();
417
+ let a = new (e.application || E)();
421
418
  return await a.initialize(e, i), e.useLayout && (a.stage.layout = {
422
419
  position: "absolute",
423
420
  width: "100%",
@@ -426,11 +423,11 @@ async function Yn(e = { id: "CaperApplication" }, t = Jn, n = !0) {
426
423
  }
427
424
  //#endregion
428
425
  //#region src/display/Entity.ts
429
- var Xn = class extends S {
426
+ var er = class extends T {
430
427
  constructor(e) {
431
428
  super(), this.props = e ?? {};
432
429
  }
433
- }, Zn = class extends S {
430
+ }, tr = class extends T {
434
431
  get animationContext() {
435
432
  return this._animationContext ?? `__scene_${this.id}`;
436
433
  }
@@ -465,7 +462,7 @@ var Xn = class extends S {
465
462
  }
466
463
  onPause(e) {}
467
464
  onResume(e) {}
468
- }, Qn = class extends S {
465
+ }, nr = class extends T {
469
466
  get active() {
470
467
  return this._active;
471
468
  }
@@ -506,9 +503,9 @@ var Xn = class extends S {
506
503
  _update(e) {
507
504
  this.active && this.initialized && this.update(e);
508
505
  }
509
- }, $n = class extends nn {
506
+ }, rr = class extends ln {
510
507
  constructor(e) {
511
- return super({ isRenderGroup: !0 }), this.config = e, this.onZoom = new C(), this.onZoomComplete = new C(), this.minX = 0, this.minY = 0, this._zooming = !1, this._zoomLerp = .1, this._targetPivot = new A(0, 0), this._targetScale = new A(1, 1), this._lerp = 0, this._target = null, this._followOffset = new A(0, 0), f(this), e && (this.container = e.container, this.addChild(this.container), e.minX && (this.minX = e.minX), e.maxX && (this.maxX = e.maxX), e.minY && (this.minY = e.minY), this.viewportWidth = e.viewportWidth ?? this.app.size.width, this.viewportHeight = e.viewportHeight ?? this.app.size.height, this.worldWidth = e.worldWidth ?? this.viewportWidth, this.worldHeight = e.worldHeight ?? this.viewportHeight, this.maxX = e.maxX ?? this.worldWidth - this.viewportWidth, this.maxY = e.maxY ?? this.worldHeight - this.viewportHeight), this._targetPivot.set(this.viewportWidth * .5, this.viewportHeight * .5), e.target && (this.target = e.target), this._lerp = 1, this.update(), e.lerp && (this.lerp = e.lerp), this;
508
+ return super({ isRenderGroup: !0 }), this.config = e, this.onZoom = new y(), this.onZoomComplete = new y(), this.minX = 0, this.minY = 0, this._zooming = !1, this._zoomLerp = .1, this._targetPivot = new P(0, 0), this._targetScale = new P(1, 1), this._lerp = 0, this._target = null, this._followOffset = new P(0, 0), g(this), e && (this.container = e.container, this.addChild(this.container), e.minX && (this.minX = e.minX), e.maxX && (this.maxX = e.maxX), e.minY && (this.minY = e.minY), this.viewportWidth = e.viewportWidth ?? this.app.size.width, this.viewportHeight = e.viewportHeight ?? this.app.size.height, this.worldWidth = e.worldWidth ?? this.viewportWidth, this.worldHeight = e.worldHeight ?? this.viewportHeight, this.maxX = e.maxX ?? this.worldWidth - this.viewportWidth, this.maxY = e.maxY ?? this.worldHeight - this.viewportHeight), this._targetPivot.set(this.viewportWidth * .5, this.viewportHeight * .5), e.target && (this.target = e.target), this._lerp = 1, this.update(), e.lerp && (this.lerp = e.lerp), this;
512
509
  }
513
510
  get zooming() {
514
511
  return this._zooming;
@@ -539,10 +536,10 @@ var Xn = class extends S {
539
536
  return this._followOffset;
540
537
  }
541
538
  set followOffset(e) {
542
- this._followOffset = v(e, !0);
539
+ this._followOffset = w(e, !0);
543
540
  }
544
541
  get app() {
545
- return w.getInstance();
542
+ return E.getInstance();
546
543
  }
547
544
  follow(e, t) {
548
545
  t ||= {
@@ -579,12 +576,12 @@ var Xn = class extends S {
579
576
  } else this.pivot.set(this._targetPivot.x, this._targetPivot.y);
580
577
  this.position.set(this.viewportWidth / 2, this.viewportHeight / 2);
581
578
  }
582
- }, er = class {
579
+ }, ir = class {
583
580
  constructor(e, t) {
584
- this.camera = e, this.interactiveArea = t, this.dragging = !1, this.previousPointerPosition = null, f(this), this.camera = e, this.interactiveArea = t, this.app.keyboard.onKeyDown().connect(this.handleKeyDown), this.interactiveArea.on("pointerdown", this.onPointerDown.bind(this)), this.interactiveArea.on("pointermove", this.onPointerMove.bind(this)), this.app.stage.on("pointerup", this.onPointerUp.bind(this)), this.app.stage.on("pointerupoutside", this.onPointerUp.bind(this)), this.interactiveArea.on("touchstart", this.onPointerDown.bind(this)), this.interactiveArea.on("touchmove", this.onPointerMove.bind(this)), this.interactiveArea.on("touchend", this.onPointerUp.bind(this));
581
+ this.camera = e, this.interactiveArea = t, this.dragging = !1, this.previousPointerPosition = null, g(this), this.camera = e, this.interactiveArea = t, this.app.keyboard.onKeyDown().connect(this.handleKeyDown), this.interactiveArea.on("pointerdown", this.onPointerDown.bind(this)), this.interactiveArea.on("pointermove", this.onPointerMove.bind(this)), this.app.stage.on("pointerup", this.onPointerUp.bind(this)), this.app.stage.on("pointerupoutside", this.onPointerUp.bind(this)), this.interactiveArea.on("touchstart", this.onPointerDown.bind(this)), this.interactiveArea.on("touchmove", this.onPointerMove.bind(this)), this.interactiveArea.on("touchend", this.onPointerUp.bind(this));
585
582
  }
586
583
  get app() {
587
- return w.getInstance();
584
+ return E.getInstance();
588
585
  }
589
586
  destroy() {
590
587
  this.interactiveArea.removeAllListeners(), this.app.stage.off("pointerup", this.onPointerUp.bind(this)), this.app.stage.off("pointerupoutside", this.onPointerUp.bind(this));
@@ -624,15 +621,15 @@ var Xn = class extends S {
624
621
  this.dragging = !1, this.previousPointerPosition = null;
625
622
  }
626
623
  getEventPosition(e) {
627
- return e instanceof TouchEvent ? new A(e.touches[0].clientX, e.touches[0].clientY) : new A(e.clientX, e.clientY);
624
+ return e instanceof TouchEvent ? new P(e.touches[0].clientX, e.touches[0].clientY) : new P(e.clientX, e.clientY);
628
625
  }
629
- }, tr = [
626
+ }, ar = [
630
627
  "text",
631
628
  "anchor",
632
629
  "roundPixels",
633
630
  "style",
634
631
  "pivot"
635
- ], $ = {
632
+ ], Q = {
636
633
  value: "",
637
634
  type: "text",
638
635
  fixed: !0,
@@ -671,32 +668,32 @@ var Xn = class extends S {
671
668
  scale: 1,
672
669
  marginTop: 60
673
670
  }
674
- }, nr = [
671
+ }, or = [
675
672
  "text",
676
673
  "password",
677
674
  "number",
678
675
  "email",
679
676
  "tel",
680
677
  "url"
681
- ], rr = class e extends T(E(h(S))) {
678
+ ], sr = class e extends A(k(O(T))) {
682
679
  constructor(e, t = !1, n = null) {
683
680
  if (super({
684
681
  autoUpdate: !0,
685
682
  autoResize: !t
686
- }), this.isClone = t, this.clone = n, this.onEnter = new C(), this.onChange = new C(), this.onError = new C(), this._lastWidth = 0, this._lastHeight = 0, this._placeholderPositioned = !1, this._placeholderAnimating = !1, this._caretPosition = -1, this._value = "", this.options = {
687
- ...$,
683
+ }), this.isClone = t, this.clone = n, this.onEnter = new y(), this.onChange = new y(), this.onError = new y(), this._lastWidth = 0, this._lastHeight = 0, this._placeholderPositioned = !1, this._placeholderAnimating = !1, this._caretPosition = -1, this._value = "", this.options = {
684
+ ...Q,
688
685
  ...e,
689
686
  style: {
690
- ...$.style,
687
+ ...Q.style,
691
688
  ...e?.style ?? {}
692
689
  },
693
- padding: D(e.padding ?? $.padding),
690
+ padding: j(e.padding ?? Q.padding),
694
691
  bg: {
695
- ...$.bg,
692
+ ...Q.bg,
696
693
  ...e.bg ?? {}
697
694
  },
698
695
  focusOverlay: {
699
- ...$.focusOverlay,
696
+ ...Q.focusOverlay,
700
697
  ...e.focusOverlay ?? {}
701
698
  }
702
699
  }, this.options.layout && typeof this.options.layout == "object" ? this.layout = { ...this.options.layout } : this.layout = { transformOrigin: "top left" }, this.options.placeholder || (this.options.placeholder = { color: Number(this.options.style?.fill) }), this._inner = this.add.container({ layout: {
@@ -723,7 +720,7 @@ var Xn = class extends S {
723
720
  width: "100%",
724
721
  height: "100%"
725
722
  }
726
- }), this._placeholderContainer.eventMode = "none", this.addSelection(), this.addCaret(), this.addInput(), this.addPlaceholder(), this.placeholder.text = this.options.placeholder.text || `Enter ${this.options.type}`, this.input.eventMode = this.placeholder.eventMode = "none", L && this.addSignalConnection(this.onInteraction("pointertap").connect(this.handleClick, -1)), this.addSignalConnection(this.onInteraction("click").connect(this.handleClick, -1)), this.options.fixed) {
723
+ }), this._placeholderContainer.eventMode = "none", this.addSelection(), this.addCaret(), this.addInput(), this.addPlaceholder(), this.placeholder.text = this.options.placeholder.text || `Enter ${this.options.type}`, this.input.eventMode = this.placeholder.eventMode = "none", C && this.addSignalConnection(this.onInteraction("pointertap").connect(this.handleClick, -1)), this.addSignalConnection(this.onInteraction("click").connect(this.handleClick, -1)), this.options.fixed) {
727
724
  let e = this.isClone ? this.clone?.options?.focusOverlay?.scale ?? 1 : 1;
728
725
  this._mask = this._inner.add.graphics().rect(0, 0, this.bg.width * e - this.options.padding.left - this.options.padding.right, this.bg.height * e - this.options.padding.top - this.options.padding.bottom).fill({ color: 0 }), this._inputContainer.mask = this._mask;
729
726
  }
@@ -825,7 +822,7 @@ var Xn = class extends S {
825
822
  if (this.placeholder.visible = !0, !this.isClone && this._placeholderPositioned && !this._placeholderAnimating) {
826
823
  this._placeholderAnimating = !0;
827
824
  let e = this.input.x, t = this.input.y;
828
- this.options.placeholder.animationOnType ? this.addAnimation([N.to(this.placeholder, {
825
+ this.options.placeholder.animationOnType ? this.addAnimation([I.to(this.placeholder, {
829
826
  x: e,
830
827
  y: t,
831
828
  tint: 16777215,
@@ -836,7 +833,7 @@ var Xn = class extends S {
836
833
  onComplete: () => {
837
834
  this._placeholderPositioned = !1, this._placeholderAnimating = !1;
838
835
  }
839
- }), N.to(this.placeholder.scale, {
836
+ }), I.to(this.placeholder.scale, {
840
837
  x: 1,
841
838
  y: 1,
842
839
  duration: this.options.placeholder.animationOnType.duration || .4,
@@ -857,11 +854,11 @@ var Xn = class extends S {
857
854
  break;
858
855
  }
859
856
  if (this.options.placeholder.offsetOnType) {
860
- let n = v(this.options.placeholder.offsetOnType);
857
+ let n = w(this.options.placeholder.offsetOnType);
861
858
  e += n.x, t += n.y;
862
859
  }
863
860
  if (this.options.placeholder.animationOnType) {
864
- if (this.addAnimation(N.to(this.placeholder, {
861
+ if (this.addAnimation(I.to(this.placeholder, {
865
862
  x: e,
866
863
  y: t,
867
864
  duration: this.options.placeholder.animationOnType.duration || .4,
@@ -870,8 +867,8 @@ var Xn = class extends S {
870
867
  alpha: this.options.placeholder.animationOnType.alpha ?? this.options.placeholder.alpha ?? 1,
871
868
  overwrite: !0
872
869
  })), this.options.placeholder.scaleOnType) {
873
- let e = v(this.options.placeholder.scaleOnType);
874
- this.addAnimation(N.to(this.placeholder.scale, {
870
+ let e = w(this.options.placeholder.scaleOnType);
871
+ this.addAnimation(I.to(this.placeholder.scale, {
875
872
  x: e.x,
876
873
  y: e.y,
877
874
  duration: this.options.placeholder.animationOnType.duration || .4,
@@ -917,7 +914,7 @@ var Xn = class extends S {
917
914
  }
918
915
  addCaret() {
919
916
  this.caret = this._inputContainer.add.sprite({
920
- asset: j.WHITE,
917
+ asset: F.WHITE,
921
918
  width: 3,
922
919
  height: 10,
923
920
  tint: this.options.caret.color ?? 0,
@@ -958,9 +955,9 @@ var Xn = class extends S {
958
955
  this.domElement = this.clone.domElement, this._addDomElementListeners();
959
956
  return;
960
957
  }
961
- clearTimeout(this._focusTimer), clearTimeout(this._pointerDownTimer), this.domElement = document.createElement("input"), this.domElement.type = "text", this.options.type && nr.includes(this.options.type) && (this.domElement.type = this.options.type), this.options.pattern && (this.domElement.pattern = this.options.pattern), this.options.regex && (this._regex = this.options.regex);
958
+ clearTimeout(this._focusTimer), clearTimeout(this._pointerDownTimer), this.domElement = document.createElement("input"), this.domElement.type = "text", this.options.type && or.includes(this.options.type) && (this.domElement.type = this.options.type), this.options.pattern && (this.domElement.pattern = this.options.pattern), this.options.regex && (this._regex = this.options.regex);
962
959
  let t = this.getGlobalPosition(), n = this.getBounds();
963
- n.x = t.x, n.y = t.y, n.width = this.width - this.options.padding.left, this.domElement.style.position = "fixed", this.domElement.style.border = "none", this.domElement.style.outline = "none", this.domElement.style.left = z ? "0" : `${n.left}px`, this.domElement.style.top = z ? "0" : `${n.top}px`, this.domElement.style.width = `${n.width}px`, this.domElement.style.height = `${n.height}px`, this.domElement.style.padding = "0", this.options.debug ? this.domElement.style.opacity = "0.8" : this.domElement.style.opacity = "0.0000001", this.app.canvas.parentElement?.appendChild(this.domElement), this.domElement.value = this.value, this.domElement.setAttribute("placeholder", this.options?.placeholder?.text ?? ""), this.options?.maxLength && this.domElement.setAttribute("maxLength", this.options.maxLength.toString()), this._addDomElementListeners(), this._focusDomElement(e);
960
+ n.x = t.x, n.y = t.y, n.width = this.width - this.options.padding.left, this.domElement.style.position = "fixed", this.domElement.style.border = "none", this.domElement.style.outline = "none", this.domElement.style.left = D ? "0" : `${n.left}px`, this.domElement.style.top = D ? "0" : `${n.top}px`, this.domElement.style.width = `${n.width}px`, this.domElement.style.height = `${n.height}px`, this.domElement.style.padding = "0", this.options.debug ? this.domElement.style.opacity = "0.8" : this.domElement.style.opacity = "0.0000001", this.app.canvas.parentElement?.appendChild(this.domElement), this.domElement.value = this.value, this.domElement.setAttribute("placeholder", this.options?.placeholder?.text ?? ""), this.options?.maxLength && this.domElement.setAttribute("maxLength", this.options.maxLength.toString()), this._addDomElementListeners(), this._focusDomElement(e);
964
961
  }
965
962
  destroyDomElement() {
966
963
  this.isClone || (this.domElement &&= (this._removeDomElementListeners(), this.domElement.remove(), this.domElement.parentNode && this.domElement.parentNode.removeChild(this.domElement), null));
@@ -972,7 +969,7 @@ var Xn = class extends S {
972
969
  this.cursorAnimation?.kill(), this.caret.visible = !1;
973
970
  }
974
971
  blinkCaret() {
975
- this.cursorAnimation && this.cursorAnimation.kill(), this.cursorAnimation = N.fromTo(this.caret, { alpha: 0 }, {
972
+ this.cursorAnimation && this.cursorAnimation.kill(), this.cursorAnimation = I.fromTo(this.caret, { alpha: 0 }, {
976
973
  duration: .5,
977
974
  alpha: 1,
978
975
  yoyo: !0,
@@ -1005,15 +1002,15 @@ var Xn = class extends S {
1005
1002
  let n = Array.isArray(this.options.focusOverlay.activeFilter), r = !1;
1006
1003
  if (n) {
1007
1004
  let e = this.options.focusOverlay.activeFilter;
1008
- (R && e.includes("mobile") || L && e.includes("touch") || !R && !L && e.includes("desktop")) && (r = !0);
1005
+ (S && e.includes("mobile") || C && e.includes("touch") || !S && !C && e.includes("desktop")) && (r = !0);
1009
1006
  } else r = typeof this.options.focusOverlay.activeFilter == "function" ? this.options.focusOverlay.activeFilter() : t;
1010
1007
  if (r) {
1011
1008
  let t = structuredClone(this.options), n = this.options.focusOverlay?.scale || 1;
1012
1009
  t.focusOverlay = { activeFilter: !1 };
1013
- let r = Number(t.style?.fontSize || $.style?.fontSize || 20) * n;
1010
+ let r = Number(t.style?.fontSize || Q.style?.fontSize || 20) * n;
1014
1011
  if (t.style ||= {}, t.style.fontSize = r, t.padding && (t.padding.left *= n, t.padding.top *= n, t.padding.right *= n, t.padding.bottom *= n), t.bg?.radius && (t.bg.radius *= n), t.bg?.stroke?.width && (t.bg.stroke.width *= n), t.minWidth && (t.minWidth *= n, t.minWidth > this.app.size.width && (t.minWidth = this.app.size.width - (t.bg?.stroke?.width ? t.bg.stroke.width * 2 + 20 : 20))), this.options.focusOverlay?.backing?.active) {
1015
1012
  let e = this.make.sprite({
1016
- asset: j.WHITE,
1013
+ asset: F.WHITE,
1017
1014
  tint: this.options.focusOverlay.backing.options?.color ?? 0,
1018
1015
  alpha: this.options.focusOverlay.backing.options?.alpha ?? .8,
1019
1016
  width: this.app.size.width,
@@ -1028,12 +1025,12 @@ var Xn = class extends S {
1028
1025
  }
1029
1026
  }
1030
1027
  _showCloneOverlay() {
1031
- this.cloneOverlay.pivot.y = -20, this.addAnimation(N.to(this.cloneOverlay, {
1028
+ this.cloneOverlay.pivot.y = -20, this.addAnimation(I.to(this.cloneOverlay, {
1032
1029
  duration: .5,
1033
1030
  alpha: .8,
1034
1031
  ease: "sine.out",
1035
1032
  delay: .1
1036
- })), this.addAnimation(N.to(this.cloneOverlay.pivot, {
1033
+ })), this.addAnimation(I.to(this.cloneOverlay.pivot, {
1037
1034
  duration: .5,
1038
1035
  y: 0,
1039
1036
  ease: "sine.out",
@@ -1066,15 +1063,15 @@ var Xn = class extends S {
1066
1063
  }
1067
1064
  _updateCaretAndSelection() {
1068
1065
  if (!this.domElement) {
1069
- x.warn(this.label, "No dom element");
1066
+ m.warn(this.label, "No dom element");
1070
1067
  return;
1071
1068
  }
1072
1069
  let e = this.domElement.selectionStart || 0, t = this.domElement.selectionEnd || -1, n = this.domElement.selectionDirection, r = "", i = this.options.type === "password" ? this.input.text : this._value;
1073
- if (t === void 0) r = i.substring(0, e), this._caretPosition = O.measureText(r, this.input.style).width, this._selectionRect = null;
1070
+ if (t === void 0) r = i.substring(0, e), this._caretPosition = M.measureText(r, this.input.style).width, this._selectionRect = null;
1074
1071
  else {
1075
1072
  r = i.substring(e > t ? t : e, e > t ? e : t);
1076
- let a = i.substring(0, e > t ? t : e), o = O.measureText(a, this.input.style), s = O.measureText(r, this.input.style);
1077
- this._selectionRect = new an(o.width, 0, s.width, this.input.height), this._caretPosition = n === "backward" ? this._selectionRect.left : this._selectionRect.left + this._selectionRect.width;
1073
+ let a = i.substring(0, e > t ? t : e), o = M.measureText(a, this.input.style), s = M.measureText(r, this.input.style);
1074
+ this._selectionRect = new dn(o.width, 0, s.width, this.input.height), this._caretPosition = n === "backward" ? this._selectionRect.left : this._selectionRect.left + this._selectionRect.width;
1078
1075
  }
1079
1076
  }
1080
1077
  _handleDomElementChange(e) {
@@ -1093,17 +1090,17 @@ var Xn = class extends S {
1093
1090
  let e = this._inputContainer.getBounds();
1094
1091
  return e.width = this._lastWidth, e.height = this._lastHeight, e;
1095
1092
  }
1096
- }, ir = class extends S {
1093
+ }, cr = class extends T {
1097
1094
  constructor(e) {
1098
- if (super(), this.onChange = new C(), this.onStart = new C(), this.onEnd = new C(), this.onDestroy = new C(), this.outerRadius = 0, this.innerRadius = 0, this.innerAlphaStandby = .5, this.dragging = !1, this.pointData = new A(), this.direction = W.None, this.settings = Object.assign({
1095
+ if (super(), this.onChange = new y(), this.onStart = new y(), this.onEnd = new y(), this.onDestroy = new y(), this.outerRadius = 0, this.innerRadius = 0, this.innerAlphaStandby = .5, this.dragging = !1, this.pointData = new P(), this.direction = W.None, this.settings = Object.assign({
1099
1096
  outerScale: 1,
1100
1097
  innerScale: 1
1101
1098
  }, e), !this.settings.outer) {
1102
- let e = new k();
1099
+ let e = new N();
1103
1100
  e.circle(0, 0, 60).fill({ color: 0 }), e.alpha = .5, this.settings.outer = e;
1104
1101
  }
1105
1102
  if (!this.settings.inner) {
1106
- let e = new k();
1103
+ let e = new N();
1107
1104
  e.circle(0, 0, 35).fill({ color: 0 }), e.alpha = this.innerAlphaStandby, this.settings.inner = e;
1108
1105
  }
1109
1106
  this.threshold = this.settings.threshold ?? .01, this.initialize();
@@ -1113,7 +1110,7 @@ var Xn = class extends S {
1113
1110
  }
1114
1111
  handleDragMove(e) {
1115
1112
  if (!this.dragging || e.pointerId !== this._pointerId) return;
1116
- let t = this.toLocal(e.global), n = t.x - this.startPosition.x, r = t.y - this.startPosition.y, i = new A(0, 0), a = 0, o = W.None;
1113
+ let t = this.toLocal(e.global), n = t.x - this.startPosition.x, r = t.y - this.startPosition.y, i = new P(0, 0), a = 0, o = W.None;
1117
1114
  if (n == 0 && r == 0) {
1118
1115
  this.direction = o;
1119
1116
  return;
@@ -1163,22 +1160,22 @@ var Xn = class extends S {
1163
1160
  let t = Math.atan2(e.y, e.x);
1164
1161
  return t >= -Math.PI / 8 && t < 0 || t >= 0 && t < Math.PI / 8 ? W.Right : t >= Math.PI / 8 && t < 3 * Math.PI / 8 ? W.BottomRight : t >= 3 * Math.PI / 8 && t < 5 * Math.PI / 8 ? W.Bottom : t >= 5 * Math.PI / 8 && t < 7 * Math.PI / 8 ? W.BottomLeft : t >= 7 * Math.PI / 8 && t < Math.PI || t >= -Math.PI && t < -7 * Math.PI / 8 ? W.Left : t >= -7 * Math.PI / 8 && t < -5 * Math.PI / 8 ? W.TopLeft : t >= -5 * Math.PI / 8 && t < -3 * Math.PI / 8 ? W.Top : W.TopRight;
1165
1162
  }
1166
- }, ar = {
1163
+ }, lr = {
1167
1164
  color: 0,
1168
1165
  alpha: .75
1169
- }, or = {
1166
+ }, $ = {
1170
1167
  backing: !0,
1171
1168
  closeOnEscape: !0,
1172
1169
  closeOnPointerDownOutside: !0,
1173
1170
  actionContext: "popup"
1174
- }, sr = class e extends S {
1171
+ }, ur = class e extends T {
1175
1172
  get actionContext() {
1176
1173
  return this.config.actionContext;
1177
1174
  }
1178
1175
  constructor(e, t = {}) {
1179
1176
  super(), this.id = e, this.isShowing = !1, this._storedActionContext = void 0, this.config = Object.assign({
1180
1177
  id: e,
1181
- ...or
1178
+ ...$
1182
1179
  }, t), this._initialize();
1183
1180
  }
1184
1181
  get data() {
@@ -1187,7 +1184,7 @@ var Xn = class extends S {
1187
1184
  static makeBacking(e, t) {
1188
1185
  let n = {};
1189
1186
  typeof e == "object" && (n = e);
1190
- let r = Object.assign({ ...ar }, n), i = new on(j.WHITE);
1187
+ let r = Object.assign({ ...lr }, n), i = new fn(F.WHITE);
1191
1188
  return i.anchor.set(.5), i.alpha = r.alpha, i.tint = r.color, i.width = t.width, i.height = t.height, i;
1192
1189
  }
1193
1190
  initialize() {}
@@ -1221,15 +1218,15 @@ var Xn = class extends S {
1221
1218
  this.app.focus.addFocusLayer(this.id, !1), this.config.backing && (this.backing = this.add.existing(e.makeBacking(this.config.backing, this.app.size)), this.backing.eventMode = "static", this.config.closeOnPointerDownOutside && (this.backing.once("click", this.close), this.backing.once("tap", this.close))), this.view = this.add.container(), this.view.eventMode = "static";
1222
1219
  }
1223
1220
  setActionContext() {
1224
- this.actionContext && (this.app.actionContext = this.actionContext, x.log("Popup", "Setting action context", this.app.actionContext));
1221
+ this.actionContext && (this.app.actionContext = this.actionContext, m.log("Popup", "Setting action context", this.app.actionContext));
1225
1222
  }
1226
1223
  storeActionContext() {
1227
- this._storedActionContext = this.app.actionContext, x.log("Popup", "Storing action context", this._storedActionContext);
1224
+ this._storedActionContext = this.app.actionContext, m.log("Popup", "Storing action context", this._storedActionContext);
1228
1225
  }
1229
1226
  restoreActionContext() {
1230
- this._storedActionContext && (x.log("Popup", "Restoring action context", this._storedActionContext), this.app.actionContext = this._storedActionContext), this._storedActionContext = void 0;
1227
+ this._storedActionContext && (m.log("Popup", "Restoring action context", this._storedActionContext), this.app.actionContext = this._storedActionContext), this._storedActionContext = void 0;
1231
1228
  }
1232
- }, cr = p.Collector, lr = p.CollectorArray, ur = p.CollectorLast, dr = p.CollectorUntil0, fr = p.CollectorWhile0, pr = p.SignalConnections;
1233
- export { gt as ActionsPlugin, Oe as Animated, Zt as AnimatedSprite, w as Application, xe as AssetsPlugin, Ue as AudioChannel, t as AudioInstance, Ge as AudioManagerPlugin, ce as BreakpointPlugin, Vt as Button, It as ButtonConfigKeys, $n as Camera, er as CameraController, pe as CaperEvent, cr as Collector, lr as CollectorArray, ur as CollectorLast, dr as CollectorUntil0, fr as CollectorWhile0, fn as Color, S as Container, Je as ContainerConfigKeys, mt as Controls, en as DataAdapter, Rt as DebugAlpha, Tt as DebugColors, me as DefaultActionContexts, d as DefaultActionContextsArray, re as DefaultActions, oe as DefaultButtonIds, Xn as Entity, Le as Factory, Pt as FlexContainer, Ft as FlexContainerConfigKeys, s as FocusManagerPlugin, fe as FocusOutliner, T as Focusable, te as FullScreenPlugin, ye as GesturePlugin, rr as Input, a as InputControllerTypes, ct as InputPlugin, E as Interactive, Vn as JOYSTICK_DIRECTIONS, ir as Joystick, W as JoystickDirection, ft as KeyboardControls, r as KeyboardPlugin, x as Logger, Ve as LookupPlugin, Dt as ParticleContainer, zt as ParticleContainerConfigKeys, we as Plugin, sr as Popup, Fe as PopupManagerPlugin, o as Queue, y as ResizerPlugin, Zn as Scene, Ke as SceneManagerPlugin, Qn as SceneTransition, tn as ScreenDebugPlugin, C as Signal, pr as SignalConnections, Jt as SpineAnimation, ae as Store, bt as Svg, tr as TextPropsKeys, Qe as Timer, nt as TimerPlugin, Bt as Toast, Nt as Toaster, _ as TouchControls, _ as VirtualControls, jt as UICanvas, Ut as UICanvasConfigKeys, Ae as WebEventsPlugin, ze as WithLifecycle, h as WithSignals, at as add, Ze as addToPoint, f as bindAllMethods, ie as bindMethods, _e as bool, n as capitalize, We as capitalizeWords, kn as center, se as checkAndInvokeMethod, Re as clamp, Kt as computeEffectivePadding, it as coreFunctionRegistry, Xe as coreSignalRegistry, Yn as create, Z as createContainer, Et as createDebugGraphics, Ot as createDebugLabel, ee as createFactoryMethods, dt as createQueue, Ye as debounce, b as deepMerge, m as defaultActionsList, ue as defaultBreakpoints, Ht as defaultFactoryMethods, l as defaultGestureOptions, qt as defaultToastConfig, Rn as defineActions, Bn as defineBreakpoints, zn as defineButtons, De as defineConfig, Ln as defineContexts, Hn as defineControls, $t as defineData, gn as defineEntity, mn as definePlugin, hn as definePopup, pn as defineScene, _n as defineUI, be as delay, ln as destroyCanvas, tt as distance, He as distanceSq, D as ensurePadding, le as env, Mn as filterSet, Nn as firstFromSet, _t as floatBetween, i as floatBetweenPoint, Ne as formatTime, ge as generatePluginList, St as getDebugRegistry, ve as getDynamicModuleFromImportListItem, Mt as getErrorTexture, lt as getFirstMapEntry, ht as getLastMapEntry, B as getNearestCharacterIndex, Me as getNextMapEntry, Pe as getOrientation, pt as getPreviousMapEntry, cn as getRandomElement, Lt as getRegisteredEntityIds, Gt as getRegisteredUIIds, vt as getZeroPaddedNumber, ut as i18nPlugin, Kn as installCaperGlobal, g as intBetween, ne as intBetweenPoint, z as isAndroid, de as isDev, Dn as isIos, R as isMobile, he as isProduction, u as isPromise, Tn as isRetina, Ee as isStorageCapable, En as isTauri, Wt as isText, L as isTouch, Pn as lastFromSet, ke as lerp, je as lerpPoint, $e as magnitude, rt as multiply, Ce as normalizeKey, yn as objectDiagonal, On as offset, Sn as offsetShape, Cn as offsetSimpleShape, Ie as omitKeys, H as pixiVersion, et as pluck, Se as randomUUID, vn as reParent, Y as registerCaperApp, Ct as registerDebug, Xt as resolveAnchor, Qt as resolvePadding, kt as resolvePivot, v as resolvePointLike, yt as resolvePosition, Yt as resolveScale, Be as resolveSizeLike, At as resolveTexture, xt as resolveUnknownKeys, U as sayHello, An as scale, I as scaleToHeight, wn as scaleToSize, F as scaleToWidth, P as scaleUniform, xn as sendToBack, bn as sendToFront, ot as shouldEnableScreenDebug, sn as shuffle, X as signalCaperReady, jn as size, e as sortPluginsByRequires, qe as subtract, st as subtractFromPoint, un as toHex, dn as toRgb, wt as unregisterDebug, V as version, c as wait };
1229
+ }, dr = _.Collector, fr = _.CollectorArray, pr = _.CollectorLast, mr = _.CollectorUntil0, hr = _.CollectorWhile0, gr = _.SignalConnections;
1230
+ export { De as ActionsPlugin, b as Animated, Rt as AnimatedSprite, E as Application, ee as AssetsPlugin, pe as AudioChannel, de as AudioInstance, qe as AudioManagerPlugin, _e as BreakpointPlugin, Ut as Button, Ht as ButtonConfigKeys, rr as Camera, ir as CameraController, ue as CaperEvent, dr as Collector, fr as CollectorArray, pr as CollectorLast, mr as CollectorUntil0, hr as CollectorWhile0, vn as Color, T as Container, $e as ContainerConfigKeys, _t as Controls, sn as DataAdapter, At as DebugAlpha, jt as DebugColors, ie as DefaultActionContexts, p as DefaultActionContextsArray, xe as DefaultActions, xt as DefaultButtonIds, er as Entity, He as Factory, Vt as FlexContainer, Zt as FlexContainerConfigKeys, Ye as FocusManagerPlugin, t as FocusOutliner, A as Focusable, ke as FullScreenPlugin, s as GesturePlugin, sr as Input, Ce as InputControllerTypes, Pe as InputPlugin, k as Interactive, Wn as JOYSTICK_DIRECTIONS, cr as Joystick, W as JoystickDirection, a as KeyboardControls, ne as KeyboardPlugin, m as Logger, Ge as LookupPlugin, mt as ORIENTATION_OVERLAY_TEXT, yt as OrientationPlugin, Kt as ParticleContainer, Ct as ParticleContainerConfigKeys, ce as Plugin, ur as Popup, Be as PopupManagerPlugin, fe as Queue, Le as ResizerPlugin, tr as Scene, Ze as SceneManagerPlugin, nr as SceneTransition, cn as ScreenDebugPlugin, y as Signal, gr as SignalConnections, rn as SpineAnimation, oe as Store, Mt as Svg, ar as TextPropsKeys, rt as Timer, ct as TimerPlugin, en as Toast, qt as Toaster, h as TouchControls, h as VirtualControls, Lt as UICanvas, Xt as UICanvasConfigKeys, Ne as WebEventsPlugin, Ue as WithLifecycle, O as WithSignals, Qe as add, pt as addToPoint, g as bindAllMethods, te as bindMethods, st as bool, St as capitalize, i as capitalizeWords, Mn as center, le as checkAndInvokeMethod, we as clamp, $t as computeEffectivePadding, ut as coreFunctionRegistry, tt as coreSignalRegistry, $n as create, Z as createContainer, Nt as createDebugGraphics, Dt as createDebugLabel, ot as createFactoryMethods, me as createQueue, o as debounce, Fe as deepMerge, r as defaultActionsList, d as defaultBreakpoints, Yt as defaultFactoryMethods, he as defaultGestureOptions, Bt as defaultToastConfig, Vn as defineActions, Un as defineBreakpoints, Hn as defineButtons, e as defineConfig, Bn as defineContexts, Gn as defineControls, on as defineData, Sn as defineEntity, bn as definePlugin, xn as definePopup, yn as defineScene, Cn as defineUI, ve as delay, hn as destroyCanvas, Re as distance, Ve as distanceSq, j as ensurePadding, Oe as env, Fn as filterSet, In as firstFromSet, se as floatBetween, Ae as floatBetweenPoint, Ie as formatTime, ze as generatePluginList, Ot as getDebugRegistry, Je as getDynamicModuleFromImportListItem, nn as getErrorTexture, c as getFirstMapEntry, ge as getLastMapEntry, B as getNearestCharacterIndex, Xe as getNextMapEntry, nt as getOrientation, n as getPreviousMapEntry, mn as getRandomElement, Wt as getRegisteredEntityIds, Qt as getRegisteredUIIds, Gt as getZeroPaddedNumber, l as i18nPlugin, Yn as installCaperGlobal, v as intBetween, Me as intBetweenPoint, D as isAndroid, re as isDev, Ke as isIos, S as isMobile, Ee as isProduction, f as isPromise, it as isRetina, je as isStorageCapable, lt as isTauri, Jt as isText, C as isTouch, Ln as lastFromSet, u as lerp, at as lerpPoint, et as magnitude, We as multiply, Te as normalizeKey, Tn as objectDiagonal, jn as offset, On as offsetShape, kn as offsetSimpleShape, vt as omitKeys, H as pixiVersion, Se as pluck, be as randomUUID, wn as reParent, Y as registerCaperApp, kt as registerDebug, Ft as resolveAnchor, bt as resolveOrientation, an as resolvePadding, wt as resolvePivot, w as resolvePointLike, tn as resolvePosition, zt as resolveSafeArea, It as resolveScale, gt as resolveSizeLike, Et as resolveTexture, Tt as resolveUnknownKeys, U as sayHello, Nn as scale, z as scaleToHeight, An as scaleToSize, R as scaleToWidth, L as scaleUniform, Dn as sendToBack, En as sendToFront, ft as shouldEnableScreenDebug, pn as shuffle, X as signalCaperReady, Pn as size, dt as sortPluginsByRequires, x as subtract, ht as subtractFromPoint, gn as toHex, _n as toRgb, Pt as unregisterDebug, V as version, ae as wait };
1234
1231
 
1235
1232
  //# sourceMappingURL=caper.mjs.map