modern-canvas 0.23.14 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { Observable as e, RawWeakMap as t, Reactivable as n, clearUndef as r, defineProperty as i, getDefaultLayoutStyle as a, getDefaultStyle as o, getDefaultTextStyle as s, idGenerator as c, isColorFillObject as l, isGradient as u, isNone as d, normalizeBackground as f, normalizeChart as p, normalizeConnection as m, normalizeFill as h, normalizeForeground as g, normalizeOutline as ee, normalizeShadow as te, normalizeShape as ne, normalizeTable as re, normalizeText as ie, normalizeTextContent as ae, parseColor as oe, property as _, stringifyFilter as se } from "modern-idoc";
2
- import { BoundingBox as ce, Path2D as le, Path2DSet as ue, PathMeasure as de, Transform2D as v, Vector2 as y, svgToDom as fe, svgToPath2DSet as pe } from "modern-path2d";
3
- import { extend as me } from "colord";
4
- import he from "colord/plugins/names";
5
- import { fonts as ge } from "modern-font";
6
- import { Character as _e, Text as ve } from "modern-text";
1
+ import { Observable as e, RawWeakMap as t, Reactivable as n, clearUndef as r, defineProperty as i, getDefaultLayoutStyle as a, getDefaultStyle as o, getDefaultTextStyle as s, idGenerator as c, isColorFillObject as l, isGradient as u, isNone as d, normalizeBackground as f, normalizeChart as p, normalizeComments as m, normalizeConnection as h, normalizeFill as g, normalizeForeground as ee, normalizeOutline as te, normalizeShadow as ne, normalizeShape as re, normalizeTable as ie, normalizeText as ae, normalizeTextContent as oe, parseColor as se, property as _, stringifyFilter as ce } from "modern-idoc";
2
+ import { BoundingBox as le, Path2D as v, Path2DSet as ue, PathMeasure as y, Transform2D as b, Vector2 as x, svgToDom as de, svgToPath2DSet as fe } from "modern-path2d";
3
+ import { extend as pe } from "colord";
4
+ import me from "colord/plugins/names";
5
+ import { fonts as he } from "modern-font";
6
+ import { Character as ge, Text as _e } from "modern-text";
7
7
  //#region src/core/decorators/customNode.ts
8
- var ye = /* @__PURE__ */ new Map();
9
- function b(e, t) {
8
+ var ve = /* @__PURE__ */ new Map();
9
+ function S(e, t) {
10
10
  return function(n) {
11
11
  Object.defineProperty(n.prototype, "is", {
12
12
  value: e,
@@ -14,19 +14,19 @@ function b(e, t) {
14
14
  configurable: !0
15
15
  }), t && Object.keys(t).forEach((e) => {
16
16
  i(n, e, { fallback: t[e] });
17
- }), ye.set(e, n);
17
+ }), ve.set(e, n);
18
18
  };
19
19
  }
20
20
  //#endregion
21
21
  //#region src/core/global/createNode.ts
22
- function be(e = "node", t = {}) {
23
- let n = ye.get(e);
22
+ function ye(e = "node", t = {}) {
23
+ let n = ve.get(e);
24
24
  if (!n) throw Error(`Failed to createNode, tag: ${e}`);
25
25
  return new n().setProperties(t);
26
26
  }
27
27
  //#endregion
28
28
  //#region src/core/global/Ticker.ts
29
- var x = class {
29
+ var C = class {
30
30
  static _queue = [];
31
31
  static _currentTime = 0;
32
32
  static _elapsed = 0;
@@ -83,12 +83,12 @@ var x = class {
83
83
  this._queue = t;
84
84
  }
85
85
  };
86
- x.start();
86
+ C.start();
87
87
  //#endregion
88
88
  //#region src/core/global/nextTick.ts
89
- async function xe(e) {
89
+ async function be(e) {
90
90
  return new Promise((t) => {
91
- x.on(() => {
91
+ C.on(() => {
92
92
  e?.(), t();
93
93
  }, {
94
94
  sort: 1,
@@ -98,14 +98,14 @@ async function xe(e) {
98
98
  }
99
99
  //#endregion
100
100
  //#region src/core/shared/utils.ts
101
- var Se = Math.PI, Ce = Se * 2;
102
- function we(e) {
101
+ var xe = Math.PI, Se = xe * 2;
102
+ function Ce(e) {
103
103
  return !(e & e - 1) && !!e;
104
104
  }
105
105
  //#endregion
106
106
  //#region src/core/shared/css.ts
107
- var Te = /([\w-]+)\((.+?)\)/g, Ee = /[^,]+/g, De = /([-e.\d]+)(.*)/;
108
- function Oe(e) {
107
+ var we = /([\w-]+)\((.+?)\)/g, Te = /[^,]+/g, Ee = /([-e.\d]+)(.*)/;
108
+ function De(e) {
109
109
  return Array.isArray(e) ? e.map((e) => ({
110
110
  name: e.name,
111
111
  args: e.args.map((e) => ({
@@ -117,31 +117,31 @@ function Oe(e) {
117
117
  normalizedIntValue: e.normalizedDefaultIntValue
118
118
  };
119
119
  }
120
- function ke(e, t, n = {}) {
121
- let r = Ae(t, n);
122
- return r.length ? r : Me(e, t, n);
120
+ function Oe(e, t, n = {}) {
121
+ let r = ke(t, n);
122
+ return r.length ? r : je(e, t, n);
123
123
  }
124
- function Ae(e, t = {}) {
124
+ function ke(e, t = {}) {
125
125
  let n = [], r;
126
- for (; (r = Te.exec(e)) !== null;) {
126
+ for (; (r = we.exec(e)) !== null;) {
127
127
  let [, e, i] = r;
128
128
  e && n.push({
129
129
  name: e,
130
- args: je(e, i, t)
130
+ args: Ae(e, i, t)
131
131
  });
132
132
  }
133
133
  return n;
134
134
  }
135
- function je(e, t, n = {}) {
135
+ function Ae(e, t, n = {}) {
136
136
  let r = [], i, a = 0;
137
- for (; (i = Ee.exec(t)) !== null;) r.push(Me(e, i[0], {
137
+ for (; (i = Te.exec(t)) !== null;) r.push(je(e, i[0], {
138
138
  ...n,
139
139
  index: a++
140
140
  }));
141
141
  return r;
142
142
  }
143
- function Me(e, t, n = {}) {
144
- let { width: r = 1, height: i = 1, index: a = 0 } = n, o = t.match(De), s = {
143
+ function je(e, t, n = {}) {
144
+ let { width: r = 1, height: i = 1, index: a = 0 } = n, o = t.match(Ee), s = {
145
145
  unit: o?.[2] ?? null,
146
146
  value: t,
147
147
  intValue: Number(o?.[1]),
@@ -161,7 +161,7 @@ function Me(e, t, n = {}) {
161
161
  s.normalizedIntValue = s.intValue / 100;
162
162
  break;
163
163
  case "rad":
164
- s.normalizedIntValue = s.intValue / Ce;
164
+ s.normalizedIntValue = s.intValue / Se;
165
165
  break;
166
166
  case "deg":
167
167
  s.normalizedIntValue = s.intValue / 360;
@@ -184,48 +184,48 @@ function Me(e, t, n = {}) {
184
184
  }
185
185
  //#endregion
186
186
  //#region src/core/shared/dom.ts
187
- var Ne = "WebGL2RenderingContext" in globalThis, Pe = "ImageBitmap" in globalThis, Fe = "ResizeObserver" in globalThis, Ie = "PointerEvent" in globalThis, Le = "WheelEvent" in globalThis, Re = "MouseEvent" in globalThis, ze = "ontouchstart" in globalThis, Be = "onclick" in globalThis, Ve = "createImageBitmap" in globalThis, He = "AudioContext" in globalThis, Ue = "webkitAudioContext" in globalThis, We = "OfflineAudioContext" in globalThis, Ge = "webkitOfflineAudioContext" in globalThis, Ke = He || Ue, qe = typeof window < "u", Je = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, Ye = globalThis.devicePixelRatio || 1, Xe = (e) => typeof e == "object" && !!e && e.nodeType === 1, Ze = (e) => Xe(e) && e.tagName === "VIDEO", Qe = (e) => Xe(e) && e.tagName === "IMG";
188
- function $e(e) {
187
+ var Me = "WebGL2RenderingContext" in globalThis, Ne = "ImageBitmap" in globalThis, Pe = "ResizeObserver" in globalThis, Fe = "PointerEvent" in globalThis, Ie = "WheelEvent" in globalThis, Le = "MouseEvent" in globalThis, Re = "ontouchstart" in globalThis, ze = "onclick" in globalThis, Be = "createImageBitmap" in globalThis, Ve = "AudioContext" in globalThis, He = "webkitAudioContext" in globalThis, Ue = "OfflineAudioContext" in globalThis, We = "webkitOfflineAudioContext" in globalThis, Ge = Ve || He, Ke = typeof window < "u", qe = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, Je = globalThis.devicePixelRatio || 1, Ye = (e) => typeof e == "object" && !!e && e.nodeType === 1, Xe = (e) => Ye(e) && e.tagName === "VIDEO", Ze = (e) => Ye(e) && e.tagName === "IMG";
188
+ function Qe(e) {
189
189
  return typeof e == "object" && !!e && e.nodeType === 1 && e.tagName === "CANVAS";
190
190
  }
191
- function et(e) {
192
- return Ne && e instanceof globalThis.WebGL2RenderingContext;
191
+ function $e(e) {
192
+ return Me && e instanceof globalThis.WebGL2RenderingContext;
193
193
  }
194
- var tt;
195
- function nt(e) {
196
- tt = e;
194
+ var et;
195
+ function tt(e) {
196
+ et = e;
197
197
  }
198
- function rt() {
199
- return tt;
198
+ function nt() {
199
+ return et;
200
200
  }
201
- var it;
202
- function at(e) {
203
- it = e;
201
+ var rt;
202
+ function it(e) {
203
+ rt = e;
204
204
  }
205
- function ot() {
206
- return it;
205
+ function at() {
206
+ return rt;
207
207
  }
208
- function S(e, t) {
208
+ function w(e, t) {
209
209
  let n;
210
- return tt ? n = tt(e, t) : qe && (n = globalThis.document.createElement("canvas")), n && (e !== void 0 && (n.width = e), t !== void 0 && (n.height = t)), n;
210
+ return et ? n = et(e, t) : Ke && (n = globalThis.document.createElement("canvas")), n && (e !== void 0 && (n.width = e), t !== void 0 && (n.height = t)), n;
211
211
  }
212
- function st(e, t = globalThis.location) {
212
+ function ot(e, t = globalThis.location) {
213
213
  if (e.startsWith("data:") || !t || typeof document > "u") return "";
214
214
  let n = new URL(e, document.baseURI);
215
215
  return n.hostname !== t.hostname || n.port !== t.port || n.protocol !== t.protocol ? "anonymous" : "";
216
216
  }
217
- function ct(e, t, n) {
218
- n === null && !t.startsWith("data:") ? e.crossOrigin = st(t) : n !== !1 && (e.crossOrigin = typeof n == "string" ? n : "anonymous");
217
+ function st(e, t, n) {
218
+ n === null && !t.startsWith("data:") ? e.crossOrigin = ot(t) : n !== !1 && (e.crossOrigin = typeof n == "string" ? n : "anonymous");
219
219
  }
220
220
  //#endregion
221
221
  //#region src/core/shared/id.ts
222
- var lt = 0;
223
- function ut() {
224
- return ++lt;
222
+ var ct = 0;
223
+ function lt() {
224
+ return ++ct;
225
225
  }
226
226
  //#endregion
227
227
  //#region src/core/input/InputEvent.ts
228
- var dt = class e {
228
+ var ut = class e {
229
229
  cursor;
230
230
  bubbles = !1;
231
231
  cancelBubble = !1;
@@ -260,14 +260,14 @@ var dt = class e {
260
260
  initUIEvent(...e) {
261
261
  throw Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
262
262
  }
263
- }, ft = class extends dt {
263
+ }, dt = class extends ut {
264
264
  getModifierState(...e) {
265
265
  throw Error("getModifierState() is a legacy DOM API. It is not implemented in the Federated Events API.");
266
266
  }
267
267
  initKeyboardEvent(...e) {
268
268
  throw Error("initKeyboardEvent() is a legacy DOM API. It is not implemented in the Federated Events API.");
269
269
  }
270
- }, pt = class extends dt {
270
+ }, ft = class extends ut {
271
271
  client = {
272
272
  x: 0,
273
273
  y: 0
@@ -350,7 +350,7 @@ var dt = class e {
350
350
  get globalY() {
351
351
  return this.global.y;
352
352
  }
353
- }, mt = class extends pt {
353
+ }, pt = class extends ft {
354
354
  width = 0;
355
355
  height = 0;
356
356
  isPrimary = !1;
@@ -360,20 +360,20 @@ var dt = class e {
360
360
  getPredictedEvents() {
361
361
  throw Error("getPredictedEvents is not supported!");
362
362
  }
363
- }, ht = class extends pt {
363
+ }, mt = class extends ft {
364
364
  static DOM_DELTA_PIXEL = 0;
365
365
  DOM_DELTA_PIXEL = 0;
366
366
  static DOM_DELTA_LINE = 1;
367
367
  DOM_DELTA_LINE = 1;
368
368
  static DOM_DELTA_PAGE = 2;
369
369
  DOM_DELTA_PAGE = 2;
370
- }, gt = {
370
+ }, ht = {
371
371
  touchstart: "pointerdown",
372
372
  touchend: "pointerup",
373
373
  touchendoutside: "pointerupoutside",
374
374
  touchmove: "pointermove",
375
375
  touchcancel: "pointercancel"
376
- }, _t = class extends e {
376
+ }, gt = class extends e {
377
377
  event;
378
378
  target;
379
379
  cursor = "default";
@@ -391,21 +391,21 @@ var dt = class e {
391
391
  removeEventListeners() {
392
392
  if (!this.setuped || !this.target) return;
393
393
  let e = this.target.style;
394
- globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "", e.msTouchAction = "") : Ie && (e.touchAction = ""), Ie ? (this.target.removeEventListener("pointerdown", this._onPointerDown), this.target.removeEventListener("pointerleave", this._onPointerOver), this.target.removeEventListener("pointerover", this._onPointerOver), this.target.removeEventListener("pointermove", this._onPointerMove), this.target.removeEventListener("pointerup", this._onPointerUp)) : (this.target.removeEventListener("mousedown", this._onPointerDown), this.target.removeEventListener("mouseout", this._onPointerOver), this.target.removeEventListener("mouseover", this._onPointerOver), this.target.removeEventListener("mousemove", this._onPointerMove), this.target.removeEventListener("mouseup", this._onPointerUp)), ze && (this.target.removeEventListener("touchstart", this._onPointerDown), this.target.removeEventListener("touchmove", this._onPointerMove), this.target.removeEventListener("touchend", this._onPointerUp)), this.target.removeEventListener("wheel", this._onWheel), typeof document < "u" && (document.removeEventListener("keydown", this._onKeyDown), document.removeEventListener("keypress", this._onKeyPress), document.removeEventListener("keyup", this._onKeyUp)), this.target = void 0, this.setuped = !1;
394
+ globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "", e.msTouchAction = "") : Fe && (e.touchAction = ""), Fe ? (this.target.removeEventListener("pointerdown", this._onPointerDown), this.target.removeEventListener("pointerleave", this._onPointerOver), this.target.removeEventListener("pointerover", this._onPointerOver), this.target.removeEventListener("pointermove", this._onPointerMove), this.target.removeEventListener("pointerup", this._onPointerUp)) : (this.target.removeEventListener("mousedown", this._onPointerDown), this.target.removeEventListener("mouseout", this._onPointerOver), this.target.removeEventListener("mouseover", this._onPointerOver), this.target.removeEventListener("mousemove", this._onPointerMove), this.target.removeEventListener("mouseup", this._onPointerUp)), Re && (this.target.removeEventListener("touchstart", this._onPointerDown), this.target.removeEventListener("touchmove", this._onPointerMove), this.target.removeEventListener("touchend", this._onPointerUp)), this.target.removeEventListener("wheel", this._onWheel), typeof document < "u" && (document.removeEventListener("keydown", this._onKeyDown), document.removeEventListener("keypress", this._onKeyPress), document.removeEventListener("keyup", this._onKeyUp)), this.target = void 0, this.setuped = !1;
395
395
  }
396
396
  addEventListeners() {
397
397
  if (this.setuped || !this.target) return;
398
398
  let e = this.target.style;
399
- e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none", e.msTouchAction = "none") : Ie && (e.touchAction = "none")), Ie ? (this.target.addEventListener("pointerdown", this._onPointerDown), this.target.addEventListener("pointerleave", this._onPointerOver), this.target.addEventListener("pointerover", this._onPointerOver), this.target.addEventListener("pointermove", this._onPointerMove), this.target.addEventListener("pointerup", this._onPointerUp)) : (this.target.addEventListener("mousedown", this._onPointerDown), this.target.addEventListener("mouseout", this._onPointerOver), this.target.addEventListener("mouseover", this._onPointerOver), this.target.addEventListener("mousemove", this._onPointerMove), this.target.addEventListener("mouseup", this._onPointerUp)), ze && (this.target.addEventListener("touchstart", this._onPointerDown), this.target.addEventListener("touchmove", this._onPointerMove), this.target.addEventListener("touchend", this._onPointerUp)), this.target.addEventListener("wheel", this._onWheel), typeof document < "u" && (document.addEventListener("keydown", this._onKeyDown), document.addEventListener("keypress", this._onKeyPress), document.addEventListener("keyup", this._onKeyUp)), this.setuped = !0;
399
+ e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none", e.msTouchAction = "none") : Fe && (e.touchAction = "none")), Fe ? (this.target.addEventListener("pointerdown", this._onPointerDown), this.target.addEventListener("pointerleave", this._onPointerOver), this.target.addEventListener("pointerover", this._onPointerOver), this.target.addEventListener("pointermove", this._onPointerMove), this.target.addEventListener("pointerup", this._onPointerUp)) : (this.target.addEventListener("mousedown", this._onPointerDown), this.target.addEventListener("mouseout", this._onPointerOver), this.target.addEventListener("mouseover", this._onPointerOver), this.target.addEventListener("mousemove", this._onPointerMove), this.target.addEventListener("mouseup", this._onPointerUp)), Re && (this.target.addEventListener("touchstart", this._onPointerDown), this.target.addEventListener("touchmove", this._onPointerMove), this.target.addEventListener("touchend", this._onPointerUp)), this.target.addEventListener("wheel", this._onWheel), typeof document < "u" && (document.addEventListener("keydown", this._onKeyDown), document.addEventListener("keypress", this._onKeyPress), document.addEventListener("keyup", this._onKeyUp)), this.setuped = !0;
400
400
  }
401
401
  normalize(e) {
402
402
  let t = [];
403
- if (ze && e instanceof globalThis.TouchEvent) for (let n = 0, r = e.changedTouches.length; n < r; n++) {
403
+ if (Re && e instanceof globalThis.TouchEvent) for (let n = 0, r = e.changedTouches.length; n < r; n++) {
404
404
  let r = e.changedTouches[n];
405
405
  r.button === void 0 && (r.button = 0), r.buttons === void 0 && (r.buttons = 1), r.isPrimary === void 0 && (r.isPrimary = e.touches.length === 1 && e.type === "touchstart"), r.width === void 0 && (r.width = r.radiusX || 1), r.height === void 0 && (r.height = r.radiusY || 1), r.tiltX === void 0 && (r.tiltX = 0), r.tiltY === void 0 && (r.tiltY = 0), r.pointerType === void 0 && (r.pointerType = "touch"), r.pointerId === void 0 && (r.pointerId = r.identifier || 0), r.pressure === void 0 && (r.pressure = r.force || .5), r.twist === void 0 && (r.twist = 0), r.tangentialPressure === void 0 && (r.tangentialPressure = 0), r.layerX === void 0 && (r.layerX = r.offsetX = r.clientX), r.layerY === void 0 && (r.layerY = r.offsetY = r.clientY), r.type = e.type, t.push(r);
406
406
  }
407
- else if (Le && e instanceof globalThis.WheelEvent) t.push(e);
408
- else if (Ie && e instanceof globalThis.PointerEvent) t.push(e);
407
+ else if (Ie && e instanceof globalThis.WheelEvent) t.push(e);
408
+ else if (Fe && e instanceof globalThis.PointerEvent) t.push(e);
409
409
  else {
410
410
  let n = e;
411
411
  n.isPrimary === void 0 && (n.isPrimary = !0), n.width === void 0 && (n.width = 1), n.height === void 0 && (n.height = 1), n.tiltX === void 0 && (n.tiltX = 0), n.tiltY === void 0 && (n.tiltY = 0), n.pointerType === void 0 && (n.pointerType = "mouse"), n.pointerId === void 0 && (n.pointerId = 1), n.pressure === void 0 && (n.pressure = .5), n.twist === void 0 && (n.twist = 0), n.tangentialPressure === void 0 && (n.tangentialPressure = 0), t.push(n);
@@ -413,8 +413,8 @@ var dt = class e {
413
413
  return t;
414
414
  }
415
415
  _clonePointerEvent(e) {
416
- let t = new mt();
417
- return t.nativeEvent = e, t.pointerId = e.pointerId, t.width = e.width, t.height = e.height, t.isPrimary = e.isPrimary, t.pointerType = e.pointerType, t.pressure = e.pressure, t.tangentialPressure = e.tangentialPressure, t.tiltX = e.tiltX, t.tiltY = e.tiltY, t.twist = e.twist, t.isTrusted = e.isTrusted, this._copyMouseEvent(t, e), this.mapPositionToPoint(t.screen, e.clientX, e.clientY), t.global.x = t.screen.x, t.global.y = t.screen.y, t.offset.x = t.screen.x, t.offset.y = t.screen.y, t.type === "pointerleave" ? t.type = "pointerout" : t.type.startsWith("mouse") ? t.type = t.type.replace("mouse", "pointer") : t.type.startsWith("touch") && (t.type = gt[t.type] || t.type), t;
416
+ let t = new pt();
417
+ return t.nativeEvent = e, t.pointerId = e.pointerId, t.width = e.width, t.height = e.height, t.isPrimary = e.isPrimary, t.pointerType = e.pointerType, t.pressure = e.pressure, t.tangentialPressure = e.tangentialPressure, t.tiltX = e.tiltX, t.tiltY = e.tiltY, t.twist = e.twist, t.isTrusted = e.isTrusted, this._copyMouseEvent(t, e), this.mapPositionToPoint(t.screen, e.clientX, e.clientY), t.global.x = t.screen.x, t.global.y = t.screen.y, t.offset.x = t.screen.x, t.offset.y = t.screen.y, t.type === "pointerleave" ? t.type = "pointerout" : t.type.startsWith("mouse") ? t.type = t.type.replace("mouse", "pointer") : t.type.startsWith("touch") && (t.type = ht[t.type] || t.type), t;
418
418
  }
419
419
  _copyInputEvent(e, t) {
420
420
  e.nativeEvent = t, e.bubbles = t.bubbles, e.cancelBubble = t.cancelBubble, e.cancelable = t.cancelable, e.composed = t.composed, e.currentTarget = t.currentTarget, e.defaultPrevented = t.defaultPrevented, e.eventPhase = t.eventPhase, e.isTrusted = t.isTrusted, e.returnValue = t.returnValue, e.srcElement = t.srcElement, e.timeStamp = t.timeStamp, e.type = t.type;
@@ -423,11 +423,11 @@ var dt = class e {
423
423
  this._copyInputEvent(e, t), e.altKey = t.altKey, e.button = t.button, e.buttons = t.buttons, e.client.x = t.clientX, e.client.y = t.clientY, e.ctrlKey = t.ctrlKey, e.metaKey = t.metaKey, e.movement.x = t.movementX, e.movement.y = t.movementY, e.page.x = t.pageX, e.page.y = t.pageY, e.relatedTarget = null, e.shiftKey = t.shiftKey;
424
424
  }
425
425
  _cloneWheelEvent(e) {
426
- let t = new ht();
426
+ let t = new mt();
427
427
  return this._copyMouseEvent(t, e), t.wheelDeltaY = e.wheelDeltaY, t.deltaX = e.deltaX, t.deltaY = e.deltaY, t.deltaZ = e.deltaZ, t.deltaMode = e.deltaMode, this.mapPositionToPoint(t.screen, e.clientX, e.clientY), t.global.x = t.screen.x, t.global.y = t.screen.y, t.offset.x = t.screen.x, t.offset.y = t.screen.y, t;
428
428
  }
429
429
  _cloneKeyboardEvent(e) {
430
- let t = new ft();
430
+ let t = new dt();
431
431
  return this._copyInputEvent(t, e), t.altKey = e.altKey, t.charCode = e.charCode, t.code = e.code, t.ctrlKey = e.ctrlKey, t.isComposing = e.isComposing, t.key = e.key, t.keyCode = e.keyCode, t.location = e.location, t.metaKey = e.metaKey, t.repeat = e.repeat, t.shiftKey = e.shiftKey, t;
432
432
  }
433
433
  setCursor(e = "default") {
@@ -475,25 +475,25 @@ var dt = class e {
475
475
  this.event?.cursor && this.setCursor(this.event.cursor);
476
476
  };
477
477
  _onPointerDown = (e) => {
478
- if (ze && e.pointerType === "touch") return;
478
+ if (Re && e.pointerType === "touch") return;
479
479
  let t = this.normalize(e);
480
480
  for (let e = 0, n = t.length; e < n; e++) this.emit("pointerdown", this.event = this._clonePointerEvent(t[e]));
481
481
  this.event?.cursor && this.setCursor(this.event.cursor);
482
482
  };
483
483
  _onPointerOver = (e) => {
484
- if (!this.enableClickEvent || ze && e.pointerType === "touch") return;
484
+ if (!this.enableClickEvent || Re && e.pointerType === "touch") return;
485
485
  let t = this.normalize(e);
486
486
  for (let e = 0, n = t.length; e < n; e++) this.emit("pointerover", this.event = this._clonePointerEvent(t[e]));
487
487
  this.event?.cursor && this.setCursor(this.event.cursor);
488
488
  };
489
489
  _onPointerMove = (e) => {
490
- if (!this.enableMoveEvent || ze && e.pointerType === "touch") return;
490
+ if (!this.enableMoveEvent || Re && e.pointerType === "touch") return;
491
491
  let t = this.normalize(e);
492
492
  for (let e = 0, n = t.length; e < n; e++) this.emit("pointermove", this.event = this._clonePointerEvent(t[e]));
493
493
  this.event?.cursor && this.setCursor(this.event.cursor);
494
494
  };
495
495
  _onPointerUp = (e) => {
496
- if (!this.enableClickEvent || ze && e.pointerType === "touch") return;
496
+ if (!this.enableClickEvent || Re && e.pointerType === "touch") return;
497
497
  let t = e.target;
498
498
  e.composedPath && e.composedPath().length > 0 && (t = e.composedPath()[0]);
499
499
  let n = t === this.target ? "" : "outside", r = this.normalize(e);
@@ -512,8 +512,8 @@ var dt = class e {
512
512
  destroy() {
513
513
  this.removeEventListeners(), super.destroy();
514
514
  }
515
- }, C = class extends n {
516
- instanceId = ut();
515
+ }, T = class extends n {
516
+ instanceId = lt();
517
517
  destroyed = !1;
518
518
  get json() {
519
519
  return this.toJSON();
@@ -522,7 +522,7 @@ var dt = class e {
522
522
  this.setProperties(e);
523
523
  }
524
524
  _nextTick() {
525
- return xe();
525
+ return be();
526
526
  }
527
527
  equal(e) {
528
528
  return !!(e && this.instanceId === e.instanceId);
@@ -531,7 +531,7 @@ var dt = class e {
531
531
  destroy() {
532
532
  this.destroyed || (this.destroyed = !0, this._destroy(), this.emit("destroy"), this.removeAllListeners());
533
533
  }
534
- }, vt = class extends C {}, w = class extends vt {}, yt = class e {
534
+ }, _t = class extends T {}, E = class extends _t {}, vt = class e {
535
535
  get x() {
536
536
  return this.min.x;
537
537
  }
@@ -584,7 +584,7 @@ var dt = class e {
584
584
  size;
585
585
  max;
586
586
  constructor(...e) {
587
- let t = new y(), n = new y();
587
+ let t = new x(), n = new x();
588
588
  switch (e.length) {
589
589
  case 0: break;
590
590
  case 1: {
@@ -602,7 +602,7 @@ var dt = class e {
602
602
  t.set(e[0], e[1]), n.set(Math.max(0, e[2]), Math.max(0, e[3]));
603
603
  break;
604
604
  }
605
- this._updateMax = this._updateMax.bind(this), this._updateSize = this._updateSize.bind(this), this.min = new y(t.x, t.y, this._updateMax), this.size = new y(n.x, n.y, this._updateMax), this.max = new y(t.x + n.x, t.y + n.y, this._updateSize);
605
+ this._updateMax = this._updateMax.bind(this), this._updateSize = this._updateSize.bind(this), this.min = new x(t.x, t.y, this._updateMax), this.size = new x(n.x, n.y, this._updateMax), this.max = new x(t.x + n.x, t.y + n.y, this._updateSize);
606
606
  }
607
607
  _updateSize() {
608
608
  return this.size.set(this.max.x - this.min.x, this.max.y - this.min.y), this;
@@ -629,7 +629,7 @@ var dt = class e {
629
629
  return this.width * this.height;
630
630
  }
631
631
  getCenter() {
632
- return new y(this.min.x + this.size.x / 2, this.min.y + this.size.y / 2);
632
+ return new x(this.min.x + this.size.x / 2, this.min.y + this.size.y / 2);
633
633
  }
634
634
  toCssStyle() {
635
635
  return {
@@ -664,13 +664,13 @@ var dt = class e {
664
664
  };
665
665
  //#endregion
666
666
  //#region src/core/math/Color.ts
667
- me([he]);
668
- var T = class {
667
+ pe([me]);
668
+ var yt = class {
669
669
  get value() {
670
670
  return this._value;
671
671
  }
672
672
  set value(e) {
673
- this._value = e, this._colord = oe(e ?? "none");
673
+ this._value = e, this._colord = se(e ?? "none");
674
674
  }
675
675
  get r8() {
676
676
  return this._colord.rgba.r;
@@ -748,8 +748,8 @@ var T = class {
748
748
  this.a
749
749
  ];
750
750
  }
751
- }, bt = Se / 180, xt = 180 / Se;
752
- function E(e, t, n) {
751
+ }, bt = xe / 180, xt = 180 / xe;
752
+ function St(e, t, n) {
753
753
  return Math.max(t, Math.min(e, n));
754
754
  }
755
755
  function D(e, t, n) {
@@ -757,7 +757,7 @@ function D(e, t, n) {
757
757
  }
758
758
  //#endregion
759
759
  //#region src/core/math/ColorMatrix.ts
760
- var St = class {
760
+ var Ct = class {
761
761
  _array = new Float32Array(20);
762
762
  constructor() {
763
763
  this.identity();
@@ -912,7 +912,7 @@ var St = class {
912
912
  ]);
913
913
  }
914
914
  sepia(e = 1) {
915
- let t = E(e, 0, 1);
915
+ let t = St(e, 0, 1);
916
916
  return this.multiply([
917
917
  D(1, .393, t),
918
918
  D(0, .7689999, t),
@@ -961,7 +961,7 @@ var St = class {
961
961
  ]);
962
962
  }
963
963
  grayscale(e = 1) {
964
- let t = E(e, 0, 1), n = D(1, .3, t), r = D(0, .3, t), i = D(1, .59, t), a = D(0, .59, t), o = D(1, .11, t), s = D(0, .11, t);
964
+ let t = St(e, 0, 1), n = D(1, .3, t), r = D(0, .3, t), i = D(1, .59, t), a = D(0, .59, t), o = D(1, .11, t), s = D(0, .11, t);
965
965
  return this.multiply([
966
966
  n,
967
967
  a,
@@ -1013,7 +1013,7 @@ var St = class {
1013
1013
  toArray() {
1014
1014
  return this._array;
1015
1015
  }
1016
- }, Ct = class e extends yt {
1016
+ }, wt = class e extends vt {
1017
1017
  rotation;
1018
1018
  get rotationDegrees() {
1019
1019
  return this.rotation / bt;
@@ -1068,7 +1068,7 @@ var St = class {
1068
1068
  clone() {
1069
1069
  return new e(this.toJSON());
1070
1070
  }
1071
- }, wt = class {
1071
+ }, Tt = class {
1072
1072
  _array;
1073
1073
  x = 0;
1074
1074
  y = 0;
@@ -1105,7 +1105,7 @@ function k(e, t, n, r) {
1105
1105
  }
1106
1106
  //#endregion
1107
1107
  //#region src/core/os/MainLoop.ts
1108
- var Tt = class extends C {
1108
+ var Et = class extends T {
1109
1109
  _starting = !1;
1110
1110
  _nextDeltaTime = 0;
1111
1111
  _startedProcess;
@@ -1119,13 +1119,13 @@ var Tt = class extends C {
1119
1119
  super(), this._onTicker = this._onTicker.bind(this), this.setProperties(e);
1120
1120
  }
1121
1121
  start(e) {
1122
- this._starting || (this._starting = !0, this._startedProcess && this.off("process", this._startedProcess), this._startedProcess = e, this.on("process", e), x.on(this._onTicker, { sort: 0 }));
1122
+ this._starting || (this._starting = !0, this._startedProcess && this.off("process", this._startedProcess), this._startedProcess = e, this.on("process", e), C.on(this._onTicker, { sort: 0 }));
1123
1123
  }
1124
1124
  stop() {
1125
- this._starting && (this._starting = !1, x.off(this._onTicker, { sort: 0 }));
1125
+ this._starting && (this._starting = !1, C.off(this._onTicker, { sort: 0 }));
1126
1126
  }
1127
1127
  _onTicker() {
1128
- let e = x.elapsed * this.speed;
1128
+ let e = C.elapsed * this.speed;
1129
1129
  if ((this._nextDeltaTime -= e) <= 0) {
1130
1130
  let t = (this._nextDeltaTime = this.spf) || e;
1131
1131
  this.emit("process", t);
@@ -1135,14 +1135,14 @@ var Tt = class extends C {
1135
1135
  super._destroy(), this.stop();
1136
1136
  }
1137
1137
  };
1138
- k([_({ fallback: 60 }), O("design:type", Number)], Tt.prototype, "fps", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Tt.prototype, "speed", void 0);
1138
+ k([_({ fallback: 60 }), O("design:type", Number)], Et.prototype, "fps", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Et.prototype, "speed", void 0);
1139
1139
  //#endregion
1140
1140
  //#region src/core/renderers/gl/buffer/const.ts
1141
- var Et = /* @__PURE__ */ function(e) {
1141
+ var Dt = /* @__PURE__ */ function(e) {
1142
1142
  return e[e.elementArrayBuffer = 34963] = "elementArrayBuffer", e[e.arrayBuffer = 34962] = "arrayBuffer", e[e.uniformBuffer = 35345] = "uniformBuffer", e;
1143
- }({}), Dt = class {
1143
+ }({}), Ot = class {
1144
1144
  native;
1145
- target = Et.arrayBuffer;
1145
+ target = Dt.arrayBuffer;
1146
1146
  byteLength = 0;
1147
1147
  dirty = !0;
1148
1148
  constructor(e) {
@@ -1150,7 +1150,7 @@ var Et = /* @__PURE__ */ function(e) {
1150
1150
  }
1151
1151
  }, A = /* @__PURE__ */ function(e) {
1152
1152
  return e[e.mapRead = 1] = "mapRead", e[e.mapWrite = 2] = "mapWrite", e[e.copySrc = 4] = "copySrc", e[e.copyDst = 8] = "copyDst", e[e.index = 16] = "index", e[e.vertex = 32] = "vertex", e[e.uniform = 64] = "uniform", e[e.storage = 128] = "storage", e[e.indirect = 256] = "indirect", e[e.queryResolve = 512] = "queryResolve", e[e.static = 1024] = "static", e;
1153
- }({}), Ot = class extends n {
1153
+ }({}), kt = class extends n {
1154
1154
  screen = {
1155
1155
  x: 0,
1156
1156
  y: 0,
@@ -1169,12 +1169,12 @@ var Et = /* @__PURE__ */ function(e) {
1169
1169
  this.view && (this.view.width = Math.floor(e * this.pixelRatio), this.view.height = Math.floor(t * this.pixelRatio)), this.screen.width = e, this.screen.height = t, n && this.view && (this.view.style.width = `${e}px`, this.view.style.height = `${t}px`);
1170
1170
  }
1171
1171
  };
1172
- k([_({ fallback: Ye }), O("design:type", Number)], Ot.prototype, "pixelRatio", void 0), k([_({ internal: !0 }), O("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], Ot.prototype, "view", void 0);
1172
+ k([_({ fallback: Je }), O("design:type", Number)], kt.prototype, "pixelRatio", void 0), k([_({ internal: !0 }), O("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], kt.prototype, "view", void 0);
1173
1173
  //#endregion
1174
1174
  //#region src/core/renderers/shared/shader/UniformGroup.ts
1175
- var kt = 0, At = class {
1175
+ var At = 0, jt = class {
1176
1176
  isUniformGroup = !0;
1177
- uid = ++kt;
1177
+ uid = ++At;
1178
1178
  uniforms;
1179
1179
  ubo;
1180
1180
  isStatic;
@@ -1185,10 +1185,10 @@ var kt = 0, At = class {
1185
1185
  update() {
1186
1186
  this._dirtyId++;
1187
1187
  }
1188
- }, jt = Object.create(null), Mt = Object.create(null);
1189
- function Nt(e, t) {
1190
- let n = Mt[e];
1191
- return n === void 0 && (jt[t] === void 0 && (jt[t] = 1), Mt[e] = n = jt[t]++), n;
1188
+ }, Mt = Object.create(null), Nt = Object.create(null);
1189
+ function Pt(e, t) {
1190
+ let n = Nt[e];
1191
+ return n === void 0 && (Mt[t] === void 0 && (Mt[t] = 1), Nt[e] = n = Mt[t]++), n;
1192
1192
  }
1193
1193
  //#endregion
1194
1194
  //#region src/core/renderers/gl/system/GlSystem.ts
@@ -1206,7 +1206,7 @@ var j = class extends e {
1206
1206
  _setup() {}
1207
1207
  flush() {}
1208
1208
  reset() {}
1209
- }, Pt = class extends j {
1209
+ }, Ft = class extends j {
1210
1210
  install(e) {
1211
1211
  super.install(e), e.buffer = this;
1212
1212
  }
@@ -1216,8 +1216,8 @@ var j = class extends e {
1216
1216
  return this.glBuffers.get(e.instanceId) || this._createGlBuffer(e);
1217
1217
  }
1218
1218
  _createGlBuffer(e) {
1219
- let t = this._gl, n = new Dt(t.createBuffer()), r = Et.arrayBuffer;
1220
- return e.usage & A.index ? r = Et.elementArrayBuffer : e.usage & A.uniform && (r = Et.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1219
+ let t = this._gl, n = new Ot(t.createBuffer()), r = Dt.arrayBuffer;
1220
+ return e.usage & A.index ? r = Dt.elementArrayBuffer : e.usage & A.uniform && (r = Dt.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1221
1221
  switch (e) {
1222
1222
  case "usage":
1223
1223
  case "data":
@@ -1255,13 +1255,13 @@ var j = class extends e {
1255
1255
  }
1256
1256
  this.buffers.clear(), this.glBuffers.clear();
1257
1257
  }
1258
- }, Ft;
1259
- function It() {
1260
- return Ft ||= "mediump", Ft;
1258
+ }, It;
1259
+ function Lt() {
1260
+ return It ||= "mediump", It;
1261
1261
  }
1262
1262
  //#endregion
1263
1263
  //#region src/core/renderers/gl/shader/preprocessors/addProgramDefines.ts
1264
- function Lt(e, t, n) {
1264
+ function Rt(e, t, n) {
1265
1265
  return t ? e : n ? (e = e.replace("out vec4 finalColor;", ""), `#ifdef GL_ES
1266
1266
  #define in varying
1267
1267
  #define finalColor gl_FragColor
@@ -1275,7 +1275,7 @@ ${e}`;
1275
1275
  }
1276
1276
  //#endregion
1277
1277
  //#region src/core/renderers/gl/shader/preprocessors/ensurePrecision.ts
1278
- function Rt(e, t, n) {
1278
+ function zt(e, t, n) {
1279
1279
  let r = n ? t.maxSupportedFragmentPrecision : t.maxSupportedVertexPrecision;
1280
1280
  if (e.substring(0, 9) !== "precision") {
1281
1281
  let i = n ? t.requestedFragmentPrecision : t.requestedVertexPrecision;
@@ -1285,31 +1285,31 @@ function Rt(e, t, n) {
1285
1285
  }
1286
1286
  //#endregion
1287
1287
  //#region src/core/renderers/gl/shader/preprocessors/insertVersion.ts
1288
- function zt(e, t) {
1288
+ function Bt(e, t) {
1289
1289
  return t ? `#version 300 es\n${e}` : e;
1290
1290
  }
1291
1291
  //#endregion
1292
1292
  //#region src/core/renderers/gl/shader/preprocessors/setProgramName.ts
1293
- var Bt = {}, Vt = {};
1294
- function Ht(e, { name: t = "program" }, n = !0) {
1293
+ var Vt = {}, Ht = {};
1294
+ function Ut(e, { name: t = "program" }, n = !0) {
1295
1295
  t = t.replace(/\s+/g, "-"), t += n ? "-fragment" : "-vertex";
1296
- let r = n ? Bt : Vt;
1296
+ let r = n ? Vt : Ht;
1297
1297
  return r[t] ? (r[t]++, t += `-${r[t]}`) : r[t] = 1, e.includes("#define SHADER_NAME") ? e : `${`#define SHADER_NAME ${t}`}\n${e}`;
1298
1298
  }
1299
1299
  //#endregion
1300
1300
  //#region src/core/renderers/gl/shader/preprocessors/stripVersion.ts
1301
- function Ut(e, t) {
1301
+ function Wt(e, t) {
1302
1302
  return t ? e.replace("#version 300 es", "") : e;
1303
1303
  }
1304
1304
  //#endregion
1305
1305
  //#region src/core/renderers/gl/shader/GlProgram.ts
1306
- var Wt = Object.create(null), Gt = {
1307
- stripVersion: Ut,
1308
- ensurePrecision: Rt,
1309
- addProgramDefines: Lt,
1310
- setProgramName: Ht,
1311
- insertVersion: zt
1312
- }, Kt = class e {
1306
+ var Gt = Object.create(null), Kt = {
1307
+ stripVersion: Wt,
1308
+ ensurePrecision: zt,
1309
+ addProgramDefines: Rt,
1310
+ setProgramName: Ut,
1311
+ insertVersion: Bt
1312
+ }, qt = class e {
1313
1313
  static defaultOptions = {
1314
1314
  preferredVertexPrecision: "highp",
1315
1315
  preferredFragmentPrecision: "mediump"
@@ -1332,25 +1332,25 @@ var Wt = Object.create(null), Gt = {
1332
1332
  requestedFragmentPrecision: t.preferredFragmentPrecision,
1333
1333
  requestedVertexPrecision: t.preferredVertexPrecision,
1334
1334
  maxSupportedVertexPrecision: "highp",
1335
- maxSupportedFragmentPrecision: It()
1335
+ maxSupportedFragmentPrecision: Lt()
1336
1336
  },
1337
1337
  setProgramName: { name: t.name },
1338
1338
  addProgramDefines: i,
1339
1339
  insertVersion: i
1340
1340
  };
1341
- Object.keys(Gt).forEach((e) => {
1341
+ Object.keys(Kt).forEach((e) => {
1342
1342
  let t = a[e];
1343
- n = Gt[e](n, t, !0), r = Gt[e](r, t, !1);
1344
- }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = Nt(`${r}:${n}`, "GlProgram");
1343
+ n = Kt[e](n, t, !0), r = Kt[e](r, t, !1);
1344
+ }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = Pt(`${r}:${n}`, "GlProgram");
1345
1345
  }
1346
1346
  destroy() {
1347
- this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete Wt[this._cacheKey];
1347
+ this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete Gt[this._cacheKey];
1348
1348
  }
1349
1349
  static from(t) {
1350
1350
  let n = `${t.vertex}:${t.fragment}`;
1351
- return Wt[n] || (Wt[n] = new e(t), Wt[n]._cacheKey = n), Wt[n];
1351
+ return Gt[n] || (Gt[n] = new e(t), Gt[n]._cacheKey = n), Gt[n];
1352
1352
  }
1353
- }, qt = {
1353
+ }, Jt = {
1354
1354
  uint8x2: {
1355
1355
  size: 2,
1356
1356
  stride: 2,
@@ -1502,18 +1502,18 @@ var Wt = Object.create(null), Gt = {
1502
1502
  normalized: !1
1503
1503
  }
1504
1504
  };
1505
- function Jt(e) {
1506
- return qt[e] ?? qt.float32;
1505
+ function Yt(e) {
1506
+ return Jt[e] ?? Jt.float32;
1507
1507
  }
1508
1508
  //#endregion
1509
1509
  //#region src/core/renderers/gl/shader/GlProgramData.ts
1510
- var Yt = class {
1510
+ var Xt = class {
1511
1511
  native;
1512
1512
  uniformDirtyGroups = Object.create(null);
1513
1513
  constructor(e) {
1514
1514
  this.native = e;
1515
1515
  }
1516
- }, Xt, Zt = {
1516
+ }, Zt, Qt = {
1517
1517
  FLOAT: "float",
1518
1518
  FLOAT_VEC2: "vec2",
1519
1519
  FLOAT_VEC3: "vec3",
@@ -1542,7 +1542,7 @@ var Yt = class {
1542
1542
  SAMPLER_2D_ARRAY: "sampler2DArray",
1543
1543
  INT_SAMPLER_2D_ARRAY: "sampler2DArray",
1544
1544
  UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray"
1545
- }, Qt = {
1545
+ }, $t = {
1546
1546
  float: "float32",
1547
1547
  vec2: "float32x2",
1548
1548
  vec3: "float32x3",
@@ -1560,29 +1560,29 @@ var Yt = class {
1560
1560
  bvec3: "uint32x3",
1561
1561
  bvec4: "uint32x4"
1562
1562
  };
1563
- function $t(e, t) {
1564
- if (!Xt) {
1565
- let t = Object.keys(Zt);
1566
- Xt = {};
1563
+ function en(e, t) {
1564
+ if (!Zt) {
1565
+ let t = Object.keys(Qt);
1566
+ Zt = {};
1567
1567
  for (let n = 0; n < t.length; ++n) {
1568
1568
  let r = t[n];
1569
- Xt[e[r]] = Zt[r];
1569
+ Zt[e[r]] = Qt[r];
1570
1570
  }
1571
1571
  }
1572
- return Xt[t];
1572
+ return Zt[t];
1573
1573
  }
1574
- function en(e, t) {
1575
- return Qt[$t(e, t)] || "float32";
1574
+ function tn(e, t) {
1575
+ return $t[en(e, t)] || "float32";
1576
1576
  }
1577
1577
  //#endregion
1578
1578
  //#region src/core/renderers/gl/shader/GlShaderSystem.ts
1579
- var tn = class extends j {
1579
+ var nn = class extends j {
1580
1580
  install(e) {
1581
1581
  super.install(e), e.shader = this;
1582
1582
  }
1583
1583
  glProgramDatas = /* @__PURE__ */ new Map();
1584
1584
  currentProgram = null;
1585
- globalUniforms = new At({
1585
+ globalUniforms = new jt({
1586
1586
  projectionMatrix: new Float32Array([
1587
1587
  1,
1588
1588
  0,
@@ -1623,7 +1623,7 @@ var tn = class extends j {
1623
1623
  return this.glProgramDatas.get(e.id) || this._createGlProgramData(e);
1624
1624
  }
1625
1625
  _createGlProgramData(e) {
1626
- let t = this._gl, n = new Yt(t.createProgram());
1626
+ let t = this._gl, n = new Xt(t.createProgram());
1627
1627
  this.glProgramDatas.set(e.id, n), this.useProgram(e);
1628
1628
  let r = this._createGlShader(e.vertex, t.VERTEX_SHADER), i = this._createGlShader(e.fragment, t.FRAGMENT_SHADER);
1629
1629
  if (t.attachShader(n.native, r), t.attachShader(n.native, i), t.linkProgram(n.native), !t.getProgramParameter(n.native, t.LINK_STATUS)) throw Error(`Failed to link program: ${t.getProgramInfoLog(n.native)}`);
@@ -1631,11 +1631,11 @@ var tn = class extends j {
1631
1631
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_ATTRIBUTES), r = 0; r < e; r++) {
1632
1632
  let e = t.getActiveAttrib(n.native, r);
1633
1633
  if (!e || e.name.startsWith("gl_")) continue;
1634
- let i = en(t, e.type);
1634
+ let i = tn(t, e.type);
1635
1635
  a[e.name] = {
1636
1636
  location: 0,
1637
1637
  format: i,
1638
- stride: Jt(i).stride,
1638
+ stride: Yt(i).stride,
1639
1639
  offset: 0,
1640
1640
  instance: !1,
1641
1641
  start: 0
@@ -1652,7 +1652,7 @@ var tn = class extends j {
1652
1652
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_UNIFORMS), r = 0; r < e; r++) {
1653
1653
  let e = t.getActiveUniform(n.native, r);
1654
1654
  if (!e) continue;
1655
- let i = e.name.replace(/\[.*?\]$/, ""), a = $t(t, e.type), o = e.size;
1655
+ let i = e.name.replace(/\[.*?\]$/, ""), a = en(t, e.type), o = e.size;
1656
1656
  c[i] = {
1657
1657
  name: i,
1658
1658
  index: r,
@@ -1687,7 +1687,7 @@ var tn = class extends j {
1687
1687
  let { type: s, isArray: c, name: l } = o;
1688
1688
  o.location === void 0 && (o.location = r.getUniformLocation(t.native, l));
1689
1689
  let u = o.location;
1690
- if (nn(o.value, a)) switch (o.value = rn(o.value, a), s) {
1690
+ if (rn(o.value, a)) switch (o.value = an(o.value, a), s) {
1691
1691
  case "float":
1692
1692
  c ? r.uniform1fv(u, a) : r.uniform1f(u, a);
1693
1693
  break;
@@ -1774,7 +1774,7 @@ var tn = class extends j {
1774
1774
  super.destroy(), this.bind(null);
1775
1775
  }
1776
1776
  };
1777
- function nn(e, t) {
1777
+ function rn(e, t) {
1778
1778
  if (typeof t == "object" && t) {
1779
1779
  let n = t.length;
1780
1780
  if (typeof e != "object" || !e || e.length !== n) return !0;
@@ -1783,7 +1783,7 @@ function nn(e, t) {
1783
1783
  }
1784
1784
  return e !== t;
1785
1785
  }
1786
- function rn(e, t) {
1786
+ function an(e, t) {
1787
1787
  if (typeof t == "object" && t) {
1788
1788
  let n = t.length;
1789
1789
  if (typeof e == "object" && e && e.length === n) {
@@ -1796,10 +1796,10 @@ function rn(e, t) {
1796
1796
  }
1797
1797
  //#endregion
1798
1798
  //#region src/core/renderers/gl/state/GlBlendMode.ts
1799
- var an = /* @__PURE__ */ function(e) {
1799
+ var on = /* @__PURE__ */ function(e) {
1800
1800
  return e.normal = "normal", e.add = "add", e.multiply = "multiply", e.screen = "screen", e.none = "none", e.normalNpm = "normalNpm", e.addNpm = "add_npm", e.screenNpm = "screenNpm", e.srcIn = "srcIn", e.srcOut = "srcOut", e.srcAtop = "srcAtop", e.dstOver = "dstOver", e.dstIn = "dstIn", e.dstOut = "dstOut", e.dstAtop = "dstAtop", e.xor = "xor", e.subtract = "subtract", e;
1801
1801
  }({});
1802
- function on(e) {
1802
+ function sn(e) {
1803
1803
  return {
1804
1804
  normal: [e.ONE, e.ONE_MINUS_SRC_ALPHA],
1805
1805
  add: [e.ONE, e.ONE],
@@ -1854,7 +1854,7 @@ function on(e) {
1854
1854
  }
1855
1855
  //#endregion
1856
1856
  //#region src/core/renderers/gl/state/GlStateSystem.ts
1857
- var sn = class e {
1857
+ var cn = class e {
1858
1858
  static _properties = [
1859
1859
  "blend",
1860
1860
  "offsets",
@@ -1881,14 +1881,14 @@ var sn = class e {
1881
1881
  let t = new e();
1882
1882
  return t.depthTest = !1, t.blend = !0, t;
1883
1883
  }
1884
- _blendMode = an.normal;
1884
+ _blendMode = on.normal;
1885
1885
  _polygonOffset = 0;
1886
1886
  bitmap = 0;
1887
1887
  get blendMode() {
1888
1888
  return this._blendMode;
1889
1889
  }
1890
1890
  set blendMode(e) {
1891
- this.blend = e !== an.none, this._blendMode = e;
1891
+ this.blend = e !== on.none, this._blendMode = e;
1892
1892
  }
1893
1893
  get polygonOffset() {
1894
1894
  return this._polygonOffset;
@@ -1900,19 +1900,19 @@ var sn = class e {
1900
1900
  if (e) for (let t in e) this[t] = e[t];
1901
1901
  }
1902
1902
  };
1903
- sn._init();
1904
- var cn = class extends j {
1903
+ cn._init();
1904
+ var ln = class extends j {
1905
1905
  install(e) {
1906
1906
  super.install(e), e.state = this;
1907
1907
  }
1908
1908
  _blendEq = !1;
1909
- _setters = sn._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1909
+ _setters = cn._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1910
1910
  boundStateBitmap = 0;
1911
1911
  boundBlendMode;
1912
1912
  blendModes;
1913
- defaultState = new sn({ blend: !0 });
1913
+ defaultState = new cn({ blend: !0 });
1914
1914
  _updateContext(e) {
1915
- super._updateContext(e), this.blendModes = on(e);
1915
+ super._updateContext(e), this.blendModes = sn(e);
1916
1916
  }
1917
1917
  toggle(e, t) {
1918
1918
  this._renderer.gl[t ? "enable" : "disable"](e);
@@ -1955,14 +1955,14 @@ var cn = class extends j {
1955
1955
  }
1956
1956
  reset() {
1957
1957
  super.reset();
1958
- let e = (1 << sn._properties.length) - 1;
1958
+ let e = (1 << cn._properties.length) - 1;
1959
1959
  this.boundStateBitmap = ~this.defaultState.bitmap & e, this.boundBlendMode = void 0, this._blendEq = !0, this.bind(this.defaultState);
1960
1960
  }
1961
- }, ln = class extends j {
1961
+ }, un = class extends j {
1962
1962
  install(e) {
1963
1963
  super.install(e), e.batch2D = this;
1964
1964
  }
1965
- _state = sn.for2D();
1965
+ _state = cn.for2D();
1966
1966
  _batchSize = 4096 * 4;
1967
1967
  _batchables = [];
1968
1968
  _vertexCount = 0;
@@ -1983,8 +1983,8 @@ var cn = class extends j {
1983
1983
  }
1984
1984
  _createShader(e) {
1985
1985
  let t = this._renderer, n = {
1986
- instanceId: ut(),
1987
- glProgram: new Kt({
1986
+ instanceId: lt(),
1987
+ glProgram: new qt({
1988
1988
  vertex: "precision highp float;\nin vec2 aPosition;\nin vec2 aUv;\nin vec4 aTextureParams;\nin vec4 aModulate;\n\nuniform vec2 size;\nuniform mat3 projectionMatrix;\nuniform mat3 viewMatrix;\n\nout float vTextureId;\nout float vClipOutsideUv;\nout vec2 vUv;\nout vec4 vModulate;\n\nvec2 roundPixels(vec2 position, vec2 targetSize) {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n}\n\nvoid main(void) {\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n mat3 modelViewProjectionMatrix = projectionMatrix * viewMatrix * modelMatrix;\n gl_Position = vec4((modelViewProjectionMatrix * vec3(aPosition, 1.0)).xy, 0.0, 1.0);\n vTextureId = aTextureParams.x;\n vClipOutsideUv = aTextureParams.y;\n if (aTextureParams.z == 1.) {\n gl_Position.xy = roundPixels(gl_Position.xy, size);\n }\n vUv = aUv;\n vModulate = aModulate;\n}",
1989
1989
  fragment: `precision highp float;
1990
1990
  in float vTextureId;
@@ -2013,15 +2013,15 @@ void main(void) {
2013
2013
  }`
2014
2014
  })
2015
2015
  }, r = {
2016
- instanceId: ut(),
2016
+ instanceId: lt(),
2017
2017
  usage: A.vertex,
2018
2018
  data: new Float32Array()
2019
2019
  }, i = {
2020
- instanceId: ut(),
2020
+ instanceId: lt(),
2021
2021
  usage: A.index,
2022
2022
  data: new Uint32Array()
2023
2023
  }, a = {
2024
- instanceId: ut(),
2024
+ instanceId: lt(),
2025
2025
  topology: "triangle-list",
2026
2026
  attributes: Object.fromEntries(Object.entries(this._attributes).map(([e, t]) => [e, {
2027
2027
  ...t,
@@ -2061,16 +2061,16 @@ void main(void) {
2061
2061
  let { indices: r, vertices: p, uvs: h = new Float32Array(), size: g = {
2062
2062
  width: 0,
2063
2063
  height: 0
2064
- }, texture: ee, blendMode: te = an.normal, clipOutsideUv: ne, roundPixels: re, modulate: ie = [
2064
+ }, texture: ee, blendMode: te = on.normal, clipOutsideUv: ne, roundPixels: re, modulate: ie = [
2065
2065
  255,
2066
2066
  255,
2067
2067
  255,
2068
2068
  255
2069
2069
  ] } = n[e];
2070
2070
  m < e && t.blendMode !== te && (t.size = l - t.start, u.push(t), m = e, t = { id: ++d }, t.textures = i, t.textureLocationMap = f, t.start = l);
2071
- let { width: ae, height: oe } = g, _ = c / this._vertexSize, se = (ee ? f.get(ee) : 255) ?? 255, ce = +!!re, le = +!!ne, ue, de, v;
2072
- for (let e = p.length, t = 0; t < e; t += 2) ue = h[t], de = h[t + 1], ae > 0 && oe > 0 && (ue = Math.ceil(ue * ae) / ae, de = Math.ceil(de * oe) / oe), a[c++] = p[t], a[c++] = p[t + 1], a[c++] = ue, a[c++] = de, v = c * 4, o[v] = se, o[v + 1] = le, o[v + 2] = ce, o[v + 3] = 0, c++, v = c * 4, o[v] = ie[0], o[v + 1] = ie[1], o[v + 2] = ie[2], o[v + 3] = ie[3], c++;
2073
- for (let e = r.length, t = 0; t < e; t++) s[l++] = _ + r[t];
2071
+ let { width: ae, height: oe } = g, se = c / this._vertexSize, _ = (ee ? f.get(ee) : 255) ?? 255, ce = +!!re, le = +!!ne, v, ue, y;
2072
+ for (let e = p.length, t = 0; t < e; t += 2) v = h[t], ue = h[t + 1], ae > 0 && oe > 0 && (v = Math.ceil(v * ae) / ae, ue = Math.ceil(ue * oe) / oe), a[c++] = p[t], a[c++] = p[t + 1], a[c++] = v, a[c++] = ue, y = c * 4, o[y] = _, o[y + 1] = le, o[y + 2] = ce, o[y + 3] = 0, c++, y = c * 4, o[y] = ie[0], o[y + 1] = ie[1], o[y + 2] = ie[2], o[y + 3] = ie[3], c++;
2073
+ for (let e = r.length, t = 0; t < e; t++) s[l++] = se + r[t];
2074
2074
  t.blendMode = te;
2075
2075
  }
2076
2076
  m = h + 1, t.size = l - t.start, u.push(t), t = { id: ++d }, i = [], f = /* @__PURE__ */ new Map();
@@ -2091,22 +2091,22 @@ void main(void) {
2091
2091
  }
2092
2092
  }
2093
2093
  _getBufferData(e) {
2094
- let t = un(Math.ceil(e / 8)), n = dn(t), r = t * 8;
2094
+ let t = dn(Math.ceil(e / 8)), n = fn(t), r = t * 8;
2095
2095
  this._attributeBuffer.length <= n && (this._attributeBuffer.length = n + 1);
2096
2096
  let i = this._attributeBuffer[n];
2097
2097
  return i || (this._attributeBuffer[n] = i = /* @__PURE__ */ new ArrayBuffer(r * this._vertexSize * 4)), i;
2098
2098
  }
2099
2099
  _getIndexBufferData(e) {
2100
- let t = un(Math.ceil(e / 12)), n = dn(t), r = t * 12;
2100
+ let t = dn(Math.ceil(e / 12)), n = fn(t), r = t * 12;
2101
2101
  this._indexBuffers.length <= n && (this._indexBuffers.length = n + 1);
2102
2102
  let i = this._indexBuffers[n];
2103
2103
  return i || (this._indexBuffers[n] = i = new Uint32Array(r)), i;
2104
2104
  }
2105
2105
  };
2106
- function un(e) {
2106
+ function dn(e) {
2107
2107
  return e += +(e === 0), --e, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e + 1;
2108
2108
  }
2109
- function dn(e) {
2109
+ function fn(e) {
2110
2110
  let t = (e > 65535) << 4;
2111
2111
  e >>>= t;
2112
2112
  let n = (e > 255) << 3;
@@ -2116,9 +2116,9 @@ function dn(e) {
2116
2116
  //#region src/core/renderers/gl/const.ts
2117
2117
  var M = /* @__PURE__ */ function(e) {
2118
2118
  return e[e.disabled = 0] = "disabled", e[e.renderingMaskAdd = 1] = "renderingMaskAdd", e[e.maskActive = 2] = "maskActive", e[e.inverseMaskActive = 3] = "inverseMaskActive", e[e.renderingMaskRemove = 4] = "renderingMaskRemove", e[e.none = 5] = "none", e;
2119
- }({}), fn = /* @__PURE__ */ function(e) {
2119
+ }({}), pn = /* @__PURE__ */ function(e) {
2120
2120
  return e[e.none = 0] = "none", e[e.color = 16384] = "color", e[e.stencil = 1024] = "stencil", e[e.depth = 256] = "depth", e[e.colorDepth = 16640] = "colorDepth", e[e.colorStencil = 17408] = "colorStencil", e[e.depthStencil = 1280] = "depthStencil", e[e.all = 17664] = "all", e;
2121
- }({}), pn = class extends j {
2121
+ }({}), mn = class extends j {
2122
2122
  install(e) {
2123
2123
  super.install(e), e.mask = this;
2124
2124
  }
@@ -2143,10 +2143,10 @@ var M = /* @__PURE__ */ function(e) {
2143
2143
  let t = this.stack.pop();
2144
2144
  if (!t || t.source !== e) return;
2145
2145
  let { mask: n } = t, r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2146
- "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(fn.stencil), this._renderer.stencil.bind(M.disabled, i)) : this._renderer.stencil.bind(M.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(M.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2146
+ "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(pn.stencil), this._renderer.stencil.bind(M.disabled, i)) : this._renderer.stencil.bind(M.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(M.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2147
2147
  }
2148
- }, mn = [];
2149
- mn[M.none] = {}, mn[M.disabled] = {}, mn[M.renderingMaskAdd] = {
2148
+ }, hn = [];
2149
+ hn[M.none] = {}, hn[M.disabled] = {}, hn[M.renderingMaskAdd] = {
2150
2150
  stencilFront: {
2151
2151
  compare: "equal",
2152
2152
  passOp: "increment-clamp"
@@ -2155,7 +2155,7 @@ mn[M.none] = {}, mn[M.disabled] = {}, mn[M.renderingMaskAdd] = {
2155
2155
  compare: "equal",
2156
2156
  passOp: "increment-clamp"
2157
2157
  }
2158
- }, mn[M.renderingMaskRemove] = {
2158
+ }, hn[M.renderingMaskRemove] = {
2159
2159
  stencilFront: {
2160
2160
  compare: "equal",
2161
2161
  passOp: "decrement-clamp"
@@ -2164,7 +2164,7 @@ mn[M.none] = {}, mn[M.disabled] = {}, mn[M.renderingMaskAdd] = {
2164
2164
  compare: "equal",
2165
2165
  passOp: "decrement-clamp"
2166
2166
  }
2167
- }, mn[M.maskActive] = {
2167
+ }, hn[M.maskActive] = {
2168
2168
  stencilFront: {
2169
2169
  compare: "equal",
2170
2170
  passOp: "keep"
@@ -2173,7 +2173,7 @@ mn[M.none] = {}, mn[M.disabled] = {}, mn[M.renderingMaskAdd] = {
2173
2173
  compare: "equal",
2174
2174
  passOp: "keep"
2175
2175
  }
2176
- }, mn[M.inverseMaskActive] = {
2176
+ }, hn[M.inverseMaskActive] = {
2177
2177
  stencilFront: {
2178
2178
  compare: "not-equal",
2179
2179
  passOp: "keep"
@@ -2183,7 +2183,7 @@ mn[M.none] = {}, mn[M.disabled] = {}, mn[M.renderingMaskAdd] = {
2183
2183
  passOp: "keep"
2184
2184
  }
2185
2185
  };
2186
- var hn = class extends j {
2186
+ var gn = class extends j {
2187
2187
  install(e) {
2188
2188
  super.install(e), e.stencil = this;
2189
2189
  }
@@ -2235,7 +2235,7 @@ var hn = class extends j {
2235
2235
  }
2236
2236
  };
2237
2237
  bind(e, t) {
2238
- let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = mn[e], a = this._cache;
2238
+ let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = hn[e], a = this._cache;
2239
2239
  if (n.stencilMode = e, n.refCount = t, e === M.disabled) {
2240
2240
  this._cache.enabled && (this._cache.enabled = !1, r.disable(r.STENCIL_TEST));
2241
2241
  return;
@@ -2245,8 +2245,8 @@ var hn = class extends j {
2245
2245
  destroy() {
2246
2246
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
2247
2247
  }
2248
- }, gn = class extends j {
2249
- current = new yt(0, 0, 0, 0);
2248
+ }, _n = class extends j {
2249
+ current = new vt(0, 0, 0, 0);
2250
2250
  install(e) {
2251
2251
  super.install(e), e.viewport = this;
2252
2252
  }
@@ -2254,7 +2254,7 @@ var hn = class extends j {
2254
2254
  let t = this.current, n = Math.floor(e.x), r = Math.floor(e.y), i = Math.floor(e.width), a = Math.floor(e.height);
2255
2255
  t.x === n && t.y === r && t.width === i && t.height === a || (this._gl.viewport(n, r, i, a), t.x = n, t.y = r, t.width = i, t.height = a);
2256
2256
  }
2257
- }, _n = class {
2257
+ }, vn = class {
2258
2258
  framebuffer;
2259
2259
  width = -1;
2260
2260
  height = -1;
@@ -2265,7 +2265,7 @@ var hn = class extends j {
2265
2265
  constructor(e) {
2266
2266
  this.framebuffer = e;
2267
2267
  }
2268
- }, vn = class extends j {
2268
+ }, yn = class extends j {
2269
2269
  install(e) {
2270
2270
  super.install(e), e.renderTarget = this;
2271
2271
  }
@@ -2275,7 +2275,7 @@ var hn = class extends j {
2275
2275
  _msaaSamples = [];
2276
2276
  _hasMRT = !0;
2277
2277
  _writeDepthTexture = !0;
2278
- projection = new wt();
2278
+ projection = new Tt();
2279
2279
  _updateContext(e) {
2280
2280
  if (super._updateContext(e), this._hasMRT = !0, this._writeDepthTexture = !0, this._renderer.version === 1) {
2281
2281
  let t = this._renderer.extensions.drawBuffers, n = this._renderer.extensions.depthTexture;
@@ -2311,7 +2311,7 @@ var hn = class extends j {
2311
2311
  return this.glRenderTargets.get(e.instanceId) || this._createGlRenderTarget(e);
2312
2312
  }
2313
2313
  _createGlRenderTarget(e) {
2314
- let t = this._gl, n = new _n(t.createFramebuffer());
2314
+ let t = this._gl, n = new vn(t.createFramebuffer());
2315
2315
  return this.glRenderTargets.set(e.instanceId, n), this.renderTargets.get(e.instanceId) || (this.renderTargets.set(e.instanceId, e), this._update(e, n), "on" in e && (e.on("updateProperty", (t) => {
2316
2316
  switch (t) {
2317
2317
  case "width":
@@ -2388,28 +2388,28 @@ var hn = class extends j {
2388
2388
  reset() {
2389
2389
  super.reset(), this._renderer.contextLost || this.glRenderTargets.forEach((e) => this.destroyGpuRenderTarget(e)), this.renderTargets.clear(), this.glRenderTargets.clear(), this.current = null, this._msaaSamples.length = 0;
2390
2390
  }
2391
- }, yn = /* @__PURE__ */ function(e) {
2391
+ }, bn = /* @__PURE__ */ function(e) {
2392
2392
  return e[e.RGBA = 6408] = "RGBA", e[e.RGB = 6407] = "RGB", e[e.RG = 33319] = "RG", e[e.RED = 6403] = "RED", e[e.RGBA_INTEGER = 36249] = "RGBA_INTEGER", e[e.RGB_INTEGER = 36248] = "RGB_INTEGER", e[e.RG_INTEGER = 33320] = "RG_INTEGER", e[e.RED_INTEGER = 36244] = "RED_INTEGER", e[e.ALPHA = 6406] = "ALPHA", e[e.LUMINANCE = 6409] = "LUMINANCE", e[e.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", e[e.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", e[e.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", e;
2393
- }({}), bn = /* @__PURE__ */ function(e) {
2393
+ }({}), xn = /* @__PURE__ */ function(e) {
2394
2394
  return e[e.TEXTURE_2D = 3553] = "TEXTURE_2D", e[e.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", e[e.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", e[e.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", e[e.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", e[e.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", e[e.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", e;
2395
2395
  }({}), N = /* @__PURE__ */ function(e) {
2396
2396
  return e[e.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", e[e.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", e[e.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", e[e.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", e[e.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", e[e.UNSIGNED_INT = 5125] = "UNSIGNED_INT", e[e.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", e[e.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", e[e.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", e[e.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", e[e.BYTE = 5120] = "BYTE", e[e.SHORT = 5122] = "SHORT", e[e.INT = 5124] = "INT", e[e.FLOAT = 5126] = "FLOAT", e[e.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", e[e.HALF_FLOAT = 36193] = "HALF_FLOAT", e;
2397
- }({}), xn = class {
2397
+ }({}), Sn = class {
2398
2398
  native;
2399
- target = bn.TEXTURE_2D;
2399
+ target = xn.TEXTURE_2D;
2400
2400
  width = -1;
2401
2401
  height = -1;
2402
2402
  mipmap = !1;
2403
2403
  type = N.UNSIGNED_BYTE;
2404
- internalFormat = yn.RGBA;
2405
- format = yn.RGBA;
2404
+ internalFormat = bn.RGBA;
2405
+ format = bn.RGBA;
2406
2406
  constructor(e) {
2407
2407
  this.native = e;
2408
2408
  }
2409
2409
  };
2410
2410
  //#endregion
2411
2411
  //#region src/core/renderers/gl/texture/mapFormatToGlFormat.ts
2412
- function Sn(e) {
2412
+ function Cn(e) {
2413
2413
  return {
2414
2414
  r8unorm: e.RED,
2415
2415
  r8snorm: e.RED,
@@ -2457,7 +2457,7 @@ function Sn(e) {
2457
2457
  }
2458
2458
  //#endregion
2459
2459
  //#region src/core/renderers/gl/texture/mapFormatToGlInternalFormat.ts
2460
- function Cn(e, t) {
2460
+ function wn(e, t) {
2461
2461
  let n = {}, r = e.RGBA;
2462
2462
  return e instanceof WebGLRenderingContext ? t.srgb && (n = {
2463
2463
  "rgba8unorm-srgb": t.srgb.SRGB8_ALPHA8_EXT,
@@ -2573,7 +2573,7 @@ function Cn(e, t) {
2573
2573
  }
2574
2574
  //#endregion
2575
2575
  //#region src/core/renderers/gl/texture/mapFormatToGlType.ts
2576
- function wn(e) {
2576
+ function Tn(e) {
2577
2577
  return {
2578
2578
  r8unorm: e.UNSIGNED_BYTE,
2579
2579
  r8snorm: e.BYTE,
@@ -2621,7 +2621,7 @@ function wn(e) {
2621
2621
  }
2622
2622
  //#endregion
2623
2623
  //#region src/core/renderers/gl/texture/updateTextureStyle.ts
2624
- var Tn = {
2624
+ var En = {
2625
2625
  linear: {
2626
2626
  linear: 9987,
2627
2627
  nearest: 9985
@@ -2630,10 +2630,10 @@ var Tn = {
2630
2630
  linear: 9986,
2631
2631
  nearest: 9984
2632
2632
  }
2633
- }, En = {
2633
+ }, Dn = {
2634
2634
  linear: 9729,
2635
2635
  nearest: 9728
2636
- }, Dn = {
2636
+ }, On = {
2637
2637
  never: 512,
2638
2638
  less: 513,
2639
2639
  equal: 514,
@@ -2642,32 +2642,32 @@ var Tn = {
2642
2642
  "not-equal": 517,
2643
2643
  "greater-equal": 518,
2644
2644
  always: 519
2645
- }, On = {
2645
+ }, kn = {
2646
2646
  "clamp-to-edge": 33071,
2647
2647
  repeat: 10497,
2648
2648
  "mirror-repeat": 33648
2649
2649
  };
2650
- function kn(e, t, n, r, i, a, o, s) {
2650
+ function An(e, t, n, r, i, a, o, s) {
2651
2651
  let { addressModeU: c = "repeat", addressModeV: l = "repeat", addressModeW: u = "repeat", magFilter: d = "linear", minFilter: f = "linear", mipmapFilter: p = "linear", maxAnisotropy: m = 0, compare: h } = e, g = a;
2652
2652
  if (!s || c !== "repeat" || l !== "repeat" || u !== "repeat") {
2653
- let e = On[o ? "clamp-to-edge" : c], n = On[o ? "clamp-to-edge" : l], r = On[o ? "clamp-to-edge" : u];
2653
+ let e = kn[o ? "clamp-to-edge" : c], n = kn[o ? "clamp-to-edge" : l], r = kn[o ? "clamp-to-edge" : u];
2654
2654
  t[i](g, t.TEXTURE_WRAP_S, e), t[i](g, t.TEXTURE_WRAP_T, n), t.TEXTURE_WRAP_R && t[i](g, t.TEXTURE_WRAP_R, r);
2655
2655
  }
2656
- if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, En[d]), n) {
2656
+ if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, Dn[d]), n) {
2657
2657
  if (!s || p !== "linear") {
2658
- let e = Tn[f][p];
2658
+ let e = En[f][p];
2659
2659
  t[i](g, t.TEXTURE_MIN_FILTER, e);
2660
2660
  }
2661
- } else t[i](g, t.TEXTURE_MIN_FILTER, En[f]);
2661
+ } else t[i](g, t.TEXTURE_MIN_FILTER, Dn[f]);
2662
2662
  if (r && m > 1) {
2663
2663
  let e = Math.min(m, t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
2664
2664
  t[i](g, r.TEXTURE_MAX_ANISOTROPY_EXT, e);
2665
2665
  }
2666
- h && t[i](g, t.TEXTURE_COMPARE_FUNC, Dn[h]);
2666
+ h && t[i](g, t.TEXTURE_COMPARE_FUNC, On[h]);
2667
2667
  }
2668
2668
  //#endregion
2669
2669
  //#region src/core/renderers/gl/texture/uploaders/index.ts
2670
- var An = {
2670
+ var jn = {
2671
2671
  buffer: {
2672
2672
  id: "buffer",
2673
2673
  upload: (e, t, n) => {
@@ -2681,8 +2681,8 @@ var An = {
2681
2681
  c < o || l < s ? ((i !== o || a !== s) && n.texImage2D(t.target, 0, t.internalFormat, o, s, 0, t.format, t.type, null), r === 2 ? n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, c, l, t.format, t.type, e.source) : n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, t.format, t.type, e.source)) : i === o && a === s ? n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, t.format, t.type, e.source) : r === 2 ? n.texImage2D(t.target, 0, t.internalFormat, o, s, 0, t.format, t.type, e.source) : n.texImage2D(t.target, 0, t.internalFormat, t.format, t.type, e.source), t.width = o, t.height = s;
2682
2682
  }
2683
2683
  }
2684
- }, jn = class extends j {
2685
- uploaders = { ...An };
2684
+ }, Mn = class extends j {
2685
+ uploaders = { ...jn };
2686
2686
  textures = /* @__PURE__ */ new Map();
2687
2687
  glTextures = /* @__PURE__ */ new Map();
2688
2688
  _mapFormatToInternalFormat = Object.create(null);
@@ -2697,14 +2697,14 @@ var An = {
2697
2697
  super.install(e), e.texture = this;
2698
2698
  }
2699
2699
  _updateContext(e) {
2700
- super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = Cn(e, this._renderer.extensions), this._mapFormatToType = wn(e), this._mapFormatToFormat = Sn(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2700
+ super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = wn(e, this._renderer.extensions), this._mapFormatToType = Tn(e), this._mapFormatToFormat = Cn(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2701
2701
  for (let e = 0; e < this.maxTextureImageUnits; e++) this.unbind(e);
2702
2702
  }
2703
2703
  getGlTexture(e) {
2704
2704
  return this.glTextures.get(e.instanceId) || this._createGlTexture(e);
2705
2705
  }
2706
2706
  _createGlTexture(e) {
2707
- let t = this._gl, n = new xn(t.createTexture());
2707
+ let t = this._gl, n = new Sn(t.createTexture());
2708
2708
  if (t.bindTexture(n.target, n.native), n.type = this._mapFormatToType[e.format], n.internalFormat = this._mapFormatToInternalFormat[e.format], n.format = this._mapFormatToFormat[e.format], this.glTextures.set(e.instanceId, n), e.mipmap && (this._renderer.supports.nonPowOf2mipmaps || e.isPowerOfTwo)) {
2709
2709
  let t = Math.max(e.width, e.height);
2710
2710
  e.mipLevelCount = Math.floor(Math.log2(t)) + 1;
@@ -2764,7 +2764,7 @@ var An = {
2764
2764
  }
2765
2765
  updateStyle(e, t = !1) {
2766
2766
  let n = this._gl;
2767
- kn(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2767
+ An(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2768
2768
  }
2769
2769
  updateGpuTexture(e) {
2770
2770
  this.bind(e);
@@ -2779,7 +2779,7 @@ var An = {
2779
2779
  let e = this._gl;
2780
2780
  this._renderer.contextLost || this.glTextures.forEach((t) => e.deleteTexture(t.native)), this.textures.clear(), this.glTextures.clear(), this._location = 0, this.current.length = 0, this._premultiplyAlpha = !1, this._renderer.contextLost || e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiplyAlpha);
2781
2781
  }
2782
- }, Mn = {
2782
+ }, Nn = {
2783
2783
  uint8x2: N.UNSIGNED_BYTE,
2784
2784
  uint8x4: N.UNSIGNED_BYTE,
2785
2785
  sint8x2: N.BYTE,
@@ -2811,18 +2811,18 @@ var An = {
2811
2811
  sint32x3: N.INT,
2812
2812
  sint32x4: N.INT
2813
2813
  };
2814
- function Nn(e) {
2815
- return Mn[e] ?? Mn.float32;
2814
+ function Pn(e) {
2815
+ return Nn[e] ?? Nn.float32;
2816
2816
  }
2817
2817
  //#endregion
2818
2818
  //#region src/core/renderers/gl/geometry/GlGeometrySystem.ts
2819
- var Pn = {
2819
+ var Fn = {
2820
2820
  "point-list": 0,
2821
2821
  "line-list": 1,
2822
2822
  "line-strip": 3,
2823
2823
  "triangle-list": 4,
2824
2824
  "triangle-strip": 5
2825
- }, Fn = class extends j {
2825
+ }, In = class extends j {
2826
2826
  _geometryVaoHash = {};
2827
2827
  hasInstance = !1;
2828
2828
  current = null;
@@ -2861,11 +2861,11 @@ var Pn = {
2861
2861
  }
2862
2862
  for (let e in r) {
2863
2863
  let t = r[e];
2864
- i[t.buffer.instanceId] += Jt(t.format).stride;
2864
+ i[t.buffer.instanceId] += Yt(t.format).stride;
2865
2865
  }
2866
2866
  for (let e in r) {
2867
2867
  let t = r[e];
2868
- t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += Jt(t.format).stride;
2868
+ t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += Yt(t.format).stride;
2869
2869
  }
2870
2870
  }
2871
2871
  _createVao(e, t) {
@@ -2900,7 +2900,7 @@ var Pn = {
2900
2900
  a !== c && (r.bind(s), a = c);
2901
2901
  let e = l.location;
2902
2902
  n.enableVertexAttribArray(e);
2903
- let t = Jt(o.format), i = Nn(o.format);
2903
+ let t = Yt(o.format), i = Pn(o.format);
2904
2904
  if (l.format?.substring(1, 4) === "int" ? n.vertexAttribIPointer(e, t.size, i, o.stride ?? 0, o.start ?? 0) : n.vertexAttribPointer(e, t.size, i, t.normalized, o.stride ?? 0, o.start ?? 0), o.instance) if (this.hasInstance) {
2905
2905
  let t = o.divisor ?? 1;
2906
2906
  n.vertexAttribDivisor(e, t);
@@ -2933,7 +2933,7 @@ var Pn = {
2933
2933
  let { topology: t, size: n, start: r = 0, instanceCount: i } = e, { gl: a } = this._renderer, o = this.current;
2934
2934
  if (!o) return this;
2935
2935
  t = t || o.topology || "triangle-list";
2936
- let s = Pn[t];
2936
+ let s = Fn[t];
2937
2937
  if (i = i || o.instanceCount || 1, o.indexBuffer) {
2938
2938
  n ||= o.indexBuffer.data.length;
2939
2939
  let e = o.indexBuffer.data.BYTES_PER_ELEMENT, t = e === 2 ? a.UNSIGNED_SHORT : a.UNSIGNED_INT;
@@ -2954,7 +2954,7 @@ var Pn = {
2954
2954
  }
2955
2955
  this._geometryVaoHash = {}, this.current = null, this.currentVao = null;
2956
2956
  }
2957
- }, In = class extends j {
2957
+ }, Ln = class extends j {
2958
2958
  install(e) {
2959
2959
  super.install(e), e.colorMask = this;
2960
2960
  }
@@ -2965,19 +2965,19 @@ var Pn = {
2965
2965
  };
2966
2966
  //#endregion
2967
2967
  //#region src/core/renderers/gl/GlScissorSystem.ts
2968
- function Ln(e, t, n) {
2968
+ function Rn(e, t, n) {
2969
2969
  let [r, i, a, o, s, c, l, u, d] = e, f = r * t + o * n + l, p = i * t + s * n + u, m = a * t + c * n + d;
2970
2970
  return {
2971
2971
  x: f / m,
2972
2972
  y: p / m
2973
2973
  };
2974
2974
  }
2975
- function Rn(e, t) {
2975
+ function zn(e, t) {
2976
2976
  let { x: n, y: r, width: i, height: a } = t, o = [
2977
- Ln(e, n, r),
2978
- Ln(e, n + i, r),
2979
- Ln(e, n + i, r + a),
2980
- Ln(e, n, r + a)
2977
+ Rn(e, n, r),
2978
+ Rn(e, n + i, r),
2979
+ Rn(e, n + i, r + a),
2980
+ Rn(e, n, r + a)
2981
2981
  ], s = o.map((e) => e.x), c = o.map((e) => e.y), l = Math.min(...s), u = Math.max(...s), d = Math.min(...c), f = Math.max(...c);
2982
2982
  return {
2983
2983
  x: l,
@@ -2986,7 +2986,7 @@ function Rn(e, t) {
2986
2986
  height: f - d
2987
2987
  };
2988
2988
  }
2989
- var zn = class extends j {
2989
+ var Bn = class extends j {
2990
2990
  install(e) {
2991
2991
  super.install(e), e.scissor = this;
2992
2992
  }
@@ -3013,28 +3013,28 @@ var zn = class extends j {
3013
3013
  bind(e) {
3014
3014
  let t = this._gl;
3015
3015
  if (e) {
3016
- let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = Rn(i, e), l = r.current.height / n - (o + c);
3016
+ let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = zn(i, e), l = r.current.height / n - (o + c);
3017
3017
  t.scissor(a * n, l * n, s * n, c * n);
3018
3018
  } else t.disable(t.SCISSOR_TEST);
3019
3019
  }
3020
3020
  destroy() {
3021
3021
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
3022
3022
  }
3023
- }, Bn = class extends Ot {
3023
+ }, Vn = class extends kt {
3024
3024
  contextLost = !1;
3025
3025
  _systems = [
3026
- new jn(),
3027
- new Pt(),
3028
- new tn(),
3029
- new Fn(),
3030
- new vn(),
3031
- new cn(),
3032
- new pn(),
3026
+ new Mn(),
3027
+ new Ft(),
3028
+ new nn(),
3033
3029
  new In(),
3034
- new hn(),
3035
- new zn(),
3030
+ new yn(),
3036
3031
  new ln(),
3037
- new gn()
3032
+ new mn(),
3033
+ new Ln(),
3034
+ new gn(),
3035
+ new Bn(),
3036
+ new un(),
3037
+ new _n()
3038
3038
  ];
3039
3039
  bindPoints = /* @__PURE__ */ new Map();
3040
3040
  supports = {
@@ -3046,13 +3046,13 @@ var zn = class extends j {
3046
3046
  msaa: !0,
3047
3047
  nonPowOf2mipmaps: !0
3048
3048
  };
3049
- constructor(e = S(), t) {
3049
+ constructor(e = w(), t) {
3050
3050
  if (super(), !e) throw Error("Failed to createHTMLCanvas");
3051
- $e(e) ? this._setupContext(e, t) : (this.gl = e, this.version = et(this.gl) ? 2 : 1), this._setupBindPoints()._setupExtensions()._setupPolyfill()._setupSupports(), this._systems.forEach((e) => e.install(this)), this._systems.forEach((e) => e.emit("updateContext", this.gl)), this._systems.forEach((e) => e.emit("setup"));
3051
+ Qe(e) ? this._setupContext(e, t) : (this.gl = e, this.version = $e(this.gl) ? 2 : 1), this._setupBindPoints()._setupExtensions()._setupPolyfill()._setupSupports(), this._systems.forEach((e) => e.install(this)), this._systems.forEach((e) => e.emit("updateContext", this.gl)), this._systems.forEach((e) => e.emit("setup"));
3052
3052
  }
3053
3053
  _setupContext(e, t) {
3054
3054
  this.view = e;
3055
- let n = ot()?.(e, t), r = n && et(n) ? 2 : 1;
3055
+ let n = at()?.(e, t), r = n && $e(n) ? 2 : 1;
3056
3056
  if (n || (n = e.getContext("webgl2", t) || e.getContext("experimental-webgl2", t), r = 2), n || (n = e.getContext("webgl", t) || e.getContext("experimental-webgl", t), r = 1), !n) throw Error("Unable to getContext");
3057
3057
  return this.gl = n, this.version = r, this._contextLost = this._contextLost.bind(this), this._contextRestored = this._contextRestored.bind(this), typeof e.addEventListener == "function" && (e.addEventListener("webglcontextlost", this._contextLost, !1), e.addEventListener("webglcontextrestored", this._contextRestored, !1)), this;
3058
3058
  }
@@ -3128,8 +3128,8 @@ var zn = class extends j {
3128
3128
  height: this.screen.height * this.pixelRatio
3129
3129
  });
3130
3130
  }
3131
- clear(e = fn.all) {
3132
- typeof e == "boolean" && (e = e ? fn.all : fn.none), e && this.gl.clear(e);
3131
+ clear(e = pn.all) {
3132
+ typeof e == "boolean" && (e = e ? pn.all : pn.none), e && this.gl.clear(e);
3133
3133
  }
3134
3134
  reset() {
3135
3135
  this._systems.forEach((e) => e.reset());
@@ -3146,7 +3146,7 @@ var zn = class extends j {
3146
3146
  for (let e = 0; e < i; e += a) c.set(s.subarray(e, e + a), o - e);
3147
3147
  return c;
3148
3148
  }
3149
- }, Vn = class {}, Hn = class extends Vn {
3149
+ }, Hn = class {}, Un = class extends Hn {
3150
3150
  install(e) {
3151
3151
  let t = async (e) => {
3152
3152
  let { parseFont: t } = await import("modern-font");
@@ -3160,15 +3160,15 @@ var zn = class extends j {
3160
3160
  e.register(n, t);
3161
3161
  }), e.font = this, this;
3162
3162
  }
3163
- }, Un = class extends w {
3163
+ }, Wn = class extends E {
3164
3164
  constructor(e) {
3165
3165
  super(), this.setProperties(e);
3166
3166
  }
3167
3167
  };
3168
- k([_({ fallback: A.index }), O("design:type", A === void 0 ? Object : A)], Un.prototype, "usage", void 0), k([_({ default: () => new Uint32Array() }), O("design:type", Object)], Un.prototype, "data", void 0);
3168
+ k([_({ fallback: A.index }), O("design:type", A === void 0 ? Object : A)], Wn.prototype, "usage", void 0), k([_({ default: () => new Uint32Array() }), O("design:type", Object)], Wn.prototype, "data", void 0);
3169
3169
  //#endregion
3170
3170
  //#region src/scene/resources/geometries/Geometry.ts
3171
- var Wn = class extends w {
3171
+ var Gn = class extends E {
3172
3172
  constructor(e = {}) {
3173
3173
  super(), this.setProperties(e);
3174
3174
  }
@@ -3176,10 +3176,10 @@ var Wn = class extends w {
3176
3176
  e.flush(), t.activate(e, n), e.geometry.bind(this, t.glProgram), e.geometry.draw(), e.geometry.unbind();
3177
3177
  }
3178
3178
  };
3179
- k([_({ fallback: "triangle-list" }), O("design:type", Object)], Wn.prototype, "topology", void 0), k([_({ default: () => ({}) }), O("design:type", typeof Record > "u" ? Object : Record)], Wn.prototype, "attributes", void 0), k([_({ default: () => new Un() }), O("design:type", Un === void 0 ? Object : Un)], Wn.prototype, "indexBuffer", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Wn.prototype, "instanceCount", void 0);
3179
+ k([_({ fallback: "triangle-list" }), O("design:type", Object)], Gn.prototype, "topology", void 0), k([_({ default: () => ({}) }), O("design:type", typeof Record > "u" ? Object : Record)], Gn.prototype, "attributes", void 0), k([_({ default: () => new Wn() }), O("design:type", Wn === void 0 ? Object : Wn)], Gn.prototype, "indexBuffer", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Gn.prototype, "instanceCount", void 0);
3180
3180
  //#endregion
3181
3181
  //#region src/scene/resources/geometries/VertexBuffer.ts
3182
- var P = class extends w {
3182
+ var P = class extends E {
3183
3183
  constructor(e) {
3184
3184
  super(), this.setProperties(e);
3185
3185
  }
@@ -3187,7 +3187,7 @@ var P = class extends w {
3187
3187
  k([_({ fallback: A.vertex }), O("design:type", A === void 0 ? Object : A)], P.prototype, "usage", void 0), k([_({ default: () => new Float32Array() }), O("design:type", Object)], P.prototype, "data", void 0);
3188
3188
  //#endregion
3189
3189
  //#region src/scene/resources/geometries/VertexAttribute.ts
3190
- var F = class extends w {
3190
+ var F = class extends E {
3191
3191
  constructor(e) {
3192
3192
  super(), this.setProperties(e);
3193
3193
  }
@@ -3195,7 +3195,7 @@ var F = class extends w {
3195
3195
  k([_({ default: () => new P() }), O("design:type", P === void 0 ? Object : P)], F.prototype, "buffer", void 0), k([_({ fallback: "float32" }), O("design:type", Object)], F.prototype, "format", void 0), k([_(), O("design:type", Boolean)], F.prototype, "instance", void 0), k([_(), O("design:type", Number)], F.prototype, "stride", void 0), k([_(), O("design:type", Number)], F.prototype, "offset", void 0), k([_(), O("design:type", Number)], F.prototype, "start", void 0), k([_(), O("design:type", Number)], F.prototype, "divisor", void 0);
3196
3196
  //#endregion
3197
3197
  //#region src/scene/resources/geometries/QuadGeometry.ts
3198
- var Gn = class extends Wn {
3198
+ var Kn = class extends Gn {
3199
3199
  constructor() {
3200
3200
  super({
3201
3201
  topology: "triangle-strip",
@@ -3212,7 +3212,7 @@ var Gn = class extends Wn {
3212
3212
  1
3213
3213
  ]) })
3214
3214
  }) },
3215
- indexBuffer: new Un({ data: new Uint32Array([
3215
+ indexBuffer: new Wn({ data: new Uint32Array([
3216
3216
  0,
3217
3217
  1,
3218
3218
  3,
@@ -3223,7 +3223,7 @@ var Gn = class extends Wn {
3223
3223
  };
3224
3224
  //#endregion
3225
3225
  //#region src/scene/resources/materials/Material.ts
3226
- function Kn() {
3226
+ function qn() {
3227
3227
  return {
3228
3228
  projectionMatrix: new Float32Array([
3229
3229
  1,
@@ -3255,13 +3255,13 @@ function Kn() {
3255
3255
  ])
3256
3256
  };
3257
3257
  }
3258
- var I = class extends w {
3258
+ var I = class extends E {
3259
3259
  static instance = new this();
3260
3260
  glProgram;
3261
3261
  constructor(e = {}) {
3262
3262
  super();
3263
3263
  let { uniforms: t, gl: n } = e;
3264
- t && (this.uniforms = t), this.glProgram = new Kt({
3264
+ t && (this.uniforms = t), this.glProgram = new qt({
3265
3265
  vertex: "in vec2 position;\nuniform mat3 projectionMatrix;\nuniform mat3 modelViewMatrix;\nvoid main(void) {\n gl_Position = vec4((projectionMatrix * modelViewMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}",
3266
3266
  fragment: "uniform vec4 tint;\nvoid main(void) {\n gl_FragColor = tint;\n}",
3267
3267
  ...n
@@ -3274,13 +3274,13 @@ var I = class extends w {
3274
3274
  }, e.shader.updateUniforms(this);
3275
3275
  }
3276
3276
  };
3277
- k([_({ default: Kn }), O("design:type", typeof Record > "u" ? Object : Record)], I.prototype, "uniforms", void 0);
3277
+ k([_({ default: qn }), O("design:type", typeof Record > "u" ? Object : Record)], I.prototype, "uniforms", void 0);
3278
3278
  //#endregion
3279
3279
  //#region src/scene/resources/materials/EffectMaterial.ts
3280
- var qn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Jn = /vec(\d)\((.*)\)/;
3281
- function Yn(e) {
3280
+ var Jn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Yn = /vec(\d)\((.*)\)/;
3281
+ function Xn(e) {
3282
3282
  e = e.trim();
3283
- let t = e.match(Jn);
3283
+ let t = e.match(Yn);
3284
3284
  if (t) {
3285
3285
  let e = Array.from({ length: Number(t[1]) }, () => 0);
3286
3286
  return t[2].split(",").forEach((t, n) => {
@@ -3289,7 +3289,7 @@ function Yn(e) {
3289
3289
  }
3290
3290
  return Number(e);
3291
3291
  }
3292
- var Xn = class e extends I {
3292
+ var Zn = class e extends I {
3293
3293
  static RE = {
3294
3294
  getColor: /\sgetColor\s*\(/,
3295
3295
  getFromColor: /\sgetFromColor\s*\(/,
@@ -3325,12 +3325,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3325
3325
  progress: 0
3326
3326
  }
3327
3327
  }), this.has = n;
3328
- let r = t.matchAll(qn);
3328
+ let r = t.matchAll(Jn);
3329
3329
  for (let e of r) e[1] && e[2] && e[1].split(",").forEach((t) => {
3330
- this.uniforms[t.trim()] = Yn(e[2]);
3330
+ this.uniforms[t.trim()] = Xn(e[2]);
3331
3331
  });
3332
3332
  }
3333
- }, Zn = class extends I {
3333
+ }, Qn = class extends I {
3334
3334
  static _instance;
3335
3335
  static get instance() {
3336
3336
  return this._instance ??= new this();
@@ -3374,12 +3374,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3374
3374
  }
3375
3375
  });
3376
3376
  }
3377
- }, L = class extends Wn {
3377
+ }, L = class extends Gn {
3378
3378
  static _instance;
3379
3379
  static get instance() {
3380
3380
  return this._instance ??= new this();
3381
3381
  }
3382
- static draw(e, t = Zn.instance, n) {
3382
+ static draw(e, t = Qn.instance, n) {
3383
3383
  this.instance.draw(e, t, n);
3384
3384
  }
3385
3385
  constructor() {
@@ -3412,7 +3412,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3412
3412
  ]) })
3413
3413
  })
3414
3414
  },
3415
- indexBuffer: new Un({ data: new Uint32Array([
3415
+ indexBuffer: new Wn({ data: new Uint32Array([
3416
3416
  0,
3417
3417
  1,
3418
3418
  2,
@@ -3422,7 +3422,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3422
3422
  ]) })
3423
3423
  });
3424
3424
  }
3425
- }, Qn = class extends Wn {
3425
+ }, $n = class extends Gn {
3426
3426
  positionBuffer;
3427
3427
  uvBuffer;
3428
3428
  constructor(e) {
@@ -3439,10 +3439,10 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3439
3439
  buffer: n
3440
3440
  })
3441
3441
  },
3442
- indexBuffer: new Un({ data: new Uint32Array() })
3442
+ indexBuffer: new Wn({ data: new Uint32Array() })
3443
3443
  }), this.positionBuffer = t, this.uvBuffer = n;
3444
3444
  }
3445
- }, R = class extends w {
3445
+ }, R = class extends E {
3446
3446
  get valid() {
3447
3447
  return !!(this.width && this.height);
3448
3448
  }
@@ -3459,7 +3459,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3459
3459
  k([_({ fallback: !1 }), O("design:type", Boolean)], R.prototype, "isRoot", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "x", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "y", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "height", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "mipLevel", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], R.prototype, "msaa", void 0), k([_({ default: () => [new z()] }), O("design:type", Array)], R.prototype, "colorTextures", void 0);
3460
3460
  //#endregion
3461
3461
  //#region src/scene/resources/textures/Texture2D.ts
3462
- var z = class extends w {
3462
+ var z = class extends E {
3463
3463
  static get EMPTY() {
3464
3464
  return new this({
3465
3465
  width: 1,
@@ -3550,7 +3550,7 @@ var z = class extends w {
3550
3550
  switch (super._updateProperty(e, t, n), e) {
3551
3551
  case "width":
3552
3552
  case "height":
3553
- this.isPowerOfTwo = we(this.pixelWidth) && we(this.pixelHeight);
3553
+ this.isPowerOfTwo = Ce(this.pixelWidth) && Ce(this.pixelHeight);
3554
3554
  break;
3555
3555
  case "source":
3556
3556
  this.updateSize();
@@ -3567,13 +3567,13 @@ var z = class extends w {
3567
3567
  e.texture.unbind(this);
3568
3568
  }
3569
3569
  _destroy() {
3570
- super._destroy(), Pe && this.source instanceof ImageBitmap && this.source.close();
3570
+ super._destroy(), Ne && this.source instanceof ImageBitmap && this.source.close();
3571
3571
  }
3572
3572
  };
3573
3573
  k([_({ fallback: "unknown" }), O("design:type", String)], z.prototype, "uploadMethodId", void 0), k([_({ internal: !0 }), O("design:type", Object)], z.prototype, "source", void 0), k([_({ fallback: 0 }), O("design:type", Number)], z.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], z.prototype, "height", void 0), k([_({ fallback: 1 }), O("design:type", Number)], z.prototype, "pixelRatio", void 0), k([_({ fallback: "bgra8unorm" }), O("design:type", Object)], z.prototype, "format", void 0), k([_({ fallback: "premultiply-alpha-on-upload" }), O("design:type", Object)], z.prototype, "alphaMode", void 0), k([_({ fallback: 1 }), O("design:type", Number)], z.prototype, "mipLevelCount", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], z.prototype, "mipmap", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeU", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeV", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeW", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "magFilter", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "minFilter", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "mipmapFilter", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], z.prototype, "isPowerOfTwo", void 0);
3574
3574
  //#endregion
3575
3575
  //#region src/scene/resources/textures/AnimatedTexture.ts
3576
- var $n = class extends w {
3576
+ var er = class extends E {
3577
3577
  frames;
3578
3578
  frameIndex = 0;
3579
3579
  get currentFrame() {
@@ -3598,12 +3598,12 @@ var $n = class extends w {
3598
3598
  e.texture.destroy();
3599
3599
  });
3600
3600
  }
3601
- }, er = class extends z {
3601
+ }, tr = class extends z {
3602
3602
  constructor(e = {}) {
3603
3603
  super({
3604
3604
  pixelRatio: 2,
3605
3605
  ...e,
3606
- source: e.source ?? S(),
3606
+ source: e.source ?? w(),
3607
3607
  uploadMethodId: "image"
3608
3608
  });
3609
3609
  }
@@ -3618,14 +3618,14 @@ var $n = class extends w {
3618
3618
  }
3619
3619
  super._updateProperty(e, t, n);
3620
3620
  }
3621
- }, tr = class e extends z {
3621
+ }, nr = class e extends z {
3622
3622
  static _cached = /* @__PURE__ */ new Map();
3623
3623
  static get(t) {
3624
- let n = new T(t), r = n.toHex(), i = this._cached.get(r);
3624
+ let n = new yt(t), r = n.toHex(), i = this._cached.get(r);
3625
3625
  return i || (i = new e(n), this._cached.set(r, i)), i;
3626
3626
  }
3627
3627
  constructor(e) {
3628
- let t = e instanceof T ? e : new T(e);
3628
+ let t = e instanceof yt ? e : new yt(e);
3629
3629
  super({
3630
3630
  width: 1,
3631
3631
  height: 1,
@@ -3639,14 +3639,14 @@ var $n = class extends w {
3639
3639
  mipmap: !0
3640
3640
  });
3641
3641
  }
3642
- }, nr = class e extends z {
3642
+ }, rr = class e extends z {
3643
3643
  static test(e) {
3644
3644
  return u(e);
3645
3645
  }
3646
3646
  static linearGradient(e, t, n) {
3647
3647
  let r = Number.isFinite(t) && t > 0, i = Number.isFinite(n) && n > 0, a = Number.isFinite(e.angle);
3648
3648
  t = r ? t : 1, n = i ? n : 1;
3649
- let o = S(t, n);
3649
+ let o = w(t, n);
3650
3650
  if (!o) throw Error("GradientTexture requires a canvas; call setCanvasFactory() in non-browser environments.");
3651
3651
  let s = o.getContext("2d");
3652
3652
  if (!s) throw Error("Failed to parse linear gradient, get canvas context is null.");
@@ -3673,7 +3673,7 @@ var $n = class extends w {
3673
3673
  constructor(t, n, r) {
3674
3674
  super(e.linearGradient(t, n, r));
3675
3675
  }
3676
- }, rr = class extends z {
3676
+ }, ir = class extends z {
3677
3677
  constructor(e = {}) {
3678
3678
  super({
3679
3679
  ...e,
@@ -3683,7 +3683,7 @@ var $n = class extends w {
3683
3683
  };
3684
3684
  //#endregion
3685
3685
  //#region src/scene/resources/textures/VideoTexture.ts
3686
- function ir(e) {
3686
+ function ar(e) {
3687
3687
  return {
3688
3688
  autoLoad: !!(e?.autoLoad ?? !0),
3689
3689
  autoPlay: !!(e?.autoPlay ?? !1),
@@ -3694,7 +3694,7 @@ function ir(e) {
3694
3694
  playsinline: !!(e?.playsinline ?? !0)
3695
3695
  };
3696
3696
  }
3697
- var ar = class e extends z {
3697
+ var or = class e extends z {
3698
3698
  static mimeTypes = new Map(Object.entries({
3699
3699
  ogv: "video/ogg",
3700
3700
  mov: "video/quicktime",
@@ -3728,13 +3728,13 @@ var ar = class e extends z {
3728
3728
  _reject;
3729
3729
  _seekResolves = [];
3730
3730
  constructor(t, n) {
3731
- let r = ir(n);
3732
- if (!Ze(t)) {
3731
+ let r = ar(n);
3732
+ if (!Xe(t)) {
3733
3733
  typeof t == "string" && (t = [t]);
3734
3734
  let n = t[0].src || t[0];
3735
3735
  if (typeof document > "u") throw TypeError("VideoTexture requires a DOM <video> element and is not supported in non-browser environments.");
3736
3736
  let i = document.createElement("video");
3737
- r.autoLoad && i.setAttribute("preload", "auto"), r.playsinline && (i.setAttribute("webkit-playsinline", ""), i.setAttribute("playsinline", "")), r.muted && (i.setAttribute("muted", ""), i.muted = !0), r.loop && i.setAttribute("loop", ""), r.autoPlay && i.setAttribute("autoplay", ""), ct(i, n, r.crossorigin);
3737
+ r.autoLoad && i.setAttribute("preload", "auto"), r.playsinline && (i.setAttribute("webkit-playsinline", ""), i.setAttribute("playsinline", "")), r.muted && (i.setAttribute("muted", ""), i.muted = !0), r.loop && i.setAttribute("loop", ""), r.autoPlay && i.setAttribute("autoplay", ""), st(i, n, r.crossorigin);
3738
3738
  for (let n = 0; n < t.length; ++n) {
3739
3739
  let { src: r, mime: a } = t[n];
3740
3740
  if (r ||= t[n], r.startsWith("data:")) a = r.slice(5, r.indexOf(";"));
@@ -3797,13 +3797,13 @@ var ar = class e extends z {
3797
3797
  });
3798
3798
  }
3799
3799
  _setupAutoUpdate() {
3800
- this.autoUpdate && this.isPlaying ? !this.fps && this.source.requestVideoFrameCallback ? (this._connected && (x.off(this.requestUpload), this._connected = !1, this._nextTime = 0), this._requestId === void 0 && (this._requestId = this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected || (x.on(this.requestUpload), this._connected = !0, this._nextTime = 0)) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected && (x.off(this.requestUpload), this._connected = !1, this._nextTime = 0));
3800
+ this.autoUpdate && this.isPlaying ? !this.fps && this.source.requestVideoFrameCallback ? (this._connected && (C.off(this.requestUpload), this._connected = !1, this._nextTime = 0), this._requestId === void 0 && (this._requestId = this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected || (C.on(this.requestUpload), this._connected = !0, this._nextTime = 0)) : (this._requestId !== void 0 && (this.source.cancelVideoFrameCallback(this._requestId), this._requestId = void 0), this._connected && (C.off(this.requestUpload), this._connected = !1, this._nextTime = 0));
3801
3801
  }
3802
3802
  _videoFrameRequestCallback = () => {
3803
3803
  this.requestUpload(), this._requestId = this.source.requestVideoFrameCallback(this._videoFrameRequestCallback);
3804
3804
  };
3805
3805
  requestUpload = () => {
3806
- let e = Math.floor(x.elapsed * this.source.playbackRate);
3806
+ let e = Math.floor(C.elapsed * this.source.playbackRate);
3807
3807
  this._nextTime -= e, (!this._spf || this._nextTime <= 0) && (this.requestUpdate("source"), this._nextTime = this._spf || 0);
3808
3808
  };
3809
3809
  async load() {
@@ -3824,13 +3824,13 @@ var ar = class e extends z {
3824
3824
  k([_({
3825
3825
  internal: !0,
3826
3826
  fallback: !0
3827
- }), O("design:type", Boolean)], ar.prototype, "autoUpdate", void 0), k([_({
3827
+ }), O("design:type", Boolean)], or.prototype, "autoUpdate", void 0), k([_({
3828
3828
  internal: !0,
3829
3829
  fallback: 0
3830
- }), O("design:type", Number)], ar.prototype, "fps", void 0);
3830
+ }), O("design:type", Number)], or.prototype, "fps", void 0);
3831
3831
  //#endregion
3832
3832
  //#region src/scene/resources/textures/ViewportTexture.ts
3833
- var or = class extends z {}, sr = class extends le {
3833
+ var sr = class extends z {}, cr = class extends v {
3834
3834
  fillStyle;
3835
3835
  fillRule;
3836
3836
  strokeStyle;
@@ -3844,7 +3844,7 @@ var or = class extends z {}, sr = class extends le {
3844
3844
  _draws = [];
3845
3845
  _triCache = [];
3846
3846
  _parseDrawStyle(e) {
3847
- return e ? e instanceof z ? { texture: e } : { texture: tr.get(e) } : {};
3847
+ return e ? e instanceof z ? { texture: e } : { texture: nr.get(e) } : {};
3848
3848
  }
3849
3849
  stroke(e) {
3850
3850
  if (!this.curves.length) return;
@@ -3861,7 +3861,7 @@ var or = class extends z {}, sr = class extends le {
3861
3861
  ...e,
3862
3862
  ...this._parseDrawStyle(n),
3863
3863
  type: "stroke",
3864
- path: new le(this),
3864
+ path: new v(this),
3865
3865
  transformUv: this.transformUv,
3866
3866
  transformVertex: this.transformVertex,
3867
3867
  lineStyle: {
@@ -3900,7 +3900,7 @@ var or = class extends z {}, sr = class extends le {
3900
3900
  l(this.style.fill) && (t = this.style.fill.color);
3901
3901
  break;
3902
3902
  }
3903
- let n = new le(this), r = this.fillRule ?? this.style.fillRule;
3903
+ let n = new v(this), r = this.fillRule ?? this.style.fillRule;
3904
3904
  r && (n.style.fillRule = r), this._draws.push({
3905
3905
  transformUv: this.transformUv,
3906
3906
  transformVertex: this.transformVertex,
@@ -3961,7 +3961,7 @@ var or = class extends z {}, sr = class extends le {
3961
3961
  destroy() {
3962
3962
  this.reset(), this._triCache.length = 0;
3963
3963
  }
3964
- }, cr = class {
3964
+ }, lr = class {
3965
3965
  front = [];
3966
3966
  default = [];
3967
3967
  back = [];
@@ -4004,7 +4004,7 @@ var or = class extends z {}, sr = class extends le {
4004
4004
  toJSON() {
4005
4005
  return [...this.default];
4006
4006
  }
4007
- }, lr = class extends C {
4007
+ }, ur = class extends T {
4008
4008
  parent;
4009
4009
  getPropertyDeclarations() {
4010
4010
  super.getPropertyDeclarations();
@@ -4023,22 +4023,22 @@ var or = class extends z {}, sr = class extends le {
4023
4023
  deleteProperty: (e, t) => Reflect.has(e, t) || String(t).startsWith("_") ? Reflect.deleteProperty(e, t) : (e.setProperty(String(t), void 0), !0)
4024
4024
  });
4025
4025
  }
4026
- }, ur, dr = {};
4027
- function fr(e) {
4028
- let t = dr[e] ?? 0;
4029
- return t++, dr[e] = t, t;
4026
+ }, dr, fr = {};
4027
+ function pr(e) {
4028
+ let t = fr[e] ?? 0;
4029
+ return t++, fr[e] = t, t;
4030
4030
  }
4031
- var B = ur = class extends C {
4031
+ var B = dr = class extends T {
4032
4032
  static parse(e, t = "Node") {
4033
4033
  if (Array.isArray(e)) return e.map((e) => this.parse(e));
4034
- let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ye.get(n ?? r.inCanvasIs ?? t)) ?? ur)({
4034
+ let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? dr)({
4035
4035
  ...a,
4036
4036
  meta: r
4037
4037
  });
4038
4038
  return i?.forEach((e) => o.appendChild(this.parse(e))), o;
4039
4039
  }
4040
4040
  _mask;
4041
- _meta = new lr(this);
4041
+ _meta = new ur(this);
4042
4042
  get meta() {
4043
4043
  return this._meta;
4044
4044
  }
@@ -4061,7 +4061,7 @@ var B = ur = class extends C {
4061
4061
  }).append(t), this.on("treeEnter", this._onTreeEnter).on("treeExit", this._onTreeExit).on("parented", this._onParented).on("unparented", this._onUnparented).on("ready", this._onReady).on("process", this._onProcess), this.updateProcessable(), this.updateRenderable();
4062
4062
  }
4063
4063
  _defaultName() {
4064
- return `@${this.is}@${fr(this.is)}`;
4064
+ return `@${this.is}@${pr(this.is)}`;
4065
4065
  }
4066
4066
  setProperties(e) {
4067
4067
  if (e) {
@@ -4128,7 +4128,7 @@ var B = ur = class extends C {
4128
4128
  }
4129
4129
  return this;
4130
4130
  }
4131
- _children = new cr();
4131
+ _children = new lr();
4132
4132
  get children() {
4133
4133
  return this._children.default;
4134
4134
  }
@@ -4288,7 +4288,7 @@ var B = ur = class extends C {
4288
4288
  append(...e) {
4289
4289
  let t;
4290
4290
  t = Array.isArray(e[0]) ? e[0] : e, t.forEach((e) => {
4291
- e instanceof ur ? this.appendChild(e) : this.appendChild(ur.parse(e));
4291
+ e instanceof dr ? this.appendChild(e) : this.appendChild(dr.parse(e));
4292
4292
  });
4293
4293
  }
4294
4294
  before(...e) {
@@ -4394,7 +4394,7 @@ var B = ur = class extends C {
4394
4394
  k([_({ default: () => c() }), O("design:type", String)], B.prototype, "id", void 0), k([_({ default: () => c() }), O("design:type", String)], B.prototype, "name", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], B.prototype, "processMode", void 0), k([_({ fallback: "default" }), O("design:type", Object)], B.prototype, "processSortMode", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], B.prototype, "renderMode", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], B.prototype, "inputMode", void 0), k([_({ fallback: "default" }), O("design:type", Object)], B.prototype, "internalMode", void 0), k([_({
4395
4395
  internal: !0,
4396
4396
  default: !0
4397
- }), O("design:type", Boolean)], B.prototype, "needsRender", void 0), B = ur = k([b("Node"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], B);
4397
+ }), O("design:type", Boolean)], B.prototype, "needsRender", void 0), B = dr = k([S("Node"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], B);
4398
4398
  //#endregion
4399
4399
  //#region src/scene/main/TimelineNode.ts
4400
4400
  var V = class extends B {
@@ -4433,7 +4433,7 @@ var V = class extends B {
4433
4433
  return this._globalStartTime + this._globalDuration;
4434
4434
  }
4435
4435
  get currentTimeProgress() {
4436
- return this._duration ? E(this._currentTime / this._duration, 0, 1) : 0;
4436
+ return this._duration ? St(this._currentTime / this._duration, 0, 1) : 0;
4437
4437
  }
4438
4438
  isInsideTimeRange() {
4439
4439
  let e = this._currentTime;
@@ -4479,18 +4479,18 @@ var V = class extends B {
4479
4479
  super._process(e), this._updateCurrentTime();
4480
4480
  }
4481
4481
  };
4482
- k([_({ fallback: !1 }), O("design:type", Boolean)], V.prototype, "loop", void 0), k([_({ fallback: 0 }), O("design:type", Number)], V.prototype, "delay", void 0), k([_({ fallback: 0 }), O("design:type", Number)], V.prototype, "duration", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], V.prototype, "paused", void 0), V = k([b("TimelineNode"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4482
+ k([_({ fallback: !1 }), O("design:type", Boolean)], V.prototype, "loop", void 0), k([_({ fallback: 0 }), O("design:type", Number)], V.prototype, "delay", void 0), k([_({ fallback: 0 }), O("design:type", Number)], V.prototype, "duration", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], V.prototype, "paused", void 0), V = k([S("TimelineNode"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4483
4483
  //#endregion
4484
4484
  //#region src/scene/main/CanvasItem.ts
4485
- var pr = [], mr = 0;
4486
- function hr() {
4487
- mr = 0;
4485
+ var mr = [], hr = 0;
4486
+ function gr() {
4487
+ hr = 0;
4488
4488
  }
4489
- function gr(e, t, n, r) {
4490
- let i = pr[mr];
4491
- return i || (i = {}, pr[mr] = i), mr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4489
+ function _r(e, t, n, r) {
4490
+ let i = mr[hr];
4491
+ return i || (i = {}, mr[hr] = i), hr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4492
4492
  }
4493
- var _r = class extends V {
4493
+ var vr = class extends V {
4494
4494
  _blendMode;
4495
4495
  _parentGlobalVisible;
4496
4496
  _globalVisible;
@@ -4508,7 +4508,7 @@ var _r = class extends V {
4508
4508
  255,
4509
4509
  255
4510
4510
  ];
4511
- context = new sr();
4511
+ context = new cr();
4512
4512
  _resetContext = !0;
4513
4513
  needsDraw = !0;
4514
4514
  needsLayout = !1;
@@ -4570,7 +4570,7 @@ var _r = class extends V {
4570
4570
  }
4571
4571
  _updateGlobalOpacity() {
4572
4572
  this._parentGlobalOpacity = this.getParent()?.opacity;
4573
- let e = E(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4573
+ let e = St(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4574
4574
  this._globalOpacity !== e && (this._globalOpacity = e, this._updateModulate(), this.requestPaint(), this.updateRenderable());
4575
4575
  }
4576
4576
  _draw() {
@@ -4622,7 +4622,7 @@ var _r = class extends V {
4622
4622
  _handleViewportTexture(e) {
4623
4623
  let t = this.tree?.getPreviousViewport();
4624
4624
  if (t && "getRect" in this) {
4625
- let { a: n, d: r, tx: i, ty: a } = t.canvasTransform, { vertices: o } = e, s = new v().scale(1 / t.width * n, -1 / t.height * r).translate(- -i / t.width, 1 + -a / t.height), c = new Float32Array(o.length);
4625
+ let { a: n, d: r, tx: i, ty: a } = t.canvasTransform, { vertices: o } = e, s = new b().scale(1 / t.width * n, -1 / t.height * r).translate(- -i / t.width, 1 + -a / t.height), c = new Float32Array(o.length);
4626
4626
  for (let e = o.length, t = 0; t < e; t += 2) {
4627
4627
  let { x: e, y: n } = s.apply({
4628
4628
  x: o[t],
@@ -4639,7 +4639,7 @@ var _r = class extends V {
4639
4639
  return;
4640
4640
  }
4641
4641
  let t = this._tree?.pixelate, n = this._tree?.roundPixels, r = this._batchables;
4642
- for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof or && (a = this._handleViewportTexture(i)), e.batch2D.render(gr(i, n, t ? i.size : void 0, a));
4642
+ for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof sr && (a = this._handleViewportTexture(i)), e.batch2D.render(_r(i, n, t ? i.size : void 0, a));
4643
4643
  super._render(e);
4644
4644
  }
4645
4645
  _cullsRender() {
@@ -4649,17 +4649,17 @@ var _r = class extends V {
4649
4649
  super._destroy(), this.context.destroy(), this._drawBatchables = [], this._layoutBatchables = [], this._batchables = [];
4650
4650
  }
4651
4651
  };
4652
- k([_(), O("design:type", Object)], _r.prototype, "blendMode", void 0), k([_({
4652
+ k([_(), O("design:type", Object)], vr.prototype, "blendMode", void 0), k([_({
4653
4653
  internal: !0,
4654
4654
  fallback: !0
4655
- }), O("design:type", Boolean)], _r.prototype, "visible", void 0), k([_({
4655
+ }), O("design:type", Boolean)], vr.prototype, "visible", void 0), k([_({
4656
4656
  internal: !0,
4657
4657
  fallback: 1
4658
- }), O("design:type", Number)], _r.prototype, "opacity", void 0), _r = k([b("CanvasItem"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _r);
4658
+ }), O("design:type", Number)], vr.prototype, "opacity", void 0), vr = k([S("CanvasItem"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], vr);
4659
4659
  //#endregion
4660
4660
  //#region src/scene/main/Viewport.ts
4661
4661
  var H = class extends B {
4662
- canvasTransform = new v();
4662
+ canvasTransform = new b();
4663
4663
  renderTargetIndex = 0;
4664
4664
  renderTargets = [new R(), new R()];
4665
4665
  get valid() {
@@ -4708,7 +4708,7 @@ var H = class extends B {
4708
4708
  return !1;
4709
4709
  }
4710
4710
  activateWithCopy(e, t) {
4711
- this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), L.draw(e, Zn.instance, { sampler: 0 }));
4711
+ this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), L.draw(e, Qn.instance, { sampler: 0 }));
4712
4712
  }
4713
4713
  renderStart(e, t) {
4714
4714
  this.activate(e, t) && e.clear();
@@ -4721,7 +4721,7 @@ var H = class extends B {
4721
4721
  this.renderStart(e), super.render(e, t), this.renderEnd(e, n);
4722
4722
  }
4723
4723
  getRect() {
4724
- return new yt(this.x, this.y, this.width, this.height);
4724
+ return new vt(this.x, this.y, this.width, this.height);
4725
4725
  }
4726
4726
  toCanvasGlobal(e, t) {
4727
4727
  return this.canvasTransform.applyAffineInverse(e, t);
@@ -4733,7 +4733,7 @@ var H = class extends B {
4733
4733
  super._destroy(), this.canvasTransform.destroy(), this.renderTargets.forEach((e) => e.destroy());
4734
4734
  }
4735
4735
  };
4736
- k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "x", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "y", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "height", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "mipLevel", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], H.prototype, "msaa", void 0), H = k([b("Viewport")], H);
4736
+ k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "x", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "y", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "height", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "mipLevel", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], H.prototype, "msaa", void 0), H = k([S("Viewport")], H);
4737
4737
  //#endregion
4738
4738
  //#region src/scene/main/Effect.ts
4739
4739
  var U = class extends V {
@@ -4759,7 +4759,7 @@ var U = class extends V {
4759
4759
  _updateProperty(e, t, n) {
4760
4760
  switch (super._updateProperty(e, t, n), e) {
4761
4761
  case "glsl": {
4762
- let e = new Xn(t);
4762
+ let e = new Zn(t);
4763
4763
  !this.effectMode && e.has.transition && (this.effectMode = "transition"), this.material = e;
4764
4764
  break;
4765
4765
  }
@@ -4794,7 +4794,7 @@ var U = class extends V {
4794
4794
  }
4795
4795
  }
4796
4796
  getRect() {
4797
- return new yt(this._rect);
4797
+ return new vt(this._rect);
4798
4798
  }
4799
4799
  _processParent() {
4800
4800
  let e = this._tree?.renderStack;
@@ -4964,10 +4964,10 @@ var U = class extends V {
4964
4964
  super._destroy(), this.viewport1.destroy(), this.viewport2.destroy();
4965
4965
  }
4966
4966
  };
4967
- k([_({ internal: !0 }), O("design:type", Object)], U.prototype, "material", void 0), k([_(), O("design:type", Object)], U.prototype, "effectMode", void 0), k([_(), O("design:type", String)], U.prototype, "glsl", void 0), k([_(), O("design:type", String)], U.prototype, "glslSrc", void 0), U = k([b("Effect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], U);
4967
+ k([_({ internal: !0 }), O("design:type", Object)], U.prototype, "material", void 0), k([_(), O("design:type", Object)], U.prototype, "effectMode", void 0), k([_(), O("design:type", String)], U.prototype, "glsl", void 0), k([_(), O("design:type", String)], U.prototype, "glslSrc", void 0), U = k([S("Effect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], U);
4968
4968
  //#endregion
4969
4969
  //#region src/scene/main/RenderStack.ts
4970
- var vr = class {
4970
+ var yr = class {
4971
4971
  currentCall;
4972
4972
  calls = [];
4973
4973
  createCall(e) {
@@ -4989,11 +4989,11 @@ var vr = class {
4989
4989
  });
4990
4990
  }), this.calls = [];
4991
4991
  }
4992
- }, yr, br = yr = class extends B {
4992
+ }, br, xr = br = class extends B {
4993
4993
  currentTime = 0;
4994
4994
  static from(e, t = !1) {
4995
4995
  let [n, r] = e ? Array.isArray(e) ? e : [0, e] : [];
4996
- return new yr({
4996
+ return new br({
4997
4997
  startTime: n,
4998
4998
  endTime: r,
4999
4999
  loop: t
@@ -5011,16 +5011,16 @@ var vr = class {
5011
5011
  }
5012
5012
  addTime(e) {
5013
5013
  let t = this.endTime, n = Math.min(this.startTime, this.endTime), r = this.currentTime;
5014
- return r += e, this.loop && r > t && (r = n + r % t), r = E(r, n, t), this.currentTime = r, this.emit("updateCurrentTime", r, e), this;
5014
+ return r += e, this.loop && r > t && (r = n + r % t), r = St(r, n, t), this.currentTime = r, this.emit("updateCurrentTime", r, e), this;
5015
5015
  }
5016
5016
  _process(e) {
5017
5017
  super._process(e), this.paused || this.addTime(e);
5018
5018
  }
5019
5019
  };
5020
- k([_({ fallback: 0 }), O("design:type", Number)], br.prototype, "startTime", void 0), k([_({ fallback: 2 ** 53 - 1 }), O("design:type", Number)], br.prototype, "endTime", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], br.prototype, "loop", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], br.prototype, "paused", void 0), br = yr = k([b("Timeline"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], br);
5020
+ k([_({ fallback: 0 }), O("design:type", Number)], xr.prototype, "startTime", void 0), k([_({ fallback: 2 ** 53 - 1 }), O("design:type", Number)], xr.prototype, "endTime", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], xr.prototype, "loop", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], xr.prototype, "paused", void 0), xr = br = k([S("Timeline"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], xr);
5021
5021
  //#endregion
5022
5022
  //#region src/scene/main/Window.ts
5023
- var xr = class extends H {
5023
+ var Sr = class extends H {
5024
5024
  constructor() {
5025
5025
  super(), this.renderTargets.forEach((e) => e.isRoot = !0);
5026
5026
  }
@@ -5031,22 +5031,22 @@ var xr = class extends H {
5031
5031
  super.flush(e), this.finish(e);
5032
5032
  }
5033
5033
  };
5034
- xr = k([b("Window", {
5034
+ Sr = k([S("Window", {
5035
5035
  processMode: "always",
5036
5036
  renderMode: "always"
5037
- }), O("design:paramtypes", [])], xr);
5037
+ }), O("design:paramtypes", [])], Sr);
5038
5038
  //#endregion
5039
5039
  //#region src/scene/main/SceneTree.ts
5040
- var Sr = class extends Tt {
5041
- input = new _t();
5042
- renderStack = new vr();
5043
- root = new xr().setTree(this);
5044
- timeline = new br().setTree(this);
5040
+ var Cr = class extends Et {
5041
+ input = new gt();
5042
+ renderStack = new yr();
5043
+ root = new Sr().setTree(this);
5044
+ timeline = new xr().setTree(this);
5045
5045
  nodeMap = /* @__PURE__ */ new Map();
5046
5046
  _boundFonts;
5047
5047
  _textRemeasureScheduled = !1;
5048
5048
  _onFontLoad = () => this._scheduleTextRemeasure();
5049
- _backgroundColor = new T();
5049
+ _backgroundColor = new yt();
5050
5050
  _previousViewport;
5051
5051
  _currentViewport;
5052
5052
  getPreviousViewport() {
@@ -5099,7 +5099,7 @@ var Sr = class extends Tt {
5099
5099
  this.timeline.emit("process", e), this.emit("processing"), this.root.emit("process", e), this.emit("processed");
5100
5100
  }
5101
5101
  _render(e) {
5102
- this.emit("rendering"), hr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5102
+ this.emit("rendering"), gr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5103
5103
  }
5104
5104
  _renderScreen(e) {
5105
5105
  this.root.finish(e), e.state.reset(), e.renderTarget.unbind(), this.backgroundColor && e.gl.clearColor(...this._backgroundColor.toArray()), e.clear(), this.backgroundColor && e.gl.clearColor(0, 0, 0, 0);
@@ -5110,42 +5110,42 @@ var Sr = class extends Tt {
5110
5110
  super._destroy(), this._bindFonts(void 0), this.root.destroy(), this.input.destroy(), this.nodeMap.clear();
5111
5111
  }
5112
5112
  };
5113
- k([_({ alias: "root.msaa" }), O("design:type", Boolean)], Sr.prototype, "msaa", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Sr.prototype, "pixelate", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Sr.prototype, "roundPixels", void 0), k([_(), O("design:type", Object)], Sr.prototype, "backgroundColor", void 0), k([_({
5113
+ k([_({ alias: "root.msaa" }), O("design:type", Boolean)], Cr.prototype, "msaa", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Cr.prototype, "pixelate", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Cr.prototype, "roundPixels", void 0), k([_(), O("design:type", Object)], Cr.prototype, "backgroundColor", void 0), k([_({
5114
5114
  internal: !0,
5115
5115
  fallback: !1
5116
- }), O("design:type", Boolean)], Sr.prototype, "debug", void 0), k([_({
5116
+ }), O("design:type", Boolean)], Cr.prototype, "debug", void 0), k([_({
5117
5117
  internal: !0,
5118
5118
  fallback: !1
5119
- }), O("design:type", Boolean)], Sr.prototype, "processPaused", void 0), k([_({
5119
+ }), O("design:type", Boolean)], Cr.prototype, "processPaused", void 0), k([_({
5120
5120
  internal: !0,
5121
- default: () => ge
5122
- }), O("design:type", Object)], Sr.prototype, "fonts", void 0);
5121
+ default: () => he
5122
+ }), O("design:type", Object)], Cr.prototype, "fonts", void 0);
5123
5123
  //#endregion
5124
5124
  //#region src/scene/main/Transition.ts
5125
- var Cr = class extends U {
5125
+ var wr = class extends U {
5126
5126
  constructor(e, t = []) {
5127
5127
  super(), this.setProperties(e).append(t);
5128
5128
  }
5129
5129
  };
5130
- Cr = k([b("Transition", {
5130
+ wr = k([S("Transition", {
5131
5131
  effectMode: "transition",
5132
5132
  duration: 2e3
5133
- }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Cr);
5133
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
5134
5134
  //#endregion
5135
5135
  //#region src/scene/2d/Node2D.ts
5136
- var wr = class extends _r {
5136
+ var Tr = class extends vr {
5137
5137
  rotation = 0;
5138
- position = new y(0, 0, () => this.updateGlobalTransform());
5139
- scale = new y(1, 1, () => this.updateGlobalTransform());
5140
- skew = new y(0, 0, () => this.updateGlobalTransform());
5141
- pivot = new y(0, 0, () => this.updateGlobalTransform());
5142
- extraTransform = new v();
5143
- transform = new v();
5144
- globalPosition = new y();
5138
+ position = new x(0, 0, () => this.updateGlobalTransform());
5139
+ scale = new x(1, 1, () => this.updateGlobalTransform());
5140
+ skew = new x(0, 0, () => this.updateGlobalTransform());
5141
+ pivot = new x(0, 0, () => this.updateGlobalTransform());
5142
+ extraTransform = new b();
5143
+ transform = new b();
5144
+ globalPosition = new x();
5145
5145
  globalRotation = 0;
5146
- globalScale = new y();
5147
- globalSkew = new y();
5148
- globalTransform = new v();
5146
+ globalScale = new x();
5147
+ globalSkew = new x();
5148
+ globalTransform = new b();
5149
5149
  parentTransformDirtyId;
5150
5150
  transformDirtyId = 0;
5151
5151
  constructor(e, t = []) {
@@ -5185,30 +5185,30 @@ var wr = class extends _r {
5185
5185
  super._destroy(), this.position.destroy(), this.scale.destroy(), this.skew.destroy(), this.pivot.destroy(), this.extraTransform.destroy(), this.transform.destroy(), this.globalPosition.destroy(), this.globalScale.destroy(), this.globalSkew.destroy(), this.globalTransform.destroy();
5186
5186
  }
5187
5187
  };
5188
- wr = k([b("Node2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
5188
+ Tr = k([S("Node2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Tr);
5189
5189
  //#endregion
5190
5190
  //#region src/scene/2d/Camera2D.ts
5191
- var Tr = class extends wr {
5192
- canvasTransform = new v();
5191
+ var Er = class extends Tr {
5192
+ canvasTransform = new b();
5193
5193
  _screenOffset = {
5194
5194
  x: 0,
5195
5195
  y: 0
5196
5196
  };
5197
- _zoom = new y(1, 1, () => this._updateTransform());
5197
+ _zoom = new x(1, 1, () => this._updateTransform());
5198
5198
  get zoom() {
5199
5199
  return this._zoom;
5200
5200
  }
5201
5201
  set zoom(e) {
5202
5202
  this._zoom.set(e.x, e.y);
5203
5203
  }
5204
- _minZoom = new y(.02, .02);
5204
+ _minZoom = new x(.02, .02);
5205
5205
  get minZoom() {
5206
5206
  return this._minZoom;
5207
5207
  }
5208
5208
  set minZoom(e) {
5209
5209
  this._minZoom.set(e.x, e.y);
5210
5210
  }
5211
- _maxZoom = new y(256, 256);
5211
+ _maxZoom = new x(256, 256);
5212
5212
  get maxZoom() {
5213
5213
  return this._maxZoom;
5214
5214
  }
@@ -5229,7 +5229,7 @@ var Tr = class extends wr {
5229
5229
  return this.setZoom(this._zoom.x + e, this._zoom.y + t);
5230
5230
  }
5231
5231
  setZoom(e, t = e) {
5232
- return this._zoom.set(E(e, this._minZoom.x, this._maxZoom.x), E(t, this._minZoom.y, this._maxZoom.y)), this;
5232
+ return this._zoom.set(St(e, this._minZoom.x, this._maxZoom.x), St(t, this._minZoom.y, this._maxZoom.y)), this;
5233
5233
  }
5234
5234
  setZoomAtOrigin(e, t, n) {
5235
5235
  let r;
@@ -5302,7 +5302,7 @@ var Tr = class extends wr {
5302
5302
  });
5303
5303
  }
5304
5304
  _getZoomByWheel(e, t) {
5305
- let n = e.ctrlKey && Je ? 10 : 1, r = -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * n, i = Math.log(t) + r;
5305
+ let n = e.ctrlKey && qe ? 10 : 1, r = -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * n, i = Math.log(t) + r;
5306
5306
  return Math.round(Math.exp(i) * 1e4) / 1e4;
5307
5307
  }
5308
5308
  _updateTransform() {
@@ -5335,16 +5335,16 @@ var Tr = class extends wr {
5335
5335
  k([_({
5336
5336
  internal: !0,
5337
5337
  fallback: !1
5338
- }), O("design:type", Boolean)], Tr.prototype, "spaceKey", void 0), k([_({
5338
+ }), O("design:type", Boolean)], Er.prototype, "spaceKey", void 0), k([_({
5339
5339
  internal: !0,
5340
5340
  fallback: !1
5341
- }), O("design:type", Boolean)], Tr.prototype, "grabbing", void 0), Tr = k([b("Camera2D", {
5341
+ }), O("design:type", Boolean)], Er.prototype, "grabbing", void 0), Er = k([S("Camera2D", {
5342
5342
  processMode: "disabled",
5343
5343
  renderMode: "disabled"
5344
- }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Tr);
5344
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Er);
5345
5345
  //#endregion
5346
5346
  //#region src/scene/2d/element/connectionRouter.ts
5347
- function Er(e, t) {
5347
+ function Dr(e, t) {
5348
5348
  return Math.abs(e) >= Math.abs(t) ? {
5349
5349
  x: Math.sign(e) || 1,
5350
5350
  y: 0
@@ -5353,11 +5353,11 @@ function Er(e, t) {
5353
5353
  y: Math.sign(t) || 1
5354
5354
  };
5355
5355
  }
5356
- function Dr(e, t, n, r = {}) {
5357
- let i = t.point, a = n.point, o = new le();
5356
+ function Or(e, t, n, r = {}) {
5357
+ let i = t.point, a = n.point, o = new v();
5358
5358
  switch (e) {
5359
5359
  case "curved": {
5360
- let e = t.dir ?? Er(a.x - i.x, a.y - i.y), s = n.dir ?? Er(i.x - a.x, i.y - a.y), c = a.x - i.x, l = a.y - i.y, u = Math.hypot(c, l) || 1, d = c / u, f = l / u, p = Math.max((r.stub ?? 16) * 2, u * .4), m = (e, t, n, r) => Math.max(.1, (1 + e * n + t * r) / 2), h = p * m(e.x, e.y, d, f), g = p * m(s.x, s.y, -d, -f), ee = i.x + e.x * h, te = i.y + e.y * h, ne = a.x + s.x * g, re = a.y + s.y * g;
5360
+ let e = t.dir ?? Dr(a.x - i.x, a.y - i.y), s = n.dir ?? Dr(i.x - a.x, i.y - a.y), c = a.x - i.x, l = a.y - i.y, u = Math.hypot(c, l) || 1, d = c / u, f = l / u, p = Math.max((r.stub ?? 16) * 2, u * .4), m = (e, t, n, r) => Math.max(.1, (1 + e * n + t * r) / 2), h = p * m(e.x, e.y, d, f), g = p * m(s.x, s.y, -d, -f), ee = i.x + e.x * h, te = i.y + e.y * h, ne = a.x + s.x * g, re = a.y + s.y * g;
5361
5361
  for (let e = 0; e <= 32; e++) {
5362
5362
  let t = e / 32, n = 1 - t, r = n * n * n, s = 3 * n * n * t, c = 3 * n * t * t, l = t * t * t, u = r * i.x + s * ee + c * ne + l * a.x, d = r * i.y + s * te + c * re + l * a.y;
5363
5363
  e === 0 ? o.moveTo(u, d) : o.lineTo(u, d);
@@ -5365,7 +5365,7 @@ function Dr(e, t, n, r = {}) {
5365
5365
  break;
5366
5366
  }
5367
5367
  case "orthogonal": {
5368
- let e = kr(t, n, r);
5368
+ let e = Ar(t, n, r);
5369
5369
  for (let t = 0; t < e.length; t++) t === 0 ? o.moveTo(e[t].x, e[t].y) : o.lineTo(e[t].x, e[t].y);
5370
5370
  break;
5371
5371
  }
@@ -5375,11 +5375,11 @@ function Dr(e, t, n, r = {}) {
5375
5375
  }
5376
5376
  return o;
5377
5377
  }
5378
- function Or(e) {
5379
- return Er(e.x, e.y);
5378
+ function kr(e) {
5379
+ return Dr(e.x, e.y);
5380
5380
  }
5381
- function kr(e, t, n) {
5382
- let r = e.point, i = t.point, a = n.stub ?? 16, o = Or(e.dir ?? Er(i.x - r.x, i.y - r.y)), s = Or(t.dir ?? Er(r.x - i.x, r.y - i.y)), c = {
5381
+ function Ar(e, t, n) {
5382
+ let r = e.point, i = t.point, a = n.stub ?? 16, o = kr(e.dir ?? Dr(i.x - r.x, i.y - r.y)), s = kr(t.dir ?? Dr(r.x - i.x, r.y - i.y)), c = {
5383
5383
  x: r.x + o.x * a,
5384
5384
  y: r.y + o.y * a
5385
5385
  }, l = {
@@ -5391,12 +5391,12 @@ function kr(e, t, n) {
5391
5391
  x: r.x,
5392
5392
  y: r.y
5393
5393
  }, c];
5394
- return d.push(...jr(c, o, l, s, a, u)), d.push(l, {
5394
+ return d.push(...Mr(c, o, l, s, a, u)), d.push(l, {
5395
5395
  x: i.x,
5396
5396
  y: i.y
5397
- }), Mr(d);
5397
+ }), Nr(d);
5398
5398
  }
5399
- function Ar(e, t, n, r, i) {
5399
+ function jr(e, t, n, r, i) {
5400
5400
  let a = Infinity, o = -Infinity, s = t === "y" ? "x" : "y";
5401
5401
  for (let e of r) {
5402
5402
  let r = e.min[s], i = r + e.size[s];
@@ -5407,7 +5407,7 @@ function Ar(e, t, n, r, i) {
5407
5407
  }
5408
5408
  return e > a && e < o ? a - i : e;
5409
5409
  }
5410
- function jr(e, t, n, r, i, a = []) {
5410
+ function Mr(e, t, n, r, i, a = []) {
5411
5411
  let o = t.y === 0;
5412
5412
  if (o === (r.y === 0)) {
5413
5413
  if (o) {
@@ -5422,7 +5422,7 @@ function jr(e, t, n, r, i, a = []) {
5422
5422
  }];
5423
5423
  }
5424
5424
  let o = Math.abs(e.y - n.y) < .001 ? e.y + i : (e.y + n.y) / 2;
5425
- return o = Ar(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5425
+ return o = jr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5426
5426
  x: e.x,
5427
5427
  y: o
5428
5428
  }, {
@@ -5441,7 +5441,7 @@ function jr(e, t, n, r, i, a = []) {
5441
5441
  }];
5442
5442
  }
5443
5443
  let s = Math.abs(e.x - n.x) < .001 ? e.x + i : (e.x + n.x) / 2;
5444
- return s = Ar(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5444
+ return s = jr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5445
5445
  x: s,
5446
5446
  y: e.y
5447
5447
  }, {
@@ -5468,7 +5468,7 @@ function jr(e, t, n, r, i, a = []) {
5468
5468
  y: l.y
5469
5469
  }];
5470
5470
  }
5471
- function Mr(e) {
5471
+ function Nr(e) {
5472
5472
  let t = [];
5473
5473
  for (let n = 0; n < e.length; n++) {
5474
5474
  let r = e[n], i = t[t.length - 1];
@@ -5478,7 +5478,7 @@ function Mr(e) {
5478
5478
  }
5479
5479
  //#endregion
5480
5480
  //#region src/css/parseCssFilter.ts
5481
- var Nr = {
5481
+ var Pr = {
5482
5482
  brightness: 1,
5483
5483
  contrast: 1,
5484
5484
  grayscale: 0,
@@ -5488,18 +5488,18 @@ var Nr = {
5488
5488
  saturate: 1,
5489
5489
  sepia: 0
5490
5490
  };
5491
- function Pr(e) {
5492
- let t = new St();
5491
+ function Fr(e) {
5492
+ let t = new Ct();
5493
5493
  if (e === "none") return t;
5494
- let n = Ae(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5495
- Object.keys(Nr).forEach((e) => {
5496
- n[e] = n[e] ?? Nr[e];
5494
+ let n = ke(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5495
+ Object.keys(Pr).forEach((e) => {
5496
+ n[e] = n[e] ?? Pr[e];
5497
5497
  });
5498
5498
  for (let e in n) {
5499
5499
  let r = n[e];
5500
5500
  switch (e) {
5501
5501
  case "hue-rotate":
5502
- t.hueRotate(r * Ce);
5502
+ t.hueRotate(r * Se);
5503
5503
  break;
5504
5504
  case "saturate":
5505
5505
  t.saturate(r);
@@ -5528,7 +5528,7 @@ function Pr(e) {
5528
5528
  }
5529
5529
  //#endregion
5530
5530
  //#region src/css/parseCssTransformOrigin.ts
5531
- function Fr(e) {
5531
+ function Ir(e) {
5532
5532
  let [t, n = t] = e.split(" ");
5533
5533
  return [t, n].map((e) => {
5534
5534
  switch (e = e.trim(), e) {
@@ -5543,9 +5543,9 @@ function Fr(e) {
5543
5543
  }
5544
5544
  //#endregion
5545
5545
  //#region src/scene/effects/ColorAdjustEffect.ts
5546
- var Ir, W = class extends U {
5546
+ var Lr, W = class extends U {
5547
5547
  static {
5548
- Ir = this;
5548
+ Lr = this;
5549
5549
  }
5550
5550
  static material = new I({ gl: {
5551
5551
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -5556,7 +5556,7 @@ var Ir, W = class extends U {
5556
5556
  }
5557
5557
  apply(e, t) {
5558
5558
  t.redraw(e, () => {
5559
- L.draw(e, Ir.material, {
5559
+ L.draw(e, Lr.material, {
5560
5560
  sampler: 0,
5561
5561
  saturation: this.saturation,
5562
5562
  contrast: this.contrast,
@@ -5570,18 +5570,18 @@ var Ir, W = class extends U {
5570
5570
  });
5571
5571
  }
5572
5572
  };
5573
- k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "saturation", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "contrast", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "brightness", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "red", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "green", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "blue", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "alpha", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "gamma", void 0), W = Ir = k([b("ColorAdjustEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], W);
5573
+ k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "saturation", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "contrast", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "brightness", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "red", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "green", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "blue", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "alpha", void 0), k([_({ fallback: 1 }), O("design:type", Number)], W.prototype, "gamma", void 0), W = Lr = k([S("ColorAdjustEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], W);
5574
5574
  //#endregion
5575
5575
  //#region src/scene/effects/ColorFilterEffect.ts
5576
- var Lr, Rr = class extends U {
5576
+ var Rr, zr = class extends U {
5577
5577
  static {
5578
- Lr = this;
5578
+ Rr = this;
5579
5579
  }
5580
5580
  static material = new I({ gl: {
5581
5581
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5582
5582
  fragment: "in vec2 vUv;\nuniform sampler2D sampler;\nuniform float m[20];\n\nvoid main(void) {\n vec4 c = texture2D(sampler, vUv);\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n gl_FragColor = vec4(\n m[0] * c.r + m[1] * c.g + m[2] * c.b + m[3] * c.a + m[4] / 255.0,\n m[5] * c.r + m[6] * c.g + m[7] * c.b + m[8] * c.a + m[9] / 255.0,\n m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14] / 255.0,\n m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19] / 255.0\n );\n}"
5583
5583
  } });
5584
- _colorMatrix = new St();
5584
+ _colorMatrix = new Ct();
5585
5585
  constructor(e, t = []) {
5586
5586
  super(), this.setProperties(e).append(t);
5587
5587
  }
@@ -5594,13 +5594,13 @@ var Lr, Rr = class extends U {
5594
5594
  }
5595
5595
  apply(e, t) {
5596
5596
  if (!this.filter) return;
5597
- let n = Ae(this.filter), r = this._colorMatrix.identity();
5597
+ let n = ke(this.filter), r = this._colorMatrix.identity();
5598
5598
  n.forEach(({ name: e, args: t }) => {
5599
5599
  let n = t.map((e) => e.normalizedIntValue);
5600
5600
  switch (e) {
5601
5601
  case "hue-rotate":
5602
5602
  case "hueRotate":
5603
- r.hueRotate(n[0] * Ce);
5603
+ r.hueRotate(n[0] * Se);
5604
5604
  break;
5605
5605
  case "saturate":
5606
5606
  r.saturate(n[0]);
@@ -5625,25 +5625,25 @@ var Lr, Rr = class extends U {
5625
5625
  break;
5626
5626
  }
5627
5627
  }), t.redraw(e, () => {
5628
- L.draw(e, Lr.material, {
5628
+ L.draw(e, Rr.material, {
5629
5629
  sampler: 0,
5630
5630
  m: r.toArray()
5631
5631
  });
5632
5632
  });
5633
5633
  }
5634
5634
  };
5635
- k([_(), O("design:type", String)], Rr.prototype, "filter", void 0), Rr = Lr = k([b("ColorFilterEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Rr);
5635
+ k([_(), O("design:type", String)], zr.prototype, "filter", void 0), zr = Rr = k([S("ColorFilterEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], zr);
5636
5636
  //#endregion
5637
5637
  //#region src/scene/effects/ColorOverlayEffect.ts
5638
- var zr, Br = 50, Vr = class extends U {
5638
+ var Br, Vr = 50, Hr = class extends U {
5639
5639
  static {
5640
- zr = this;
5640
+ Br = this;
5641
5641
  }
5642
5642
  static material = new I({ gl: {
5643
5643
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5644
5644
  fragment: `precision mediump float;
5645
5645
  uniform sampler2D sampler;
5646
- uniform vec4 colors[${Br}];
5646
+ uniform vec4 colors[${Vr}];
5647
5647
  varying vec2 vUv;
5648
5648
 
5649
5649
  float calcWidth() {
@@ -5652,7 +5652,7 @@ float calcWidth() {
5652
5652
 
5653
5653
  int calcCount() {
5654
5654
  int count = 0;
5655
- for (int i = 0; i < ${Br}; i++) {
5655
+ for (int i = 0; i < ${Vr}; i++) {
5656
5656
  if (colors[i] != vec4(0,0,0,0)){
5657
5657
  count++;
5658
5658
  }
@@ -5664,7 +5664,7 @@ vec4 calcColor(float x) {
5664
5664
  float perUnit = calcWidth() / float(calcCount());
5665
5665
  int index = int(x / perUnit);
5666
5666
 
5667
- for(int i=0; i<${Br}; i++){
5667
+ for(int i=0; i<${Vr}; i++){
5668
5668
  if(i==index){
5669
5669
  return colors[i];
5670
5670
  }
@@ -5679,7 +5679,7 @@ void main(void) {
5679
5679
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
5680
5680
  }`
5681
5681
  } });
5682
- _color = new T();
5682
+ _color = new yt();
5683
5683
  constructor(e, t = []) {
5684
5684
  super(), this.setProperties(e).append(t);
5685
5685
  }
@@ -5690,31 +5690,31 @@ void main(void) {
5690
5690
  let t = this._color.toArray();
5691
5691
  return t[3] = this.alpha, t;
5692
5692
  });
5693
- for (; t.length < Br;) t.push([
5693
+ for (; t.length < Vr;) t.push([
5694
5694
  0,
5695
5695
  0,
5696
5696
  0,
5697
5697
  0
5698
5698
  ]);
5699
- L.draw(e, zr.material, {
5699
+ L.draw(e, Br.material, {
5700
5700
  sampler: 0,
5701
- colors: t.slice(0, Br).flatMap((e) => e)
5701
+ colors: t.slice(0, Vr).flatMap((e) => e)
5702
5702
  });
5703
5703
  });
5704
5704
  }
5705
5705
  };
5706
- k([_({ default: () => [] }), O("design:type", Array)], Vr.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Vr.prototype, "alpha", void 0), Vr = zr = k([b("ColorOverlayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Vr);
5706
+ k([_({ default: () => [] }), O("design:type", Array)], Hr.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Hr.prototype, "alpha", void 0), Hr = Br = k([S("ColorOverlayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Hr);
5707
5707
  //#endregion
5708
5708
  //#region src/scene/effects/ColorRemoveEffect.ts
5709
- var Hr, Ur = class extends U {
5709
+ var Ur, Wr = class extends U {
5710
5710
  static {
5711
- Hr = this;
5711
+ Ur = this;
5712
5712
  }
5713
5713
  static material = new I({ gl: {
5714
5714
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5715
5715
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform float epsilon;\nconst int MAX_COLORS = 50;\nuniform vec3 originalColors[MAX_COLORS];\n\nvoid main(void) {\n vec4 color = texture2D(sampler, vUv);\n\n for (int i = 0; i < MAX_COLORS; i++) {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0) {\n break;\n }\n vec3 colorDiff = origColor - color.rgb;\n if (length(colorDiff) < epsilon) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n }\n\n gl_FragColor = color;\n}"
5716
5716
  } });
5717
- _color = new T();
5717
+ _color = new yt();
5718
5718
  constructor(e, t = []) {
5719
5719
  super(), this.setProperties(e).append(t);
5720
5720
  }
@@ -5728,7 +5728,7 @@ var Hr, Ur = class extends U {
5728
5728
  r.slice(0, 50).forEach((e, t) => {
5729
5729
  n[t * 3] = e[0], n[t * 3 + 1] = e[1], n[t * 3 + 2] = e[2];
5730
5730
  }), t.redraw(e, () => {
5731
- L.draw(e, Hr.material, {
5731
+ L.draw(e, Ur.material, {
5732
5732
  sampler: 0,
5733
5733
  epsilon: this.epsilon,
5734
5734
  originalColors: n
@@ -5736,19 +5736,19 @@ var Hr, Ur = class extends U {
5736
5736
  });
5737
5737
  }
5738
5738
  };
5739
- k([_({ default: () => [] }), O("design:type", Array)], Ur.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Ur.prototype, "epsilon", void 0), Ur = Hr = k([b("ColorRemoveEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ur);
5739
+ k([_({ default: () => [] }), O("design:type", Array)], Wr.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Wr.prototype, "epsilon", void 0), Wr = Ur = k([S("ColorRemoveEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Wr);
5740
5740
  //#endregion
5741
5741
  //#region src/scene/effects/ColorReplaceEffect.ts
5742
- var Wr, Gr = 50, Kr = class extends U {
5742
+ var Gr, Kr = 50, qr = class extends U {
5743
5743
  static {
5744
- Wr = this;
5744
+ Gr = this;
5745
5745
  }
5746
5746
  static material = new I({ gl: {
5747
5747
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5748
5748
  fragment: `varying vec2 vUv;
5749
5749
  uniform sampler2D sampler;
5750
5750
  uniform float epsilon;
5751
- const int MAX_COLORS = ${Gr};
5751
+ const int MAX_COLORS = ${Kr};
5752
5752
  uniform vec3 originalColors[MAX_COLORS];
5753
5753
  uniform vec3 targetColors[MAX_COLORS];
5754
5754
 
@@ -5776,7 +5776,7 @@ void main(void) {
5776
5776
  }
5777
5777
  }`
5778
5778
  } });
5779
- _color = new T();
5779
+ _color = new yt();
5780
5780
  constructor(e, t = []) {
5781
5781
  super(), this.setProperties(e).append(t);
5782
5782
  }
@@ -5785,8 +5785,8 @@ void main(void) {
5785
5785
  this._color.value = e[0];
5786
5786
  let t = this._color.toArray().slice(0, 3);
5787
5787
  return this._color.value = e[1], [t, this._color.toArray().slice(0, 3)];
5788
- }), r = this.epsilon, i = new Float32Array(Gr * 3), a = new Float32Array(Gr * 3);
5789
- for (; n.length < Gr;) n.push([[
5788
+ }), r = this.epsilon, i = new Float32Array(Kr * 3), a = new Float32Array(Kr * 3);
5789
+ for (; n.length < Kr;) n.push([[
5790
5790
  -1,
5791
5791
  0,
5792
5792
  0
@@ -5796,10 +5796,10 @@ void main(void) {
5796
5796
  0,
5797
5797
  1
5798
5798
  ]]);
5799
- n.slice(0, Gr).forEach(([e, t], n) => {
5799
+ n.slice(0, Kr).forEach(([e, t], n) => {
5800
5800
  i[n * 3] = e[0], i[n * 3 + 1] = e[1], i[n * 3 + 2] = e[2], a[n * 3] = t[0], a[n * 3 + 1] = t[1], a[n * 3 + 2] = t[2];
5801
5801
  }), t.redraw(e, () => {
5802
- L.draw(e, Wr.material, {
5802
+ L.draw(e, Gr.material, {
5803
5803
  sampler: 0,
5804
5804
  epsilon: r,
5805
5805
  originalColors: i,
@@ -5808,17 +5808,17 @@ void main(void) {
5808
5808
  });
5809
5809
  }
5810
5810
  };
5811
- k([_({ default: () => [] }), O("design:type", Array)], Kr.prototype, "colors", void 0), k([_({ fallback: .05 }), O("design:type", Number)], Kr.prototype, "epsilon", void 0), Kr = Wr = k([b("ColorReplaceEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Kr);
5811
+ k([_({ default: () => [] }), O("design:type", Array)], qr.prototype, "colors", void 0), k([_({ fallback: .05 }), O("design:type", Number)], qr.prototype, "epsilon", void 0), qr = Gr = k([S("ColorReplaceEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], qr);
5812
5812
  //#endregion
5813
5813
  //#region src/scene/effects/DrawboardEffect.frag?raw
5814
- var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nuniform vec2 inputSize;\nuniform vec2 zoom;\nuniform vec2 translate;\nuniform float gridScale;\nuniform vec2 gridSize;\nuniform int checkerboard;\nuniform int checkerboardStyle;\nuniform float dotBackgroundBaseColor;\nuniform float dotBackgroundZoomedOutColor;\nuniform float dotColorDiff;\nuniform int pixelGrid;\nuniform int watermark;\nuniform sampler2D watermarkTexture;\nuniform vec2 watermarkSize;\nuniform vec2 watermarkOffset;\nuniform vec2 watermarkSpacing;\nuniform float watermarkRotation;\nuniform float watermarkAlpha;\n\nconst float VIEWPORT_SPACE_MIN_DOT_RADIUS = 0.5;\nconst float CANVAS_SPACE_DOT_RADIUS = 1.;\nconst float CANVAS_SPACE_DOT_GRID_SIZE_PX = 16.;\n\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_GRID_DARK = 2;\nconst int CHECKERBOARD_STYLE_DOTS = 3;\nconst int CHECKERBOARD_STYLE_DOTS_DARK = 4;\n\nfloat _round(float val) {\n return floor(val + .5);\n}\n\nvec2 _round(vec2 pt) {\n return floor(pt + .5);\n}\n\nfloat scaledGridSize(float zoomScale) {\n if (zoomScale < 0.03125) {\n return 32.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.0625) {\n return 16.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.125) {\n return 8.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.25) {\n return 4.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.5) {\n return 2.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else {\n return CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n}\n\nvec4 renderCheckerboard(vec2 coord, vec4 color) {\n float value;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 1.0 : 0.95;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_GRID_DARK) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 0.12 : 0.17;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS || checkerboardStyle == CHECKERBOARD_STYLE_DOTS_DARK) {\n // light vs dark dots share this path; the base/dot colours are supplied as\n // uniforms (set per style on the CPU side), so only the values differ.\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n float dotColor = dotBackgroundZoomedOutColor + dotColorDiff * zoomInterpolationFactor;\n vec2 nearestGridPoint = _round(coord / gridPixelSize) * gridPixelSize;\n float canvasSpaceDist = length(coord - nearestGridPoint);\n float viewportSpaceDist = canvasSpaceDist * zoomScale;\n float viewportSpaceDotRadius = max(VIEWPORT_SPACE_MIN_DOT_RADIUS, CANVAS_SPACE_DOT_RADIUS * zoomScale);\n float dist = 1.0 - smoothstep(0., 1., (viewportSpaceDist - viewportSpaceDotRadius + .5));\n value = mix(dotBackgroundBaseColor, dotColor, dist);\n }\n return vec4(value * (1.0 - color.a) + color.rgb, 1);\n}\n\nvec4 renderPixelGrid(vec2 coord, vec4 color) {\n vec3 rgb = color.rgb;\n vec2 corner = fract(coord);\n float gridWeight = max(float(corner.x < gridSize.x), float(corner.y < gridSize.y));\n vec3 gridColor;\n vec3 weights = vec3(0.299, 0.587, 0.114);\n float c2 = dot(rgb * rgb, weights);\n float luminance = sqrt(c2);\n if (luminance > 0.5) {\n float target = (luminance - 0.05) / luminance;\n gridColor = rgb * target;\n }\n else {\n float target = luminance * 0.8 + 0.15;\n float c1 = dot(rgb, weights);\n float a = 1.0 - 2.0 * c1 + c2;\n float b = c2 - c1;\n gridColor = mix(rgb, vec3(1), (b + sqrt(b * b - a * (c2 - target * target))) / a);\n }\n return vec4(mix(rgb, gridColor, gridWeight), color.a);\n}\n\nvec4 renderWatermark(vec2 coord, vec4 color) {\n float hw = watermarkSize.x * 0.5;\n float hh = watermarkSize.y * 0.5;\n float c = cos(-watermarkRotation);\n float s = sin(-watermarkRotation);\n vec2 blockSize = watermarkSize + watermarkSpacing;\n vec2 tiles = max(floor(inputSize / blockSize), vec2(1.0));\n vec2 gridCoverage = tiles * blockSize;\n vec2 startPos = watermarkOffset;\n vec2 localPix = coord - startPos;\n vec2 blockIndex = floor(localPix / blockSize);\n vec2 wmCenter = startPos + blockIndex * blockSize + watermarkSize * 0.5 + watermarkSpacing / 2.0;\n vec2 local = coord - wmCenter;\n vec2 inv = vec2(\n local.x * c + local.y * s,\n -local.x * s + local.y * c\n );\n if (inv.x >= -hw && inv.x <= hw && inv.y >= -hh && inv.y <= hh) {\n vec2 wmUV = (inv + vec2(hw, hh)) / watermarkSize;\n vec4 wmColor = texture(watermarkTexture, wmUV);\n float alpha = wmColor.a * watermarkAlpha;\n return mix(color, wmColor, alpha);\n } else {\n return color;\n }\n}\n\nvoid main(void) {\n vec4 color = texture(uTexture, vUv);\n vec2 coord = vec2(vUv.x, 1.0 - vUv.y);\n coord = (coord * inputSize - translate) / zoom;\n if (checkerboard > 0) {\n color = renderCheckerboard(coord, color);\n }\n if (watermark > 0) {\n color = renderWatermark(coord, color);\n }\n if (pixelGrid > 0) {\n color = renderPixelGrid(coord, color);\n }\n gl_FragColor = color;\n}\n", Jr, G = class extends U {
5814
+ var Jr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nuniform vec2 inputSize;\nuniform vec2 zoom;\nuniform vec2 translate;\nuniform float gridScale;\nuniform vec2 gridSize;\nuniform int checkerboard;\nuniform int checkerboardStyle;\nuniform float dotBackgroundBaseColor;\nuniform float dotBackgroundZoomedOutColor;\nuniform float dotColorDiff;\nuniform int pixelGrid;\nuniform int watermark;\nuniform sampler2D watermarkTexture;\nuniform vec2 watermarkSize;\nuniform vec2 watermarkOffset;\nuniform vec2 watermarkSpacing;\nuniform float watermarkRotation;\nuniform float watermarkAlpha;\n\nconst float VIEWPORT_SPACE_MIN_DOT_RADIUS = 0.5;\nconst float CANVAS_SPACE_DOT_RADIUS = 1.;\nconst float CANVAS_SPACE_DOT_GRID_SIZE_PX = 16.;\n\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_GRID_DARK = 2;\nconst int CHECKERBOARD_STYLE_DOTS = 3;\nconst int CHECKERBOARD_STYLE_DOTS_DARK = 4;\n\nfloat _round(float val) {\n return floor(val + .5);\n}\n\nvec2 _round(vec2 pt) {\n return floor(pt + .5);\n}\n\nfloat scaledGridSize(float zoomScale) {\n if (zoomScale < 0.03125) {\n return 32.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.0625) {\n return 16.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.125) {\n return 8.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.25) {\n return 4.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.5) {\n return 2.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else {\n return CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n}\n\nvec4 renderCheckerboard(vec2 coord, vec4 color) {\n float value;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 1.0 : 0.95;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_GRID_DARK) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 0.12 : 0.17;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS || checkerboardStyle == CHECKERBOARD_STYLE_DOTS_DARK) {\n // light vs dark dots share this path; the base/dot colours are supplied as\n // uniforms (set per style on the CPU side), so only the values differ.\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n float dotColor = dotBackgroundZoomedOutColor + dotColorDiff * zoomInterpolationFactor;\n vec2 nearestGridPoint = _round(coord / gridPixelSize) * gridPixelSize;\n float canvasSpaceDist = length(coord - nearestGridPoint);\n float viewportSpaceDist = canvasSpaceDist * zoomScale;\n float viewportSpaceDotRadius = max(VIEWPORT_SPACE_MIN_DOT_RADIUS, CANVAS_SPACE_DOT_RADIUS * zoomScale);\n float dist = 1.0 - smoothstep(0., 1., (viewportSpaceDist - viewportSpaceDotRadius + .5));\n value = mix(dotBackgroundBaseColor, dotColor, dist);\n }\n return vec4(value * (1.0 - color.a) + color.rgb, 1);\n}\n\nvec4 renderPixelGrid(vec2 coord, vec4 color) {\n vec3 rgb = color.rgb;\n vec2 corner = fract(coord);\n float gridWeight = max(float(corner.x < gridSize.x), float(corner.y < gridSize.y));\n vec3 gridColor;\n vec3 weights = vec3(0.299, 0.587, 0.114);\n float c2 = dot(rgb * rgb, weights);\n float luminance = sqrt(c2);\n if (luminance > 0.5) {\n float target = (luminance - 0.05) / luminance;\n gridColor = rgb * target;\n }\n else {\n float target = luminance * 0.8 + 0.15;\n float c1 = dot(rgb, weights);\n float a = 1.0 - 2.0 * c1 + c2;\n float b = c2 - c1;\n gridColor = mix(rgb, vec3(1), (b + sqrt(b * b - a * (c2 - target * target))) / a);\n }\n return vec4(mix(rgb, gridColor, gridWeight), color.a);\n}\n\nvec4 renderWatermark(vec2 coord, vec4 color) {\n float hw = watermarkSize.x * 0.5;\n float hh = watermarkSize.y * 0.5;\n float c = cos(-watermarkRotation);\n float s = sin(-watermarkRotation);\n vec2 blockSize = watermarkSize + watermarkSpacing;\n vec2 tiles = max(floor(inputSize / blockSize), vec2(1.0));\n vec2 gridCoverage = tiles * blockSize;\n vec2 startPos = watermarkOffset;\n vec2 localPix = coord - startPos;\n vec2 blockIndex = floor(localPix / blockSize);\n vec2 wmCenter = startPos + blockIndex * blockSize + watermarkSize * 0.5 + watermarkSpacing / 2.0;\n vec2 local = coord - wmCenter;\n vec2 inv = vec2(\n local.x * c + local.y * s,\n -local.x * s + local.y * c\n );\n if (inv.x >= -hw && inv.x <= hw && inv.y >= -hh && inv.y <= hh) {\n vec2 wmUV = (inv + vec2(hw, hh)) / watermarkSize;\n vec4 wmColor = texture(watermarkTexture, wmUV);\n float alpha = wmColor.a * watermarkAlpha;\n return mix(color, wmColor, alpha);\n } else {\n return color;\n }\n}\n\nvoid main(void) {\n vec4 color = texture(uTexture, vUv);\n vec2 coord = vec2(vUv.x, 1.0 - vUv.y);\n coord = (coord * inputSize - translate) / zoom;\n if (checkerboard > 0) {\n color = renderCheckerboard(coord, color);\n }\n if (watermark > 0) {\n color = renderWatermark(coord, color);\n }\n if (pixelGrid > 0) {\n color = renderPixelGrid(coord, color);\n }\n gl_FragColor = color;\n}\n", Yr, G = class extends U {
5815
5815
  static {
5816
- Jr = this;
5816
+ Yr = this;
5817
5817
  }
5818
5818
  _watermark;
5819
5819
  static material = new I({ gl: {
5820
5820
  vertex: "attribute vec2 position;\nin vec2 uv;\nuniform mat3 projectionMatrix;\nuniform mat3 viewMatrix;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position.xy, 0.0, 1.0);\n vUv = uv;\n}",
5821
- fragment: qr
5821
+ fragment: Jr
5822
5822
  } });
5823
5823
  constructor(e, t = []) {
5824
5824
  super(), this.setProperties(e).append(t);
@@ -5867,7 +5867,7 @@ var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5867
5867
  zoomedOut: this.dotColor ?? a.zoomedOut,
5868
5868
  diff: this.dotZoomDiff ?? a.diff
5869
5869
  };
5870
- L.draw(e, Jr.material, {
5870
+ L.draw(e, Yr.material, {
5871
5871
  uTexture: 0,
5872
5872
  inputSize: [t.width, t.height],
5873
5873
  zoom: [n[0], n[4]],
@@ -5891,20 +5891,20 @@ var qr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5891
5891
  });
5892
5892
  }
5893
5893
  };
5894
- k([_({ fallback: !1 }), O("design:type", Boolean)], G.prototype, "checkerboard", void 0), k([_({ fallback: "grid" }), O("design:type", Object)], G.prototype, "checkerboardStyle", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], G.prototype, "pixelGrid", void 0), k([_(), O("design:type", Number)], G.prototype, "dotBaseColor", void 0), k([_(), O("design:type", Number)], G.prototype, "dotColor", void 0), k([_(), O("design:type", Number)], G.prototype, "dotZoomDiff", void 0), k([_(), O("design:type", String)], G.prototype, "watermark", void 0), k([_({ fallback: 100 }), O("design:type", Number)], G.prototype, "watermarkWidth", void 0), k([_({ fallback: .05 }), O("design:type", Number)], G.prototype, "watermarkAlpha", void 0), k([_({ fallback: .5236 }), O("design:type", Number)], G.prototype, "watermarkRotation", void 0), G = Jr = k([b("DrawboardEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5894
+ k([_({ fallback: !1 }), O("design:type", Boolean)], G.prototype, "checkerboard", void 0), k([_({ fallback: "grid" }), O("design:type", Object)], G.prototype, "checkerboardStyle", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], G.prototype, "pixelGrid", void 0), k([_(), O("design:type", Number)], G.prototype, "dotBaseColor", void 0), k([_(), O("design:type", Number)], G.prototype, "dotColor", void 0), k([_(), O("design:type", Number)], G.prototype, "dotZoomDiff", void 0), k([_(), O("design:type", String)], G.prototype, "watermark", void 0), k([_({ fallback: 100 }), O("design:type", Number)], G.prototype, "watermarkWidth", void 0), k([_({ fallback: .05 }), O("design:type", Number)], G.prototype, "watermarkAlpha", void 0), k([_({ fallback: .5236 }), O("design:type", Number)], G.prototype, "watermarkRotation", void 0), G = Yr = k([S("DrawboardEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5895
5895
  //#endregion
5896
5896
  //#region src/scene/effects/GaussianBlurEffect.ts
5897
- var Yr, Xr = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void) {\n gl_FragColor = vec4(0.0);\n float flag = 0.0;\n for (int i = 0; i < 9; i++) {\n vec2 uv = vUv[i];\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n flag = 1.0;\n break;\n }\n }\n if (flag == 1.0) {\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n } else {\n gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;\n }\n}", Zr = class extends U {
5897
+ var Xr, Zr = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void) {\n gl_FragColor = vec4(0.0);\n float flag = 0.0;\n for (int i = 0; i < 9; i++) {\n vec2 uv = vUv[i];\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n flag = 1.0;\n break;\n }\n }\n if (flag == 1.0) {\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n } else {\n gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;\n }\n}", Qr = class extends U {
5898
5898
  static {
5899
- Yr = this;
5899
+ Xr = this;
5900
5900
  }
5901
5901
  static materialX = new I({ gl: {
5902
5902
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nuniform float uStrength;\nvarying vec2 vUv[9];\n\nvoid main(void) {\n gl_Position = vec4(position, 0, 1);\n vUv[0] = uv + vec2(-4.0 * uStrength, 0.0);\n vUv[1] = uv + vec2(-3.0 * uStrength, 0.0);\n vUv[2] = uv + vec2(-2.0 * uStrength, 0.0);\n vUv[3] = uv + vec2(-1.0 * uStrength, 0.0);\n vUv[4] = uv + vec2(0.0 * uStrength, 0.0);\n vUv[5] = uv + vec2(1.0 * uStrength, 0.0);\n vUv[6] = uv + vec2(2.0 * uStrength, 0.0);\n vUv[7] = uv + vec2(3.0 * uStrength, 0.0);\n vUv[8] = uv + vec2(4.0 * uStrength, 0.0);\n}",
5903
- fragment: Xr
5903
+ fragment: Zr
5904
5904
  } });
5905
5905
  static materialY = new I({ gl: {
5906
5906
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nuniform float uStrength;\nvarying vec2 vUv[9];\n\nvoid main(void) {\n gl_Position = vec4(position, 0, 1);\n vUv[0] = uv + vec2(0.0, -4.0 * uStrength);\n vUv[1] = uv + vec2(0.0, -3.0 * uStrength);\n vUv[2] = uv + vec2(0.0, -2.0 * uStrength);\n vUv[3] = uv + vec2(0.0, -1.0 * uStrength);\n vUv[4] = uv + vec2(0.0, 0.0 * uStrength);\n vUv[5] = uv + vec2(0.0, 1.0 * uStrength);\n vUv[6] = uv + vec2(0.0, 2.0 * uStrength);\n vUv[7] = uv + vec2(0.0, 3.0 * uStrength);\n vUv[8] = uv + vec2(0.0, 4.0 * uStrength);\n}",
5907
- fragment: Xr
5907
+ fragment: Zr
5908
5908
  } });
5909
5909
  constructor(e, t = []) {
5910
5910
  super(), this.setProperties(e).append(t);
@@ -5912,39 +5912,39 @@ var Yr, Xr = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void
5912
5912
  apply(e, t) {
5913
5913
  let n = 1 / t.width, r = 1 / t.height, i = Math.max(this.quality, 1);
5914
5914
  for (let r = 0; r < i; r++) t.redraw(e, () => {
5915
- L.draw(e, Yr.materialX, {
5915
+ L.draw(e, Xr.materialX, {
5916
5916
  sampler: 0,
5917
5917
  uStrength: n * (this.strength / i)
5918
5918
  });
5919
5919
  });
5920
5920
  for (let n = 0; n < i; n++) t.redraw(e, () => {
5921
- L.draw(e, Yr.materialY, {
5921
+ L.draw(e, Xr.materialY, {
5922
5922
  sampler: 0,
5923
5923
  uStrength: r * (this.strength / i)
5924
5924
  });
5925
5925
  });
5926
5926
  }
5927
5927
  };
5928
- k([_({ fallback: 4 }), O("design:type", Number)], Zr.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], Zr.prototype, "quality", void 0), Zr = Yr = k([b("GaussianBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Zr);
5928
+ k([_({ fallback: 4 }), O("design:type", Number)], Qr.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], Qr.prototype, "quality", void 0), Qr = Xr = k([S("GaussianBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Qr);
5929
5929
  //#endregion
5930
5930
  //#region src/scene/effects/DropShadowEffect.ts
5931
- var Qr, $r = class extends U {
5931
+ var $r, ei = class extends U {
5932
5932
  static {
5933
- Qr = this;
5933
+ $r = this;
5934
5934
  }
5935
5935
  static material = new I({ gl: {
5936
5936
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5937
5937
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float uAlpha;\nuniform vec3 uColor;\nuniform vec2 uOffset;\nuniform vec4 uInputSize;\n\nvoid main(void) {\n vec4 sample = texture2D(sampler, vUv + uOffset * uInputSize.zw);\n sample.rgb = uColor.rgb * sample.a;\n sample *= uAlpha;\n gl_FragColor = sample;\n}"
5938
5938
  } });
5939
- blurEffect = new Zr();
5939
+ blurEffect = new Qr();
5940
5940
  viewport3 = new H();
5941
- _color = new T();
5941
+ _color = new yt();
5942
5942
  constructor(e, t = []) {
5943
5943
  super(), this.setProperties(e).append(t);
5944
5944
  }
5945
5945
  apply(e, t) {
5946
5946
  this.viewport3.activateWithCopy(e, t), this.viewport3.redraw(e, () => {
5947
- this._color.value = this.color, L.draw(e, Qr.material, {
5947
+ this._color.value = this.color, L.draw(e, $r.material, {
5948
5948
  sampler: 0,
5949
5949
  uAlpha: this._color.a,
5950
5950
  uColor: this._color.toArray().slice(0, 3),
@@ -5957,16 +5957,16 @@ var Qr, $r = class extends U {
5957
5957
  ]
5958
5958
  });
5959
5959
  }), this.blurEffect.strength = this.blur, this.blurEffect.apply(e, this.viewport3), t.redraw(e, () => {
5960
- this.viewport3.texture.activate(e, 1), L.draw(e, Zn.instance, { sampler: 1 }), this.shadowOnly || L.draw(e, Zn.instance, { sampler: 0 }), e.texture.unbind(1);
5960
+ this.viewport3.texture.activate(e, 1), L.draw(e, Qn.instance, { sampler: 1 }), this.shadowOnly || L.draw(e, Qn.instance, { sampler: 0 }), e.texture.unbind(1);
5961
5961
  });
5962
5962
  }
5963
5963
  };
5964
- k([_({ fallback: "#000000FF" }), O("design:type", Object)], $r.prototype, "color", void 0), k([_({ fallback: 4 }), O("design:type", Number)], $r.prototype, "blur", void 0), k([_({ fallback: 4 }), O("design:type", Number)], $r.prototype, "offsetX", void 0), k([_({ fallback: 4 }), O("design:type", Number)], $r.prototype, "offsetY", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], $r.prototype, "shadowOnly", void 0), $r = Qr = k([b("DropShadowEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], $r);
5964
+ k([_({ fallback: "#000000FF" }), O("design:type", Object)], ei.prototype, "color", void 0), k([_({ fallback: 4 }), O("design:type", Number)], ei.prototype, "blur", void 0), k([_({ fallback: 4 }), O("design:type", Number)], ei.prototype, "offsetX", void 0), k([_({ fallback: 4 }), O("design:type", Number)], ei.prototype, "offsetY", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], ei.prototype, "shadowOnly", void 0), ei = $r = k([S("DropShadowEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ei);
5965
5965
  //#endregion
5966
5966
  //#region src/scene/effects/EmbossEffect.ts
5967
- var ei, ti = class extends U {
5967
+ var ti, ni = class extends U {
5968
5968
  static {
5969
- ei = this;
5969
+ ti = this;
5970
5970
  }
5971
5971
  static material = new I({ gl: {
5972
5972
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -5977,7 +5977,7 @@ var ei, ti = class extends U {
5977
5977
  }
5978
5978
  apply(e, t) {
5979
5979
  t.redraw(e, () => {
5980
- L.draw(e, ei.material, {
5980
+ L.draw(e, ti.material, {
5981
5981
  sampler: 0,
5982
5982
  strength: this.strength,
5983
5983
  inputSize: [
@@ -5990,12 +5990,12 @@ var ei, ti = class extends U {
5990
5990
  });
5991
5991
  }
5992
5992
  };
5993
- k([_({ fallback: 5 }), O("design:type", Number)], ti.prototype, "strength", void 0), ti = ei = k([b("EmbossEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ti);
5993
+ k([_({ fallback: 5 }), O("design:type", Number)], ni.prototype, "strength", void 0), ni = ti = k([S("EmbossEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ni);
5994
5994
  //#endregion
5995
5995
  //#region src/scene/effects/GlitchEffect.ts
5996
- var ni, K = class extends U {
5996
+ var ri, K = class extends U {
5997
5997
  static {
5998
- ni = this;
5998
+ ri = this;
5999
5999
  }
6000
6000
  static material = new I({ gl: {
6001
6001
  vertex: "in vec2 position;\nin vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6008,7 +6008,7 @@ var ni, K = class extends U {
6008
6008
  _needsRedraw = !1;
6009
6009
  constructor(e, t = []) {
6010
6010
  super(), this.setProperties(e).append(t);
6011
- let n = S(4, this.sampleSize);
6011
+ let n = w(4, this.sampleSize);
6012
6012
  if (!n) throw Error("GlitchEffect requires a canvas; call setCanvasFactory() in non-browser environments.");
6013
6013
  this._canvas = n, this._texture = new z(this._canvas), this._sizes = new Float32Array(this.slices), this._offsets = new Float32Array(this.slices);
6014
6014
  }
@@ -6027,7 +6027,7 @@ var ni, K = class extends U {
6027
6027
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
6028
6028
  let n = t.width, r = t.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
6029
6029
  t.redraw(e, () => {
6030
- this._texture.activate(e, 1), L.draw(e, ni.material, {
6030
+ this._texture.activate(e, 1), L.draw(e, ri.material, {
6031
6031
  sampler: 0,
6032
6032
  filterClamp: [
6033
6033
  0,
@@ -6056,12 +6056,12 @@ var ni, K = class extends U {
6056
6056
  });
6057
6057
  }
6058
6058
  };
6059
- k([_({ fallback: 10 }), O("design:type", Number)], K.prototype, "slices", void 0), k([_({ fallback: 512 }), O("design:type", Number)], K.prototype, "sampleSize", void 0), k([_({ fallback: 100 }), O("design:type", Number)], K.prototype, "offset", void 0), k([_({ fallback: 0 }), O("design:type", Number)], K.prototype, "direction", void 0), k([_({ fallback: 2 }), O("design:type", Number)], K.prototype, "fillMode", void 0), k([_({ fallback: 0 }), O("design:type", Number)], K.prototype, "seed", void 0), k([_({ default: () => [2, 2] }), O("design:type", Array)], K.prototype, "red", void 0), k([_({ default: () => [-10, 4] }), O("design:type", Array)], K.prototype, "green", void 0), k([_({ default: () => [10, -4] }), O("design:type", Array)], K.prototype, "blue", void 0), K = ni = k([b("GlitchEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
6059
+ k([_({ fallback: 10 }), O("design:type", Number)], K.prototype, "slices", void 0), k([_({ fallback: 512 }), O("design:type", Number)], K.prototype, "sampleSize", void 0), k([_({ fallback: 100 }), O("design:type", Number)], K.prototype, "offset", void 0), k([_({ fallback: 0 }), O("design:type", Number)], K.prototype, "direction", void 0), k([_({ fallback: 2 }), O("design:type", Number)], K.prototype, "fillMode", void 0), k([_({ fallback: 0 }), O("design:type", Number)], K.prototype, "seed", void 0), k([_({ default: () => [2, 2] }), O("design:type", Array)], K.prototype, "red", void 0), k([_({ default: () => [-10, 4] }), O("design:type", Array)], K.prototype, "green", void 0), k([_({ default: () => [10, -4] }), O("design:type", Array)], K.prototype, "blue", void 0), K = ri = k([S("GlitchEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
6060
6060
  //#endregion
6061
6061
  //#region src/scene/effects/GodrayEffect.ts
6062
- var ri, ii = "vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x) {\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep) {\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain) {\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++) {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}", q = class extends U {
6062
+ var ii, ai = "vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x) {\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep) {\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain) {\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++) {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}", q = class extends U {
6063
6063
  static {
6064
- ri = this;
6064
+ ii = this;
6065
6065
  }
6066
6066
  static material = new I({ gl: {
6067
6067
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6076,7 +6076,7 @@ uniform float uTime;
6076
6076
  uniform vec3 uRay;
6077
6077
  uniform vec4 uInputSize;
6078
6078
 
6079
- ${ii}
6079
+ ${ai}
6080
6080
 
6081
6081
  void main(void) {
6082
6082
  bool uParallel = uParallel > 0.5;
@@ -6115,7 +6115,7 @@ void main(void) {
6115
6115
  apply(e, t) {
6116
6116
  let n = this.angle * (Math.PI / 180), r = this.parallel ? [Math.cos(n), Math.sin(n)] : this.center;
6117
6117
  t.redraw(e, () => {
6118
- L.draw(e, ri.material, {
6118
+ L.draw(e, ii.material, {
6119
6119
  sampler: 0,
6120
6120
  uDimensions: [t.width, t.height],
6121
6121
  uParallel: +!!this.parallel,
@@ -6137,15 +6137,15 @@ void main(void) {
6137
6137
  });
6138
6138
  }
6139
6139
  };
6140
- k([_({ fallback: 0 }), O("design:type", Number)], q.prototype, "time", void 0), k([_({ fallback: 30 }), O("design:type", Number)], q.prototype, "angle", void 0), k([_({ fallback: .5 }), O("design:type", Number)], q.prototype, "gain", void 0), k([_({ fallback: 2.5 }), O("design:type", Number)], q.prototype, "lacunarity", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], q.prototype, "parallel", void 0), k([_({ default: () => [0, 0] }), O("design:type", Array)], q.prototype, "center", void 0), k([_({ fallback: 1 }), O("design:type", Number)], q.prototype, "alpha", void 0), q = ri = k([b("GodrayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6140
+ k([_({ fallback: 0 }), O("design:type", Number)], q.prototype, "time", void 0), k([_({ fallback: 30 }), O("design:type", Number)], q.prototype, "angle", void 0), k([_({ fallback: .5 }), O("design:type", Number)], q.prototype, "gain", void 0), k([_({ fallback: 2.5 }), O("design:type", Number)], q.prototype, "lacunarity", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], q.prototype, "parallel", void 0), k([_({ default: () => [0, 0] }), O("design:type", Array)], q.prototype, "center", void 0), k([_({ fallback: 1 }), O("design:type", Number)], q.prototype, "alpha", void 0), q = ii = k([S("GodrayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6141
6141
  //#endregion
6142
6142
  //#region src/scene/effects/KawaseBlurEffect.ts
6143
- var ai = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}", oi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}", si = class extends U {
6143
+ var oi = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}", si = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}", ci = class extends U {
6144
6144
  _kernels = [0];
6145
6145
  constructor(e, t = []) {
6146
6146
  super(), this.material = new I({ gl: {
6147
6147
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6148
- fragment: e?.clamp ? oi : ai
6148
+ fragment: e?.clamp ? si : oi
6149
6149
  } }), this.setProperties(e).append(t), this._generateKernels();
6150
6150
  }
6151
6151
  _updateProperty(e, t, n) {
@@ -6183,12 +6183,12 @@ var ai = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6183
6183
  });
6184
6184
  }
6185
6185
  };
6186
- k([_({ fallback: 4 }), O("design:type", Number)], si.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], si.prototype, "quality", void 0), k([_({ default: () => [1, 1] }), O("design:type", Array)], si.prototype, "pixelSize", void 0), si = k([b("KawaseBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], si);
6186
+ k([_({ fallback: 4 }), O("design:type", Number)], ci.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], ci.prototype, "quality", void 0), k([_({ default: () => [1, 1] }), O("design:type", Array)], ci.prototype, "pixelSize", void 0), ci = k([S("KawaseBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ci);
6187
6187
  //#endregion
6188
6188
  //#region src/scene/effects/MaskEffect.ts
6189
- var ci, li = class extends U {
6189
+ var li, ui = class extends U {
6190
6190
  static {
6191
- ci = this;
6191
+ li = this;
6192
6192
  }
6193
6193
  static material = new I({ gl: {
6194
6194
  vertex: "attribute vec2 position;\nin vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6210,7 +6210,7 @@ var ci, li = class extends U {
6210
6210
  }
6211
6211
  apply(e, t, n) {
6212
6212
  this.texture && t.redraw(e, () => {
6213
- this.texture.activate(e, 1), L.draw(e, ci.material, {
6213
+ this.texture.activate(e, 1), L.draw(e, li.material, {
6214
6214
  sampler: 0,
6215
6215
  mask: 1,
6216
6216
  rotation: n.target?.globalRotation ?? 0
@@ -6218,23 +6218,23 @@ var ci, li = class extends U {
6218
6218
  });
6219
6219
  }
6220
6220
  };
6221
- k([_({ fallback: "" }), O("design:type", String)], li.prototype, "image", void 0), li = ci = k([b("MaskEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], li);
6221
+ k([_({ fallback: "" }), O("design:type", String)], ui.prototype, "image", void 0), ui = li = k([S("MaskEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ui);
6222
6222
  //#endregion
6223
6223
  //#region src/scene/effects/OutlineEffect.ts
6224
- var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = {ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vUv.x + uThickness.x * cos(angle);\n displacedPos.y = vUv.y + uThickness.y * sin(angle);\n displacedColor = texture2D(sampler, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture2D(sampler, vUv);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vUv.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n gl_FragColor = contentColor + outlineColor;\n}", J = class extends U {
6224
+ var di, fi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = {ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vUv.x + uThickness.x * cos(angle);\n displacedPos.y = vUv.y + uThickness.y * sin(angle);\n displacedColor = texture2D(sampler, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture2D(sampler, vUv);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vUv.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n gl_FragColor = contentColor + outlineColor;\n}", J = class extends U {
6225
6225
  static {
6226
- ui = this;
6226
+ di = this;
6227
6227
  }
6228
6228
  static MIN_SAMPLES = 1;
6229
6229
  static MAX_SAMPLES = 100;
6230
6230
  static getAngleStep(e) {
6231
- return Number.parseFloat((Math.PI * 2 / Math.max(e * ui.MAX_SAMPLES, ui.MIN_SAMPLES)).toFixed(7));
6231
+ return Number.parseFloat((Math.PI * 2 / Math.max(e * di.MAX_SAMPLES, di.MIN_SAMPLES)).toFixed(7));
6232
6232
  }
6233
- _color = new T();
6233
+ _color = new yt();
6234
6234
  constructor(e, t = []) {
6235
6235
  super(), this.setProperties(e).append(t), this.material = new I({ gl: {
6236
6236
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6237
- fragment: di.replace(/\{ANGLE_STEP\}/, ui.getAngleStep(this.quality).toFixed(7))
6237
+ fragment: fi.replace(/\{ANGLE_STEP\}/, di.getAngleStep(this.quality).toFixed(7))
6238
6238
  } });
6239
6239
  }
6240
6240
  apply(e, t) {
@@ -6244,7 +6244,7 @@ var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6244
6244
  uThickness: [this.width / t.width, this.width / t.height],
6245
6245
  uColor: this._color.toArray().slice(0, 3),
6246
6246
  uAlpha: this.opacity === 1 ? this._color.a : this.opacity,
6247
- uAngleStep: ui.getAngleStep(this.quality),
6247
+ uAngleStep: di.getAngleStep(this.quality),
6248
6248
  uKnockout: +!!this.knockout,
6249
6249
  uInputClamp: [
6250
6250
  0,
@@ -6256,12 +6256,12 @@ var ui, di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6256
6256
  });
6257
6257
  }
6258
6258
  };
6259
- k([_({ fallback: "#000000ff" }), O("design:type", Object)], J.prototype, "color", void 0), k([_({ fallback: 1 }), O("design:type", Number)], J.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", String)], J.prototype, "style", void 0), k([_(), O("design:type", Object)], J.prototype, "image", void 0), k([_({ fallback: 1 }), O("design:type", Number)], J.prototype, "opacity", void 0), k([_({ fallback: .1 }), O("design:type", Number)], J.prototype, "quality", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], J.prototype, "knockout", void 0), J = ui = k([b("OutlineEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6259
+ k([_({ fallback: "#000000ff" }), O("design:type", Object)], J.prototype, "color", void 0), k([_({ fallback: 1 }), O("design:type", Number)], J.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", String)], J.prototype, "style", void 0), k([_(), O("design:type", Object)], J.prototype, "image", void 0), k([_({ fallback: 1 }), O("design:type", Number)], J.prototype, "opacity", void 0), k([_({ fallback: .1 }), O("design:type", Number)], J.prototype, "quality", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], J.prototype, "knockout", void 0), J = di = k([S("OutlineEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6260
6260
  //#endregion
6261
6261
  //#region src/scene/effects/PixelateEffect.ts
6262
- var fi, pi = class extends U {
6262
+ var pi, mi = class extends U {
6263
6263
  static {
6264
- fi = this;
6264
+ pi = this;
6265
6265
  }
6266
6266
  static material = new I({ gl: {
6267
6267
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6277,16 +6277,16 @@ var fi, pi = class extends U {
6277
6277
  offset: [(r[0] + i[0]) / t.width, 1 - (r[1] + i[1]) / t.height],
6278
6278
  step: [this.strength * r[0] / t.width, this.strength * r[1] / t.height]
6279
6279
  };
6280
- L.draw(e, fi.material, a);
6280
+ L.draw(e, pi.material, a);
6281
6281
  });
6282
6282
  }
6283
6283
  };
6284
- k([_({ fallback: 10 }), O("design:type", Number)], pi.prototype, "strength", void 0), pi = fi = k([b("PixelateEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], pi);
6284
+ k([_({ fallback: 10 }), O("design:type", Number)], mi.prototype, "strength", void 0), mi = pi = k([S("PixelateEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], mi);
6285
6285
  //#endregion
6286
6286
  //#region src/scene/effects/ZoomBlurEffect.ts
6287
- var mi, hi = class extends U {
6287
+ var hi, gi = class extends U {
6288
6288
  static {
6289
- mi = this;
6289
+ hi = this;
6290
6290
  }
6291
6291
  static material = new I({ gl: {
6292
6292
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6297,7 +6297,7 @@ var mi, hi = class extends U {
6297
6297
  }
6298
6298
  apply(e, t) {
6299
6299
  t.redraw(e, () => {
6300
- L.draw(e, mi.material, {
6300
+ L.draw(e, hi.material, {
6301
6301
  sampler: 0,
6302
6302
  uCenter: [t.width / 2, t.height / 2],
6303
6303
  uInnerRadius: this.innerRadius,
@@ -6313,11 +6313,11 @@ var mi, hi = class extends U {
6313
6313
  });
6314
6314
  }
6315
6315
  };
6316
- k([_(), O("design:type", Array)], hi.prototype, "center", void 0), k([_({ fallback: 20 }), O("design:type", Number)], hi.prototype, "innerRadius", void 0), k([_({ fallback: -1 }), O("design:type", Number)], hi.prototype, "radius", void 0), k([_({ fallback: .1 }), O("design:type", Number)], hi.prototype, "strength", void 0), hi = mi = k([b("ZoomBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], hi);
6316
+ k([_(), O("design:type", Array)], gi.prototype, "center", void 0), k([_({ fallback: 20 }), O("design:type", Number)], gi.prototype, "innerRadius", void 0), k([_({ fallback: -1 }), O("design:type", Number)], gi.prototype, "radius", void 0), k([_({ fallback: .1 }), O("design:type", Number)], gi.prototype, "strength", void 0), gi = hi = k([S("ZoomBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], gi);
6317
6317
  //#endregion
6318
6318
  //#region src/scene/2d/element/utils.ts
6319
- function gi(e, t) {
6320
- let { x: n, y: r, width: i, height: a } = t, o = !1, s = new v().translate(-n, -r).scale(1 / i, 1 / a);
6319
+ function _i(e, t) {
6320
+ let { x: n, y: r, width: i, height: a } = t, o = !1, s = new b().translate(-n, -r).scale(1 / i, 1 / a);
6321
6321
  if (e.cropRect) {
6322
6322
  let { left: t = 0, top: n = 0, right: r = 0, bottom: i = 0 } = e.cropRect;
6323
6323
  s.scale(1 - (t + r), 1 - (n + i)).translate(t, n), o = !0;
@@ -6338,7 +6338,7 @@ function gi(e, t) {
6338
6338
  }
6339
6339
  //#endregion
6340
6340
  //#region src/scene/2d/element/Element2DFill.ts
6341
- var Y = class extends C {
6341
+ var Y = class extends T {
6342
6342
  _parent;
6343
6343
  texture;
6344
6344
  animatedTexture;
@@ -6349,7 +6349,7 @@ var Y = class extends C {
6349
6349
  return super.setProperties(e);
6350
6350
  }
6351
6351
  setProperties(e) {
6352
- return this._setProperties(d(e) ? void 0 : h(e));
6352
+ return this._setProperties(d(e) ? void 0 : g(e));
6353
6353
  }
6354
6354
  _updateProperty(e, t, n) {
6355
6355
  switch (super._updateProperty(e, t, n), e) {
@@ -6371,7 +6371,7 @@ var Y = class extends C {
6371
6371
  }
6372
6372
  }
6373
6373
  async loadTexture() {
6374
- if (this.linearGradient || this.radialGradient) this.texture = new nr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6374
+ if (this.linearGradient || this.radialGradient) this.texture = new rr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6375
6375
  else if (d(this.image)) this.animatedTexture = void 0, this.texture = void 0;
6376
6376
  else if (this._parent.tree?.log(`load image ${this.image}`), this.image !== "viewport") {
6377
6377
  let e = this.image.split("?")[0].endsWith(".gif"), t = this.image, n = await $.loadBy(t, async () => {
@@ -6392,12 +6392,12 @@ var Y = class extends C {
6392
6392
  width: e,
6393
6393
  height: t
6394
6394
  } };
6395
- if (this.image === "viewport") n.fillStyle = new or();
6395
+ if (this.image === "viewport") n.fillStyle = new sr();
6396
6396
  else {
6397
6397
  let i = this.animatedTexture?.currentFrame.texture ?? this.texture;
6398
6398
  r = {
6399
6399
  ...r,
6400
- ...gi(this, this.tile && i ? {
6400
+ ..._i(this, this.tile && i ? {
6401
6401
  x: 0,
6402
6402
  y: 0,
6403
6403
  width: i.sourceWidth,
@@ -6436,7 +6436,7 @@ var Y = class extends C {
6436
6436
  k([_({ fallback: !0 }), O("design:type", Boolean)], Y.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Y.prototype, "color", void 0), k([_(), O("design:type", Object)], Y.prototype, "image", void 0), k([_(), O("design:type", Object)], Y.prototype, "linearGradient", void 0), k([_(), O("design:type", Object)], Y.prototype, "radialGradient", void 0), k([_(), O("design:type", Object)], Y.prototype, "cropRect", void 0), k([_(), O("design:type", Object)], Y.prototype, "stretchRect", void 0), k([_(), O("design:type", Object)], Y.prototype, "dpi", void 0), k([_(), O("design:type", Object)], Y.prototype, "rotateWithShape", void 0), k([_(), O("design:type", Object)], Y.prototype, "tile", void 0), k([_(), O("design:type", Object)], Y.prototype, "opacity", void 0);
6437
6437
  //#endregion
6438
6438
  //#region src/scene/2d/element/Element2DBackground.ts
6439
- var _i = class extends Y {
6439
+ var vi = class extends Y {
6440
6440
  setProperties(e) {
6441
6441
  return super._setProperties(d(e) ? void 0 : f(e));
6442
6442
  }
@@ -6448,14 +6448,14 @@ var _i = class extends Y {
6448
6448
  }
6449
6449
  }
6450
6450
  };
6451
- k([_(), O("design:type", Object)], _i.prototype, "fillWithShape", void 0);
6451
+ k([_(), O("design:type", Object)], vi.prototype, "fillWithShape", void 0);
6452
6452
  //#endregion
6453
6453
  //#region src/scene/2d/element/Element2DChart.ts
6454
- var vi;
6455
- function yi() {
6456
- return vi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), vi;
6454
+ var yi;
6455
+ function bi() {
6456
+ return yi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), yi;
6457
6457
  }
6458
- function bi(e) {
6458
+ function xi(e) {
6459
6459
  if (!e) return { show: !1 };
6460
6460
  switch (e) {
6461
6461
  case "bottom": return {
@@ -6478,7 +6478,7 @@ function bi(e) {
6478
6478
  };
6479
6479
  }
6480
6480
  }
6481
- var X = class extends C {
6481
+ var X = class extends T {
6482
6482
  _parent;
6483
6483
  _instance;
6484
6484
  _container;
@@ -6521,7 +6521,7 @@ var X = class extends C {
6521
6521
  this._teardown(), this._parent.requestDraw();
6522
6522
  return;
6523
6523
  }
6524
- let n = await yi();
6524
+ let n = await bi();
6525
6525
  if (!n) {
6526
6526
  console.warn("[modern-canvas] chart rendering requires the optional \"echarts\" dependency (e.g. `pnpm add echarts`)"), this._renderPlaceholder(e, t);
6527
6527
  return;
@@ -6546,7 +6546,7 @@ var X = class extends C {
6546
6546
  }), this._instance.setOption(this._toOption(), !0), !this._texture) {
6547
6547
  let e = this._container.querySelector("canvas");
6548
6548
  if (!e) return;
6549
- this._texture = new er({
6549
+ this._texture = new tr({
6550
6550
  source: e,
6551
6551
  pixelRatio: 1
6552
6552
  });
@@ -6559,7 +6559,7 @@ var X = class extends C {
6559
6559
  let n = document.createElement("canvas");
6560
6560
  n.width = Math.ceil(e), n.height = Math.ceil(t);
6561
6561
  let r = n.getContext("2d");
6562
- r && (r.fillStyle = "#f3f4f6", r.fillRect(0, 0, e, t), r.strokeStyle = "#d1d5db", r.setLineDash([6, 4]), r.strokeRect(1, 1, e - 2, t - 2), r.fillStyle = "#9ca3af", r.font = "14px sans-serif", r.textAlign = "center", r.textBaseline = "middle", r.fillText("图表需安装 echarts", e / 2, t / 2), this._texture ? this._texture.source = n : this._texture = new er({
6562
+ r && (r.fillStyle = "#f3f4f6", r.fillRect(0, 0, e, t), r.strokeStyle = "#d1d5db", r.setLineDash([6, 4]), r.strokeRect(1, 1, e - 2, t - 2), r.fillStyle = "#9ca3af", r.font = "14px sans-serif", r.textAlign = "center", r.textBaseline = "middle", r.fillText("图表需安装 echarts", e / 2, t / 2), this._texture ? this._texture.source = n : this._texture = new tr({
6563
6563
  source: n,
6564
6564
  pixelRatio: 1
6565
6565
  }), this._texture.requestUpdate("source"), this._parent.requestDraw());
@@ -6569,7 +6569,7 @@ var X = class extends C {
6569
6569
  if (!e?.isValid()) return;
6570
6570
  let { width: t, height: n } = this._parent.size, r = this._parent.context;
6571
6571
  this._parent.shape.draw(!0), r.fillStyle = e;
6572
- let { a: i, c: a, tx: o, b: s, d: c, ty: l } = new v().scale(1 / t, 1 / n), u, d;
6572
+ let { a: i, c: a, tx: o, b: s, d: c, ty: l } = new b().scale(1 / t, 1 / n), u, d;
6573
6573
  r.fill({ transformUv: (e, t) => {
6574
6574
  u = e[t], d = e[t + 1], e[t] = i * u + a * d + o, e[t + 1] = s * u + c * d + l;
6575
6575
  } });
@@ -6580,7 +6580,7 @@ var X = class extends C {
6580
6580
  text: this.title,
6581
6581
  left: "center"
6582
6582
  } : void 0,
6583
- legend: bi(this.legend),
6583
+ legend: xi(this.legend),
6584
6584
  tooltip: {}
6585
6585
  };
6586
6586
  if (n) {
@@ -6626,8 +6626,42 @@ var X = class extends C {
6626
6626
  };
6627
6627
  k([_({ fallback: !0 }), O("design:type", Boolean)], X.prototype, "enabled", void 0), k([_({ fallback: "column" }), O("design:type", Object)], X.prototype, "type", void 0), k([_(), O("design:type", Object)], X.prototype, "grouping", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], X.prototype, "categories", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], X.prototype, "series", void 0), k([_(), O("design:type", Object)], X.prototype, "title", void 0), k([_(), O("design:type", Object)], X.prototype, "legend", void 0), k([_(), O("design:type", Object)], X.prototype, "categoryAxis", void 0), k([_(), O("design:type", Object)], X.prototype, "valueAxis", void 0);
6628
6628
  //#endregion
6629
- //#region src/scene/2d/element/Element2DConnection.ts
6630
- var xi = class extends C {
6629
+ //#region src/scene/2d/element/Element2DComments.ts
6630
+ var Si = class extends T {
6631
+ parent;
6632
+ constructor(e) {
6633
+ super(), this.parent = e;
6634
+ }
6635
+ getPropertyDeclarations() {
6636
+ super.getPropertyDeclarations();
6637
+ let e = {};
6638
+ return Object.keys(this._properties).forEach((t) => {
6639
+ e[t] = { internalKey: `____${t}` };
6640
+ }), e;
6641
+ }
6642
+ getPropertyDeclaration(e) {
6643
+ return { internalKey: `____${e}` };
6644
+ }
6645
+ setProperties(e) {
6646
+ if (Array.isArray(e)) {
6647
+ let t = {};
6648
+ return e.forEach((e) => {
6649
+ let n = e.id ?? c();
6650
+ t[n] = {
6651
+ ...e,
6652
+ id: n
6653
+ };
6654
+ }), super.setProperties(t);
6655
+ }
6656
+ return super.setProperties(e);
6657
+ }
6658
+ toJSON() {
6659
+ return m(Object.values(this._properties)) ?? [];
6660
+ }
6661
+ isValid() {
6662
+ return Object.keys(this._properties).length > 0;
6663
+ }
6664
+ }, Ci = class extends T {
6631
6665
  _parent;
6632
6666
  _routeSig;
6633
6667
  _routePath;
@@ -6635,7 +6669,7 @@ var xi = class extends C {
6635
6669
  super(), this._parent = e;
6636
6670
  }
6637
6671
  setProperties(e) {
6638
- return super.setProperties(d(e) ? void 0 : m(e));
6672
+ return super.setProperties(d(e) ? void 0 : h(e));
6639
6673
  }
6640
6674
  isValid() {
6641
6675
  return !!(this.start?.id || this.end?.id);
@@ -6669,19 +6703,19 @@ var xi = class extends C {
6669
6703
  if (e.idx !== void 0) {
6670
6704
  let n = t.shape.connectionPoints?.find((t) => t.idx === e.idx);
6671
6705
  if (n) {
6672
- let e = t.globalTransform.apply(new y(n.x * t.size.x, n.y * t.size.y)), i;
6673
- return i = n.ang === void 0 ? Er(n.x - .5, n.y - .5) : {
6706
+ let e = t.globalTransform.apply(new x(n.x * t.size.x, n.y * t.size.y)), i;
6707
+ return i = n.ang === void 0 ? Dr(n.x - .5, n.y - .5) : {
6674
6708
  x: Math.cos(n.ang),
6675
6709
  y: Math.sin(n.ang)
6676
6710
  }, {
6677
6711
  point: e,
6678
- dir: Si(i, t.globalRotation),
6712
+ dir: wi(i, t.globalRotation),
6679
6713
  bbox: r
6680
6714
  };
6681
6715
  }
6682
6716
  }
6683
6717
  return {
6684
- point: new y(n.min.x + n.size.x / 2, n.min.y + n.size.y / 2),
6718
+ point: new x(n.min.x + n.size.x / 2, n.min.y + n.size.y / 2),
6685
6719
  bbox: r
6686
6720
  };
6687
6721
  }
@@ -6698,11 +6732,11 @@ var xi = class extends C {
6698
6732
  return;
6699
6733
  }
6700
6734
  let n = (e) => e ? `${e.point.x},${e.point.y},${e.dir?.x ?? ""},${e.dir?.y ?? ""}` : "-", r = `${this.mode}|${n(e)}|${n(t)}`;
6701
- return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Dr(this.mode, e ?? t, t ?? e)), this._routePath;
6735
+ return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Or(this.mode, e ?? t, t ?? e)), this._routePath;
6702
6736
  }
6703
6737
  };
6704
- k([_(), O("design:type", Object)], xi.prototype, "start", void 0), k([_(), O("design:type", Object)], xi.prototype, "end", void 0), k([_({ fallback: "straight" }), O("design:type", Object)], xi.prototype, "mode", void 0), k([_({ fallback: .5 }), O("design:type", Number)], xi.prototype, "labelPosition", void 0);
6705
- function Si(e, t) {
6738
+ k([_(), O("design:type", Object)], Ci.prototype, "start", void 0), k([_(), O("design:type", Object)], Ci.prototype, "end", void 0), k([_({ fallback: "straight" }), O("design:type", Object)], Ci.prototype, "mode", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Ci.prototype, "labelPosition", void 0);
6739
+ function wi(e, t) {
6706
6740
  if (!t) return e;
6707
6741
  let n = Math.cos(t), r = Math.sin(t);
6708
6742
  return {
@@ -6712,29 +6746,29 @@ function Si(e, t) {
6712
6746
  }
6713
6747
  //#endregion
6714
6748
  //#region src/scene/2d/element/bakeImageEffects.ts
6715
- function Ci(e) {
6749
+ function Ti(e) {
6716
6750
  return e.getContext("2d");
6717
6751
  }
6718
- function wi(e, t, n, r) {
6752
+ function Ei(e, t, n, r) {
6719
6753
  let i = (t?.angle ?? 0) * Math.PI / 180, a = n / 2, o = r / 2, s = (Math.abs(Math.cos(i)) * n + Math.abs(Math.sin(i)) * r) / 2, c = Math.cos(i) * s, l = Math.sin(i) * s, u = e.createLinearGradient(a - c, o - l, a + c, o + l);
6720
6754
  for (let e of t?.stops ?? []) u.addColorStop(Math.min(1, Math.max(0, e.offset)), e.color);
6721
6755
  return u;
6722
6756
  }
6723
- function Ti(e, t, n, r, i) {
6724
- let a = S(t, n), o = Ci(a);
6725
- return o.drawImage(e, 0, 0, t, n), o.globalCompositeOperation = "source-in", r.linearGradient ? (o.fillStyle = wi(o, r.linearGradient, t, n), o.fillRect(0, 0, t, n)) : r.image && i[r.image] ? o.drawImage(i[r.image], 0, 0, t, n) : r.color && (o.fillStyle = r.color, o.fillRect(0, 0, t, n)), a;
6757
+ function Di(e, t, n, r, i) {
6758
+ let a = w(t, n), o = Ti(a);
6759
+ return o.drawImage(e, 0, 0, t, n), o.globalCompositeOperation = "source-in", r.linearGradient ? (o.fillStyle = Ei(o, r.linearGradient, t, n), o.fillRect(0, 0, t, n)) : r.image && i[r.image] ? o.drawImage(i[r.image], 0, 0, t, n) : r.color && (o.fillStyle = r.color, o.fillRect(0, 0, t, n)), a;
6726
6760
  }
6727
- function Ei(e, t, n, r, i) {
6728
- let a = S(t, n), o = Ci(a), s = Math.max(8, Math.ceil(r) * 2);
6761
+ function Oi(e, t, n, r, i) {
6762
+ let a = w(t, n), o = Ti(a), s = Math.max(8, Math.ceil(r) * 2);
6729
6763
  for (let i = 0; i < s; i++) {
6730
6764
  let a = i / s * Math.PI * 2;
6731
6765
  o.drawImage(e, Math.cos(a) * r, Math.sin(a) * r, t, n);
6732
6766
  }
6733
6767
  o.globalCompositeOperation = "source-in", o.fillStyle = i, o.fillRect(0, 0, t, n);
6734
- let c = S(t, n), l = Ci(c);
6768
+ let c = w(t, n), l = Ti(c);
6735
6769
  return l.drawImage(a, 0, 0), l.drawImage(e, 0, 0, t, n), c;
6736
6770
  }
6737
- function Di(e) {
6771
+ function ki(e) {
6738
6772
  let t = 0, n = 0;
6739
6773
  if (!e) return {
6740
6774
  x: t,
@@ -6750,35 +6784,35 @@ function Di(e) {
6750
6784
  y: n
6751
6785
  };
6752
6786
  }
6753
- function Oi(e, t, n, r, i = {}) {
6787
+ function Ai(e, t, n, r, i = {}) {
6754
6788
  let a = Math.max(1, Math.round(n)), o = Math.max(1, Math.round(r)), s = 0;
6755
6789
  for (let e of t) {
6756
6790
  e.outline?.width && e.outline.color && (s = Math.max(s, e.outline.width));
6757
- let t = Di(e.transform);
6791
+ let t = ki(e.transform);
6758
6792
  s = Math.max(s, Math.abs(t.x), Math.abs(t.y));
6759
6793
  }
6760
6794
  s = Math.min(Math.ceil(s), Math.floor(Math.min(a, o) * .2));
6761
6795
  let c = e;
6762
6796
  if (s > 0) {
6763
- let t = S(a, o);
6764
- Ci(t).drawImage(e, s, s, Math.max(1, a - s * 2), Math.max(1, o - s * 2)), c = t;
6797
+ let t = w(a, o);
6798
+ Ti(t).drawImage(e, s, s, Math.max(1, a - s * 2), Math.max(1, o - s * 2)), c = t;
6765
6799
  }
6766
- let l = S(a, o), u = Ci(l);
6800
+ let l = w(a, o), u = Ti(l);
6767
6801
  for (let e of t) {
6768
6802
  let t = c;
6769
- e.fill && (e.fill.color || e.fill.linearGradient || e.fill.image) && (t = Ti(t, a, o, e.fill, i)), e.outline?.width && e.outline.color && (t = Ei(t, a, o, e.outline.width, e.outline.color));
6770
- let { x: n, y: r } = Di(e.transform);
6803
+ e.fill && (e.fill.color || e.fill.linearGradient || e.fill.image) && (t = Di(t, a, o, e.fill, i)), e.outline?.width && e.outline.color && (t = Oi(t, a, o, e.outline.width, e.outline.color));
6804
+ let { x: n, y: r } = ki(e.transform);
6771
6805
  u.save(), u.globalCompositeOperation = "destination-over", e.shadow && (u.shadowColor = e.shadow.color, u.shadowBlur = e.shadow.blur ?? 0, u.shadowOffsetX = e.shadow.offsetX ?? 0, u.shadowOffsetY = e.shadow.offsetY ?? 0), u.drawImage(t, n, r, a, o), u.restore();
6772
6806
  }
6773
6807
  return l;
6774
6808
  }
6775
6809
  //#endregion
6776
6810
  //#region src/scene/2d/element/Element2DForeground.ts
6777
- var ki = class extends Y {
6811
+ var ji = class extends Y {
6778
6812
  _sourceCanvas;
6779
6813
  _sourceImage;
6780
6814
  setProperties(e) {
6781
- return super._setProperties(d(e) ? void 0 : g(e));
6815
+ return super._setProperties(d(e) ? void 0 : ee(e));
6782
6816
  }
6783
6817
  _updateProperty(e, t, n) {
6784
6818
  switch (super._updateProperty(e, t, n), e) {
@@ -6800,7 +6834,7 @@ var ki = class extends Y {
6800
6834
  }
6801
6835
  let e = await this._resolveSourceCanvas();
6802
6836
  if (!e) return;
6803
- let t = e.width, n = e.height, r = await this._resolvePatterns(), i = Oi(e, this.effects, t, n, r);
6837
+ let t = e.width, n = e.height, r = await this._resolvePatterns(), i = Ai(e, this.effects, t, n, r);
6804
6838
  this.texture = new z({
6805
6839
  source: i,
6806
6840
  width: t,
@@ -6815,7 +6849,7 @@ var ki = class extends Y {
6815
6849
  if (!n || d(n) || e[n]) continue;
6816
6850
  let r = await $.loadBy(`${n}#mc-foreground-pattern`, async () => {
6817
6851
  let e = await $.fetchImageBitmap(n), t = this._snapshot(e);
6818
- return Pe && e instanceof ImageBitmap && e.close(), t;
6852
+ return Ne && e instanceof ImageBitmap && e.close(), t;
6819
6853
  });
6820
6854
  r && (e[n] = r);
6821
6855
  }
@@ -6826,25 +6860,25 @@ var ki = class extends Y {
6826
6860
  if (d(this.image) || this.image === "viewport") return;
6827
6861
  let e = this.image, t = await $.loadBy(`${e}#mc-foreground-source`, async () => {
6828
6862
  let t = await $.fetchImageBitmap(e), n = this._snapshot(t);
6829
- return Pe && t instanceof ImageBitmap && t.close(), n;
6863
+ return Ne && t instanceof ImageBitmap && t.close(), n;
6830
6864
  });
6831
6865
  return this._sourceImage === e && t && (this._sourceCanvas = t), t;
6832
6866
  }
6833
6867
  _snapshot(e) {
6834
- let t = Math.max(1, Math.round(e.width)), n = Math.max(1, Math.round(e.height)), r = S(t, n), i = r?.getContext("2d");
6868
+ let t = Math.max(1, Math.round(e.width)), n = Math.max(1, Math.round(e.height)), r = w(t, n), i = r?.getContext("2d");
6835
6869
  if (!(!r || !i)) return i.drawImage(e, 0, 0, t, n), r;
6836
6870
  }
6837
6871
  };
6838
- k([_(), O("design:type", Object)], ki.prototype, "fillWithShape", void 0), k([_(), O("design:type", Array)], ki.prototype, "effects", void 0);
6872
+ k([_(), O("design:type", Object)], ji.prototype, "fillWithShape", void 0), k([_(), O("design:type", Array)], ji.prototype, "effects", void 0);
6839
6873
  //#endregion
6840
6874
  //#region src/scene/2d/element/Element2DOutline.ts
6841
- var Ai = {
6875
+ var Mi = {
6842
6876
  sm: 4,
6843
6877
  md: 6,
6844
6878
  lg: 8
6845
- }, ji = class extends Y {
6879
+ }, Ni = class extends Y {
6846
6880
  setProperties(e) {
6847
- return super._setProperties(d(e) ? void 0 : ee(e));
6881
+ return super._setProperties(d(e) ? void 0 : te(e));
6848
6882
  }
6849
6883
  _updateProperty(e, t, n) {
6850
6884
  switch (super._updateProperty(e, t, n), e) {
@@ -6864,7 +6898,7 @@ var Ai = {
6864
6898
  }
6865
6899
  draw() {
6866
6900
  let { width: e, height: t } = this._parent.size, n = this._parent.context;
6867
- this.image === "viewport" ? n.strokeStyle = new or() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...gi(this, {
6901
+ this.image === "viewport" ? n.strokeStyle = new sr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ..._i(this, {
6868
6902
  x: 0,
6869
6903
  y: 0,
6870
6904
  width: e,
@@ -6887,20 +6921,20 @@ var Ai = {
6887
6921
  _fillEnd(e, t, n, r, i) {
6888
6922
  let a = e.x - t.x, o = e.y - t.y, s = Math.hypot(a, o);
6889
6923
  if (s < .001) return;
6890
- let c = Ai[String(n.width ?? n.height ?? "md")] ?? 6, l = r * c, u = r * c * .5, d = a / s, f = o / s, p = e.x - d * l, m = e.y - f * l, h = -f * u, g = d * u, ee = this._parent.context;
6924
+ let c = Mi[String(n.width ?? n.height ?? "md")] ?? 6, l = r * c, u = r * c * .5, d = a / s, f = o / s, p = e.x - d * l, m = e.y - f * l, h = -f * u, g = d * u, ee = this._parent.context;
6891
6925
  ee.fillStyle = i, ee.moveTo(e.x, e.y).lineTo(p + h, m + g).lineTo(p - h, m - g).closePath().fill();
6892
6926
  }
6893
6927
  };
6894
- k([_(), O("design:type", Object)], ji.prototype, "color", void 0), k([_(), O("design:type", Object)], ji.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", Object)], ji.prototype, "style", void 0), k([_({ fallback: "butt" }), O("design:type", Object)], ji.prototype, "lineCap", void 0), k([_({ fallback: "miter" }), O("design:type", Object)], ji.prototype, "lineJoin", void 0), k([_(), O("design:type", Object)], ji.prototype, "headEnd", void 0), k([_(), O("design:type", Object)], ji.prototype, "tailEnd", void 0);
6928
+ k([_(), O("design:type", Object)], Ni.prototype, "color", void 0), k([_(), O("design:type", Object)], Ni.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", Object)], Ni.prototype, "style", void 0), k([_({ fallback: "butt" }), O("design:type", Object)], Ni.prototype, "lineCap", void 0), k([_({ fallback: "miter" }), O("design:type", Object)], Ni.prototype, "lineJoin", void 0), k([_(), O("design:type", Object)], Ni.prototype, "headEnd", void 0), k([_(), O("design:type", Object)], Ni.prototype, "tailEnd", void 0);
6895
6929
  //#endregion
6896
6930
  //#region src/scene/2d/element/Element2DShadow.ts
6897
- var Mi = class extends C {
6931
+ var Pi = class extends T {
6898
6932
  _parent;
6899
6933
  constructor(e) {
6900
6934
  super(), this._parent = e;
6901
6935
  }
6902
6936
  setProperties(e) {
6903
- return super.setProperties(d(e) ? void 0 : te(e));
6937
+ return super.setProperties(d(e) ? void 0 : ne(e));
6904
6938
  }
6905
6939
  _updateProperty(e, t, n) {
6906
6940
  switch (super._updateProperty(e, t, n), e) {
@@ -6915,13 +6949,13 @@ var Mi = class extends C {
6915
6949
  }
6916
6950
  updateEffect() {
6917
6951
  let e = "__$shadow", t = this._parent.getNode(e);
6918
- this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new $r({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
6952
+ this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new ei({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
6919
6953
  }
6920
6954
  };
6921
- k([_({ fallback: !0 }), O("design:type", Boolean)], Mi.prototype, "enabled", void 0), k([_({ fallback: "#000000FF" }), O("design:type", Object)], Mi.prototype, "color", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Mi.prototype, "blur", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Mi.prototype, "offsetY", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Mi.prototype, "offsetX", void 0);
6955
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Pi.prototype, "enabled", void 0), k([_({ fallback: "#000000FF" }), O("design:type", Object)], Pi.prototype, "color", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Pi.prototype, "blur", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Pi.prototype, "offsetY", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Pi.prototype, "offsetX", void 0);
6922
6956
  //#endregion
6923
6957
  //#region src/scene/2d/element/Element2DShape.ts
6924
- var Ni = class extends C {
6958
+ var Fi = class extends T {
6925
6959
  _parent;
6926
6960
  _path2DSet = new ue();
6927
6961
  _localPath;
@@ -6938,7 +6972,7 @@ var Ni = class extends C {
6938
6972
  return this._localPath;
6939
6973
  }
6940
6974
  setProperties(e) {
6941
- return super.setProperties(d(e) ? void 0 : ne(e));
6975
+ return super.setProperties(d(e) ? void 0 : re(e));
6942
6976
  }
6943
6977
  _updateProperty(e, t, n) {
6944
6978
  switch (super._updateProperty(e, t, n), e) {
@@ -6971,7 +7005,7 @@ var Ni = class extends C {
6971
7005
  let { width: e, height: t } = this._parent.size;
6972
7006
  if (!(!e || !t)) {
6973
7007
  if (!this._hitPath2DSet || this._hitWidth !== e || this._hitHeight !== t) {
6974
- let n = new v().scale(e, t);
7008
+ let n = new b().scale(e, t);
6975
7009
  this._hitPath2DSet = new ue(this._path2DSet.paths.map((e) => e.clone().applyTransform(n))), this._hitWidth = e, this._hitHeight = t;
6976
7010
  }
6977
7011
  return this._hitPath2DSet;
@@ -6980,10 +7014,10 @@ var Ni = class extends C {
6980
7014
  _updatePath2DSet() {
6981
7015
  let e;
6982
7016
  if (this.svg) {
6983
- let t = fe(this.svg);
6984
- this._path2DSet = pe(t), e = this._path2DSet.viewBox;
7017
+ let t = de(this.svg);
7018
+ this._path2DSet = fe(t), e = this._path2DSet.viewBox;
6985
7019
  } else this._path2DSet.paths.length = 0, this.paths?.forEach((e, t) => {
6986
- let { data: n, ...r } = e, i = new le();
7020
+ let { data: n, ...r } = e, i = new v();
6987
7021
  i.style = r, i.addData(n), this._path2DSet.paths[t] = i;
6988
7022
  });
6989
7023
  if (!e) {
@@ -7002,7 +7036,7 @@ var Ni = class extends C {
7002
7036
  }
7003
7037
  let [t, n, r, i] = e;
7004
7038
  this._path2DSet.paths.forEach((e) => {
7005
- e.applyTransform(new v().translate(-t, -n).scale(1 / r, 1 / i));
7039
+ e.applyTransform(new b().translate(-t, -n).scale(1 / r, 1 / i));
7006
7040
  }), this._hitPath2DSet = void 0;
7007
7041
  }
7008
7042
  draw(e = !1) {
@@ -7010,7 +7044,7 @@ var Ni = class extends C {
7010
7044
  else if (!e && this.isValid()) {
7011
7045
  let e = this._parent.context, { width: t, height: n } = this._parent.size;
7012
7046
  this._path2DSet.paths.forEach((r) => {
7013
- r.style?.fillRule && (e.fillRule = r.style.fillRule), e.addPath(r.clone().applyTransform(new v().scale(t, n)));
7047
+ r.style?.fillRule && (e.fillRule = r.style.fillRule), e.addPath(r.clone().applyTransform(new b().scale(t, n)));
7014
7048
  });
7015
7049
  } else this._drawRect();
7016
7050
  }
@@ -7019,24 +7053,24 @@ var Ni = class extends C {
7019
7053
  t && n && (r ? e.roundRect(0, 0, t, n, r) : e.rect(0, 0, t, n));
7020
7054
  }
7021
7055
  };
7022
- k([_({ fallback: !0 }), O("design:type", Boolean)], Ni.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Ni.prototype, "preset", void 0), k([_(), O("design:type", Object)], Ni.prototype, "svg", void 0), k([_(), O("design:type", Object)], Ni.prototype, "viewBox", void 0), k([_(), O("design:type", Object)], Ni.prototype, "paths", void 0), k([_(), O("design:type", Object)], Ni.prototype, "connectionPoints", void 0);
7056
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Fi.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Fi.prototype, "preset", void 0), k([_(), O("design:type", Object)], Fi.prototype, "svg", void 0), k([_(), O("design:type", Object)], Fi.prototype, "viewBox", void 0), k([_(), O("design:type", Object)], Fi.prototype, "paths", void 0), k([_(), O("design:type", Object)], Fi.prototype, "connectionPoints", void 0);
7023
7057
  //#endregion
7024
7058
  //#region src/scene/2d/element/Element2DStyle.ts
7025
- var Pi = class extends w {
7059
+ var Ii = class extends E {
7026
7060
  constructor(e) {
7027
7061
  super(), this.setProperties(e);
7028
7062
  }
7029
- }, Fi = {
7063
+ }, Li = {
7030
7064
  ...o(),
7031
7065
  left: 0,
7032
7066
  top: 0,
7033
7067
  width: 0,
7034
7068
  height: 0
7035
7069
  };
7036
- for (let e in Fi) i(Pi, e, { fallback: Fi[e] });
7070
+ for (let e in Li) i(Ii, e, { fallback: Li[e] });
7037
7071
  //#endregion
7038
7072
  //#region src/scene/2d/element/Element2DTable.ts
7039
- var Ii = 100, Li = 40, Ri = class extends C {
7073
+ var Ri = 100, zi = 40, Bi = class extends T {
7040
7074
  _parent;
7041
7075
  _cellNodes = /* @__PURE__ */ new Map();
7042
7076
  _cellSnapshots = /* @__PURE__ */ new Map();
@@ -7046,7 +7080,7 @@ var Ii = 100, Li = 40, Ri = class extends C {
7046
7080
  super(), this._parent = e;
7047
7081
  }
7048
7082
  setProperties(e) {
7049
- return super.setProperties(d(e) ? void 0 : re(e));
7083
+ return super.setProperties(d(e) ? void 0 : ie(e));
7050
7084
  }
7051
7085
  _updateProperty(e, t, n) {
7052
7086
  switch (super._updateProperty(e, t, n), e) {
@@ -7067,10 +7101,10 @@ var Ii = 100, Li = 40, Ri = class extends C {
7067
7101
  return !!(this.enabled && this.cells.length);
7068
7102
  }
7069
7103
  get gridWidth() {
7070
- return this.columns.reduce((e, t) => e + (t.width || Ii), 0);
7104
+ return this.columns.reduce((e, t) => e + (t.width || Ri), 0);
7071
7105
  }
7072
7106
  get gridHeight() {
7073
- return this.rows.reduce((e, t) => e + (t.height || Li), 0);
7107
+ return this.rows.reduce((e, t) => e + (t.height || zi), 0);
7074
7108
  }
7075
7109
  update() {
7076
7110
  if (this._dirty = !1, !this.isValid()) {
@@ -7080,9 +7114,9 @@ var Ii = 100, Li = 40, Ri = class extends C {
7080
7114
  let { columns: e, rows: t, cells: n } = this, r = e.length, i = t.length;
7081
7115
  for (let e of n) r = Math.max(r, e.col + (e.colSpan || 1)), i = Math.max(i, e.row + (e.rowSpan || 1));
7082
7116
  let a = [0];
7083
- for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || Ii));
7117
+ for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || Ri));
7084
7118
  let o = [0];
7085
- for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || Li));
7119
+ for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || zi));
7086
7120
  this._parent.size.set(a[e.length] ?? 0, o[t.length] ?? 0);
7087
7121
  let s = /* @__PURE__ */ new Set();
7088
7122
  for (let e of n) {
@@ -7119,10 +7153,10 @@ var Ii = 100, Li = 40, Ri = class extends C {
7119
7153
  this._clearCells();
7120
7154
  }
7121
7155
  };
7122
- k([_({ fallback: !0 }), O("design:type", Boolean)], Ri.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ri.prototype, "columns", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ri.prototype, "rows", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ri.prototype, "cells", void 0);
7156
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Bi.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Bi.prototype, "columns", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Bi.prototype, "rows", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Bi.prototype, "cells", void 0);
7123
7157
  //#endregion
7124
7158
  //#region src/scene/2d/element/Element2DText.ts
7125
- var Z = class extends C {
7159
+ var Z = class extends T {
7126
7160
  _parent;
7127
7161
  base;
7128
7162
  get textContent() {
@@ -7133,13 +7167,13 @@ var Z = class extends C {
7133
7167
  }
7134
7168
  _textContent = "";
7135
7169
  _autoDrawMode;
7136
- _texture = new er({ mipmap: !0 });
7170
+ _texture = new tr({ mipmap: !0 });
7137
7171
  _textureMap = /* @__PURE__ */ new Map();
7138
7172
  constructor(e) {
7139
- super(), this._parent = e, this.base = new ve(), this.base.setPropertyAccessor(this);
7173
+ super(), this._parent = e, this.base = new _e(), this.base.setPropertyAccessor(this);
7140
7174
  }
7141
7175
  setProperties(e) {
7142
- return super.setProperties(d(e) ? void 0 : ie(e));
7176
+ return super.setProperties(d(e) ? void 0 : ae(e));
7143
7177
  }
7144
7178
  _updateProperty(e, t, n) {
7145
7179
  switch (super._updateProperty(e, t, n), e) {
@@ -7186,29 +7220,29 @@ var Z = class extends C {
7186
7220
  let r = [];
7187
7221
  if (t.fragments.forEach((e, t) => {
7188
7222
  if (e.characters.length) {
7189
- let i = ce.from(...e.characters.map((e) => e.compatibleGlyphBox));
7223
+ let i = le.from(...e.characters.map((e) => e.compatibleGlyphBox));
7190
7224
  this._updateTexture(`${n}.${t}.fill`, e.fill, i), this._updateTexture(`${n}.${t}.outline`, e.outline, i), r.push(i);
7191
7225
  }
7192
7226
  }), r.length) {
7193
- let i = ce.from(...r);
7227
+ let i = le.from(...r);
7194
7228
  this._updateTexture(`${n}.fill`, t.fill, i), this._updateTexture(`${n}.outline`, t.outline, i), e.push(i);
7195
7229
  }
7196
7230
  }), e.length) {
7197
- let t = ce.from(...e);
7231
+ let t = le.from(...e);
7198
7232
  this._updateTexture("fill", this.fill, t), this._updateTexture("outline", this.outline, t);
7199
7233
  }
7200
7234
  }
7201
7235
  async _updateTexture(e, t, n) {
7202
7236
  t && Object.keys(t).length > 0 && (this._textureMap.set(e, {
7203
- texture: await this._loadTexture(h(t), n),
7237
+ texture: await this._loadTexture(g(t), n),
7204
7238
  box: n
7205
7239
  }), this._parent.requestDraw());
7206
7240
  }
7207
7241
  async _loadTexture(e, t) {
7208
- return e.linearGradient || e.radialGradient ? new nr(e.linearGradient ?? e.radialGradient, t.width, t.height) : d(e.image) ? void 0 : (this._parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
7242
+ return e.linearGradient || e.radialGradient ? new rr(e.linearGradient ?? e.radialGradient, t.width, t.height) : d(e.image) ? void 0 : (this._parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
7209
7243
  }
7210
7244
  setContent(e) {
7211
- this.content = ae(e);
7245
+ this.content = oe(e);
7212
7246
  }
7213
7247
  getStringContent() {
7214
7248
  return this.base.toString();
@@ -7229,12 +7263,12 @@ var Z = class extends C {
7229
7263
  this.base.pathSets.forEach((n) => {
7230
7264
  n.paths.forEach((n) => {
7231
7265
  let r = n.getMeta();
7232
- if (r instanceof _e) {
7266
+ if (r instanceof ge) {
7233
7267
  let i = r.parent.index, a = r.parent.parent.index;
7234
7268
  if (n.style.fill && !d(n.style.fill)) if (typeof n.style.fill == "object") {
7235
7269
  let r = n.style.fill, o = this._textureMap.get(`${a}.${i}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
7236
7270
  r.enabled !== !1 && (o || r.color) && (e.addPath(n), e.style = { ...n.style }, e.fillStyle = o?.texture ?? r.color, e.fill({
7237
- ...gi(r, o?.box ?? {
7271
+ ..._i(r, o?.box ?? {
7238
7272
  x: 0,
7239
7273
  y: 0,
7240
7274
  width: this._parent.size.width,
@@ -7246,7 +7280,7 @@ var Z = class extends C {
7246
7280
  if (n.style.stroke && !d(n.style.stroke)) if (typeof n.style.stroke == "object") {
7247
7281
  let r = n.style.stroke, o = this._textureMap.get(`${a}.${i}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
7248
7282
  r.enabled !== !1 && (o || r.color) && (r.width === void 0 || r.width) && (e.addPath(n), e.style = { ...n.style }, e.lineWidth = r.width || 1, e.strokeStyle = o?.texture ?? r.color, e.lineCap = r.lineCap, e.lineJoin = r.lineJoin, e.stroke({
7249
- ...gi(r, o?.box ?? {
7283
+ ..._i(r, o?.box ?? {
7250
7284
  x: 0,
7251
7285
  y: 0,
7252
7286
  width: this._parent.size.width,
@@ -7262,7 +7296,7 @@ var Z = class extends C {
7262
7296
  _textureDraw(e) {
7263
7297
  let { left: t = 0, top: n = 0, width: r, height: i } = this.base.boundingBox;
7264
7298
  e.fillStyle = this._texture, e.rect(t, n, r, i);
7265
- let { a, c: o, tx: s, b: c, d: l, ty: u } = new v().translate(-t, -n).scale(1 / r, 1 / i), d, f;
7299
+ let { a, c: o, tx: s, b: c, d: l, ty: u } = new b().translate(-t, -n).scale(1 / r, 1 / i), d, f;
7266
7300
  e.fill({
7267
7301
  transformUv: (e, t) => {
7268
7302
  d = e[t], f = e[t + 1], e[t] = a * d + o * f + s, e[t + 1] = c * d + l * f + u;
@@ -7289,11 +7323,11 @@ var Q = {
7289
7323
  horizontal: 6,
7290
7324
  vertical: 7,
7291
7325
  all: 8
7292
- }, zi = {
7326
+ }, Vi = {
7293
7327
  column: 0,
7294
7328
  row: 1,
7295
7329
  all: 2
7296
- }, Bi = {
7330
+ }, Hi = {
7297
7331
  auto: 0,
7298
7332
  "flex-start": 1,
7299
7333
  center: 2,
@@ -7303,42 +7337,42 @@ var Q = {
7303
7337
  "space-between": 6,
7304
7338
  "space-around": 7,
7305
7339
  "space-evenly": 8
7306
- }, Vi = {
7340
+ }, Ui = {
7307
7341
  flex: 0,
7308
7342
  none: 1,
7309
7343
  contents: 2
7310
- }, Hi = {
7344
+ }, Wi = {
7311
7345
  inherit: 0,
7312
7346
  ltr: 1,
7313
7347
  rtl: 2
7314
- }, Ui = {
7348
+ }, Gi = {
7315
7349
  column: 0,
7316
7350
  "column-reverse": 1,
7317
7351
  row: 2,
7318
7352
  "row-reverse": 3
7319
- }, Wi = {
7353
+ }, Ki = {
7320
7354
  "no-wrap": 0,
7321
7355
  wrap: 1,
7322
7356
  "Wrap-reverse": 2
7323
- }, Gi = {
7357
+ }, qi = {
7324
7358
  "flex-start": 0,
7325
7359
  center: 1,
7326
7360
  "flex-end": 2,
7327
7361
  "space-between": 3,
7328
7362
  "space-around": 4,
7329
7363
  "space-evenly": 5
7330
- }, Ki = {
7364
+ }, Ji = {
7331
7365
  visible: 0,
7332
7366
  hidden: 1,
7333
7367
  scroll: 2
7334
- }, qi = {
7368
+ }, Yi = {
7335
7369
  static: 0,
7336
7370
  relative: 1,
7337
7371
  absolute: 2
7338
- }, Ji = {
7372
+ }, Xi = {
7339
7373
  "border-box": 0,
7340
7374
  "content-box": 1
7341
- }, Yi = class e {
7375
+ }, Zi = class e {
7342
7376
  _parent;
7343
7377
  static _yoga;
7344
7378
  static async load() {
@@ -7350,27 +7384,27 @@ var Q = {
7350
7384
  this._parent = e, this._addChild = this._addChild.bind(this), this._removeChild = this._removeChild.bind(this), this._parent.on("addChild", this._addChild), this._parent.on("removeChild", this._removeChild);
7351
7385
  }
7352
7386
  _addChild(e, t) {
7353
- if (e instanceof ea && e.flexbox.node && this.node) {
7387
+ if (e instanceof na && e.flexbox.node && this.node) {
7354
7388
  this.node.insertChild(e.flexbox.node, t);
7355
7389
  let n = e.style.getProperties();
7356
7390
  for (let t in n) e.flexbox.updateStyleProperty(t, n[t]);
7357
7391
  }
7358
7392
  }
7359
7393
  _removeChild(e, t) {
7360
- e instanceof ea && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7394
+ e instanceof na && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7361
7395
  }
7362
7396
  updateStyleProperty(e, t) {
7363
7397
  let n = this.node;
7364
7398
  if (n) {
7365
7399
  switch (e) {
7366
7400
  case "alignContent":
7367
- n.setAlignContent(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7401
+ n.setAlignContent(t ? Hi[t] ?? Hi["flex-start"] : Hi["flex-start"]);
7368
7402
  break;
7369
7403
  case "alignItems":
7370
- n.setAlignItems(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7404
+ n.setAlignItems(t ? Hi[t] ?? Hi["flex-start"] : Hi["flex-start"]);
7371
7405
  break;
7372
7406
  case "alignSelf":
7373
- n.setAlignSelf(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7407
+ n.setAlignSelf(t ? Hi[t] ?? Hi["flex-start"] : Hi["flex-start"]);
7374
7408
  break;
7375
7409
  case "aspectRatio":
7376
7410
  n.setAspectRatio(t);
@@ -7391,10 +7425,10 @@ var Q = {
7391
7425
  n.setBorder(Q.all, this._parent.style.borderWidth);
7392
7426
  break;
7393
7427
  case "direction":
7394
- n.setDirection(t ? Hi[t] ?? Hi.inherit : Hi.inherit);
7428
+ n.setDirection(t ? Wi[t] ?? Wi.inherit : Wi.inherit);
7395
7429
  break;
7396
7430
  case "display":
7397
- n.setDisplay(t ? Vi[t] ?? Vi.flex : Vi.flex);
7431
+ n.setDisplay(t ? Ui[t] ?? Ui.flex : Ui.flex);
7398
7432
  break;
7399
7433
  case "flex":
7400
7434
  n.setFlex(t);
@@ -7403,7 +7437,7 @@ var Q = {
7403
7437
  n.setFlexBasis(t);
7404
7438
  break;
7405
7439
  case "flexDirection":
7406
- n.setFlexDirection(t ? Ui[t] ?? Ui.row : Ui.row);
7440
+ n.setFlexDirection(t ? Gi[t] ?? Gi.row : Gi.row);
7407
7441
  break;
7408
7442
  case "flexGrow":
7409
7443
  n.setFlexGrow(t);
@@ -7412,16 +7446,16 @@ var Q = {
7412
7446
  n.setFlexShrink(t);
7413
7447
  break;
7414
7448
  case "flexWrap":
7415
- n.setFlexWrap(t ? Wi[t] ?? Wi.wrap : Wi.wrap);
7449
+ n.setFlexWrap(t ? Ki[t] ?? Ki.wrap : Ki.wrap);
7416
7450
  break;
7417
7451
  case "height":
7418
7452
  n.setHeight(t);
7419
7453
  break;
7420
7454
  case "justifyContent":
7421
- n.setJustifyContent(t ? Gi[t] ?? Gi["flex-start"] : Gi["flex-start"]);
7455
+ n.setJustifyContent(t ? qi[t] ?? qi["flex-start"] : qi["flex-start"]);
7422
7456
  break;
7423
7457
  case "gap":
7424
- t !== void 0 && n.setGap(zi.all, t);
7458
+ t !== void 0 && n.setGap(Vi.all, t);
7425
7459
  break;
7426
7460
  case "marginTop":
7427
7461
  n.setMargin(Q.top, t);
@@ -7451,7 +7485,7 @@ var Q = {
7451
7485
  n.setMinWidth(t);
7452
7486
  break;
7453
7487
  case "overflow":
7454
- n.setOverflow(t ? Ki[t] ?? Ki.visible : Ki.visible);
7488
+ n.setOverflow(t ? Ji[t] ?? Ji.visible : Ji.visible);
7455
7489
  break;
7456
7490
  case "paddingTop":
7457
7491
  n.setPadding(Q.top, t);
@@ -7481,10 +7515,10 @@ var Q = {
7481
7515
  n.setPosition(Q.right, t);
7482
7516
  break;
7483
7517
  case "position":
7484
- n.setPositionType(t ? qi[t] ?? qi.relative : qi.relative);
7518
+ n.setPositionType(t ? Yi[t] ?? Yi.relative : Yi.relative);
7485
7519
  break;
7486
7520
  case "boxSizing":
7487
- n.setBoxSizing(t ? Ji[t] ?? Ji["content-box"] : Ji["content-box"]);
7521
+ n.setBoxSizing(t ? Xi[t] ?? Xi["content-box"] : Xi["content-box"]);
7488
7522
  break;
7489
7523
  case "width":
7490
7524
  n.setWidth(t);
@@ -7495,7 +7529,7 @@ var Q = {
7495
7529
  }
7496
7530
  update() {
7497
7531
  let e = this._parent, t = this.node;
7498
- if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Hi.ltr), t.hasNewLayout())) {
7532
+ if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Wi.ltr), t.hasNewLayout())) {
7499
7533
  let { left: n, top: r, width: i, height: a } = t.getComputedLayout();
7500
7534
  (!Number.isNaN(n) && n !== e.position.x || !Number.isNaN(r) && r !== e.position.y) && e.position.set(n, r), (!Number.isNaN(i) && i !== e.size.x || !Number.isNaN(a) && a !== e.size.y) && e.size.set(i, a), t.markLayoutSeen();
7501
7535
  }
@@ -7503,26 +7537,26 @@ var Q = {
7503
7537
  destroy() {
7504
7538
  this.node?.free(), this.node = void 0;
7505
7539
  }
7506
- }, Xi = new Set(Object.keys(a())), Zi = new Set(Object.keys(s())), Qi = new y(), $i = [
7540
+ }, Qi = new Set(Object.keys(a())), $i = new Set(Object.keys(s())), ea = new x(), ta = [
7507
7541
  [0, 0],
7508
7542
  [1, 0],
7509
7543
  [1, 1],
7510
7544
  [0, 1]
7511
- ], ea = class extends wr {
7512
- flexbox = new Yi(this);
7513
- aabb = new yt();
7514
- globalAabb = new yt();
7545
+ ], na = class extends Tr {
7546
+ flexbox = new Zi(this);
7547
+ aabb = new vt();
7548
+ globalAabb = new vt();
7515
7549
  _parentGlobalDisplay;
7516
7550
  _globalDisplay;
7517
7551
  get globalDisplay() {
7518
7552
  return this._globalDisplay;
7519
7553
  }
7520
- size = new y(0, 0, () => {
7554
+ size = new x(0, 0, () => {
7521
7555
  this.onUpdateStyleProperty("transformOrigin", this.style.transformOrigin, void 0), this.onUpdateStyleProperty("transform", this.style.transform, void 0), this.updateGlobalTransform(), this.requestDraw();
7522
7556
  });
7523
7557
  _allowPointerEvents = !0;
7524
7558
  _overflowHidden = !1;
7525
- _style = new Pi().on("updateProperty", (...e) => {
7559
+ _style = new Ii().on("updateProperty", (...e) => {
7526
7560
  this.onUpdateStyleProperty(e[0], e[1], e[2]);
7527
7561
  });
7528
7562
  get style() {
@@ -7536,14 +7570,14 @@ var Q = {
7536
7570
  this._endBatch();
7537
7571
  }
7538
7572
  }
7539
- _background = new _i(this);
7573
+ _background = new vi(this);
7540
7574
  get background() {
7541
7575
  return this._background;
7542
7576
  }
7543
7577
  set background(e) {
7544
7578
  this._background.resetProperties().setProperties(e);
7545
7579
  }
7546
- _shape = new Ni(this);
7580
+ _shape = new Fi(this);
7547
7581
  get shape() {
7548
7582
  return this._shape;
7549
7583
  }
@@ -7557,14 +7591,14 @@ var Q = {
7557
7591
  set fill(e) {
7558
7592
  this._fill.resetProperties().setProperties(e);
7559
7593
  }
7560
- _outline = new ji(this);
7594
+ _outline = new Ni(this);
7561
7595
  get outline() {
7562
7596
  return this._outline;
7563
7597
  }
7564
7598
  set outline(e) {
7565
7599
  this._outline.resetProperties().setProperties(e);
7566
7600
  }
7567
- _foreground = new ki(this);
7601
+ _foreground = new ji(this);
7568
7602
  get foreground() {
7569
7603
  return this._foreground;
7570
7604
  }
@@ -7578,21 +7612,21 @@ var Q = {
7578
7612
  set text(e) {
7579
7613
  this._text.resetProperties().setProperties(e);
7580
7614
  }
7581
- _shadow = new Mi(this);
7615
+ _shadow = new Pi(this);
7582
7616
  get shadow() {
7583
7617
  return this._shadow;
7584
7618
  }
7585
7619
  set shadow(e) {
7586
7620
  this._shadow.resetProperties().setProperties(e);
7587
7621
  }
7588
- _connection = new xi(this);
7622
+ _connection = new Ci(this);
7589
7623
  get connection() {
7590
7624
  return this._connection;
7591
7625
  }
7592
7626
  set connection(e) {
7593
7627
  this._connection.resetProperties().setProperties(e);
7594
7628
  }
7595
- _table = new Ri(this);
7629
+ _table = new Bi(this);
7596
7630
  get table() {
7597
7631
  return this._table;
7598
7632
  }
@@ -7606,6 +7640,13 @@ var Q = {
7606
7640
  set chart(e) {
7607
7641
  this._chart.resetProperties().setProperties(e);
7608
7642
  }
7643
+ _comments = new Si(this);
7644
+ get comments() {
7645
+ return this._comments;
7646
+ }
7647
+ set comments(e) {
7648
+ this._comments.resetProperties().setProperties(e);
7649
+ }
7609
7650
  _lastRoutePath;
7610
7651
  _batchDepth = 0;
7611
7652
  _pendingTextUpdate = !1;
@@ -7621,8 +7662,8 @@ var Q = {
7621
7662
  if (e) {
7622
7663
  this._beginBatch();
7623
7664
  try {
7624
- let { style: t, text: n, shape: r, background: i, fill: a, outline: o, foreground: s, shadow: c, connection: l, table: u, chart: d, filter: f, ...p } = e;
7625
- t && this.style.setProperties(t), i && this.background.setProperties(i), r && this.shape.setProperties(r), a && this.fill.setProperties(a), o && this.outline.setProperties(o), n && this.text.setProperties(n), s && this.foreground.setProperties(s), c && this.shadow.setProperties(c), l && this.connection.setProperties(l), u && this.table.setProperties(u), d && this.chart.setProperties(d), this._updateElementFilter(f), super.setProperties(p);
7665
+ let { style: t, text: n, shape: r, background: i, fill: a, outline: o, foreground: s, shadow: c, connection: l, table: u, chart: d, comments: f, filter: p, ...m } = e;
7666
+ t && this.style.setProperties(t), i && this.background.setProperties(i), r && this.shape.setProperties(r), a && this.fill.setProperties(a), o && this.outline.setProperties(o), n && this.text.setProperties(n), s && this.foreground.setProperties(s), c && this.shadow.setProperties(c), l && this.connection.setProperties(l), u && this.table.setProperties(u), d && this.chart.setProperties(d), f && this.comments.setProperties(f), this._updateElementFilter(p), super.setProperties(m);
7626
7667
  } finally {
7627
7668
  this._endBatch();
7628
7669
  }
@@ -7705,7 +7746,7 @@ var Q = {
7705
7746
  }), this.extraTransform.translate(this.pivot.x, this.pivot.y), this.updateGlobalTransform();
7706
7747
  break;
7707
7748
  case "transformOrigin": {
7708
- let e = Fr(t ?? "");
7749
+ let e = Ir(t ?? "");
7709
7750
  this.pivot.set(e[0] * this.size.width, e[1] * this.size.height);
7710
7751
  break;
7711
7752
  }
@@ -7749,7 +7790,7 @@ var Q = {
7749
7790
  this.requestDraw();
7750
7791
  break;
7751
7792
  }
7752
- if ((Zi.has(e) || Xi.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7793
+ if (($i.has(e) || Qi.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7753
7794
  else switch (e) {
7754
7795
  case "left":
7755
7796
  this.position.x = Number(t);
@@ -7779,7 +7820,7 @@ var Q = {
7779
7820
  this._lastRoutePath = e;
7780
7821
  let t = e.getBoundingBox(), n = Math.max(t.width, 1), r = Math.max(t.height, 1);
7781
7822
  this.position.x = t.x, this.position.y = t.y, this.size.width = n, this.size.height = r, this.updateGlobalTransform();
7782
- let i = e.clone().applyTransform(new v().translate(-t.x, -t.y));
7823
+ let i = e.clone().applyTransform(new b().translate(-t.x, -t.y));
7783
7824
  this._shape.setLocalPath(i);
7784
7825
  }
7785
7826
  _cullsRender() {
@@ -7789,10 +7830,10 @@ var Q = {
7789
7830
  }
7790
7831
  _intersectsViewport(e) {
7791
7832
  let t = e.canvasTransform, n = e.width, r = e.height, i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
7792
- for (let [e, c] of $i) t.applyAffineInverse({
7833
+ for (let [e, c] of ta) t.applyAffineInverse({
7793
7834
  x: e * n,
7794
7835
  y: c * r
7795
- }, Qi), i = Math.min(i, Qi.x), a = Math.max(a, Qi.x), o = Math.min(o, Qi.y), s = Math.max(s, Qi.y);
7836
+ }, ea), i = Math.min(i, ea.x), a = Math.max(a, ea.x), o = Math.min(o, ea.y), s = Math.max(s, ea.y);
7796
7837
  let c = a - i, l = s - o, { min: u, size: d } = this.globalAabb;
7797
7838
  return !(u.x > a + c || u.x + d.x < i - c || u.y > s + l || u.y + d.y < o - l);
7798
7839
  }
@@ -7802,18 +7843,18 @@ var Q = {
7802
7843
  this._styleFilter = d(e) ? void 0 : e, this._applyColorFilter();
7803
7844
  }
7804
7845
  _updateElementFilter(e) {
7805
- let t = e ? se(e) : "";
7846
+ let t = e ? ce(e) : "";
7806
7847
  this._elementFilter = t || void 0, this._applyColorFilter();
7807
7848
  }
7808
7849
  _applyColorFilter() {
7809
7850
  let e = [this._styleFilter, this._elementFilter].filter(Boolean).join(" ").trim();
7810
- e ? (this._colorFilterEffect || (this._colorFilterEffect = new Rr({
7851
+ e ? (this._colorFilterEffect || (this._colorFilterEffect = new zr({
7811
7852
  name: "styleFilter",
7812
7853
  internalMode: "front"
7813
7854
  }), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = e) : (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender());
7814
7855
  }
7815
7856
  _updateStyleMaskImage(e) {
7816
- d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new li({
7857
+ d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new ui({
7817
7858
  name: "styleMaskImage",
7818
7859
  internalMode: "back"
7819
7860
  }), this.append(this._maskEffect)), this._maskEffect.image = e);
@@ -7844,11 +7885,11 @@ var Q = {
7844
7885
  }
7845
7886
  getObb() {
7846
7887
  let e = this.pivot, t = this.transform.apply(e).sub(e);
7847
- return new Ct(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
7888
+ return new wt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
7848
7889
  }
7849
7890
  getGlobalObb() {
7850
7891
  let e = this.pivot, t = this.globalTransform.apply(e).sub(e);
7851
- return new Ct(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
7892
+ return new wt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
7852
7893
  }
7853
7894
  _draw() {
7854
7895
  super._draw(), this._background.isValid() && (this._shape.draw(!this._background.fillWithShape), this._background.draw()), this._fill.isValid() && (this._shape.draw(), this._fill.draw()), this._outline.isValid() && (this._shape.draw(), this._outline.draw()), this._foreground.isValid() && (this._shape.draw(!this._foreground.fillWithShape), this._foreground.draw()), this._text.isValid() && this._text.draw(), this._chart.isValid() && this._chart.draw(), this._drawContent();
@@ -7895,17 +7936,18 @@ var Q = {
7895
7936
  shadow: e(this.shadow.toJSON()),
7896
7937
  connection: e(this.connection.toJSON()),
7897
7938
  table: e(this.table.toJSON()),
7898
- chart: e(this.chart.toJSON())
7939
+ chart: e(this.chart.toJSON()),
7940
+ comments: this.comments.isValid() ? this.comments.toJSON() : void 0
7899
7941
  });
7900
7942
  }
7901
7943
  _destroy() {
7902
- super._destroy(), this.flexbox.destroy(), this.aabb.destroy(), this.globalAabb.destroy(), this.size.destroy(), this.style.destroy(), this.background.destroy(), this.shape.destroy(), this.fill.destroy(), this.outline.destroy(), this.text.destroy(), this.foreground.destroy(), this.shadow.destroy(), this.connection.destroy(), this._colorFilterEffect = void 0, this._maskEffect = void 0;
7944
+ super._destroy(), this.flexbox.destroy(), this.aabb.destroy(), this.globalAabb.destroy(), this.size.destroy(), this.style.destroy(), this.background.destroy(), this.shape.destroy(), this.fill.destroy(), this.outline.destroy(), this.text.destroy(), this.foreground.destroy(), this.shadow.destroy(), this.connection.destroy(), this.comments.destroy(), this._colorFilterEffect = void 0, this._maskEffect = void 0;
7903
7945
  }
7904
7946
  };
7905
- ea = k([b("Element2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ea);
7947
+ na = k([S("Element2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], na);
7906
7948
  //#endregion
7907
7949
  //#region src/scene/2d/TextureRect2D.ts
7908
- var ta = class extends ea {
7950
+ var ra = class extends na {
7909
7951
  texture;
7910
7952
  region;
7911
7953
  constructor(e, t = []) {
@@ -7915,9 +7957,9 @@ var ta = class extends ea {
7915
7957
  let e = this.region;
7916
7958
  if (e && this.texture) {
7917
7959
  let t = this.texture.width || 1, n = this.texture.height || 1;
7918
- return new v(e.width / (this.size.x * t), 0, 0, e.height / (this.size.y * n), e.x / t, e.y / n);
7960
+ return new b(e.width / (this.size.x * t), 0, 0, e.height / (this.size.y * n), e.x / t, e.y / n);
7919
7961
  }
7920
- return new v().scale(1 / this.size.x, 1 / this.size.y);
7962
+ return new b().scale(1 / this.size.x, 1 / this.size.y);
7921
7963
  }
7922
7964
  _drawContent() {
7923
7965
  if (this.texture?.isValid()) {
@@ -7928,8 +7970,8 @@ var ta = class extends ea {
7928
7970
  } });
7929
7971
  }
7930
7972
  }
7931
- }, na = class extends ta {
7932
- texture = new er();
7973
+ }, ia = class extends ra {
7974
+ texture = new tr();
7933
7975
  animation;
7934
7976
  _lastTime = NaN;
7935
7977
  constructor(e, t = []) {
@@ -7959,10 +8001,10 @@ var ta = class extends ea {
7959
8001
  this.currentTime !== this._lastTime && (this._lastTime = this.currentTime, this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpdate("source"), this.requestDraw()), super._process(e);
7960
8002
  }
7961
8003
  };
7962
- k([_({ fallback: "" }), O("design:type", String)], na.prototype, "src", void 0), na = k([b("Lottie2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], na);
8004
+ k([_({ fallback: "" }), O("design:type", String)], ia.prototype, "src", void 0), ia = k([S("Lottie2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ia);
7963
8005
  //#endregion
7964
8006
  //#region src/scene/2d/Mesh2D.ts
7965
- var ra = class extends ea {
8007
+ var aa = class extends na {
7966
8008
  texture;
7967
8009
  _vertices = new Float32Array();
7968
8010
  _uvs = new Float32Array();
@@ -7993,7 +8035,7 @@ var ra = class extends ea {
7993
8035
  _drawContent() {
7994
8036
  this.texture?.isValid() && this._indices.length && this._vertices.length && (this.context.fillStyle = this.texture, this.context.drawMesh(this._vertices, this._uvs, this._indices));
7995
8037
  }
7996
- }, ia = class extends ea {
8038
+ }, oa = class extends na {
7997
8039
  constructor(e, t = []) {
7998
8040
  super(), this.setProperties(e).append(t);
7999
8041
  }
@@ -8016,10 +8058,10 @@ var ra = class extends ea {
8016
8058
  this.context.rect(0, 0, e, t), this.context.strokeStyle = "#00FF00", this.context.stroke(), this._drawCircle(0, 0), this._drawCircle(e, t), this._drawCircle(0, t), this._drawEllipse(0, t / 2), this._drawCircle(e, 0), this._drawEllipse(e, t / 2);
8017
8059
  }
8018
8060
  };
8019
- k([_({ fallback: 6 }), O("design:type", Number)], ia.prototype, "handleSize", void 0);
8061
+ k([_({ fallback: 6 }), O("design:type", Number)], oa.prototype, "handleSize", void 0);
8020
8062
  //#endregion
8021
8063
  //#region src/scene/2d/Video2D.ts
8022
- var aa = class extends ta {
8064
+ var sa = class extends ra {
8023
8065
  get videoDuration() {
8024
8066
  return (this.texture?.duration ?? 0) * 1e3;
8025
8067
  }
@@ -8059,15 +8101,15 @@ var aa = class extends ta {
8059
8101
  super._process(e), this._updateVideoCurrentTime();
8060
8102
  }
8061
8103
  };
8062
- k([_({ fallback: "" }), O("design:type", String)], aa.prototype, "src", void 0), aa = k([b("Video2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], aa);
8104
+ k([_({ fallback: "" }), O("design:type", String)], sa.prototype, "src", void 0), sa = k([S("Video2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], sa);
8063
8105
  //#endregion
8064
8106
  //#region src/scene/animation/Animation.ts
8065
- function oa(e) {
8107
+ function ca(e) {
8066
8108
  if (e == null) return 0;
8067
8109
  let t = String(e).trim(), n = Number.parseFloat(t);
8068
8110
  return Number.isNaN(n) ? 0 : n / 100;
8069
8111
  }
8070
- function sa(e, t) {
8112
+ function la(e, t) {
8071
8113
  let n = t * 180 / Math.PI;
8072
8114
  if (e == null || e === "auto") return n;
8073
8115
  let r = String(e).trim();
@@ -8076,11 +8118,11 @@ function sa(e, t) {
8076
8118
  let i = Number.parseFloat(r);
8077
8119
  return Number.isNaN(i) ? n : i;
8078
8120
  }
8079
- function ca(e) {
8121
+ function ua(e) {
8080
8122
  let t = e.trim(), n = /^path\((.*)\)$/s.exec(t);
8081
8123
  return n && (t = n[1].trim()), t.length >= 2 && (t[0] === "\"" || t[0] === "'") && t[t.length - 1] === t[0] && (t = t.slice(1, -1)), t.trim();
8082
8124
  }
8083
- function la(e, t, n, r) {
8125
+ function da(e, t, n, r) {
8084
8126
  let i = 1e-6, a = 3 * e - 3 * n + 1, o = 3 * n - 6 * e, s = 3 * e, c = 3 * t - 3 * r + 1, l = 3 * r - 6 * t, u = 3 * t, d = (e) => (3 * a * e + 2 * o) * e + s, f = (e) => ((a * e + o) * e + s) * e, p = (e) => ((c * e + l) * e + u) * e;
8085
8127
  function m(e) {
8086
8128
  let t = e, n, r;
@@ -8100,7 +8142,7 @@ function la(e, t, n, r) {
8100
8142
  }
8101
8143
  return (e) => p(m(e));
8102
8144
  }
8103
- var ua = {
8145
+ var fa = {
8104
8146
  linear: [
8105
8147
  0,
8106
8148
  0,
@@ -8167,7 +8209,7 @@ var ua = {
8167
8209
  .355,
8168
8210
  1
8169
8211
  ]
8170
- }, da = Object.fromEntries(Object.entries(ua).map(([e, [t, n, r, i]]) => [e, la(t, n, r, i)])), fa = class extends V {
8212
+ }, pa = Object.fromEntries(Object.entries(fa).map(([e, [t, n, r, i]]) => [e, da(t, n, r, i)])), ma = class extends V {
8171
8213
  _keyframes = [];
8172
8214
  _isFirstUpdatePosition = !1;
8173
8215
  _cachedProps = new t();
@@ -8203,7 +8245,7 @@ var ua = {
8203
8245
  e = [this.getParent()].filter(Boolean);
8204
8246
  break;
8205
8247
  }
8206
- return e.filter((e) => e instanceof ea);
8248
+ return e.filter((e) => e instanceof na);
8207
8249
  }
8208
8250
  _updateKeyframes() {
8209
8251
  this._pathMeasures.clear();
@@ -8236,7 +8278,7 @@ var ua = {
8236
8278
  }
8237
8279
  let e = this._getTargets(), t = 1 / e.length, n = this.currentTimeProgress;
8238
8280
  e.forEach((e, r) => {
8239
- let i = t === 1 ? n : E(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8281
+ let i = t === 1 ? n : St(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8240
8282
  if (!a) return;
8241
8283
  let o = this._parseKeyframes(i, a);
8242
8284
  o?.length && this._commitStyle(i, e, a, o[0], o[1]);
@@ -8254,14 +8296,14 @@ var ua = {
8254
8296
  });
8255
8297
  }
8256
8298
  _parseEasing(e) {
8257
- if (!e) return da.linear;
8258
- if (e in da) return da[e];
8299
+ if (!e) return pa.linear;
8300
+ if (e in pa) return pa[e];
8259
8301
  let t = /cubic-bezier\((.+)\)/.exec(e);
8260
8302
  if (t) {
8261
8303
  let e = t[1].split(",").map((e) => Number(e));
8262
- if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return la(e[0], e[1], e[2], e[3]);
8304
+ if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return da(e[0], e[1], e[2], e[3]);
8263
8305
  }
8264
- return da.linear;
8306
+ return pa.linear;
8265
8307
  }
8266
8308
  _parseKeyframes(e, t) {
8267
8309
  let n, r = this._keyframes;
@@ -8296,26 +8338,26 @@ var ua = {
8296
8338
  });
8297
8339
  }
8298
8340
  _commitOffsetPath(e, t, n, r, i, a) {
8299
- let o = ca(t);
8341
+ let o = ua(t);
8300
8342
  if (!o) return;
8301
8343
  let s = this._pathMeasures.get(o);
8302
8344
  if (!s) {
8303
- let e = new de(new le(o)), t = e.getPosTanAtProgress(0).position;
8345
+ let e = new y(new v(o)), t = e.getPosTanAtProgress(0).position;
8304
8346
  s = {
8305
8347
  measure: e,
8306
8348
  startX: t.x,
8307
8349
  startY: t.y
8308
8350
  }, this._pathMeasures.set(o, s);
8309
8351
  }
8310
- let c = E(D(oa(r.offsetDistance ?? i.offsetDistance), oa(i.offsetDistance ?? r.offsetDistance), a), 0, 1), { position: l, angle: u } = s.measure.getPosTanAtProgress(c), d = l.x - s.startX, f = l.y - s.startY, p = sa(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8352
+ let c = St(D(ca(r.offsetDistance ?? i.offsetDistance), ca(i.offsetDistance ?? r.offsetDistance), a), 0, 1), { position: l, angle: u } = s.measure.getPosTanAtProgress(c), d = l.x - s.startX, f = l.y - s.startY, p = la(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8311
8353
  e.onUpdateStyleProperty("transform", `${m ? `${m} ` : ""}translate(${d}px, ${f}px) rotate(${p}deg)`, void 0);
8312
8354
  }
8313
8355
  _getDiffValue(e, t, n, r, i) {
8314
8356
  let a, o;
8315
- if (t === "none" && (t = void 0), n === "none" && (n = void 0), t === void 0 || n === void 0) if (t !== void 0) a = ke(e, String(t), i), o = Oe(a);
8316
- else if (n !== void 0) o = ke(e, String(n), i), a = Oe(o);
8357
+ if (t === "none" && (t = void 0), n === "none" && (n = void 0), t === void 0 || n === void 0) if (t !== void 0) a = Oe(e, String(t), i), o = De(a);
8358
+ else if (n !== void 0) o = Oe(e, String(n), i), a = De(o);
8317
8359
  else return;
8318
- else a = ke(e, String(t), i), o = ke(e, String(n), i);
8360
+ else a = Oe(e, String(t), i), o = Oe(e, String(n), i);
8319
8361
  if (Array.isArray(a) && Array.isArray(o)) {
8320
8362
  let e = /* @__PURE__ */ new Set(), t = {}, n = {};
8321
8363
  a.forEach(({ name: n, args: r }) => {
@@ -8354,14 +8396,14 @@ var ua = {
8354
8396
  });
8355
8397
  }
8356
8398
  };
8357
- k([_({ fallback: "parent" }), O("design:type", Object)], fa.prototype, "effectMode", void 0), k([_({ default: () => [] }), O("design:type", Array)], fa.prototype, "keyframes", void 0), k([_(), O("design:type", Object)], fa.prototype, "easing", void 0), fa = k([b("Animation", {
8399
+ k([_({ fallback: "parent" }), O("design:type", Object)], ma.prototype, "effectMode", void 0), k([_({ default: () => [] }), O("design:type", Array)], ma.prototype, "keyframes", void 0), k([_(), O("design:type", Object)], ma.prototype, "easing", void 0), ma = k([S("Animation", {
8358
8400
  renderMode: "disabled",
8359
8401
  processSortMode: "parent-before",
8360
8402
  duration: 2e3
8361
- }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], fa);
8403
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ma);
8362
8404
  //#endregion
8363
8405
  //#region src/scene/audio/html/HTMLAudioContext.ts
8364
- var pa = class t extends e {
8406
+ var ha = class t extends e {
8365
8407
  static _instance;
8366
8408
  static get instance() {
8367
8409
  return this._instance ||= new t(), this._instance;
@@ -8391,7 +8433,7 @@ var pa = class t extends e {
8391
8433
  togglePause() {
8392
8434
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
8393
8435
  }
8394
- }, ma = class t extends e {
8436
+ }, ga = class t extends e {
8395
8437
  static PADDING = .1;
8396
8438
  _source = null;
8397
8439
  _audio = null;
@@ -8504,21 +8546,21 @@ var pa = class t extends e {
8504
8546
  if (!this._source) return;
8505
8547
  let { start: n = 0, end: r = 0 } = e;
8506
8548
  r && console.assert(r > n, "End time is before start time"), e.playbackRate !== void 0 && (this._playbackRate = e.playbackRate), e.volume !== void 0 && (this._volume = e.volume), e.loop !== void 0 && (this._loop = e.loop), e.muted !== void 0 && (this._muted = e.muted), this.refresh(), this.loop && r !== null && (console.warn("Looping not support when specifying an \"end\" time"), this.loop = !1), this._start = n, this._end = r || this._duration, this._start = Math.max(0, this._start - t.PADDING), this._end = Math.min(this._end + t.PADDING, this._duration), this._source.onloadedmetadata = () => {
8507
- this._source && (this._source.currentTime = n, this._source.onloadedmetadata = null, this.emit("progress", n, this._duration), x.on(this._onUpdate));
8549
+ this._source && (this._source.currentTime = n, this._source.onloadedmetadata = null, this.emit("progress", n, this._duration), C.on(this._onUpdate));
8508
8550
  }, this._source.onended = this._onComplete.bind(this), this._source.play(), this.emit("start");
8509
8551
  }
8510
8552
  _onUpdate = () => {
8511
8553
  this._source && (this.emit("progress", this.progress, this._duration), this._source.currentTime >= this._end && !this._source.loop && this._onComplete());
8512
8554
  };
8513
8555
  _onComplete() {
8514
- x.off(this._onUpdate), this._stop(), this.emit("progress", 1, this._duration), this.emit("end", this);
8556
+ C.off(this._onUpdate), this._stop(), this.emit("progress", 1, this._duration), this.emit("end", this);
8515
8557
  }
8516
8558
  destroy() {
8517
- x.off(this._onUpdate), super.destroy();
8559
+ C.off(this._onUpdate), super.destroy();
8518
8560
  let e = this._source;
8519
8561
  e && (e.onended = null, e.onplay = null, e.onpause = null, this._stop()), this._source = null, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._end = 0, this._start = 0, this._duration = 0, this._playing = !1, this._pausedReal = !1, this._paused = !1, this._muted = !1, this._audio &&= (this._audio.context.off("refresh", this.refresh), this._audio.context.off("refreshPaused", this.refreshPaused), null);
8520
8562
  }
8521
- }, ha = class {
8563
+ }, _a = class {
8522
8564
  parent;
8523
8565
  source = new globalThis.Audio();
8524
8566
  _src = "";
@@ -8535,7 +8577,7 @@ var pa = class t extends e {
8535
8577
  return !!this.source && this.source.readyState === 4;
8536
8578
  }
8537
8579
  get context() {
8538
- return pa.instance;
8580
+ return ha.instance;
8539
8581
  }
8540
8582
  constructor(e) {
8541
8583
  this.parent = e;
@@ -8546,9 +8588,9 @@ var pa = class t extends e {
8546
8588
  });
8547
8589
  }
8548
8590
  createSound() {
8549
- return new ma();
8591
+ return new ga();
8550
8592
  }
8551
- }, ga = class extends e {
8593
+ }, va = class extends e {
8552
8594
  _input;
8553
8595
  _output;
8554
8596
  _processers = [];
@@ -8570,7 +8612,7 @@ var pa = class t extends e {
8570
8612
  get destination() {
8571
8613
  return this._input;
8572
8614
  }
8573
- }, _a = class {
8615
+ }, ya = class {
8574
8616
  destination;
8575
8617
  source;
8576
8618
  constructor(e, t = null) {
@@ -8585,21 +8627,21 @@ var pa = class t extends e {
8585
8627
  };
8586
8628
  //#endregion
8587
8629
  //#region src/scene/audio/web/WebAudioContext.ts
8588
- function va() {
8589
- if (He) return new AudioContext();
8590
- if (Ue) {
8630
+ function ba() {
8631
+ if (Ve) return new AudioContext();
8632
+ if (He) {
8591
8633
  let e = globalThis.webkitAudioContext;
8592
8634
  return new e();
8593
8635
  } else throw Error("Failed to createAudioContext");
8594
8636
  }
8595
- function ya(e, t, n) {
8596
- if (We) return new OfflineAudioContext(e, t, n);
8597
- if (Ge) {
8637
+ function xa(e, t, n) {
8638
+ if (Ue) return new OfflineAudioContext(e, t, n);
8639
+ if (We) {
8598
8640
  let r = globalThis.webkitOfflineAudioContext;
8599
8641
  return new r(e, t, n);
8600
8642
  } else throw Error("Failed to createOfflineAudioContext");
8601
8643
  }
8602
- var ba = class e extends ga {
8644
+ var Sa = class e extends va {
8603
8645
  static _instance;
8604
8646
  static get instance() {
8605
8647
  return this._instance ||= new e(), this._instance;
@@ -8640,8 +8682,8 @@ var ba = class e extends ga {
8640
8682
  _compressor;
8641
8683
  _analyser;
8642
8684
  constructor() {
8643
- let e = va(), t = ya(1, 2, We ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8644
- r.connect(n), n.connect(e.destination), super(r, n), this._context = e, this._offlineContext = t, this._compressor = n, this._analyser = r, this._locked = e.state === "suspended" && (ze || Be), qe && (this._locked && (this._unlock(), document.addEventListener("mousedown", this._unlock, !0), document.addEventListener("touchstart", this._unlock, !0), document.addEventListener("touchend", this._unlock, !0)), globalThis.addEventListener("focus", this._onFocus), globalThis.addEventListener("blur", this._onBlur));
8685
+ let e = ba(), t = xa(1, 2, Ue ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8686
+ r.connect(n), n.connect(e.destination), super(r, n), this._context = e, this._offlineContext = t, this._compressor = n, this._analyser = r, this._locked = e.state === "suspended" && (Re || ze), Ke && (this._locked && (this._unlock(), document.addEventListener("mousedown", this._unlock, !0), document.addEventListener("touchstart", this._unlock, !0), document.addEventListener("touchend", this._unlock, !0)), globalThis.addEventListener("focus", this._onFocus), globalThis.addEventListener("blur", this._onBlur));
8645
8687
  }
8646
8688
  _onFocus() {
8647
8689
  if (!this.autoPause) return;
@@ -8681,7 +8723,7 @@ var ba = class e extends ga {
8681
8723
  setParamValue(e, t) {
8682
8724
  e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
8683
8725
  }
8684
- }, xa = class extends e {
8726
+ }, Ca = class extends e {
8685
8727
  _audio = null;
8686
8728
  _sourceNode = null;
8687
8729
  _gain = null;
@@ -8809,12 +8851,12 @@ var ba = class e extends ga {
8809
8851
  };
8810
8852
  _updateListener = () => this._update();
8811
8853
  _enableTicker(e) {
8812
- x.off(this._updateListener), e && x.on(this._updateListener);
8854
+ C.off(this._updateListener), e && C.on(this._updateListener);
8813
8855
  }
8814
8856
  destroy() {
8815
8857
  super.destroy(), this._stop(), this._gain?.disconnect(), this._gain = null, this._audio?.context.off("refresh", this.refresh), this._audio?.context.off("refreshPaused", this.refreshPaused), this._audio = null, this._processors.forEach((e) => e.disconnect()), this._processors.length = 0, this._end = 0, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._elapsed = 0, this._duration = 0, this._paused = !1, this._muted = !1, this._pausedReal = !1;
8816
8858
  }
8817
- }, Sa = class extends ga {
8859
+ }, wa = class extends va {
8818
8860
  parent;
8819
8861
  _sourceBuffer;
8820
8862
  _sourceNode;
@@ -8822,7 +8864,7 @@ var ba = class e extends ga {
8822
8864
  gain;
8823
8865
  analyser;
8824
8866
  get context() {
8825
- return ba.instance;
8867
+ return Sa.instance;
8826
8868
  }
8827
8869
  get isPlayable() {
8828
8870
  return !!this._sourceNode.buffer;
@@ -8837,8 +8879,8 @@ var ba = class e extends ga {
8837
8879
  this._sourceNode.buffer = e;
8838
8880
  }
8839
8881
  constructor(e) {
8840
- let t = ba.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
8841
- n.connect(i), i.connect(r), r.connect(ba.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
8882
+ let t = Sa.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
8883
+ n.connect(i), i.connect(r), r.connect(Sa.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
8842
8884
  }
8843
8885
  async load() {
8844
8886
  return this._sourceLoad ||= new Promise((e) => {
@@ -8851,7 +8893,7 @@ var ba = class e extends ga {
8851
8893
  });
8852
8894
  }
8853
8895
  _decode(e) {
8854
- return Promise.resolve(e instanceof AudioBuffer ? e : ba.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
8896
+ return Promise.resolve(e instanceof AudioBuffer ? e : Sa.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
8855
8897
  }
8856
8898
  cloneSource() {
8857
8899
  let e = this.context, t = this._sourceNode, n = e.audioContext.createBufferSource(), r = e.audioContext.createGain();
@@ -8861,15 +8903,15 @@ var ba = class e extends ga {
8861
8903
  };
8862
8904
  }
8863
8905
  createSound() {
8864
- return new xa();
8906
+ return new Ca();
8865
8907
  }
8866
- }, Ca, wa = class extends V {
8908
+ }, Ta, Ea = class extends V {
8867
8909
  static {
8868
- Ca = this;
8910
+ Ta = this;
8869
8911
  }
8870
8912
  static _soundPool = [];
8871
8913
  _sounds = [];
8872
- _platformAudio = Ke ? new Sa(this) : new ha(this);
8914
+ _platformAudio = Ge ? new wa(this) : new _a(this);
8873
8915
  get platformAudio() {
8874
8916
  return this._platformAudio;
8875
8917
  }
@@ -8962,7 +9004,7 @@ var ba = class e extends ga {
8962
9004
  this._sounds.length = 0;
8963
9005
  }
8964
9006
  _createSound() {
8965
- return Ca._soundPool.length > 0 ? Ca._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9007
+ return Ta._soundPool.length > 0 ? Ta._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
8966
9008
  }
8967
9009
  refresh() {
8968
9010
  for (let e = this._sounds.length, t = 0; t < e; t++) this._sounds[t].refresh();
@@ -8978,7 +9020,7 @@ var ba = class e extends ga {
8978
9020
  this._recycleSound(e);
8979
9021
  };
8980
9022
  _recycleSound(e) {
8981
- e.destroy(), Ca._soundPool.includes(e) || Ca._soundPool.push(e);
9023
+ e.destroy(), Ta._soundPool.includes(e) || Ta._soundPool.push(e);
8982
9024
  }
8983
9025
  _prevTime = 0;
8984
9026
  _timer = 0;
@@ -8994,13 +9036,13 @@ var ba = class e extends ga {
8994
9036
  }, 100);
8995
9037
  }
8996
9038
  };
8997
- wa = Ca = k([b("Audio"), O("design:paramtypes", [Object])], wa);
9039
+ Ea = Ta = k([S("Audio"), O("design:paramtypes", [Object])], Ea);
8998
9040
  //#endregion
8999
9041
  //#region src/scene/audio/AudioSpectrum.ts
9000
- var Ta = class extends wr {}, Ea = class extends ea {
9042
+ var Da = class extends Tr {}, Oa = class extends na {
9001
9043
  _audioBuffer;
9002
9044
  _src = (() => {
9003
- let e = S();
9045
+ let e = w();
9004
9046
  return e ? new z({ source: e }) : void 0;
9005
9047
  })();
9006
9048
  _needsUpdateTexture = !1;
@@ -9021,7 +9063,7 @@ var Ta = class extends wr {}, Ea = class extends ea {
9021
9063
  }
9022
9064
  }
9023
9065
  async _loadSrc(e) {
9024
- await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => ba.decode(e)).then((e) => {
9066
+ await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => Sa.decode(e)).then((e) => {
9025
9067
  this._audioBuffer = e, this.syncTexture(!0);
9026
9068
  });
9027
9069
  }
@@ -9056,12 +9098,12 @@ var Ta = class extends wr {}, Ea = class extends ea {
9056
9098
  this.syncTexture(), super._process(e);
9057
9099
  }
9058
9100
  };
9059
- k([_(), O("design:type", Object)], Ea.prototype, "src", void 0), k([_({ fallback: 0 }), O("design:type", Number)], Ea.prototype, "gap", void 0), k([_({ fallback: "#000000" }), O("design:type", String)], Ea.prototype, "color", void 0), Ea = k([b("AudioWaveform"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Ea);
9101
+ k([_(), O("design:type", Object)], Oa.prototype, "src", void 0), k([_({ fallback: 0 }), O("design:type", Number)], Oa.prototype, "gap", void 0), k([_({ fallback: "#000000" }), O("design:type", String)], Oa.prototype, "color", void 0), Oa = k([S("AudioWaveform"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Oa);
9060
9102
  //#endregion
9061
9103
  //#region src/scene/transitions/KawaseTransition.ts
9062
- var Da, Oa = class extends Cr {
9104
+ var ka, Aa = class extends wr {
9063
9105
  static {
9064
- Da = this;
9106
+ ka = this;
9065
9107
  }
9066
9108
  blur = 10;
9067
9109
  quality = 10;
@@ -9080,7 +9122,7 @@ var Da, Oa = class extends Cr {
9080
9122
  let d = 1 / s, f = 1 / c, p = [], m, h = o - 1;
9081
9123
  for (let e = 0; e < h; e++) m = u[e] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p });
9082
9124
  m = u[h] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p }), l.forEach((t) => {
9083
- L.draw(e, Da.material, {
9125
+ L.draw(e, ka.material, {
9084
9126
  sampler: r,
9085
9127
  progress: i,
9086
9128
  ...t
@@ -9088,31 +9130,31 @@ var Da, Oa = class extends Cr {
9088
9130
  });
9089
9131
  }
9090
9132
  };
9091
- Oa = Da = k([b("KawaseTransition")], Oa);
9133
+ Aa = ka = k([S("KawaseTransition")], Aa);
9092
9134
  //#endregion
9093
9135
  //#region src/scene/transitions/LeftEraseTransition.ts
9094
- var ka, Aa = class extends Cr {
9136
+ var ja, Ma = class extends wr {
9095
9137
  static {
9096
- ka = this;
9138
+ ja = this;
9097
9139
  }
9098
9140
  static material = new I({ gl: {
9099
9141
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
9100
9142
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform float progress;\nuniform sampler2D previous;\nuniform sampler2D next;\n\nfloat easeInOutQuint(float t) {\n return t < 0.5 ? 16.0*t*t*t*t*t : 1.0+16.0*(--t)*t*t*t*t;\n}\n\nvoid main() {\n vec4 src1Color = texture2D(previous, vUv);\n vec4 src2Color = texture2D(next, vUv);\n float mProgress = 1.0 - progress;\n float mixPercent = 0.0;\n if (vUv.x <= mProgress) {\n mixPercent = 1.0;\n }\n gl_FragColor = mix(src2Color, src1Color, mixPercent);\n}"
9101
9143
  } });
9102
9144
  apply(e) {
9103
- L.draw(e, ka.material, {
9145
+ L.draw(e, ja.material, {
9104
9146
  previous: 0,
9105
9147
  next: 1,
9106
9148
  progress: this.currentTimeProgress
9107
9149
  });
9108
9150
  }
9109
9151
  };
9110
- Aa = ka = k([b("LeftEraseTransition")], Aa);
9152
+ Ma = ja = k([S("LeftEraseTransition")], Ma);
9111
9153
  //#endregion
9112
9154
  //#region src/scene/transitions/TiltShiftTransition.ts
9113
- var ja, Ma = class extends Cr {
9155
+ var Na, Pa = class extends wr {
9114
9156
  static {
9115
- ja = this;
9157
+ Na = this;
9116
9158
  }
9117
9159
  blur = 100;
9118
9160
  gradientBlur = 600;
@@ -9124,7 +9166,7 @@ var ja, Ma = class extends Cr {
9124
9166
  let n = this.currentTimeProgress, r, i;
9125
9167
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9126
9168
  let a = t.width, o = t.height, s = [0, o / 2], c = [600, o / 2], l = [a, o], u = c[0] - s[0], d = c[1] - s[1], f = Math.sqrt(u * u + d * d);
9127
- L.draw(e, ja.material, {
9169
+ L.draw(e, Na.material, {
9128
9170
  sampler: r,
9129
9171
  progress: i,
9130
9172
  blur: this.blur,
@@ -9133,7 +9175,7 @@ var ja, Ma = class extends Cr {
9133
9175
  end: c,
9134
9176
  delta: [u / f, d / f],
9135
9177
  texSize: l
9136
- }), L.draw(e, ja.material, {
9178
+ }), L.draw(e, Na.material, {
9137
9179
  sampler: r,
9138
9180
  progress: i,
9139
9181
  blur: this.blur,
@@ -9145,12 +9187,12 @@ var ja, Ma = class extends Cr {
9145
9187
  });
9146
9188
  }
9147
9189
  };
9148
- Ma = ja = k([b("TiltShiftTransition")], Ma);
9190
+ Pa = Na = k([S("TiltShiftTransition")], Pa);
9149
9191
  //#endregion
9150
9192
  //#region src/scene/transitions/TwistTransition.ts
9151
- var Na, Pa = class extends Cr {
9193
+ var Fa, Ia = class extends wr {
9152
9194
  static {
9153
- Na = this;
9195
+ Fa = this;
9154
9196
  }
9155
9197
  radius;
9156
9198
  angle = 4;
@@ -9164,7 +9206,7 @@ var Na, Pa = class extends Cr {
9164
9206
  let n = this.currentTimeProgress, r, i;
9165
9207
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9166
9208
  let a = t.width, o = t.height;
9167
- L.draw(e, Na.material, {
9209
+ L.draw(e, Fa.material, {
9168
9210
  sampler: r,
9169
9211
  progress: i,
9170
9212
  filterArea: [
@@ -9180,16 +9222,16 @@ var Na, Pa = class extends Cr {
9180
9222
  });
9181
9223
  }
9182
9224
  };
9183
- Pa = Na = k([b("TwistTransition")], Pa);
9225
+ Ia = Fa = k([S("TwistTransition")], Ia);
9184
9226
  //#endregion
9185
9227
  //#region src/asset/loaders/GifLoader.ts
9186
- var Fa = class extends Vn {
9228
+ var La = class extends Hn {
9187
9229
  install(e) {
9188
9230
  let t = async (t) => {
9189
9231
  let { decodeFrames: n } = await import("modern-gif");
9190
- return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new $n(e.map((e) => ({
9232
+ return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new er(e.map((e) => ({
9191
9233
  duration: e.delay,
9192
- texture: new rr({
9234
+ texture: new ir({
9193
9235
  source: e.data,
9194
9236
  width: e.width,
9195
9237
  height: e.height
@@ -9200,14 +9242,14 @@ var Fa = class extends Vn {
9200
9242
  e.register(n, t);
9201
9243
  }), e.gif = this, this;
9202
9244
  }
9203
- }, Ia = class extends Vn {
9245
+ }, Ra = class extends Hn {
9204
9246
  install(e) {
9205
9247
  let t = async (e) => JSON.parse(await e.text());
9206
9248
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), ["application/json"].forEach((n) => {
9207
9249
  e.register(n, t);
9208
9250
  }), e.json = this, this;
9209
9251
  }
9210
- }, La = class extends Vn {
9252
+ }, za = class extends Hn {
9211
9253
  install(e) {
9212
9254
  return this.load = async (t, n) => (await import("lottie-web").then((e) => e.default)).loadAnimation({
9213
9255
  container: null,
@@ -9218,12 +9260,12 @@ var Fa = class extends Vn {
9218
9260
  animationData: await e.loadBy(t, () => e.fetch(t).then((e) => e.json()))
9219
9261
  }), e.lottie = this, this;
9220
9262
  }
9221
- }, Ra = class extends Vn {
9263
+ }, Ba = class extends Hn {
9222
9264
  install(e) {
9223
9265
  let t = async (e) => e.text();
9224
9266
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), e.text = this, this;
9225
9267
  }
9226
- }, za = class extends Vn {
9268
+ }, Va = class extends Hn {
9227
9269
  install(e) {
9228
9270
  let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new z({
9229
9271
  source: e,
@@ -9247,11 +9289,11 @@ var Fa = class extends Vn {
9247
9289
  e.register(n, t);
9248
9290
  }), e.texture = this, this;
9249
9291
  }
9250
- }, Ba = class extends Vn {
9292
+ }, Ha = class extends Hn {
9251
9293
  install(e) {
9252
- return this.load = (t) => e.awaitBy(() => new ar(t).load()), e.video = this, this;
9294
+ return this.load = (t) => e.awaitBy(() => new or(t).load()), e.video = this, this;
9253
9295
  }
9254
- }, Va = Object.entries({
9296
+ }, Ua = Object.entries({
9255
9297
  "font/woff": ["woff"],
9256
9298
  "font/ttf": ["ttf"],
9257
9299
  "font/otf": ["otf"],
@@ -9267,31 +9309,31 @@ var Fa = class extends Vn {
9267
9309
  "image/webp": ["webp"],
9268
9310
  "application/json": ["json"]
9269
9311
  });
9270
- function Ha(e) {
9271
- for (let [t, n] of Va) if (n.includes(e)) return t;
9312
+ function Wa(e) {
9313
+ for (let [t, n] of Ua) if (n.includes(e)) return t;
9272
9314
  }
9273
- function Ua(e) {
9315
+ function Ga(e) {
9274
9316
  let t;
9275
9317
  if (e.startsWith("data:")) t = e.match(/^data:(.+?);/)?.[1];
9276
9318
  else if (e.startsWith("http")) {
9277
9319
  let n = e.split(/[#?]/)[0].split(".").pop()?.trim();
9278
- n && (t = Ha(n));
9320
+ n && (t = Wa(n));
9279
9321
  }
9280
9322
  return t;
9281
9323
  }
9282
9324
  //#endregion
9283
9325
  //#region src/asset/Assets.ts
9284
- var Wa = "WeakRef" in globalThis, Ga = class extends e {
9326
+ var Ka = "WeakRef" in globalThis, qa = class extends e {
9285
9327
  defaultHandler = (e) => e;
9286
9328
  _handlers = /* @__PURE__ */ new Map();
9287
9329
  _handleing = /* @__PURE__ */ new Map();
9288
9330
  _handled = /* @__PURE__ */ new Map();
9289
- _gc = Wa ? new FinalizationRegistry((e) => {
9331
+ _gc = Ka ? new FinalizationRegistry((e) => {
9290
9332
  let t = this.get(e);
9291
9333
  t && "destroy" in t && t.destroy(), this._handled.delete(e);
9292
9334
  }) : void 0;
9293
9335
  constructor() {
9294
- super(), Wa || x.on(this.gc.bind(this), { sort: 2 });
9336
+ super(), Ka || C.on(this.gc.bind(this), { sort: 2 });
9295
9337
  }
9296
9338
  use(e) {
9297
9339
  return e.install(this), this;
@@ -9331,7 +9373,7 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9331
9373
  }).then((e) => {
9332
9374
  if (e.complete && e.naturalWidth && e.naturalHeight) return createImageBitmap(e, t);
9333
9375
  {
9334
- let e = S(1, 1);
9376
+ let e = w(1, 1);
9335
9377
  if (!e) throw Error("createImageBitmap fallback requires a canvas; call setCanvasFactory() in non-browser environments.");
9336
9378
  return createImageBitmap(e);
9337
9379
  }
@@ -9340,11 +9382,11 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9340
9382
  }
9341
9383
  get(e) {
9342
9384
  let t = this._handled.get(e);
9343
- return Wa && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9385
+ return Ka && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9344
9386
  }
9345
9387
  set(e, t) {
9346
9388
  let n = t;
9347
- Wa && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9389
+ Ka && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9348
9390
  }
9349
9391
  async awaitBy(e) {
9350
9392
  let t = e(), n = c();
@@ -9359,7 +9401,7 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9359
9401
  return this._handleing.set(e, r), r;
9360
9402
  }
9361
9403
  async load(e, t) {
9362
- let n = await this.loadBy(e), r = Ua(e);
9404
+ let n = await this.loadBy(e), r = Ga(e);
9363
9405
  return r === void 0 && (r = n.type?.split(";")[0] ?? void 0), ((r ? this._handlers.get(r) : void 0) ?? this.defaultHandler)(n, t);
9364
9406
  }
9365
9407
  async waitUntilLoad() {
@@ -9373,14 +9415,14 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9373
9415
  n && "destroy" in n && n.destroy();
9374
9416
  }), this._handled.clear();
9375
9417
  }
9376
- }, $ = new Ga().use(new Hn()).use(new Fa()).use(new Ia()).use(new La()).use(new Ra()).use(new za()).use(new Ba()), Ka = {
9418
+ }, $ = new qa().use(new Un()).use(new La()).use(new Ra()).use(new za()).use(new Ba()).use(new Va()).use(new Ha()), Ja = {
9377
9419
  alpha: !0,
9378
9420
  stencil: !0,
9379
9421
  antialias: !1,
9380
9422
  premultipliedAlpha: !0,
9381
9423
  preserveDrawingBuffer: !1,
9382
9424
  powerPreference: "default"
9383
- }, qa = class extends Sr {
9425
+ }, Ya = class extends Cr {
9384
9426
  renderer;
9385
9427
  get view() {
9386
9428
  return this.renderer.view;
@@ -9403,7 +9445,7 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9403
9445
  set pixelRatio(e) {
9404
9446
  this.renderer.pixelRatio = e, this.resize(this.width, this.height);
9405
9447
  }
9406
- _resizeObserver = Fe ? new ResizeObserver((e) => {
9448
+ _resizeObserver = Pe ? new ResizeObserver((e) => {
9407
9449
  let t = e[0];
9408
9450
  if (t.target === this.view) {
9409
9451
  let { inlineSize: e, blockSize: n } = Array.isArray(t.contentBoxSize) ? t.contentBoxSize[0] : t.contentBoxSize;
@@ -9411,14 +9453,14 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9411
9453
  }
9412
9454
  }) : void 0;
9413
9455
  constructor(e = {}) {
9414
- let { view: t, width: n, height: r, pixelRatio: i = Ye, autoResize: a, data: o } = e;
9415
- super(), this.renderer = new Bn(t, {
9416
- alpha: Ka.alpha ?? e.alpha,
9417
- stencil: Ka.stencil ?? e.stencil,
9418
- antialias: Ka.antialias ?? e.antialias,
9419
- premultipliedAlpha: Ka.premultipliedAlpha ?? e.premultipliedAlpha,
9420
- preserveDrawingBuffer: Ka.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9421
- powerPreference: Ka.powerPreference ?? e.powerPreference
9456
+ let { view: t, width: n, height: r, pixelRatio: i = Je, autoResize: a, data: o } = e;
9457
+ super(), this.renderer = new Vn(t, {
9458
+ alpha: Ja.alpha ?? e.alpha,
9459
+ stencil: Ja.stencil ?? e.stencil,
9460
+ antialias: Ja.antialias ?? e.antialias,
9461
+ premultipliedAlpha: Ja.premultipliedAlpha ?? e.premultipliedAlpha,
9462
+ preserveDrawingBuffer: Ja.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9463
+ powerPreference: Ja.powerPreference ?? e.powerPreference
9422
9464
  }), this._setupInput(), this.pixelRatio = i, a ? !t && this.renderer.view && (this.renderer.view.style.width = "100%", this.renderer.view.style.height = "100%") : this.resize(n || this.gl.drawingBufferWidth || this.view?.clientWidth || 200, r || this.gl.drawingBufferHeight || this.view?.clientHeight || 200, !t), this.setProperties(e), o && this.root.append(o);
9423
9465
  }
9424
9466
  _updateProperty(e, t, n) {
@@ -9451,7 +9493,7 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9451
9493
  return this.renderer.resize(e, t, n), this.root.width = e, this.root.height = t, this.render(), this;
9452
9494
  }
9453
9495
  nextTick() {
9454
- return xe();
9496
+ return be();
9455
9497
  }
9456
9498
  async waitUntilLoad() {
9457
9499
  await $.waitUntilLoad(), await this.nextTick();
@@ -9490,9 +9532,9 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9490
9532
  return new ImageData(this.toPixels(), this.root.width, this.root.height);
9491
9533
  }
9492
9534
  toCanvas2D(e = this.toImageData()) {
9493
- let t = S(e.width, e.height), n = t?.getContext("2d");
9535
+ let t = w(e.width, e.height), n = t?.getContext("2d");
9494
9536
  t && n && (n.fillStyle = "rgba(0, 0, 0, 0)", n.clearRect(0, 0, t.width, t.height), n.putImageData(e, 0, 0));
9495
- let r = S(e.width, e.height);
9537
+ let r = w(e.width, e.height);
9496
9538
  if (!r) throw Error("toCanvas2D requires a canvas; call setCanvasFactory() in non-browser environments.");
9497
9539
  let i = r.getContext("2d");
9498
9540
  return i && t && (i.fillStyle = "rgba(0, 0, 0, 0)", i.clearRect(0, 0, r.width, r.height), i.drawImage(t, 0, 0, t.width, t.height, 0, 0, r.width, r.height)), r;
@@ -9501,22 +9543,22 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9501
9543
  super._destroy(), this._resizeObserver?.disconnect(), this.renderer.destroy();
9502
9544
  }
9503
9545
  };
9504
- k([_({ fallback: !1 }), O("design:type", Boolean)], qa.prototype, "autoResize", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], qa.prototype, "autoStart", void 0);
9546
+ k([_({ fallback: !1 }), O("design:type", Boolean)], Ya.prototype, "autoResize", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Ya.prototype, "autoStart", void 0);
9505
9547
  //#endregion
9506
9548
  //#region src/render.ts
9507
- var Ja, Ya = [], Xa = !1;
9508
- function Za() {
9509
- return Ja ??= new qa({
9549
+ var Xa, Za = [], Qa = !1;
9550
+ function $a() {
9551
+ return Xa ??= new Ya({
9510
9552
  pixelRatio: 1,
9511
9553
  width: 1,
9512
9554
  height: 1,
9513
9555
  preserveDrawingBuffer: !0
9514
9556
  });
9515
9557
  }
9516
- async function Qa(e = 100) {
9517
- if (!Xa) {
9518
- for (Xa = !0; Ya.length;) {
9519
- let t = Ya.shift();
9558
+ async function eo(e = 100) {
9559
+ if (!Qa) {
9560
+ for (Qa = !0; Za.length;) {
9561
+ let t = Za.shift();
9520
9562
  if (t) try {
9521
9563
  await t();
9522
9564
  } catch (e) {
@@ -9524,11 +9566,11 @@ async function Qa(e = 100) {
9524
9566
  }
9525
9567
  else await new Promise((t) => setTimeout(t, e));
9526
9568
  }
9527
- Xa = !1;
9569
+ Qa = !1;
9528
9570
  }
9529
9571
  }
9530
- async function $a(e) {
9531
- let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], onBefore: s, onKeyframe: c, ...l } = e, u = Math.floor(r), d = Math.floor(i), f = Za();
9572
+ async function to(e) {
9573
+ let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], onBefore: s, onKeyframe: c, ...l } = e, u = Math.floor(r), d = Math.floor(i), f = $a();
9532
9574
  if (f.resetProperties(), f.setProperties(l), f.debug = t, f.fonts = n, f.timeline.currentTime = 0, f.resize(u, d, !0), f.root.removeChildren(!0), f.root.append(a), await s?.(f), await f.waitAndRender(), o.length) {
9533
9575
  let e = o.length, t = o[e - 1];
9534
9576
  for (let n = 0; n < e; n++) {
@@ -9546,15 +9588,15 @@ async function $a(e) {
9546
9588
  toCanvas2D: () => f.toCanvas2D(new ImageData(p, u, d))
9547
9589
  };
9548
9590
  }
9549
- async function eo(e) {
9591
+ async function no(e) {
9550
9592
  return new Promise((t) => {
9551
- Ya.push(async () => t(await $a(e).then((e) => e.toCanvas2D()))), Qa();
9593
+ Za.push(async () => t(await to(e).then((e) => e.toCanvas2D()))), eo();
9552
9594
  });
9553
9595
  }
9554
- async function to(e) {
9596
+ async function ro(e) {
9555
9597
  return new Promise((t) => {
9556
- Ya.push(async () => t(await $a(e).then((e) => e.pixels))), Qa();
9598
+ Za.push(async () => t(await to(e).then((e) => e.pixels))), eo();
9557
9599
  });
9558
9600
  }
9559
9601
  //#endregion
9560
- export { yt as Aabb2D, $n as AnimatedTexture, fa as Animation, Ga as Assets, wa as Audio, ga as AudioPipeline, _a as AudioProcessor, Ta as AudioSpectrum, Ea as AudioWaveform, A as BufferUsage, Tr as Camera2D, sr as CanvasContext, _r as CanvasItem, er as CanvasTexture, T as Color, W as ColorAdjustEffect, Rr as ColorFilterEffect, St as ColorMatrix, Vr as ColorOverlayEffect, Ur as ColorRemoveEffect, Kr as ColorReplaceEffect, tr as ColorTexture, C as CoreObject, bt as DEG_TO_RAD, Ye as DEVICE_PIXEL_RATIO, G as DrawboardEffect, $r as DropShadowEffect, U as Effect, Xn as EffectMaterial, ea as Element2D, _i as Element2DBackground, X as Element2DChart, xi as Element2DConnection, Y as Element2DFill, ki as Element2DForeground, ji as Element2DOutline, Mi as Element2DShadow, Ni as Element2DShape, Pi as Element2DStyle, Ri as Element2DTable, Z as Element2DText, ti as EmbossEffect, qa as Engine, Yi as Flexbox, Hn as FontLoader, Zr as GaussianBlurEffect, Wn as Geometry, Fa as GifLoader, ln as GlBatch2DSystem, an as GlBlendMode, Dt as GlBuffer, Pt as GlBufferSystem, Et as GlBufferTarget, pn as GlMaskSystem, Kt as GlProgram, _n as GlRenderTarget, vn as GlRenderTargetSystem, tn as GlShaderSystem, sn as GlState, cn as GlStateSystem, hn as GlStencilSystem, j as GlSystem, gn as GlViewportSystem, K as GlitchEffect, q as GodrayEffect, nr as GradientTexture, ha as HTMLAudio, pa as HTMLAudioContext, ma as HTMLSound, qe as IN_BROWSER, Je as IN_MAC_OS, Un as IndexBuffer, _t as Input, dt as InputEvent, Ia as JsonLoader, si as KawaseBlurEffect, Oa as KawaseTransition, ft as KeyboardInputEvent, Aa as LeftEraseTransition, Vn as Loader, na as Lottie2D, La as LottieLoader, Tt as MainLoop, li as MaskEffect, I as Material, ra as Mesh2D, lr as Meta, pt as MouseInputEvent, B as Node, wr as Node2D, Ct as Obb2D, J as OutlineEffect, Se as PI, Ce as PI_2, pi as PixelateEffect, rr as PixelsTexture, mt as PointerInputEvent, wt as Projection2D, Gn as QuadGeometry, L as QuadUvGeometry, xt as RAD_TO_DEG, vt as RefCounted, R as RenderTarget, Ot as Renderer, w as Resource, He as SUPPORTS_AUDIO_CONTEXT, Be as SUPPORTS_CLICK_EVENTS, Ve as SUPPORTS_CREATE_IMAGE_BITMAP, Pe as SUPPORTS_IMAGE_BITMAP, Re as SUPPORTS_MOUSE_EVENTS, We as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Ie as SUPPORTS_POINTER_EVENTS, Fe as SUPPORTS_RESIZE_OBSERVER, ze as SUPPORTS_TOUCH_EVENTS, Ne as SUPPORTS_WEBGL2, Ue as SUPPORTS_WEBKIT_AUDIO_CONTEXT, Ge as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ke as SUPPORTS_WEB_AUDIO, Le as SUPPORTS_WHEEL_EVENTS, Sr as SceneTree, Ra as TextLoader, z as Texture2D, za as TextureLoader, ta as TextureRect2D, x as Ticker, Ma as TiltShiftTransition, br as Timeline, V as TimelineNode, ia as TransformRect2D, Cr as Transition, Pa as TwistTransition, At as UniformGroup, Qn as UvGeometry, Zn as UvMaterial, F as VertexAttribute, P as VertexBuffer, aa as Video2D, Ba as VideoLoader, ar as VideoTexture, H as Viewport, or as ViewportTexture, Sa as WebAudio, ba as WebAudioContext, Bn as WebGLRenderer, xa as WebSound, ht as WheelInputEvent, xr as Window, hi as ZoomBlurEffect, Bi as alignMap, $ as assets, Er as axisDir, Ji as boxSizingMap, E as clamp, oi as clampFrag, S as createHTMLCanvas, Nt as createIdFromString, be as createNode, ct as crossOrigin, ua as cssEasingPresets, la as cubicBezier, b as customNode, ye as customNodes, Ka as defaultOptions, st as determineCrossOrigin, Hi as directionMap, Vi as displayMap, Q as edgeMap, Ui as flexDirectionMap, Wi as flexWrapMap, ai as frag, rt as getCanvasFactory, Oe as getDefaultCssPropertyValue, ot as getGlContextProvider, Za as getRenderEngine, zi as gutterMap, ut as instanceId, $e as isCanvasElement, Xe as isElementNode, Qe as isImageElement, we as isPow2, Ze as isVideoElement, et as isWebgl2, Gi as justifyMap, D as lerp, dn as log2, on as mapGlBlendModes, un as nextPow2, xe as nextTick, Ki as overflowMap, Pr as parseCssFilter, Ae as parseCssFunctions, ke as parseCssProperty, Fr as parseCssTransformOrigin, qi as positionTypeMap, eo as render, to as renderPixels, hr as resetBatchPool, Dr as routeConnection, nt as setCanvasFactory, at as setGlContextProvider, mn as stencilModeMap };
9602
+ export { vt as Aabb2D, er as AnimatedTexture, ma as Animation, qa as Assets, Ea as Audio, va as AudioPipeline, ya as AudioProcessor, Da as AudioSpectrum, Oa as AudioWaveform, A as BufferUsage, Er as Camera2D, cr as CanvasContext, vr as CanvasItem, tr as CanvasTexture, yt as Color, W as ColorAdjustEffect, zr as ColorFilterEffect, Ct as ColorMatrix, Hr as ColorOverlayEffect, Wr as ColorRemoveEffect, qr as ColorReplaceEffect, nr as ColorTexture, T as CoreObject, bt as DEG_TO_RAD, Je as DEVICE_PIXEL_RATIO, G as DrawboardEffect, ei as DropShadowEffect, U as Effect, Zn as EffectMaterial, na as Element2D, vi as Element2DBackground, X as Element2DChart, Si as Element2DComments, Ci as Element2DConnection, Y as Element2DFill, ji as Element2DForeground, Ni as Element2DOutline, Pi as Element2DShadow, Fi as Element2DShape, Ii as Element2DStyle, Bi as Element2DTable, Z as Element2DText, ni as EmbossEffect, Ya as Engine, Zi as Flexbox, Un as FontLoader, Qr as GaussianBlurEffect, Gn as Geometry, La as GifLoader, un as GlBatch2DSystem, on as GlBlendMode, Ot as GlBuffer, Ft as GlBufferSystem, Dt as GlBufferTarget, mn as GlMaskSystem, qt as GlProgram, vn as GlRenderTarget, yn as GlRenderTargetSystem, nn as GlShaderSystem, cn as GlState, ln as GlStateSystem, gn as GlStencilSystem, j as GlSystem, _n as GlViewportSystem, K as GlitchEffect, q as GodrayEffect, rr as GradientTexture, _a as HTMLAudio, ha as HTMLAudioContext, ga as HTMLSound, Ke as IN_BROWSER, qe as IN_MAC_OS, Wn as IndexBuffer, gt as Input, ut as InputEvent, Ra as JsonLoader, ci as KawaseBlurEffect, Aa as KawaseTransition, dt as KeyboardInputEvent, Ma as LeftEraseTransition, Hn as Loader, ia as Lottie2D, za as LottieLoader, Et as MainLoop, ui as MaskEffect, I as Material, aa as Mesh2D, ur as Meta, ft as MouseInputEvent, B as Node, Tr as Node2D, wt as Obb2D, J as OutlineEffect, xe as PI, Se as PI_2, mi as PixelateEffect, ir as PixelsTexture, pt as PointerInputEvent, Tt as Projection2D, Kn as QuadGeometry, L as QuadUvGeometry, xt as RAD_TO_DEG, _t as RefCounted, R as RenderTarget, kt as Renderer, E as Resource, Ve as SUPPORTS_AUDIO_CONTEXT, ze as SUPPORTS_CLICK_EVENTS, Be as SUPPORTS_CREATE_IMAGE_BITMAP, Ne as SUPPORTS_IMAGE_BITMAP, Le as SUPPORTS_MOUSE_EVENTS, Ue as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Fe as SUPPORTS_POINTER_EVENTS, Pe as SUPPORTS_RESIZE_OBSERVER, Re as SUPPORTS_TOUCH_EVENTS, Me as SUPPORTS_WEBGL2, He as SUPPORTS_WEBKIT_AUDIO_CONTEXT, We as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ge as SUPPORTS_WEB_AUDIO, Ie as SUPPORTS_WHEEL_EVENTS, Cr as SceneTree, Ba as TextLoader, z as Texture2D, Va as TextureLoader, ra as TextureRect2D, C as Ticker, Pa as TiltShiftTransition, xr as Timeline, V as TimelineNode, oa as TransformRect2D, wr as Transition, Ia as TwistTransition, jt as UniformGroup, $n as UvGeometry, Qn as UvMaterial, F as VertexAttribute, P as VertexBuffer, sa as Video2D, Ha as VideoLoader, or as VideoTexture, H as Viewport, sr as ViewportTexture, wa as WebAudio, Sa as WebAudioContext, Vn as WebGLRenderer, Ca as WebSound, mt as WheelInputEvent, Sr as Window, gi as ZoomBlurEffect, Hi as alignMap, $ as assets, Dr as axisDir, Xi as boxSizingMap, St as clamp, si as clampFrag, w as createHTMLCanvas, Pt as createIdFromString, ye as createNode, st as crossOrigin, fa as cssEasingPresets, da as cubicBezier, S as customNode, ve as customNodes, Ja as defaultOptions, ot as determineCrossOrigin, Wi as directionMap, Ui as displayMap, Q as edgeMap, Gi as flexDirectionMap, Ki as flexWrapMap, oi as frag, nt as getCanvasFactory, De as getDefaultCssPropertyValue, at as getGlContextProvider, $a as getRenderEngine, Vi as gutterMap, lt as instanceId, Qe as isCanvasElement, Ye as isElementNode, Ze as isImageElement, Ce as isPow2, Xe as isVideoElement, $e as isWebgl2, qi as justifyMap, D as lerp, fn as log2, sn as mapGlBlendModes, dn as nextPow2, be as nextTick, Ji as overflowMap, Fr as parseCssFilter, ke as parseCssFunctions, Oe as parseCssProperty, Ir as parseCssTransformOrigin, Yi as positionTypeMap, no as render, ro as renderPixels, gr as resetBatchPool, Or as routeConnection, tt as setCanvasFactory, it as setGlContextProvider, hn as stencilModeMap };