@pixerate/editor 0.136.0 → 0.137.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.
Files changed (132) hide show
  1. package/dist/animation-editor/index.cjs +60 -55
  2. package/dist/animation-editor/index.cjs.map +1 -1
  3. package/dist/animation-editor/index.d.cts +4 -4
  4. package/dist/animation-editor/index.d.ts +4 -4
  5. package/dist/animation-editor/index.js +7 -2
  6. package/dist/animation-editor/index.js.map +1 -1
  7. package/dist/{bezier-CdccFsF8.d.cts → bezier-CZ2AhjID.d.cts} +1 -1
  8. package/dist/{bezier-DG9qNZQV.d.ts → bezier-Dywv3Bw8.d.ts} +1 -1
  9. package/dist/blending-D7jCmjO6.d.cts +1026 -0
  10. package/dist/blending-NgF3qo3d.d.ts +1026 -0
  11. package/dist/brushes-CnvZSYYU.d.cts +744 -0
  12. package/dist/brushes-DJmUbIgz.d.ts +744 -0
  13. package/dist/{brushstrokeRender-SII6MG4R.js → brushstrokeRender-2FAXA3XC.js} +13 -16
  14. package/dist/{brushstrokeRender-SII6MG4R.js.map → brushstrokeRender-2FAXA3XC.js.map} +1 -1
  15. package/dist/{brushstrokeRender-JNHVEUFG.cjs → brushstrokeRender-IMFY3FF6.cjs} +16 -19
  16. package/dist/brushstrokeRender-IMFY3FF6.cjs.map +1 -0
  17. package/dist/canvas/index.cjs +10 -10
  18. package/dist/canvas/index.cjs.map +1 -1
  19. package/dist/canvas/index.d.cts +7 -7
  20. package/dist/canvas/index.d.ts +7 -7
  21. package/dist/canvas/index.js +4 -4
  22. package/dist/{chunk-W4LNKTHT.cjs → chunk-2XS6LTUP.cjs} +63 -63
  23. package/dist/{chunk-W4LNKTHT.cjs.map → chunk-2XS6LTUP.cjs.map} +1 -1
  24. package/dist/{chunk-MAHQC3SK.js → chunk-3D77LOBM.js} +222 -135
  25. package/dist/chunk-3D77LOBM.js.map +1 -0
  26. package/dist/{chunk-BR7EKQUP.js → chunk-3G6J7UFV.js} +322 -2
  27. package/dist/chunk-3G6J7UFV.js.map +1 -0
  28. package/dist/{chunk-62XUO5LB.js → chunk-3X6IAJUQ.js} +2 -2
  29. package/dist/{chunk-EM3FMJWE.js → chunk-5FSRTP6E.js} +320 -3
  30. package/dist/chunk-5FSRTP6E.js.map +1 -0
  31. package/dist/{chunk-2R3UW57U.cjs → chunk-5OOIUXNJ.cjs} +333 -246
  32. package/dist/chunk-5OOIUXNJ.cjs.map +1 -0
  33. package/dist/{chunk-KZXLZCQ7.js → chunk-6S6362D2.js} +2 -2
  34. package/dist/{chunk-24ATT2PE.cjs → chunk-AEAAN4AD.cjs} +120 -120
  35. package/dist/{chunk-24ATT2PE.cjs.map → chunk-AEAAN4AD.cjs.map} +1 -1
  36. package/dist/{chunk-SVYE5HIM.js → chunk-EQQMGO42.js} +2 -2
  37. package/dist/{chunk-FHPVDTI2.cjs → chunk-F2Y4E4GU.cjs} +22 -22
  38. package/dist/{chunk-FHPVDTI2.cjs.map → chunk-F2Y4E4GU.cjs.map} +1 -1
  39. package/dist/{chunk-UYQUPUR6.js → chunk-HUO3TI4C.js} +3 -3
  40. package/dist/{chunk-DDSO4HS7.cjs → chunk-KEENUAFN.cjs} +2 -2
  41. package/dist/{chunk-DDSO4HS7.cjs.map → chunk-KEENUAFN.cjs.map} +1 -1
  42. package/dist/{chunk-2HC4DRF4.js → chunk-LLFHCSU2.js} +2 -2
  43. package/dist/{chunk-J5BA3BQ6.cjs → chunk-O7LUD7MH.cjs} +323 -3
  44. package/dist/chunk-O7LUD7MH.cjs.map +1 -0
  45. package/dist/{chunk-ILYFOJUN.js → chunk-OIBIRXRG.js} +3 -3
  46. package/dist/{chunk-B2CUCM7Y.cjs → chunk-PRSRYHQD.cjs} +36 -36
  47. package/dist/{chunk-B2CUCM7Y.cjs.map → chunk-PRSRYHQD.cjs.map} +1 -1
  48. package/dist/{chunk-6GFRKLLS.cjs → chunk-QBWEH3IM.cjs} +429 -112
  49. package/dist/chunk-QBWEH3IM.cjs.map +1 -0
  50. package/dist/{chunk-6QQR4LKE.js → chunk-SYT2TLQF.js} +35 -37
  51. package/dist/{chunk-6QQR4LKE.js.map → chunk-SYT2TLQF.js.map} +1 -1
  52. package/dist/{chunk-YT3JL7YM.cjs → chunk-TLCTTQFF.cjs} +53 -53
  53. package/dist/{chunk-YT3JL7YM.cjs.map → chunk-TLCTTQFF.cjs.map} +1 -1
  54. package/dist/{chunk-JLGNZMUV.cjs → chunk-XN2NBLV5.cjs} +313 -315
  55. package/dist/chunk-XN2NBLV5.cjs.map +1 -0
  56. package/dist/effects/index.d.cts +4 -4
  57. package/dist/effects/index.d.ts +4 -4
  58. package/dist/{export-Ds7zgGD8.d.ts → export-41rL6Cne.d.ts} +1 -1
  59. package/dist/{export-BOheWw2R.d.cts → export-CyJdfP_Z.d.cts} +5 -4
  60. package/dist/{export-CEYeRQXH.d.cts → export-D9mXp05Q.d.cts} +1 -1
  61. package/dist/{export-ByKKIA2S.d.ts → export-DwnZ_hvQ.d.ts} +5 -4
  62. package/dist/{helpers--ns3W2D7.d.ts → helpers-C-RgeyvH.d.ts} +18 -7
  63. package/dist/{helpers-BVkU4oUi.d.cts → helpers-v6GMazzg.d.cts} +18 -7
  64. package/dist/image-editor/index.cjs +984 -987
  65. package/dist/image-editor/index.cjs.map +1 -1
  66. package/dist/image-editor/index.d.cts +12 -11
  67. package/dist/image-editor/index.d.ts +12 -11
  68. package/dist/image-editor/index.js +92 -95
  69. package/dist/image-editor/index.js.map +1 -1
  70. package/dist/{opentype-yi-Kz4ND.d.cts → opentype-KR_jj6b_.d.cts} +1 -1
  71. package/dist/{opentype-DfoVYgmG.d.ts → opentype-a1KAW-qs.d.ts} +1 -1
  72. package/dist/paint/index.cjs +5 -8
  73. package/dist/paint/index.cjs.map +1 -1
  74. package/dist/paint/index.d.cts +4 -2
  75. package/dist/paint/index.d.ts +4 -2
  76. package/dist/paint/index.js +15 -18
  77. package/dist/paint-editor/index.cjs +403 -404
  78. package/dist/paint-editor/index.cjs.map +1 -1
  79. package/dist/paint-editor/index.d.cts +12 -748
  80. package/dist/paint-editor/index.d.ts +12 -748
  81. package/dist/paint-editor/index.js +77 -78
  82. package/dist/paint-editor/index.js.map +1 -1
  83. package/dist/{pathfinder-7JkMwYvC.d.cts → pathfinder-BHS4vQNm.d.cts} +1 -1
  84. package/dist/{pathfinder-GM3UWdBZ.d.ts → pathfinder-BVvTIBMo.d.ts} +1 -1
  85. package/dist/{pool-CkTxlLMC.d.ts → pool-CZQOrSXZ.d.ts} +1 -1
  86. package/dist/{pool-04qp8iW4.d.cts → pool-FjZZmZ80.d.cts} +1 -1
  87. package/dist/rand-8xbUb6ur.d.ts +1118 -0
  88. package/dist/rand-Cw9VLrVC.d.cts +1118 -0
  89. package/dist/raster/index.cjs +17 -19
  90. package/dist/raster/index.cjs.map +1 -1
  91. package/dist/raster/index.js +9 -11
  92. package/dist/raster/index.js.map +1 -1
  93. package/dist/{svg-rV6_HPmn.d.ts → svg-CSz3mzkw.d.ts} +2 -2
  94. package/dist/{svg-BDDKvWWY.d.cts → svg-DTb40ICU.d.cts} +2 -2
  95. package/dist/{tools-DPYerqeR.d.ts → tools-B0wXP5cF.d.ts} +1 -1
  96. package/dist/{tools-BAjSbTdY.d.cts → tools-Ca0kI1qo.d.cts} +1 -1
  97. package/dist/vector/index.cjs +1459 -1259
  98. package/dist/vector/index.cjs.map +1 -1
  99. package/dist/vector/index.d.cts +87 -11
  100. package/dist/vector/index.d.ts +87 -11
  101. package/dist/vector/index.js +213 -13
  102. package/dist/vector/index.js.map +1 -1
  103. package/dist/video-editor/index.d.cts +4 -4
  104. package/dist/video-editor/index.d.ts +4 -4
  105. package/dist/{warp-DQh9R7Ie.d.cts → warp-DTOp0lON.d.cts} +1 -1
  106. package/dist/{warp-XVL6SpSh.d.ts → warp-pd7hrH4T.d.ts} +1 -1
  107. package/package.json +1 -1
  108. package/skills/pixerate-vector/SKILL.md +8 -0
  109. package/dist/brushstrokeRender-JNHVEUFG.cjs.map +0 -1
  110. package/dist/chunk-2R3UW57U.cjs.map +0 -1
  111. package/dist/chunk-64PYNEHJ.js +0 -340
  112. package/dist/chunk-64PYNEHJ.js.map +0 -1
  113. package/dist/chunk-6GFRKLLS.cjs.map +0 -1
  114. package/dist/chunk-7QN76ESJ.js +0 -323
  115. package/dist/chunk-7QN76ESJ.js.map +0 -1
  116. package/dist/chunk-BR7EKQUP.js.map +0 -1
  117. package/dist/chunk-DCLJNVZS.cjs +0 -323
  118. package/dist/chunk-DCLJNVZS.cjs.map +0 -1
  119. package/dist/chunk-EM3FMJWE.js.map +0 -1
  120. package/dist/chunk-J5BA3BQ6.cjs.map +0 -1
  121. package/dist/chunk-JLGNZMUV.cjs.map +0 -1
  122. package/dist/chunk-MAHQC3SK.js.map +0 -1
  123. package/dist/chunk-Z6OUCS2K.cjs +0 -340
  124. package/dist/chunk-Z6OUCS2K.cjs.map +0 -1
  125. package/dist/rand-BszBST4s.d.ts +0 -2140
  126. package/dist/rand-DOH_aMvm.d.cts +0 -2140
  127. /package/dist/{chunk-62XUO5LB.js.map → chunk-3X6IAJUQ.js.map} +0 -0
  128. /package/dist/{chunk-KZXLZCQ7.js.map → chunk-6S6362D2.js.map} +0 -0
  129. /package/dist/{chunk-SVYE5HIM.js.map → chunk-EQQMGO42.js.map} +0 -0
  130. /package/dist/{chunk-UYQUPUR6.js.map → chunk-HUO3TI4C.js.map} +0 -0
  131. /package/dist/{chunk-2HC4DRF4.js.map → chunk-LLFHCSU2.js.map} +0 -0
  132. /package/dist/{chunk-ILYFOJUN.js.map → chunk-OIBIRXRG.js.map} +0 -0
@@ -34,7 +34,7 @@ var _chunkMUUXNRU4cjs = require('./chunk-MUUXNRU4.cjs');
34
34
 
35
35
 
36
36
 
37
- var _chunkJ5BA3BQ6cjs = require('./chunk-J5BA3BQ6.cjs');
37
+ var _chunkO7LUD7MHcjs = require('./chunk-O7LUD7MH.cjs');
38
38
 
39
39
  // src/raster/effects/model.ts
40
40
  var DEFAULT_GLOBAL_LIGHT = { angle: 120, altitude: 30 };
@@ -223,7 +223,7 @@ function oneOf(r, key, path, values) {
223
223
  if (typeof r[key] !== "string" || !values.includes(r[key])) fail(`${path}.${key}`, `must be one of ${values.join(", ")}.`);
224
224
  }
225
225
  function blend(r, key, path) {
226
- if (!_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, r[key])) fail(`${path}.${key}`, `must be a blend mode such as normal, multiply or screen (got ${JSON.stringify(r[key])}).`);
226
+ if (!_chunkO7LUD7MHcjs.isBlendMode.call(void 0, r[key])) fail(`${path}.${key}`, `must be a blend mode such as normal, multiply or screen (got ${JSON.stringify(r[key])}).`);
227
227
  if (r[key] === "pigment") fail(`${path}.${key}`, "pigment is a layer blend mode only; effects cannot use it.");
228
228
  }
229
229
  function contour(v, path) {
@@ -1422,7 +1422,7 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1422
1422
  rgbScratchS[0] = sr;
1423
1423
  rgbScratchS[1] = sg;
1424
1424
  rgbScratchS[2] = sb;
1425
- _chunkJ5BA3BQ6cjs.mixPigmentRgb.call(void 0, rgbScratchB, rgbScratchS, sa / ao, rgbScratchM);
1425
+ _chunkO7LUD7MHcjs.mixPigmentRgb.call(void 0, rgbScratchB, rgbScratchS, sa / ao, rgbScratchM);
1426
1426
  dst[i] = rgbScratchM[0];
1427
1427
  dst[i + 1] = rgbScratchM[1];
1428
1428
  dst[i + 2] = rgbScratchM[2];
@@ -1437,9 +1437,9 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1437
1437
  m1 = sg;
1438
1438
  m2 = sb;
1439
1439
  } else if (separable) {
1440
- m0 = _chunkJ5BA3BQ6cjs.blendChannel.call(void 0, mode, b0, sr);
1441
- m1 = _chunkJ5BA3BQ6cjs.blendChannel.call(void 0, mode, b1, sg);
1442
- m2 = _chunkJ5BA3BQ6cjs.blendChannel.call(void 0, mode, b2, sb);
1440
+ m0 = _chunkO7LUD7MHcjs.blendChannel.call(void 0, mode, b0, sr);
1441
+ m1 = _chunkO7LUD7MHcjs.blendChannel.call(void 0, mode, b1, sg);
1442
+ m2 = _chunkO7LUD7MHcjs.blendChannel.call(void 0, mode, b2, sb);
1443
1443
  } else {
1444
1444
  rgbScratchB[0] = b0;
1445
1445
  rgbScratchB[1] = b1;
@@ -1447,7 +1447,7 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1447
1447
  rgbScratchS[0] = sr;
1448
1448
  rgbScratchS[1] = sg;
1449
1449
  rgbScratchS[2] = sb;
1450
- const m = _chunkJ5BA3BQ6cjs.blendRgb.call(void 0, mode, rgbScratchB, rgbScratchS);
1450
+ const m = _chunkO7LUD7MHcjs.blendRgb.call(void 0, mode, rgbScratchB, rgbScratchS);
1451
1451
  m0 = m[0];
1452
1452
  m1 = m[1];
1453
1453
  m2 = m[2];
@@ -1461,7 +1461,7 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1461
1461
  dst[i + 3] = ao;
1462
1462
  }
1463
1463
  function paint(dst, m, color2, mode, opacity) {
1464
- const sep = mode !== "normal" && _chunkJ5BA3BQ6cjs.isSeparableBlendMode.call(void 0, mode);
1464
+ const sep = mode !== "normal" && _chunkO7LUD7MHcjs.isSeparableBlendMode.call(void 0, mode);
1465
1465
  const c = [0, 0, 0, 1];
1466
1466
  const n = m.length;
1467
1467
  for (let i = 0; i < n; i++) {
@@ -1753,7 +1753,7 @@ function compositeLayerEffects(input) {
1753
1753
  }
1754
1754
  const premerge = !normalLike;
1755
1755
  if (premerge) {
1756
- const sep2 = _chunkJ5BA3BQ6cjs.isSeparableBlendMode.call(void 0, input.blend);
1756
+ const sep2 = _chunkO7LUD7MHcjs.isSeparableBlendMode.call(void 0, input.blend);
1757
1757
  for (let i = 0; i < n; i++) {
1758
1758
  const p = i * 4;
1759
1759
  const sr = lay[p];
@@ -1873,7 +1873,7 @@ function compositeLayerEffects(input) {
1873
1873
  paintColor(work, fx(i, 1), e.shadowColor, e.shadowBlend, e.shadowOpacity);
1874
1874
  }
1875
1875
  const mode = premerge ? "normal" : input.blend;
1876
- const sep = _chunkJ5BA3BQ6cjs.isSeparableBlendMode.call(void 0, mode);
1876
+ const sep = _chunkO7LUD7MHcjs.isSeparableBlendMode.call(void 0, mode);
1877
1877
  for (let i = 0; i < n; i++) {
1878
1878
  const p = i * 4;
1879
1879
  if (lay[p + 3] > 0) compositeAt(work, p, mode, sep, lay[p], lay[p + 1], lay[p + 2], lay[p + 3]);
@@ -2088,9 +2088,9 @@ var DeepCompositor = class {
2088
2088
  }
2089
2089
  if (!visible.length) return;
2090
2090
  if (this.deep.applyFilterRunDeep) {
2091
- if (this.linear) mapColour(acc, _chunkJ5BA3BQ6cjs.srgbEncode);
2091
+ if (this.linear) mapColour(acc, _chunkO7LUD7MHcjs.srgbEncode);
2092
2092
  this.deep.applyFilterRunDeep(visible, acc, r, masks, this.sources);
2093
- if (this.linear) mapColour(acc, _chunkJ5BA3BQ6cjs.srgbDecode);
2093
+ if (this.linear) mapColour(acc, _chunkO7LUD7MHcjs.srgbDecode);
2094
2094
  return;
2095
2095
  }
2096
2096
  const bytes = this.to8(acc);
@@ -2155,7 +2155,7 @@ var DeepCompositor = class {
2155
2155
  }
2156
2156
  /** A surface's samples over `rect` (layer space) in the working space. */
2157
2157
  samples(surface, rect) {
2158
- const samples = _chunkJ5BA3BQ6cjs.readDeepRegion.call(void 0, surface, rect, this.depth);
2158
+ const samples = _chunkO7LUD7MHcjs.readDeepRegion.call(void 0, surface, rect, this.depth);
2159
2159
  if (samples instanceof Float32Array) return samples;
2160
2160
  const out = new Float32Array(samples.length);
2161
2161
  for (let i = 0; i < samples.length; i++) out[i] = samples[i] / 65535;
@@ -2163,7 +2163,7 @@ var DeepCompositor = class {
2163
2163
  }
2164
2164
  /** 8-bit RGBA to the working space. */
2165
2165
  from8(bytes) {
2166
- if (this.linear) return _chunkJ5BA3BQ6cjs.to32From8.call(void 0, bytes, 4);
2166
+ if (this.linear) return _chunkO7LUD7MHcjs.to32From8.call(void 0, bytes, 4);
2167
2167
  const out = new Float32Array(bytes.length);
2168
2168
  for (let i = 0; i < bytes.length; i++) out[i] = bytes[i] / 255;
2169
2169
  return out;
@@ -2172,7 +2172,7 @@ var DeepCompositor = class {
2172
2172
  to8(acc) {
2173
2173
  const out = new Uint8ClampedArray(acc.length);
2174
2174
  for (let i = 0; i < acc.length; i += 4) {
2175
- for (let c = 0; c < 3; c++) out[i + c] = Math.round((this.linear ? _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, acc[i + c]) : acc[i + c]) * 255);
2175
+ for (let c = 0; c < 3; c++) out[i + c] = Math.round((this.linear ? _chunkO7LUD7MHcjs.srgbEncode.call(void 0, acc[i + c]) : acc[i + c]) * 255);
2176
2176
  out[i + 3] = Math.round(acc[i + 3] * 255);
2177
2177
  }
2178
2178
  return out;
@@ -2210,13 +2210,13 @@ var DeepCompositor = class {
2210
2210
  cs[c] = src[i + c];
2211
2211
  }
2212
2212
  if (pigment) {
2213
- if (this.linear) for (let c = 0; c < 3; c++) cb[c] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, cb[c]), cs[c] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, cs[c]);
2214
- _chunkJ5BA3BQ6cjs.mixPigmentRgb.call(void 0, cb, cs, as / ao, mix);
2215
- for (let c = 0; c < 3; c++) dst[i + c] = this.linear ? _chunkJ5BA3BQ6cjs.srgbDecode.call(void 0, mix[c]) : mix[c];
2213
+ if (this.linear) for (let c = 0; c < 3; c++) cb[c] = _chunkO7LUD7MHcjs.srgbEncode.call(void 0, cb[c]), cs[c] = _chunkO7LUD7MHcjs.srgbEncode.call(void 0, cs[c]);
2214
+ _chunkO7LUD7MHcjs.mixPigmentRgb.call(void 0, cb, cs, as / ao, mix);
2215
+ for (let c = 0; c < 3; c++) dst[i + c] = this.linear ? _chunkO7LUD7MHcjs.srgbDecode.call(void 0, mix[c]) : mix[c];
2216
2216
  dst[i + 3] = ao;
2217
2217
  continue;
2218
2218
  }
2219
- const m = normal ? cs : _chunkJ5BA3BQ6cjs.blendRgb.call(void 0, mode, cb, cs);
2219
+ const m = normal ? cs : _chunkO7LUD7MHcjs.blendRgb.call(void 0, mode, cb, cs);
2220
2220
  const wb = (1 - as) * ab;
2221
2221
  const ws = (1 - ab) * as;
2222
2222
  const wm = as * ab;
@@ -2250,16 +2250,16 @@ function workingToSamples(data, depth) {
2250
2250
  }
2251
2251
  function encodeInPlace(d) {
2252
2252
  for (let i = 0; i < d.length; i += 4) {
2253
- d[i] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, d[i]);
2254
- d[i + 1] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, d[i + 1]);
2255
- d[i + 2] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, d[i + 2]);
2253
+ d[i] = _chunkO7LUD7MHcjs.srgbEncode.call(void 0, d[i]);
2254
+ d[i + 1] = _chunkO7LUD7MHcjs.srgbEncode.call(void 0, d[i + 1]);
2255
+ d[i + 2] = _chunkO7LUD7MHcjs.srgbEncode.call(void 0, d[i + 2]);
2256
2256
  }
2257
2257
  }
2258
2258
  function decodeInPlace(d) {
2259
2259
  for (let i = 0; i < d.length; i += 4) {
2260
- d[i] = _chunkJ5BA3BQ6cjs.srgbDecode.call(void 0, d[i]);
2261
- d[i + 1] = _chunkJ5BA3BQ6cjs.srgbDecode.call(void 0, d[i + 1]);
2262
- d[i + 2] = _chunkJ5BA3BQ6cjs.srgbDecode.call(void 0, d[i + 2]);
2260
+ d[i] = _chunkO7LUD7MHcjs.srgbDecode.call(void 0, d[i]);
2261
+ d[i + 1] = _chunkO7LUD7MHcjs.srgbDecode.call(void 0, d[i + 1]);
2262
+ d[i + 2] = _chunkO7LUD7MHcjs.srgbDecode.call(void 0, d[i + 2]);
2263
2263
  }
2264
2264
  }
2265
2265
 
@@ -2436,7 +2436,7 @@ function isLayerLocked(layer, what) {
2436
2436
  }
2437
2437
 
2438
2438
  // src/raster/compositor.ts
2439
- var TILE_PIXELS = _chunkJ5BA3BQ6cjs.TILE * _chunkJ5BA3BQ6cjs.TILE;
2439
+ var TILE_PIXELS = _chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE;
2440
2440
  var TILE_BYTES = TILE_PIXELS * 4;
2441
2441
  function sameSig(a, b) {
2442
2442
  if (!a || a.key !== b.key || a.refs.length !== b.refs.length) return false;
@@ -2448,13 +2448,13 @@ function dirtyInTile(rects, tx, ty) {
2448
2448
  let y0 = Infinity;
2449
2449
  let x1 = -Infinity;
2450
2450
  let y1 = -Infinity;
2451
- const ox = tx * _chunkJ5BA3BQ6cjs.TILE;
2452
- const oy = ty * _chunkJ5BA3BQ6cjs.TILE;
2451
+ const ox = tx * _chunkO7LUD7MHcjs.TILE;
2452
+ const oy = ty * _chunkO7LUD7MHcjs.TILE;
2453
2453
  for (const r of rects) {
2454
2454
  const a = Math.max(ox, Math.floor(r.x));
2455
2455
  const b = Math.max(oy, Math.floor(r.y));
2456
- const c = Math.min(ox + _chunkJ5BA3BQ6cjs.TILE, Math.ceil(r.x + r.width));
2457
- const d = Math.min(oy + _chunkJ5BA3BQ6cjs.TILE, Math.ceil(r.y + r.height));
2456
+ const c = Math.min(ox + _chunkO7LUD7MHcjs.TILE, Math.ceil(r.x + r.width));
2457
+ const d = Math.min(oy + _chunkO7LUD7MHcjs.TILE, Math.ceil(r.y + r.height));
2458
2458
  if (c <= a || d <= b) continue;
2459
2459
  x0 = Math.min(x0, a);
2460
2460
  y0 = Math.min(y0, b);
@@ -2467,7 +2467,7 @@ function blendTile(dst, src, mode, alpha, coverage) {
2467
2467
  if (!(alpha > 0)) return;
2468
2468
  const normal = mode === "normal";
2469
2469
  const pigment = mode === "pigment";
2470
- const lut = !normal && _chunkJ5BA3BQ6cjs.isSeparableBlendMode.call(void 0, mode) ? separableLut(mode) : null;
2470
+ const lut = !normal && _chunkO7LUD7MHcjs.isSeparableBlendMode.call(void 0, mode) ? separableLut(mode) : null;
2471
2471
  const cb = [0, 0, 0];
2472
2472
  const cs = [0, 0, 0];
2473
2473
  const n = dst.length;
@@ -2494,7 +2494,7 @@ function blendTile(dst, src, mode, alpha, coverage) {
2494
2494
  const d1 = dst[i + 1];
2495
2495
  const d2 = dst[i + 2];
2496
2496
  if (pigment) {
2497
- _chunkJ5BA3BQ6cjs.mixPigment8.call(void 0, d0, d1, d2, src[i], src[i + 1], src[i + 2], as / ao, cb);
2497
+ _chunkO7LUD7MHcjs.mixPigment8.call(void 0, d0, d1, d2, src[i], src[i + 1], src[i + 2], as / ao, cb);
2498
2498
  dst[i] = Math.round(cb[0] * 255);
2499
2499
  dst[i + 1] = Math.round(cb[1] * 255);
2500
2500
  dst[i + 2] = Math.round(cb[2] * 255);
@@ -2525,7 +2525,7 @@ function blendTile(dst, src, mode, alpha, coverage) {
2525
2525
  cs[0] = s0;
2526
2526
  cs[1] = s1;
2527
2527
  cs[2] = s2;
2528
- const m = _chunkJ5BA3BQ6cjs.blendRgb.call(void 0, mode, cb, cs);
2528
+ const m = _chunkO7LUD7MHcjs.blendRgb.call(void 0, mode, cb, cs);
2529
2529
  m0 = m[0];
2530
2530
  m1 = m[1];
2531
2531
  m2 = m[2];
@@ -2544,7 +2544,7 @@ function separableLut(mode) {
2544
2544
  let lut = separableLuts.get(mode);
2545
2545
  if (!lut) {
2546
2546
  lut = new Float64Array(65536);
2547
- for (let b = 0; b < 256; b++) for (let c = 0; c < 256; c++) lut[b << 8 | c] = _chunkJ5BA3BQ6cjs.blendChannel.call(void 0, mode, b / 255, c / 255);
2547
+ for (let b = 0; b < 256; b++) for (let c = 0; c < 256; c++) lut[b << 8 | c] = _chunkO7LUD7MHcjs.blendChannel.call(void 0, mode, b / 255, c / 255);
2548
2548
  separableLuts.set(mode, lut);
2549
2549
  }
2550
2550
  return lut;
@@ -2567,7 +2567,7 @@ var isGroup2 = (l) => l.type === "group";
2567
2567
  var maskDepths = /* @__PURE__ */ new WeakMap();
2568
2568
  function maskDepth(surface) {
2569
2569
  let d = maskDepths.get(surface);
2570
- if (d === void 0) maskDepths.set(surface, d = _chunkJ5BA3BQ6cjs.surfaceDepth.call(void 0, surface));
2570
+ if (d === void 0) maskDepths.set(surface, d = _chunkO7LUD7MHcjs.surfaceDepth.call(void 0, surface));
2571
2571
  return d;
2572
2572
  }
2573
2573
  var RasterCompositor = (_class = class {
@@ -2624,15 +2624,15 @@ var RasterCompositor = (_class = class {
2624
2624
  composite(layers, rect, sources, options = {}) {
2625
2625
  const out = new Uint8ClampedArray(Math.max(0, rect.width * rect.height * 4));
2626
2626
  this.compositeTiles(layers, rect, sources, (tx, ty, data) => {
2627
- const ox = tx * _chunkJ5BA3BQ6cjs.TILE;
2628
- const oy = ty * _chunkJ5BA3BQ6cjs.TILE;
2627
+ const ox = tx * _chunkO7LUD7MHcjs.TILE;
2628
+ const oy = ty * _chunkO7LUD7MHcjs.TILE;
2629
2629
  const x0 = Math.max(rect.x, ox);
2630
2630
  const y0 = Math.max(rect.y, oy);
2631
- const x1 = Math.min(rect.x + rect.width, ox + _chunkJ5BA3BQ6cjs.TILE);
2632
- const y1 = Math.min(rect.y + rect.height, oy + _chunkJ5BA3BQ6cjs.TILE);
2631
+ const x1 = Math.min(rect.x + rect.width, ox + _chunkO7LUD7MHcjs.TILE);
2632
+ const y1 = Math.min(rect.y + rect.height, oy + _chunkO7LUD7MHcjs.TILE);
2633
2633
  const span = (x1 - x0) * 4;
2634
2634
  for (let y = y0; y < y1; y++) {
2635
- const s = ((y - oy) * _chunkJ5BA3BQ6cjs.TILE + (x0 - ox)) * 4;
2635
+ const s = ((y - oy) * _chunkO7LUD7MHcjs.TILE + (x0 - ox)) * 4;
2636
2636
  out.set(data.subarray(s, s + span), ((y - rect.y) * rect.width + (x0 - rect.x)) * 4);
2637
2637
  }
2638
2638
  }, options);
@@ -2653,9 +2653,9 @@ var RasterCompositor = (_class = class {
2653
2653
  this.callStats = stats;
2654
2654
  const grow = options.dirty ? this.effectsReach(layers) : 0;
2655
2655
  const dirty = grow > 0 ? options.dirty.map((d) => inflateRect(d, grow)) : options.dirty;
2656
- for (const { tx, ty } of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, rect)) {
2656
+ for (const { tx, ty } of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, rect)) {
2657
2657
  stats.tiles++;
2658
- const before = _optionalChain([this, 'access', _31 => _31.tiles, 'access', _32 => _32.get, 'call', _33 => _33(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _34 => _34.result]);
2658
+ const before = _optionalChain([this, 'access', _31 => _31.tiles, 'access', _32 => _32.get, 'call', _33 => _33(_chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _34 => _34.result]);
2659
2659
  const data = this.compositeTile(layers, steps, tx, ty, stats, dirty ? dirtyInTile(dirty, tx, ty) : null);
2660
2660
  onTile(tx, ty, data, data !== before);
2661
2661
  }
@@ -2757,7 +2757,7 @@ var RasterCompositor = (_class = class {
2757
2757
  return key;
2758
2758
  }
2759
2759
  compositeTile(root, steps, tx, ty, stats, dirty = null) {
2760
- const key = _chunkJ5BA3BQ6cjs.tileKey.call(void 0, tx, ty);
2760
+ const key = _chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty);
2761
2761
  const entry = this.tiles.get(key);
2762
2762
  const sigs = steps.map((s) => this.stepSig(s, tx, ty));
2763
2763
  let first = 0;
@@ -2780,20 +2780,20 @@ var RasterCompositor = (_class = class {
2780
2780
  }
2781
2781
  }
2782
2782
  }
2783
- const tileRect = { x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE };
2783
+ const tileRect = { x: tx * _chunkO7LUD7MHcjs.TILE, y: ty * _chunkO7LUD7MHcjs.TILE, width: _chunkO7LUD7MHcjs.TILE, height: _chunkO7LUD7MHcjs.TILE };
2784
2784
  const hint = this.hint;
2785
2785
  const checkpoints = /* @__PURE__ */ new Map();
2786
2786
  if (entry) {
2787
2787
  for (const [index, cp] of entry.checkpoints) if (index <= start) checkpoints.set(index, cp);
2788
2788
  }
2789
2789
  let result;
2790
- if (entry && dirty && (dirty.width < _chunkJ5BA3BQ6cjs.TILE || dirty.height < _chunkJ5BA3BQ6cjs.TILE)) {
2790
+ if (entry && dirty && (dirty.width < _chunkO7LUD7MHcjs.TILE || dirty.height < _chunkO7LUD7MHcjs.TILE)) {
2791
2791
  const r = dirty;
2792
2792
  const sub = (data) => {
2793
2793
  const out = new Uint8ClampedArray(r.width * r.height * 4);
2794
2794
  if (!data) return out;
2795
2795
  for (let y = 0; y < r.height; y++) {
2796
- const s = ((r.y - tileRect.y + y) * _chunkJ5BA3BQ6cjs.TILE + (r.x - tileRect.x)) * 4;
2796
+ const s = ((r.y - tileRect.y + y) * _chunkO7LUD7MHcjs.TILE + (r.x - tileRect.x)) * 4;
2797
2797
  out.set(data.subarray(s, s + r.width * 4), y * r.width * 4);
2798
2798
  }
2799
2799
  return out;
@@ -2806,7 +2806,7 @@ var RasterCompositor = (_class = class {
2806
2806
  }
2807
2807
  result = new Uint8ClampedArray(entry.result);
2808
2808
  for (let y = 0; y < r.height; y++) {
2809
- result.set(acc.subarray(y * r.width * 4, (y + 1) * r.width * 4), ((r.y - tileRect.y + y) * _chunkJ5BA3BQ6cjs.TILE + (r.x - tileRect.x)) * 4);
2809
+ result.set(acc.subarray(y * r.width * 4, (y + 1) * r.width * 4), ((r.y - tileRect.y + y) * _chunkO7LUD7MHcjs.TILE + (r.x - tileRect.x)) * 4);
2810
2810
  }
2811
2811
  } else {
2812
2812
  const acc = base ? new Uint8ClampedArray(base.data) : new Uint8ClampedArray(TILE_BYTES);
@@ -2915,8 +2915,8 @@ var RasterCompositor = (_class = class {
2915
2915
  if (!this.isPixel(layer)) return { key, refs: this.maskRefs(layer, tx, ty, 0, 0) };
2916
2916
  const { surface, dx, dy } = this.layerPixels(layer);
2917
2917
  const refs = [surface.defaultValue];
2918
- const r = { x: tx * _chunkJ5BA3BQ6cjs.TILE - dx, y: ty * _chunkJ5BA3BQ6cjs.TILE - dy, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE };
2919
- for (const t of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, r)) refs.push(_nullishCoalesce(surface.getTile(t.tx, t.ty), () => ( null)));
2918
+ const r = { x: tx * _chunkO7LUD7MHcjs.TILE - dx, y: ty * _chunkO7LUD7MHcjs.TILE - dy, width: _chunkO7LUD7MHcjs.TILE, height: _chunkO7LUD7MHcjs.TILE };
2919
+ for (const t of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, r)) refs.push(_nullishCoalesce(surface.getTile(t.tx, t.ty), () => ( null)));
2920
2920
  refs.push(...this.maskRefs(layer, tx, ty, _nullishCoalesce(_optionalChain([layer, 'access', _48 => _48.offset, 'optionalAccess', _49 => _49.x]), () => ( 0)), _nullishCoalesce(_optionalChain([layer, 'access', _50 => _50.offset, 'optionalAccess', _51 => _51.y]), () => ( 0))));
2921
2921
  return { key, refs };
2922
2922
  }
@@ -2978,8 +2978,8 @@ var RasterCompositor = (_class = class {
2978
2978
  const sigs = /* @__PURE__ */ new Map();
2979
2979
  if (region.width <= 0 || region.height <= 0) return sigs;
2980
2980
  const steps = isGroup2(layer) ? this.buildSteps(_nullishCoalesce(layer.children, () => ( []))) : null;
2981
- for (const t of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, region)) {
2982
- sigs.set(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, t.tx, t.ty), steps ? this.plainGroupSig(layer, steps, t.tx, t.ty) : this.plainContentSig(layer, t.tx, t.ty));
2981
+ for (const t of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, region)) {
2982
+ sigs.set(_chunkO7LUD7MHcjs.tileKey.call(void 0, t.tx, t.ty), steps ? this.plainGroupSig(layer, steps, t.tx, t.ty) : this.plainContentSig(layer, t.tx, t.ty));
2983
2983
  }
2984
2984
  return sigs;
2985
2985
  }
@@ -3003,7 +3003,7 @@ var RasterCompositor = (_class = class {
3003
3003
  const region = this.effectRegion(layer);
3004
3004
  const m = effectsMargin(layer.effects);
3005
3005
  if (effectsAreLocal(activeEffectItems(layer.effects))) {
3006
- return { key, refs: this.shapeRefs(layer, intersectRect({ x: tx * _chunkJ5BA3BQ6cjs.TILE - m, y: ty * _chunkJ5BA3BQ6cjs.TILE - m, width: _chunkJ5BA3BQ6cjs.TILE + 2 * m, height: _chunkJ5BA3BQ6cjs.TILE + 2 * m }, region)) };
3006
+ return { key, refs: this.shapeRefs(layer, intersectRect({ x: tx * _chunkO7LUD7MHcjs.TILE - m, y: ty * _chunkO7LUD7MHcjs.TILE - m, width: _chunkO7LUD7MHcjs.TILE + 2 * m, height: _chunkO7LUD7MHcjs.TILE + 2 * m }, region)) };
3007
3007
  }
3008
3008
  return { key, refs: [`${region.x},${region.y},${region.width},${region.height}`, ...this.shapeRefs(layer, region)] };
3009
3009
  }
@@ -3052,11 +3052,11 @@ var RasterCompositor = (_class = class {
3052
3052
  */
3053
3053
  shapeChanges(layer, prev, tiles, region) {
3054
3054
  const out = [];
3055
- for (const { tx, ty } of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, region)) {
3056
- const sig = tiles.get(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, tx, ty));
3057
- const old = prev.tiles.get(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, tx, ty));
3055
+ for (const { tx, ty } of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, region)) {
3056
+ const sig = tiles.get(_chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty));
3057
+ const old = prev.tiles.get(_chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty));
3058
3058
  if (old ? sameSig(old, sig) : sig.refs.every((r2) => r2 === null || r2 === 0)) continue;
3059
- const r = intersectRect({ x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, region);
3059
+ const r = intersectRect({ x: tx * _chunkO7LUD7MHcjs.TILE, y: ty * _chunkO7LUD7MHcjs.TILE, width: _chunkO7LUD7MHcjs.TILE, height: _chunkO7LUD7MHcjs.TILE }, region);
3060
3060
  if (r.width > 0 && r.height > 0) out.push(r);
3061
3061
  }
3062
3062
  const dirty = this.callDirty;
@@ -3151,7 +3151,7 @@ var RasterCompositor = (_class = class {
3151
3151
  if (!mask || mask.enabled === false) return [];
3152
3152
  if (mask.source || (_nullishCoalesce(mask.feather, () => ( 0))) > 0) return [this.planeFor(mask, ox, oy)];
3153
3153
  const refs = [];
3154
- for (const t of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, { x: tx * _chunkJ5BA3BQ6cjs.TILE - ox, y: ty * _chunkJ5BA3BQ6cjs.TILE - oy, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE })) {
3154
+ for (const t of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, { x: tx * _chunkO7LUD7MHcjs.TILE - ox, y: ty * _chunkO7LUD7MHcjs.TILE - oy, width: _chunkO7LUD7MHcjs.TILE, height: _chunkO7LUD7MHcjs.TILE })) {
3155
3155
  refs.push(_nullishCoalesce(mask.surface.getTile(t.tx, t.ty), () => ( null)));
3156
3156
  }
3157
3157
  return refs;
@@ -3186,12 +3186,12 @@ var RasterCompositor = (_class = class {
3186
3186
  if (!this.isPixel(layer)) return _nullishCoalesce(_optionalChain([this, 'access', _65 => _65.profile, 'access', _66 => _66.contentTile, 'optionalCall', _67 => _67(layer, r, this.sources)]), () => ( null));
3187
3187
  const { surface, dx, dy, perPixel } = this.layerPixels(layer);
3188
3188
  const src = { x: r.x - dx, y: r.y - dy, width: r.width, height: r.height };
3189
- const covered = _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, src).map((t) => surface.getTile(t.tx, t.ty));
3189
+ const covered = _chunkO7LUD7MHcjs.tilesInRect.call(void 0, src).map((t) => surface.getTile(t.tx, t.ty));
3190
3190
  if (surface.defaultValue === 0 && covered.every((t) => !t)) return null;
3191
- const aligned = r.width === _chunkJ5BA3BQ6cjs.TILE && r.height === _chunkJ5BA3BQ6cjs.TILE && src.x % _chunkJ5BA3BQ6cjs.TILE === 0 && src.y % _chunkJ5BA3BQ6cjs.TILE === 0;
3191
+ const aligned = r.width === _chunkO7LUD7MHcjs.TILE && r.height === _chunkO7LUD7MHcjs.TILE && src.x % _chunkO7LUD7MHcjs.TILE === 0 && src.y % _chunkO7LUD7MHcjs.TILE === 0;
3192
3192
  if (!perPixel) {
3193
3193
  if (aligned && covered[0]) return covered[0].data;
3194
- return _chunkJ5BA3BQ6cjs.readRegion.call(void 0, surface, src);
3194
+ return _chunkO7LUD7MHcjs.readRegion.call(void 0, surface, src);
3195
3195
  }
3196
3196
  const fkey = `${dx},${dy}:${perPixel.key}`;
3197
3197
  const anchor = _nullishCoalesce(covered.find(Boolean), () => ( surface));
@@ -3201,7 +3201,7 @@ var RasterCompositor = (_class = class {
3201
3201
  const hit = _optionalChain([byKey, 'optionalAccess', _68 => _68.get, 'call', _69 => _69(refsKey)]);
3202
3202
  if (hit) return hit;
3203
3203
  }
3204
- const data = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, surface, src);
3204
+ const data = _chunkO7LUD7MHcjs.readRegion.call(void 0, surface, src);
3205
3205
  perPixel.apply(data, r.width, r.height);
3206
3206
  if (aligned) {
3207
3207
  if (!byKey) {
@@ -3240,7 +3240,7 @@ var RasterCompositor = (_class = class {
3240
3240
  if (!generated || generated.length !== W * H) v.fill(1);
3241
3241
  else v.set(generated);
3242
3242
  } else {
3243
- const bytes = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, mask.surface, { x: -ox, y: -oy, width: W, height: H });
3243
+ const bytes = _chunkO7LUD7MHcjs.readRegion.call(void 0, mask.surface, { x: -ox, y: -oy, width: W, height: H });
3244
3244
  for (let i = 0; i < v.length; i++) v[i] = bytes[i] / 255;
3245
3245
  }
3246
3246
  const feather = _nullishCoalesce(mask.feather, () => ( 0));
@@ -3279,14 +3279,14 @@ var RasterCompositor = (_class = class {
3279
3279
  const rect = { x: r.x - ox, y: r.y - oy, width: r.width, height: r.height };
3280
3280
  let all = true;
3281
3281
  if (maskDepth(mask.surface) !== 8) {
3282
- const d = _chunkJ5BA3BQ6cjs.readDeepRegion.call(void 0, mask.surface, rect, 32);
3282
+ const d = _chunkO7LUD7MHcjs.readDeepRegion.call(void 0, mask.surface, rect, 32);
3283
3283
  for (let i = 0; i < n; i++) {
3284
3284
  const v = d[i] <= 0 ? 0 : d[i] >= 1 ? 1 : d[i];
3285
3285
  out[i] = v;
3286
3286
  if (v !== 1) all = false;
3287
3287
  }
3288
3288
  } else {
3289
- const bytes = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, mask.surface, rect);
3289
+ const bytes = _chunkO7LUD7MHcjs.readRegion.call(void 0, mask.surface, rect);
3290
3290
  for (let i = 0; i < n; i++) {
3291
3291
  out[i] = bytes[i] / 255;
3292
3292
  if (bytes[i] !== 255) all = false;
@@ -3398,10 +3398,10 @@ var RasterCompositor = (_class = class {
3398
3398
  }
3399
3399
  }, _class);
3400
3400
  function filterOverCanvas(surface, ox, oy, filters, width, height) {
3401
- if (width <= 0 || height <= 0) return _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 4);
3402
- const data = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, surface, { x: -ox, y: -oy, width, height });
3401
+ if (width <= 0 || height <= 0) return _chunkO7LUD7MHcjs.emptySurface.call(void 0, 4);
3402
+ const data = _chunkO7LUD7MHcjs.readRegion.call(void 0, surface, { x: -ox, y: -oy, width, height });
3403
3403
  filters.apply(data, width, height);
3404
- return _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, 0, 0);
3404
+ return _chunkO7LUD7MHcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, 0, 0);
3405
3405
  }
3406
3406
  function copyRect(data, r, a) {
3407
3407
  const out = new Uint8ClampedArray(a.width * a.height * 4);
@@ -3490,7 +3490,7 @@ function intersect(a, b) {
3490
3490
  return x1 > x && y1 > y ? { x, y, width: x1 - x, height: y1 - y } : null;
3491
3491
  }
3492
3492
  function hasTilesIn(src, r) {
3493
- for (const { tx, ty } of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, r)) if (src.getTile(tx, ty)) return true;
3493
+ for (const { tx, ty } of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, r)) if (src.getTile(tx, ty)) return true;
3494
3494
  return false;
3495
3495
  }
3496
3496
  function readWindow(src, srcRect, rect, depth = null) {
@@ -3499,7 +3499,7 @@ function readWindow(src, srcRect, rect, depth = null) {
3499
3499
  const win = { x: rect.x, y: rect.y, w: rect.width, h: rect.height, n, data };
3500
3500
  const r = intersect(rect, srcRect);
3501
3501
  if (!r) return win;
3502
- const px = depth ? readScaled(src, r, depth) : _chunkJ5BA3BQ6cjs.readRegion.call(void 0, src, r);
3502
+ const px = depth ? readScaled(src, r, depth) : _chunkO7LUD7MHcjs.readRegion.call(void 0, src, r);
3503
3503
  for (let y = 0; y < r.height; y++) {
3504
3504
  let s = y * r.width * src.channels;
3505
3505
  let d = ((r.y - rect.y + y) * rect.width + (r.x - rect.x)) * n;
@@ -3635,11 +3635,11 @@ function store(out, o, acc, ch, def) {
3635
3635
  }
3636
3636
  function resampleDepth(src, step) {
3637
3637
  if (src.channels !== 4 || src.defaultValue !== 0 || step !== 1) return null;
3638
- const d = _chunkJ5BA3BQ6cjs.surfaceDepth.call(void 0, src);
3638
+ const d = _chunkO7LUD7MHcjs.surfaceDepth.call(void 0, src);
3639
3639
  return d === 8 ? null : d;
3640
3640
  }
3641
3641
  function readScaled(src, rect, depth) {
3642
- const d = _chunkJ5BA3BQ6cjs.readDeepRegion.call(void 0, src, rect, depth);
3642
+ const d = _chunkO7LUD7MHcjs.readDeepRegion.call(void 0, src, rect, depth);
3643
3643
  const out = new Float32Array(d.length);
3644
3644
  const k = depth === 16 ? 1 / 257 : 255;
3645
3645
  for (let i = 0; i < d.length; i++) out[i] = d[i] * k;
@@ -3678,13 +3678,13 @@ function boxReduce(src, srcRect, kx, ky, depth = null) {
3678
3678
  const ry1 = Math.ceil((srcRect.y + srcRect.height) / ky);
3679
3679
  const rw = rx1 - rx0;
3680
3680
  const rect = { x: rx0, y: ry0, width: rw, height: ry1 - ry0 };
3681
- let out = _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, ch, src.defaultValue);
3682
- const rowsPer = Math.max(1, Math.floor(_chunkJ5BA3BQ6cjs.TILE / ky));
3681
+ let out = _chunkO7LUD7MHcjs.emptySurface.call(void 0, ch, src.defaultValue);
3682
+ const rowsPer = Math.max(1, Math.floor(_chunkO7LUD7MHcjs.TILE / ky));
3683
3683
  const area = kx * ky;
3684
3684
  for (let ry = ry0; ry < ry1; ry += rowsPer) {
3685
3685
  const rows = Math.min(rowsPer, ry1 - ry);
3686
3686
  const strip = { x: rx0 * kx, y: ry * ky, width: rw * kx, height: rows * ky };
3687
- const px = depth ? readScaled(src, strip, depth) : _chunkJ5BA3BQ6cjs.readRegion.call(void 0, src, strip);
3687
+ const px = depth ? readScaled(src, strip, depth) : _chunkO7LUD7MHcjs.readRegion.call(void 0, src, strip);
3688
3688
  const red = depth ? new Float32Array(rw * rows * ch) : new Uint8ClampedArray(rw * rows * ch);
3689
3689
  for (let j = 0; j < rows; j++) {
3690
3690
  for (let i = 0; i < rw; i++) {
@@ -3721,13 +3721,13 @@ function boxReduce(src, srcRect, kx, ky, depth = null) {
3721
3721
  }
3722
3722
  }
3723
3723
  const region = { x: rx0, y: ry, width: rw, height: rows };
3724
- out = depth ? _chunkJ5BA3BQ6cjs.writeDeepRegion.call(void 0, out, region, fromScaled(red, depth)) : _chunkJ5BA3BQ6cjs.writeRegion.call(void 0, out, region, red);
3724
+ out = depth ? _chunkO7LUD7MHcjs.writeDeepRegion.call(void 0, out, region, fromScaled(red, depth)) : _chunkO7LUD7MHcjs.writeRegion.call(void 0, out, region, red);
3725
3725
  }
3726
3726
  return { surface: out, rect };
3727
3727
  }
3728
3728
  function reduceSurface(src, factor) {
3729
3729
  const k = Math.max(1, Math.floor(factor));
3730
- const b = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, src);
3730
+ const b = _chunkO7LUD7MHcjs.contentBounds.call(void 0, src);
3731
3731
  if (k === 1 || !b) return src;
3732
3732
  return boxReduce(src, b, k, k).surface;
3733
3733
  }
@@ -3755,7 +3755,7 @@ function checkBudget(dst, what = "result") {
3755
3755
  }
3756
3756
  }
3757
3757
  function assemble(src, tiles) {
3758
- return new (0, _chunkJ5BA3BQ6cjs.TiledSurface)(src.channels, tiles, src.defaultValue);
3758
+ return new (0, _chunkO7LUD7MHcjs.TiledSurface)(src.channels, tiles, src.defaultValue);
3759
3759
  }
3760
3760
  function transformedBounds(source, h) {
3761
3761
  if (!(source.width > 0 && source.height > 0) || !_chunkMUUXNRU4cjs.invertHomography.call(void 0, h)) return null;
@@ -3767,7 +3767,7 @@ function transformSurface(src, h, options = {}) {
3767
3767
  const interp = _nullishCoalesce(options.interpolation, () => ( "bicubic"));
3768
3768
  const ch = src.channels;
3769
3769
  const def = src.defaultValue;
3770
- const empty = _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, ch, def);
3770
+ const empty = _chunkO7LUD7MHcjs.emptySurface.call(void 0, ch, def);
3771
3771
  const given = options.source;
3772
3772
  const step = normalizeStep(options.step);
3773
3773
  const depth = resampleDepth(src, step);
@@ -3778,12 +3778,12 @@ function transformSurface(src, h, options = {}) {
3778
3778
  const mx = Math.round(dx);
3779
3779
  const my = Math.round(dy);
3780
3780
  const b = src.bounds;
3781
- if (depth && b && (mx % _chunkJ5BA3BQ6cjs.TILE !== 0 || my % _chunkJ5BA3BQ6cjs.TILE !== 0)) {
3782
- return _chunkJ5BA3BQ6cjs.writeDeepRegion.call(void 0, _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, ch, def), { ...b, x: b.x + mx, y: b.y + my }, _chunkJ5BA3BQ6cjs.readDeepRegion.call(void 0, src, b, depth));
3781
+ if (depth && b && (mx % _chunkO7LUD7MHcjs.TILE !== 0 || my % _chunkO7LUD7MHcjs.TILE !== 0)) {
3782
+ return _chunkO7LUD7MHcjs.writeDeepRegion.call(void 0, _chunkO7LUD7MHcjs.emptySurface.call(void 0, ch, def), { ...b, x: b.x + mx, y: b.y + my }, _chunkO7LUD7MHcjs.readDeepRegion.call(void 0, src, b, depth));
3783
3783
  }
3784
- return _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, src, mx, my);
3784
+ return _chunkO7LUD7MHcjs.translateSurface.call(void 0, src, mx, my);
3785
3785
  }
3786
- let srcRect = given ? intersect(given, given) : _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, src);
3786
+ let srcRect = given ? intersect(given, given) : _chunkO7LUD7MHcjs.contentBounds.call(void 0, src);
3787
3787
  if (!srcRect) return empty;
3788
3788
  let H = h;
3789
3789
  let S = src;
@@ -3833,8 +3833,8 @@ function transformSurface(src, h, options = {}) {
3833
3833
  const sy0 = sr.y;
3834
3834
  const sx1 = sr.x + sr.width - 1;
3835
3835
  const sy1 = sr.y + sr.height - 1;
3836
- for (const { tx, ty } of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, dst)) {
3837
- const t = intersect({ x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, dst);
3836
+ for (const { tx, ty } of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, dst)) {
3837
+ const t = intersect({ x: tx * _chunkO7LUD7MHcjs.TILE, y: ty * _chunkO7LUD7MHcjs.TILE, width: _chunkO7LUD7MHcjs.TILE, height: _chunkO7LUD7MHcjs.TILE }, dst);
3838
3838
  if (!t) continue;
3839
3839
  const tc = [
3840
3840
  { x: t.x, y: t.y },
@@ -3880,12 +3880,12 @@ function transformSurface(src, h, options = {}) {
3880
3880
  const readable = intersect(foot, sr);
3881
3881
  if (!readable || !hasTilesIn(S, readable)) continue;
3882
3882
  const win = readWindow(S, sr, foot, depth);
3883
- const out = new Uint8ClampedArray(_chunkJ5BA3BQ6cjs.TILE * _chunkJ5BA3BQ6cjs.TILE * ch);
3883
+ const out = new Uint8ClampedArray(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * ch);
3884
3884
  if (def) out.fill(def);
3885
- const deepOut = depth ? new Float32Array(_chunkJ5BA3BQ6cjs.TILE * _chunkJ5BA3BQ6cjs.TILE * 4) : null;
3885
+ const deepOut = depth ? new Float32Array(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * 4) : null;
3886
3886
  let any = false;
3887
- const ox = tx * _chunkJ5BA3BQ6cjs.TILE;
3888
- const oy = ty * _chunkJ5BA3BQ6cjs.TILE;
3887
+ const ox = tx * _chunkO7LUD7MHcjs.TILE;
3888
+ const oy = ty * _chunkO7LUD7MHcjs.TILE;
3889
3889
  let su = widen(su0);
3890
3890
  let sv = widen(sv0);
3891
3891
  const ystart = t.y - ((t.y - oy) % step + step) % step;
@@ -3912,7 +3912,7 @@ function transformSurface(src, h, options = {}) {
3912
3912
  }
3913
3913
  sample(win, interp, u, v, su, sv, acc);
3914
3914
  if (deepOut) {
3915
- if (storeScaled(deepOut, ((y - oy) * _chunkJ5BA3BQ6cjs.TILE + (x - ox)) * 4, acc)) any = true;
3915
+ if (storeScaled(deepOut, ((y - oy) * _chunkO7LUD7MHcjs.TILE + (x - ox)) * 4, acc)) any = true;
3916
3916
  continue;
3917
3917
  }
3918
3918
  if (!store(scratch, 0, acc, ch, def)) continue;
@@ -3925,7 +3925,7 @@ function transformSurface(src, h, options = {}) {
3925
3925
  const y0 = Math.max(y, t.y);
3926
3926
  const y1 = Math.min(y + step, t.y + t.height);
3927
3927
  for (let yy = y0; yy < y1; yy++) {
3928
- const row = (yy - oy) * _chunkJ5BA3BQ6cjs.TILE - ox;
3928
+ const row = (yy - oy) * _chunkO7LUD7MHcjs.TILE - ox;
3929
3929
  for (let bi = 0, x = xstart; bi < blocks; bi++, x += step) {
3930
3930
  if (!rowSet[bi]) continue;
3931
3931
  const x0 = Math.max(x, t.x);
@@ -3937,8 +3937,8 @@ function transformSurface(src, h, options = {}) {
3937
3937
  }
3938
3938
  }
3939
3939
  if (!any) continue;
3940
- const tile = deepOut ? _chunkJ5BA3BQ6cjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunkJ5BA3BQ6cjs.finishTile.call(void 0, out, ch, def);
3941
- if (tile) tiles.set(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, tx, ty), tile);
3940
+ const tile = deepOut ? _chunkO7LUD7MHcjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunkO7LUD7MHcjs.finishTile.call(void 0, out, ch, def);
3941
+ if (tile) tiles.set(_chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty), tile);
3942
3942
  }
3943
3943
  return assemble(src, tiles);
3944
3944
  }
@@ -3949,8 +3949,8 @@ function warpSurface(src, f, options = {}) {
3949
3949
  const interp = _nullishCoalesce(options.interpolation, () => ( "bicubic"));
3950
3950
  const ch = src.channels;
3951
3951
  const def = src.defaultValue;
3952
- const empty = _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, ch, def);
3953
- const sr = options.source ? intersect(options.source, options.source) : _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, src);
3952
+ const empty = _chunkO7LUD7MHcjs.emptySurface.call(void 0, ch, def);
3953
+ const sr = options.source ? intersect(options.source, options.source) : _chunkO7LUD7MHcjs.contentBounds.call(void 0, src);
3954
3954
  if (!sr) return empty;
3955
3955
  const step = normalizeStep(options.step);
3956
3956
  const depth = resampleDepth(src, step);
@@ -4002,10 +4002,10 @@ function warpSurface(src, f, options = {}) {
4002
4002
  tris[t++] = a + w1;
4003
4003
  }
4004
4004
  }
4005
- const tx0 = Math.floor(dst.x / _chunkJ5BA3BQ6cjs.TILE);
4006
- const ty0 = Math.floor(dst.y / _chunkJ5BA3BQ6cjs.TILE);
4007
- const cols = Math.floor((dst.x + dst.width - 1) / _chunkJ5BA3BQ6cjs.TILE) - tx0 + 1;
4008
- const rows = Math.floor((dst.y + dst.height - 1) / _chunkJ5BA3BQ6cjs.TILE) - ty0 + 1;
4005
+ const tx0 = Math.floor(dst.x / _chunkO7LUD7MHcjs.TILE);
4006
+ const ty0 = Math.floor(dst.y / _chunkO7LUD7MHcjs.TILE);
4007
+ const cols = Math.floor((dst.x + dst.width - 1) / _chunkO7LUD7MHcjs.TILE) - tx0 + 1;
4008
+ const rows = Math.floor((dst.y + dst.height - 1) / _chunkO7LUD7MHcjs.TILE) - ty0 + 1;
4009
4009
  const bins = Array.from({ length: cols * rows }, () => []);
4010
4010
  for (let k = 0; k < triCount; k++) {
4011
4011
  const a = tris[3 * k];
@@ -4015,10 +4015,10 @@ function warpSurface(src, f, options = {}) {
4015
4015
  const tminy = Math.floor(Math.min(dvy[a], dvy[b], dvy[c]));
4016
4016
  const tmaxx = Math.ceil(Math.max(dvx[a], dvx[b], dvx[c]));
4017
4017
  const tmaxy = Math.ceil(Math.max(dvy[a], dvy[b], dvy[c]));
4018
- const cx0 = Math.max(0, Math.floor(Math.max(tminx, dst.x) / _chunkJ5BA3BQ6cjs.TILE) - tx0);
4019
- const cy0 = Math.max(0, Math.floor(Math.max(tminy, dst.y) / _chunkJ5BA3BQ6cjs.TILE) - ty0);
4020
- const cx1 = Math.min(cols - 1, Math.floor(Math.min(tmaxx, dst.x + dst.width - 1) / _chunkJ5BA3BQ6cjs.TILE) - tx0);
4021
- const cy1 = Math.min(rows - 1, Math.floor(Math.min(tmaxy, dst.y + dst.height - 1) / _chunkJ5BA3BQ6cjs.TILE) - ty0);
4018
+ const cx0 = Math.max(0, Math.floor(Math.max(tminx, dst.x) / _chunkO7LUD7MHcjs.TILE) - tx0);
4019
+ const cy0 = Math.max(0, Math.floor(Math.max(tminy, dst.y) / _chunkO7LUD7MHcjs.TILE) - ty0);
4020
+ const cx1 = Math.min(cols - 1, Math.floor(Math.min(tmaxx, dst.x + dst.width - 1) / _chunkO7LUD7MHcjs.TILE) - tx0);
4021
+ const cy1 = Math.min(rows - 1, Math.floor(Math.min(tmaxy, dst.y + dst.height - 1) / _chunkO7LUD7MHcjs.TILE) - ty0);
4022
4022
  for (let cy = cy0; cy <= cy1; cy++) for (let cx = cx0; cx <= cx1; cx++) bins[cy * cols + cx].push(k);
4023
4023
  }
4024
4024
  const tiles = /* @__PURE__ */ new Map();
@@ -4032,7 +4032,7 @@ function warpSurface(src, f, options = {}) {
4032
4032
  if (!list.length) continue;
4033
4033
  const ttx = tx0 + cx;
4034
4034
  const tty = ty0 + cy;
4035
- const t = intersect({ x: ttx * _chunkJ5BA3BQ6cjs.TILE, y: tty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, dst);
4035
+ const t = intersect({ x: ttx * _chunkO7LUD7MHcjs.TILE, y: tty * _chunkO7LUD7MHcjs.TILE, width: _chunkO7LUD7MHcjs.TILE, height: _chunkO7LUD7MHcjs.TILE }, dst);
4036
4036
  if (!t) continue;
4037
4037
  const tw = t.width;
4038
4038
  const th = t.height;
@@ -4122,12 +4122,12 @@ function warpSurface(src, f, options = {}) {
4122
4122
  const foot = intersect({ x: Math.floor(fx0) - 3, y: Math.floor(fy0) - 3, width: Math.ceil(fx1) - Math.floor(fx0) + 6, height: Math.ceil(fy1) - Math.floor(fy0) + 6 }, sr);
4123
4123
  if (!foot || !hasTilesIn(src, foot)) continue;
4124
4124
  const win = readWindow(src, sr, foot, depth);
4125
- const out = new Uint8ClampedArray(_chunkJ5BA3BQ6cjs.TILE * _chunkJ5BA3BQ6cjs.TILE * ch);
4125
+ const out = new Uint8ClampedArray(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * ch);
4126
4126
  if (def) out.fill(def);
4127
- const deepOut = depth ? new Float32Array(_chunkJ5BA3BQ6cjs.TILE * _chunkJ5BA3BQ6cjs.TILE * 4) : null;
4127
+ const deepOut = depth ? new Float32Array(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * 4) : null;
4128
4128
  let any = false;
4129
- const ox = ttx * _chunkJ5BA3BQ6cjs.TILE;
4130
- const oy = tty * _chunkJ5BA3BQ6cjs.TILE;
4129
+ const ox = ttx * _chunkO7LUD7MHcjs.TILE;
4130
+ const oy = tty * _chunkO7LUD7MHcjs.TILE;
4131
4131
  const pointAt = (o, into) => {
4132
4132
  const li = owner[o];
4133
4133
  const cnx = ssx[li];
@@ -4158,7 +4158,7 @@ function warpSurface(src, f, options = {}) {
4158
4158
  pointAt(o, acc);
4159
4159
  const x = t.x + o % tw;
4160
4160
  const y = t.y + Math.floor(o / tw);
4161
- const o4 = ((y - oy) * _chunkJ5BA3BQ6cjs.TILE + (x - ox)) * ch;
4161
+ const o4 = ((y - oy) * _chunkO7LUD7MHcjs.TILE + (x - ox)) * ch;
4162
4162
  if (deepOut ? storeScaled(deepOut, o4, acc) : store(out, o4, acc, ch, def)) any = true;
4163
4163
  }
4164
4164
  } else {
@@ -4167,19 +4167,19 @@ function warpSurface(src, f, options = {}) {
4167
4167
  const o = by * tw + bx;
4168
4168
  if (Number.isNaN(us[o])) continue;
4169
4169
  pointAt(o, acc);
4170
- const first = ((t.y + by - oy) * _chunkJ5BA3BQ6cjs.TILE + (t.x + bx - ox)) * ch;
4170
+ const first = ((t.y + by - oy) * _chunkO7LUD7MHcjs.TILE + (t.x + bx - ox)) * ch;
4171
4171
  if (!store(out, first, acc, ch, def)) continue;
4172
4172
  any = true;
4173
4173
  for (let yy = by; yy < Math.min(th, by + step); yy++) {
4174
- const row = ((t.y + yy - oy) * _chunkJ5BA3BQ6cjs.TILE + (t.x - ox)) * ch;
4174
+ const row = ((t.y + yy - oy) * _chunkO7LUD7MHcjs.TILE + (t.x - ox)) * ch;
4175
4175
  for (let xx = bx; xx < Math.min(tw, bx + step); xx++) for (let c = 0; c < ch; c++) out[row + xx * ch + c] = out[first + c];
4176
4176
  }
4177
4177
  }
4178
4178
  }
4179
4179
  }
4180
4180
  if (!any) continue;
4181
- const tile = deepOut ? _chunkJ5BA3BQ6cjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunkJ5BA3BQ6cjs.finishTile.call(void 0, out, ch, def);
4182
- if (tile) tiles.set(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, ttx, tty), tile);
4181
+ const tile = deepOut ? _chunkO7LUD7MHcjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunkO7LUD7MHcjs.finishTile.call(void 0, out, ch, def);
4182
+ if (tile) tiles.set(_chunkO7LUD7MHcjs.tileKey.call(void 0, ttx, tty), tile);
4183
4183
  }
4184
4184
  }
4185
4185
  return assemble(src, tiles);
@@ -4189,7 +4189,7 @@ function compositeSurfaceOver(base, top) {
4189
4189
  if (!top.tiles.size) return base;
4190
4190
  const ch = base.channels;
4191
4191
  const tiles = new Map(base.tiles);
4192
- const bd = ch === 4 && base.defaultValue === 0 ? Math.max(_chunkJ5BA3BQ6cjs.surfaceDepth.call(void 0, base), _chunkJ5BA3BQ6cjs.surfaceDepth.call(void 0, top)) : 8;
4192
+ const bd = ch === 4 && base.defaultValue === 0 ? Math.max(_chunkO7LUD7MHcjs.surfaceDepth.call(void 0, base), _chunkO7LUD7MHcjs.surfaceDepth.call(void 0, top)) : 8;
4193
4193
  const depth = bd === 8 ? null : bd;
4194
4194
  for (const [key, t] of top.tiles) {
4195
4195
  const under = base.tiles.get(key);
@@ -4199,8 +4199,8 @@ function compositeSurfaceOver(base, top) {
4199
4199
  }
4200
4200
  if (depth) {
4201
4201
  const k = depth === 16 ? 65535 : 1;
4202
- const d2 = _chunkJ5BA3BQ6cjs.tileSamples.call(void 0, under, 4, depth, 0).slice();
4203
- const sd = _chunkJ5BA3BQ6cjs.tileSamples.call(void 0, t, 4, depth, 0);
4202
+ const d2 = _chunkO7LUD7MHcjs.tileSamples.call(void 0, under, 4, depth, 0).slice();
4203
+ const sd = _chunkO7LUD7MHcjs.tileSamples.call(void 0, t, 4, depth, 0);
4204
4204
  for (let i = 0; i < d2.length; i += 4) {
4205
4205
  const ta = Math.min(1, sd[i + 3] / k);
4206
4206
  if (ta <= 0) continue;
@@ -4212,12 +4212,12 @@ function compositeSurfaceOver(base, top) {
4212
4212
  }
4213
4213
  d2[i + 3] = depth === 16 ? Math.round(oa * k) : oa;
4214
4214
  }
4215
- const tile2 = _chunkJ5BA3BQ6cjs.deepTile.call(void 0, d2, 4, 0);
4215
+ const tile2 = _chunkO7LUD7MHcjs.deepTile.call(void 0, d2, 4, 0);
4216
4216
  if (tile2) tiles.set(key, tile2);
4217
4217
  else tiles.delete(key);
4218
4218
  continue;
4219
4219
  }
4220
- const d = new Uint8ClampedArray(_chunkJ5BA3BQ6cjs.TILE * _chunkJ5BA3BQ6cjs.TILE * ch);
4220
+ const d = new Uint8ClampedArray(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * ch);
4221
4221
  if (under) d.set(under.data);
4222
4222
  else if (base.defaultValue) d.fill(base.defaultValue);
4223
4223
  const s = t.data;
@@ -4243,11 +4243,11 @@ function compositeSurfaceOver(base, top) {
4243
4243
  if (ta > 0) d[p] = s[i] * ta + d[p] * (1 - ta);
4244
4244
  }
4245
4245
  }
4246
- const tile = _chunkJ5BA3BQ6cjs.finishTile.call(void 0, d, ch, base.defaultValue);
4246
+ const tile = _chunkO7LUD7MHcjs.finishTile.call(void 0, d, ch, base.defaultValue);
4247
4247
  if (tile) tiles.set(key, tile);
4248
4248
  else tiles.delete(key);
4249
4249
  }
4250
- return new (0, _chunkJ5BA3BQ6cjs.TiledSurface)(ch, tiles, base.defaultValue);
4250
+ return new (0, _chunkO7LUD7MHcjs.TiledSurface)(ch, tiles, base.defaultValue);
4251
4251
  }
4252
4252
 
4253
4253
 
@@ -4314,4 +4314,4 @@ function compositeSurfaceOver(base, top) {
4314
4314
 
4315
4315
 
4316
4316
  exports.DEFAULT_GLOBAL_LIGHT = DEFAULT_GLOBAL_LIGHT; exports.LAYER_EFFECT_KINDS = LAYER_EFFECT_KINDS; exports.layerEffectLabel = layerEffectLabel; exports.isLayerEffectKind = isLayerEffectKind; exports.defaultEffectGradient = defaultEffectGradient; exports.newEffectId = newEffectId; exports.defaultLayerEffect = defaultLayerEffect; exports.hasActiveEffects = hasActiveEffects; exports.MAX_EFFECT_REACH = MAX_EFFECT_REACH; exports.effectReach = effectReach; exports.effectsMargin = effectsMargin; exports.effectsScale = effectsScale; exports.scaleLayerEffect = scaleLayerEffect; exports.parseEffectColor = parseEffectColor; exports.effectColorHex = effectColorHex; exports.LayerEffectError = LayerEffectError; exports.validateEffectGradient = validateEffectGradient; exports.layerEffectFields = layerEffectFields; exports.validateLayerEffect = validateLayerEffect; exports.mergeLayerEffect = mergeLayerEffect; exports.validateLayerEffects = validateLayerEffects; exports.normalizeLayerEffects = normalizeLayerEffects; exports.effectsFingerprint = effectsFingerprint; exports.CURVE_LUT_SIZE = CURVE_LUT_SIZE; exports.curveLut = curveLut; exports.PatternTile = PatternTile; exports.PatternPlacement = PatternPlacement; exports.builtinPatternIds = builtinPatternIds; exports.builtinPattern = builtinPattern; exports.hashNoise = hashNoise; exports.STROKE_CHAMFER_MAX = STROKE_CHAMFER_MAX; exports.contourLut = contourLut; exports.activeEffectItems = activeEffectItems; exports.effectsAreLocal = effectsAreLocal; exports.buildEffectMaps = buildEffectMaps; exports.patchEffectMaps = patchEffectMaps; exports.gradientT = gradientT; exports.effectFillColors = effectFillColors; exports.compositeLayerEffects = compositeLayerEffects; exports.renderLayerEffects = renderLayerEffects; exports.DeepCompositor = DeepCompositor; exports.workingToSamples = workingToSamples; exports.DIRECT_GAUSSIAN_MAX_SIGMA = DIRECT_GAUSSIAN_MAX_SIGMA; exports.gaussianBlur = gaussianBlur; exports.flattenLayers = flattenLayers; exports.findLayer = findLayer; exports.mapLayer = mapLayer; exports.insertLayer = insertLayer; exports.isLayerLocked = isLayerLocked; exports.blendTile = blendTile; exports.RasterCompositor = RasterCompositor; exports.changedTiles = changedTiles; exports.INTERPOLATIONS = INTERPOLATIONS; exports.isInterpolation = isInterpolation; exports.MAX_TRANSFORM_PIXELS = MAX_TRANSFORM_PIXELS; exports.TransformTooLargeError = TransformTooLargeError; exports.keysWeight = keysWeight; exports.reduceSurface = reduceSurface; exports.transformedBounds = transformedBounds; exports.transformSurface = transformSurface; exports.warpSurface = warpSurface; exports.compositeSurfaceOver = compositeSurfaceOver;
4317
- //# sourceMappingURL=chunk-24ATT2PE.cjs.map
4317
+ //# sourceMappingURL=chunk-AEAAN4AD.cjs.map