modern-canvas 0.25.2 → 0.26.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
@@ -680,7 +680,7 @@ var dt = class e {
680
680
  //#endregion
681
681
  //#region src/core/math/Color.ts
682
682
  pe([me]);
683
- var D = class {
683
+ var bt = class {
684
684
  get value() {
685
685
  return this._value;
686
686
  }
@@ -763,16 +763,16 @@ var D = class {
763
763
  this.a
764
764
  ];
765
765
  }
766
- }, bt = xe / 180, xt = 180 / xe;
767
- function O(e, t, n) {
766
+ }, xt = xe / 180, St = 180 / xe;
767
+ function D(e, t, n) {
768
768
  return Math.max(t, Math.min(e, n));
769
769
  }
770
- function k(e, t, n) {
770
+ function O(e, t, n) {
771
771
  return (1 - n) * e + n * t;
772
772
  }
773
773
  //#endregion
774
774
  //#region src/core/math/ColorMatrix.ts
775
- var St = class {
775
+ var Ct = class {
776
776
  _array = /* @__PURE__ */ new Float32Array(20);
777
777
  constructor() {
778
778
  this.identity();
@@ -902,7 +902,7 @@ var St = class {
902
902
  ]);
903
903
  }
904
904
  invert(e = 1) {
905
- let t = k(1, -1, e), n = k(0, 255, e);
905
+ let t = O(1, -1, e), n = O(0, 255, e);
906
906
  return this.multiply([
907
907
  t,
908
908
  0,
@@ -927,21 +927,21 @@ var St = class {
927
927
  ]);
928
928
  }
929
929
  sepia(e = 1) {
930
- let t = O(e, 0, 1);
930
+ let t = D(e, 0, 1);
931
931
  return this.multiply([
932
- k(1, .393, t),
933
- k(0, .7689999, t),
934
- k(0, .18899999, t),
932
+ O(1, .393, t),
933
+ O(0, .7689999, t),
934
+ O(0, .18899999, t),
935
935
  0,
936
936
  0,
937
- k(0, .349, t),
938
- k(1, .6859999, t),
939
- k(0, .16799999, t),
937
+ O(0, .349, t),
938
+ O(1, .6859999, t),
939
+ O(0, .16799999, t),
940
940
  0,
941
941
  0,
942
- k(0, .272, t),
943
- k(0, .5339999, t),
944
- k(1, .13099999, t),
942
+ O(0, .272, t),
943
+ O(0, .5339999, t),
944
+ O(1, .13099999, t),
945
945
  0,
946
946
  0,
947
947
  0,
@@ -976,7 +976,7 @@ var St = class {
976
976
  ]);
977
977
  }
978
978
  grayscale(e = 1) {
979
- let t = O(e, 0, 1), n = k(1, .3, t), r = k(0, .3, t), i = k(1, .59, t), a = k(0, .59, t), o = k(1, .11, t), s = k(0, .11, t);
979
+ let t = D(e, 0, 1), n = O(1, .3, t), r = O(0, .3, t), i = O(1, .59, t), a = O(0, .59, t), o = O(1, .11, t), s = O(0, .11, t);
980
980
  return this.multiply([
981
981
  n,
982
982
  a,
@@ -1028,10 +1028,10 @@ var St = class {
1028
1028
  toArray() {
1029
1029
  return this._array;
1030
1030
  }
1031
- }, Ct = class e extends yt {
1031
+ }, wt = class e extends yt {
1032
1032
  rotation;
1033
1033
  get rotationDegrees() {
1034
- return this.rotation / bt;
1034
+ return this.rotation / xt;
1035
1035
  }
1036
1036
  constructor(...e) {
1037
1037
  let t, n;
@@ -1041,7 +1041,7 @@ var St = class {
1041
1041
  if (!this.rotation && (!("rotation" in e) || !e.rotation)) return super.overlap(e, t);
1042
1042
  {
1043
1043
  let t = (e, t) => Math.abs(e.x * t.x + e.y * t.y), n = (e) => {
1044
- let { width: n, height: r, rotation: i = 0 } = e, a = i / bt;
1044
+ let { width: n, height: r, rotation: i = 0 } = e, a = i / xt;
1045
1045
  a = -a % 180;
1046
1046
  let o = a / 180 * Math.PI, s = {
1047
1047
  x: Math.cos(o),
@@ -1083,7 +1083,7 @@ var St = class {
1083
1083
  clone() {
1084
1084
  return new e(this.toJSON());
1085
1085
  }
1086
- }, wt = class {
1086
+ }, Tt = class {
1087
1087
  _array;
1088
1088
  x = 0;
1089
1089
  y = 0;
@@ -1107,12 +1107,12 @@ var St = class {
1107
1107
  };
1108
1108
  //#endregion
1109
1109
  //#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorateMetadata.js
1110
- function A(e, t) {
1110
+ function k(e, t) {
1111
1111
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
1112
1112
  }
1113
1113
  //#endregion
1114
1114
  //#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorate.js
1115
- function j(e, t, n, r) {
1115
+ function A(e, t, n, r) {
1116
1116
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
1117
1117
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
1118
1118
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -1120,7 +1120,7 @@ function j(e, t, n, r) {
1120
1120
  }
1121
1121
  //#endregion
1122
1122
  //#region src/core/os/MainLoop.ts
1123
- var Tt = class extends T {
1123
+ var Et = class extends T {
1124
1124
  _starting = !1;
1125
1125
  _nextDeltaTime = 0;
1126
1126
  _startedProcess;
@@ -1150,12 +1150,12 @@ var Tt = class extends T {
1150
1150
  super._destroy(), this.stop();
1151
1151
  }
1152
1152
  };
1153
- j([_({ fallback: 60 }), A("design:type", Number)], Tt.prototype, "fps", void 0), j([_({ fallback: 1 }), A("design:type", Number)], Tt.prototype, "speed", void 0);
1153
+ A([_({ fallback: 60 }), k("design:type", Number)], Et.prototype, "fps", void 0), A([_({ fallback: 1 }), k("design:type", Number)], Et.prototype, "speed", void 0);
1154
1154
  //#endregion
1155
1155
  //#region src/core/reactivity.ts
1156
- var Et = "__v_skip";
1157
- function Dt(e) {
1158
- return !Object.prototype.hasOwnProperty.call(e, Et) && Object.isExtensible(e) && Object.defineProperty(e, Et, {
1156
+ var Dt = "__v_skip";
1157
+ function Ot(e) {
1158
+ return !Object.prototype.hasOwnProperty.call(e, Dt) && Object.isExtensible(e) && Object.defineProperty(e, Dt, {
1159
1159
  configurable: !0,
1160
1160
  enumerable: !1,
1161
1161
  value: !0
@@ -1163,19 +1163,19 @@ function Dt(e) {
1163
1163
  }
1164
1164
  //#endregion
1165
1165
  //#region src/core/renderers/gl/buffer/const.ts
1166
- var Ot = /* @__PURE__ */ function(e) {
1166
+ var kt = /* @__PURE__ */ function(e) {
1167
1167
  return e[e.elementArrayBuffer = 34963] = "elementArrayBuffer", e[e.arrayBuffer = 34962] = "arrayBuffer", e[e.uniformBuffer = 35345] = "uniformBuffer", e;
1168
- }({}), kt = class {
1168
+ }({}), At = class {
1169
1169
  native;
1170
- target = Ot.arrayBuffer;
1170
+ target = kt.arrayBuffer;
1171
1171
  byteLength = 0;
1172
1172
  dirty = !0;
1173
1173
  constructor(e) {
1174
1174
  this.native = e;
1175
1175
  }
1176
- }, M = /* @__PURE__ */ function(e) {
1176
+ }, j = /* @__PURE__ */ function(e) {
1177
1177
  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;
1178
- }({}), At = class extends n {
1178
+ }({}), jt = class extends n {
1179
1179
  screen = {
1180
1180
  x: 0,
1181
1181
  y: 0,
@@ -1194,12 +1194,12 @@ var Ot = /* @__PURE__ */ function(e) {
1194
1194
  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`);
1195
1195
  }
1196
1196
  };
1197
- j([_({ fallback: Ye }), A("design:type", Number)], At.prototype, "pixelRatio", void 0), j([_({ internal: !0 }), A("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], At.prototype, "view", void 0);
1197
+ A([_({ fallback: Ye }), k("design:type", Number)], jt.prototype, "pixelRatio", void 0), A([_({ internal: !0 }), k("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], jt.prototype, "view", void 0);
1198
1198
  //#endregion
1199
1199
  //#region src/core/renderers/shared/shader/UniformGroup.ts
1200
- var jt = 0, Mt = class {
1200
+ var Mt = 0, Nt = class {
1201
1201
  isUniformGroup = !0;
1202
- uid = ++jt;
1202
+ uid = ++Mt;
1203
1203
  uniforms;
1204
1204
  ubo;
1205
1205
  isStatic;
@@ -1210,14 +1210,14 @@ var jt = 0, Mt = class {
1210
1210
  update() {
1211
1211
  this._dirtyId++;
1212
1212
  }
1213
- }, Nt = Object.create(null), Pt = Object.create(null);
1214
- function Ft(e, t) {
1215
- let n = Pt[e];
1216
- return n === void 0 && (Nt[t] === void 0 && (Nt[t] = 1), Pt[e] = n = Nt[t]++), n;
1213
+ }, Pt = Object.create(null), Ft = Object.create(null);
1214
+ function It(e, t) {
1215
+ let n = Ft[e];
1216
+ return n === void 0 && (Pt[t] === void 0 && (Pt[t] = 1), Ft[e] = n = Pt[t]++), n;
1217
1217
  }
1218
1218
  //#endregion
1219
1219
  //#region src/core/renderers/gl/system/GlSystem.ts
1220
- var N = class extends e {
1220
+ var M = class extends e {
1221
1221
  get _gl() {
1222
1222
  return this._renderer.gl;
1223
1223
  }
@@ -1231,7 +1231,7 @@ var N = class extends e {
1231
1231
  _setup() {}
1232
1232
  flush() {}
1233
1233
  reset() {}
1234
- }, It = class extends N {
1234
+ }, Lt = class extends M {
1235
1235
  install(e) {
1236
1236
  super.install(e), e.buffer = this;
1237
1237
  }
@@ -1241,8 +1241,8 @@ var N = class extends e {
1241
1241
  return this.glBuffers.get(e.instanceId) || this._createGlBuffer(e);
1242
1242
  }
1243
1243
  _createGlBuffer(e) {
1244
- let t = this._gl, n = new kt(t.createBuffer()), r = Ot.arrayBuffer;
1245
- return e.usage & M.index ? r = Ot.elementArrayBuffer : e.usage & M.uniform && (r = Ot.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1244
+ let t = this._gl, n = new At(t.createBuffer()), r = kt.arrayBuffer;
1245
+ return e.usage & j.index ? r = kt.elementArrayBuffer : e.usage & j.uniform && (r = kt.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1246
1246
  switch (e) {
1247
1247
  case "usage":
1248
1248
  case "data":
@@ -1265,7 +1265,7 @@ var N = class extends e {
1265
1265
  n.dirty = !1;
1266
1266
  let { _gl: r } = this, { usage: i, data: a } = e;
1267
1267
  r.bindBuffer(n.target, n.native);
1268
- let o = i & M.static ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
1268
+ let o = i & j.static ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
1269
1269
  if (a) if (n.byteLength >= a.byteLength) {
1270
1270
  let e = a.length * a.BYTES_PER_ELEMENT;
1271
1271
  r.bufferSubData(n.target, 0, a, 0, e / a.BYTES_PER_ELEMENT);
@@ -1280,13 +1280,13 @@ var N = class extends e {
1280
1280
  }
1281
1281
  this.buffers.clear(), this.glBuffers.clear();
1282
1282
  }
1283
- }, Lt;
1284
- function Rt() {
1285
- return Lt ||= "mediump", Lt;
1283
+ }, Rt;
1284
+ function zt() {
1285
+ return Rt ||= "mediump", Rt;
1286
1286
  }
1287
1287
  //#endregion
1288
1288
  //#region src/core/renderers/gl/shader/preprocessors/addProgramDefines.ts
1289
- function zt(e, t, n) {
1289
+ function Bt(e, t, n) {
1290
1290
  return t ? e : n ? (e = e.replace("out vec4 finalColor;", ""), `#ifdef GL_ES
1291
1291
  #define in varying
1292
1292
  #define finalColor gl_FragColor
@@ -1300,7 +1300,7 @@ ${e}`;
1300
1300
  }
1301
1301
  //#endregion
1302
1302
  //#region src/core/renderers/gl/shader/preprocessors/ensurePrecision.ts
1303
- function Bt(e, t, n) {
1303
+ function Vt(e, t, n) {
1304
1304
  let r = n ? t.maxSupportedFragmentPrecision : t.maxSupportedVertexPrecision;
1305
1305
  if (e.substring(0, 9) !== "precision") {
1306
1306
  let i = n ? t.requestedFragmentPrecision : t.requestedVertexPrecision;
@@ -1310,31 +1310,31 @@ function Bt(e, t, n) {
1310
1310
  }
1311
1311
  //#endregion
1312
1312
  //#region src/core/renderers/gl/shader/preprocessors/insertVersion.ts
1313
- function Vt(e, t) {
1313
+ function Ht(e, t) {
1314
1314
  return t ? `#version 300 es\n${e}` : e;
1315
1315
  }
1316
1316
  //#endregion
1317
1317
  //#region src/core/renderers/gl/shader/preprocessors/setProgramName.ts
1318
- var Ht = {}, Ut = {};
1319
- function Wt(e, { name: t = "program" }, n = !0) {
1318
+ var Ut = {}, Wt = {};
1319
+ function Gt(e, { name: t = "program" }, n = !0) {
1320
1320
  t = t.replace(/\s+/g, "-"), t += n ? "-fragment" : "-vertex";
1321
- let r = n ? Ht : Ut;
1321
+ let r = n ? Ut : Wt;
1322
1322
  return r[t] ? (r[t]++, t += `-${r[t]}`) : r[t] = 1, e.includes("#define SHADER_NAME") ? e : `${`#define SHADER_NAME ${t}`}\n${e}`;
1323
1323
  }
1324
1324
  //#endregion
1325
1325
  //#region src/core/renderers/gl/shader/preprocessors/stripVersion.ts
1326
- function Gt(e, t) {
1326
+ function Kt(e, t) {
1327
1327
  return t ? e.replace("#version 300 es", "") : e;
1328
1328
  }
1329
1329
  //#endregion
1330
1330
  //#region src/core/renderers/gl/shader/GlProgram.ts
1331
- var Kt = Object.create(null), qt = {
1332
- stripVersion: Gt,
1333
- ensurePrecision: Bt,
1334
- addProgramDefines: zt,
1335
- setProgramName: Wt,
1336
- insertVersion: Vt
1337
- }, Jt = class e {
1331
+ var qt = Object.create(null), Jt = {
1332
+ stripVersion: Kt,
1333
+ ensurePrecision: Vt,
1334
+ addProgramDefines: Bt,
1335
+ setProgramName: Gt,
1336
+ insertVersion: Ht
1337
+ }, Yt = class e {
1338
1338
  static defaultOptions = {
1339
1339
  preferredVertexPrecision: "highp",
1340
1340
  preferredFragmentPrecision: "mediump"
@@ -1357,25 +1357,25 @@ var Kt = Object.create(null), qt = {
1357
1357
  requestedFragmentPrecision: t.preferredFragmentPrecision,
1358
1358
  requestedVertexPrecision: t.preferredVertexPrecision,
1359
1359
  maxSupportedVertexPrecision: "highp",
1360
- maxSupportedFragmentPrecision: Rt()
1360
+ maxSupportedFragmentPrecision: zt()
1361
1361
  },
1362
1362
  setProgramName: { name: t.name },
1363
1363
  addProgramDefines: i,
1364
1364
  insertVersion: i
1365
1365
  };
1366
- Object.keys(qt).forEach((e) => {
1366
+ Object.keys(Jt).forEach((e) => {
1367
1367
  let t = a[e];
1368
- n = qt[e](n, t, !0), r = qt[e](r, t, !1);
1369
- }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = Ft(`${r}:${n}`, "GlProgram");
1368
+ n = Jt[e](n, t, !0), r = Jt[e](r, t, !1);
1369
+ }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = It(`${r}:${n}`, "GlProgram");
1370
1370
  }
1371
1371
  destroy() {
1372
- this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete Kt[this._cacheKey];
1372
+ this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete qt[this._cacheKey];
1373
1373
  }
1374
1374
  static from(t) {
1375
1375
  let n = `${t.vertex}:${t.fragment}`;
1376
- return Kt[n] || (Kt[n] = new e(t), Kt[n]._cacheKey = n), Kt[n];
1376
+ return qt[n] || (qt[n] = new e(t), qt[n]._cacheKey = n), qt[n];
1377
1377
  }
1378
- }, Yt = {
1378
+ }, Xt = {
1379
1379
  uint8x2: {
1380
1380
  size: 2,
1381
1381
  stride: 2,
@@ -1527,19 +1527,19 @@ var Kt = Object.create(null), qt = {
1527
1527
  normalized: !1
1528
1528
  }
1529
1529
  };
1530
- function Xt(e) {
1531
- return Yt[e] ?? Yt.float32;
1530
+ function Zt(e) {
1531
+ return Xt[e] ?? Xt.float32;
1532
1532
  }
1533
1533
  //#endregion
1534
1534
  //#region src/core/renderers/gl/shader/GlProgramData.ts
1535
- var Zt = class {
1535
+ var Qt = class {
1536
1536
  native;
1537
1537
  uniformDirtyGroups = Object.create(null);
1538
1538
  uniforms = Object.create(null);
1539
1539
  constructor(e) {
1540
1540
  this.native = e;
1541
1541
  }
1542
- }, Qt, $t = {
1542
+ }, $t, en = {
1543
1543
  FLOAT: "float",
1544
1544
  FLOAT_VEC2: "vec2",
1545
1545
  FLOAT_VEC3: "vec3",
@@ -1568,7 +1568,7 @@ var Zt = class {
1568
1568
  SAMPLER_2D_ARRAY: "sampler2DArray",
1569
1569
  INT_SAMPLER_2D_ARRAY: "sampler2DArray",
1570
1570
  UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray"
1571
- }, en = {
1571
+ }, tn = {
1572
1572
  float: "float32",
1573
1573
  vec2: "float32x2",
1574
1574
  vec3: "float32x3",
@@ -1586,29 +1586,29 @@ var Zt = class {
1586
1586
  bvec3: "uint32x3",
1587
1587
  bvec4: "uint32x4"
1588
1588
  };
1589
- function tn(e, t) {
1590
- if (!Qt) {
1591
- let t = Object.keys($t);
1592
- Qt = {};
1589
+ function nn(e, t) {
1590
+ if (!$t) {
1591
+ let t = Object.keys(en);
1592
+ $t = {};
1593
1593
  for (let n = 0; n < t.length; ++n) {
1594
1594
  let r = t[n];
1595
- Qt[e[r]] = $t[r];
1595
+ $t[e[r]] = en[r];
1596
1596
  }
1597
1597
  }
1598
- return Qt[t];
1598
+ return $t[t];
1599
1599
  }
1600
- function nn(e, t) {
1601
- return en[tn(e, t)] || "float32";
1600
+ function rn(e, t) {
1601
+ return tn[nn(e, t)] || "float32";
1602
1602
  }
1603
1603
  //#endregion
1604
1604
  //#region src/core/renderers/gl/shader/GlShaderSystem.ts
1605
- var rn = class extends N {
1605
+ var an = class extends M {
1606
1606
  install(e) {
1607
1607
  super.install(e), e.shader = this;
1608
1608
  }
1609
1609
  glProgramDatas = /* @__PURE__ */ new Map();
1610
1610
  currentProgram = null;
1611
- globalUniforms = new Mt({
1611
+ globalUniforms = new Nt({
1612
1612
  projectionMatrix: new Float32Array([
1613
1613
  1,
1614
1614
  0,
@@ -1649,7 +1649,7 @@ var rn = class extends N {
1649
1649
  return this.glProgramDatas.get(e.id) || this._createGlProgramData(e);
1650
1650
  }
1651
1651
  _createGlProgramData(e) {
1652
- let t = this._gl, n = new Zt(t.createProgram());
1652
+ let t = this._gl, n = new Qt(t.createProgram());
1653
1653
  this.glProgramDatas.set(e.id, n), this.useProgram(e);
1654
1654
  let r = this._createGlShader(e.vertex, t.VERTEX_SHADER), i = this._createGlShader(e.fragment, t.FRAGMENT_SHADER);
1655
1655
  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)}`);
@@ -1657,11 +1657,11 @@ var rn = class extends N {
1657
1657
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_ATTRIBUTES), r = 0; r < e; r++) {
1658
1658
  let e = t.getActiveAttrib(n.native, r);
1659
1659
  if (!e || e.name.startsWith("gl_")) continue;
1660
- let i = nn(t, e.type);
1660
+ let i = rn(t, e.type);
1661
1661
  a[e.name] = {
1662
1662
  location: 0,
1663
1663
  format: i,
1664
- stride: Xt(i).stride,
1664
+ stride: Zt(i).stride,
1665
1665
  offset: 0,
1666
1666
  instance: !1,
1667
1667
  start: 0
@@ -1678,7 +1678,7 @@ var rn = class extends N {
1678
1678
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_UNIFORMS), r = 0; r < e; r++) {
1679
1679
  let e = t.getActiveUniform(n.native, r);
1680
1680
  if (!e) continue;
1681
- let i = e.name.replace(/\[.*?\]$/, ""), a = tn(t, e.type), o = e.size;
1681
+ let i = e.name.replace(/\[.*?\]$/, ""), a = nn(t, e.type), o = e.size;
1682
1682
  c[i] = {
1683
1683
  name: i,
1684
1684
  index: r,
@@ -1713,7 +1713,7 @@ var rn = class extends N {
1713
1713
  let { type: s, isArray: c, name: l } = o;
1714
1714
  o.location === void 0 && (o.location = n.getUniformLocation(e.native, l));
1715
1715
  let u = o.location;
1716
- if (an(o.value, a)) switch (o.value = on(o.value, a), s) {
1716
+ if (on(o.value, a)) switch (o.value = sn(o.value, a), s) {
1717
1717
  case "float":
1718
1718
  c ? n.uniform1fv(u, a) : n.uniform1f(u, a);
1719
1719
  break;
@@ -1800,7 +1800,7 @@ var rn = class extends N {
1800
1800
  super.destroy(), this.bind(null);
1801
1801
  }
1802
1802
  };
1803
- function an(e, t) {
1803
+ function on(e, t) {
1804
1804
  if (typeof t == "object" && t) {
1805
1805
  let n = t.length;
1806
1806
  if (typeof e != "object" || !e || e.length !== n) return !0;
@@ -1809,7 +1809,7 @@ function an(e, t) {
1809
1809
  }
1810
1810
  return e !== t;
1811
1811
  }
1812
- function on(e, t) {
1812
+ function sn(e, t) {
1813
1813
  if (typeof t == "object" && t) {
1814
1814
  let n = t.length;
1815
1815
  if (typeof e == "object" && e && e.length === n) {
@@ -1822,10 +1822,10 @@ function on(e, t) {
1822
1822
  }
1823
1823
  //#endregion
1824
1824
  //#region src/core/renderers/gl/state/GlBlendMode.ts
1825
- var sn = /* @__PURE__ */ function(e) {
1825
+ var cn = /* @__PURE__ */ function(e) {
1826
1826
  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;
1827
1827
  }({});
1828
- function cn(e) {
1828
+ function ln(e) {
1829
1829
  return {
1830
1830
  normal: [e.ONE, e.ONE_MINUS_SRC_ALPHA],
1831
1831
  add: [e.ONE, e.ONE],
@@ -1880,7 +1880,7 @@ function cn(e) {
1880
1880
  }
1881
1881
  //#endregion
1882
1882
  //#region src/core/renderers/gl/state/GlStateSystem.ts
1883
- var ln = class e {
1883
+ var un = class e {
1884
1884
  static _properties = [
1885
1885
  "blend",
1886
1886
  "offsets",
@@ -1907,14 +1907,14 @@ var ln = class e {
1907
1907
  let t = new e();
1908
1908
  return t.depthTest = !1, t.blend = !0, t;
1909
1909
  }
1910
- _blendMode = sn.normal;
1910
+ _blendMode = cn.normal;
1911
1911
  _polygonOffset = 0;
1912
1912
  bitmap = 0;
1913
1913
  get blendMode() {
1914
1914
  return this._blendMode;
1915
1915
  }
1916
1916
  set blendMode(e) {
1917
- this.blend = e !== sn.none, this._blendMode = e;
1917
+ this.blend = e !== cn.none, this._blendMode = e;
1918
1918
  }
1919
1919
  get polygonOffset() {
1920
1920
  return this._polygonOffset;
@@ -1926,19 +1926,19 @@ var ln = class e {
1926
1926
  if (e) for (let t in e) this[t] = e[t];
1927
1927
  }
1928
1928
  };
1929
- ln._init();
1930
- var un = class extends N {
1929
+ un._init();
1930
+ var dn = class extends M {
1931
1931
  install(e) {
1932
1932
  super.install(e), e.state = this;
1933
1933
  }
1934
1934
  _blendEq = !1;
1935
- _setters = ln._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1935
+ _setters = un._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1936
1936
  boundStateBitmap = 0;
1937
1937
  boundBlendMode;
1938
1938
  blendModes;
1939
- defaultState = new ln({ blend: !0 });
1939
+ defaultState = new un({ blend: !0 });
1940
1940
  _updateContext(e) {
1941
- super._updateContext(e), this.blendModes = cn(e);
1941
+ super._updateContext(e), this.blendModes = ln(e);
1942
1942
  }
1943
1943
  toggle(e, t) {
1944
1944
  this._renderer.gl[t ? "enable" : "disable"](e);
@@ -1981,14 +1981,14 @@ var un = class extends N {
1981
1981
  }
1982
1982
  reset() {
1983
1983
  super.reset();
1984
- let e = (1 << ln._properties.length) - 1;
1984
+ let e = (1 << un._properties.length) - 1;
1985
1985
  this.boundStateBitmap = ~this.defaultState.bitmap & e, this.boundBlendMode = void 0, this._blendEq = !0, this.bind(this.defaultState);
1986
1986
  }
1987
- }, dn = class extends N {
1987
+ }, fn = class extends M {
1988
1988
  install(e) {
1989
1989
  super.install(e), e.batch2D = this;
1990
1990
  }
1991
- _state = ln.for2D();
1991
+ _state = un.for2D();
1992
1992
  _batchSize = 4096 * 4;
1993
1993
  _batchables = [];
1994
1994
  _vertexCount = 0;
@@ -2010,7 +2010,7 @@ var un = class extends N {
2010
2010
  _createShader(e) {
2011
2011
  let t = this._renderer, n = {
2012
2012
  instanceId: ut(),
2013
- glProgram: new Jt({
2013
+ glProgram: new Yt({
2014
2014
  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}",
2015
2015
  fragment: `precision highp float;
2016
2016
  in float vTextureId;
@@ -2040,11 +2040,11 @@ void main(void) {
2040
2040
  })
2041
2041
  }, r = {
2042
2042
  instanceId: ut(),
2043
- usage: M.vertex,
2043
+ usage: j.vertex,
2044
2044
  data: /* @__PURE__ */ new Float32Array()
2045
2045
  }, i = {
2046
2046
  instanceId: ut(),
2047
- usage: M.index,
2047
+ usage: j.index,
2048
2048
  data: /* @__PURE__ */ new Uint32Array()
2049
2049
  }, a = {
2050
2050
  instanceId: ut(),
@@ -2087,7 +2087,7 @@ void main(void) {
2087
2087
  let { indices: r, vertices: p, uvs: h = /* @__PURE__ */ new Float32Array(), size: g = {
2088
2088
  width: 0,
2089
2089
  height: 0
2090
- }, texture: ee, blendMode: te = sn.normal, clipOutsideUv: ne, roundPixels: re, modulate: ie = [
2090
+ }, texture: ee, blendMode: te = cn.normal, clipOutsideUv: ne, roundPixels: re, modulate: ie = [
2091
2091
  255,
2092
2092
  255,
2093
2093
  255,
@@ -2117,22 +2117,22 @@ void main(void) {
2117
2117
  }
2118
2118
  }
2119
2119
  _getBufferData(e) {
2120
- let t = fn(Math.ceil(e / 8)), n = pn(t), r = t * 8;
2120
+ let t = pn(Math.ceil(e / 8)), n = mn(t), r = t * 8;
2121
2121
  this._attributeBuffer.length <= n && (this._attributeBuffer.length = n + 1);
2122
2122
  let i = this._attributeBuffer[n];
2123
2123
  return i || (this._attributeBuffer[n] = i = /* @__PURE__ */ new ArrayBuffer(r * this._vertexSize * 4)), i;
2124
2124
  }
2125
2125
  _getIndexBufferData(e) {
2126
- let t = fn(Math.ceil(e / 12)), n = pn(t), r = t * 12;
2126
+ let t = pn(Math.ceil(e / 12)), n = mn(t), r = t * 12;
2127
2127
  this._indexBuffers.length <= n && (this._indexBuffers.length = n + 1);
2128
2128
  let i = this._indexBuffers[n];
2129
2129
  return i || (this._indexBuffers[n] = i = new Uint32Array(r)), i;
2130
2130
  }
2131
2131
  };
2132
- function fn(e) {
2132
+ function pn(e) {
2133
2133
  return e += +(e === 0), --e, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e + 1;
2134
2134
  }
2135
- function pn(e) {
2135
+ function mn(e) {
2136
2136
  let t = (e > 65535) << 4;
2137
2137
  e >>>= t;
2138
2138
  let n = (e > 255) << 3;
@@ -2140,11 +2140,11 @@ function pn(e) {
2140
2140
  }
2141
2141
  //#endregion
2142
2142
  //#region src/core/renderers/gl/const.ts
2143
- var P = /* @__PURE__ */ function(e) {
2143
+ var N = /* @__PURE__ */ function(e) {
2144
2144
  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;
2145
- }({}), mn = /* @__PURE__ */ function(e) {
2145
+ }({}), hn = /* @__PURE__ */ function(e) {
2146
2146
  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;
2147
- }({}), hn = class extends N {
2147
+ }({}), gn = class extends M {
2148
2148
  install(e) {
2149
2149
  super.install(e), e.mask = this;
2150
2150
  }
@@ -2163,16 +2163,16 @@ var P = /* @__PURE__ */ function(e) {
2163
2163
  };
2164
2164
  this.stack.push(n);
2165
2165
  let r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2166
- "x" in t ? this._renderer.scissor.push(t) : "render" in t && (this._renderer.flush(), this._renderer.renderTarget.ensureDepthStencil(), this._renderer.stencil.bind(P.renderingMaskAdd, i), this._renderer.colorMask.bind(0), i++, t.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(P.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2166
+ "x" in t ? this._renderer.scissor.push(t) : "render" in t && (this._renderer.flush(), this._renderer.renderTarget.ensureDepthStencil(), this._renderer.stencil.bind(N.renderingMaskAdd, i), this._renderer.colorMask.bind(0), i++, t.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(N.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2167
2167
  }
2168
2168
  pop(e) {
2169
2169
  let t = this.stack.pop();
2170
2170
  if (!t || t.source !== e) return;
2171
2171
  let { mask: n } = t, r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2172
- "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(mn.stencil), this._renderer.stencil.bind(P.disabled, i)) : this._renderer.stencil.bind(P.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(P.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2172
+ "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(hn.stencil), this._renderer.stencil.bind(N.disabled, i)) : this._renderer.stencil.bind(N.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(N.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2173
2173
  }
2174
- }, gn = [];
2175
- gn[P.none] = {}, gn[P.disabled] = {}, gn[P.renderingMaskAdd] = {
2174
+ }, _n = [];
2175
+ _n[N.none] = {}, _n[N.disabled] = {}, _n[N.renderingMaskAdd] = {
2176
2176
  stencilFront: {
2177
2177
  compare: "equal",
2178
2178
  passOp: "increment-clamp"
@@ -2181,7 +2181,7 @@ gn[P.none] = {}, gn[P.disabled] = {}, gn[P.renderingMaskAdd] = {
2181
2181
  compare: "equal",
2182
2182
  passOp: "increment-clamp"
2183
2183
  }
2184
- }, gn[P.renderingMaskRemove] = {
2184
+ }, _n[N.renderingMaskRemove] = {
2185
2185
  stencilFront: {
2186
2186
  compare: "equal",
2187
2187
  passOp: "decrement-clamp"
@@ -2190,7 +2190,7 @@ gn[P.none] = {}, gn[P.disabled] = {}, gn[P.renderingMaskAdd] = {
2190
2190
  compare: "equal",
2191
2191
  passOp: "decrement-clamp"
2192
2192
  }
2193
- }, gn[P.maskActive] = {
2193
+ }, _n[N.maskActive] = {
2194
2194
  stencilFront: {
2195
2195
  compare: "equal",
2196
2196
  passOp: "keep"
@@ -2199,7 +2199,7 @@ gn[P.none] = {}, gn[P.disabled] = {}, gn[P.renderingMaskAdd] = {
2199
2199
  compare: "equal",
2200
2200
  passOp: "keep"
2201
2201
  }
2202
- }, gn[P.inverseMaskActive] = {
2202
+ }, _n[N.inverseMaskActive] = {
2203
2203
  stencilFront: {
2204
2204
  compare: "not-equal",
2205
2205
  passOp: "keep"
@@ -2209,17 +2209,17 @@ gn[P.none] = {}, gn[P.disabled] = {}, gn[P.renderingMaskAdd] = {
2209
2209
  passOp: "keep"
2210
2210
  }
2211
2211
  };
2212
- var _n = class extends N {
2212
+ var vn = class extends M {
2213
2213
  install(e) {
2214
2214
  super.install(e), e.stencil = this;
2215
2215
  }
2216
2216
  _cache = {
2217
2217
  enabled: !1,
2218
- stencilMode: P.none,
2218
+ stencilMode: N.none,
2219
2219
  refCount: 0
2220
2220
  };
2221
2221
  current = { [-1]: {
2222
- stencilMode: P.disabled,
2222
+ stencilMode: N.disabled,
2223
2223
  refCount: 0
2224
2224
  } };
2225
2225
  _passOpMap;
@@ -2249,20 +2249,20 @@ var _n = class extends N {
2249
2249
  super._setup(), this._renderer.renderTarget.on("updateRenderTarget", this._updateRenderTarget);
2250
2250
  }
2251
2251
  reset() {
2252
- this._cache.enabled = !1, this._cache.stencilMode = P.none, this._cache.refCount = 0;
2252
+ this._cache.enabled = !1, this._cache.stencilMode = N.none, this._cache.refCount = 0;
2253
2253
  }
2254
2254
  _updateRenderTarget = (e) => {
2255
2255
  if (e) {
2256
2256
  let t = this.current[e.instanceId];
2257
2257
  t ||= this.current[e.instanceId] = {
2258
- stencilMode: P.disabled,
2258
+ stencilMode: N.disabled,
2259
2259
  refCount: 0
2260
2260
  }, this.bind(t.stencilMode, t.refCount);
2261
2261
  }
2262
2262
  };
2263
2263
  bind(e, t) {
2264
- let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = gn[e], a = this._cache;
2265
- if (n.stencilMode = e, n.refCount = t, e === P.disabled) {
2264
+ let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = _n[e], a = this._cache;
2265
+ if (n.stencilMode = e, n.refCount = t, e === N.disabled) {
2266
2266
  this._cache.enabled && (this._cache.enabled = !1, r.disable(r.STENCIL_TEST));
2267
2267
  return;
2268
2268
  }
@@ -2271,7 +2271,7 @@ var _n = class extends N {
2271
2271
  destroy() {
2272
2272
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
2273
2273
  }
2274
- }, vn = class extends N {
2274
+ }, yn = class extends M {
2275
2275
  current = new yt(0, 0, 0, 0);
2276
2276
  install(e) {
2277
2277
  super.install(e), e.viewport = this;
@@ -2280,7 +2280,7 @@ var _n = class extends N {
2280
2280
  let t = this.current, n = Math.floor(e.x), r = Math.floor(e.y), i = Math.floor(e.width), a = Math.floor(e.height);
2281
2281
  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);
2282
2282
  }
2283
- }, yn = class {
2283
+ }, bn = class {
2284
2284
  framebuffer;
2285
2285
  width = -1;
2286
2286
  height = -1;
@@ -2291,7 +2291,7 @@ var _n = class extends N {
2291
2291
  constructor(e) {
2292
2292
  this.framebuffer = e;
2293
2293
  }
2294
- }, bn = class extends N {
2294
+ }, xn = class extends M {
2295
2295
  install(e) {
2296
2296
  super.install(e), e.renderTarget = this;
2297
2297
  }
@@ -2301,7 +2301,7 @@ var _n = class extends N {
2301
2301
  _msaaSamples = [];
2302
2302
  _hasMRT = !0;
2303
2303
  _writeDepthTexture = !0;
2304
- projection = new wt();
2304
+ projection = new Tt();
2305
2305
  _updateContext(e) {
2306
2306
  if (super._updateContext(e), this._hasMRT = !0, this._writeDepthTexture = !0, this._renderer.version === 1) {
2307
2307
  let t = this._renderer.extensions.drawBuffers, n = this._renderer.extensions.depthTexture;
@@ -2337,7 +2337,7 @@ var _n = class extends N {
2337
2337
  return this.glRenderTargets.get(e.instanceId) || this._createGlRenderTarget(e);
2338
2338
  }
2339
2339
  _createGlRenderTarget(e) {
2340
- let t = this._gl, n = new yn(t.createFramebuffer());
2340
+ let t = this._gl, n = new bn(t.createFramebuffer());
2341
2341
  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) => {
2342
2342
  switch (t) {
2343
2343
  case "width":
@@ -2414,28 +2414,28 @@ var _n = class extends N {
2414
2414
  reset() {
2415
2415
  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;
2416
2416
  }
2417
- }, xn = /* @__PURE__ */ function(e) {
2417
+ }, Sn = /* @__PURE__ */ function(e) {
2418
2418
  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;
2419
- }({}), Sn = /* @__PURE__ */ function(e) {
2419
+ }({}), Cn = /* @__PURE__ */ function(e) {
2420
2420
  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;
2421
- }({}), F = /* @__PURE__ */ function(e) {
2421
+ }({}), P = /* @__PURE__ */ function(e) {
2422
2422
  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;
2423
- }({}), Cn = class {
2423
+ }({}), wn = class {
2424
2424
  native;
2425
- target = Sn.TEXTURE_2D;
2425
+ target = Cn.TEXTURE_2D;
2426
2426
  width = -1;
2427
2427
  height = -1;
2428
2428
  mipmap = !1;
2429
- type = F.UNSIGNED_BYTE;
2430
- internalFormat = xn.RGBA;
2431
- format = xn.RGBA;
2429
+ type = P.UNSIGNED_BYTE;
2430
+ internalFormat = Sn.RGBA;
2431
+ format = Sn.RGBA;
2432
2432
  constructor(e) {
2433
2433
  this.native = e;
2434
2434
  }
2435
2435
  };
2436
2436
  //#endregion
2437
2437
  //#region src/core/renderers/gl/texture/mapFormatToGlFormat.ts
2438
- function wn(e) {
2438
+ function Tn(e) {
2439
2439
  return {
2440
2440
  r8unorm: e.RED,
2441
2441
  r8snorm: e.RED,
@@ -2483,7 +2483,7 @@ function wn(e) {
2483
2483
  }
2484
2484
  //#endregion
2485
2485
  //#region src/core/renderers/gl/texture/mapFormatToGlInternalFormat.ts
2486
- function Tn(e, t) {
2486
+ function En(e, t) {
2487
2487
  let n = {}, r = e.RGBA;
2488
2488
  return e instanceof WebGLRenderingContext ? t.srgb && (n = {
2489
2489
  "rgba8unorm-srgb": t.srgb.SRGB8_ALPHA8_EXT,
@@ -2599,7 +2599,7 @@ function Tn(e, t) {
2599
2599
  }
2600
2600
  //#endregion
2601
2601
  //#region src/core/renderers/gl/texture/mapFormatToGlType.ts
2602
- function En(e) {
2602
+ function Dn(e) {
2603
2603
  return {
2604
2604
  r8unorm: e.UNSIGNED_BYTE,
2605
2605
  r8snorm: e.BYTE,
@@ -2647,7 +2647,7 @@ function En(e) {
2647
2647
  }
2648
2648
  //#endregion
2649
2649
  //#region src/core/renderers/gl/texture/updateTextureStyle.ts
2650
- var Dn = {
2650
+ var On = {
2651
2651
  linear: {
2652
2652
  linear: 9987,
2653
2653
  nearest: 9985
@@ -2656,10 +2656,10 @@ var Dn = {
2656
2656
  linear: 9986,
2657
2657
  nearest: 9984
2658
2658
  }
2659
- }, On = {
2659
+ }, kn = {
2660
2660
  linear: 9729,
2661
2661
  nearest: 9728
2662
- }, kn = {
2662
+ }, An = {
2663
2663
  never: 512,
2664
2664
  less: 513,
2665
2665
  equal: 514,
@@ -2668,32 +2668,32 @@ var Dn = {
2668
2668
  "not-equal": 517,
2669
2669
  "greater-equal": 518,
2670
2670
  always: 519
2671
- }, An = {
2671
+ }, jn = {
2672
2672
  "clamp-to-edge": 33071,
2673
2673
  repeat: 10497,
2674
2674
  "mirror-repeat": 33648
2675
2675
  };
2676
- function jn(e, t, n, r, i, a, o, s) {
2676
+ function Mn(e, t, n, r, i, a, o, s) {
2677
2677
  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;
2678
2678
  if (!s || c !== "repeat" || l !== "repeat" || u !== "repeat") {
2679
- let e = An[o ? "clamp-to-edge" : c], n = An[o ? "clamp-to-edge" : l], r = An[o ? "clamp-to-edge" : u];
2679
+ let e = jn[o ? "clamp-to-edge" : c], n = jn[o ? "clamp-to-edge" : l], r = jn[o ? "clamp-to-edge" : u];
2680
2680
  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);
2681
2681
  }
2682
- if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, On[d]), n) {
2682
+ if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, kn[d]), n) {
2683
2683
  if (!s || p !== "linear") {
2684
- let e = Dn[f][p];
2684
+ let e = On[f][p];
2685
2685
  t[i](g, t.TEXTURE_MIN_FILTER, e);
2686
2686
  }
2687
- } else t[i](g, t.TEXTURE_MIN_FILTER, On[f]);
2687
+ } else t[i](g, t.TEXTURE_MIN_FILTER, kn[f]);
2688
2688
  if (r && m > 1) {
2689
2689
  let e = Math.min(m, t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
2690
2690
  t[i](g, r.TEXTURE_MAX_ANISOTROPY_EXT, e);
2691
2691
  }
2692
- h && t[i](g, t.TEXTURE_COMPARE_FUNC, kn[h]);
2692
+ h && t[i](g, t.TEXTURE_COMPARE_FUNC, An[h]);
2693
2693
  }
2694
2694
  //#endregion
2695
2695
  //#region src/core/renderers/gl/texture/uploaders/index.ts
2696
- var Mn = {
2696
+ var Nn = {
2697
2697
  buffer: {
2698
2698
  id: "buffer",
2699
2699
  upload: (e, t, n) => {
@@ -2707,8 +2707,8 @@ var Mn = {
2707
2707
  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;
2708
2708
  }
2709
2709
  }
2710
- }, Nn = class extends N {
2711
- uploaders = { ...Mn };
2710
+ }, Pn = class extends M {
2711
+ uploaders = { ...Nn };
2712
2712
  textures = /* @__PURE__ */ new Map();
2713
2713
  glTextures = /* @__PURE__ */ new Map();
2714
2714
  _mapFormatToInternalFormat = Object.create(null);
@@ -2723,16 +2723,16 @@ var Mn = {
2723
2723
  super.install(e), e.texture = this;
2724
2724
  }
2725
2725
  _updateContext(e) {
2726
- super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = Tn(e, this._renderer.extensions), this._mapFormatToType = En(e), this._mapFormatToFormat = wn(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2726
+ super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = En(e, this._renderer.extensions), this._mapFormatToType = Dn(e), this._mapFormatToFormat = Tn(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2727
2727
  for (let e = 0; e < this.maxTextureImageUnits; e++) this.unbind(e);
2728
2728
  }
2729
2729
  getGlTexture(e) {
2730
2730
  return this.glTextures.get(e.instanceId) || this._createGlTexture(e);
2731
2731
  }
2732
2732
  _createGlTexture(e) {
2733
- let t = this._gl, n = new Cn(t.createTexture());
2733
+ let t = this._gl, n = new wn(t.createTexture());
2734
2734
  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)) {
2735
- let t = Math.max(e.width, e.height);
2735
+ let t = Math.max(e.pixelWidth ?? e.width, e.pixelHeight ?? e.height);
2736
2736
  e.mipLevelCount = Math.floor(Math.log2(t)) + 1;
2737
2737
  }
2738
2738
  return this.textures.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (t) => {
@@ -2790,7 +2790,7 @@ var Mn = {
2790
2790
  }
2791
2791
  updateStyle(e, t = !1) {
2792
2792
  let n = this._gl;
2793
- jn(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2793
+ Mn(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2794
2794
  }
2795
2795
  updateGpuTexture(e) {
2796
2796
  this.bind(e);
@@ -2805,50 +2805,50 @@ var Mn = {
2805
2805
  let e = this._gl;
2806
2806
  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);
2807
2807
  }
2808
- }, Pn = {
2809
- uint8x2: F.UNSIGNED_BYTE,
2810
- uint8x4: F.UNSIGNED_BYTE,
2811
- sint8x2: F.BYTE,
2812
- sint8x4: F.BYTE,
2813
- unorm8x2: F.UNSIGNED_BYTE,
2814
- unorm8x4: F.UNSIGNED_BYTE,
2815
- snorm8x2: F.BYTE,
2816
- snorm8x4: F.BYTE,
2817
- uint16x2: F.UNSIGNED_SHORT,
2818
- uint16x4: F.UNSIGNED_SHORT,
2819
- sint16x2: F.SHORT,
2820
- sint16x4: F.SHORT,
2821
- unorm16x2: F.UNSIGNED_SHORT,
2822
- unorm16x4: F.UNSIGNED_SHORT,
2823
- snorm16x2: F.SHORT,
2824
- snorm16x4: F.SHORT,
2825
- float16x2: F.HALF_FLOAT,
2826
- float16x4: F.HALF_FLOAT,
2827
- float32: F.FLOAT,
2828
- float32x2: F.FLOAT,
2829
- float32x3: F.FLOAT,
2830
- float32x4: F.FLOAT,
2831
- uint32: F.UNSIGNED_INT,
2832
- uint32x2: F.UNSIGNED_INT,
2833
- uint32x3: F.UNSIGNED_INT,
2834
- uint32x4: F.UNSIGNED_INT,
2835
- sint32: F.INT,
2836
- sint32x2: F.INT,
2837
- sint32x3: F.INT,
2838
- sint32x4: F.INT
2808
+ }, Fn = {
2809
+ uint8x2: P.UNSIGNED_BYTE,
2810
+ uint8x4: P.UNSIGNED_BYTE,
2811
+ sint8x2: P.BYTE,
2812
+ sint8x4: P.BYTE,
2813
+ unorm8x2: P.UNSIGNED_BYTE,
2814
+ unorm8x4: P.UNSIGNED_BYTE,
2815
+ snorm8x2: P.BYTE,
2816
+ snorm8x4: P.BYTE,
2817
+ uint16x2: P.UNSIGNED_SHORT,
2818
+ uint16x4: P.UNSIGNED_SHORT,
2819
+ sint16x2: P.SHORT,
2820
+ sint16x4: P.SHORT,
2821
+ unorm16x2: P.UNSIGNED_SHORT,
2822
+ unorm16x4: P.UNSIGNED_SHORT,
2823
+ snorm16x2: P.SHORT,
2824
+ snorm16x4: P.SHORT,
2825
+ float16x2: P.HALF_FLOAT,
2826
+ float16x4: P.HALF_FLOAT,
2827
+ float32: P.FLOAT,
2828
+ float32x2: P.FLOAT,
2829
+ float32x3: P.FLOAT,
2830
+ float32x4: P.FLOAT,
2831
+ uint32: P.UNSIGNED_INT,
2832
+ uint32x2: P.UNSIGNED_INT,
2833
+ uint32x3: P.UNSIGNED_INT,
2834
+ uint32x4: P.UNSIGNED_INT,
2835
+ sint32: P.INT,
2836
+ sint32x2: P.INT,
2837
+ sint32x3: P.INT,
2838
+ sint32x4: P.INT
2839
2839
  };
2840
- function Fn(e) {
2841
- return Pn[e] ?? Pn.float32;
2840
+ function In(e) {
2841
+ return Fn[e] ?? Fn.float32;
2842
2842
  }
2843
2843
  //#endregion
2844
2844
  //#region src/core/renderers/gl/geometry/GlGeometrySystem.ts
2845
- var In = {
2845
+ var Ln = {
2846
2846
  "point-list": 0,
2847
2847
  "line-list": 1,
2848
2848
  "line-strip": 3,
2849
2849
  "triangle-list": 4,
2850
2850
  "triangle-strip": 5
2851
- }, Ln = class extends N {
2851
+ }, Rn = class extends M {
2852
2852
  _geometryVaoHash = {};
2853
2853
  hasInstance = !1;
2854
2854
  current = null;
@@ -2887,11 +2887,11 @@ var In = {
2887
2887
  }
2888
2888
  for (let e in r) {
2889
2889
  let t = r[e];
2890
- i[t.buffer.instanceId] += Xt(t.format).stride;
2890
+ i[t.buffer.instanceId] += Zt(t.format).stride;
2891
2891
  }
2892
2892
  for (let e in r) {
2893
2893
  let t = r[e];
2894
- t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += Xt(t.format).stride;
2894
+ t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += Zt(t.format).stride;
2895
2895
  }
2896
2896
  }
2897
2897
  _createVao(e, t) {
@@ -2926,7 +2926,7 @@ var In = {
2926
2926
  a !== c && (r.bind(s), a = c);
2927
2927
  let e = l.location;
2928
2928
  n.enableVertexAttribArray(e);
2929
- let t = Xt(o.format), i = Fn(o.format);
2929
+ let t = Zt(o.format), i = In(o.format);
2930
2930
  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) {
2931
2931
  let t = o.divisor ?? 1;
2932
2932
  n.vertexAttribDivisor(e, t);
@@ -2959,7 +2959,7 @@ var In = {
2959
2959
  let { topology: t, size: n, start: r = 0, instanceCount: i } = e, { gl: a } = this._renderer, o = this.current;
2960
2960
  if (!o) return this;
2961
2961
  t = t || o.topology || "triangle-list";
2962
- let s = In[t];
2962
+ let s = Ln[t];
2963
2963
  if (i = i || o.instanceCount || 1, o.indexBuffer) {
2964
2964
  n ||= o.indexBuffer.data.length;
2965
2965
  let e = o.indexBuffer.data.BYTES_PER_ELEMENT, t = e === 2 ? a.UNSIGNED_SHORT : a.UNSIGNED_INT;
@@ -2980,7 +2980,7 @@ var In = {
2980
2980
  }
2981
2981
  this._geometryVaoHash = {}, this.current = null, this.currentVao = null;
2982
2982
  }
2983
- }, Rn = class extends N {
2983
+ }, zn = class extends M {
2984
2984
  install(e) {
2985
2985
  super.install(e), e.colorMask = this;
2986
2986
  }
@@ -2991,19 +2991,19 @@ var In = {
2991
2991
  };
2992
2992
  //#endregion
2993
2993
  //#region src/core/renderers/gl/GlScissorSystem.ts
2994
- function zn(e, t, n) {
2994
+ function Bn(e, t, n) {
2995
2995
  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;
2996
2996
  return {
2997
2997
  x: f / m,
2998
2998
  y: p / m
2999
2999
  };
3000
3000
  }
3001
- function Bn(e, t) {
3001
+ function Vn(e, t) {
3002
3002
  let { x: n, y: r, width: i, height: a } = t, o = [
3003
- zn(e, n, r),
3004
- zn(e, n + i, r),
3005
- zn(e, n + i, r + a),
3006
- zn(e, n, r + a)
3003
+ Bn(e, n, r),
3004
+ Bn(e, n + i, r),
3005
+ Bn(e, n + i, r + a),
3006
+ Bn(e, n, r + a)
3007
3007
  ], 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);
3008
3008
  return {
3009
3009
  x: l,
@@ -3012,7 +3012,7 @@ function Bn(e, t) {
3012
3012
  height: f - d
3013
3013
  };
3014
3014
  }
3015
- function Vn(e, t) {
3015
+ function Hn(e, t) {
3016
3016
  let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y), i = Math.min(e.x + e.width, t.x + t.width), a = Math.min(e.y + e.height, t.y + t.height);
3017
3017
  return {
3018
3018
  x: n,
@@ -3021,7 +3021,7 @@ function Vn(e, t) {
3021
3021
  height: Math.max(0, a - r)
3022
3022
  };
3023
3023
  }
3024
- var Hn = class extends N {
3024
+ var Un = class extends M {
3025
3025
  install(e) {
3026
3026
  super.install(e), e.scissor = this;
3027
3027
  }
@@ -3045,7 +3045,7 @@ var Hn = class extends N {
3045
3045
  y: e.y,
3046
3046
  width: e.width,
3047
3047
  height: e.height
3048
- }, i = n ? Vn(n, r) : r;
3048
+ }, i = n ? Hn(n, r) : r;
3049
3049
  t.stack.push(i), this.bind(i);
3050
3050
  }
3051
3051
  pop() {
@@ -3056,28 +3056,28 @@ var Hn = class extends N {
3056
3056
  let t = this._gl;
3057
3057
  if (e) {
3058
3058
  t.enable(t.SCISSOR_TEST);
3059
- let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = Bn(i, e), l = r.current.height / n - (o + c);
3059
+ let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = Vn(i, e), l = r.current.height / n - (o + c);
3060
3060
  t.scissor(a * n, l * n, s * n, c * n);
3061
3061
  } else t.disable(t.SCISSOR_TEST);
3062
3062
  }
3063
3063
  destroy() {
3064
3064
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
3065
3065
  }
3066
- }, Un = class extends At {
3066
+ }, Wn = class extends jt {
3067
3067
  contextLost = !1;
3068
3068
  _systems = [
3069
- new Nn(),
3070
- new It(),
3071
- new rn(),
3072
- new Ln(),
3073
- new bn(),
3074
- new un(),
3075
- new hn(),
3069
+ new Pn(),
3070
+ new Lt(),
3071
+ new an(),
3076
3072
  new Rn(),
3077
- new _n(),
3078
- new Hn(),
3073
+ new xn(),
3079
3074
  new dn(),
3080
- new vn()
3075
+ new gn(),
3076
+ new zn(),
3077
+ new vn(),
3078
+ new Un(),
3079
+ new fn(),
3080
+ new yn()
3081
3081
  ];
3082
3082
  bindPoints = /* @__PURE__ */ new Map();
3083
3083
  supports = {
@@ -3171,8 +3171,8 @@ var Hn = class extends N {
3171
3171
  height: this.screen.height * this.pixelRatio
3172
3172
  });
3173
3173
  }
3174
- clear(e = mn.all) {
3175
- typeof e == "boolean" && (e = e ? mn.all : mn.none), e && this.gl.clear(e);
3174
+ clear(e = hn.all) {
3175
+ typeof e == "boolean" && (e = e ? hn.all : hn.none), e && this.gl.clear(e);
3176
3176
  }
3177
3177
  reset() {
3178
3178
  this._systems.forEach((e) => e.reset());
@@ -3189,7 +3189,7 @@ var Hn = class extends N {
3189
3189
  for (let e = 0; e < i; e += a) c.set(s.subarray(e, e + a), o - e);
3190
3190
  return c;
3191
3191
  }
3192
- }, Wn = class {}, Gn = class extends Wn {
3192
+ }, Gn = class {}, Kn = class extends Gn {
3193
3193
  install(e) {
3194
3194
  let t = async (e) => {
3195
3195
  let { parseFont: t } = await import("modern-font");
@@ -3203,15 +3203,15 @@ var Hn = class extends N {
3203
3203
  e.register(n, t);
3204
3204
  }), e.font = this, this;
3205
3205
  }
3206
- }, Kn = class extends E {
3206
+ }, qn = class extends E {
3207
3207
  constructor(e) {
3208
3208
  super(), this.setProperties(e);
3209
3209
  }
3210
3210
  };
3211
- j([_({ fallback: M.index }), A("design:type", M === void 0 ? Object : M)], Kn.prototype, "usage", void 0), j([_({ default: () => /* @__PURE__ */ new Uint32Array() }), A("design:type", Object)], Kn.prototype, "data", void 0);
3211
+ A([_({ fallback: j.index }), k("design:type", j === void 0 ? Object : j)], qn.prototype, "usage", void 0), A([_({ default: () => /* @__PURE__ */ new Uint32Array() }), k("design:type", Object)], qn.prototype, "data", void 0);
3212
3212
  //#endregion
3213
3213
  //#region src/scene/resources/geometries/Geometry.ts
3214
- var qn = class extends E {
3214
+ var Jn = class extends E {
3215
3215
  constructor(e = {}) {
3216
3216
  super(), this.setProperties(e);
3217
3217
  }
@@ -3219,32 +3219,32 @@ var qn = class extends E {
3219
3219
  e.flush(), t.activate(e, n), e.geometry.bind(this, t.glProgram), e.geometry.draw(), e.geometry.unbind();
3220
3220
  }
3221
3221
  };
3222
- j([_({ fallback: "triangle-list" }), A("design:type", Object)], qn.prototype, "topology", void 0), j([_({ default: () => ({}) }), A("design:type", typeof Record > "u" ? Object : Record)], qn.prototype, "attributes", void 0), j([_({ default: () => new Kn() }), A("design:type", Kn === void 0 ? Object : Kn)], qn.prototype, "indexBuffer", void 0), j([_({ fallback: 1 }), A("design:type", Number)], qn.prototype, "instanceCount", void 0);
3222
+ A([_({ fallback: "triangle-list" }), k("design:type", Object)], Jn.prototype, "topology", void 0), A([_({ default: () => ({}) }), k("design:type", typeof Record > "u" ? Object : Record)], Jn.prototype, "attributes", void 0), A([_({ default: () => new qn() }), k("design:type", qn === void 0 ? Object : qn)], Jn.prototype, "indexBuffer", void 0), A([_({ fallback: 1 }), k("design:type", Number)], Jn.prototype, "instanceCount", void 0);
3223
3223
  //#endregion
3224
3224
  //#region src/scene/resources/geometries/VertexBuffer.ts
3225
- var I = class extends E {
3225
+ var F = class extends E {
3226
3226
  constructor(e) {
3227
3227
  super(), this.setProperties(e);
3228
3228
  }
3229
3229
  };
3230
- j([_({ fallback: M.vertex }), A("design:type", M === void 0 ? Object : M)], I.prototype, "usage", void 0), j([_({ default: () => /* @__PURE__ */ new Float32Array() }), A("design:type", Object)], I.prototype, "data", void 0);
3230
+ A([_({ fallback: j.vertex }), k("design:type", j === void 0 ? Object : j)], F.prototype, "usage", void 0), A([_({ default: () => /* @__PURE__ */ new Float32Array() }), k("design:type", Object)], F.prototype, "data", void 0);
3231
3231
  //#endregion
3232
3232
  //#region src/scene/resources/geometries/VertexAttribute.ts
3233
- var L = class extends E {
3233
+ var I = class extends E {
3234
3234
  constructor(e) {
3235
3235
  super(), this.setProperties(e);
3236
3236
  }
3237
3237
  };
3238
- j([_({ default: () => new I() }), A("design:type", I === void 0 ? Object : I)], L.prototype, "buffer", void 0), j([_({ fallback: "float32" }), A("design:type", Object)], L.prototype, "format", void 0), j([_(), A("design:type", Boolean)], L.prototype, "instance", void 0), j([_(), A("design:type", Number)], L.prototype, "stride", void 0), j([_(), A("design:type", Number)], L.prototype, "offset", void 0), j([_(), A("design:type", Number)], L.prototype, "start", void 0), j([_(), A("design:type", Number)], L.prototype, "divisor", void 0);
3238
+ A([_({ default: () => new F() }), k("design:type", F === void 0 ? Object : F)], I.prototype, "buffer", void 0), A([_({ fallback: "float32" }), k("design:type", Object)], I.prototype, "format", void 0), A([_(), k("design:type", Boolean)], I.prototype, "instance", void 0), A([_(), k("design:type", Number)], I.prototype, "stride", void 0), A([_(), k("design:type", Number)], I.prototype, "offset", void 0), A([_(), k("design:type", Number)], I.prototype, "start", void 0), A([_(), k("design:type", Number)], I.prototype, "divisor", void 0);
3239
3239
  //#endregion
3240
3240
  //#region src/scene/resources/geometries/QuadGeometry.ts
3241
- var Jn = class extends qn {
3241
+ var Yn = class extends Jn {
3242
3242
  constructor() {
3243
3243
  super({
3244
3244
  topology: "triangle-strip",
3245
- attributes: { position: new L({
3245
+ attributes: { position: new I({
3246
3246
  format: "float32x2",
3247
- buffer: new I({ data: new Float32Array([
3247
+ buffer: new F({ data: new Float32Array([
3248
3248
  0,
3249
3249
  0,
3250
3250
  1,
@@ -3255,7 +3255,7 @@ var Jn = class extends qn {
3255
3255
  1
3256
3256
  ]) })
3257
3257
  }) },
3258
- indexBuffer: new Kn({ data: new Uint32Array([
3258
+ indexBuffer: new qn({ data: new Uint32Array([
3259
3259
  0,
3260
3260
  1,
3261
3261
  3,
@@ -3266,7 +3266,7 @@ var Jn = class extends qn {
3266
3266
  };
3267
3267
  //#endregion
3268
3268
  //#region src/scene/resources/materials/Material.ts
3269
- function Yn() {
3269
+ function Xn() {
3270
3270
  return {
3271
3271
  projectionMatrix: new Float32Array([
3272
3272
  1,
@@ -3298,13 +3298,13 @@ function Yn() {
3298
3298
  ])
3299
3299
  };
3300
3300
  }
3301
- var R = class extends E {
3301
+ var L = class extends E {
3302
3302
  static instance = new this();
3303
3303
  glProgram;
3304
3304
  constructor(e = {}) {
3305
3305
  super();
3306
3306
  let { uniforms: t, gl: n } = e;
3307
- t && (this.uniforms = t), this.glProgram = new Jt({
3307
+ t && (this.uniforms = t), this.glProgram = new Yt({
3308
3308
  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}",
3309
3309
  fragment: "uniform vec4 tint;\nvoid main(void) {\n gl_FragColor = tint;\n}",
3310
3310
  ...n
@@ -3317,13 +3317,13 @@ var R = class extends E {
3317
3317
  }, e.shader.updateUniforms(this);
3318
3318
  }
3319
3319
  };
3320
- j([_({ default: Yn }), A("design:type", typeof Record > "u" ? Object : Record)], R.prototype, "uniforms", void 0);
3320
+ A([_({ default: Xn }), k("design:type", typeof Record > "u" ? Object : Record)], L.prototype, "uniforms", void 0);
3321
3321
  //#endregion
3322
3322
  //#region src/scene/resources/materials/EffectMaterial.ts
3323
- var Xn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Zn = /vec(\d)\((.*)\)/;
3324
- function Qn(e) {
3323
+ var Zn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Qn = /vec(\d)\((.*)\)/;
3324
+ function $n(e) {
3325
3325
  e = e.trim();
3326
- let t = e.match(Zn);
3326
+ let t = e.match(Qn);
3327
3327
  if (t) {
3328
3328
  let e = Array.from({ length: Number(t[1]) }, () => 0);
3329
3329
  return t[2].split(",").forEach((t, n) => {
@@ -3332,7 +3332,7 @@ function Qn(e) {
3332
3332
  }
3333
3333
  return Number(e);
3334
3334
  }
3335
- var $n = class e extends R {
3335
+ var er = class e extends L {
3336
3336
  static RE = {
3337
3337
  getColor: /\sgetColor\s*\(/,
3338
3338
  getFromColor: /\sgetFromColor\s*\(/,
@@ -3368,12 +3368,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3368
3368
  progress: 0
3369
3369
  }
3370
3370
  }), this.has = n;
3371
- let r = t.matchAll(Xn);
3371
+ let r = t.matchAll(Zn);
3372
3372
  for (let e of r) e[1] && e[2] && e[1].split(",").forEach((t) => {
3373
- this.uniforms[t.trim()] = Qn(e[2]);
3373
+ this.uniforms[t.trim()] = $n(e[2]);
3374
3374
  });
3375
3375
  }
3376
- }, er = class extends R {
3376
+ }, tr = class extends L {
3377
3377
  static _instance;
3378
3378
  static get instance() {
3379
3379
  return this._instance ??= new this();
@@ -3417,20 +3417,20 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3417
3417
  }
3418
3418
  });
3419
3419
  }
3420
- }, z = class extends qn {
3420
+ }, R = class extends Jn {
3421
3421
  static _instance;
3422
3422
  static get instance() {
3423
3423
  return this._instance ??= new this();
3424
3424
  }
3425
- static draw(e, t = er.instance, n) {
3425
+ static draw(e, t = tr.instance, n) {
3426
3426
  this.instance.draw(e, t, n);
3427
3427
  }
3428
3428
  constructor() {
3429
3429
  super({
3430
3430
  attributes: {
3431
- position: new L({
3431
+ position: new I({
3432
3432
  format: "float32x2",
3433
- buffer: new I({ data: new Float32Array([
3433
+ buffer: new F({ data: new Float32Array([
3434
3434
  -1,
3435
3435
  -1,
3436
3436
  1,
@@ -3441,9 +3441,9 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3441
3441
  1
3442
3442
  ]) })
3443
3443
  }),
3444
- uv: new L({
3444
+ uv: new I({
3445
3445
  format: "float32x2",
3446
- buffer: new I({ data: new Float32Array([
3446
+ buffer: new F({ data: new Float32Array([
3447
3447
  0,
3448
3448
  0,
3449
3449
  1,
@@ -3455,7 +3455,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3455
3455
  ]) })
3456
3456
  })
3457
3457
  },
3458
- indexBuffer: new Kn({ data: new Uint32Array([
3458
+ indexBuffer: new qn({ data: new Uint32Array([
3459
3459
  0,
3460
3460
  1,
3461
3461
  2,
@@ -3465,27 +3465,27 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3465
3465
  ]) })
3466
3466
  });
3467
3467
  }
3468
- }, tr = class extends qn {
3468
+ }, nr = class extends Jn {
3469
3469
  positionBuffer;
3470
3470
  uvBuffer;
3471
3471
  constructor(e) {
3472
- let t = new I({ data: /* @__PURE__ */ new Float32Array() }), n = new I({ data: /* @__PURE__ */ new Float32Array() });
3472
+ let t = new F({ data: /* @__PURE__ */ new Float32Array() }), n = new F({ data: /* @__PURE__ */ new Float32Array() });
3473
3473
  super({
3474
3474
  ...e,
3475
3475
  attributes: {
3476
- position: new L({
3476
+ position: new I({
3477
3477
  format: "float32x2",
3478
3478
  buffer: t
3479
3479
  }),
3480
- uv: new L({
3480
+ uv: new I({
3481
3481
  format: "float32x2",
3482
3482
  buffer: n
3483
3483
  })
3484
3484
  },
3485
- indexBuffer: new Kn({ data: /* @__PURE__ */ new Uint32Array() })
3485
+ indexBuffer: new qn({ data: /* @__PURE__ */ new Uint32Array() })
3486
3486
  }), this.positionBuffer = t, this.uvBuffer = n;
3487
3487
  }
3488
- }, B = class extends E {
3488
+ }, z = class extends E {
3489
3489
  get valid() {
3490
3490
  return !!(this.width && this.height);
3491
3491
  }
@@ -3499,10 +3499,10 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3499
3499
  super._destroy(), this.colorTextures.forEach((e) => e.destroy());
3500
3500
  }
3501
3501
  };
3502
- j([_({ fallback: !1 }), A("design:type", Boolean)], B.prototype, "isRoot", void 0), j([_({ fallback: 0 }), A("design:type", Number)], B.prototype, "x", void 0), j([_({ fallback: 0 }), A("design:type", Number)], B.prototype, "y", void 0), j([_({ fallback: 0 }), A("design:type", Number)], B.prototype, "width", void 0), j([_({ fallback: 0 }), A("design:type", Number)], B.prototype, "height", void 0), j([_({ fallback: 0 }), A("design:type", Number)], B.prototype, "mipLevel", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], B.prototype, "msaa", void 0), j([_({ default: () => [new V()] }), A("design:type", Array)], B.prototype, "colorTextures", void 0);
3502
+ A([_({ fallback: !1 }), k("design:type", Boolean)], z.prototype, "isRoot", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "x", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "y", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "width", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "height", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "mipLevel", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], z.prototype, "msaa", void 0), A([_({ default: () => [new B()] }), k("design:type", Array)], z.prototype, "colorTextures", void 0);
3503
3503
  //#endregion
3504
3504
  //#region src/scene/resources/textures/Texture2D.ts
3505
- var V = class extends E {
3505
+ var B = class extends E {
3506
3506
  static get EMPTY() {
3507
3507
  return new this({
3508
3508
  width: 1,
@@ -3613,10 +3613,10 @@ var V = class extends E {
3613
3613
  super._destroy(), Pe && this.source instanceof ImageBitmap && this.source.close();
3614
3614
  }
3615
3615
  };
3616
- j([_({ fallback: "unknown" }), A("design:type", String)], V.prototype, "uploadMethodId", void 0), j([_({ internal: !0 }), A("design:type", Object)], V.prototype, "source", void 0), j([_({ fallback: 0 }), A("design:type", Number)], V.prototype, "width", void 0), j([_({ fallback: 0 }), A("design:type", Number)], V.prototype, "height", void 0), j([_({ fallback: 1 }), A("design:type", Number)], V.prototype, "pixelRatio", void 0), j([_({ fallback: "bgra8unorm" }), A("design:type", Object)], V.prototype, "format", void 0), j([_({ fallback: "premultiply-alpha-on-upload" }), A("design:type", Object)], V.prototype, "alphaMode", void 0), j([_({ fallback: 1 }), A("design:type", Number)], V.prototype, "mipLevelCount", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], V.prototype, "mipmap", void 0), j([_({ fallback: "clamp-to-edge" }), A("design:type", Object)], V.prototype, "addressModeU", void 0), j([_({ fallback: "clamp-to-edge" }), A("design:type", Object)], V.prototype, "addressModeV", void 0), j([_({ fallback: "clamp-to-edge" }), A("design:type", Object)], V.prototype, "addressModeW", void 0), j([_({ fallback: "linear" }), A("design:type", Object)], V.prototype, "magFilter", void 0), j([_({ fallback: "linear" }), A("design:type", Object)], V.prototype, "minFilter", void 0), j([_({ fallback: "linear" }), A("design:type", Object)], V.prototype, "mipmapFilter", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], V.prototype, "isPowerOfTwo", void 0);
3616
+ A([_({ fallback: "unknown" }), k("design:type", String)], B.prototype, "uploadMethodId", void 0), A([_({ internal: !0 }), k("design:type", Object)], B.prototype, "source", void 0), A([_({ fallback: 0 }), k("design:type", Number)], B.prototype, "width", void 0), A([_({ fallback: 0 }), k("design:type", Number)], B.prototype, "height", void 0), A([_({ fallback: 1 }), k("design:type", Number)], B.prototype, "pixelRatio", void 0), A([_({ fallback: "bgra8unorm" }), k("design:type", Object)], B.prototype, "format", void 0), A([_({ fallback: "premultiply-alpha-on-upload" }), k("design:type", Object)], B.prototype, "alphaMode", void 0), A([_({ fallback: 1 }), k("design:type", Number)], B.prototype, "mipLevelCount", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], B.prototype, "mipmap", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeU", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeV", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeW", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "magFilter", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "minFilter", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "mipmapFilter", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], B.prototype, "isPowerOfTwo", void 0);
3617
3617
  //#endregion
3618
3618
  //#region src/scene/resources/textures/AnimatedTexture.ts
3619
- var nr = class extends E {
3619
+ var rr = class extends E {
3620
3620
  frames;
3621
3621
  frameIndex = 0;
3622
3622
  get currentFrame() {
@@ -3626,7 +3626,7 @@ var nr = class extends E {
3626
3626
  super();
3627
3627
  let t;
3628
3628
  if (Array.isArray(e)) t = e;
3629
- else if (e instanceof V) t = [{
3629
+ else if (e instanceof B) t = [{
3630
3630
  texture: e,
3631
3631
  duration: 0
3632
3632
  }];
@@ -3641,7 +3641,7 @@ var nr = class extends E {
3641
3641
  e.texture.destroy();
3642
3642
  });
3643
3643
  }
3644
- }, rr = class extends V {
3644
+ }, ir = class extends B {
3645
3645
  constructor(e = {}) {
3646
3646
  super({
3647
3647
  pixelRatio: 2,
@@ -3661,14 +3661,14 @@ var nr = class extends E {
3661
3661
  }
3662
3662
  super._updateProperty(e, t, n);
3663
3663
  }
3664
- }, ir = class e extends V {
3664
+ }, ar = class e extends B {
3665
3665
  static _cached = /* @__PURE__ */ new Map();
3666
3666
  static get(t) {
3667
- let n = new D(t), r = n.toHex(), i = this._cached.get(r);
3667
+ let n = new bt(t), r = n.toHex(), i = this._cached.get(r);
3668
3668
  return i || (i = new e(n), this._cached.set(r, i)), i;
3669
3669
  }
3670
3670
  constructor(e) {
3671
- let t = e instanceof D ? e : new D(e);
3671
+ let t = e instanceof bt ? e : new bt(e);
3672
3672
  super({
3673
3673
  width: 1,
3674
3674
  height: 1,
@@ -3682,7 +3682,50 @@ var nr = class extends E {
3682
3682
  mipmap: !0
3683
3683
  });
3684
3684
  }
3685
- }, ar = class e extends V {
3685
+ }, V = 2048, or = 2, sr = class {
3686
+ superSample = 2;
3687
+ _pages = [];
3688
+ _slots = /* @__PURE__ */ new Map();
3689
+ _newPage() {
3690
+ let e = new ir({
3691
+ pixelRatio: 1,
3692
+ mipmap: !0
3693
+ });
3694
+ e.width = V, e.height = V;
3695
+ let t = e.source ?? w(V, V);
3696
+ t.width = V, t.height = V;
3697
+ let n = {
3698
+ texture: e,
3699
+ ctx: t.getContext("2d"),
3700
+ penX: or,
3701
+ penY: or,
3702
+ rowH: 0
3703
+ };
3704
+ return this._pages.push(n), n;
3705
+ }
3706
+ acquire(e, t, n, r) {
3707
+ let i = this._slots.get(e);
3708
+ if (i !== void 0) return i;
3709
+ let a = this.superSample, o = Math.ceil(t * a), s = Math.ceil(n * a), c = o + or * 2, l = s + or * 2;
3710
+ if (c > V || l > V) return this._slots.set(e, null), null;
3711
+ let u = this._pages[this._pages.length - 1] ?? this._newPage();
3712
+ u.penX + c > V && (u.penX = or, u.penY += u.rowH + or, u.rowH = 0), u.penY + l > V && (u = this._newPage());
3713
+ let d = u.penX + or, f = u.penY + or, p = u.ctx;
3714
+ p.save(), p.setTransform(a, 0, 0, a, d, f), p.beginPath(), r(p), p.restore(), u.texture.requestUpdate("source"), u.penX += c, u.rowH = Math.max(u.rowH, l);
3715
+ let m = {
3716
+ texture: u.texture,
3717
+ u0: d / V,
3718
+ v0: f / V,
3719
+ u1: (d + t * a) / V,
3720
+ v1: (f + n * a) / V
3721
+ };
3722
+ return this._slots.set(e, m), m;
3723
+ }
3724
+ clear() {
3725
+ for (let e of this._pages) e.texture.destroy();
3726
+ this._pages.length = 0, this._slots.clear();
3727
+ }
3728
+ }, cr = new sr(), lr = class e extends B {
3686
3729
  static test(e) {
3687
3730
  return u(e);
3688
3731
  }
@@ -3716,7 +3759,7 @@ var nr = class extends E {
3716
3759
  constructor(t, n, r) {
3717
3760
  super(e.linearGradient(t, n, r));
3718
3761
  }
3719
- }, or = class extends V {
3762
+ }, ur = class extends B {
3720
3763
  constructor(e = {}) {
3721
3764
  super({
3722
3765
  ...e,
@@ -3726,7 +3769,7 @@ var nr = class extends E {
3726
3769
  };
3727
3770
  //#endregion
3728
3771
  //#region src/scene/resources/textures/VideoTexture.ts
3729
- function sr(e) {
3772
+ function dr(e) {
3730
3773
  return {
3731
3774
  autoLoad: !!(e?.autoLoad ?? !0),
3732
3775
  autoPlay: !!(e?.autoPlay ?? !1),
@@ -3737,7 +3780,7 @@ function sr(e) {
3737
3780
  playsinline: !!(e?.playsinline ?? !0)
3738
3781
  };
3739
3782
  }
3740
- var cr = class e extends V {
3783
+ var fr = class e extends B {
3741
3784
  static mimeTypes = new Map(Object.entries({
3742
3785
  ogv: "video/ogg",
3743
3786
  mov: "video/quicktime",
@@ -3799,7 +3842,7 @@ var cr = class e extends V {
3799
3842
  _reject;
3800
3843
  _seekResolves = [];
3801
3844
  constructor(t, n) {
3802
- let r = sr(n);
3845
+ let r = dr(n);
3803
3846
  if (!Ze(t)) {
3804
3847
  typeof t == "string" && (t = [t]);
3805
3848
  let n = t[0].src || t[0];
@@ -3892,16 +3935,16 @@ var cr = class e extends V {
3892
3935
  e && (e.removeEventListener("play", this._onPlayStart), e.removeEventListener("pause", this._onPlayStop), e.removeEventListener("seeked", this._onSeeked), e.removeEventListener("canplay", this._onCanPlay), e.removeEventListener("canplaythrough", this._onCanPlay), e.removeEventListener("error", this._onError, !0), e.pause(), e.src = "", e.load());
3893
3936
  }
3894
3937
  };
3895
- j([_({
3938
+ A([_({
3896
3939
  internal: !0,
3897
3940
  fallback: !0
3898
- }), A("design:type", Boolean)], cr.prototype, "autoUpdate", void 0), j([_({
3941
+ }), k("design:type", Boolean)], fr.prototype, "autoUpdate", void 0), A([_({
3899
3942
  internal: !0,
3900
3943
  fallback: 0
3901
- }), A("design:type", Number)], cr.prototype, "fps", void 0);
3944
+ }), k("design:type", Number)], fr.prototype, "fps", void 0);
3902
3945
  //#endregion
3903
3946
  //#region src/scene/resources/textures/ViewportTexture.ts
3904
- var lr = class extends V {}, ur = class extends v {
3947
+ var pr = class extends B {}, mr = class extends v {
3905
3948
  fillStyle;
3906
3949
  fillRule;
3907
3950
  strokeStyle;
@@ -3915,7 +3958,7 @@ var lr = class extends V {}, ur = class extends v {
3915
3958
  _draws = [];
3916
3959
  _triCache = [];
3917
3960
  _parseDrawStyle(e) {
3918
- return e ? e instanceof V ? { texture: e } : { texture: ir.get(e) } : {};
3961
+ return e ? e instanceof B ? { texture: e } : { texture: ar.get(e) } : {};
3919
3962
  }
3920
3963
  stroke(e) {
3921
3964
  if (!this.curves.length) return;
@@ -4032,7 +4075,7 @@ var lr = class extends V {}, ur = class extends v {
4032
4075
  destroy() {
4033
4076
  this.reset(), this._triCache.length = 0;
4034
4077
  }
4035
- }, dr = class {
4078
+ }, hr = class {
4036
4079
  front = [];
4037
4080
  default = [];
4038
4081
  back = [];
@@ -4075,7 +4118,7 @@ var lr = class extends V {}, ur = class extends v {
4075
4118
  toJSON() {
4076
4119
  return [...this.default];
4077
4120
  }
4078
- }, fr = class extends T {
4121
+ }, gr = class extends T {
4079
4122
  parent;
4080
4123
  getPropertyDeclarations() {
4081
4124
  super.getPropertyDeclarations();
@@ -4094,22 +4137,22 @@ var lr = class extends V {}, ur = class extends v {
4094
4137
  deleteProperty: (e, t) => Reflect.has(e, t) || String(t).startsWith("_") ? Reflect.deleteProperty(e, t) : (e.setProperty(String(t), void 0), !0)
4095
4138
  });
4096
4139
  }
4097
- }, pr, mr = {};
4098
- function hr(e) {
4099
- let t = mr[e] ?? 0;
4100
- return t++, mr[e] = t, t;
4140
+ }, _r, vr = {};
4141
+ function yr(e) {
4142
+ let t = vr[e] ?? 0;
4143
+ return t++, vr[e] = t, t;
4101
4144
  }
4102
- var H = pr = class extends T {
4145
+ var H = _r = class extends T {
4103
4146
  static parse(e, t = "Node") {
4104
4147
  if (Array.isArray(e)) return e.map((e) => this.parse(e));
4105
- let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? pr)({
4148
+ let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? _r)({
4106
4149
  ...a,
4107
4150
  meta: r
4108
4151
  });
4109
4152
  return i?.forEach((e) => o.appendChild(this.parse(e))), o;
4110
4153
  }
4111
4154
  _mask;
4112
- _meta = new fr(this);
4155
+ _meta = new gr(this);
4113
4156
  get meta() {
4114
4157
  return this._meta;
4115
4158
  }
@@ -4132,7 +4175,7 @@ var H = pr = class extends T {
4132
4175
  }).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();
4133
4176
  }
4134
4177
  _defaultName() {
4135
- return `@${this.is}@${hr(this.is)}`;
4178
+ return `@${this.is}@${yr(this.is)}`;
4136
4179
  }
4137
4180
  setProperties(e) {
4138
4181
  if (e) {
@@ -4199,7 +4242,7 @@ var H = pr = class extends T {
4199
4242
  }
4200
4243
  return this;
4201
4244
  }
4202
- _children = new dr();
4245
+ _children = new hr();
4203
4246
  get children() {
4204
4247
  return this._children.default;
4205
4248
  }
@@ -4359,7 +4402,7 @@ var H = pr = class extends T {
4359
4402
  append(...e) {
4360
4403
  let t;
4361
4404
  t = Array.isArray(e[0]) ? e[0] : e, t.forEach((e) => {
4362
- e instanceof pr ? this.appendChild(e) : this.appendChild(pr.parse(e));
4405
+ e instanceof _r ? this.appendChild(e) : this.appendChild(_r.parse(e));
4363
4406
  });
4364
4407
  }
4365
4408
  before(...e) {
@@ -4462,10 +4505,10 @@ var H = pr = class extends T {
4462
4505
  });
4463
4506
  }
4464
4507
  };
4465
- j([_({ default: () => c() }), A("design:type", String)], H.prototype, "id", void 0), j([_({ default: () => c() }), A("design:type", String)], H.prototype, "name", void 0), j([_({ fallback: "inherit" }), A("design:type", Object)], H.prototype, "processMode", void 0), j([_({ fallback: "default" }), A("design:type", Object)], H.prototype, "processSortMode", void 0), j([_({ fallback: "inherit" }), A("design:type", Object)], H.prototype, "renderMode", void 0), j([_({ fallback: "inherit" }), A("design:type", Object)], H.prototype, "inputMode", void 0), j([_({ fallback: "default" }), A("design:type", Object)], H.prototype, "internalMode", void 0), j([_({
4508
+ A([_({ default: () => c() }), k("design:type", String)], H.prototype, "id", void 0), A([_({ default: () => c() }), k("design:type", String)], H.prototype, "name", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], H.prototype, "processMode", void 0), A([_({ fallback: "default" }), k("design:type", Object)], H.prototype, "processSortMode", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], H.prototype, "renderMode", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], H.prototype, "inputMode", void 0), A([_({ fallback: "default" }), k("design:type", Object)], H.prototype, "internalMode", void 0), A([_({
4466
4509
  internal: !0,
4467
4510
  default: !0
4468
- }), A("design:type", Boolean)], H.prototype, "needsRender", void 0), H = pr = j([S("Node"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], H);
4511
+ }), k("design:type", Boolean)], H.prototype, "needsRender", void 0), H = _r = A([S("Node"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], H);
4469
4512
  //#endregion
4470
4513
  //#region src/scene/main/TimelineNode.ts
4471
4514
  var U = class extends H {
@@ -4504,7 +4547,7 @@ var U = class extends H {
4504
4547
  return this._globalStartTime + this._globalDuration;
4505
4548
  }
4506
4549
  get currentTimeProgress() {
4507
- return this._duration ? O(this._currentTime / this._duration, 0, 1) : 0;
4550
+ return this._duration ? D(this._currentTime / this._duration, 0, 1) : 0;
4508
4551
  }
4509
4552
  isInsideTimeRange() {
4510
4553
  let e = this._currentTime;
@@ -4550,18 +4593,18 @@ var U = class extends H {
4550
4593
  super._process(e), this._updateCurrentTime();
4551
4594
  }
4552
4595
  };
4553
- j([_({ fallback: !1 }), A("design:type", Boolean)], U.prototype, "loop", void 0), j([_({ fallback: 0 }), A("design:type", Number)], U.prototype, "delay", void 0), j([_({ fallback: 0 }), A("design:type", Number)], U.prototype, "duration", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], U.prototype, "paused", void 0), U = j([S("TimelineNode"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], U);
4596
+ A([_({ fallback: !1 }), k("design:type", Boolean)], U.prototype, "loop", void 0), A([_({ fallback: 0 }), k("design:type", Number)], U.prototype, "delay", void 0), A([_({ fallback: 0 }), k("design:type", Number)], U.prototype, "duration", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], U.prototype, "paused", void 0), U = A([S("TimelineNode"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], U);
4554
4597
  //#endregion
4555
4598
  //#region src/scene/main/CanvasItem.ts
4556
- var gr = [], _r = 0;
4557
- function vr() {
4558
- _r = 0;
4599
+ var br = [], xr = 0;
4600
+ function Sr() {
4601
+ xr = 0;
4559
4602
  }
4560
- function yr(e, t, n, r) {
4561
- let i = gr[_r];
4562
- return i || (i = {}, gr[_r] = i), _r++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4603
+ function Cr(e, t, n, r) {
4604
+ let i = br[xr];
4605
+ return i || (i = {}, br[xr] = i), xr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4563
4606
  }
4564
- var br = class extends U {
4607
+ var wr = class extends U {
4565
4608
  _blendMode;
4566
4609
  _parentGlobalVisible;
4567
4610
  _globalVisible;
@@ -4579,7 +4622,7 @@ var br = class extends U {
4579
4622
  255,
4580
4623
  255
4581
4624
  ];
4582
- context = new ur();
4625
+ context = new mr();
4583
4626
  _resetContext = !0;
4584
4627
  needsDraw = !0;
4585
4628
  needsLayout = !1;
@@ -4641,7 +4684,7 @@ var br = class extends U {
4641
4684
  }
4642
4685
  _updateGlobalOpacity() {
4643
4686
  this._parentGlobalOpacity = this.getParent()?.opacity;
4644
- let e = O(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4687
+ let e = D(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4645
4688
  this._globalOpacity !== e && (this._globalOpacity = e, this._updateModulate(), this.requestPaint(), this.updateRenderable());
4646
4689
  }
4647
4690
  _draw() {
@@ -4710,7 +4753,7 @@ var br = class extends U {
4710
4753
  return;
4711
4754
  }
4712
4755
  let t = this._tree?.pixelate, n = this._tree?.roundPixels, r = this._batchables;
4713
- for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof lr && (a = this._handleViewportTexture(i)), e.batch2D.render(yr(i, n, t ? i.size : void 0, a));
4756
+ for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof pr && (a = this._handleViewportTexture(i)), e.batch2D.render(Cr(i, n, t ? i.size : void 0, a));
4714
4757
  super._render(e);
4715
4758
  }
4716
4759
  _cullsRender() {
@@ -4720,19 +4763,19 @@ var br = class extends U {
4720
4763
  super._destroy(), this.context.destroy(), this._drawBatchables = [], this._layoutBatchables = [], this._batchables = [];
4721
4764
  }
4722
4765
  };
4723
- j([_(), A("design:type", Object)], br.prototype, "blendMode", void 0), j([_({
4766
+ A([_(), k("design:type", Object)], wr.prototype, "blendMode", void 0), A([_({
4724
4767
  internal: !0,
4725
4768
  fallback: !0
4726
- }), A("design:type", Boolean)], br.prototype, "visible", void 0), j([_({
4769
+ }), k("design:type", Boolean)], wr.prototype, "visible", void 0), A([_({
4727
4770
  internal: !0,
4728
4771
  fallback: 1
4729
- }), A("design:type", Number)], br.prototype, "opacity", void 0), br = j([S("CanvasItem"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], br);
4772
+ }), k("design:type", Number)], wr.prototype, "opacity", void 0), wr = A([S("CanvasItem"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
4730
4773
  //#endregion
4731
4774
  //#region src/scene/main/Viewport.ts
4732
4775
  var W = class extends H {
4733
4776
  canvasTransform = new b();
4734
4777
  renderTargetIndex = 0;
4735
- renderTargets = [new B(), new B()];
4778
+ renderTargets = [new z(), new z()];
4736
4779
  get valid() {
4737
4780
  return !!(this.width && this.height);
4738
4781
  }
@@ -4779,7 +4822,7 @@ var W = class extends H {
4779
4822
  return !1;
4780
4823
  }
4781
4824
  activateWithCopy(e, t) {
4782
- this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), z.draw(e, er.instance, { sampler: 0 }));
4825
+ this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), R.draw(e, tr.instance, { sampler: 0 }));
4783
4826
  }
4784
4827
  renderStart(e, t) {
4785
4828
  this.activate(e, t) && e.clear();
@@ -4804,7 +4847,7 @@ var W = class extends H {
4804
4847
  super._destroy(), this.canvasTransform.destroy(), this.renderTargets.forEach((e) => e.destroy());
4805
4848
  }
4806
4849
  };
4807
- j([_({ fallback: 0 }), A("design:type", Number)], W.prototype, "x", void 0), j([_({ fallback: 0 }), A("design:type", Number)], W.prototype, "y", void 0), j([_({ fallback: 0 }), A("design:type", Number)], W.prototype, "width", void 0), j([_({ fallback: 0 }), A("design:type", Number)], W.prototype, "height", void 0), j([_({ fallback: 0 }), A("design:type", Number)], W.prototype, "mipLevel", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], W.prototype, "msaa", void 0), W = j([S("Viewport")], W);
4850
+ A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "x", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "y", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "width", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "height", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "mipLevel", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], W.prototype, "msaa", void 0), W = A([S("Viewport")], W);
4808
4851
  //#endregion
4809
4852
  //#region src/scene/main/Effect.ts
4810
4853
  var G = class extends U {
@@ -4830,7 +4873,7 @@ var G = class extends U {
4830
4873
  _updateProperty(e, t, n) {
4831
4874
  switch (super._updateProperty(e, t, n), e) {
4832
4875
  case "glsl": {
4833
- let e = new $n(t);
4876
+ let e = new er(t);
4834
4877
  !this.effectMode && e.has.transition && (this.effectMode = "transition"), this.material = e;
4835
4878
  break;
4836
4879
  }
@@ -5018,13 +5061,13 @@ var G = class extends U {
5018
5061
  }
5019
5062
  apply(e, t, n) {
5020
5063
  this.material && (n?.redraw ? t.redraw(e, () => {
5021
- z.draw(e, this.material, {
5064
+ R.draw(e, this.material, {
5022
5065
  from: 0,
5023
5066
  to: 1,
5024
5067
  progress: this.currentTimeProgress,
5025
5068
  ratio: t.width / t.height
5026
5069
  });
5027
- }) : z.draw(e, this.material, {
5070
+ }) : R.draw(e, this.material, {
5028
5071
  from: 0,
5029
5072
  to: 1,
5030
5073
  progress: this.currentTimeProgress,
@@ -5035,10 +5078,10 @@ var G = class extends U {
5035
5078
  super._destroy(), this.viewport1.destroy(), this.viewport2.destroy();
5036
5079
  }
5037
5080
  };
5038
- j([_({ internal: !0 }), A("design:type", Object)], G.prototype, "material", void 0), j([_(), A("design:type", Object)], G.prototype, "effectMode", void 0), j([_(), A("design:type", String)], G.prototype, "glsl", void 0), j([_(), A("design:type", String)], G.prototype, "glslSrc", void 0), G = j([S("Effect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5081
+ A([_({ internal: !0 }), k("design:type", Object)], G.prototype, "material", void 0), A([_(), k("design:type", Object)], G.prototype, "effectMode", void 0), A([_(), k("design:type", String)], G.prototype, "glsl", void 0), A([_(), k("design:type", String)], G.prototype, "glslSrc", void 0), G = A([S("Effect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5039
5082
  //#endregion
5040
5083
  //#region src/scene/main/RenderStack.ts
5041
- var xr = class {
5084
+ var Tr = class {
5042
5085
  currentCall;
5043
5086
  calls = [];
5044
5087
  createCall(e) {
@@ -5063,7 +5106,7 @@ var xr = class {
5063
5106
  });
5064
5107
  }), this.reset();
5065
5108
  }
5066
- }, Sr, Cr = Sr = class extends H {
5109
+ }, Er, Dr = Er = class extends H {
5067
5110
  currentTime = 0;
5068
5111
  playing = !1;
5069
5112
  playbackRate = 1;
@@ -5084,7 +5127,7 @@ var xr = class {
5084
5127
  }
5085
5128
  static from(e, t = !1) {
5086
5129
  let [n, r] = e ? Array.isArray(e) ? e : [0, e] : [];
5087
- return new Sr({
5130
+ return new Er({
5088
5131
  startTime: n,
5089
5132
  endTime: r,
5090
5133
  loop: t
@@ -5102,7 +5145,7 @@ var xr = class {
5102
5145
  }
5103
5146
  addTime(e) {
5104
5147
  let t = this.endTime, n = Math.min(this.startTime, this.endTime), r = t - n, i = this.currentTime + e;
5105
- return this.loop && r > 0 && i > t && (i = n + (i - n) % r), i = O(i, n, t), this.currentTime = i, this.emit("updateCurrentTime", i, e), this;
5148
+ return this.loop && r > 0 && i > t && (i = n + (i - n) % r), i = D(i, n, t), this.currentTime = i, this.emit("updateCurrentTime", i, e), this;
5106
5149
  }
5107
5150
  play(e) {
5108
5151
  return e?.rate !== void 0 && (this._rate = e.rate), e?.loopMode !== void 0 && (this.loopMode = e.loopMode), this._direction = 1, (!Number.isFinite(this.currentTime) || this.currentTime >= this.endTime) && (this.currentTime = Math.min(this.startTime, this.endTime)), this.playing = !0, this.playbackRate = this._rate * this._direction, this;
@@ -5130,10 +5173,10 @@ var xr = class {
5130
5173
  super._process(e), this.paused || this.addTime(e);
5131
5174
  }
5132
5175
  };
5133
- j([_({ fallback: 0 }), A("design:type", Number)], Cr.prototype, "startTime", void 0), j([_({ fallback: 2 ** 53 - 1 }), A("design:type", Number)], Cr.prototype, "endTime", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], Cr.prototype, "loop", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], Cr.prototype, "paused", void 0), Cr = Sr = j([S("Timeline"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Cr);
5176
+ A([_({ fallback: 0 }), k("design:type", Number)], Dr.prototype, "startTime", void 0), A([_({ fallback: 2 ** 53 - 1 }), k("design:type", Number)], Dr.prototype, "endTime", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Dr.prototype, "loop", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Dr.prototype, "paused", void 0), Dr = Er = A([S("Timeline"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Dr);
5134
5177
  //#endregion
5135
5178
  //#region src/scene/main/Window.ts
5136
- var wr = class extends W {
5179
+ var Or = class extends W {
5137
5180
  constructor() {
5138
5181
  super(), this.renderTargets.forEach((e) => e.isRoot = !0);
5139
5182
  }
@@ -5144,23 +5187,23 @@ var wr = class extends W {
5144
5187
  super.flush(e), this.finish(e);
5145
5188
  }
5146
5189
  };
5147
- wr = j([S("Window", {
5190
+ Or = A([S("Window", {
5148
5191
  processMode: "always",
5149
5192
  renderMode: "always"
5150
- }), A("design:paramtypes", [])], wr);
5193
+ }), k("design:paramtypes", [])], Or);
5151
5194
  //#endregion
5152
5195
  //#region src/scene/main/SceneTree.ts
5153
- var Tr = class extends Tt {
5196
+ var kr = class extends Et {
5154
5197
  input = new _t();
5155
- renderStack = new xr();
5156
- root = new wr().setTree(this);
5157
- timeline = new Cr().setTree(this);
5198
+ renderStack = new Tr();
5199
+ root = new Or().setTree(this);
5200
+ timeline = new Dr().setTree(this);
5158
5201
  imagePipelineResolver;
5159
5202
  nodeMap = /* @__PURE__ */ new Map();
5160
5203
  _boundFonts;
5161
5204
  _textRemeasureScheduled = !1;
5162
5205
  _onFontLoad = () => this._scheduleTextRemeasure();
5163
- _backgroundColor = new D();
5206
+ _backgroundColor = new bt();
5164
5207
  _previousViewport;
5165
5208
  _currentViewport;
5166
5209
  getPreviousViewport() {
@@ -5213,41 +5256,41 @@ var Tr = class extends Tt {
5213
5256
  this.renderStack.reset(), this.timeline.emit("process", e), this.emit("processing"), this.root.emit("process", e), this.emit("processed");
5214
5257
  }
5215
5258
  _render(e) {
5216
- this.emit("rendering"), vr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5259
+ this.emit("rendering"), Sr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5217
5260
  }
5218
5261
  _renderScreen(e) {
5219
5262
  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);
5220
5263
  let t = this.root.texture;
5221
- t.activate(e, 0), z.draw(e), t.inactivate(e);
5264
+ t.activate(e, 0), R.draw(e), t.inactivate(e);
5222
5265
  }
5223
5266
  _destroy() {
5224
5267
  super._destroy(), this._bindFonts(void 0), this.root.destroy(), this.input.destroy(), this.nodeMap.clear();
5225
5268
  }
5226
5269
  };
5227
- j([_({ alias: "root.msaa" }), A("design:type", Boolean)], Tr.prototype, "msaa", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], Tr.prototype, "pixelate", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], Tr.prototype, "roundPixels", void 0), j([_(), A("design:type", Object)], Tr.prototype, "backgroundColor", void 0), j([_({
5270
+ A([_({ alias: "root.msaa" }), k("design:type", Boolean)], kr.prototype, "msaa", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], kr.prototype, "pixelate", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], kr.prototype, "roundPixels", void 0), A([_(), k("design:type", Object)], kr.prototype, "backgroundColor", void 0), A([_({
5228
5271
  internal: !0,
5229
5272
  fallback: !1
5230
- }), A("design:type", Boolean)], Tr.prototype, "debug", void 0), j([_({
5273
+ }), k("design:type", Boolean)], kr.prototype, "debug", void 0), A([_({
5231
5274
  internal: !0,
5232
5275
  fallback: !1
5233
- }), A("design:type", Boolean)], Tr.prototype, "processPaused", void 0), j([_({
5276
+ }), k("design:type", Boolean)], kr.prototype, "processPaused", void 0), A([_({
5234
5277
  internal: !0,
5235
5278
  default: () => he
5236
- }), A("design:type", Object)], Tr.prototype, "fonts", void 0);
5279
+ }), k("design:type", Object)], kr.prototype, "fonts", void 0);
5237
5280
  //#endregion
5238
5281
  //#region src/scene/main/Transition.ts
5239
- var Er = class extends G {
5282
+ var Ar = class extends G {
5240
5283
  constructor(e, t = []) {
5241
5284
  super(), this.setProperties(e).append(t);
5242
5285
  }
5243
5286
  };
5244
- Er = j([S("Transition", {
5287
+ Ar = A([S("Transition", {
5245
5288
  effectMode: "transition",
5246
5289
  duration: 2e3
5247
- }), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Er);
5290
+ }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ar);
5248
5291
  //#endregion
5249
5292
  //#region src/scene/2d/Node2D.ts
5250
- var Dr = class extends br {
5293
+ var jr = class extends wr {
5251
5294
  rotation = 0;
5252
5295
  position = new x(0, 0, () => this.updateGlobalTransform());
5253
5296
  scale = new x(1, 1, () => this.updateGlobalTransform());
@@ -5299,10 +5342,10 @@ var Dr = class extends br {
5299
5342
  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();
5300
5343
  }
5301
5344
  };
5302
- Dr = j([S("Node2D"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Dr);
5345
+ jr = A([S("Node2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], jr);
5303
5346
  //#endregion
5304
5347
  //#region src/scene/2d/Camera2D.ts
5305
- var Or = class extends Dr {
5348
+ var Mr = class extends jr {
5306
5349
  canvasTransform = new b();
5307
5350
  _screenOffset = {
5308
5351
  x: 0,
@@ -5343,7 +5386,7 @@ var Or = class extends Dr {
5343
5386
  return this.setZoom(this._zoom.x + e, this._zoom.y + t);
5344
5387
  }
5345
5388
  setZoom(e, t = e) {
5346
- return this._zoom.set(O(e, this._minZoom.x, this._maxZoom.x), O(t, this._minZoom.y, this._maxZoom.y)), this;
5389
+ return this._zoom.set(D(e, this._minZoom.x, this._maxZoom.x), D(t, this._minZoom.y, this._maxZoom.y)), this;
5347
5390
  }
5348
5391
  setZoomAtOrigin(e, t, n) {
5349
5392
  let r;
@@ -5446,19 +5489,19 @@ var Or = class extends Dr {
5446
5489
  };
5447
5490
  }
5448
5491
  };
5449
- j([_({
5492
+ A([_({
5450
5493
  internal: !0,
5451
5494
  fallback: !1
5452
- }), A("design:type", Boolean)], Or.prototype, "spaceKey", void 0), j([_({
5495
+ }), k("design:type", Boolean)], Mr.prototype, "spaceKey", void 0), A([_({
5453
5496
  internal: !0,
5454
5497
  fallback: !1
5455
- }), A("design:type", Boolean)], Or.prototype, "grabbing", void 0), Or = j([S("Camera2D", {
5498
+ }), k("design:type", Boolean)], Mr.prototype, "grabbing", void 0), Mr = A([S("Camera2D", {
5456
5499
  processMode: "disabled",
5457
5500
  renderMode: "disabled"
5458
- }), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Or);
5501
+ }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Mr);
5459
5502
  //#endregion
5460
5503
  //#region src/scene/2d/element/connectionRouter.ts
5461
- function kr(e, t) {
5504
+ function Nr(e, t) {
5462
5505
  return Math.abs(e) >= Math.abs(t) ? {
5463
5506
  x: Math.sign(e) || 1,
5464
5507
  y: 0
@@ -5467,11 +5510,11 @@ function kr(e, t) {
5467
5510
  y: Math.sign(t) || 1
5468
5511
  };
5469
5512
  }
5470
- function Ar(e, t, n, r = {}) {
5513
+ function Pr(e, t, n, r = {}) {
5471
5514
  let i = t.point, a = n.point, o = new v();
5472
5515
  switch (e) {
5473
5516
  case "curved": {
5474
- let e = t.dir ?? kr(a.x - i.x, a.y - i.y), s = n.dir ?? kr(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;
5517
+ let e = t.dir ?? Nr(a.x - i.x, a.y - i.y), s = n.dir ?? Nr(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;
5475
5518
  for (let e = 0; e <= 32; e++) {
5476
5519
  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;
5477
5520
  e === 0 ? o.moveTo(u, d) : o.lineTo(u, d);
@@ -5479,7 +5522,7 @@ function Ar(e, t, n, r = {}) {
5479
5522
  break;
5480
5523
  }
5481
5524
  case "orthogonal": {
5482
- let e = Mr(t, n, r);
5525
+ let e = Ir(t, n, r);
5483
5526
  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);
5484
5527
  break;
5485
5528
  }
@@ -5489,11 +5532,11 @@ function Ar(e, t, n, r = {}) {
5489
5532
  }
5490
5533
  return o;
5491
5534
  }
5492
- function jr(e) {
5493
- return kr(e.x, e.y);
5535
+ function Fr(e) {
5536
+ return Nr(e.x, e.y);
5494
5537
  }
5495
- function Mr(e, t, n) {
5496
- let r = e.point, i = t.point, a = n.stub ?? 16, o = jr(e.dir ?? kr(i.x - r.x, i.y - r.y)), s = jr(t.dir ?? kr(r.x - i.x, r.y - i.y)), c = {
5538
+ function Ir(e, t, n) {
5539
+ let r = e.point, i = t.point, a = n.stub ?? 16, o = Fr(e.dir ?? Nr(i.x - r.x, i.y - r.y)), s = Fr(t.dir ?? Nr(r.x - i.x, r.y - i.y)), c = {
5497
5540
  x: r.x + o.x * a,
5498
5541
  y: r.y + o.y * a
5499
5542
  }, l = {
@@ -5505,12 +5548,12 @@ function Mr(e, t, n) {
5505
5548
  x: r.x,
5506
5549
  y: r.y
5507
5550
  }, c];
5508
- return d.push(...Pr(c, o, l, s, a, u)), d.push(l, {
5551
+ return d.push(...Rr(c, o, l, s, a, u)), d.push(l, {
5509
5552
  x: i.x,
5510
5553
  y: i.y
5511
- }), Fr(d);
5554
+ }), zr(d);
5512
5555
  }
5513
- function Nr(e, t, n, r, i) {
5556
+ function Lr(e, t, n, r, i) {
5514
5557
  let a = Infinity, o = -Infinity, s = t === "y" ? "x" : "y";
5515
5558
  for (let e of r) {
5516
5559
  let r = e.min[s], i = r + e.size[s];
@@ -5521,7 +5564,7 @@ function Nr(e, t, n, r, i) {
5521
5564
  }
5522
5565
  return e > a && e < o ? a - i : e;
5523
5566
  }
5524
- function Pr(e, t, n, r, i, a = []) {
5567
+ function Rr(e, t, n, r, i, a = []) {
5525
5568
  let o = t.y === 0;
5526
5569
  if (o === (r.y === 0)) {
5527
5570
  if (o) {
@@ -5536,7 +5579,7 @@ function Pr(e, t, n, r, i, a = []) {
5536
5579
  }];
5537
5580
  }
5538
5581
  let o = Math.abs(e.y - n.y) < .001 ? e.y + i : (e.y + n.y) / 2;
5539
- return o = Nr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5582
+ return o = Lr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5540
5583
  x: e.x,
5541
5584
  y: o
5542
5585
  }, {
@@ -5555,7 +5598,7 @@ function Pr(e, t, n, r, i, a = []) {
5555
5598
  }];
5556
5599
  }
5557
5600
  let s = Math.abs(e.x - n.x) < .001 ? e.x + i : (e.x + n.x) / 2;
5558
- return s = Nr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5601
+ return s = Lr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5559
5602
  x: s,
5560
5603
  y: e.y
5561
5604
  }, {
@@ -5582,7 +5625,7 @@ function Pr(e, t, n, r, i, a = []) {
5582
5625
  y: l.y
5583
5626
  }];
5584
5627
  }
5585
- function Fr(e) {
5628
+ function zr(e) {
5586
5629
  let t = [];
5587
5630
  for (let n = 0; n < e.length; n++) {
5588
5631
  let r = e[n], i = t[t.length - 1];
@@ -5592,7 +5635,7 @@ function Fr(e) {
5592
5635
  }
5593
5636
  //#endregion
5594
5637
  //#region src/css/parseCssFilter.ts
5595
- var Ir = {
5638
+ var Br = {
5596
5639
  brightness: 1,
5597
5640
  contrast: 1,
5598
5641
  grayscale: 0,
@@ -5602,12 +5645,12 @@ var Ir = {
5602
5645
  saturate: 1,
5603
5646
  sepia: 0
5604
5647
  };
5605
- function Lr(e) {
5606
- let t = new St();
5648
+ function Vr(e) {
5649
+ let t = new Ct();
5607
5650
  if (e === "none") return t;
5608
5651
  let n = Ae(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5609
- Object.keys(Ir).forEach((e) => {
5610
- n[e] = n[e] ?? Ir[e];
5652
+ Object.keys(Br).forEach((e) => {
5653
+ n[e] = n[e] ?? Br[e];
5611
5654
  });
5612
5655
  for (let e in n) {
5613
5656
  let r = n[e];
@@ -5642,7 +5685,7 @@ function Lr(e) {
5642
5685
  }
5643
5686
  //#endregion
5644
5687
  //#region src/css/parseCssTransformOrigin.ts
5645
- function Rr(e) {
5688
+ function Hr(e) {
5646
5689
  let [t, n = t] = e.split(" ");
5647
5690
  return [t, n].map((e) => {
5648
5691
  switch (e = e.trim(), e) {
@@ -5657,11 +5700,11 @@ function Rr(e) {
5657
5700
  }
5658
5701
  //#endregion
5659
5702
  //#region src/scene/effects/ColorAdjustEffect.ts
5660
- var zr, K = class extends G {
5703
+ var Ur, K = class extends G {
5661
5704
  static {
5662
- zr = this;
5705
+ Ur = this;
5663
5706
  }
5664
- static material = new R({ gl: {
5707
+ static material = new L({ gl: {
5665
5708
  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}",
5666
5709
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void) {\n vec4 c = texture2D(sampler, vUv);\n if (c.a > 0.0) {\n c.rgb /= c.a;\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n c.rgb *= c.a;\n }\n gl_FragColor = c * alpha;\n}"
5667
5710
  } });
@@ -5670,7 +5713,7 @@ var zr, K = class extends G {
5670
5713
  }
5671
5714
  apply(e, t) {
5672
5715
  t.redraw(e, () => {
5673
- z.draw(e, zr.material, {
5716
+ R.draw(e, Ur.material, {
5674
5717
  sampler: 0,
5675
5718
  saturation: this.saturation,
5676
5719
  contrast: this.contrast,
@@ -5684,18 +5727,18 @@ var zr, K = class extends G {
5684
5727
  });
5685
5728
  }
5686
5729
  };
5687
- j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "saturation", void 0), j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "contrast", void 0), j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "brightness", void 0), j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "red", void 0), j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "green", void 0), j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "blue", void 0), j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "alpha", void 0), j([_({ fallback: 1 }), A("design:type", Number)], K.prototype, "gamma", void 0), K = zr = j([S("ColorAdjustEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
5730
+ A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "saturation", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "contrast", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "brightness", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "red", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "green", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "blue", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "alpha", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "gamma", void 0), K = Ur = A([S("ColorAdjustEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
5688
5731
  //#endregion
5689
5732
  //#region src/scene/effects/ColorFilterEffect.ts
5690
- var Br, Vr = class extends G {
5733
+ var Wr, Gr = class extends G {
5691
5734
  static {
5692
- Br = this;
5735
+ Wr = this;
5693
5736
  }
5694
- static material = new R({ gl: {
5737
+ static material = new L({ gl: {
5695
5738
  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}",
5696
5739
  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}"
5697
5740
  } });
5698
- _colorMatrix = new St();
5741
+ _colorMatrix = new Ct();
5699
5742
  constructor(e, t = []) {
5700
5743
  super(), this.setProperties(e).append(t);
5701
5744
  }
@@ -5739,25 +5782,25 @@ var Br, Vr = class extends G {
5739
5782
  break;
5740
5783
  }
5741
5784
  }), t.redraw(e, () => {
5742
- z.draw(e, Br.material, {
5785
+ R.draw(e, Wr.material, {
5743
5786
  sampler: 0,
5744
5787
  m: r.toArray()
5745
5788
  });
5746
5789
  });
5747
5790
  }
5748
5791
  };
5749
- j([_(), A("design:type", String)], Vr.prototype, "filter", void 0), Vr = Br = j([S("ColorFilterEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Vr);
5792
+ A([_(), k("design:type", String)], Gr.prototype, "filter", void 0), Gr = Wr = A([S("ColorFilterEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Gr);
5750
5793
  //#endregion
5751
5794
  //#region src/scene/effects/ColorOverlayEffect.ts
5752
- var Hr, Ur = 50, Wr = class extends G {
5795
+ var Kr, qr = 50, Jr = class extends G {
5753
5796
  static {
5754
- Hr = this;
5797
+ Kr = this;
5755
5798
  }
5756
- static material = new R({ gl: {
5799
+ static material = new L({ gl: {
5757
5800
  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}",
5758
5801
  fragment: `precision mediump float;
5759
5802
  uniform sampler2D sampler;
5760
- uniform vec4 colors[${Ur}];
5803
+ uniform vec4 colors[${qr}];
5761
5804
  varying vec2 vUv;
5762
5805
 
5763
5806
  float calcWidth() {
@@ -5766,7 +5809,7 @@ float calcWidth() {
5766
5809
 
5767
5810
  int calcCount() {
5768
5811
  int count = 0;
5769
- for (int i = 0; i < ${Ur}; i++) {
5812
+ for (int i = 0; i < ${qr}; i++) {
5770
5813
  if (colors[i] != vec4(0,0,0,0)){
5771
5814
  count++;
5772
5815
  }
@@ -5778,7 +5821,7 @@ vec4 calcColor(float x) {
5778
5821
  float perUnit = calcWidth() / float(calcCount());
5779
5822
  int index = int(x / perUnit);
5780
5823
 
5781
- for(int i=0; i<${Ur}; i++){
5824
+ for(int i=0; i<${qr}; i++){
5782
5825
  if(i==index){
5783
5826
  return colors[i];
5784
5827
  }
@@ -5793,7 +5836,7 @@ void main(void) {
5793
5836
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
5794
5837
  }`
5795
5838
  } });
5796
- _color = new D();
5839
+ _color = new bt();
5797
5840
  constructor(e, t = []) {
5798
5841
  super(), this.setProperties(e).append(t);
5799
5842
  }
@@ -5804,31 +5847,31 @@ void main(void) {
5804
5847
  let t = this._color.toArray();
5805
5848
  return t[3] = this.alpha, t;
5806
5849
  });
5807
- for (; t.length < Ur;) t.push([
5850
+ for (; t.length < qr;) t.push([
5808
5851
  0,
5809
5852
  0,
5810
5853
  0,
5811
5854
  0
5812
5855
  ]);
5813
- z.draw(e, Hr.material, {
5856
+ R.draw(e, Kr.material, {
5814
5857
  sampler: 0,
5815
- colors: t.slice(0, Ur).flatMap((e) => e)
5858
+ colors: t.slice(0, qr).flatMap((e) => e)
5816
5859
  });
5817
5860
  });
5818
5861
  }
5819
5862
  };
5820
- j([_({ default: () => [] }), A("design:type", Array)], Wr.prototype, "colors", void 0), j([_({ fallback: .5 }), A("design:type", Number)], Wr.prototype, "alpha", void 0), Wr = Hr = j([S("ColorOverlayEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Wr);
5863
+ A([_({ default: () => [] }), k("design:type", Array)], Jr.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Jr.prototype, "alpha", void 0), Jr = Kr = A([S("ColorOverlayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Jr);
5821
5864
  //#endregion
5822
5865
  //#region src/scene/effects/ColorRemoveEffect.ts
5823
- var Gr, Kr = class extends G {
5866
+ var Yr, Xr = class extends G {
5824
5867
  static {
5825
- Gr = this;
5868
+ Yr = this;
5826
5869
  }
5827
- static material = new R({ gl: {
5870
+ static material = new L({ gl: {
5828
5871
  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}",
5829
5872
  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}"
5830
5873
  } });
5831
- _color = new D();
5874
+ _color = new bt();
5832
5875
  constructor(e, t = []) {
5833
5876
  super(), this.setProperties(e).append(t);
5834
5877
  }
@@ -5842,7 +5885,7 @@ var Gr, Kr = class extends G {
5842
5885
  r.slice(0, 50).forEach((e, t) => {
5843
5886
  n[t * 3] = e[0], n[t * 3 + 1] = e[1], n[t * 3 + 2] = e[2];
5844
5887
  }), t.redraw(e, () => {
5845
- z.draw(e, Gr.material, {
5888
+ R.draw(e, Yr.material, {
5846
5889
  sampler: 0,
5847
5890
  epsilon: this.epsilon,
5848
5891
  originalColors: n
@@ -5850,19 +5893,19 @@ var Gr, Kr = class extends G {
5850
5893
  });
5851
5894
  }
5852
5895
  };
5853
- j([_({ default: () => [] }), A("design:type", Array)], Kr.prototype, "colors", void 0), j([_({ fallback: .5 }), A("design:type", Number)], Kr.prototype, "epsilon", void 0), Kr = Gr = j([S("ColorRemoveEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Kr);
5896
+ A([_({ default: () => [] }), k("design:type", Array)], Xr.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Xr.prototype, "epsilon", void 0), Xr = Yr = A([S("ColorRemoveEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Xr);
5854
5897
  //#endregion
5855
5898
  //#region src/scene/effects/ColorReplaceEffect.ts
5856
- var qr, Jr = 50, Yr = class extends G {
5899
+ var Zr, Qr = 50, $r = class extends G {
5857
5900
  static {
5858
- qr = this;
5901
+ Zr = this;
5859
5902
  }
5860
- static material = new R({ gl: {
5903
+ static material = new L({ gl: {
5861
5904
  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}",
5862
5905
  fragment: `varying vec2 vUv;
5863
5906
  uniform sampler2D sampler;
5864
5907
  uniform float epsilon;
5865
- const int MAX_COLORS = ${Jr};
5908
+ const int MAX_COLORS = ${Qr};
5866
5909
  uniform vec3 originalColors[MAX_COLORS];
5867
5910
  uniform vec3 targetColors[MAX_COLORS];
5868
5911
 
@@ -5890,7 +5933,7 @@ void main(void) {
5890
5933
  }
5891
5934
  }`
5892
5935
  } });
5893
- _color = new D();
5936
+ _color = new bt();
5894
5937
  constructor(e, t = []) {
5895
5938
  super(), this.setProperties(e).append(t);
5896
5939
  }
@@ -5899,8 +5942,8 @@ void main(void) {
5899
5942
  this._color.value = e[0];
5900
5943
  let t = this._color.toArray().slice(0, 3);
5901
5944
  return this._color.value = e[1], [t, this._color.toArray().slice(0, 3)];
5902
- }), r = this.epsilon, i = new Float32Array(Jr * 3), a = new Float32Array(Jr * 3);
5903
- for (; n.length < Jr;) n.push([[
5945
+ }), r = this.epsilon, i = new Float32Array(Qr * 3), a = new Float32Array(Qr * 3);
5946
+ for (; n.length < Qr;) n.push([[
5904
5947
  -1,
5905
5948
  0,
5906
5949
  0
@@ -5910,10 +5953,10 @@ void main(void) {
5910
5953
  0,
5911
5954
  1
5912
5955
  ]]);
5913
- n.slice(0, Jr).forEach(([e, t], n) => {
5956
+ n.slice(0, Qr).forEach(([e, t], n) => {
5914
5957
  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];
5915
5958
  }), t.redraw(e, () => {
5916
- z.draw(e, qr.material, {
5959
+ R.draw(e, Zr.material, {
5917
5960
  sampler: 0,
5918
5961
  epsilon: r,
5919
5962
  originalColors: i,
@@ -5922,17 +5965,17 @@ void main(void) {
5922
5965
  });
5923
5966
  }
5924
5967
  };
5925
- j([_({ default: () => [] }), A("design:type", Array)], Yr.prototype, "colors", void 0), j([_({ fallback: .05 }), A("design:type", Number)], Yr.prototype, "epsilon", void 0), Yr = qr = j([S("ColorReplaceEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Yr);
5968
+ A([_({ default: () => [] }), k("design:type", Array)], $r.prototype, "colors", void 0), A([_({ fallback: .05 }), k("design:type", Number)], $r.prototype, "epsilon", void 0), $r = Zr = A([S("ColorReplaceEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], $r);
5926
5969
  //#endregion
5927
5970
  //#region src/scene/effects/DrawboardEffect.frag?raw
5928
- var Xr = "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", Zr, q = class extends G {
5971
+ var ei = "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", ti, q = class extends G {
5929
5972
  static {
5930
- Zr = this;
5973
+ ti = this;
5931
5974
  }
5932
5975
  _watermark;
5933
- static material = new R({ gl: {
5976
+ static material = new L({ gl: {
5934
5977
  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}",
5935
- fragment: Xr
5978
+ fragment: ei
5936
5979
  } });
5937
5980
  constructor(e, t = []) {
5938
5981
  super(), this.setProperties(e).append(t);
@@ -5981,7 +6024,7 @@ var Xr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5981
6024
  zoomedOut: this.dotColor ?? a.zoomedOut,
5982
6025
  diff: this.dotZoomDiff ?? a.diff
5983
6026
  };
5984
- z.draw(e, Zr.material, {
6027
+ R.draw(e, ti.material, {
5985
6028
  uTexture: 0,
5986
6029
  inputSize: [t.width, t.height],
5987
6030
  zoom: [n[0], n[4]],
@@ -6005,20 +6048,20 @@ var Xr = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
6005
6048
  });
6006
6049
  }
6007
6050
  };
6008
- j([_({ fallback: !1 }), A("design:type", Boolean)], q.prototype, "checkerboard", void 0), j([_({ fallback: "grid" }), A("design:type", Object)], q.prototype, "checkerboardStyle", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], q.prototype, "pixelGrid", void 0), j([_(), A("design:type", Number)], q.prototype, "dotBaseColor", void 0), j([_(), A("design:type", Number)], q.prototype, "dotColor", void 0), j([_(), A("design:type", Number)], q.prototype, "dotZoomDiff", void 0), j([_(), A("design:type", String)], q.prototype, "watermark", void 0), j([_({ fallback: 100 }), A("design:type", Number)], q.prototype, "watermarkWidth", void 0), j([_({ fallback: .05 }), A("design:type", Number)], q.prototype, "watermarkAlpha", void 0), j([_({ fallback: .5236 }), A("design:type", Number)], q.prototype, "watermarkRotation", void 0), q = Zr = j([S("DrawboardEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6051
+ A([_({ fallback: !1 }), k("design:type", Boolean)], q.prototype, "checkerboard", void 0), A([_({ fallback: "grid" }), k("design:type", Object)], q.prototype, "checkerboardStyle", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], q.prototype, "pixelGrid", void 0), A([_(), k("design:type", Number)], q.prototype, "dotBaseColor", void 0), A([_(), k("design:type", Number)], q.prototype, "dotColor", void 0), A([_(), k("design:type", Number)], q.prototype, "dotZoomDiff", void 0), A([_(), k("design:type", String)], q.prototype, "watermark", void 0), A([_({ fallback: 100 }), k("design:type", Number)], q.prototype, "watermarkWidth", void 0), A([_({ fallback: .05 }), k("design:type", Number)], q.prototype, "watermarkAlpha", void 0), A([_({ fallback: .5236 }), k("design:type", Number)], q.prototype, "watermarkRotation", void 0), q = ti = A([S("DrawboardEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6009
6052
  //#endregion
6010
6053
  //#region src/scene/effects/GaussianBlurEffect.ts
6011
- var Qr, $r = "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}", ei = class extends G {
6054
+ var ni, ri = "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}", ii = class extends G {
6012
6055
  static {
6013
- Qr = this;
6056
+ ni = this;
6014
6057
  }
6015
- static materialX = new R({ gl: {
6058
+ static materialX = new L({ gl: {
6016
6059
  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}",
6017
- fragment: $r
6060
+ fragment: ri
6018
6061
  } });
6019
- static materialY = new R({ gl: {
6062
+ static materialY = new L({ gl: {
6020
6063
  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}",
6021
- fragment: $r
6064
+ fragment: ri
6022
6065
  } });
6023
6066
  constructor(e, t = []) {
6024
6067
  super(), this.setProperties(e).append(t);
@@ -6026,39 +6069,39 @@ var Qr, $r = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void
6026
6069
  apply(e, t) {
6027
6070
  let n = 1 / t.width, r = 1 / t.height, i = Math.max(this.quality, 1);
6028
6071
  for (let r = 0; r < i; r++) t.redraw(e, () => {
6029
- z.draw(e, Qr.materialX, {
6072
+ R.draw(e, ni.materialX, {
6030
6073
  sampler: 0,
6031
6074
  uStrength: n * (this.strength / i)
6032
6075
  });
6033
6076
  });
6034
6077
  for (let n = 0; n < i; n++) t.redraw(e, () => {
6035
- z.draw(e, Qr.materialY, {
6078
+ R.draw(e, ni.materialY, {
6036
6079
  sampler: 0,
6037
6080
  uStrength: r * (this.strength / i)
6038
6081
  });
6039
6082
  });
6040
6083
  }
6041
6084
  };
6042
- j([_({ fallback: 4 }), A("design:type", Number)], ei.prototype, "strength", void 0), j([_({ fallback: 3 }), A("design:type", Number)], ei.prototype, "quality", void 0), ei = Qr = j([S("GaussianBlurEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ei);
6085
+ A([_({ fallback: 4 }), k("design:type", Number)], ii.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], ii.prototype, "quality", void 0), ii = ni = A([S("GaussianBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ii);
6043
6086
  //#endregion
6044
6087
  //#region src/scene/effects/DropShadowEffect.ts
6045
- var ti, ni = class extends G {
6088
+ var ai, oi = class extends G {
6046
6089
  static {
6047
- ti = this;
6090
+ ai = this;
6048
6091
  }
6049
- static material = new R({ gl: {
6092
+ static material = new L({ gl: {
6050
6093
  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}",
6051
6094
  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}"
6052
6095
  } });
6053
- blurEffect = new ei();
6096
+ blurEffect = new ii();
6054
6097
  viewport3 = new W();
6055
- _color = new D();
6098
+ _color = new bt();
6056
6099
  constructor(e, t = []) {
6057
6100
  super(), this.setProperties(e).append(t);
6058
6101
  }
6059
6102
  apply(e, t) {
6060
6103
  this.viewport3.activateWithCopy(e, t), this.viewport3.redraw(e, () => {
6061
- this._color.value = this.color, z.draw(e, ti.material, {
6104
+ this._color.value = this.color, R.draw(e, ai.material, {
6062
6105
  sampler: 0,
6063
6106
  uAlpha: this._color.a,
6064
6107
  uColor: this._color.toArray().slice(0, 3),
@@ -6071,18 +6114,18 @@ var ti, ni = class extends G {
6071
6114
  ]
6072
6115
  });
6073
6116
  }), this.blurEffect.strength = this.blur, this.blurEffect.apply(e, this.viewport3), t.redraw(e, () => {
6074
- this.viewport3.texture.activate(e, 1), z.draw(e, er.instance, { sampler: 1 }), this.shadowOnly || z.draw(e, er.instance, { sampler: 0 }), e.texture.unbind(1);
6117
+ this.viewport3.texture.activate(e, 1), R.draw(e, tr.instance, { sampler: 1 }), this.shadowOnly || R.draw(e, tr.instance, { sampler: 0 }), e.texture.unbind(1);
6075
6118
  });
6076
6119
  }
6077
6120
  };
6078
- j([_({ fallback: "#000000FF" }), A("design:type", Object)], ni.prototype, "color", void 0), j([_({ fallback: 4 }), A("design:type", Number)], ni.prototype, "blur", void 0), j([_({ fallback: 4 }), A("design:type", Number)], ni.prototype, "offsetX", void 0), j([_({ fallback: 4 }), A("design:type", Number)], ni.prototype, "offsetY", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], ni.prototype, "shadowOnly", void 0), ni = ti = j([S("DropShadowEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ni);
6121
+ A([_({ fallback: "#000000FF" }), k("design:type", Object)], oi.prototype, "color", void 0), A([_({ fallback: 4 }), k("design:type", Number)], oi.prototype, "blur", void 0), A([_({ fallback: 4 }), k("design:type", Number)], oi.prototype, "offsetX", void 0), A([_({ fallback: 4 }), k("design:type", Number)], oi.prototype, "offsetY", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], oi.prototype, "shadowOnly", void 0), oi = ai = A([S("DropShadowEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], oi);
6079
6122
  //#endregion
6080
6123
  //#region src/scene/effects/EmbossEffect.ts
6081
- var ri, ii = class extends G {
6124
+ var si, ci = class extends G {
6082
6125
  static {
6083
- ri = this;
6126
+ si = this;
6084
6127
  }
6085
- static material = new R({ gl: {
6128
+ static material = new L({ gl: {
6086
6129
  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}",
6087
6130
  fragment: "precision mediump float;\nuniform sampler2D sampler;\nuniform vec4 inputSize;\nuniform float strength;\nvarying vec2 vUv;\n\nvoid main(void) {\n vec2 onePixel = inputSize.zw;\n vec4 color;\n color.rgb = vec3(0.5);\n color -= texture2D(sampler, vUv - onePixel) * strength;\n color += texture2D(sampler, vUv + onePixel) * strength;\n color.rgb = vec3((color.r + color.g + color.b) / 3.0);\n float alpha = texture2D(sampler, vUv).a;\n gl_FragColor = vec4(color.rgb * alpha, alpha);\n}"
6088
6131
  } });
@@ -6091,7 +6134,7 @@ var ri, ii = class extends G {
6091
6134
  }
6092
6135
  apply(e, t) {
6093
6136
  t.redraw(e, () => {
6094
- z.draw(e, ri.material, {
6137
+ R.draw(e, si.material, {
6095
6138
  sampler: 0,
6096
6139
  strength: this.strength,
6097
6140
  inputSize: [
@@ -6104,14 +6147,14 @@ var ri, ii = class extends G {
6104
6147
  });
6105
6148
  }
6106
6149
  };
6107
- j([_({ fallback: 5 }), A("design:type", Number)], ii.prototype, "strength", void 0), ii = ri = j([S("EmbossEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ii);
6150
+ A([_({ fallback: 5 }), k("design:type", Number)], ci.prototype, "strength", void 0), ci = si = A([S("EmbossEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ci);
6108
6151
  //#endregion
6109
6152
  //#region src/scene/effects/GlitchEffect.ts
6110
- var ai, J = class extends G {
6153
+ var li, J = class extends G {
6111
6154
  static {
6112
- ai = this;
6155
+ li = this;
6113
6156
  }
6114
- static material = new R({ gl: {
6157
+ static material = new L({ gl: {
6115
6158
  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}",
6116
6159
  fragment: "\nin vec2 vUv;\nuniform sampler2D sampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void) {\n vec2 coord = (vUv * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vUv + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if (coord.x > filterClamp.z) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if (coord.x < filterClamp.x) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if (coord.y > filterClamp.w) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if (coord.y < filterClamp.y) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture(sampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture(sampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture(sampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture(sampler, coord).a;\n}"
6117
6160
  } });
@@ -6124,7 +6167,7 @@ var ai, J = class extends G {
6124
6167
  super(), this.setProperties(e).append(t);
6125
6168
  let n = w(4, this.sampleSize);
6126
6169
  if (!n) throw Error("GlitchEffect requires a canvas; call setCanvasFactory() in non-browser environments.");
6127
- this._canvas = n, this._texture = new V(this._canvas), this._sizes = new Float32Array(this.slices), this._offsets = new Float32Array(this.slices);
6170
+ this._canvas = n, this._texture = new B(this._canvas), this._sizes = new Float32Array(this.slices), this._offsets = new Float32Array(this.slices);
6128
6171
  }
6129
6172
  redraw() {
6130
6173
  let e = this.sampleSize, t = this._texture, n = this._canvas.getContext("2d");
@@ -6141,7 +6184,7 @@ var ai, J = class extends G {
6141
6184
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
6142
6185
  let n = t.width, r = t.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
6143
6186
  t.redraw(e, () => {
6144
- this._texture.activate(e, 1), z.draw(e, ai.material, {
6187
+ this._texture.activate(e, 1), R.draw(e, li.material, {
6145
6188
  sampler: 0,
6146
6189
  filterClamp: [
6147
6190
  0,
@@ -6170,14 +6213,14 @@ var ai, J = class extends G {
6170
6213
  });
6171
6214
  }
6172
6215
  };
6173
- j([_({ fallback: 10 }), A("design:type", Number)], J.prototype, "slices", void 0), j([_({ fallback: 512 }), A("design:type", Number)], J.prototype, "sampleSize", void 0), j([_({ fallback: 100 }), A("design:type", Number)], J.prototype, "offset", void 0), j([_({ fallback: 0 }), A("design:type", Number)], J.prototype, "direction", void 0), j([_({ fallback: 2 }), A("design:type", Number)], J.prototype, "fillMode", void 0), j([_({ fallback: 0 }), A("design:type", Number)], J.prototype, "seed", void 0), j([_({ default: () => [2, 2] }), A("design:type", Array)], J.prototype, "red", void 0), j([_({ default: () => [-10, 4] }), A("design:type", Array)], J.prototype, "green", void 0), j([_({ default: () => [10, -4] }), A("design:type", Array)], J.prototype, "blue", void 0), J = ai = j([S("GlitchEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6216
+ A([_({ fallback: 10 }), k("design:type", Number)], J.prototype, "slices", void 0), A([_({ fallback: 512 }), k("design:type", Number)], J.prototype, "sampleSize", void 0), A([_({ fallback: 100 }), k("design:type", Number)], J.prototype, "offset", void 0), A([_({ fallback: 0 }), k("design:type", Number)], J.prototype, "direction", void 0), A([_({ fallback: 2 }), k("design:type", Number)], J.prototype, "fillMode", void 0), A([_({ fallback: 0 }), k("design:type", Number)], J.prototype, "seed", void 0), A([_({ default: () => [2, 2] }), k("design:type", Array)], J.prototype, "red", void 0), A([_({ default: () => [-10, 4] }), k("design:type", Array)], J.prototype, "green", void 0), A([_({ default: () => [10, -4] }), k("design:type", Array)], J.prototype, "blue", void 0), J = li = A([S("GlitchEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6174
6217
  //#endregion
6175
6218
  //#region src/scene/effects/GodrayEffect.ts
6176
- var oi, si = "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}", ci = class extends G {
6219
+ var ui, di = "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}", fi = class extends G {
6177
6220
  static {
6178
- oi = this;
6221
+ ui = this;
6179
6222
  }
6180
- static material = new R({ gl: {
6223
+ static material = new L({ gl: {
6181
6224
  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}",
6182
6225
  fragment: `precision highp float;
6183
6226
  varying vec2 vUv;
@@ -6190,7 +6233,7 @@ uniform float uTime;
6190
6233
  uniform vec3 uRay;
6191
6234
  uniform vec4 uInputSize;
6192
6235
 
6193
- ${si}
6236
+ ${di}
6194
6237
 
6195
6238
  void main(void) {
6196
6239
  bool uParallel = uParallel > 0.5;
@@ -6229,7 +6272,7 @@ void main(void) {
6229
6272
  apply(e, t) {
6230
6273
  let n = this.angle * (Math.PI / 180), r = this.parallel ? [Math.cos(n), Math.sin(n)] : this.center;
6231
6274
  t.redraw(e, () => {
6232
- z.draw(e, oi.material, {
6275
+ R.draw(e, ui.material, {
6233
6276
  sampler: 0,
6234
6277
  uDimensions: [t.width, t.height],
6235
6278
  uParallel: +!!this.parallel,
@@ -6251,15 +6294,15 @@ void main(void) {
6251
6294
  });
6252
6295
  }
6253
6296
  };
6254
- j([_({ fallback: 0 }), A("design:type", Number)], ci.prototype, "time", void 0), j([_({ fallback: 30 }), A("design:type", Number)], ci.prototype, "angle", void 0), j([_({ fallback: .5 }), A("design:type", Number)], ci.prototype, "gain", void 0), j([_({ fallback: 2.5 }), A("design:type", Number)], ci.prototype, "lacunarity", void 0), j([_({ fallback: !0 }), A("design:type", Boolean)], ci.prototype, "parallel", void 0), j([_({ default: () => [0, 0] }), A("design:type", Array)], ci.prototype, "center", void 0), j([_({ fallback: 1 }), A("design:type", Number)], ci.prototype, "alpha", void 0), ci = oi = j([S("GodrayEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ci);
6297
+ A([_({ fallback: 0 }), k("design:type", Number)], fi.prototype, "time", void 0), A([_({ fallback: 30 }), k("design:type", Number)], fi.prototype, "angle", void 0), A([_({ fallback: .5 }), k("design:type", Number)], fi.prototype, "gain", void 0), A([_({ fallback: 2.5 }), k("design:type", Number)], fi.prototype, "lacunarity", void 0), A([_({ fallback: !0 }), k("design:type", Boolean)], fi.prototype, "parallel", void 0), A([_({ default: () => [0, 0] }), k("design:type", Array)], fi.prototype, "center", void 0), A([_({ fallback: 1 }), k("design:type", Number)], fi.prototype, "alpha", void 0), fi = ui = A([S("GodrayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], fi);
6255
6298
  //#endregion
6256
6299
  //#region src/scene/effects/KawaseBlurEffect.ts
6257
- var li = "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}", ui = "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}", di = class extends G {
6300
+ var pi = "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}", mi = "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}", hi = class extends G {
6258
6301
  _kernels = [0];
6259
6302
  constructor(e, t = []) {
6260
- super(), this.material = new R({ gl: {
6303
+ super(), this.material = new L({ gl: {
6261
6304
  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}",
6262
- fragment: e?.clamp ? ui : li
6305
+ fragment: e?.clamp ? mi : pi
6263
6306
  } }), this.setProperties(e).append(t), this._generateKernels();
6264
6307
  }
6265
6308
  _updateProperty(e, t, n) {
@@ -6283,7 +6326,7 @@ var li = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6283
6326
  this._kernels.forEach((i) => {
6284
6327
  let a = i + .5;
6285
6328
  t.redraw(e, () => {
6286
- z.draw(e, this.material, {
6329
+ R.draw(e, this.material, {
6287
6330
  sampler: 0,
6288
6331
  uOffset: [a * n, a * r],
6289
6332
  uInputClamp: [
@@ -6297,14 +6340,14 @@ var li = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6297
6340
  });
6298
6341
  }
6299
6342
  };
6300
- j([_({ fallback: 4 }), A("design:type", Number)], di.prototype, "strength", void 0), j([_({ fallback: 3 }), A("design:type", Number)], di.prototype, "quality", void 0), j([_({ default: () => [1, 1] }), A("design:type", Array)], di.prototype, "pixelSize", void 0), di = j([S("KawaseBlurEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], di);
6343
+ A([_({ fallback: 4 }), k("design:type", Number)], hi.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], hi.prototype, "quality", void 0), A([_({ default: () => [1, 1] }), k("design:type", Array)], hi.prototype, "pixelSize", void 0), hi = A([S("KawaseBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], hi);
6301
6344
  //#endregion
6302
6345
  //#region src/scene/effects/MaskEffect.ts
6303
- var fi, pi = class extends G {
6346
+ var gi, _i = class extends G {
6304
6347
  static {
6305
- fi = this;
6348
+ gi = this;
6306
6349
  }
6307
- static material = new R({ gl: {
6350
+ static material = new L({ gl: {
6308
6351
  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}",
6309
6352
  fragment: "in vec2 vUv;\n\nuniform sampler2D sampler;\nuniform sampler2D mask;\nuniform float rotation;\n\nvec2 rotateUV(vec2 uv, float angle) {\n uv -= 0.5;\n float cosAngle = cos(angle);\n float sinAngle = sin(angle);\n mat2 rotationMatrix = mat2(\n cosAngle, -sinAngle,\n sinAngle, cosAngle\n );\n uv = rotationMatrix * uv;\n uv += 0.5;\n return uv;\n}\n\nvoid main(void) {\n vec4 color = texture(sampler, vUv);\n vec4 maskColor = texture(mask, rotateUV(vUv, rotation));\n gl_FragColor = mix(vec4(0.), color, maskColor.a);\n}"
6310
6353
  } });
@@ -6324,7 +6367,7 @@ var fi, pi = class extends G {
6324
6367
  }
6325
6368
  apply(e, t, n) {
6326
6369
  this.texture && t.redraw(e, () => {
6327
- this.texture.activate(e, 1), z.draw(e, fi.material, {
6370
+ this.texture.activate(e, 1), R.draw(e, gi.material, {
6328
6371
  sampler: 0,
6329
6372
  mask: 1,
6330
6373
  rotation: n.target?.globalRotation ?? 0
@@ -6332,33 +6375,33 @@ var fi, pi = class extends G {
6332
6375
  });
6333
6376
  }
6334
6377
  };
6335
- j([_({ fallback: "" }), A("design:type", String)], pi.prototype, "image", void 0), pi = fi = j([S("MaskEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], pi);
6378
+ A([_({ fallback: "" }), k("design:type", String)], _i.prototype, "image", void 0), _i = gi = A([S("MaskEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _i);
6336
6379
  //#endregion
6337
6380
  //#region src/scene/effects/OutlineEffect.ts
6338
- var mi, hi = "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}", gi = class extends G {
6381
+ var vi, yi = "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}", bi = class extends G {
6339
6382
  static {
6340
- mi = this;
6383
+ vi = this;
6341
6384
  }
6342
6385
  static MIN_SAMPLES = 1;
6343
6386
  static MAX_SAMPLES = 100;
6344
6387
  static getAngleStep(e) {
6345
- return Number.parseFloat((Math.PI * 2 / Math.max(e * mi.MAX_SAMPLES, mi.MIN_SAMPLES)).toFixed(7));
6388
+ return Number.parseFloat((Math.PI * 2 / Math.max(e * vi.MAX_SAMPLES, vi.MIN_SAMPLES)).toFixed(7));
6346
6389
  }
6347
- _color = new D();
6390
+ _color = new bt();
6348
6391
  constructor(e, t = []) {
6349
- super(), this.setProperties(e).append(t), this.material = new R({ gl: {
6392
+ super(), this.setProperties(e).append(t), this.material = new L({ gl: {
6350
6393
  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}",
6351
- fragment: hi.replace(/\{ANGLE_STEP\}/, mi.getAngleStep(this.quality).toFixed(7))
6394
+ fragment: yi.replace(/\{ANGLE_STEP\}/, vi.getAngleStep(this.quality).toFixed(7))
6352
6395
  } });
6353
6396
  }
6354
6397
  apply(e, t) {
6355
6398
  t.redraw(e, () => {
6356
- this._color.value = this.color, z.draw(e, this.material, {
6399
+ this._color.value = this.color, R.draw(e, this.material, {
6357
6400
  sampler: 0,
6358
6401
  uThickness: [this.width / t.width, this.width / t.height],
6359
6402
  uColor: this._color.toArray().slice(0, 3),
6360
6403
  uAlpha: this.opacity === 1 ? this._color.a : this.opacity,
6361
- uAngleStep: mi.getAngleStep(this.quality),
6404
+ uAngleStep: vi.getAngleStep(this.quality),
6362
6405
  uKnockout: +!!this.knockout,
6363
6406
  uInputClamp: [
6364
6407
  0,
@@ -6370,14 +6413,14 @@ var mi, hi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6370
6413
  });
6371
6414
  }
6372
6415
  };
6373
- j([_({ fallback: "#000000ff" }), A("design:type", Object)], gi.prototype, "color", void 0), j([_({ fallback: 1 }), A("design:type", Number)], gi.prototype, "width", void 0), j([_({ fallback: "solid" }), A("design:type", String)], gi.prototype, "style", void 0), j([_(), A("design:type", Object)], gi.prototype, "image", void 0), j([_({ fallback: 1 }), A("design:type", Number)], gi.prototype, "opacity", void 0), j([_({ fallback: .1 }), A("design:type", Number)], gi.prototype, "quality", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], gi.prototype, "knockout", void 0), gi = mi = j([S("OutlineEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], gi);
6416
+ A([_({ fallback: "#000000ff" }), k("design:type", Object)], bi.prototype, "color", void 0), A([_({ fallback: 1 }), k("design:type", Number)], bi.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", String)], bi.prototype, "style", void 0), A([_(), k("design:type", Object)], bi.prototype, "image", void 0), A([_({ fallback: 1 }), k("design:type", Number)], bi.prototype, "opacity", void 0), A([_({ fallback: .1 }), k("design:type", Number)], bi.prototype, "quality", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], bi.prototype, "knockout", void 0), bi = vi = A([S("OutlineEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], bi);
6374
6417
  //#endregion
6375
6418
  //#region src/scene/effects/PixelateEffect.ts
6376
- var _i, vi = class extends G {
6419
+ var xi, Si = class extends G {
6377
6420
  static {
6378
- _i = this;
6421
+ xi = this;
6379
6422
  }
6380
- static material = new R({ gl: {
6423
+ static material = new L({ gl: {
6381
6424
  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}",
6382
6425
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 offset;\nuniform vec2 step;\n\nvoid main(void) {\n vec2 uv = vUv;\n uv = floor((uv - offset) / step) * step + offset + step / 2.0;\n gl_FragColor = texture2D(sampler, uv);\n}"
6383
6426
  } });
@@ -6391,18 +6434,18 @@ var _i, vi = class extends G {
6391
6434
  offset: [(r[0] + i[0]) / t.width, 1 - (r[1] + i[1]) / t.height],
6392
6435
  step: [this.strength * r[0] / t.width, this.strength * r[1] / t.height]
6393
6436
  };
6394
- z.draw(e, _i.material, a);
6437
+ R.draw(e, xi.material, a);
6395
6438
  });
6396
6439
  }
6397
6440
  };
6398
- j([_({ fallback: 10 }), A("design:type", Number)], vi.prototype, "strength", void 0), vi = _i = j([S("PixelateEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], vi);
6441
+ A([_({ fallback: 10 }), k("design:type", Number)], Si.prototype, "strength", void 0), Si = xi = A([S("PixelateEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Si);
6399
6442
  //#endregion
6400
6443
  //#region src/scene/effects/ZoomBlurEffect.ts
6401
- var yi, bi = class extends G {
6444
+ var Ci, wi = class extends G {
6402
6445
  static {
6403
- yi = this;
6446
+ Ci = this;
6404
6447
  }
6405
- static material = new R({ gl: {
6448
+ static material = new L({ gl: {
6406
6449
  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}",
6407
6450
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec4 uInputSize;\n\nuniform vec2 uCenter;\nuniform float uStrength;\nuniform float uInnerRadius;\nuniform float uRadius;\n\nconst float MAX_KERNEL_SIZE = 32.0;\n\nhighp float rand(vec2 co, float seed) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\n return fract(sin(sn) * c + seed);\n}\n\nvoid main() {\n float minGradient = uInnerRadius * 0.3;\n float innerRadius1 = (uInnerRadius + minGradient * 0.5) / uInputSize.x;\n\n float gradient = uRadius * 0.3;\n float radius1 = (uRadius - gradient * 0.5) / uInputSize.x;\n\n float countLimit = MAX_KERNEL_SIZE;\n\n vec2 dir = vec2(uCenter.xy / uInputSize.xy - vUv);\n float dist = length(vec2(dir.x, dir.y * uInputSize.y / uInputSize.x));\n\n float strength1 = uStrength;\n\n float delta = 0.0;\n float gap;\n if (dist < innerRadius1) {\n delta = innerRadius1 - dist;\n gap = minGradient;\n } else if (radius1 >= 0.0 && dist > radius1) { // radius1 < 0 means it's infinity\n delta = dist - radius1;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / uInputSize.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength1 *= delta;\n if (countLimit < 1.0) {\n gl_FragColor = texture2D(sampler, vUv);\n return;\n }\n }\n\n float offset = rand(vUv, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength1;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vUv + dir * percent;\n color += texture2D(sampler, p) * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n\n gl_FragColor = color;\n}"
6408
6451
  } });
@@ -6411,7 +6454,7 @@ var yi, bi = class extends G {
6411
6454
  }
6412
6455
  apply(e, t) {
6413
6456
  t.redraw(e, () => {
6414
- z.draw(e, yi.material, {
6457
+ R.draw(e, Ci.material, {
6415
6458
  sampler: 0,
6416
6459
  uCenter: [t.width / 2, t.height / 2],
6417
6460
  uInnerRadius: this.innerRadius,
@@ -6427,10 +6470,10 @@ var yi, bi = class extends G {
6427
6470
  });
6428
6471
  }
6429
6472
  };
6430
- j([_(), A("design:type", Array)], bi.prototype, "center", void 0), j([_({ fallback: 20 }), A("design:type", Number)], bi.prototype, "innerRadius", void 0), j([_({ fallback: -1 }), A("design:type", Number)], bi.prototype, "radius", void 0), j([_({ fallback: .1 }), A("design:type", Number)], bi.prototype, "strength", void 0), bi = yi = j([S("ZoomBlurEffect"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], bi);
6473
+ A([_(), k("design:type", Array)], wi.prototype, "center", void 0), A([_({ fallback: 20 }), k("design:type", Number)], wi.prototype, "innerRadius", void 0), A([_({ fallback: -1 }), k("design:type", Number)], wi.prototype, "radius", void 0), A([_({ fallback: .1 }), k("design:type", Number)], wi.prototype, "strength", void 0), wi = Ci = A([S("ZoomBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wi);
6431
6474
  //#endregion
6432
6475
  //#region src/scene/2d/element/utils.ts
6433
- function xi(e, t) {
6476
+ function Ti(e, t) {
6434
6477
  let { x: n, y: r, width: i, height: a } = t, o = !1, s = new b().translate(-n, -r).scale(1 / i, 1 / a);
6435
6478
  if (e.cropRect) {
6436
6479
  let { left: t = 0, top: n = 0, right: r = 0, bottom: i = 0 } = e.cropRect;
@@ -6486,7 +6529,7 @@ var Y = class extends T {
6486
6529
  }
6487
6530
  }
6488
6531
  async loadTexture() {
6489
- if (this.linearGradient || this.radialGradient) this.texture = new ar(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6532
+ if (this.linearGradient || this.radialGradient) this.texture = new lr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6490
6533
  else if (d(this.image)) this.animatedTexture = void 0, this.texture = void 0;
6491
6534
  else if (this._parent.tree?.log(`load image ${this.image}`), this.image !== "viewport") {
6492
6535
  let e = this.image.split("?")[0].endsWith(".gif"), t = this.image, n = await $.loadBy(t, async () => {
@@ -6505,7 +6548,7 @@ var Y = class extends T {
6505
6548
  let i = await n(t, r);
6506
6549
  if (i) return this._pipelineImageToCanvas(i);
6507
6550
  });
6508
- r && (this.texture = new V({
6551
+ r && (this.texture = new B({
6509
6552
  source: r,
6510
6553
  width: r.width,
6511
6554
  height: r.height,
@@ -6540,12 +6583,12 @@ var Y = class extends T {
6540
6583
  width: e,
6541
6584
  height: t
6542
6585
  } };
6543
- if (this.image === "viewport") n.fillStyle = new lr();
6586
+ if (this.image === "viewport") n.fillStyle = new pr();
6544
6587
  else {
6545
6588
  let i = this.animatedTexture?.currentFrame.texture ?? this.texture;
6546
6589
  r = {
6547
6590
  ...r,
6548
- ...xi(this, this.tile && i ? {
6591
+ ...Ti(this, this.tile && i ? {
6549
6592
  x: 0,
6550
6593
  y: 0,
6551
6594
  width: i.sourceWidth,
@@ -6581,10 +6624,10 @@ var Y = class extends T {
6581
6624
  this.updateFrameIndex();
6582
6625
  }
6583
6626
  };
6584
- j([_({ fallback: !0 }), A("design:type", Boolean)], Y.prototype, "enabled", void 0), j([_(), A("design:type", Object)], Y.prototype, "color", void 0), j([_(), A("design:type", Object)], Y.prototype, "image", void 0), j([_(), A("design:type", Object)], Y.prototype, "linearGradient", void 0), j([_(), A("design:type", Object)], Y.prototype, "radialGradient", void 0), j([_(), A("design:type", Object)], Y.prototype, "cropRect", void 0), j([_(), A("design:type", Object)], Y.prototype, "stretchRect", void 0), j([_(), A("design:type", Object)], Y.prototype, "dpi", void 0), j([_(), A("design:type", Object)], Y.prototype, "rotateWithShape", void 0), j([_(), A("design:type", Object)], Y.prototype, "tile", void 0), j([_(), A("design:type", Object)], Y.prototype, "opacity", void 0), j([_(), A("design:type", Object)], Y.prototype, "imagePipelines", void 0);
6627
+ A([_({ fallback: !0 }), k("design:type", Boolean)], Y.prototype, "enabled", void 0), A([_(), k("design:type", Object)], Y.prototype, "color", void 0), A([_(), k("design:type", Object)], Y.prototype, "image", void 0), A([_(), k("design:type", Object)], Y.prototype, "linearGradient", void 0), A([_(), k("design:type", Object)], Y.prototype, "radialGradient", void 0), A([_(), k("design:type", Object)], Y.prototype, "cropRect", void 0), A([_(), k("design:type", Object)], Y.prototype, "stretchRect", void 0), A([_(), k("design:type", Object)], Y.prototype, "dpi", void 0), A([_(), k("design:type", Object)], Y.prototype, "rotateWithShape", void 0), A([_(), k("design:type", Object)], Y.prototype, "tile", void 0), A([_(), k("design:type", Object)], Y.prototype, "opacity", void 0), A([_(), k("design:type", Object)], Y.prototype, "imagePipelines", void 0);
6585
6628
  //#endregion
6586
6629
  //#region src/scene/2d/element/Element2DBackground.ts
6587
- var Si = class extends Y {
6630
+ var Ei = class extends Y {
6588
6631
  setProperties(e) {
6589
6632
  return super._setProperties(d(e) ? void 0 : f(e));
6590
6633
  }
@@ -6596,14 +6639,14 @@ var Si = class extends Y {
6596
6639
  }
6597
6640
  }
6598
6641
  };
6599
- j([_(), A("design:type", Object)], Si.prototype, "fillWithShape", void 0);
6642
+ A([_(), k("design:type", Object)], Ei.prototype, "fillWithShape", void 0);
6600
6643
  //#endregion
6601
6644
  //#region src/scene/2d/element/Element2DChart.ts
6602
- var Ci;
6603
- function wi() {
6604
- return Ci ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), Ci;
6645
+ var Di;
6646
+ function Oi() {
6647
+ return Di ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), Di;
6605
6648
  }
6606
- function Ti(e) {
6649
+ function ki(e) {
6607
6650
  if (!e) return { show: !1 };
6608
6651
  switch (e) {
6609
6652
  case "bottom": return {
@@ -6669,7 +6712,7 @@ var X = class extends T {
6669
6712
  this._teardown(), this._parent.requestDraw();
6670
6713
  return;
6671
6714
  }
6672
- let n = await wi();
6715
+ let n = await Oi();
6673
6716
  if (!n) {
6674
6717
  console.warn("[modern-canvas] chart rendering requires the optional \"echarts\" dependency (e.g. `pnpm add echarts`)"), this._renderPlaceholder(e, t);
6675
6718
  return;
@@ -6694,7 +6737,7 @@ var X = class extends T {
6694
6737
  }), this._instance.setOption(this._toOption(), !0), !this._texture) {
6695
6738
  let e = this._container.querySelector("canvas");
6696
6739
  if (!e) return;
6697
- this._texture = new rr({
6740
+ this._texture = new ir({
6698
6741
  source: e,
6699
6742
  pixelRatio: 1
6700
6743
  });
@@ -6707,7 +6750,7 @@ var X = class extends T {
6707
6750
  let n = document.createElement("canvas");
6708
6751
  n.width = Math.ceil(e), n.height = Math.ceil(t);
6709
6752
  let r = n.getContext("2d");
6710
- 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 rr({
6753
+ 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 ir({
6711
6754
  source: n,
6712
6755
  pixelRatio: 1
6713
6756
  }), this._texture.requestUpdate("source"), this._parent.requestDraw());
@@ -6728,7 +6771,7 @@ var X = class extends T {
6728
6771
  text: this.title,
6729
6772
  left: "center"
6730
6773
  } : void 0,
6731
- legend: Ti(this.legend),
6774
+ legend: ki(this.legend),
6732
6775
  tooltip: {}
6733
6776
  };
6734
6777
  if (n) {
@@ -6772,10 +6815,10 @@ var X = class extends T {
6772
6815
  this._teardown();
6773
6816
  }
6774
6817
  };
6775
- j([_({ fallback: !0 }), A("design:type", Boolean)], X.prototype, "enabled", void 0), j([_({ fallback: "column" }), A("design:type", Object)], X.prototype, "type", void 0), j([_(), A("design:type", Object)], X.prototype, "grouping", void 0), j([_({ fallback: () => [] }), A("design:type", Object)], X.prototype, "categories", void 0), j([_({ fallback: () => [] }), A("design:type", Object)], X.prototype, "series", void 0), j([_(), A("design:type", Object)], X.prototype, "title", void 0), j([_(), A("design:type", Object)], X.prototype, "legend", void 0), j([_(), A("design:type", Object)], X.prototype, "categoryAxis", void 0), j([_(), A("design:type", Object)], X.prototype, "valueAxis", void 0);
6818
+ A([_({ fallback: !0 }), k("design:type", Boolean)], X.prototype, "enabled", void 0), A([_({ fallback: "column" }), k("design:type", Object)], X.prototype, "type", void 0), A([_(), k("design:type", Object)], X.prototype, "grouping", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], X.prototype, "categories", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], X.prototype, "series", void 0), A([_(), k("design:type", Object)], X.prototype, "title", void 0), A([_(), k("design:type", Object)], X.prototype, "legend", void 0), A([_(), k("design:type", Object)], X.prototype, "categoryAxis", void 0), A([_(), k("design:type", Object)], X.prototype, "valueAxis", void 0);
6776
6819
  //#endregion
6777
6820
  //#region src/scene/2d/element/Element2DComments.ts
6778
- var Ei = class extends T {
6821
+ var Ai = class extends T {
6779
6822
  parent;
6780
6823
  constructor(e) {
6781
6824
  super(), this.parent = e;
@@ -6809,7 +6852,7 @@ var Ei = class extends T {
6809
6852
  isValid() {
6810
6853
  return Object.values(this._properties).some(Boolean);
6811
6854
  }
6812
- }, Di = class extends T {
6855
+ }, ji = class extends T {
6813
6856
  _parent;
6814
6857
  _routeSig;
6815
6858
  _routePath;
@@ -6852,12 +6895,12 @@ var Ei = class extends T {
6852
6895
  let n = t.shape.connectionPoints?.find((t) => t.idx === e.idx);
6853
6896
  if (n) {
6854
6897
  let e = t.globalTransform.apply(new x(n.x * t.size.x, n.y * t.size.y)), i;
6855
- return i = n.ang === void 0 ? kr(n.x - .5, n.y - .5) : {
6898
+ return i = n.ang === void 0 ? Nr(n.x - .5, n.y - .5) : {
6856
6899
  x: Math.cos(n.ang),
6857
6900
  y: Math.sin(n.ang)
6858
6901
  }, {
6859
6902
  point: e,
6860
- dir: Oi(i, t.globalRotation),
6903
+ dir: Mi(i, t.globalRotation),
6861
6904
  bbox: r
6862
6905
  };
6863
6906
  }
@@ -6880,11 +6923,11 @@ var Ei = class extends T {
6880
6923
  return;
6881
6924
  }
6882
6925
  let n = (e) => e ? `${e.point.x},${e.point.y},${e.dir?.x ?? ""},${e.dir?.y ?? ""}` : "-", r = `${this.mode}|${n(e)}|${n(t)}`;
6883
- return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Ar(this.mode, e ?? t, t ?? e)), this._routePath;
6926
+ return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Pr(this.mode, e ?? t, t ?? e)), this._routePath;
6884
6927
  }
6885
6928
  };
6886
- j([_(), A("design:type", Object)], Di.prototype, "start", void 0), j([_(), A("design:type", Object)], Di.prototype, "end", void 0), j([_({ fallback: "straight" }), A("design:type", Object)], Di.prototype, "mode", void 0), j([_({ fallback: .5 }), A("design:type", Number)], Di.prototype, "labelPosition", void 0);
6887
- function Oi(e, t) {
6929
+ A([_(), k("design:type", Object)], ji.prototype, "start", void 0), A([_(), k("design:type", Object)], ji.prototype, "end", void 0), A([_({ fallback: "straight" }), k("design:type", Object)], ji.prototype, "mode", void 0), A([_({ fallback: .5 }), k("design:type", Number)], ji.prototype, "labelPosition", void 0);
6930
+ function Mi(e, t) {
6888
6931
  if (!t) return e;
6889
6932
  let n = Math.cos(t), r = Math.sin(t);
6890
6933
  return {
@@ -6894,7 +6937,7 @@ function Oi(e, t) {
6894
6937
  }
6895
6938
  //#endregion
6896
6939
  //#region src/scene/2d/element/Element2DForeground.ts
6897
- var ki = class extends Y {
6940
+ var Ni = class extends Y {
6898
6941
  setProperties(e) {
6899
6942
  return super._setProperties(d(e) ? void 0 : ee(e));
6900
6943
  }
@@ -6902,14 +6945,14 @@ var ki = class extends Y {
6902
6945
  super._updateProperty(e, t, n), e === "fillWithShape" && this._parent.requestDraw();
6903
6946
  }
6904
6947
  };
6905
- j([_(), A("design:type", Object)], ki.prototype, "fillWithShape", void 0);
6948
+ A([_(), k("design:type", Object)], Ni.prototype, "fillWithShape", void 0);
6906
6949
  //#endregion
6907
6950
  //#region src/scene/2d/element/Element2DOutline.ts
6908
- var Ai = {
6951
+ var Pi = {
6909
6952
  sm: 4,
6910
6953
  md: 6,
6911
6954
  lg: 8
6912
- }, ji = class extends Y {
6955
+ }, Fi = class extends Y {
6913
6956
  setProperties(e) {
6914
6957
  return super._setProperties(d(e) ? void 0 : te(e));
6915
6958
  }
@@ -6931,7 +6974,7 @@ var Ai = {
6931
6974
  }
6932
6975
  draw() {
6933
6976
  let { width: e, height: t } = this._parent.size, n = this._parent.context;
6934
- this.image === "viewport" ? n.strokeStyle = new lr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...xi(this, {
6977
+ this.image === "viewport" ? n.strokeStyle = new pr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...Ti(this, {
6935
6978
  x: 0,
6936
6979
  y: 0,
6937
6980
  width: e,
@@ -6954,14 +6997,14 @@ var Ai = {
6954
6997
  _fillEnd(e, t, n, r, i) {
6955
6998
  let a = e.x - t.x, o = e.y - t.y, s = Math.hypot(a, o);
6956
6999
  if (s < .001) return;
6957
- 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;
7000
+ let c = Pi[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;
6958
7001
  ee.fillStyle = i, ee.moveTo(e.x, e.y).lineTo(p + h, m + g).lineTo(p - h, m - g).closePath().fill();
6959
7002
  }
6960
7003
  };
6961
- j([_(), A("design:type", Object)], ji.prototype, "color", void 0), j([_(), A("design:type", Object)], ji.prototype, "width", void 0), j([_({ fallback: "solid" }), A("design:type", Object)], ji.prototype, "style", void 0), j([_({ fallback: "butt" }), A("design:type", Object)], ji.prototype, "lineCap", void 0), j([_({ fallback: "miter" }), A("design:type", Object)], ji.prototype, "lineJoin", void 0), j([_(), A("design:type", Object)], ji.prototype, "headEnd", void 0), j([_(), A("design:type", Object)], ji.prototype, "tailEnd", void 0);
7004
+ A([_(), k("design:type", Object)], Fi.prototype, "color", void 0), A([_(), k("design:type", Object)], Fi.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", Object)], Fi.prototype, "style", void 0), A([_({ fallback: "butt" }), k("design:type", Object)], Fi.prototype, "lineCap", void 0), A([_({ fallback: "miter" }), k("design:type", Object)], Fi.prototype, "lineJoin", void 0), A([_(), k("design:type", Object)], Fi.prototype, "headEnd", void 0), A([_(), k("design:type", Object)], Fi.prototype, "tailEnd", void 0);
6962
7005
  //#endregion
6963
7006
  //#region src/scene/2d/element/Element2DShadow.ts
6964
- var Mi = class extends T {
7007
+ var Ii = class extends T {
6965
7008
  _parent;
6966
7009
  constructor(e) {
6967
7010
  super(), this._parent = e;
@@ -6982,13 +7025,13 @@ var Mi = class extends T {
6982
7025
  }
6983
7026
  updateEffect() {
6984
7027
  let e = "__$shadow", t = this._parent.getNode(e);
6985
- this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new ni({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
7028
+ this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new oi({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
6986
7029
  }
6987
7030
  };
6988
- j([_({ fallback: !0 }), A("design:type", Boolean)], Mi.prototype, "enabled", void 0), j([_({ fallback: "#000000FF" }), A("design:type", Object)], Mi.prototype, "color", void 0), j([_({ fallback: 0 }), A("design:type", Object)], Mi.prototype, "blur", void 0), j([_({ fallback: 0 }), A("design:type", Object)], Mi.prototype, "offsetY", void 0), j([_({ fallback: 0 }), A("design:type", Object)], Mi.prototype, "offsetX", void 0);
7031
+ A([_({ fallback: !0 }), k("design:type", Boolean)], Ii.prototype, "enabled", void 0), A([_({ fallback: "#000000FF" }), k("design:type", Object)], Ii.prototype, "color", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Ii.prototype, "blur", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Ii.prototype, "offsetY", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Ii.prototype, "offsetX", void 0);
6989
7032
  //#endregion
6990
7033
  //#region src/scene/2d/element/Element2DShape.ts
6991
- var Ni = class extends T {
7034
+ var Li = class extends T {
6992
7035
  _parent;
6993
7036
  _path2DSet = new ue();
6994
7037
  _localPath;
@@ -7087,24 +7130,24 @@ var Ni = class extends T {
7087
7130
  t && n && (r ? e.roundRect(0, 0, t, n, r) : e.rect(0, 0, t, n));
7088
7131
  }
7089
7132
  };
7090
- j([_({ fallback: !0 }), A("design:type", Boolean)], Ni.prototype, "enabled", void 0), j([_(), A("design:type", Object)], Ni.prototype, "preset", void 0), j([_(), A("design:type", Object)], Ni.prototype, "svg", void 0), j([_(), A("design:type", Object)], Ni.prototype, "viewBox", void 0), j([_(), A("design:type", Object)], Ni.prototype, "paths", void 0), j([_(), A("design:type", Object)], Ni.prototype, "connectionPoints", void 0);
7133
+ A([_({ fallback: !0 }), k("design:type", Boolean)], Li.prototype, "enabled", void 0), A([_(), k("design:type", Object)], Li.prototype, "preset", void 0), A([_(), k("design:type", Object)], Li.prototype, "svg", void 0), A([_(), k("design:type", Object)], Li.prototype, "viewBox", void 0), A([_(), k("design:type", Object)], Li.prototype, "paths", void 0), A([_(), k("design:type", Object)], Li.prototype, "connectionPoints", void 0);
7091
7134
  //#endregion
7092
7135
  //#region src/scene/2d/element/Element2DStyle.ts
7093
- var Pi = class extends E {
7136
+ var Ri = class extends E {
7094
7137
  constructor(e) {
7095
7138
  super(), this.setProperties(e);
7096
7139
  }
7097
- }, Fi = {
7140
+ }, zi = {
7098
7141
  ...o(),
7099
7142
  left: 0,
7100
7143
  top: 0,
7101
7144
  width: 0,
7102
7145
  height: 0
7103
7146
  };
7104
- for (let e in Fi) i(Pi, e, { fallback: Fi[e] });
7147
+ for (let e in zi) i(Ri, e, { fallback: zi[e] });
7105
7148
  //#endregion
7106
7149
  //#region src/scene/2d/element/Element2DTable.ts
7107
- var Ii = 100, Li = 40, Ri = class extends T {
7150
+ var Bi = 100, Vi = 40, Hi = class extends T {
7108
7151
  _parent;
7109
7152
  _cellNodes = /* @__PURE__ */ new Map();
7110
7153
  _cellSnapshots = /* @__PURE__ */ new Map();
@@ -7135,10 +7178,10 @@ var Ii = 100, Li = 40, Ri = class extends T {
7135
7178
  return !!(this.enabled && this.cells.length);
7136
7179
  }
7137
7180
  get gridWidth() {
7138
- return this.columns.reduce((e, t) => e + (t.width || Ii), 0);
7181
+ return this.columns.reduce((e, t) => e + (t.width || Bi), 0);
7139
7182
  }
7140
7183
  get gridHeight() {
7141
- return this.rows.reduce((e, t) => e + (t.height || Li), 0);
7184
+ return this.rows.reduce((e, t) => e + (t.height || Vi), 0);
7142
7185
  }
7143
7186
  update() {
7144
7187
  if (this._dirty = !1, !this.isValid()) {
@@ -7148,9 +7191,9 @@ var Ii = 100, Li = 40, Ri = class extends T {
7148
7191
  let { columns: e, rows: t, cells: n } = this, r = e.length, i = t.length;
7149
7192
  for (let e of n) r = Math.max(r, e.col + (e.colSpan || 1)), i = Math.max(i, e.row + (e.rowSpan || 1));
7150
7193
  let a = [0];
7151
- for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || Ii));
7194
+ for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || Bi));
7152
7195
  let o = [0];
7153
- for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || Li));
7196
+ for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || Vi));
7154
7197
  this._parent.size.set(a[e.length] ?? 0, o[t.length] ?? 0);
7155
7198
  let s = /* @__PURE__ */ new Set();
7156
7199
  for (let e of n) {
@@ -7187,9 +7230,20 @@ var Ii = 100, Li = 40, Ri = class extends T {
7187
7230
  this._clearCells();
7188
7231
  }
7189
7232
  };
7190
- j([_({ fallback: !0 }), A("design:type", Boolean)], Ri.prototype, "enabled", void 0), j([_({ fallback: () => [] }), A("design:type", Object)], Ri.prototype, "columns", void 0), j([_({ fallback: () => [] }), A("design:type", Object)], Ri.prototype, "rows", void 0), j([_({ fallback: () => [] }), A("design:type", Object)], Ri.prototype, "cells", void 0);
7233
+ A([_({ fallback: !0 }), k("design:type", Boolean)], Hi.prototype, "enabled", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Hi.prototype, "columns", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Hi.prototype, "rows", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Hi.prototype, "cells", void 0);
7191
7234
  //#endregion
7192
7235
  //#region src/scene/2d/element/Element2DText.ts
7236
+ var Ui = 2, Wi = 64, Gi = 0;
7237
+ function Ki() {
7238
+ if (Gi) return Gi;
7239
+ try {
7240
+ let e = w(), t = e.getContext("webgl2") || e.getContext("webgl");
7241
+ Gi = t && t.getParameter(t.MAX_TEXTURE_SIZE) || 4096;
7242
+ } catch {
7243
+ Gi = 4096;
7244
+ }
7245
+ return Gi;
7246
+ }
7193
7247
  var Z = class extends T {
7194
7248
  _parent;
7195
7249
  base;
@@ -7201,10 +7255,13 @@ var Z = class extends T {
7201
7255
  }
7202
7256
  _textContent = "";
7203
7257
  _autoDrawMode;
7204
- _texture = new rr({ mipmap: !0 });
7258
+ _atlasEligible = !1;
7259
+ _textureStale = !0;
7260
+ _texture = new ir({ mipmap: !0 });
7261
+ _tiles = [];
7205
7262
  _textureMap = /* @__PURE__ */ new Map();
7206
7263
  constructor(e) {
7207
- super(), this._parent = e, this.base = Dt(new _e()), this.base.setPropertyAccessor(this);
7264
+ super(), this._parent = e, this.base = Ot(new _e()), this.base.setPropertyAccessor(this);
7208
7265
  }
7209
7266
  setProperties(e) {
7210
7267
  return super.setProperties(d(e) ? void 0 : ae(e));
@@ -7240,12 +7297,52 @@ var Z = class extends T {
7240
7297
  });
7241
7298
  }
7242
7299
  update() {
7243
- this.base.fonts = this.base.fonts ?? this._parent.tree?.fonts, this.base.update();
7244
- let e = this._texture;
7245
- e.width = Math.ceil(this.base.boundingBox.width), e.height = Math.ceil(this.base.boundingBox.height), this.base.render({
7246
- view: e.source,
7247
- pixelRatio: e.pixelRatio
7248
- }), e.requestUpdate("source"), this._parent.requestDraw();
7300
+ if (this.base.fonts = this.base.fonts ?? this._parent.tree?.fonts, this.base.update(), this._atlasEligible = this._computeAtlasEligible(), this._atlasEligible) {
7301
+ this._releaseTiles(), this._textureStale = !0, this._parent.requestDraw();
7302
+ return;
7303
+ }
7304
+ this._rasterTexture(), this._parent.requestDraw();
7305
+ }
7306
+ _rasterTexture() {
7307
+ let e = Math.ceil(this.base.boundingBox.width), t = Math.ceil(this.base.boundingBox.height), n = Ui, r = Math.floor((Ki() - Wi) / n);
7308
+ if (e <= r && t <= r) {
7309
+ this._releaseTiles();
7310
+ let r = this._texture;
7311
+ r.pixelRatio = n, r.width = e, r.height = t, this.base.render({
7312
+ view: r.source,
7313
+ pixelRatio: n
7314
+ }), r.requestUpdate("source");
7315
+ } else this._renderTiles(e, t, n, r);
7316
+ this._textureStale = !1;
7317
+ }
7318
+ _renderTiles(e, t, n, r) {
7319
+ let i = Math.ceil(e / r), a = Math.ceil(t / r), o = i * a;
7320
+ for (; this._tiles.length > o;) this._tiles.pop().texture.destroy();
7321
+ let s = 0;
7322
+ for (let o = 0; o < a; o++) for (let a = 0; a < i; a++) {
7323
+ let i = a * r, c = o * r, l = Math.min(r, e - i), u = Math.min(r, t - c), d = this._tiles[s];
7324
+ d || (d = {
7325
+ texture: new ir({ mipmap: !0 }),
7326
+ x: i,
7327
+ y: c,
7328
+ w: l,
7329
+ h: u
7330
+ }, this._tiles[s] = d), d.x = i, d.y = c, d.w = l, d.h = u;
7331
+ let f = d.texture;
7332
+ f.pixelRatio = n, f.width = l, f.height = u, this.base.render({
7333
+ view: f.source,
7334
+ pixelRatio: n,
7335
+ region: {
7336
+ x: i,
7337
+ y: c,
7338
+ width: l,
7339
+ height: u
7340
+ }
7341
+ }), f.requestUpdate("source"), s++;
7342
+ }
7343
+ }
7344
+ _releaseTiles() {
7345
+ this._tiles.length && (this._tiles.forEach((e) => e.texture.destroy()), this._tiles = []);
7249
7346
  }
7250
7347
  _updateTextureMap() {
7251
7348
  if (this._textureMap.clear(), this.useTextureDraw()) return;
@@ -7273,7 +7370,7 @@ var Z = class extends T {
7273
7370
  }), this._parent.requestDraw());
7274
7371
  }
7275
7372
  async _loadTexture(e, t) {
7276
- return e.linearGradient || e.radialGradient ? new ar(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));
7373
+ return e.linearGradient || e.radialGradient ? new lr(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));
7277
7374
  }
7278
7375
  setContent(e) {
7279
7376
  this.content = oe(e);
@@ -7302,7 +7399,7 @@ var Z = class extends T {
7302
7399
  if (n.style.fill && !d(n.style.fill)) if (typeof n.style.fill == "object") {
7303
7400
  let r = n.style.fill, o = this._textureMap.get(`${a}.${i}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
7304
7401
  r.enabled !== !1 && (o || r.color) && (e.addPath(n), e.style = { ...n.style }, e.fillStyle = o?.texture ?? r.color, e.fill({
7305
- ...xi(r, o?.box ?? {
7402
+ ...Ti(r, o?.box ?? {
7306
7403
  x: 0,
7307
7404
  y: 0,
7308
7405
  width: this._parent.size.width,
@@ -7314,7 +7411,7 @@ var Z = class extends T {
7314
7411
  if (n.style.stroke && !d(n.style.stroke)) if (typeof n.style.stroke == "object") {
7315
7412
  let r = n.style.stroke, o = this._textureMap.get(`${a}.${i}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
7316
7413
  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({
7317
- ...xi(r, o?.box ?? {
7414
+ ...Ti(r, o?.box ?? {
7318
7415
  x: 0,
7319
7416
  y: 0,
7320
7417
  width: this._parent.size.width,
@@ -7329,22 +7426,63 @@ var Z = class extends T {
7329
7426
  }
7330
7427
  _textureDraw(e) {
7331
7428
  let { left: t = 0, top: n = 0, width: r, height: i } = this.base.boundingBox;
7332
- e.fillStyle = this._texture, e.rect(t, n, r, i);
7333
- let { a, c: o, tx: s, b: c, d: l, ty: u } = new b().translate(-t, -n).scale(1 / r, 1 / i), d, f;
7429
+ if (this._tiles.length) for (let r of this._tiles) this._drawTextureRect(e, r.texture, t + r.x, n + r.y, r.w, r.h);
7430
+ else this._drawTextureRect(e, this._texture, t, n, r, i);
7431
+ }
7432
+ _drawTextureRect(e, t, n, r, i, a) {
7433
+ e.fillStyle = t, e.rect(n, r, i, a);
7434
+ let { a: o, c: s, tx: c, b: l, d: u, ty: d } = new b().translate(-n, -r).scale(1 / i, 1 / a), f, p;
7334
7435
  e.fill({
7335
7436
  transformUv: (e, t) => {
7336
- d = e[t], f = e[t + 1], e[t] = a * d + o * f + s, e[t + 1] = c * d + l * f + u;
7437
+ f = e[t], p = e[t + 1], e[t] = o * f + s * p + c, e[t + 1] = l * f + u * p + d;
7337
7438
  },
7338
7439
  transformVertex: this._createTransformVertex()
7339
7440
  });
7340
7441
  }
7442
+ _computeAtlasEligible() {
7443
+ if (this.drawMode === "texture" || this.drawMode === "path" || this.effects?.length || this.outline?.width || this.fill && !d(this.fill) || this.content.some((e) => e.fragments.some((e) => !!(e.highlightImage || e.highlight?.image || e.fill && !d(e.fill))))) return !1;
7444
+ let e = 2048 / cr.superSample / 1.5, t = this.base.characters;
7445
+ for (let n = 0; n < t.length; n++) {
7446
+ let r = t[n].computedStyle;
7447
+ if (typeof r.color != "string" || r.fontSize > e) return !1;
7448
+ }
7449
+ return !0;
7450
+ }
7451
+ _atlasDraw(e) {
7452
+ let t = cr, n = this.base.characters, r = /* @__PURE__ */ new Map();
7453
+ for (let e = 0; e < n.length; e++) {
7454
+ let i = n[e], a = i.glyphBox;
7455
+ if (!a || a.width <= 0 || a.height <= 0) continue;
7456
+ let o = i.computedStyle, s = o.color;
7457
+ if (typeof s != "string") return !1;
7458
+ let c = +(o.fontStyle === "italic"), l = `${i.content}|${o.fontFamily}|${o.fontSize}|${o.fontWeight ?? 400}|${c}|${s}`, u = a.left, d = a.top, f = t.acquire(l, a.width, a.height, (e) => {
7459
+ e.translate(-u, -d), i.path.drawTo(e, {
7460
+ fill: s,
7461
+ fillRule: "nonzero",
7462
+ stroke: "none"
7463
+ });
7464
+ });
7465
+ if (!f) return !1;
7466
+ let p = r.get(f.texture);
7467
+ p || (p = {
7468
+ v: [],
7469
+ uv: [],
7470
+ idx: [],
7471
+ n: 0
7472
+ }, r.set(f.texture, p));
7473
+ let m = p.n * 4, h = u + a.width, g = d + a.height;
7474
+ p.v.push(u, d, h, d, h, g, u, g), p.uv.push(f.u0, f.v0, f.u1, f.v0, f.u1, f.v1, f.u0, f.v1), p.idx.push(m, m + 1, m + 2, m, m + 2, m + 3), p.n++;
7475
+ }
7476
+ for (let [t, n] of r) n.n && (e.fillStyle = t, e.drawMesh(n.v, n.uv, n.idx));
7477
+ return !0;
7478
+ }
7341
7479
  draw() {
7342
7480
  let e = this._parent.context;
7343
- this.useTextureDraw() ? this._textureDraw(e) : this._pathDraw(e);
7481
+ this._atlasEligible && this._atlasDraw(e) || (this.useTextureDraw() ? (this._textureStale && this._rasterTexture(), this._textureDraw(e)) : this._pathDraw(e));
7344
7482
  }
7345
7483
  process(e) {}
7346
7484
  };
7347
- j([_({ fallback: !0 }), A("design:type", Object)], Z.prototype, "enabled", void 0), j([_({ fallback: () => [] }), A("design:type", Object)], Z.prototype, "content", void 0), j([_({ alias: "_parent.style.json" }), A("design:type", Object)], Z.prototype, "style", void 0), j([_(), A("design:type", Object)], Z.prototype, "effects", void 0), j([_(), A("design:type", Object)], Z.prototype, "fill", void 0), j([_(), A("design:type", Object)], Z.prototype, "outline", void 0), j([_(), A("design:type", Object)], Z.prototype, "deformation", void 0), j([_({ alias: "base.measureDom" }), A("design:type", typeof HTMLElement > "u" ? Object : HTMLElement)], Z.prototype, "measureDom", void 0), j([_({ alias: "base.fonts" }), A("design:type", Object)], Z.prototype, "fonts", void 0), j([_({ fallback: "auto" }), A("design:type", Object)], Z.prototype, "drawMode", void 0);
7485
+ A([_({ fallback: !0 }), k("design:type", Object)], Z.prototype, "enabled", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Z.prototype, "content", void 0), A([_({ alias: "_parent.style.json" }), k("design:type", Object)], Z.prototype, "style", void 0), A([_(), k("design:type", Object)], Z.prototype, "effects", void 0), A([_(), k("design:type", Object)], Z.prototype, "fill", void 0), A([_(), k("design:type", Object)], Z.prototype, "outline", void 0), A([_(), k("design:type", Object)], Z.prototype, "deformation", void 0), A([_({ alias: "base.measureDom" }), k("design:type", typeof HTMLElement > "u" ? Object : HTMLElement)], Z.prototype, "measureDom", void 0), A([_({ alias: "base.fonts" }), k("design:type", Object)], Z.prototype, "fonts", void 0), A([_({ fallback: "auto" }), k("design:type", Object)], Z.prototype, "drawMode", void 0);
7348
7486
  //#endregion
7349
7487
  //#region src/scene/2d/element/Flexbox.ts
7350
7488
  var Q = {
@@ -7357,11 +7495,11 @@ var Q = {
7357
7495
  horizontal: 6,
7358
7496
  vertical: 7,
7359
7497
  all: 8
7360
- }, zi = {
7498
+ }, qi = {
7361
7499
  column: 0,
7362
7500
  row: 1,
7363
7501
  all: 2
7364
- }, Bi = {
7502
+ }, Ji = {
7365
7503
  auto: 0,
7366
7504
  "flex-start": 1,
7367
7505
  center: 2,
@@ -7371,74 +7509,74 @@ var Q = {
7371
7509
  "space-between": 6,
7372
7510
  "space-around": 7,
7373
7511
  "space-evenly": 8
7374
- }, Vi = {
7512
+ }, Yi = {
7375
7513
  flex: 0,
7376
7514
  none: 1,
7377
7515
  contents: 2
7378
- }, Hi = {
7516
+ }, Xi = {
7379
7517
  inherit: 0,
7380
7518
  ltr: 1,
7381
7519
  rtl: 2
7382
- }, Ui = {
7520
+ }, Zi = {
7383
7521
  column: 0,
7384
7522
  "column-reverse": 1,
7385
7523
  row: 2,
7386
7524
  "row-reverse": 3
7387
- }, Wi = {
7525
+ }, Qi = {
7388
7526
  "no-wrap": 0,
7389
7527
  wrap: 1,
7390
7528
  "Wrap-reverse": 2
7391
- }, Gi = {
7529
+ }, $i = {
7392
7530
  "flex-start": 0,
7393
7531
  center: 1,
7394
7532
  "flex-end": 2,
7395
7533
  "space-between": 3,
7396
7534
  "space-around": 4,
7397
7535
  "space-evenly": 5
7398
- }, Ki = {
7536
+ }, ea = {
7399
7537
  visible: 0,
7400
7538
  hidden: 1,
7401
7539
  scroll: 2
7402
- }, qi = {
7540
+ }, ta = {
7403
7541
  static: 0,
7404
7542
  relative: 1,
7405
7543
  absolute: 2
7406
- }, Ji = {
7544
+ }, na = {
7407
7545
  "border-box": 0,
7408
7546
  "content-box": 1
7409
- }, Yi = class e {
7547
+ }, ra = class e {
7410
7548
  _parent;
7411
7549
  static _yoga;
7412
7550
  static async load() {
7413
7551
  let { loadYoga: e } = await import("yoga-layout/load");
7414
7552
  this._yoga = await e();
7415
7553
  }
7416
- node = e._yoga ? Dt(e._yoga.Node.create()) : void 0;
7554
+ node = e._yoga ? Ot(e._yoga.Node.create()) : void 0;
7417
7555
  constructor(e) {
7418
7556
  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);
7419
7557
  }
7420
7558
  _addChild(e, t) {
7421
- if (e instanceof ea && e.flexbox.node && this.node) {
7559
+ if (e instanceof la && e.flexbox.node && this.node) {
7422
7560
  this.node.insertChild(e.flexbox.node, t);
7423
7561
  let n = e.style.getProperties();
7424
7562
  for (let t in n) e.flexbox.updateStyleProperty(t, n[t]);
7425
7563
  }
7426
7564
  }
7427
7565
  _removeChild(e, t) {
7428
- e instanceof ea && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7566
+ e instanceof la && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7429
7567
  }
7430
7568
  updateStyleProperty(e, t) {
7431
7569
  let n = this.node;
7432
7570
  if (n) {
7433
7571
  switch (e) {
7434
7572
  case "alignContent":
7435
- n.setAlignContent(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7573
+ n.setAlignContent(t ? Ji[t] ?? Ji["flex-start"] : Ji["flex-start"]);
7436
7574
  break;
7437
7575
  case "alignItems":
7438
- n.setAlignItems(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7576
+ n.setAlignItems(t ? Ji[t] ?? Ji["flex-start"] : Ji["flex-start"]);
7439
7577
  break;
7440
7578
  case "alignSelf":
7441
- n.setAlignSelf(t ? Bi[t] ?? Bi["flex-start"] : Bi["flex-start"]);
7579
+ n.setAlignSelf(t ? Ji[t] ?? Ji["flex-start"] : Ji["flex-start"]);
7442
7580
  break;
7443
7581
  case "aspectRatio":
7444
7582
  n.setAspectRatio(t);
@@ -7459,10 +7597,10 @@ var Q = {
7459
7597
  n.setBorder(Q.all, this._parent.style.borderWidth);
7460
7598
  break;
7461
7599
  case "direction":
7462
- n.setDirection(t ? Hi[t] ?? Hi.inherit : Hi.inherit);
7600
+ n.setDirection(t ? Xi[t] ?? Xi.inherit : Xi.inherit);
7463
7601
  break;
7464
7602
  case "display":
7465
- n.setDisplay(t ? Vi[t] ?? Vi.flex : Vi.flex);
7603
+ n.setDisplay(t ? Yi[t] ?? Yi.flex : Yi.flex);
7466
7604
  break;
7467
7605
  case "flex":
7468
7606
  n.setFlex(t);
@@ -7471,7 +7609,7 @@ var Q = {
7471
7609
  n.setFlexBasis(t);
7472
7610
  break;
7473
7611
  case "flexDirection":
7474
- n.setFlexDirection(t ? Ui[t] ?? Ui.row : Ui.row);
7612
+ n.setFlexDirection(t ? Zi[t] ?? Zi.row : Zi.row);
7475
7613
  break;
7476
7614
  case "flexGrow":
7477
7615
  n.setFlexGrow(t);
@@ -7480,16 +7618,16 @@ var Q = {
7480
7618
  n.setFlexShrink(t);
7481
7619
  break;
7482
7620
  case "flexWrap":
7483
- n.setFlexWrap(t ? Wi[t] ?? Wi.wrap : Wi.wrap);
7621
+ n.setFlexWrap(t ? Qi[t] ?? Qi.wrap : Qi.wrap);
7484
7622
  break;
7485
7623
  case "height":
7486
7624
  n.setHeight(t);
7487
7625
  break;
7488
7626
  case "justifyContent":
7489
- n.setJustifyContent(t ? Gi[t] ?? Gi["flex-start"] : Gi["flex-start"]);
7627
+ n.setJustifyContent(t ? $i[t] ?? $i["flex-start"] : $i["flex-start"]);
7490
7628
  break;
7491
7629
  case "gap":
7492
- t !== void 0 && n.setGap(zi.all, t);
7630
+ t !== void 0 && n.setGap(qi.all, t);
7493
7631
  break;
7494
7632
  case "marginTop":
7495
7633
  n.setMargin(Q.top, t);
@@ -7519,7 +7657,7 @@ var Q = {
7519
7657
  n.setMinWidth(t);
7520
7658
  break;
7521
7659
  case "overflow":
7522
- n.setOverflow(t ? Ki[t] ?? Ki.visible : Ki.visible);
7660
+ n.setOverflow(t ? ea[t] ?? ea.visible : ea.visible);
7523
7661
  break;
7524
7662
  case "paddingTop":
7525
7663
  n.setPadding(Q.top, t);
@@ -7549,10 +7687,10 @@ var Q = {
7549
7687
  n.setPosition(Q.right, t);
7550
7688
  break;
7551
7689
  case "position":
7552
- n.setPositionType(t ? qi[t] ?? qi.relative : qi.relative);
7690
+ n.setPositionType(t ? ta[t] ?? ta.relative : ta.relative);
7553
7691
  break;
7554
7692
  case "boxSizing":
7555
- n.setBoxSizing(t ? Ji[t] ?? Ji["content-box"] : Ji["content-box"]);
7693
+ n.setBoxSizing(t ? na[t] ?? na["content-box"] : na["content-box"]);
7556
7694
  break;
7557
7695
  case "width":
7558
7696
  n.setWidth(t);
@@ -7563,7 +7701,7 @@ var Q = {
7563
7701
  }
7564
7702
  update() {
7565
7703
  let e = this._parent, t = this.node;
7566
- if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Hi.ltr), t.hasNewLayout())) {
7704
+ if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, Xi.ltr), t.hasNewLayout())) {
7567
7705
  let { left: n, top: r, width: i, height: a } = t.getComputedLayout();
7568
7706
  (!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();
7569
7707
  }
@@ -7571,13 +7709,13 @@ var Q = {
7571
7709
  destroy() {
7572
7710
  this.node?.free(), this.node = void 0;
7573
7711
  }
7574
- }, Xi = new Set(Object.keys(a())), Zi = new Set(Object.keys(s())), Qi = new x(), $i = [
7712
+ }, ia = new Set(Object.keys(a())), aa = new Set(Object.keys(s())), oa = /* @__PURE__ */ new Set(["left", "top"]), sa = new x(), ca = [
7575
7713
  [0, 0],
7576
7714
  [1, 0],
7577
7715
  [1, 1],
7578
7716
  [0, 1]
7579
- ], ea = class extends Dr {
7580
- flexbox = new Yi(this);
7717
+ ], la = class extends jr {
7718
+ flexbox = new ra(this);
7581
7719
  aabb = new yt();
7582
7720
  globalAabb = new yt();
7583
7721
  _parentGlobalDisplay;
@@ -7590,7 +7728,7 @@ var Q = {
7590
7728
  });
7591
7729
  _allowPointerEvents = !0;
7592
7730
  _overflowHidden = !1;
7593
- _style = new Pi().on("updateProperty", (...e) => {
7731
+ _style = new Ri().on("updateProperty", (...e) => {
7594
7732
  this.onUpdateStyleProperty(e[0], e[1], e[2]);
7595
7733
  });
7596
7734
  get style() {
@@ -7604,14 +7742,14 @@ var Q = {
7604
7742
  this._endBatch();
7605
7743
  }
7606
7744
  }
7607
- _background = new Si(this);
7745
+ _background = new Ei(this);
7608
7746
  get background() {
7609
7747
  return this._background;
7610
7748
  }
7611
7749
  set background(e) {
7612
7750
  this._background.resetProperties().setProperties(e);
7613
7751
  }
7614
- _shape = new Ni(this);
7752
+ _shape = new Li(this);
7615
7753
  get shape() {
7616
7754
  return this._shape;
7617
7755
  }
@@ -7625,14 +7763,14 @@ var Q = {
7625
7763
  set fill(e) {
7626
7764
  this._fill.resetProperties().setProperties(e);
7627
7765
  }
7628
- _outline = new ji(this);
7766
+ _outline = new Fi(this);
7629
7767
  get outline() {
7630
7768
  return this._outline;
7631
7769
  }
7632
7770
  set outline(e) {
7633
7771
  this._outline.resetProperties().setProperties(e);
7634
7772
  }
7635
- _foreground = new ki(this);
7773
+ _foreground = new Ni(this);
7636
7774
  get foreground() {
7637
7775
  return this._foreground;
7638
7776
  }
@@ -7646,21 +7784,21 @@ var Q = {
7646
7784
  set text(e) {
7647
7785
  this._text.resetProperties().setProperties(e);
7648
7786
  }
7649
- _shadow = new Mi(this);
7787
+ _shadow = new Ii(this);
7650
7788
  get shadow() {
7651
7789
  return this._shadow;
7652
7790
  }
7653
7791
  set shadow(e) {
7654
7792
  this._shadow.resetProperties().setProperties(e);
7655
7793
  }
7656
- _connection = new Di(this);
7794
+ _connection = new ji(this);
7657
7795
  get connection() {
7658
7796
  return this._connection;
7659
7797
  }
7660
7798
  set connection(e) {
7661
7799
  this._connection.resetProperties().setProperties(e);
7662
7800
  }
7663
- _table = new Ri(this);
7801
+ _table = new Hi(this);
7664
7802
  get table() {
7665
7803
  return this._table;
7666
7804
  }
@@ -7674,7 +7812,7 @@ var Q = {
7674
7812
  set chart(e) {
7675
7813
  this._chart.resetProperties().setProperties(e);
7676
7814
  }
7677
- _comments = new Ei(this);
7815
+ _comments = new Ai(this);
7678
7816
  get comments() {
7679
7817
  return this._comments;
7680
7818
  }
@@ -7744,6 +7882,14 @@ var Q = {
7744
7882
  _updateGlobalDisplay() {
7745
7883
  this._parentGlobalDisplay = this.getParent()?.globalDisplay, this._globalDisplay = this.style.display ?? this._parentGlobalDisplay;
7746
7884
  }
7885
+ batch(e) {
7886
+ this._beginBatch();
7887
+ try {
7888
+ e();
7889
+ } finally {
7890
+ this._endBatch();
7891
+ }
7892
+ }
7747
7893
  _beginBatch() {
7748
7894
  this._batchDepth++;
7749
7895
  }
@@ -7759,7 +7905,7 @@ var Q = {
7759
7905
  this._updateGlobalDisplay();
7760
7906
  break;
7761
7907
  case "rotate":
7762
- this.rotation = (t || 0) * bt, this.updateGlobalTransform();
7908
+ this.rotation = (t || 0) * xt, this.updateGlobalTransform();
7763
7909
  break;
7764
7910
  case "scaleX":
7765
7911
  this.scale.x = t, this.text.isValid() && (t ^ n) < 0 && this.requestDraw();
@@ -7780,7 +7926,7 @@ var Q = {
7780
7926
  }), this.extraTransform.translate(this.pivot.x, this.pivot.y), this.updateGlobalTransform();
7781
7927
  break;
7782
7928
  case "transformOrigin": {
7783
- let e = Rr(t ?? "");
7929
+ let e = Hr(t ?? "");
7784
7930
  this.pivot.set(e[0] * this.size.width, e[1] * this.size.height);
7785
7931
  break;
7786
7932
  }
@@ -7824,7 +7970,7 @@ var Q = {
7824
7970
  this.requestDraw();
7825
7971
  break;
7826
7972
  }
7827
- 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);
7973
+ if ((aa.has(e) || ia.has(e)) && !oa.has(e) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7828
7974
  else switch (e) {
7829
7975
  case "left":
7830
7976
  this.position.x = Number(t);
@@ -7868,10 +8014,10 @@ var Q = {
7868
8014
  }
7869
8015
  _intersectsViewport(e) {
7870
8016
  let t = e.canvasTransform, n = e.width, r = e.height, i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
7871
- for (let [e, c] of $i) t.applyAffineInverse({
8017
+ for (let [e, c] of ca) t.applyAffineInverse({
7872
8018
  x: e * n,
7873
8019
  y: c * r
7874
- }, 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);
8020
+ }, sa), i = Math.min(i, sa.x), a = Math.max(a, sa.x), o = Math.min(o, sa.y), s = Math.max(s, sa.y);
7875
8021
  let c = a - i, l = s - o, { min: u, size: d } = this.globalAabb;
7876
8022
  return !(u.x > a + c || u.x + d.x < i - c || u.y > s + l || u.y + d.y < o - l);
7877
8023
  }
@@ -7886,13 +8032,13 @@ var Q = {
7886
8032
  }
7887
8033
  _applyColorFilter() {
7888
8034
  let e = [this._styleFilter, this._elementFilter].filter(Boolean).join(" ").trim();
7889
- e ? (this._colorFilterEffect || (this._colorFilterEffect = new Vr({
8035
+ e ? (this._colorFilterEffect || (this._colorFilterEffect = new Gr({
7890
8036
  name: "styleFilter",
7891
8037
  internalMode: "front"
7892
8038
  }), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = e) : (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender());
7893
8039
  }
7894
8040
  _updateStyleMaskImage(e) {
7895
- d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new pi({
8041
+ d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new _i({
7896
8042
  name: "styleMaskImage",
7897
8043
  internalMode: "back"
7898
8044
  }), this.append(this._maskEffect)), this._maskEffect.image = e);
@@ -7923,11 +8069,11 @@ var Q = {
7923
8069
  }
7924
8070
  getObb() {
7925
8071
  let e = this.pivot, t = this.transform.apply(e).sub(e);
7926
- return new Ct(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
8072
+ return new wt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
7927
8073
  }
7928
8074
  getGlobalObb() {
7929
8075
  let e = this.pivot, t = this.globalTransform.apply(e).sub(e);
7930
- return new Ct(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
8076
+ return new wt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
7931
8077
  }
7932
8078
  _draw() {
7933
8079
  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();
@@ -7982,10 +8128,10 @@ var Q = {
7982
8128
  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;
7983
8129
  }
7984
8130
  };
7985
- ea = j([S("Element2D"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ea);
8131
+ la = A([S("Element2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], la);
7986
8132
  //#endregion
7987
8133
  //#region src/scene/2d/TextureRect2D.ts
7988
- var ta = class extends ea {
8134
+ var ua = class extends la {
7989
8135
  texture;
7990
8136
  region;
7991
8137
  constructor(e, t = []) {
@@ -8008,8 +8154,8 @@ var ta = class extends ea {
8008
8154
  } });
8009
8155
  }
8010
8156
  }
8011
- }, na = class extends ta {
8012
- texture = new rr();
8157
+ }, da = class extends ua {
8158
+ texture = new ir();
8013
8159
  animation;
8014
8160
  _lastTime = NaN;
8015
8161
  constructor(e, t = []) {
@@ -8039,10 +8185,10 @@ var ta = class extends ea {
8039
8185
  this.currentTime !== this._lastTime && (this._lastTime = this.currentTime, this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpdate("source"), this.requestDraw()), super._process(e);
8040
8186
  }
8041
8187
  };
8042
- j([_({ fallback: "" }), A("design:type", String)], na.prototype, "src", void 0), na = j([S("Lottie2D"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], na);
8188
+ A([_({ fallback: "" }), k("design:type", String)], da.prototype, "src", void 0), da = A([S("Lottie2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], da);
8043
8189
  //#endregion
8044
8190
  //#region src/scene/2d/Mesh2D.ts
8045
- var ra = class extends ea {
8191
+ var fa = class extends la {
8046
8192
  texture;
8047
8193
  _vertices = /* @__PURE__ */ new Float32Array();
8048
8194
  _uvs = /* @__PURE__ */ new Float32Array();
@@ -8073,7 +8219,7 @@ var ra = class extends ea {
8073
8219
  _drawContent() {
8074
8220
  this.texture?.isValid() && this._indices.length && this._vertices.length && (this.context.fillStyle = this.texture, this.context.drawMesh(this._vertices, this._uvs, this._indices));
8075
8221
  }
8076
- }, ia = class extends ea {
8222
+ }, pa = class extends la {
8077
8223
  constructor(e, t = []) {
8078
8224
  super(), this.setProperties(e).append(t);
8079
8225
  }
@@ -8086,20 +8232,20 @@ var ra = class extends ea {
8086
8232
  }
8087
8233
  }
8088
8234
  _drawCircle(e, t) {
8089
- this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.fillStyle = V.WHITE, this.context.fill(), this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8235
+ this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.fillStyle = B.WHITE, this.context.fill(), this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8090
8236
  }
8091
8237
  _drawEllipse(e, t) {
8092
- this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.fillStyle = V.WHITE, this.context.fill(), this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8238
+ this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.fillStyle = B.WHITE, this.context.fill(), this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8093
8239
  }
8094
8240
  _draw() {
8095
8241
  let { width: e, height: t } = this.getRect();
8096
8242
  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);
8097
8243
  }
8098
8244
  };
8099
- j([_({ fallback: 6 }), A("design:type", Number)], ia.prototype, "handleSize", void 0);
8245
+ A([_({ fallback: 6 }), k("design:type", Number)], pa.prototype, "handleSize", void 0);
8100
8246
  //#endregion
8101
8247
  //#region src/scene/2d/Video2D.ts
8102
- var aa = class extends ta {
8248
+ var ma = class extends ua {
8103
8249
  get videoDuration() {
8104
8250
  return (this.texture?.duration ?? 0) * 1e3;
8105
8251
  }
@@ -8139,24 +8285,24 @@ var aa = class extends ta {
8139
8285
  }
8140
8286
  let n = Math.max(0, this.currentTime % t) / 1e3, r = this._timeline, i = r?.playbackRate ?? 1;
8141
8287
  if (r?.playing && i > 0) {
8142
- e.muted = !0, e.loop = this.loop, e.playbackRate = O(i, .0625, 16), e.paused && e.isReady && e.play();
8288
+ e.muted = !0, e.loop = this.loop, e.playbackRate = D(i, .0625, 16), e.paused && e.isReady && e.play();
8143
8289
  let t = Math.abs(e.currentTime - n);
8144
- !e.seeking && t > Math.max(.3, O(i, 1, 16) * .2) && (e.currentTime = n);
8290
+ !e.seeking && t > Math.max(.3, D(i, 1, 16) * .2) && (e.currentTime = n);
8145
8291
  } else e.paused || e.pause(), !e.isPlaying && !e.seeking && e.currentTime !== n && (e.currentTime = n, $.awaitBy(() => e.waitSeek(this._loadAbort?.signal)));
8146
8292
  }
8147
8293
  _process(e) {
8148
8294
  super._process(e), this._updateVideoCurrentTime();
8149
8295
  }
8150
8296
  };
8151
- j([_({ fallback: "" }), A("design:type", String)], aa.prototype, "src", void 0), aa = j([S("Video2D"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], aa);
8297
+ A([_({ fallback: "" }), k("design:type", String)], ma.prototype, "src", void 0), ma = A([S("Video2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ma);
8152
8298
  //#endregion
8153
8299
  //#region src/scene/animation/Animation.ts
8154
- function oa(e) {
8300
+ function ha(e) {
8155
8301
  if (e == null) return 0;
8156
8302
  let t = String(e).trim(), n = Number.parseFloat(t);
8157
8303
  return Number.isNaN(n) ? 0 : n / 100;
8158
8304
  }
8159
- function sa(e, t) {
8305
+ function ga(e, t) {
8160
8306
  let n = t * 180 / Math.PI;
8161
8307
  if (e == null || e === "auto") return n;
8162
8308
  let r = String(e).trim();
@@ -8165,11 +8311,11 @@ function sa(e, t) {
8165
8311
  let i = Number.parseFloat(r);
8166
8312
  return Number.isNaN(i) ? n : i;
8167
8313
  }
8168
- function ca(e) {
8314
+ function _a(e) {
8169
8315
  let t = e.trim(), n = /^path\((.*)\)$/s.exec(t);
8170
8316
  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();
8171
8317
  }
8172
- function la(e, t, n, r) {
8318
+ function va(e, t, n, r) {
8173
8319
  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;
8174
8320
  function m(e) {
8175
8321
  let t = e, n, r;
@@ -8189,7 +8335,7 @@ function la(e, t, n, r) {
8189
8335
  }
8190
8336
  return (e) => p(m(e));
8191
8337
  }
8192
- var ua = {
8338
+ var ya = {
8193
8339
  linear: [
8194
8340
  0,
8195
8341
  0,
@@ -8256,7 +8402,7 @@ var ua = {
8256
8402
  .355,
8257
8403
  1
8258
8404
  ]
8259
- }, da = Object.fromEntries(Object.entries(ua).map(([e, [t, n, r, i]]) => [e, la(t, n, r, i)])), fa = class extends U {
8405
+ }, ba = Object.fromEntries(Object.entries(ya).map(([e, [t, n, r, i]]) => [e, va(t, n, r, i)])), xa = class extends U {
8260
8406
  _keyframes = [];
8261
8407
  _isFirstUpdatePosition = !1;
8262
8408
  _cachedProps = new t();
@@ -8292,7 +8438,7 @@ var ua = {
8292
8438
  e = [this.getParent()].filter(Boolean);
8293
8439
  break;
8294
8440
  }
8295
- return e.filter((e) => e instanceof ea);
8441
+ return e.filter((e) => e instanceof la);
8296
8442
  }
8297
8443
  _updateKeyframes() {
8298
8444
  this._pathMeasures.clear();
@@ -8325,7 +8471,7 @@ var ua = {
8325
8471
  }
8326
8472
  let e = this._getTargets(), t = 1 / e.length, n = this.currentTimeProgress;
8327
8473
  e.forEach((e, r) => {
8328
- let i = t === 1 ? n : O(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8474
+ let i = t === 1 ? n : D(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8329
8475
  if (!a) return;
8330
8476
  let o = this._parseKeyframes(i, a);
8331
8477
  o?.length && this._commitStyle(i, e, a, o[0], o[1]);
@@ -8343,14 +8489,14 @@ var ua = {
8343
8489
  });
8344
8490
  }
8345
8491
  _parseEasing(e) {
8346
- if (!e) return da.linear;
8347
- if (e in da) return da[e];
8492
+ if (!e) return ba.linear;
8493
+ if (e in ba) return ba[e];
8348
8494
  let t = /cubic-bezier\((.+)\)/.exec(e);
8349
8495
  if (t) {
8350
8496
  let e = t[1].split(",").map((e) => Number(e));
8351
- if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return la(e[0], e[1], e[2], e[3]);
8497
+ if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return va(e[0], e[1], e[2], e[3]);
8352
8498
  }
8353
- return da.linear;
8499
+ return ba.linear;
8354
8500
  }
8355
8501
  _parseKeyframes(e, t) {
8356
8502
  let n, r = this._keyframes;
@@ -8385,7 +8531,7 @@ var ua = {
8385
8531
  });
8386
8532
  }
8387
8533
  _commitOffsetPath(e, t, n, r, i, a) {
8388
- let o = ca(t);
8534
+ let o = _a(t);
8389
8535
  if (!o) return;
8390
8536
  let s = this._pathMeasures.get(o);
8391
8537
  if (!s) {
@@ -8396,7 +8542,7 @@ var ua = {
8396
8542
  startY: t.y
8397
8543
  }, this._pathMeasures.set(o, s);
8398
8544
  }
8399
- let c = O(k(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");
8545
+ let c = D(O(ha(r.offsetDistance ?? i.offsetDistance), ha(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 = ga(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8400
8546
  e.onUpdateStyleProperty("transform", `${m ? `${m} ` : ""}translate(${d}px, ${f}px) rotate(${p}deg)`, void 0);
8401
8547
  }
8402
8548
  _getDiffValue(e, t, n, r, i) {
@@ -8417,10 +8563,10 @@ var ua = {
8417
8563
  let a = Math.max(t[e]?.length ?? 0, n[e]?.length ?? 0), o = t[e], s = n[e];
8418
8564
  i += `${e}(${Array.from({ length: a }, (e, t) => {
8419
8565
  let n = o?.[t], i = s?.[t], a = n?.normalizedIntValue ?? 0, c = i?.normalizedIntValue ?? 0;
8420
- return Number.isNaN(a) || Number.isNaN(c) ? i?.value ?? 0 : k(a, c, r);
8566
+ return Number.isNaN(a) || Number.isNaN(c) ? i?.value ?? 0 : O(a, c, r);
8421
8567
  }).join(", ")}) `;
8422
8568
  }), i;
8423
- } else if (!Array.isArray(a) && !Array.isArray(o)) return Number.isNaN(a.normalizedIntValue) || Number.isNaN(o.normalizedIntValue) ? o.value : k(a.normalizedIntValue, o.normalizedIntValue, r);
8569
+ } else if (!Array.isArray(a) && !Array.isArray(o)) return Number.isNaN(a.normalizedIntValue) || Number.isNaN(o.normalizedIntValue) ? o.value : O(a.normalizedIntValue, o.normalizedIntValue, r);
8424
8570
  }
8425
8571
  isPlaying() {
8426
8572
  return !this.paused && this.isInsideTimeRange();
@@ -8443,14 +8589,14 @@ var ua = {
8443
8589
  });
8444
8590
  }
8445
8591
  };
8446
- j([_({ fallback: "parent" }), A("design:type", Object)], fa.prototype, "effectMode", void 0), j([_({ default: () => [] }), A("design:type", Array)], fa.prototype, "keyframes", void 0), j([_(), A("design:type", Object)], fa.prototype, "easing", void 0), fa = j([S("Animation", {
8592
+ A([_({ fallback: "parent" }), k("design:type", Object)], xa.prototype, "effectMode", void 0), A([_({ default: () => [] }), k("design:type", Array)], xa.prototype, "keyframes", void 0), A([_(), k("design:type", Object)], xa.prototype, "easing", void 0), xa = A([S("Animation", {
8447
8593
  renderMode: "disabled",
8448
8594
  processSortMode: "parent-before",
8449
8595
  duration: 2e3
8450
- }), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], fa);
8596
+ }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], xa);
8451
8597
  //#endregion
8452
8598
  //#region src/scene/audio/html/HTMLAudioContext.ts
8453
- var pa = class t extends e {
8599
+ var Sa = class t extends e {
8454
8600
  static _instance;
8455
8601
  static get instance() {
8456
8602
  return this._instance ||= new t(), this._instance;
@@ -8480,7 +8626,7 @@ var pa = class t extends e {
8480
8626
  togglePause() {
8481
8627
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
8482
8628
  }
8483
- }, ma = class t extends e {
8629
+ }, Ca = class t extends e {
8484
8630
  static PADDING = .1;
8485
8631
  _source = null;
8486
8632
  _audio = null;
@@ -8607,7 +8753,7 @@ var pa = class t extends e {
8607
8753
  let e = this._source;
8608
8754
  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);
8609
8755
  }
8610
- }, ha = class {
8756
+ }, wa = class {
8611
8757
  parent;
8612
8758
  source = new globalThis.Audio();
8613
8759
  _src = "";
@@ -8624,7 +8770,7 @@ var pa = class t extends e {
8624
8770
  return !!this.source && this.source.readyState === 4;
8625
8771
  }
8626
8772
  get context() {
8627
- return pa.instance;
8773
+ return Sa.instance;
8628
8774
  }
8629
8775
  constructor(e) {
8630
8776
  this.parent = e;
@@ -8635,9 +8781,9 @@ var pa = class t extends e {
8635
8781
  });
8636
8782
  }
8637
8783
  createSound() {
8638
- return new ma();
8784
+ return new Ca();
8639
8785
  }
8640
- }, ga = class extends e {
8786
+ }, Ta = class extends e {
8641
8787
  _input;
8642
8788
  _output;
8643
8789
  _processers = [];
@@ -8659,7 +8805,7 @@ var pa = class t extends e {
8659
8805
  get destination() {
8660
8806
  return this._input;
8661
8807
  }
8662
- }, _a = class {
8808
+ }, Ea = class {
8663
8809
  destination;
8664
8810
  source;
8665
8811
  constructor(e, t = null) {
@@ -8674,21 +8820,21 @@ var pa = class t extends e {
8674
8820
  };
8675
8821
  //#endregion
8676
8822
  //#region src/scene/audio/web/WebAudioContext.ts
8677
- function va() {
8823
+ function Da() {
8678
8824
  if (He) return new AudioContext();
8679
8825
  if (Ue) {
8680
8826
  let e = globalThis.webkitAudioContext;
8681
8827
  return new e();
8682
8828
  } else throw Error("Failed to createAudioContext");
8683
8829
  }
8684
- function ya(e, t, n) {
8830
+ function Oa(e, t, n) {
8685
8831
  if (We) return new OfflineAudioContext(e, t, n);
8686
8832
  if (Ge) {
8687
8833
  let r = globalThis.webkitOfflineAudioContext;
8688
8834
  return new r(e, t, n);
8689
8835
  } else throw Error("Failed to createOfflineAudioContext");
8690
8836
  }
8691
- var ba = class e extends ga {
8837
+ var ka = class e extends Ta {
8692
8838
  static _instance;
8693
8839
  static get instance() {
8694
8840
  return this._instance ||= new e(), this._instance;
@@ -8729,7 +8875,7 @@ var ba = class e extends ga {
8729
8875
  _compressor;
8730
8876
  _analyser;
8731
8877
  constructor() {
8732
- let e = va(), t = ya(1, 2, We ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8878
+ let e = Da(), t = Oa(1, 2, We ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
8733
8879
  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));
8734
8880
  }
8735
8881
  _onFocus() {
@@ -8770,7 +8916,7 @@ var ba = class e extends ga {
8770
8916
  setParamValue(e, t) {
8771
8917
  e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
8772
8918
  }
8773
- }, xa = class extends e {
8919
+ }, Aa = class extends e {
8774
8920
  _audio = null;
8775
8921
  _sourceNode = null;
8776
8922
  _gain = null;
@@ -8903,7 +9049,7 @@ var ba = class e extends ga {
8903
9049
  destroy() {
8904
9050
  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;
8905
9051
  }
8906
- }, Sa = class extends ga {
9052
+ }, ja = class extends Ta {
8907
9053
  parent;
8908
9054
  _sourceBuffer;
8909
9055
  _sourceNode;
@@ -8911,7 +9057,7 @@ var ba = class e extends ga {
8911
9057
  gain;
8912
9058
  analyser;
8913
9059
  get context() {
8914
- return ba.instance;
9060
+ return ka.instance;
8915
9061
  }
8916
9062
  get isPlayable() {
8917
9063
  return !!this._sourceNode.buffer;
@@ -8926,8 +9072,8 @@ var ba = class e extends ga {
8926
9072
  this._sourceNode.buffer = e;
8927
9073
  }
8928
9074
  constructor(e) {
8929
- let t = ba.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
8930
- 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;
9075
+ let t = ka.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
9076
+ n.connect(i), i.connect(r), r.connect(ka.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
8931
9077
  }
8932
9078
  async load() {
8933
9079
  return this._sourceLoad ||= new Promise((e) => {
@@ -8940,7 +9086,7 @@ var ba = class e extends ga {
8940
9086
  });
8941
9087
  }
8942
9088
  _decode(e) {
8943
- return Promise.resolve(e instanceof AudioBuffer ? e : ba.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
9089
+ return Promise.resolve(e instanceof AudioBuffer ? e : ka.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
8944
9090
  }
8945
9091
  cloneSource() {
8946
9092
  let e = this.context, t = this._sourceNode, n = e.audioContext.createBufferSource(), r = e.audioContext.createGain();
@@ -8950,15 +9096,15 @@ var ba = class e extends ga {
8950
9096
  };
8951
9097
  }
8952
9098
  createSound() {
8953
- return new xa();
9099
+ return new Aa();
8954
9100
  }
8955
- }, Ca, wa = class extends U {
9101
+ }, Ma, Na = class extends U {
8956
9102
  static {
8957
- Ca = this;
9103
+ Ma = this;
8958
9104
  }
8959
9105
  static _soundPool = [];
8960
9106
  _sounds = [];
8961
- _platformAudio = Ke ? new Sa(this) : new ha(this);
9107
+ _platformAudio = Ke ? new ja(this) : new wa(this);
8962
9108
  get platformAudio() {
8963
9109
  return this._platformAudio;
8964
9110
  }
@@ -9051,7 +9197,7 @@ var ba = class e extends ga {
9051
9197
  this._sounds.length = 0;
9052
9198
  }
9053
9199
  _createSound() {
9054
- return Ca._soundPool.length > 0 ? Ca._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9200
+ return Ma._soundPool.length > 0 ? Ma._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9055
9201
  }
9056
9202
  refresh() {
9057
9203
  for (let e = this._sounds.length, t = 0; t < e; t++) this._sounds[t].refresh();
@@ -9067,7 +9213,7 @@ var ba = class e extends ga {
9067
9213
  this._recycleSound(e);
9068
9214
  };
9069
9215
  _recycleSound(e) {
9070
- e.destroy(), Ca._soundPool.includes(e) || Ca._soundPool.push(e);
9216
+ e.destroy(), Ma._soundPool.includes(e) || Ma._soundPool.push(e);
9071
9217
  }
9072
9218
  _prevTime = 0;
9073
9219
  _timer = 0;
@@ -9083,14 +9229,14 @@ var ba = class e extends ga {
9083
9229
  }, 100);
9084
9230
  }
9085
9231
  };
9086
- wa = Ca = j([S("Audio"), A("design:paramtypes", [Object])], wa);
9232
+ Na = Ma = A([S("Audio"), k("design:paramtypes", [Object])], Na);
9087
9233
  //#endregion
9088
9234
  //#region src/scene/audio/AudioSpectrum.ts
9089
- var Ta = class extends Dr {}, Ea = class extends ea {
9235
+ var Pa = class extends jr {}, Fa = class extends la {
9090
9236
  _audioBuffer;
9091
9237
  _src = (() => {
9092
9238
  let e = w();
9093
- return e ? new V({ source: e }) : void 0;
9239
+ return e ? new B({ source: e }) : void 0;
9094
9240
  })();
9095
9241
  _needsUpdateTexture = !1;
9096
9242
  constructor(e = {}) {
@@ -9110,7 +9256,7 @@ var Ta = class extends Dr {}, Ea = class extends ea {
9110
9256
  }
9111
9257
  }
9112
9258
  async _loadSrc(e) {
9113
- await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => ba.decode(e)).then((e) => {
9259
+ await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => ka.decode(e)).then((e) => {
9114
9260
  this._audioBuffer = e, this.syncTexture(!0);
9115
9261
  });
9116
9262
  }
@@ -9145,16 +9291,16 @@ var Ta = class extends Dr {}, Ea = class extends ea {
9145
9291
  this.syncTexture(), super._process(e);
9146
9292
  }
9147
9293
  };
9148
- j([_(), A("design:type", Object)], Ea.prototype, "src", void 0), j([_({ fallback: 0 }), A("design:type", Number)], Ea.prototype, "gap", void 0), j([_({ fallback: "#000000" }), A("design:type", String)], Ea.prototype, "color", void 0), Ea = j([S("AudioWaveform"), A("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Ea);
9294
+ A([_(), k("design:type", Object)], Fa.prototype, "src", void 0), A([_({ fallback: 0 }), k("design:type", Number)], Fa.prototype, "gap", void 0), A([_({ fallback: "#000000" }), k("design:type", String)], Fa.prototype, "color", void 0), Fa = A([S("AudioWaveform"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Fa);
9149
9295
  //#endregion
9150
9296
  //#region src/scene/transitions/KawaseTransition.ts
9151
- var Da, Oa = class extends Er {
9297
+ var Ia, La = class extends Ar {
9152
9298
  static {
9153
- Da = this;
9299
+ Ia = this;
9154
9300
  }
9155
9301
  blur = 10;
9156
9302
  quality = 10;
9157
- static material = new R({ gl: {
9303
+ static material = new L({ gl: {
9158
9304
  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}",
9159
9305
  fragment: "precision highp float;\nin vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 offset;\nuniform float progress;\n\nvoid main(void) {\n vec2 offset1 = vec2(offset.x - progress * offset.x, offset.y - progress * offset.y);\n vec4 color = vec4(0.0);\n color += texture(sampler, vec2(vUv.x - offset1.x, vUv.y + offset1.y));\n color += texture(sampler, vec2(vUv.x + offset1.x, vUv.y + offset1.y));\n color += texture(sampler, vec2(vUv.x + offset1.x, vUv.y - offset1.y));\n color += texture(sampler, vec2(vUv.x - offset1.x, vUv.y - offset1.y));\n color *= 0.25;\n gl_FragColor = color;\n}"
9160
9306
  } });
@@ -9169,7 +9315,7 @@ var Da, Oa = class extends Er {
9169
9315
  let d = 1 / s, f = 1 / c, p = [], m, h = o - 1;
9170
9316
  for (let e = 0; e < h; e++) m = u[e] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p });
9171
9317
  m = u[h] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p }), l.forEach((t) => {
9172
- z.draw(e, Da.material, {
9318
+ R.draw(e, Ia.material, {
9173
9319
  sampler: r,
9174
9320
  progress: i,
9175
9321
  ...t
@@ -9177,35 +9323,35 @@ var Da, Oa = class extends Er {
9177
9323
  });
9178
9324
  }
9179
9325
  };
9180
- Oa = Da = j([S("KawaseTransition")], Oa);
9326
+ La = Ia = A([S("KawaseTransition")], La);
9181
9327
  //#endregion
9182
9328
  //#region src/scene/transitions/LeftEraseTransition.ts
9183
- var ka, Aa = class extends Er {
9329
+ var Ra, za = class extends Ar {
9184
9330
  static {
9185
- ka = this;
9331
+ Ra = this;
9186
9332
  }
9187
- static material = new R({ gl: {
9333
+ static material = new L({ gl: {
9188
9334
  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}",
9189
9335
  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}"
9190
9336
  } });
9191
9337
  apply(e) {
9192
- z.draw(e, ka.material, {
9338
+ R.draw(e, Ra.material, {
9193
9339
  previous: 0,
9194
9340
  next: 1,
9195
9341
  progress: this.currentTimeProgress
9196
9342
  });
9197
9343
  }
9198
9344
  };
9199
- Aa = ka = j([S("LeftEraseTransition")], Aa);
9345
+ za = Ra = A([S("LeftEraseTransition")], za);
9200
9346
  //#endregion
9201
9347
  //#region src/scene/transitions/TiltShiftTransition.ts
9202
- var ja, Ma = class extends Er {
9348
+ var Ba, Va = class extends Ar {
9203
9349
  static {
9204
- ja = this;
9350
+ Ba = this;
9205
9351
  }
9206
9352
  blur = 100;
9207
9353
  gradientBlur = 600;
9208
- static material = new R({ gl: {
9354
+ static material = new L({ gl: {
9209
9355
  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}",
9210
9356
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\nuniform float progress;\n\nfloat random(vec3 scale, float seed) {\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void) {\n float blur1 = blur - progress * blur;\n float gradientBlur1 = progress * gradientBlur;\n\n vec4 color = vec4(0.0);\n float total = 0.0;\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientBlur1) * blur1;\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample1 = texture2D(sampler, vUv + delta / texSize * percent * radius);\n sample1.rgb *= sample1.a;\n color += sample1 * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}"
9211
9357
  } });
@@ -9213,7 +9359,7 @@ var ja, Ma = class extends Er {
9213
9359
  let n = this.currentTimeProgress, r, i;
9214
9360
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9215
9361
  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);
9216
- z.draw(e, ja.material, {
9362
+ R.draw(e, Ba.material, {
9217
9363
  sampler: r,
9218
9364
  progress: i,
9219
9365
  blur: this.blur,
@@ -9222,7 +9368,7 @@ var ja, Ma = class extends Er {
9222
9368
  end: c,
9223
9369
  delta: [u / f, d / f],
9224
9370
  texSize: l
9225
- }), z.draw(e, ja.material, {
9371
+ }), R.draw(e, Ba.material, {
9226
9372
  sampler: r,
9227
9373
  progress: i,
9228
9374
  blur: this.blur,
@@ -9234,18 +9380,18 @@ var ja, Ma = class extends Er {
9234
9380
  });
9235
9381
  }
9236
9382
  };
9237
- Ma = ja = j([S("TiltShiftTransition")], Ma);
9383
+ Va = Ba = A([S("TiltShiftTransition")], Va);
9238
9384
  //#endregion
9239
9385
  //#region src/scene/transitions/TwistTransition.ts
9240
- var Na, Pa = class extends Er {
9386
+ var Ha, Ua = class extends Ar {
9241
9387
  static {
9242
- Na = this;
9388
+ Ha = this;
9243
9389
  }
9244
9390
  radius;
9245
9391
  angle = 4;
9246
9392
  padding = 20;
9247
9393
  offset;
9248
- static material = new R({ gl: {
9394
+ static material = new L({ gl: {
9249
9395
  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}",
9250
9396
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\nuniform float progress;\n\nvec2 mapCoord(vec2 coord) {\n coord -= filterArea.zw;\n coord *= filterArea.xy;\n return coord;\n}\n\nvec2 unmapCoord(vec2 coord) {\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n return coord;\n}\n\nvec2 twist(vec2 coord, float radius) {\n coord -= offset;\n float dist = length(coord);\n if (dist < radius) {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n coord += offset;\n return coord;\n}\n\nvoid main(void) {\n vec2 coord = mapCoord(vUv);\n coord = twist(coord, radius - (progress * radius));\n coord = unmapCoord(coord);\n gl_FragColor = texture2D(sampler, coord);\n}"
9251
9397
  } });
@@ -9253,7 +9399,7 @@ var Na, Pa = class extends Er {
9253
9399
  let n = this.currentTimeProgress, r, i;
9254
9400
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9255
9401
  let a = t.width, o = t.height;
9256
- z.draw(e, Na.material, {
9402
+ R.draw(e, Ha.material, {
9257
9403
  sampler: r,
9258
9404
  progress: i,
9259
9405
  filterArea: [
@@ -9269,16 +9415,16 @@ var Na, Pa = class extends Er {
9269
9415
  });
9270
9416
  }
9271
9417
  };
9272
- Pa = Na = j([S("TwistTransition")], Pa);
9418
+ Ua = Ha = A([S("TwistTransition")], Ua);
9273
9419
  //#endregion
9274
9420
  //#region src/asset/loaders/GifLoader.ts
9275
- var Fa = class extends Wn {
9421
+ var Wa = class extends Gn {
9276
9422
  install(e) {
9277
9423
  let t = async (t) => {
9278
9424
  let { decodeFrames: n } = await import("modern-gif");
9279
- return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new nr(e.map((e) => ({
9425
+ return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new rr(e.map((e) => ({
9280
9426
  duration: e.delay,
9281
- texture: new or({
9427
+ texture: new ur({
9282
9428
  source: e.data,
9283
9429
  width: e.width,
9284
9430
  height: e.height
@@ -9289,14 +9435,14 @@ var Fa = class extends Wn {
9289
9435
  e.register(n, t);
9290
9436
  }), e.gif = this, this;
9291
9437
  }
9292
- }, Ia = class extends Wn {
9438
+ }, Ga = class extends Gn {
9293
9439
  install(e) {
9294
9440
  let t = async (e) => JSON.parse(await e.text());
9295
9441
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), ["application/json"].forEach((n) => {
9296
9442
  e.register(n, t);
9297
9443
  }), e.json = this, this;
9298
9444
  }
9299
- }, La = class extends Wn {
9445
+ }, Ka = class extends Gn {
9300
9446
  install(e) {
9301
9447
  return this.load = async (t, n) => (await import("lottie-web").then((e) => e.default)).loadAnimation({
9302
9448
  container: null,
@@ -9307,14 +9453,14 @@ var Fa = class extends Wn {
9307
9453
  animationData: await e.loadBy(t, () => e.fetch(t).then((e) => e.json()))
9308
9454
  }), e.lottie = this, this;
9309
9455
  }
9310
- }, Ra = class extends Wn {
9456
+ }, qa = class extends Gn {
9311
9457
  install(e) {
9312
9458
  let t = async (e) => e.text();
9313
9459
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), e.text = this, this;
9314
9460
  }
9315
- }, za = class extends Wn {
9461
+ }, Ja = class extends Gn {
9316
9462
  install(e) {
9317
- let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new V({
9463
+ let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new B({
9318
9464
  source: e,
9319
9465
  uploadMethodId: "image",
9320
9466
  mipmap: !0,
@@ -9336,11 +9482,11 @@ var Fa = class extends Wn {
9336
9482
  e.register(n, t);
9337
9483
  }), e.texture = this, this;
9338
9484
  }
9339
- }, Ba = class extends Wn {
9485
+ }, Ya = class extends Gn {
9340
9486
  install(e) {
9341
- return this.load = (t) => e.awaitBy(() => new cr(t).load()), e.video = this, this;
9487
+ return this.load = (t) => e.awaitBy(() => new fr(t).load()), e.video = this, this;
9342
9488
  }
9343
- }, Va = Object.entries({
9489
+ }, Xa = Object.entries({
9344
9490
  "font/woff": ["woff"],
9345
9491
  "font/ttf": ["ttf"],
9346
9492
  "font/otf": ["otf"],
@@ -9356,31 +9502,31 @@ var Fa = class extends Wn {
9356
9502
  "image/webp": ["webp"],
9357
9503
  "application/json": ["json"]
9358
9504
  });
9359
- function Ha(e) {
9360
- for (let [t, n] of Va) if (n.includes(e)) return t;
9505
+ function Za(e) {
9506
+ for (let [t, n] of Xa) if (n.includes(e)) return t;
9361
9507
  }
9362
- function Ua(e) {
9508
+ function Qa(e) {
9363
9509
  let t;
9364
9510
  if (e.startsWith("data:")) t = e.match(/^data:(.+?);/)?.[1];
9365
9511
  else if (e.startsWith("http")) {
9366
9512
  let n = e.split(/[#?]/)[0].split(".").pop()?.trim();
9367
- n && (t = Ha(n));
9513
+ n && (t = Za(n));
9368
9514
  }
9369
9515
  return t;
9370
9516
  }
9371
9517
  //#endregion
9372
9518
  //#region src/asset/Assets.ts
9373
- var Wa = "WeakRef" in globalThis, Ga = class extends e {
9519
+ var $a = "WeakRef" in globalThis, eo = class extends e {
9374
9520
  defaultHandler = (e) => e;
9375
9521
  _handlers = /* @__PURE__ */ new Map();
9376
9522
  _handleing = /* @__PURE__ */ new Map();
9377
9523
  _handled = /* @__PURE__ */ new Map();
9378
- _gc = Wa ? new FinalizationRegistry((e) => {
9524
+ _gc = $a ? new FinalizationRegistry((e) => {
9379
9525
  let t = this.get(e);
9380
9526
  t && "destroy" in t && t.destroy(), this._handled.delete(e);
9381
9527
  }) : void 0;
9382
9528
  constructor() {
9383
- super(), Wa || C.on(this.gc.bind(this), { sort: 2 });
9529
+ super(), $a || C.on(this.gc.bind(this), { sort: 2 });
9384
9530
  }
9385
9531
  use(e) {
9386
9532
  return e.install(this), this;
@@ -9429,11 +9575,11 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9429
9575
  }
9430
9576
  get(e) {
9431
9577
  let t = this._handled.get(e);
9432
- return Wa && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9578
+ return $a && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
9433
9579
  }
9434
9580
  set(e, t) {
9435
9581
  let n = t;
9436
- Wa && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9582
+ $a && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n);
9437
9583
  }
9438
9584
  async awaitBy(e) {
9439
9585
  let t = e(), n = c();
@@ -9448,7 +9594,7 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9448
9594
  return this._handleing.set(e, r), r;
9449
9595
  }
9450
9596
  async load(e, t) {
9451
- let n = await this.loadBy(e), r = Ua(e);
9597
+ let n = await this.loadBy(e), r = Qa(e);
9452
9598
  return r === void 0 && (r = n.type?.split(";")[0] ?? void 0), ((r ? this._handlers.get(r) : void 0) ?? this.defaultHandler)(n, t);
9453
9599
  }
9454
9600
  async waitUntilLoad() {
@@ -9462,14 +9608,14 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9462
9608
  n && "destroy" in n && n.destroy();
9463
9609
  }), this._handled.clear();
9464
9610
  }
9465
- }, $ = new Ga().use(new Gn()).use(new Fa()).use(new Ia()).use(new La()).use(new Ra()).use(new za()).use(new Ba()), Ka = {
9611
+ }, $ = new eo().use(new Kn()).use(new Wa()).use(new Ga()).use(new Ka()).use(new qa()).use(new Ja()).use(new Ya()), to = {
9466
9612
  alpha: !0,
9467
9613
  stencil: !0,
9468
9614
  antialias: !1,
9469
9615
  premultipliedAlpha: !0,
9470
9616
  preserveDrawingBuffer: !1,
9471
9617
  powerPreference: "default"
9472
- }, qa = class extends Tr {
9618
+ }, no = class extends kr {
9473
9619
  renderer;
9474
9620
  get view() {
9475
9621
  return this.renderer.view;
@@ -9501,13 +9647,13 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9501
9647
  }) : void 0;
9502
9648
  constructor(e = {}) {
9503
9649
  let { view: t, width: n, height: r, pixelRatio: i = Ye, autoResize: a, data: o } = e;
9504
- super(), this.renderer = new Un(t, {
9505
- alpha: Ka.alpha ?? e.alpha,
9506
- stencil: Ka.stencil ?? e.stencil,
9507
- antialias: Ka.antialias ?? e.antialias,
9508
- premultipliedAlpha: Ka.premultipliedAlpha ?? e.premultipliedAlpha,
9509
- preserveDrawingBuffer: Ka.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9510
- powerPreference: Ka.powerPreference ?? e.powerPreference
9650
+ super(), this.renderer = new Wn(t, {
9651
+ alpha: to.alpha ?? e.alpha,
9652
+ stencil: to.stencil ?? e.stencil,
9653
+ antialias: to.antialias ?? e.antialias,
9654
+ premultipliedAlpha: to.premultipliedAlpha ?? e.premultipliedAlpha,
9655
+ preserveDrawingBuffer: to.preserveDrawingBuffer ?? e.preserveDrawingBuffer,
9656
+ powerPreference: to.powerPreference ?? e.powerPreference
9511
9657
  }), 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);
9512
9658
  }
9513
9659
  _updateProperty(e, t, n) {
@@ -9626,22 +9772,22 @@ var Wa = "WeakRef" in globalThis, Ga = class extends e {
9626
9772
  super._destroy(), this._resizeObserver?.disconnect(), this.renderer.destroy();
9627
9773
  }
9628
9774
  };
9629
- j([_({ fallback: !1 }), A("design:type", Boolean)], qa.prototype, "autoResize", void 0), j([_({ fallback: !1 }), A("design:type", Boolean)], qa.prototype, "autoStart", void 0);
9775
+ A([_({ fallback: !1 }), k("design:type", Boolean)], no.prototype, "autoResize", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], no.prototype, "autoStart", void 0);
9630
9776
  //#endregion
9631
9777
  //#region src/render.ts
9632
- var Ja, Ya = [], Xa = !1;
9633
- function Za() {
9634
- return Ja ??= new qa({
9778
+ var ro, io = [], ao = !1;
9779
+ function oo() {
9780
+ return ro ??= new no({
9635
9781
  pixelRatio: 1,
9636
9782
  width: 1,
9637
9783
  height: 1,
9638
9784
  preserveDrawingBuffer: !0
9639
9785
  });
9640
9786
  }
9641
- async function Qa(e = 100) {
9642
- if (!Xa) {
9643
- for (Xa = !0; Ya.length;) {
9644
- let t = Ya.shift();
9787
+ async function so(e = 100) {
9788
+ if (!ao) {
9789
+ for (ao = !0; io.length;) {
9790
+ let t = io.shift();
9645
9791
  if (t) try {
9646
9792
  await t();
9647
9793
  } catch (e) {
@@ -9649,11 +9795,11 @@ async function Qa(e = 100) {
9649
9795
  }
9650
9796
  else await new Promise((t) => setTimeout(t, e));
9651
9797
  }
9652
- Xa = !1;
9798
+ ao = !1;
9653
9799
  }
9654
9800
  }
9655
- async function $a(e) {
9656
- let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], imagePipelineResolver: s, onBefore: c, onKeyframe: l, ...u } = e, d = Math.max(1, Math.floor(r)), f = Math.max(1, Math.floor(i)), p = Za();
9801
+ async function co(e) {
9802
+ let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], imagePipelineResolver: s, onBefore: c, onKeyframe: l, ...u } = e, d = Math.max(1, Math.floor(r)), f = Math.max(1, Math.floor(i)), p = oo();
9657
9803
  if (p.resetProperties(), p.setProperties(u), p.debug = t, p.fonts = n, p.timeline.currentTime = 0, p.resizeForExport(d, f), p.imagePipelineResolver = s, p.root.removeChildren(!0), p.root.append(a), await c?.(p), await p.waitUntilProcessed(), o.length) {
9658
9804
  let e = o.length, t = o[e - 1];
9659
9805
  for (let n = 0; n < e; n++) {
@@ -9671,27 +9817,27 @@ async function $a(e) {
9671
9817
  toCanvas2D: () => p.toCanvas2D(new ImageData(m, d, f))
9672
9818
  };
9673
9819
  }
9674
- async function eo(e) {
9820
+ async function lo(e) {
9675
9821
  return new Promise((t, n) => {
9676
- Ya.push(async () => {
9822
+ io.push(async () => {
9677
9823
  try {
9678
- t(await $a(e).then((e) => e.toCanvas2D()));
9824
+ t(await co(e).then((e) => e.toCanvas2D()));
9679
9825
  } catch (e) {
9680
9826
  n(e);
9681
9827
  }
9682
- }), Qa();
9828
+ }), so();
9683
9829
  });
9684
9830
  }
9685
- async function to(e) {
9831
+ async function uo(e) {
9686
9832
  return new Promise((t, n) => {
9687
- Ya.push(async () => {
9833
+ io.push(async () => {
9688
9834
  try {
9689
- t(await $a(e).then((e) => e.pixels));
9835
+ t(await co(e).then((e) => e.pixels));
9690
9836
  } catch (e) {
9691
9837
  n(e);
9692
9838
  }
9693
- }), Qa();
9839
+ }), so();
9694
9840
  });
9695
9841
  }
9696
9842
  //#endregion
9697
- export { yt as Aabb2D, nr as AnimatedTexture, fa as Animation, Ga as Assets, wa as Audio, ga as AudioPipeline, _a as AudioProcessor, Ta as AudioSpectrum, Ea as AudioWaveform, M as BufferUsage, Or as Camera2D, ur as CanvasContext, br as CanvasItem, rr as CanvasTexture, D as Color, K as ColorAdjustEffect, Vr as ColorFilterEffect, St as ColorMatrix, Wr as ColorOverlayEffect, Kr as ColorRemoveEffect, Yr as ColorReplaceEffect, ir as ColorTexture, T as CoreObject, bt as DEG_TO_RAD, Ye as DEVICE_PIXEL_RATIO, q as DrawboardEffect, ni as DropShadowEffect, G as Effect, $n as EffectMaterial, ea as Element2D, Si as Element2DBackground, X as Element2DChart, Ei as Element2DComments, Di 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, ii as EmbossEffect, qa as Engine, Yi as Flexbox, Gn as FontLoader, ei as GaussianBlurEffect, qn as Geometry, Fa as GifLoader, dn as GlBatch2DSystem, sn as GlBlendMode, kt as GlBuffer, It as GlBufferSystem, Ot as GlBufferTarget, hn as GlMaskSystem, Jt as GlProgram, yn as GlRenderTarget, bn as GlRenderTargetSystem, rn as GlShaderSystem, ln as GlState, un as GlStateSystem, _n as GlStencilSystem, N as GlSystem, vn as GlViewportSystem, J as GlitchEffect, ci as GodrayEffect, ar as GradientTexture, ha as HTMLAudio, pa as HTMLAudioContext, ma as HTMLSound, qe as IN_BROWSER, Je as IN_MAC_OS, Kn as IndexBuffer, _t as Input, dt as InputEvent, Ia as JsonLoader, di as KawaseBlurEffect, Oa as KawaseTransition, ft as KeyboardInputEvent, Aa as LeftEraseTransition, Wn as Loader, na as Lottie2D, La as LottieLoader, Tt as MainLoop, pi as MaskEffect, R as Material, ra as Mesh2D, fr as Meta, pt as MouseInputEvent, H as Node, Dr as Node2D, Ct as Obb2D, gi as OutlineEffect, xe as PI, Se as PI_2, vi as PixelateEffect, or as PixelsTexture, mt as PointerInputEvent, wt as Projection2D, Jn as QuadGeometry, z as QuadUvGeometry, xt as RAD_TO_DEG, vt as RefCounted, B as RenderTarget, At as Renderer, E 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, Tr as SceneTree, Ra as TextLoader, V as Texture2D, za as TextureLoader, ta as TextureRect2D, C as Ticker, Ma as TiltShiftTransition, Cr as Timeline, U as TimelineNode, ia as TransformRect2D, Er as Transition, Pa as TwistTransition, Mt as UniformGroup, tr as UvGeometry, er as UvMaterial, L as VertexAttribute, I as VertexBuffer, aa as Video2D, Ba as VideoLoader, cr as VideoTexture, W as Viewport, lr as ViewportTexture, Sa as WebAudio, ba as WebAudioContext, Un as WebGLRenderer, xa as WebSound, ht as WheelInputEvent, wr as Window, bi as ZoomBlurEffect, Bi as alignMap, $ as assets, kr as axisDir, Ji as boxSizingMap, O as clamp, ui as clampFrag, w as createHTMLCanvas, Ft as createIdFromString, ye as createNode, ct as crossOrigin, ua as cssEasingPresets, la as cubicBezier, S as customNode, ve as customNodes, Ka as defaultOptions, st as determineCrossOrigin, Hi as directionMap, Vi as displayMap, Q as edgeMap, Ui as flexDirectionMap, Wi as flexWrapMap, li 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, Ce as isPow2, Ze as isVideoElement, et as isWebgl2, Gi as justifyMap, k as lerp, pn as log2, cn as mapGlBlendModes, Dt as markRaw, fn as nextPow2, be as nextTick, Ki as overflowMap, Lr as parseCssFilter, Ae as parseCssFunctions, ke as parseCssProperty, Rr as parseCssTransformOrigin, we as planExportTiles, qi as positionTypeMap, eo as render, to as renderPixels, vr as resetBatchPool, Ar as routeConnection, nt as setCanvasFactory, at as setGlContextProvider, gn as stencilModeMap };
9843
+ export { yt as Aabb2D, rr as AnimatedTexture, xa as Animation, eo as Assets, Na as Audio, Ta as AudioPipeline, Ea as AudioProcessor, Pa as AudioSpectrum, Fa as AudioWaveform, j as BufferUsage, Mr as Camera2D, mr as CanvasContext, wr as CanvasItem, ir as CanvasTexture, bt as Color, K as ColorAdjustEffect, Gr as ColorFilterEffect, Ct as ColorMatrix, Jr as ColorOverlayEffect, Xr as ColorRemoveEffect, $r as ColorReplaceEffect, ar as ColorTexture, T as CoreObject, xt as DEG_TO_RAD, Ye as DEVICE_PIXEL_RATIO, q as DrawboardEffect, oi as DropShadowEffect, G as Effect, er as EffectMaterial, la as Element2D, Ei as Element2DBackground, X as Element2DChart, Ai as Element2DComments, ji as Element2DConnection, Y as Element2DFill, Ni as Element2DForeground, Fi as Element2DOutline, Ii as Element2DShadow, Li as Element2DShape, Ri as Element2DStyle, Hi as Element2DTable, Z as Element2DText, ci as EmbossEffect, no as Engine, ra as Flexbox, Kn as FontLoader, ii as GaussianBlurEffect, Jn as Geometry, Wa as GifLoader, fn as GlBatch2DSystem, cn as GlBlendMode, At as GlBuffer, Lt as GlBufferSystem, kt as GlBufferTarget, gn as GlMaskSystem, Yt as GlProgram, bn as GlRenderTarget, xn as GlRenderTargetSystem, an as GlShaderSystem, un as GlState, dn as GlStateSystem, vn as GlStencilSystem, M as GlSystem, yn as GlViewportSystem, J as GlitchEffect, sr as GlyphAtlas, fi as GodrayEffect, lr as GradientTexture, wa as HTMLAudio, Sa as HTMLAudioContext, Ca as HTMLSound, qe as IN_BROWSER, Je as IN_MAC_OS, qn as IndexBuffer, _t as Input, dt as InputEvent, Ga as JsonLoader, hi as KawaseBlurEffect, La as KawaseTransition, ft as KeyboardInputEvent, za as LeftEraseTransition, Gn as Loader, da as Lottie2D, Ka as LottieLoader, Et as MainLoop, _i as MaskEffect, L as Material, fa as Mesh2D, gr as Meta, pt as MouseInputEvent, H as Node, jr as Node2D, wt as Obb2D, bi as OutlineEffect, xe as PI, Se as PI_2, Si as PixelateEffect, ur as PixelsTexture, mt as PointerInputEvent, Tt as Projection2D, Yn as QuadGeometry, R as QuadUvGeometry, St as RAD_TO_DEG, vt as RefCounted, z as RenderTarget, jt as Renderer, E 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, kr as SceneTree, qa as TextLoader, B as Texture2D, Ja as TextureLoader, ua as TextureRect2D, C as Ticker, Va as TiltShiftTransition, Dr as Timeline, U as TimelineNode, pa as TransformRect2D, Ar as Transition, Ua as TwistTransition, Nt as UniformGroup, nr as UvGeometry, tr as UvMaterial, I as VertexAttribute, F as VertexBuffer, ma as Video2D, Ya as VideoLoader, fr as VideoTexture, W as Viewport, pr as ViewportTexture, ja as WebAudio, ka as WebAudioContext, Wn as WebGLRenderer, Aa as WebSound, ht as WheelInputEvent, Or as Window, wi as ZoomBlurEffect, Ji as alignMap, $ as assets, Nr as axisDir, na as boxSizingMap, D as clamp, mi as clampFrag, w as createHTMLCanvas, It as createIdFromString, ye as createNode, ct as crossOrigin, ya as cssEasingPresets, va as cubicBezier, S as customNode, ve as customNodes, to as defaultOptions, st as determineCrossOrigin, Xi as directionMap, Yi as displayMap, Q as edgeMap, Zi as flexDirectionMap, Qi as flexWrapMap, pi as frag, rt as getCanvasFactory, Oe as getDefaultCssPropertyValue, ot as getGlContextProvider, oo as getRenderEngine, qi as gutterMap, ut as instanceId, $e as isCanvasElement, Xe as isElementNode, Qe as isImageElement, Ce as isPow2, Ze as isVideoElement, et as isWebgl2, $i as justifyMap, O as lerp, mn as log2, ln as mapGlBlendModes, Ot as markRaw, pn as nextPow2, be as nextTick, ea as overflowMap, Vr as parseCssFilter, Ae as parseCssFunctions, ke as parseCssProperty, Hr as parseCssTransformOrigin, we as planExportTiles, ta as positionTypeMap, lo as render, uo as renderPixels, Sr as resetBatchPool, Pr as routeConnection, nt as setCanvasFactory, at as setGlContextProvider, cr as sharedGlyphAtlas, _n as stencilModeMap };