modern-canvas 0.14.20 → 0.14.21

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,4 +1,4 @@
1
- import { defineProperty as ts, Observable as de, Reactivable as rs, parseColor as oi, property as h, isGradient as ni, isColorFillObject as Gr, clearUndef as ss, idGenerator as is, normalizeFill as li, isNone as V, normalizeBackground as ci, normalizeForeground as hi, normalizeOutline as ui, normalizeShadow as di, normalizeShape as pi, getDefaultStyle as fi, normalizeText as _i, normalizeTextContent as mi, getDefaultTextStyle as gi, getDefaultLayoutStyle as vi, RawWeakMap as bi } from "modern-idoc";
1
+ import { defineProperty as ts, Observable as ue, Reactivable as rs, parseColor as oi, property as h, isGradient as ni, isColorFillObject as Gr, clearUndef as ss, idGenerator as is, normalizeFill as li, isNone as V, normalizeBackground as ci, normalizeForeground as hi, normalizeOutline as ui, normalizeShadow as di, normalizeShape as pi, getDefaultStyle as fi, normalizeText as _i, normalizeTextContent as mi, getDefaultTextStyle as gi, getDefaultLayoutStyle as vi, RawWeakMap as bi } from "modern-idoc";
2
2
  import { fonts as yi } from "modern-font";
3
3
  import { extend as xi } from "colord";
4
4
  import wi from "colord/plugins/names";
@@ -179,7 +179,7 @@ function os(r, e, t = {}) {
179
179
  }
180
180
  return n;
181
181
  }
182
- const Ii = "WebGL2RenderingContext" in globalThis, Mi = "ImageBitmap" in globalThis, Ni = "ResizeObserver" in globalThis, et = "PointerEvent" in globalThis, ki = "WheelEvent" in globalThis, lc = "MouseEvent" in globalThis, be = "ontouchstart" in globalThis, Ui = "onclick" in globalThis, cc = "createImageBitmap" in globalThis, ns = "AudioContext" in globalThis, ls = "webkitAudioContext" in globalThis, cs = "OfflineAudioContext" in globalThis, Bi = "webkitOfflineAudioContext" in globalThis, Li = ns || ls, xr = typeof window < "u", Fi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, hs = globalThis.devicePixelRatio || 1, us = (r) => r !== null && typeof r == "object" && r.nodeType === 1, zi = (r) => us(r) && r.tagName === "VIDEO", hc = (r) => us(r) && r.tagName === "IMG";
182
+ const Ii = "WebGL2RenderingContext" in globalThis, Mi = "ImageBitmap" in globalThis, Ni = "ResizeObserver" in globalThis, Qe = "PointerEvent" in globalThis, ki = "WheelEvent" in globalThis, lc = "MouseEvent" in globalThis, ve = "ontouchstart" in globalThis, Ui = "onclick" in globalThis, cc = "createImageBitmap" in globalThis, ns = "AudioContext" in globalThis, ls = "webkitAudioContext" in globalThis, cs = "OfflineAudioContext" in globalThis, Bi = "webkitOfflineAudioContext" in globalThis, Li = ns || ls, xr = typeof window < "u", Fi = typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, hs = globalThis.devicePixelRatio || 1, us = (r) => r !== null && typeof r == "object" && r.nodeType === 1, zi = (r) => us(r) && r.tagName === "VIDEO", hc = (r) => us(r) && r.tagName === "IMG";
183
183
  function Gi(r) {
184
184
  return typeof r == "object" && r !== null && r.nodeType === 1 && r.tagName === "CANVAS";
185
185
  }
@@ -201,7 +201,7 @@ function Xi(r, e, t) {
201
201
  t === null && !e.startsWith("data:") ? r.crossOrigin = Hi(e) : t !== !1 && (r.crossOrigin = typeof t == "string" ? t : "anonymous");
202
202
  }
203
203
  let ji = 0;
204
- function rt() {
204
+ function tt() {
205
205
  return ++ji;
206
206
  }
207
207
  class Gt {
@@ -338,7 +338,7 @@ const Ki = {
338
338
  touchmove: "pointermove",
339
339
  touchcancel: "pointercancel"
340
340
  };
341
- class Zi extends de {
341
+ class Zi extends ue {
342
342
  /**
343
343
  * Current event
344
344
  */
@@ -360,24 +360,24 @@ class Zi extends de {
360
360
  if (!this.setuped || !this.target)
361
361
  return;
362
362
  const e = this.target.style;
363
- globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "", e.msTouchAction = "") : et && (e.touchAction = ""), et ? (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)), be && (this.target.removeEventListener("touchstart", this._onPointerDown), this.target.removeEventListener("touchmove", this._onPointerMove), this.target.removeEventListener("touchend", this._onPointerUp)), this.target.removeEventListener("wheel", this._onWheel), document.removeEventListener("keydown", this._onKeyDown), document.removeEventListener("keypress", this._onKeyPress), document.removeEventListener("keyup", this._onKeyUp), this.target = void 0, this.setuped = !1;
363
+ globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "", e.msTouchAction = "") : Qe && (e.touchAction = ""), Qe ? (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)), ve && (this.target.removeEventListener("touchstart", this._onPointerDown), this.target.removeEventListener("touchmove", this._onPointerMove), this.target.removeEventListener("touchend", this._onPointerUp)), this.target.removeEventListener("wheel", this._onWheel), document.removeEventListener("keydown", this._onKeyDown), document.removeEventListener("keypress", this._onKeyPress), document.removeEventListener("keyup", this._onKeyUp), this.target = void 0, this.setuped = !1;
364
364
  }
365
365
  addEventListeners() {
366
366
  if (this.setuped || !this.target)
367
367
  return;
368
368
  const e = this.target.style;
369
- e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none", e.msTouchAction = "none") : et && (e.touchAction = "none")), et ? (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)), be && (this.target.addEventListener("touchstart", this._onPointerDown), this.target.addEventListener("touchmove", this._onPointerMove), this.target.addEventListener("touchend", this._onPointerUp)), this.target.addEventListener("wheel", this._onWheel), document.addEventListener("keydown", this._onKeyDown), document.addEventListener("keypress", this._onKeyPress), document.addEventListener("keyup", this._onKeyUp), this.setuped = !0;
369
+ e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none", e.msTouchAction = "none") : Qe && (e.touchAction = "none")), Qe ? (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)), ve && (this.target.addEventListener("touchstart", this._onPointerDown), this.target.addEventListener("touchmove", this._onPointerMove), this.target.addEventListener("touchend", this._onPointerUp)), this.target.addEventListener("wheel", this._onWheel), document.addEventListener("keydown", this._onKeyDown), document.addEventListener("keypress", this._onKeyPress), document.addEventListener("keyup", this._onKeyUp), this.setuped = !0;
370
370
  }
371
371
  normalize(e) {
372
372
  const t = [];
373
- if (be && e instanceof globalThis.TouchEvent)
373
+ if (ve && e instanceof globalThis.TouchEvent)
374
374
  for (let s = 0, i = e.changedTouches.length; s < i; s++) {
375
375
  const a = e.changedTouches[s];
376
376
  typeof a.button > "u" && (a.button = 0), typeof a.buttons > "u" && (a.buttons = 1), typeof a.isPrimary > "u" && (a.isPrimary = e.touches.length === 1 && e.type === "touchstart"), typeof a.width > "u" && (a.width = a.radiusX || 1), typeof a.height > "u" && (a.height = a.radiusY || 1), typeof a.tiltX > "u" && (a.tiltX = 0), typeof a.tiltY > "u" && (a.tiltY = 0), typeof a.pointerType > "u" && (a.pointerType = "touch"), typeof a.pointerId > "u" && (a.pointerId = a.identifier || 0), typeof a.pressure > "u" && (a.pressure = a.force || 0.5), typeof a.twist > "u" && (a.twist = 0), typeof a.tangentialPressure > "u" && (a.tangentialPressure = 0), typeof a.layerX > "u" && (a.layerX = a.offsetX = a.clientX), typeof a.layerY > "u" && (a.layerY = a.offsetY = a.clientY), a.type = e.type, t.push(a);
377
377
  }
378
378
  else if (ki && e instanceof globalThis.WheelEvent)
379
379
  t.push(e);
380
- else if (et && e instanceof globalThis.PointerEvent)
380
+ else if (Qe && e instanceof globalThis.PointerEvent)
381
381
  t.push(e);
382
382
  else {
383
383
  const s = e;
@@ -447,7 +447,7 @@ class Zi extends de {
447
447
  this.event?.cursor && this.setCursor(this.event.cursor);
448
448
  };
449
449
  _onPointerDown = (e) => {
450
- if (be && e.pointerType === "touch")
450
+ if (ve && e.pointerType === "touch")
451
451
  return;
452
452
  const t = this.normalize(e);
453
453
  for (let s = 0, i = t.length; s < i; s++)
@@ -455,7 +455,7 @@ class Zi extends de {
455
455
  this.event?.cursor && this.setCursor(this.event.cursor);
456
456
  };
457
457
  _onPointerOver = (e) => {
458
- if (!this.enableClickEvent || be && e.pointerType === "touch")
458
+ if (!this.enableClickEvent || ve && e.pointerType === "touch")
459
459
  return;
460
460
  const t = this.normalize(e);
461
461
  for (let s = 0, i = t.length; s < i; s++)
@@ -463,7 +463,7 @@ class Zi extends de {
463
463
  this.event?.cursor && this.setCursor(this.event.cursor);
464
464
  };
465
465
  _onPointerMove = (e) => {
466
- if (!this.enableMoveEvent || be && e.pointerType === "touch")
466
+ if (!this.enableMoveEvent || ve && e.pointerType === "touch")
467
467
  return;
468
468
  const t = this.normalize(e);
469
469
  for (let s = 0, i = t.length; s < i; s++)
@@ -471,7 +471,7 @@ class Zi extends de {
471
471
  this.event?.cursor && this.setCursor(this.event.cursor);
472
472
  };
473
473
  _onPointerUp = (e) => {
474
- if (!this.enableClickEvent || be && e.pointerType === "touch")
474
+ if (!this.enableClickEvent || ve && e.pointerType === "touch")
475
475
  return;
476
476
  let t = e.target;
477
477
  e.composedPath && e.composedPath().length > 0 && (t = e.composedPath()[0]);
@@ -495,7 +495,7 @@ class Zi extends de {
495
495
  }
496
496
  }
497
497
  class Ee extends rs {
498
- instanceId = rt();
498
+ instanceId = tt();
499
499
  get json() {
500
500
  return this.toJSON();
501
501
  }
@@ -512,10 +512,10 @@ class Ee extends rs {
512
512
  class Ji extends Ee {
513
513
  //
514
514
  }
515
- class pe extends Ji {
515
+ class de extends Ji {
516
516
  //
517
517
  }
518
- class le extends de {
518
+ class le extends ue {
519
519
  constructor(e, t, s) {
520
520
  super(), this.rows = e, this.cols = t, s ? this.set(s) : this.identity();
521
521
  }
@@ -614,7 +614,7 @@ class le extends de {
614
614
  return this._array.slice();
615
615
  }
616
616
  }
617
- class Q extends de {
617
+ class Q extends ue {
618
618
  constructor(e) {
619
619
  super(), this.dim = e;
620
620
  }
@@ -1638,16 +1638,16 @@ _s([
1638
1638
  _s([
1639
1639
  h({ fallback: 1 })
1640
1640
  ], wr.prototype, "speed");
1641
- var it = /* @__PURE__ */ ((r) => (r[r.elementArrayBuffer = 34963] = "elementArrayBuffer", r[r.arrayBuffer = 34962] = "arrayBuffer", r[r.uniformBuffer = 35345] = "uniformBuffer", r))(it || {});
1641
+ var st = /* @__PURE__ */ ((r) => (r[r.elementArrayBuffer = 34963] = "elementArrayBuffer", r[r.arrayBuffer = 34962] = "arrayBuffer", r[r.uniformBuffer = 35345] = "uniformBuffer", r))(st || {});
1642
1642
  class sa {
1643
1643
  constructor(e) {
1644
1644
  this.native = e;
1645
1645
  }
1646
- target = it.arrayBuffer;
1646
+ target = st.arrayBuffer;
1647
1647
  byteLength = 0;
1648
1648
  dirty = !0;
1649
1649
  }
1650
- var ye = /* @__PURE__ */ ((r) => (r[r.mapRead = 1] = "mapRead", r[r.mapWrite = 2] = "mapWrite", r[r.copySrc = 4] = "copySrc", r[r.copyDst = 8] = "copyDst", r[r.index = 16] = "index", r[r.vertex = 32] = "vertex", r[r.uniform = 64] = "uniform", r[r.storage = 128] = "storage", r[r.indirect = 256] = "indirect", r[r.queryResolve = 512] = "queryResolve", r[r.static = 1024] = "static", r))(ye || {}), ia = Object.defineProperty, ms = (r, e, t, s) => {
1650
+ var be = /* @__PURE__ */ ((r) => (r[r.mapRead = 1] = "mapRead", r[r.mapWrite = 2] = "mapWrite", r[r.copySrc = 4] = "copySrc", r[r.copyDst = 8] = "copyDst", r[r.index = 16] = "index", r[r.vertex = 32] = "vertex", r[r.uniform = 64] = "uniform", r[r.storage = 128] = "storage", r[r.indirect = 256] = "indirect", r[r.queryResolve = 512] = "queryResolve", r[r.static = 1024] = "static", r))(be || {}), ia = Object.defineProperty, ms = (r, e, t, s) => {
1651
1651
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
1652
1652
  (o = r[a]) && (i = o(e, t, i) || i);
1653
1653
  return i && ia(e, t, i), i;
@@ -1677,7 +1677,7 @@ function aa(r, e) {
1677
1677
  let t = Xr[r];
1678
1678
  return t === void 0 && (Qt[e] === void 0 && (Qt[e] = 1), Xr[r] = t = Qt[e]++), t;
1679
1679
  }
1680
- class W extends de {
1680
+ class W extends ue {
1681
1681
  get _gl() {
1682
1682
  return this._renderer.gl;
1683
1683
  }
@@ -1708,8 +1708,8 @@ class oa extends W {
1708
1708
  }
1709
1709
  _createGlBuffer(e) {
1710
1710
  const t = this._gl, s = new sa(t.createBuffer());
1711
- let i = it.arrayBuffer;
1712
- return e.usage & ye.index ? i = it.elementArrayBuffer : e.usage & ye.uniform && (i = it.uniformBuffer), s.target = i, this.glBuffers.set(e.instanceId, s), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (a) => {
1711
+ let i = st.arrayBuffer;
1712
+ return e.usage & be.index ? i = st.elementArrayBuffer : e.usage & be.uniform && (i = st.uniformBuffer), s.target = i, this.glBuffers.set(e.instanceId, s), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (a) => {
1713
1713
  switch (a) {
1714
1714
  case "usage":
1715
1715
  case "data":
@@ -1731,7 +1731,7 @@ class oa extends W {
1731
1731
  s.dirty = !1;
1732
1732
  const { _gl: i } = this, { usage: a, data: o } = e;
1733
1733
  i.bindBuffer(s.target, s.native);
1734
- const n = a & ye.static ? i.STATIC_DRAW : i.DYNAMIC_DRAW;
1734
+ const n = a & be.static ? i.STATIC_DRAW : i.DYNAMIC_DRAW;
1735
1735
  if (o)
1736
1736
  if (s.byteLength >= o.byteLength) {
1737
1737
  const l = o.length * o.BYTES_PER_ELEMENT;
@@ -1786,14 +1786,14 @@ ${r}`;
1786
1786
  function fa(r, e) {
1787
1787
  return e ? r.replace("#version 300 es", "") : r;
1788
1788
  }
1789
- const tt = /* @__PURE__ */ Object.create(null), tr = {
1789
+ const et = /* @__PURE__ */ Object.create(null), tr = {
1790
1790
  stripVersion: fa,
1791
1791
  ensurePrecision: ca,
1792
1792
  addProgramDefines: la,
1793
1793
  setProgramName: pa,
1794
1794
  insertVersion: ha
1795
1795
  };
1796
- class nt {
1796
+ class ot {
1797
1797
  static defaultOptions = {
1798
1798
  preferredVertexPrecision: "highp",
1799
1799
  preferredFragmentPrecision: "mediump"
@@ -1806,7 +1806,7 @@ class nt {
1806
1806
  attributes = /* @__PURE__ */ Object.create(null);
1807
1807
  uniforms = /* @__PURE__ */ Object.create(null);
1808
1808
  constructor(e) {
1809
- e = { ...nt.defaultOptions, ...e };
1809
+ e = { ...ot.defaultOptions, ...e };
1810
1810
  let t = e.fragment, s = e.vertex;
1811
1811
  const i = t.includes("#version 300 es"), a = {
1812
1812
  stripVersion: i,
@@ -1828,11 +1828,11 @@ class nt {
1828
1828
  }), this.fragment = t, this.vertex = s, this.transformFeedbackVaryings = e.transformFeedbackVaryings, this.id = aa(`${s}:${t}`, "GlProgram");
1829
1829
  }
1830
1830
  destroy() {
1831
- this.fragment = "", this.vertex = "", this.attributes = /* @__PURE__ */ Object.create(null), this.uniforms = /* @__PURE__ */ Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete tt[this._cacheKey];
1831
+ this.fragment = "", this.vertex = "", this.attributes = /* @__PURE__ */ Object.create(null), this.uniforms = /* @__PURE__ */ Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete et[this._cacheKey];
1832
1832
  }
1833
1833
  static from(e) {
1834
1834
  const t = `${e.vertex}:${e.fragment}`;
1835
- return tt[t] || (tt[t] = new nt(e), tt[t]._cacheKey = t), tt[t];
1835
+ return et[t] || (et[t] = new ot(e), et[t]._cacheKey = t), et[t];
1836
1836
  }
1837
1837
  }
1838
1838
  const jr = {
@@ -2147,7 +2147,7 @@ ${s.getShaderInfoLog(i)}`);
2147
2147
  super.destroy(), this.bind(null);
2148
2148
  }
2149
2149
  }
2150
- var lt = /* @__PURE__ */ ((r) => (r.normal = "normal", r.add = "add", r.multiply = "multiply", r.screen = "screen", r.none = "none", r.normalNpm = "normalNpm", r.addNpm = "add_npm", r.screenNpm = "screenNpm", r.srcIn = "srcIn", r.srcOut = "srcOut", r.srcAtop = "srcAtop", r.dstOver = "dstOver", r.dstIn = "dstIn", r.dstOut = "dstOut", r.dstAtop = "dstAtop", r.xor = "xor", r.subtract = "subtract", r))(lt || {});
2150
+ var nt = /* @__PURE__ */ ((r) => (r.normal = "normal", r.add = "add", r.multiply = "multiply", r.screen = "screen", r.none = "none", r.normalNpm = "normalNpm", r.addNpm = "add_npm", r.screenNpm = "screenNpm", r.srcIn = "srcIn", r.srcOut = "srcOut", r.srcAtop = "srcAtop", r.dstOver = "dstOver", r.dstIn = "dstIn", r.dstOut = "dstOut", r.dstAtop = "dstAtop", r.xor = "xor", r.subtract = "subtract", r))(nt || {});
2151
2151
  function ya(r) {
2152
2152
  return {
2153
2153
  normal: [r.ONE, r.ONE_MINUS_SRC_ALPHA],
@@ -2199,14 +2199,14 @@ class ze {
2199
2199
  const e = new ze();
2200
2200
  return e.depthTest = !1, e.blend = !0, e;
2201
2201
  }
2202
- _blendMode = lt.normal;
2202
+ _blendMode = nt.normal;
2203
2203
  _polygonOffset = 0;
2204
2204
  bitmap = 0;
2205
2205
  get blendMode() {
2206
2206
  return this._blendMode;
2207
2207
  }
2208
2208
  set blendMode(e) {
2209
- this.blend = e !== lt.none, this._blendMode = e;
2209
+ this.blend = e !== nt.none, this._blendMode = e;
2210
2210
  }
2211
2211
  get polygonOffset() {
2212
2212
  return this._polygonOffset;
@@ -2276,7 +2276,7 @@ class xa extends W {
2276
2276
  e.blend && this.setBlendMode(e.blendMode), e.offsets && this.setPolygonOffset(1, e.polygonOffset);
2277
2277
  }
2278
2278
  reset() {
2279
- super.reset(), this.bind(this.defaultState), this._blendEq = !0, this.setBlendMode(lt.normal);
2279
+ super.reset(), this.bind(this.defaultState), this._blendEq = !0, this.setBlendMode(nt.normal);
2280
2280
  }
2281
2281
  }
2282
2282
  class wa extends W {
@@ -2306,8 +2306,8 @@ class wa extends W {
2306
2306
  }
2307
2307
  _createShader(e) {
2308
2308
  const t = this._renderer, s = {
2309
- instanceId: rt(),
2310
- glProgram: new nt({
2309
+ instanceId: tt(),
2310
+ glProgram: new ot({
2311
2311
  vertex: `precision highp float;
2312
2312
  in vec2 aPosition;
2313
2313
  in vec2 aUv;
@@ -2366,15 +2366,15 @@ ${Array.from({ length: e }, (l, c) => {
2366
2366
  }`
2367
2367
  })
2368
2368
  }, i = {
2369
- instanceId: rt(),
2370
- usage: ye.vertex,
2369
+ instanceId: tt(),
2370
+ usage: be.vertex,
2371
2371
  data: new Float32Array()
2372
2372
  }, a = {
2373
- instanceId: rt(),
2374
- usage: ye.index,
2373
+ instanceId: tt(),
2374
+ usage: be.index,
2375
2375
  data: new Uint32Array()
2376
2376
  }, o = {
2377
- instanceId: rt(),
2377
+ instanceId: tt(),
2378
2378
  topology: "triangle-list",
2379
2379
  attributes: Object.fromEntries(
2380
2380
  Object.entries(this._attributes).map(([l, c]) => [l, { ...c, buffer: i }])
@@ -2413,26 +2413,26 @@ ${Array.from({ length: e }, (l, c) => {
2413
2413
  const d = [];
2414
2414
  let p = 0;
2415
2415
  for (let f = s.length, _ = { id: ++p }, g = [], v = /* @__PURE__ */ new Map(), w = 0, S = 0, C = 0; C < f; C++) {
2416
- const k = s[C].texture, ge = C === f - 1;
2416
+ const k = s[C].texture, me = C === f - 1;
2417
2417
  if (!k || v.has(k)) {
2418
- if (!ge)
2418
+ if (!me)
2419
2419
  continue;
2420
2420
  } else
2421
2421
  g.push(k), v.set(k, w++);
2422
- if (ge || w >= i) {
2422
+ if (me || w >= i) {
2423
2423
  _.textures = g, _.textureLocationMap = v, w = 0, _.start = u;
2424
- for (let ve = S; ve <= C; ve++) {
2424
+ for (let ge = S; ge <= C; ge++) {
2425
2425
  const {
2426
2426
  indices: Br,
2427
2427
  vertices: qt,
2428
2428
  uvs: Lr = new Float32Array(0),
2429
2429
  size: Qs = { width: 0, height: 0 },
2430
2430
  texture: Fr,
2431
- blendMode: zr = lt.normal,
2431
+ blendMode: zr = nt.normal,
2432
2432
  clipOutsideUv: ei,
2433
2433
  roundPixels: ti
2434
- } = s[ve];
2435
- S < ve && _.blendMode !== zr && (_.size = u - _.start, d.push(_), S = ve, _ = { id: ++p }, _.textures = g, _.start = u);
2434
+ } = s[ge];
2435
+ S < ge && _.blendMode !== zr && (_.size = u - _.start, d.push(_), S = ge, _ = { id: ++p }, _.textures = g, _.start = u);
2436
2436
  const { width: Yt, height: Kt } = Qs, ri = c / this._vertexSize, si = (Fr ? v.get(Fr) : 255) ?? 255, ii = ti ? 1 : 0, ai = ei ? 1 : 0;
2437
2437
  let xt, wt;
2438
2438
  for (let Zt = qt.length, J = 0; J < Zt; J += 2) {
@@ -2452,8 +2452,8 @@ ${Array.from({ length: e }, (l, c) => {
2452
2452
  for (let f = d.length, _ = 0; _ < f; _++) {
2453
2453
  const g = d[_], { start: v = 0, textures: w, textureLocationMap: S } = g;
2454
2454
  for (let C = w.length, k = 0; k < C; k++) {
2455
- const ge = w[k], ve = S.get(ge);
2456
- ve !== void 0 && this._renderer.texture.bind(ge, ve);
2455
+ const me = w[k], ge = S.get(me);
2456
+ ge !== void 0 && this._renderer.texture.bind(me, ge);
2457
2457
  }
2458
2458
  this._state.blendMode = g.blendMode, this._renderer.state.bind(this._state), m.draw({
2459
2459
  size: g.size,
@@ -2483,7 +2483,7 @@ function Yr(r) {
2483
2483
  let t = (r > 255 ? 1 : 0) << 3;
2484
2484
  return r >>>= t, e |= t, t = (r > 15 ? 1 : 0) << 2, r >>>= t, e |= t, t = (r > 3 ? 1 : 0) << 1, r >>>= t, e |= t, e | r >> 1;
2485
2485
  }
2486
- var D = /* @__PURE__ */ ((r) => (r[r.disabled = 0] = "disabled", r[r.renderingMaskAdd = 1] = "renderingMaskAdd", r[r.maskActive = 2] = "maskActive", r[r.inverseMaskActive = 3] = "inverseMaskActive", r[r.renderingMaskRemove = 4] = "renderingMaskRemove", r[r.none = 5] = "none", r))(D || {}), at = /* @__PURE__ */ ((r) => (r[r.none = 0] = "none", r[r.color = 16384] = "color", r[r.stencil = 1024] = "stencil", r[r.depth = 256] = "depth", r[r.colorDepth = 16640] = "colorDepth", r[r.colorStencil = 17408] = "colorStencil", r[r.depthStencil = 1280] = "depthStencil", r[r.all = 17664] = "all", r))(at || {});
2486
+ var D = /* @__PURE__ */ ((r) => (r[r.disabled = 0] = "disabled", r[r.renderingMaskAdd = 1] = "renderingMaskAdd", r[r.maskActive = 2] = "maskActive", r[r.inverseMaskActive = 3] = "inverseMaskActive", r[r.renderingMaskRemove = 4] = "renderingMaskRemove", r[r.none = 5] = "none", r))(D || {}), it = /* @__PURE__ */ ((r) => (r[r.none = 0] = "none", r[r.color = 16384] = "color", r[r.stencil = 1024] = "stencil", r[r.depth = 256] = "depth", r[r.colorDepth = 16640] = "colorDepth", r[r.colorStencil = 17408] = "colorStencil", r[r.depthStencil = 1280] = "depthStencil", r[r.all = 17664] = "all", r))(it || {});
2487
2487
  class Pa extends W {
2488
2488
  install(e) {
2489
2489
  super.install(e), e.mask = this;
@@ -2509,7 +2509,7 @@ class Pa extends W {
2509
2509
  return;
2510
2510
  const { mask: s } = t, i = this._renderer.renderTarget.current?.instanceId ?? -1;
2511
2511
  let a = this._maskStackHash[i] ?? 0;
2512
- "x" in s && this._renderer.scissor.pop(), "render" in s && (this._renderer.flush(), a !== 0 ? this._renderer.stencil.bind(D.renderingMaskRemove, a) : (this._renderer.clear(at.stencil), this._renderer.stencil.bind(D.disabled, a)), a--, s.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(D.maskActive, a), this._renderer.colorMask.bind(15)), this._maskStackHash[i] = a;
2512
+ "x" in s && this._renderer.scissor.pop(), "render" in s && (this._renderer.flush(), a !== 0 ? this._renderer.stencil.bind(D.renderingMaskRemove, a) : (this._renderer.clear(it.stencil), this._renderer.stencil.bind(D.disabled, a)), a--, s.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(D.maskActive, a), this._renderer.colorMask.bind(15)), this._maskStackHash[i] = a;
2513
2513
  }
2514
2514
  }
2515
2515
  var fr = /* @__PURE__ */ ((r) => (r[r.RGBA = 6408] = "RGBA", r[r.RGB = 6407] = "RGB", r[r.RG = 33319] = "RG", r[r.RED = 6403] = "RED", r[r.RGBA_INTEGER = 36249] = "RGBA_INTEGER", r[r.RGB_INTEGER = 36248] = "RGB_INTEGER", r[r.RG_INTEGER = 33320] = "RG_INTEGER", r[r.RED_INTEGER = 36244] = "RED_INTEGER", r[r.ALPHA = 6406] = "ALPHA", r[r.LUMINANCE = 6409] = "LUMINANCE", r[r.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", r[r.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", r[r.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", r))(fr || {}), vs = /* @__PURE__ */ ((r) => (r[r.TEXTURE_2D = 3553] = "TEXTURE_2D", r[r.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", r[r.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", r[r.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", r[r.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", r[r.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", r[r.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", r))(vs || {}), y = /* @__PURE__ */ ((r) => (r[r.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", r[r.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", r[r.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", r[r.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", r[r.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", r[r.UNSIGNED_INT = 5125] = "UNSIGNED_INT", r[r.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", r[r.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", r[r.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", r[r.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", r[r.BYTE = 5120] = "BYTE", r[r.SHORT = 5122] = "SHORT", r[r.INT = 5124] = "INT", r[r.FLOAT = 5126] = "FLOAT", r[r.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", r[r.HALF_FLOAT = 36193] = "HALF_FLOAT", r))(y || {});
@@ -3728,8 +3728,8 @@ class Xa extends Pr {
3728
3728
  height: this.screen.height * this.pixelRatio
3729
3729
  });
3730
3730
  }
3731
- clear(e = at.all) {
3732
- typeof e == "boolean" && (e = e ? at.all : at.none), e && this.gl.clear(e);
3731
+ clear(e = it.all) {
3732
+ typeof e == "boolean" && (e = e ? it.all : it.none), e && this.gl.clear(e);
3733
3733
  }
3734
3734
  reset() {
3735
3735
  this._systems.forEach((e) => e.reset());
@@ -3770,13 +3770,13 @@ var Wa = Object.defineProperty, bs = (r, e, t, s) => {
3770
3770
  (o = r[a]) && (i = o(e, t, i) || i);
3771
3771
  return i && Wa(e, t, i), i;
3772
3772
  };
3773
- class We extends pe {
3773
+ class We extends de {
3774
3774
  constructor(e) {
3775
3775
  super(), this.setProperties(e);
3776
3776
  }
3777
3777
  }
3778
3778
  bs([
3779
- h({ fallback: ye.index })
3779
+ h({ fallback: be.index })
3780
3780
  ], We.prototype, "usage");
3781
3781
  bs([
3782
3782
  h({ default: () => new Uint32Array() })
@@ -3786,7 +3786,7 @@ var qa = Object.defineProperty, Vt = (r, e, t, s) => {
3786
3786
  (o = r[a]) && (i = o(e, t, i) || i);
3787
3787
  return i && qa(e, t, i), i;
3788
3788
  };
3789
- class Ue extends pe {
3789
+ class Ue extends de {
3790
3790
  constructor(e = {}) {
3791
3791
  super(), this.setProperties(e);
3792
3792
  }
@@ -3811,29 +3811,29 @@ var Ya = Object.defineProperty, ys = (r, e, t, s) => {
3811
3811
  (o = r[a]) && (i = o(e, t, i) || i);
3812
3812
  return i && Ya(e, t, i), i;
3813
3813
  };
3814
- class xe extends pe {
3814
+ class ye extends de {
3815
3815
  constructor(e) {
3816
3816
  super(), this.setProperties(e);
3817
3817
  }
3818
3818
  }
3819
3819
  ys([
3820
- h({ fallback: ye.vertex })
3821
- ], xe.prototype, "usage");
3820
+ h({ fallback: be.vertex })
3821
+ ], ye.prototype, "usage");
3822
3822
  ys([
3823
3823
  h({ default: () => new Float32Array() })
3824
- ], xe.prototype, "data");
3824
+ ], ye.prototype, "data");
3825
3825
  var Ka = Object.defineProperty, Be = (r, e, t, s) => {
3826
3826
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
3827
3827
  (o = r[a]) && (i = o(e, t, i) || i);
3828
3828
  return i && Ka(e, t, i), i;
3829
3829
  };
3830
- class H extends pe {
3830
+ class H extends de {
3831
3831
  constructor(e) {
3832
3832
  super(), this.setProperties(e);
3833
3833
  }
3834
3834
  }
3835
3835
  Be([
3836
- h({ default: () => new xe() })
3836
+ h({ default: () => new ye() })
3837
3837
  ], H.prototype, "buffer");
3838
3838
  Be([
3839
3839
  h({ fallback: "float32" })
@@ -3860,7 +3860,7 @@ class _c extends Ue {
3860
3860
  attributes: {
3861
3861
  position: new H({
3862
3862
  format: "float32x2",
3863
- buffer: new xe({
3863
+ buffer: new ye({
3864
3864
  data: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])
3865
3865
  })
3866
3866
  })
@@ -3883,13 +3883,13 @@ function Qa() {
3883
3883
  tint: new Float32Array([1, 1, 1, 1])
3884
3884
  };
3885
3885
  }
3886
- class E extends pe {
3886
+ class E extends de {
3887
3887
  static instance = new this();
3888
3888
  glProgram;
3889
3889
  constructor(e = {}) {
3890
3890
  super();
3891
3891
  const { uniforms: t, gl: s } = e;
3892
- t && (this.uniforms = t), this.glProgram = new nt({
3892
+ t && (this.uniforms = t), this.glProgram = new ot({
3893
3893
  vertex: `in vec2 position;
3894
3894
  uniform mat3 projectionMatrix;
3895
3895
  uniform mat3 modelViewMatrix;
@@ -4028,13 +4028,13 @@ class P extends Ue {
4028
4028
  attributes: {
4029
4029
  position: new H({
4030
4030
  format: "float32x2",
4031
- buffer: new xe({
4031
+ buffer: new ye({
4032
4032
  data: new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1])
4033
4033
  })
4034
4034
  }),
4035
4035
  uv: new H({
4036
4036
  format: "float32x2",
4037
- buffer: new xe({
4037
+ buffer: new ye({
4038
4038
  data: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])
4039
4039
  })
4040
4040
  })
@@ -4049,7 +4049,7 @@ class mc extends Ue {
4049
4049
  positionBuffer;
4050
4050
  uvBuffer;
4051
4051
  constructor(e) {
4052
- const t = new xe({ data: new Float32Array() }), s = new xe({ data: new Float32Array() });
4052
+ const t = new ye({ data: new Float32Array() }), s = new ye({ data: new Float32Array() });
4053
4053
  super({
4054
4054
  ...e,
4055
4055
  attributes: {
@@ -4071,7 +4071,7 @@ var so = Object.defineProperty, Se = (r, e, t, s) => {
4071
4071
  (o = r[a]) && (i = o(e, t, i) || i);
4072
4072
  return i && so(e, t, i), i;
4073
4073
  };
4074
- class te extends pe {
4074
+ class te extends de {
4075
4075
  get valid() {
4076
4076
  return !!(this.width && this.height);
4077
4077
  }
@@ -4111,7 +4111,7 @@ var io = Object.defineProperty, N = (r, e, t, s) => {
4111
4111
  (o = r[a]) && (i = o(e, t, i) || i);
4112
4112
  return i && io(e, t, i), i;
4113
4113
  };
4114
- class x extends pe {
4114
+ class x extends de {
4115
4115
  static get EMPTY() {
4116
4116
  return new this({ width: 1, height: 1 });
4117
4117
  }
@@ -4226,7 +4226,7 @@ N([
4226
4226
  N([
4227
4227
  h({ fallback: !1 })
4228
4228
  ], x.prototype, "isPowerOfTwo");
4229
- class ao extends pe {
4229
+ class ao extends de {
4230
4230
  frames;
4231
4231
  frameIndex = 0;
4232
4232
  get currentFrame() {
@@ -4303,7 +4303,7 @@ class $t extends x {
4303
4303
  if (!a)
4304
4304
  throw new Error("Failed to parse linear gradient, get canvas context is null.");
4305
4305
  const { angle: o = 0, stops: n } = e, l = t, c = s, u = l / 2, d = c / 2, p = (o + 90) * Math.PI / 180, m = Math.sin(p), f = -Math.cos(p), _ = Math.abs(l * Math.sin(p)) + Math.abs(c * Math.cos(p)), g = u - m * (_ / 2), v = d - f * (_ / 2), w = u + m * (_ / 2), S = d + f * (_ / 2), C = a.createLinearGradient(g, v, w, S);
4306
- for (const ge of n) C.addColorStop(ge.offset, ge.color);
4306
+ for (const me of n) C.addColorStop(me.offset, me.color);
4307
4307
  a.fillStyle = C, a.fillRect(0, 0, l, c);
4308
4308
  const k = a.getImageData(0, 0, i.width, i.height);
4309
4309
  return {
@@ -4698,8 +4698,10 @@ let I = class extends Ee {
4698
4698
  getTree() {
4699
4699
  return this._tree;
4700
4700
  }
4701
+ // TODO 性能
4702
+ // getViewport(): Viewport | undefined { return this.parent?.getViewport() ?? this.getWindow() }
4701
4703
  getViewport() {
4702
- return this.parent?.getViewport() ?? this.getWindow();
4704
+ return this._tree?.root;
4703
4705
  }
4704
4706
  getWindow() {
4705
4707
  return this._tree?.root;
@@ -5392,7 +5394,7 @@ Le([
5392
5394
  X = Le([
5393
5395
  b("Viewport")
5394
5396
  ], X);
5395
- var Po = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, _t = (r, e, t, s) => {
5397
+ var Po = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, ft = (r, e, t, s) => {
5396
5398
  for (var i = s > 1 ? void 0 : s ? Eo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5397
5399
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
5398
5400
  return s && i && Po(e, t, i), i;
@@ -5584,19 +5586,19 @@ let T = class extends q {
5584
5586
  }));
5585
5587
  }
5586
5588
  };
5587
- _t([
5589
+ ft([
5588
5590
  h({ internal: !0 })
5589
5591
  ], T.prototype, "material", 2);
5590
- _t([
5592
+ ft([
5591
5593
  h()
5592
5594
  ], T.prototype, "effectMode", 2);
5593
- _t([
5595
+ ft([
5594
5596
  h()
5595
5597
  ], T.prototype, "glsl", 2);
5596
- _t([
5598
+ ft([
5597
5599
  h()
5598
5600
  ], T.prototype, "glslSrc", 2);
5599
- T = _t([
5601
+ T = ft([
5600
5602
  b("Effect")
5601
5603
  ], T);
5602
5604
  class So {
@@ -5622,15 +5624,16 @@ class So {
5622
5624
  }), this.calls = [];
5623
5625
  }
5624
5626
  }
5625
- var To = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, Ye = (r, e, t, s) => {
5627
+ var To = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, _t = (r, e, t, s) => {
5626
5628
  for (var i = s > 1 ? void 0 : s ? Ro(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5627
5629
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
5628
5630
  return s && i && To(e, t, i), i;
5629
5631
  };
5630
- let he = class extends I {
5632
+ let xe = class extends I {
5633
+ currentTime = 0;
5631
5634
  static from(r, e = !1) {
5632
5635
  const [t, s] = r ? Array.isArray(r) ? r : [0, r] : [];
5633
- return new he({
5636
+ return new xe({
5634
5637
  startTime: t,
5635
5638
  endTime: s,
5636
5639
  loop: e
@@ -5639,6 +5642,16 @@ let he = class extends I {
5639
5642
  constructor(r) {
5640
5643
  super(), this.setProperties(r);
5641
5644
  }
5645
+ setProperties(r) {
5646
+ if (r) {
5647
+ const {
5648
+ currentTime: e,
5649
+ ...t
5650
+ } = r;
5651
+ e !== void 0 && (this.currentTime = e), super.setProperties(t);
5652
+ }
5653
+ return this;
5654
+ }
5642
5655
  _updateProperty(r, e, t) {
5643
5656
  switch (super._updateProperty(r, e, t), r) {
5644
5657
  case "startTime":
@@ -5658,24 +5671,21 @@ let he = class extends I {
5658
5671
  super._process(r), this.paused || this.addTime(r);
5659
5672
  }
5660
5673
  };
5661
- Ye([
5662
- h({ fallback: 0 })
5663
- ], he.prototype, "startTime", 2);
5664
- Ye([
5674
+ _t([
5665
5675
  h({ fallback: 0 })
5666
- ], he.prototype, "currentTime", 2);
5667
- Ye([
5676
+ ], xe.prototype, "startTime", 2);
5677
+ _t([
5668
5678
  h({ fallback: Number.MAX_SAFE_INTEGER })
5669
- ], he.prototype, "endTime", 2);
5670
- Ye([
5679
+ ], xe.prototype, "endTime", 2);
5680
+ _t([
5671
5681
  h({ fallback: !1 })
5672
- ], he.prototype, "loop", 2);
5673
- Ye([
5682
+ ], xe.prototype, "loop", 2);
5683
+ _t([
5674
5684
  h({ fallback: !1 })
5675
- ], he.prototype, "paused", 2);
5676
- he = Ye([
5685
+ ], xe.prototype, "paused", 2);
5686
+ xe = _t([
5677
5687
  b("Timeline")
5678
- ], he);
5688
+ ], xe);
5679
5689
  var Ao = Object.getOwnPropertyDescriptor, Co = (r, e, t, s) => {
5680
5690
  for (var i = s > 1 ? void 0 : s ? Ao(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5681
5691
  (o = r[a]) && (i = o(i) || i);
@@ -5703,7 +5713,7 @@ var Oo = Object.defineProperty, Te = (r, e, t, s) => {
5703
5713
  (o = r[a]) && (i = o(e, t, i) || i);
5704
5714
  return i && Oo(e, t, i), i;
5705
5715
  };
5706
- class fe extends wr {
5716
+ class pe extends wr {
5707
5717
  input = new Zi();
5708
5718
  renderStack = new So();
5709
5719
  root = new _r().setTree(this);
@@ -5752,28 +5762,28 @@ class fe extends wr {
5752
5762
  }
5753
5763
  Te([
5754
5764
  h({ alias: "root.msaa" })
5755
- ], fe.prototype, "msaa");
5765
+ ], pe.prototype, "msaa");
5756
5766
  Te([
5757
5767
  h({ fallback: !1 })
5758
- ], fe.prototype, "pixelate");
5768
+ ], pe.prototype, "pixelate");
5759
5769
  Te([
5760
5770
  h({ fallback: !1 })
5761
- ], fe.prototype, "roundPixels");
5771
+ ], pe.prototype, "roundPixels");
5762
5772
  Te([
5763
5773
  h()
5764
- ], fe.prototype, "backgroundColor");
5774
+ ], pe.prototype, "backgroundColor");
5765
5775
  Te([
5766
5776
  h({ internal: !0, fallback: !1 })
5767
- ], fe.prototype, "debug");
5777
+ ], pe.prototype, "debug");
5768
5778
  Te([
5769
5779
  h({ internal: !0, fallback: !1 })
5770
- ], fe.prototype, "processPaused");
5780
+ ], pe.prototype, "processPaused");
5771
5781
  Te([
5772
5782
  h({ internal: !0, default: () => yi })
5773
- ], fe.prototype, "fonts");
5783
+ ], pe.prototype, "fonts");
5774
5784
  Te([
5775
- h({ internal: !0, default: () => new he() })
5776
- ], fe.prototype, "timeline");
5785
+ h({ internal: !0, default: () => new xe() })
5786
+ ], pe.prototype, "timeline");
5777
5787
  var Do = Object.getOwnPropertyDescriptor, Io = (r, e, t, s) => {
5778
5788
  for (var i = s > 1 ? void 0 : s ? Do(e, t) : e, a = r.length - 1, o; a >= 0; a--)
5779
5789
  (o = r[a]) && (i = o(i) || i);
@@ -6136,7 +6146,7 @@ function Lo(r) {
6136
6146
  }
6137
6147
  });
6138
6148
  }
6139
- var Es = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, zo = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, _e = (r, e, t, s) => {
6149
+ var Es = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, zo = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, fe = (r, e, t, s) => {
6140
6150
  for (var i = s > 1 ? void 0 : s ? Fo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6141
6151
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6142
6152
  return s && i && Es(e, t, i), i;
@@ -6198,31 +6208,31 @@ void main(void) {
6198
6208
  }`
6199
6209
  }
6200
6210
  }));
6201
- _e([
6211
+ fe([
6202
6212
  h({ fallback: 1 })
6203
6213
  ], j.prototype, "saturation", 2);
6204
- _e([
6214
+ fe([
6205
6215
  h({ fallback: 1 })
6206
6216
  ], j.prototype, "contrast", 2);
6207
- _e([
6217
+ fe([
6208
6218
  h({ fallback: 1 })
6209
6219
  ], j.prototype, "brightness", 2);
6210
- _e([
6220
+ fe([
6211
6221
  h({ fallback: 1 })
6212
6222
  ], j.prototype, "red", 2);
6213
- _e([
6223
+ fe([
6214
6224
  h({ fallback: 1 })
6215
6225
  ], j.prototype, "green", 2);
6216
- _e([
6226
+ fe([
6217
6227
  h({ fallback: 1 })
6218
6228
  ], j.prototype, "blue", 2);
6219
- _e([
6229
+ fe([
6220
6230
  h({ fallback: 1 })
6221
6231
  ], j.prototype, "alpha", 2);
6222
- _e([
6232
+ fe([
6223
6233
  h({ fallback: 1 })
6224
6234
  ], j.prototype, "gamma", 2);
6225
- j = _e([
6235
+ j = fe([
6226
6236
  b("ColorAdjustEffect")
6227
6237
  ], j);
6228
6238
  var Ss = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, $o = (r, e, t) => e in r ? Ss(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ts = (r, e, t, s) => {
@@ -6317,7 +6327,7 @@ var Rs = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, jo = (r, e
6317
6327
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6318
6328
  return s && i && Rs(e, t, i), i;
6319
6329
  }, Wo = (r, e, t) => jo(r, e + "", t);
6320
- const ot = 50;
6330
+ const at = 50;
6321
6331
  let He = class extends T {
6322
6332
  _color = new ne();
6323
6333
  constructor(r, e = []) {
@@ -6330,11 +6340,11 @@ let He = class extends T {
6330
6340
  const i = this._color.toArray();
6331
6341
  return i[3] = this.alpha, i;
6332
6342
  });
6333
- for (; t.length < ot; )
6343
+ for (; t.length < at; )
6334
6344
  t.push([0, 0, 0, 0]);
6335
6345
  P.draw(r, He.material, {
6336
6346
  sampler: 0,
6337
- colors: t.slice(0, ot).flatMap((s) => s)
6347
+ colors: t.slice(0, at).flatMap((s) => s)
6338
6348
  });
6339
6349
  });
6340
6350
  }
@@ -6351,7 +6361,7 @@ void main() {
6351
6361
  }`,
6352
6362
  fragment: `precision mediump float;
6353
6363
  uniform sampler2D sampler;
6354
- uniform vec4 colors[${ot}];
6364
+ uniform vec4 colors[${at}];
6355
6365
  varying vec2 vUv;
6356
6366
 
6357
6367
  float calcWidth() {
@@ -6360,7 +6370,7 @@ float calcWidth() {
6360
6370
 
6361
6371
  int calcCount() {
6362
6372
  int count = 0;
6363
- for (int i = 0; i < ${ot}; i++) {
6373
+ for (int i = 0; i < ${at}; i++) {
6364
6374
  if (colors[i] != vec4(0,0,0,0)){
6365
6375
  count++;
6366
6376
  }
@@ -6372,7 +6382,7 @@ vec4 calcColor(float x) {
6372
6382
  float perUnit = calcWidth() / float(calcCount());
6373
6383
  int index = int(x / perUnit);
6374
6384
 
6375
- for(int i=0; i<${ot}; i++){
6385
+ for(int i=0; i<${at}; i++){
6376
6386
  if(i==index){
6377
6387
  return colors[i];
6378
6388
  }
@@ -6471,7 +6481,7 @@ var Cs = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, Jo = (r, e
6471
6481
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6472
6482
  return s && i && Cs(e, t, i), i;
6473
6483
  }, Qo = (r, e, t) => Jo(r, e + "", t);
6474
- const st = 50;
6484
+ const rt = 50;
6475
6485
  let je = class extends T {
6476
6486
  _color = new ne();
6477
6487
  constructor(r, e = []) {
@@ -6487,13 +6497,13 @@ let je = class extends T {
6487
6497
  n,
6488
6498
  l
6489
6499
  ];
6490
- }), s = this.epsilon, i = new Float32Array(st * 3), a = new Float32Array(st * 3);
6491
- for (; t.length < st; )
6500
+ }), s = this.epsilon, i = new Float32Array(rt * 3), a = new Float32Array(rt * 3);
6501
+ for (; t.length < rt; )
6492
6502
  t.push([
6493
6503
  [-1, 0, 0],
6494
6504
  [0, 0, 0, 1]
6495
6505
  ]);
6496
- t.slice(0, st).forEach(([o, n], l) => {
6506
+ t.slice(0, rt).forEach(([o, n], l) => {
6497
6507
  i[l * 3] = o[0], i[l * 3 + 1] = o[1], i[l * 3 + 2] = o[2], a[l * 3] = n[0], a[l * 3 + 1] = n[1], a[l * 3 + 2] = n[2];
6498
6508
  }), e.redraw(r, () => {
6499
6509
  P.draw(r, je.material, {
@@ -6518,7 +6528,7 @@ void main() {
6518
6528
  fragment: `varying vec2 vUv;
6519
6529
  uniform sampler2D sampler;
6520
6530
  uniform float epsilon;
6521
- const int MAX_COLORS = ${st};
6531
+ const int MAX_COLORS = ${rt};
6522
6532
  uniform vec3 originalColors[MAX_COLORS];
6523
6533
  uniform vec3 targetColors[MAX_COLORS];
6524
6534
 
@@ -6840,7 +6850,7 @@ void main(void) {
6840
6850
  gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;
6841
6851
  }
6842
6852
  }`;
6843
- let ue = class extends T {
6853
+ let he = class extends T {
6844
6854
  constructor(r, e = []) {
6845
6855
  super(), this.setProperties(r).append(e);
6846
6856
  }
@@ -6848,21 +6858,21 @@ let ue = class extends T {
6848
6858
  const t = 1 / e.width, s = 1 / e.height, i = Math.max(this.quality, 1);
6849
6859
  for (let a = 0; a < i; a++)
6850
6860
  e.redraw(r, () => {
6851
- P.draw(r, ue.materialX, {
6861
+ P.draw(r, he.materialX, {
6852
6862
  sampler: 0,
6853
6863
  uStrength: t * (this.strength / i)
6854
6864
  });
6855
6865
  });
6856
6866
  for (let a = 0; a < i; a++)
6857
6867
  e.redraw(r, () => {
6858
- P.draw(r, ue.materialY, {
6868
+ P.draw(r, he.materialY, {
6859
6869
  sampler: 0,
6860
6870
  uStrength: s * (this.strength / i)
6861
6871
  });
6862
6872
  });
6863
6873
  }
6864
6874
  };
6865
- Is(ue, "materialX", new E({
6875
+ Is(he, "materialX", new E({
6866
6876
  gl: {
6867
6877
  vertex: `attribute vec2 position;
6868
6878
  attribute vec2 uv;
@@ -6884,7 +6894,7 @@ void main(void) {
6884
6894
  fragment: Ms
6885
6895
  }
6886
6896
  }));
6887
- Is(ue, "materialY", new E({
6897
+ Is(he, "materialY", new E({
6888
6898
  gl: {
6889
6899
  vertex: `attribute vec2 position;
6890
6900
  attribute vec2 uv;
@@ -6908,20 +6918,20 @@ void main(void) {
6908
6918
  }));
6909
6919
  Ir([
6910
6920
  h({ fallback: 4 })
6911
- ], ue.prototype, "strength", 2);
6921
+ ], he.prototype, "strength", 2);
6912
6922
  Ir([
6913
6923
  h({ fallback: 3 })
6914
- ], ue.prototype, "quality", 2);
6915
- ue = Ir([
6924
+ ], he.prototype, "quality", 2);
6925
+ he = Ir([
6916
6926
  b("GaussianBlurEffect")
6917
- ], ue);
6918
- var Ns = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, ln = (r, e, t) => e in r ? Ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ke = (r, e, t, s) => {
6927
+ ], he);
6928
+ var Ns = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, ln = (r, e, t) => e in r ? Ns(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ye = (r, e, t, s) => {
6919
6929
  for (var i = s > 1 ? void 0 : s ? nn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
6920
6930
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6921
6931
  return s && i && Ns(e, t, i), i;
6922
6932
  }, cn = (r, e, t) => ln(r, e + "", t);
6923
6933
  let re = class extends T {
6924
- blurEffect = new ue();
6934
+ blurEffect = new he();
6925
6935
  viewport3 = new X();
6926
6936
  _color = new ne();
6927
6937
  constructor(r, e = []) {
@@ -6971,22 +6981,22 @@ void main(void) {
6971
6981
  }`
6972
6982
  }
6973
6983
  }));
6974
- Ke([
6984
+ Ye([
6975
6985
  h({ fallback: "#000000FF" })
6976
6986
  ], re.prototype, "color", 2);
6977
- Ke([
6987
+ Ye([
6978
6988
  h({ fallback: 4 })
6979
6989
  ], re.prototype, "blur", 2);
6980
- Ke([
6990
+ Ye([
6981
6991
  h({ fallback: 4 })
6982
6992
  ], re.prototype, "offsetX", 2);
6983
- Ke([
6993
+ Ye([
6984
6994
  h({ fallback: 4 })
6985
6995
  ], re.prototype, "offsetY", 2);
6986
- Ke([
6996
+ Ye([
6987
6997
  h({ fallback: !1 })
6988
6998
  ], re.prototype, "shadowOnly", 2);
6989
- re = Ke([
6999
+ re = Ye([
6990
7000
  b("DropShadowEffect")
6991
7001
  ], re);
6992
7002
  var ks = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, un = (r, e, t) => e in r ? ks(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Us = (r, e, t, s) => {
@@ -6994,13 +7004,13 @@ var ks = Object.defineProperty, hn = Object.getOwnPropertyDescriptor, un = (r, e
6994
7004
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
6995
7005
  return s && i && ks(e, t, i), i;
6996
7006
  }, dn = (r, e, t) => un(r, e + "", t);
6997
- let ct = class extends T {
7007
+ let lt = class extends T {
6998
7008
  constructor(r, e = []) {
6999
7009
  super(), this.setProperties(r).append(e);
7000
7010
  }
7001
7011
  apply(r, e) {
7002
7012
  e.redraw(r, () => {
7003
- P.draw(r, ct.material, {
7013
+ P.draw(r, lt.material, {
7004
7014
  sampler: 0,
7005
7015
  strength: this.strength,
7006
7016
  inputSize: [e.width, e.height, 1 / e.width, 1 / e.height]
@@ -7008,7 +7018,7 @@ let ct = class extends T {
7008
7018
  });
7009
7019
  }
7010
7020
  };
7011
- dn(ct, "material", new E({
7021
+ dn(lt, "material", new E({
7012
7022
  gl: {
7013
7023
  vertex: `precision mediump float;
7014
7024
  attribute vec2 position;
@@ -7038,10 +7048,10 @@ void main(void) {
7038
7048
  }));
7039
7049
  Us([
7040
7050
  h({ fallback: 5 })
7041
- ], ct.prototype, "strength", 2);
7042
- ct = Us([
7051
+ ], lt.prototype, "strength", 2);
7052
+ lt = Us([
7043
7053
  b("EmbossEffect")
7044
- ], ct);
7054
+ ], lt);
7045
7055
  var Bs = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, fn = (r, e, t) => e in r ? Bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ie = (r, e, t, s) => {
7046
7056
  for (var i = s > 1 ? void 0 : s ? pn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7047
7057
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
@@ -7451,7 +7461,7 @@ void main(void) {
7451
7461
  color *= 0.25;
7452
7462
  gl_FragColor = color;
7453
7463
  }`;
7454
- let ht = class extends T {
7464
+ let ct = class extends T {
7455
7465
  _kernels = [0];
7456
7466
  constructor(r, e = []) {
7457
7467
  super(), this.material = new E({
@@ -7506,16 +7516,16 @@ void main() {
7506
7516
  };
7507
7517
  Xt([
7508
7518
  h({ fallback: 4 })
7509
- ], ht.prototype, "strength", 2);
7519
+ ], ct.prototype, "strength", 2);
7510
7520
  Xt([
7511
7521
  h({ fallback: 3 })
7512
- ], ht.prototype, "quality", 2);
7522
+ ], ct.prototype, "quality", 2);
7513
7523
  Xt([
7514
7524
  h({ default: () => [1, 1] })
7515
- ], ht.prototype, "pixelSize", 2);
7516
- ht = Xt([
7525
+ ], ct.prototype, "pixelSize", 2);
7526
+ ct = Xt([
7517
7527
  b("KawaseBlurEffect")
7518
- ], ht);
7528
+ ], ct);
7519
7529
  var Fs = Object.defineProperty, En = Object.getOwnPropertyDescriptor, Sn = (r, e, t) => e in r ? Fs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Mr = (r, e, t, s) => {
7520
7530
  for (var i = s > 1 ? void 0 : s ? En(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7521
7531
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
@@ -7708,7 +7718,7 @@ var Vs = Object.defineProperty, On = Object.getOwnPropertyDescriptor, Dn = (r, e
7708
7718
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
7709
7719
  return s && i && Vs(e, t, i), i;
7710
7720
  }, In = (r, e, t) => Dn(r, e + "", t);
7711
- let ut = class extends T {
7721
+ let ht = class extends T {
7712
7722
  constructor(r, e = []) {
7713
7723
  super(), this.setProperties(r).append(e);
7714
7724
  }
@@ -7725,11 +7735,11 @@ let ut = class extends T {
7725
7735
  this.strength * s[1] / e.height
7726
7736
  ]
7727
7737
  };
7728
- P.draw(r, ut.material, a);
7738
+ P.draw(r, ht.material, a);
7729
7739
  });
7730
7740
  }
7731
7741
  };
7732
- In(ut, "material", new E({
7742
+ In(ht, "material", new E({
7733
7743
  gl: {
7734
7744
  vertex: `attribute vec2 position;
7735
7745
  attribute vec2 uv;
@@ -7753,10 +7763,10 @@ void main(void) {
7753
7763
  }));
7754
7764
  $s([
7755
7765
  h({ fallback: 10 })
7756
- ], ut.prototype, "strength", 2);
7757
- ut = $s([
7766
+ ], ht.prototype, "strength", 2);
7767
+ ht = $s([
7758
7768
  b("PixelateEffect")
7759
- ], ut);
7769
+ ], ht);
7760
7770
  var Hs = Object.defineProperty, Mn = Object.getOwnPropertyDescriptor, Nn = (r, e, t) => e in r ? Hs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, mt = (r, e, t, s) => {
7761
7771
  for (var i = s > 1 ? void 0 : s ? Mn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
7762
7772
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
@@ -8097,7 +8107,7 @@ var Gn = Object.defineProperty, gt = (r, e, t, s) => {
8097
8107
  (o = r[a]) && (i = o(e, t, i) || i);
8098
8108
  return i && Gn(e, t, i), i;
8099
8109
  };
8100
- class Ze extends F {
8110
+ class Ke extends F {
8101
8111
  setProperties(e) {
8102
8112
  return super._setProperties(
8103
8113
  V(e) ? void 0 : ui(e)
@@ -8126,25 +8136,25 @@ class Ze extends F {
8126
8136
  }
8127
8137
  gt([
8128
8138
  h()
8129
- ], Ze.prototype, "color");
8139
+ ], Ke.prototype, "color");
8130
8140
  gt([
8131
8141
  h()
8132
- ], Ze.prototype, "width");
8142
+ ], Ke.prototype, "width");
8133
8143
  gt([
8134
8144
  h({ fallback: "solid" })
8135
- ], Ze.prototype, "style");
8145
+ ], Ke.prototype, "style");
8136
8146
  gt([
8137
8147
  h({ fallback: "butt" })
8138
- ], Ze.prototype, "lineCap");
8148
+ ], Ke.prototype, "lineCap");
8139
8149
  gt([
8140
8150
  h({ fallback: "miter" })
8141
- ], Ze.prototype, "lineJoin");
8151
+ ], Ke.prototype, "lineJoin");
8142
8152
  var Vn = Object.defineProperty, vt = (r, e, t, s) => {
8143
8153
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
8144
8154
  (o = r[a]) && (i = o(e, t, i) || i);
8145
8155
  return i && Vn(e, t, i), i;
8146
8156
  };
8147
- class Je extends Ee {
8157
+ class Ze extends Ee {
8148
8158
  constructor(e) {
8149
8159
  super(), this.parent = e;
8150
8160
  }
@@ -8171,25 +8181,25 @@ class Je extends Ee {
8171
8181
  }
8172
8182
  vt([
8173
8183
  h({ fallback: !0 })
8174
- ], Je.prototype, "enabled");
8184
+ ], Ze.prototype, "enabled");
8175
8185
  vt([
8176
8186
  h({ fallback: "#000000FF" })
8177
- ], Je.prototype, "color");
8187
+ ], Ze.prototype, "color");
8178
8188
  vt([
8179
8189
  h({ fallback: 0 })
8180
- ], Je.prototype, "blur");
8190
+ ], Ze.prototype, "blur");
8181
8191
  vt([
8182
8192
  h({ fallback: 0 })
8183
- ], Je.prototype, "offsetY");
8193
+ ], Ze.prototype, "offsetY");
8184
8194
  vt([
8185
8195
  h({ fallback: 0 })
8186
- ], Je.prototype, "offsetX");
8196
+ ], Ze.prototype, "offsetX");
8187
8197
  var $n = Object.defineProperty, bt = (r, e, t, s) => {
8188
8198
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
8189
8199
  (o = r[a]) && (i = o(e, t, i) || i);
8190
8200
  return i && $n(e, t, i), i;
8191
8201
  };
8192
- class Qe extends Ee {
8202
+ class Je extends Ee {
8193
8203
  constructor(e) {
8194
8204
  super(), this.parent = e, this._updatePath2DSet();
8195
8205
  }
@@ -8247,20 +8257,20 @@ class Qe extends Ee {
8247
8257
  }
8248
8258
  bt([
8249
8259
  h({ fallback: !0 })
8250
- ], Qe.prototype, "enabled");
8260
+ ], Je.prototype, "enabled");
8251
8261
  bt([
8252
8262
  h()
8253
- ], Qe.prototype, "preset");
8263
+ ], Je.prototype, "preset");
8254
8264
  bt([
8255
8265
  h()
8256
- ], Qe.prototype, "svg");
8266
+ ], Je.prototype, "svg");
8257
8267
  bt([
8258
8268
  h()
8259
- ], Qe.prototype, "viewBox");
8269
+ ], Je.prototype, "viewBox");
8260
8270
  bt([
8261
8271
  h()
8262
- ], Qe.prototype, "paths");
8263
- class Ws extends pe {
8272
+ ], Je.prototype, "paths");
8273
+ class Ws extends de {
8264
8274
  constructor(e) {
8265
8275
  super(), this.setProperties(e);
8266
8276
  }
@@ -8274,7 +8284,7 @@ const es = {
8274
8284
  };
8275
8285
  for (const r in es)
8276
8286
  ts(Ws, r, { fallback: es[r] });
8277
- var Hn = Object.defineProperty, me = (r, e, t, s) => {
8287
+ var Hn = Object.defineProperty, _e = (r, e, t, s) => {
8278
8288
  for (var i = void 0, a = r.length - 1, o; a >= 0; a--)
8279
8289
  (o = r[a]) && (i = o(e, t, i) || i);
8280
8290
  return i && Hn(e, t, i), i;
@@ -8457,31 +8467,31 @@ class ae extends Ee {
8457
8467
  }
8458
8468
  }
8459
8469
  }
8460
- me([
8470
+ _e([
8461
8471
  h({ fallback: !0 })
8462
8472
  ], ae.prototype, "enabled");
8463
- me([
8473
+ _e([
8464
8474
  h({ fallback: () => [] })
8465
8475
  ], ae.prototype, "content");
8466
- me([
8476
+ _e([
8467
8477
  h({ alias: "parent.style.json" })
8468
8478
  ], ae.prototype, "style");
8469
- me([
8479
+ _e([
8470
8480
  h()
8471
8481
  ], ae.prototype, "effects");
8472
- me([
8482
+ _e([
8473
8483
  h()
8474
8484
  ], ae.prototype, "fill");
8475
- me([
8485
+ _e([
8476
8486
  h()
8477
8487
  ], ae.prototype, "outline");
8478
- me([
8488
+ _e([
8479
8489
  h({ alias: "base.measureDom" })
8480
8490
  ], ae.prototype, "measureDom");
8481
- me([
8491
+ _e([
8482
8492
  h({ alias: "base.fonts" })
8483
8493
  ], ae.prototype, "fonts");
8484
- me([
8494
+ _e([
8485
8495
  h({ fallback: "auto" })
8486
8496
  ], ae.prototype, "drawMode");
8487
8497
  const R = {
@@ -8813,7 +8823,7 @@ let Pe = class extends Ie {
8813
8823
  set background(r) {
8814
8824
  this._background.resetProperties().setProperties(r);
8815
8825
  }
8816
- _shape = new Qe(this);
8826
+ _shape = new Je(this);
8817
8827
  get shape() {
8818
8828
  return this._shape;
8819
8829
  }
@@ -8827,7 +8837,7 @@ let Pe = class extends Ie {
8827
8837
  set fill(r) {
8828
8838
  this._fill.resetProperties().setProperties(r);
8829
8839
  }
8830
- _outline = new Ze(this);
8840
+ _outline = new Ke(this);
8831
8841
  get outline() {
8832
8842
  return this._outline;
8833
8843
  }
@@ -8848,7 +8858,7 @@ let Pe = class extends Ie {
8848
8858
  set text(r) {
8849
8859
  this._text.resetProperties().setProperties(r);
8850
8860
  }
8851
- _shadow = new Je(this);
8861
+ _shadow = new Ze(this);
8852
8862
  get shadow() {
8853
8863
  return this._shadow;
8854
8864
  }
@@ -9282,7 +9292,7 @@ const ur = {
9282
9292
  easeOut: ll,
9283
9293
  easeInOut: cl
9284
9294
  };
9285
- let dt = class extends q {
9295
+ let ut = class extends q {
9286
9296
  _keyframes = [];
9287
9297
  _isFirstUpdatePosition = !1;
9288
9298
  _cachedProps = new bi();
@@ -9468,22 +9478,22 @@ let dt = class extends q {
9468
9478
  };
9469
9479
  jt([
9470
9480
  h({ fallback: "parent" })
9471
- ], dt.prototype, "effectMode", 2);
9481
+ ], ut.prototype, "effectMode", 2);
9472
9482
  jt([
9473
9483
  h({ default: () => [] })
9474
- ], dt.prototype, "keyframes", 2);
9484
+ ], ut.prototype, "keyframes", 2);
9475
9485
  jt([
9476
9486
  h()
9477
- ], dt.prototype, "easing", 2);
9478
- dt = jt([
9487
+ ], ut.prototype, "easing", 2);
9488
+ ut = jt([
9479
9489
  b("Animation", {
9480
9490
  renderMode: "disabled",
9481
9491
  processMode: "pausable",
9482
9492
  processSortMode: "parent-before",
9483
9493
  duration: 2e3
9484
9494
  })
9485
- ], dt);
9486
- class kr extends de {
9495
+ ], ut);
9496
+ class kr extends ue {
9487
9497
  static _instance;
9488
9498
  static get instance() {
9489
9499
  return this._instance || (this._instance = new kr()), this._instance;
@@ -9514,7 +9524,7 @@ class kr extends de {
9514
9524
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
9515
9525
  }
9516
9526
  }
9517
- class Ut extends de {
9527
+ class Ut extends ue {
9518
9528
  static PADDING = 0.1;
9519
9529
  _source = null;
9520
9530
  _audio = null;
@@ -9681,7 +9691,7 @@ class hl {
9681
9691
  return new Ut();
9682
9692
  }
9683
9693
  }
9684
- class Zs extends de {
9694
+ class Zs extends ue {
9685
9695
  constructor(e, t) {
9686
9696
  super(), this._input = e, this._output = t;
9687
9697
  }
@@ -9781,7 +9791,7 @@ class Oe extends Zs {
9781
9791
  2,
9782
9792
  cs ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100
9783
9793
  ), s = e.createDynamicsCompressor(), i = e.createAnalyser();
9784
- i.connect(s), s.connect(e.destination), super(i, s), this._context = e, this._offlineContext = t, this._compressor = s, this._analyser = i, this._locked = e.state === "suspended" && (be || Ui), xr && (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));
9794
+ i.connect(s), s.connect(e.destination), super(i, s), this._context = e, this._offlineContext = t, this._compressor = s, this._analyser = i, this._locked = e.state === "suspended" && (ve || Ui), xr && (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));
9785
9795
  }
9786
9796
  _onFocus() {
9787
9797
  if (!this.autoPause)
@@ -9823,7 +9833,7 @@ class Oe extends Zs {
9823
9833
  e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
9824
9834
  }
9825
9835
  }
9826
- class pl extends de {
9836
+ class pl extends ue {
9827
9837
  _audio = null;
9828
9838
  _sourceNode = null;
9829
9839
  _gain = null;
@@ -10187,7 +10197,7 @@ var yl = Object.defineProperty, xl = Object.getOwnPropertyDescriptor, Wt = (r, e
10187
10197
  (o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
10188
10198
  return s && i && yl(e, t, i), i;
10189
10199
  };
10190
- let pt = class extends Pe {
10200
+ let dt = class extends Pe {
10191
10201
  _audioBuffer;
10192
10202
  _src = xr ? new x({
10193
10203
  source: document.createElement("canvas")
@@ -10249,16 +10259,16 @@ let pt = class extends Pe {
10249
10259
  };
10250
10260
  Wt([
10251
10261
  h()
10252
- ], pt.prototype, "src", 2);
10262
+ ], dt.prototype, "src", 2);
10253
10263
  Wt([
10254
10264
  h({ fallback: 0 })
10255
- ], pt.prototype, "gap", 2);
10265
+ ], dt.prototype, "gap", 2);
10256
10266
  Wt([
10257
10267
  h({ fallback: "#000000" })
10258
- ], pt.prototype, "color", 2);
10259
- pt = Wt([
10268
+ ], dt.prototype, "color", 2);
10269
+ dt = Wt([
10260
10270
  b("AudioWaveform")
10261
- ], pt);
10271
+ ], dt);
10262
10272
  var wl = Object.defineProperty, Pl = Object.getOwnPropertyDescriptor, El = (r, e, t) => e in r ? wl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Sl = (r, e, t, s) => {
10263
10273
  for (var i = s > 1 ? void 0 : s ? Pl(e, t) : e, a = r.length - 1, o; a >= 0; a--)
10264
10274
  (o = r[a]) && (i = o(i) || i);
@@ -10379,7 +10389,7 @@ var Il = Object.defineProperty, Ml = Object.getOwnPropertyDescriptor, Nl = (r, e
10379
10389
  (o = r[a]) && (i = o(i) || i);
10380
10390
  return i;
10381
10391
  }, Ul = (r, e, t) => Nl(r, e + "", t);
10382
- let ft = class extends Ve {
10392
+ let pt = class extends Ve {
10383
10393
  blur = 100;
10384
10394
  gradientBlur = 600;
10385
10395
  apply(r, e) {
@@ -10387,7 +10397,7 @@ let ft = class extends Ve {
10387
10397
  let s, i;
10388
10398
  t < 0.5 ? (s = 0, i = (0.5 - t) / 0.5) : (s = 1, i = (t - 0.5) / 0.5);
10389
10399
  const a = e.width, o = e.height, n = [0, o / 2], l = [600, o / 2], c = [a, o], u = l[0] - n[0], d = l[1] - n[1], p = Math.sqrt(u * u + d * d);
10390
- P.draw(r, ft.material, {
10400
+ P.draw(r, pt.material, {
10391
10401
  sampler: s,
10392
10402
  progress: i,
10393
10403
  blur: this.blur,
@@ -10396,7 +10406,7 @@ let ft = class extends Ve {
10396
10406
  end: l,
10397
10407
  delta: [u / p, d / p],
10398
10408
  texSize: c
10399
- }), P.draw(r, ft.material, {
10409
+ }), P.draw(r, pt.material, {
10400
10410
  sampler: s,
10401
10411
  progress: i,
10402
10412
  blur: this.blur,
@@ -10408,7 +10418,7 @@ let ft = class extends Ve {
10408
10418
  });
10409
10419
  }
10410
10420
  };
10411
- Ul(ft, "material", new E({
10421
+ Ul(pt, "material", new E({
10412
10422
  gl: {
10413
10423
  vertex: `attribute vec2 position;
10414
10424
  attribute vec2 uv;
@@ -10458,9 +10468,9 @@ void main(void) {
10458
10468
  }`
10459
10469
  }
10460
10470
  }));
10461
- ft = kl([
10471
+ pt = kl([
10462
10472
  b("TiltShiftTransition")
10463
- ], ft);
10473
+ ], pt);
10464
10474
  var Bl = Object.defineProperty, Ll = Object.getOwnPropertyDescriptor, Fl = (r, e, t) => e in r ? Bl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, zl = (r, e, t, s) => {
10465
10475
  for (var i = s > 1 ? void 0 : s ? Ll(e, t) : e, a = r.length - 1, o; a >= 0; a--)
10466
10476
  (o = r[a]) && (i = o(i) || i);
@@ -10665,7 +10675,7 @@ function Kl(r) {
10665
10675
  return e;
10666
10676
  }
10667
10677
  const At = "WeakRef" in globalThis;
10668
- class Zl extends de {
10678
+ class Zl extends ue {
10669
10679
  defaultHandler = (e) => e;
10670
10680
  _handlers = /* @__PURE__ */ new Map();
10671
10681
  _handleing = /* @__PURE__ */ new Map();
@@ -10772,7 +10782,7 @@ const Fe = {
10772
10782
  preserveDrawingBuffer: !1,
10773
10783
  powerPreference: "default"
10774
10784
  };
10775
- class Ur extends fe {
10785
+ class Ur extends pe {
10776
10786
  renderer;
10777
10787
  get view() {
10778
10788
  return this.renderer.view;
@@ -10970,14 +10980,14 @@ async function yc(r) {
10970
10980
  export {
10971
10981
  ee as Aabb2D,
10972
10982
  ao as AnimatedTexture,
10973
- dt as Animation,
10983
+ ut as Animation,
10974
10984
  Zl as Assets,
10975
10985
  De as Audio,
10976
10986
  Zs as AudioPipeline,
10977
10987
  vc as AudioProcessor,
10978
10988
  bc as AudioSpectrum,
10979
- pt as AudioWaveform,
10980
- ye as BufferUsage,
10989
+ dt as AudioWaveform,
10990
+ be as BufferUsage,
10981
10991
  Nt as Camera2D,
10982
10992
  ho as CanvasContext,
10983
10993
  Ge as CanvasItem,
@@ -11001,25 +11011,25 @@ export {
11001
11011
  Xs as Element2DBackground,
11002
11012
  F as Element2DFill,
11003
11013
  js as Element2DForeground,
11004
- Ze as Element2DOutline,
11005
- Je as Element2DShadow,
11006
- Qe as Element2DShape,
11014
+ Ke as Element2DOutline,
11015
+ Ze as Element2DShadow,
11016
+ Je as Element2DShape,
11007
11017
  Ws as Element2DStyle,
11008
11018
  ae as Element2DText,
11009
- ct as EmbossEffect,
11019
+ lt as EmbossEffect,
11010
11020
  Ur as Engine,
11011
11021
  Nr as Flexbox,
11012
11022
  ja as FontLoader,
11013
- ue as GaussianBlurEffect,
11023
+ he as GaussianBlurEffect,
11014
11024
  Ue as Geometry,
11015
11025
  Vl as GifLoader,
11016
11026
  wa as GlBatch2DSystem,
11017
- lt as GlBlendMode,
11027
+ nt as GlBlendMode,
11018
11028
  sa as GlBuffer,
11019
11029
  oa as GlBufferSystem,
11020
- it as GlBufferTarget,
11030
+ st as GlBufferTarget,
11021
11031
  Pa as GlMaskSystem,
11022
- nt as GlProgram,
11032
+ ot as GlProgram,
11023
11033
  $a as GlRenderTarget,
11024
11034
  Ha as GlRenderTargetSystem,
11025
11035
  Xa as GlRenderer,
@@ -11041,7 +11051,7 @@ export {
11041
11051
  Zi as Input,
11042
11052
  Gt as InputEvent,
11043
11053
  $l as JsonLoader,
11044
- ht as KawaseBlurEffect,
11054
+ ct as KawaseBlurEffect,
11045
11055
  Bt as KawaseTransition,
11046
11056
  Wi as KeyboardInputEvent,
11047
11057
  Lt as LeftEraseTransition,
@@ -11063,7 +11073,7 @@ export {
11063
11073
  L as OutlineEffect,
11064
11074
  yr as PI,
11065
11075
  z as PI_2,
11066
- ut as PixelateEffect,
11076
+ ht as PixelateEffect,
11067
11077
  oo as PixelsTexture,
11068
11078
  qi as PointerInputEvent,
11069
11079
  ta as Projection2D,
@@ -11073,29 +11083,29 @@ export {
11073
11083
  Ji as RefCounted,
11074
11084
  te as RenderTarget,
11075
11085
  Pr as Renderer,
11076
- pe as Resource,
11086
+ de as Resource,
11077
11087
  ns as SUPPORTS_AUDIO_CONTEXT,
11078
11088
  Ui as SUPPORTS_CLICK_EVENTS,
11079
11089
  cc as SUPPORTS_CREATE_IMAGE_BITMAP,
11080
11090
  Mi as SUPPORTS_IMAGE_BITMAP,
11081
11091
  lc as SUPPORTS_MOUSE_EVENTS,
11082
11092
  cs as SUPPORTS_OFFLINE_AUDIO_CONTEXT,
11083
- et as SUPPORTS_POINTER_EVENTS,
11093
+ Qe as SUPPORTS_POINTER_EVENTS,
11084
11094
  Ni as SUPPORTS_RESIZE_OBSERVER,
11085
- be as SUPPORTS_TOUCH_EVENTS,
11095
+ ve as SUPPORTS_TOUCH_EVENTS,
11086
11096
  Ii as SUPPORTS_WEBGL2,
11087
11097
  ls as SUPPORTS_WEBKIT_AUDIO_CONTEXT,
11088
11098
  Bi as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT,
11089
11099
  Li as SUPPORTS_WEB_AUDIO,
11090
11100
  ki as SUPPORTS_WHEEL_EVENTS,
11091
- fe as SceneTree,
11101
+ pe as SceneTree,
11092
11102
  Xl as TextLoader,
11093
11103
  x as Texture2D,
11094
11104
  jl as TextureLoader,
11095
11105
  qs as TextureRect2D,
11096
11106
  B as Ticker,
11097
- ft as TiltShiftTransition,
11098
- he as Timeline,
11107
+ pt as TiltShiftTransition,
11108
+ xe as Timeline,
11099
11109
  q as TimelineNode,
11100
11110
  M as Transform2D,
11101
11111
  el as TransformRect2D,
@@ -11108,7 +11118,7 @@ export {
11108
11118
  fc as Vector3,
11109
11119
  ea as Vector4,
11110
11120
  H as VertexAttribute,
11111
- xe as VertexBuffer,
11121
+ ye as VertexBuffer,
11112
11122
  gr as Video2D,
11113
11123
  Wl as VideoLoader,
11114
11124
  co as VideoTexture,
@@ -11147,7 +11157,7 @@ export {
11147
11157
  wn as frag,
11148
11158
  Hr as getDefaultCssPropertyValue,
11149
11159
  Xn as gutterMap,
11150
- rt as instanceId,
11160
+ tt as instanceId,
11151
11161
  Gi as isCanvasElement,
11152
11162
  us as isElementNode,
11153
11163
  hc as isImageElement,