@pixerate/editor 0.133.0 → 0.134.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 (61) hide show
  1. package/dist/animation-editor/index.cjs +55 -55
  2. package/dist/animation-editor/index.d.cts +4 -4
  3. package/dist/animation-editor/index.d.ts +4 -4
  4. package/dist/animation-editor/index.js +2 -2
  5. package/dist/{bezier-DL2wPsFf.d.cts → bezier-J8i4uqSH.d.cts} +1 -1
  6. package/dist/{bezier-BAGdL89w.d.ts → bezier-lNEOp0Jx.d.ts} +1 -1
  7. package/dist/canvas/index.d.cts +7 -7
  8. package/dist/canvas/index.d.ts +7 -7
  9. package/dist/{chunk-VGZSIXX3.js → chunk-7RJ6P7MI.js} +2 -2
  10. package/dist/{chunk-AOCFL7L7.js → chunk-ESIWZMMK.js} +2 -2
  11. package/dist/{chunk-FOBB6AIO.js → chunk-HHTCDFZC.js} +97 -5
  12. package/dist/chunk-HHTCDFZC.js.map +1 -0
  13. package/dist/{chunk-2QKUD3E2.cjs → chunk-T6TV6HY6.cjs} +36 -36
  14. package/dist/{chunk-2QKUD3E2.cjs.map → chunk-T6TV6HY6.cjs.map} +1 -1
  15. package/dist/{chunk-65GNHOD4.cjs → chunk-YAFS2QFZ.cjs} +82 -82
  16. package/dist/{chunk-65GNHOD4.cjs.map → chunk-YAFS2QFZ.cjs.map} +1 -1
  17. package/dist/{chunk-F7GGEAO2.cjs → chunk-Z2H7KECK.cjs} +151 -59
  18. package/dist/chunk-Z2H7KECK.cjs.map +1 -0
  19. package/dist/effects/index.d.cts +4 -4
  20. package/dist/effects/index.d.ts +4 -4
  21. package/dist/{export-BICOEM9d.d.cts → export-BGdT02aL.d.cts} +3 -3
  22. package/dist/{export-zB4HITwP.d.ts → export-DMeG6E06.d.ts} +1 -1
  23. package/dist/{export-XnuX8FZ2.d.ts → export-Dng22YB8.d.ts} +3 -3
  24. package/dist/{export-CeFplzAW.d.cts → export-KzubBKo7.d.cts} +1 -1
  25. package/dist/{helpers-cssRNUzH.d.ts → helpers-Coa4e2j_.d.ts} +12 -0
  26. package/dist/{helpers-BuKdqUlM.d.cts → helpers-DHl28yLO.d.cts} +12 -0
  27. package/dist/image-editor/index.cjs +610 -610
  28. package/dist/image-editor/index.d.cts +8 -8
  29. package/dist/image-editor/index.d.ts +8 -8
  30. package/dist/image-editor/index.js +2 -2
  31. package/dist/{opentype-C3iyIFRx.d.cts → opentype-BWR7Qv8W.d.cts} +1 -1
  32. package/dist/{opentype-DG5Lkwul.d.ts → opentype-Dfcx6wFx.d.ts} +1 -1
  33. package/dist/paint-editor/index.cjs +7 -7
  34. package/dist/paint-editor/index.d.cts +5 -5
  35. package/dist/paint-editor/index.d.ts +5 -5
  36. package/dist/paint-editor/index.js +2 -2
  37. package/dist/{pathfinder-DKLt4UDG.d.ts → pathfinder-Celbi3e6.d.ts} +1 -1
  38. package/dist/{pathfinder-8vXik95z.d.cts → pathfinder-D8KQ6blQ.d.cts} +1 -1
  39. package/dist/{pool-C69pkWRz.d.ts → pool-8JZGWHvR.d.ts} +1 -1
  40. package/dist/{pool-VAWcYUbs.d.cts → pool-BfuxBKTd.d.cts} +1 -1
  41. package/dist/{svg-CEYpvsgH.d.ts → svg-CxxqG3_W.d.ts} +2 -2
  42. package/dist/{svg-BThlZmja.d.cts → svg-pwXWq6s2.d.cts} +2 -2
  43. package/dist/{tools-CRnZJXXr.d.cts → tools-3EBjR91b.d.cts} +1 -1
  44. package/dist/{tools-CVGqEpO8.d.ts → tools-y1M6O3UT.d.ts} +1 -1
  45. package/dist/vector/index.cjs +1292 -1035
  46. package/dist/vector/index.cjs.map +1 -1
  47. package/dist/vector/index.d.cts +183 -91
  48. package/dist/vector/index.d.ts +183 -91
  49. package/dist/vector/index.js +267 -10
  50. package/dist/vector/index.js.map +1 -1
  51. package/dist/video-editor/index.d.cts +4 -4
  52. package/dist/video-editor/index.d.ts +4 -4
  53. package/dist/{warp-mKylbLiF.d.ts → warp-C1gwu2G_.d.ts} +1 -1
  54. package/dist/{warp-ChcFDdlT.d.cts → warp-Ceqdz7kj.d.cts} +1 -1
  55. package/package.json +1 -1
  56. package/skills/pixerate-vector/SKILL.md +12 -53
  57. package/skills/pixerate-vector/references/pitfalls.md +62 -0
  58. package/dist/chunk-F7GGEAO2.cjs.map +0 -1
  59. package/dist/chunk-FOBB6AIO.js.map +0 -1
  60. /package/dist/{chunk-VGZSIXX3.js.map → chunk-7RJ6P7MI.js.map} +0 -0
  61. /package/dist/{chunk-AOCFL7L7.js.map → chunk-ESIWZMMK.js.map} +0 -0
@@ -363,7 +363,7 @@ var _chunk2OJACTPRcjs = require('../chunk-2OJACTPR.cjs');
363
363
 
364
364
 
365
365
 
366
- var _chunk65GNHOD4cjs = require('../chunk-65GNHOD4.cjs');
366
+ var _chunkYAFS2QFZcjs = require('../chunk-YAFS2QFZ.cjs');
367
367
 
368
368
 
369
369
  var _chunk2YQONY6Gcjs = require('../chunk-2YQONY6G.cjs');
@@ -806,7 +806,7 @@ var _chunk643B2HKCcjs = require('../chunk-643B2HKC.cjs');
806
806
 
807
807
 
808
808
 
809
- var _chunkF7GGEAO2cjs = require('../chunk-F7GGEAO2.cjs');
809
+ var _chunkZ2H7KECKcjs = require('../chunk-Z2H7KECK.cjs');
810
810
  require('../chunk-BJTCSLF6.cjs');
811
811
  require('../chunk-IZ4WRXZA.cjs');
812
812
 
@@ -924,7 +924,7 @@ function quickMaskPixels(mask, style = {}) {
924
924
 
925
925
  // src/image-editor/layers/render.ts
926
926
  function isQuarterTurn(rotate) {
927
- return _chunk65GNHOD4cjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
927
+ return _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
928
928
  }
929
929
  function isIntegerRect(r) {
930
930
  return Number.isInteger(r.x) && Number.isInteger(r.y) && Number.isInteger(r.width) && Number.isInteger(r.height);
@@ -932,7 +932,7 @@ function isIntegerRect(r) {
932
932
  function baseProjection(region, transform, baseW, baseH) {
933
933
  return {
934
934
  region,
935
- angle: _chunk65GNHOD4cjs.normalizeAngle.call(void 0, transform.rotate),
935
+ angle: _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate),
936
936
  flipH: transform.flipH,
937
937
  flipV: transform.flipV,
938
938
  scale: 1,
@@ -941,14 +941,14 @@ function baseProjection(region, transform, baseW, baseH) {
941
941
  };
942
942
  }
943
943
  function projectQuarterTurn(src, srcRect, region, transform) {
944
- const rotated = _chunk65GNHOD4cjs.getRotatedSize.call(void 0, region.width, region.height, transform);
944
+ const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
945
945
  const w = Math.max(1, Math.round(rotated.width));
946
946
  const h = Math.max(1, Math.round(rotated.height));
947
947
  const out = new Uint8ClampedArray(w * h * 4);
948
948
  const p = baseProjection(region, transform, w, h);
949
- const o = _chunk65GNHOD4cjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
950
- const ox = _chunk65GNHOD4cjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
951
- const oy = _chunk65GNHOD4cjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
949
+ const o = _chunkYAFS2QFZcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
950
+ const ox = _chunkYAFS2QFZcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
951
+ const oy = _chunkYAFS2QFZcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
952
952
  const ux = Math.round(ox.x - o.x);
953
953
  const vx = Math.round(ox.y - o.y);
954
954
  const uy = Math.round(oy.x - o.x);
@@ -977,23 +977,23 @@ function applyOutputStage(img, opacity, legacyOutputBlur) {
977
977
  const d = img.data;
978
978
  for (let i = 3; i < d.length; i += 4) d[i] = d[i] * opacity;
979
979
  }
980
- if (legacyOutputBlur && legacyOutputBlur > 0) _chunk65GNHOD4cjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
980
+ if (legacyOutputBlur && legacyOutputBlur > 0) _chunkYAFS2QFZcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
981
981
  }
982
982
  function needsLegacyBase(input) {
983
983
  const { stack, region, canvas, transform } = input;
984
- if (!_chunk65GNHOD4cjs.isLegacyShape.call(void 0, stack)) return false;
984
+ if (!_chunkYAFS2QFZcjs.isLegacyShape.call(void 0, stack)) return false;
985
985
  const bg = stack.layers[0];
986
986
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
987
987
  if (_optionalChain([bg, 'access', _2 => _2.mask, 'optionalAccess', _3 => _3.source, 'optionalAccess', _4 => _4.enabled]) && bg.mask.source.maskSource) return true;
988
988
  if (stack.outputOpacity < 1) return true;
989
- const blur = _chunk65GNHOD4cjs.blurFilter.call(void 0, bg);
989
+ const blur = _chunkYAFS2QFZcjs.blurFilter.call(void 0, bg);
990
990
  if (blur && blur.enabled && blur.radius > 0) {
991
991
  const full = region.x === 0 && region.y === 0 && region.width === canvas.width && region.height === canvas.height;
992
- const angle = _chunk65GNHOD4cjs.normalizeAngle.call(void 0, transform.rotate);
992
+ const angle = _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate);
993
993
  if (!full || angle === 90 || angle === 270) return true;
994
994
  }
995
995
  if ((_nullishCoalesce(stack.legacyOutputBlur, () => ( 0))) > 0 && !input.sourceOpaque) return true;
996
- if (_chunk65GNHOD4cjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
996
+ if (_chunkYAFS2QFZcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
997
997
  return false;
998
998
  }
999
999
  var isPlainAnnotation = (l) => l.type === "annotation" ? l.opacity === 1 && l.blend === "normal" && !l.clipped && !l.mask : (l.type === "shape" || l.type === "type") && Boolean(l.annotation) && l.opacity === 1 && l.blend === (_nullishCoalesce(l.annotation.blend, () => ( "normal"))) && !l.clipped && !l.mask && !l.effects && (_nullishCoalesce(l.fillOpacity, () => ( 1))) === 1;
@@ -1025,7 +1025,7 @@ function coveringRect(region) {
1025
1025
  const y = Math.floor(region.y);
1026
1026
  return { x, y, width: Math.ceil(region.x + region.width) - x, height: Math.ceil(region.y + region.height) - y };
1027
1027
  }
1028
- function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunk65GNHOD4cjs.LayerCompositor)()) {
1028
+ function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)()) {
1029
1029
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) {
1030
1030
  throw new Error("renderLayeredBase needs an integer region and a quarter-turn rotation.");
1031
1031
  }
@@ -1159,8 +1159,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1159
1159
  * The viewport's compositor. It only ever composites the viewport's stack, so its tile cache can
1160
1160
  * trust dirty rectangles; exports use `exportCompositor`.
1161
1161
  */
1162
- __init8() {this.compositor = new (0, _chunk65GNHOD4cjs.LayerCompositor)()}
1163
- __init9() {this.exportCompositor = new (0, _chunk65GNHOD4cjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1162
+ __init8() {this.compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)()}
1163
+ __init9() {this.exportCompositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1164
1164
  /** How the host resolves layer pixels (set by the controller). */
1165
1165
 
1166
1166
  /**
@@ -1237,9 +1237,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1237
1237
  return;
1238
1238
  }
1239
1239
  const isActivelyCropping = Boolean(options.showCropOverlay || state.activeTool === "crop");
1240
- const projection = _chunk65GNHOD4cjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1240
+ const projection = _chunkYAFS2QFZcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1241
1241
  const { region } = projection;
1242
- const rotated = _chunk65GNHOD4cjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1242
+ const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1243
1243
  const route = this.chooseRoute(state, region, naturalWidth, naturalHeight);
1244
1244
  let overlay = annotations;
1245
1245
  if (route === "legacy") {
@@ -1249,8 +1249,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1249
1249
  `${naturalWidth}x${naturalHeight}`,
1250
1250
  `${region.x},${region.y},${region.width},${region.height}`,
1251
1251
  `${projection.angle},${transform.flipH},${transform.flipV}`,
1252
- `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunk65GNHOD4cjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1253
- _chunk65GNHOD4cjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1252
+ `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1253
+ _chunkYAFS2QFZcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1254
1254
  `${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _5 => _5.depthRange, 'optionalAccess', _6 => _6[0]])}-${_optionalChain([depthMask, 'access', _7 => _7.depthRange, 'optionalAccess', _8 => _8[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
1255
1255
  `d${this.displayKey}`
1256
1256
  ].join("|");
@@ -1284,7 +1284,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1284
1284
  }
1285
1285
  if (overlay.length > 0 || options.draftAnnotation) {
1286
1286
  ctx.save();
1287
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1287
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1288
1288
  ctx.beginPath();
1289
1289
  ctx.rect(region.x, region.y, region.width, region.height);
1290
1290
  ctx.clip();
@@ -1307,7 +1307,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1307
1307
  if (_optionalChain([state, 'access', _15 => _15.selection, 'optionalAccess', _16 => _16.bounds]) && display !== "none" || _optionalChain([options, 'access', _17 => _17.draftSelectionPath, 'optionalAccess', _18 => _18.length])) {
1308
1308
  ctx.save();
1309
1309
  try {
1310
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1310
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1311
1311
  ctx.beginPath();
1312
1312
  ctx.rect(region.x, region.y, region.width, region.height);
1313
1313
  ctx.clip();
@@ -1322,7 +1322,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1322
1322
  const b = options.brushCursor;
1323
1323
  ctx.save();
1324
1324
  try {
1325
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1325
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1326
1326
  const px2 = 1 / (projection.scale || 1);
1327
1327
  ctx.beginPath();
1328
1328
  ctx.arc(b.x, b.y, Math.max(px2, b.diameter / 2), 0, Math.PI * 2);
@@ -1337,7 +1337,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1337
1337
  ctx.restore();
1338
1338
  }
1339
1339
  if (options.cloneSourceMarker) {
1340
- const m = _chunk65GNHOD4cjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1340
+ const m = _chunkYAFS2QFZcjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1341
1341
  ctx.save();
1342
1342
  try {
1343
1343
  const r = 7;
@@ -1361,7 +1361,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1361
1361
  const t = options.textEdit;
1362
1362
  ctx.save();
1363
1363
  try {
1364
- const scr = (p) => _chunk65GNHOD4cjs.projectImagePoint.call(void 0, p, projection);
1364
+ const scr = (p) => _chunkYAFS2QFZcjs.projectImagePoint.call(void 0, p, projection);
1365
1365
  const poly = (pts) => {
1366
1366
  ctx.beginPath();
1367
1367
  pts.map(scr).forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
@@ -1400,7 +1400,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1400
1400
  const t = options.freeTransform;
1401
1401
  ctx.save();
1402
1402
  try {
1403
- const scr = (p) => _chunk65GNHOD4cjs.projectImagePoint.call(void 0, p, projection);
1403
+ const scr = (p) => _chunkYAFS2QFZcjs.projectImagePoint.call(void 0, p, projection);
1404
1404
  ctx.beginPath();
1405
1405
  if (t.warp) {
1406
1406
  for (const c of t.warp.curves) {
@@ -1458,7 +1458,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1458
1458
  }
1459
1459
  if (isActivelyCropping) {
1460
1460
  const activeCrop = options.draftCrop !== void 0 && options.draftCrop !== null ? options.draftCrop : _nullishCoalesce(crop, () => ( { x: 0, y: 0, width: naturalWidth, height: naturalHeight }));
1461
- this.drawCropOverlay(ctx, _chunk65GNHOD4cjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1461
+ this.drawCropOverlay(ctx, _chunkYAFS2QFZcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1462
1462
  }
1463
1463
  }
1464
1464
  /**
@@ -1467,7 +1467,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1467
1467
  */
1468
1468
  async renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, onPixels) {
1469
1469
  const { adjustments, depthMask } = state;
1470
- const rotated = _chunk65GNHOD4cjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1470
+ const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1471
1471
  const baseW = Math.max(1, Math.round(rotated.width));
1472
1472
  const baseH = Math.max(1, Math.round(rotated.height));
1473
1473
  const baseCanvas = this.createCanvas(baseW, baseH);
@@ -1475,7 +1475,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1475
1475
  if (!baseCtx) return baseCanvas;
1476
1476
  const projection = getBaseProjection(region, transform, baseW, baseH);
1477
1477
  baseCtx.save();
1478
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1478
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1479
1479
  baseCtx.drawImage(
1480
1480
  img,
1481
1481
  region.x,
@@ -1490,8 +1490,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1490
1490
  baseCtx.restore();
1491
1491
  const imageData = baseCtx.getImageData(0, 0, baseW, baseH);
1492
1492
  if (imageData) {
1493
- const layerMasks = _chunk65GNHOD4cjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1494
- _chunk65GNHOD4cjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1493
+ const layerMasks = _chunkYAFS2QFZcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1494
+ _chunkYAFS2QFZcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1495
1495
  if (depthMask.enabled && depthMask.maskSource) {
1496
1496
  try {
1497
1497
  const maskImg = await this.imageCache.get(depthMask.maskSource);
@@ -1502,7 +1502,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1502
1502
  const maskCtx = maskCanvas.getContext("2d");
1503
1503
  if (maskCtx) {
1504
1504
  maskCtx.save();
1505
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1505
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1506
1506
  maskCtx.drawImage(
1507
1507
  maskImg,
1508
1508
  region.x * sx,
@@ -1517,7 +1517,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1517
1517
  maskCtx.restore();
1518
1518
  const maskData = maskCtx.getImageData(0, 0, baseW, baseH);
1519
1519
  if (maskData) {
1520
- _chunk65GNHOD4cjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1520
+ _chunkYAFS2QFZcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1521
1521
  }
1522
1522
  }
1523
1523
  } catch (e8) {
@@ -1536,7 +1536,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1536
1536
  else if (this.baseRoute === "layers") route = "layers";
1537
1537
  else {
1538
1538
  const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
1539
- const shaped = this.baseRoute === "legacy" && _chunk65GNHOD4cjs.isLegacyShape.call(void 0, stack);
1539
+ const shaped = this.baseRoute === "legacy" && _chunkYAFS2QFZcjs.isLegacyShape.call(void 0, stack);
1540
1540
  route = shaped || needsLegacyBase({
1541
1541
  stack,
1542
1542
  region,
@@ -1671,17 +1671,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1671
1671
  if (!comp) return null;
1672
1672
  const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
1673
1673
  const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
1674
- const rotated = _chunk65GNHOD4cjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1674
+ const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1675
1675
  const baseW = Math.max(1, Math.round(rotated.width));
1676
1676
  const baseH = Math.max(1, Math.round(rotated.height));
1677
- const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunk65GNHOD4cjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1677
+ const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1678
1678
  if (this.cachedPostCanvas && this.cachedPostKey === key) return { canvas: this.cachedPostCanvas, histogram: this.cachedPostHistogram };
1679
1679
  const canvas = this.cachedPostCanvas && this.cachedPostCanvas.width === baseW && this.cachedPostCanvas.height === baseH ? this.cachedPostCanvas : this.createCanvas(baseW, baseH);
1680
1680
  const ctx = canvas.getContext("2d");
1681
1681
  if (!ctx) return null;
1682
1682
  ctx.clearRect(0, 0, baseW, baseH);
1683
1683
  ctx.save();
1684
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1684
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1685
1685
  ctx.beginPath();
1686
1686
  ctx.rect(region.x, region.y, region.width, region.height);
1687
1687
  ctx.clip();
@@ -1953,7 +1953,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1953
1953
  ctx.strokeStyle = "#3b82f6";
1954
1954
  ctx.lineWidth = 1.5;
1955
1955
  ctx.setLineDash([4, 4]);
1956
- const bounds = _chunk65GNHOD4cjs.getAnnotationBounds.call(void 0, ann);
1956
+ const bounds = _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, ann);
1957
1957
  const pad = 4;
1958
1958
  ctx.strokeRect(bounds.x - pad, bounds.y - pad, bounds.width + pad * 2, bounds.height + pad * 2);
1959
1959
  ctx.fillStyle = "#ffffff";
@@ -1974,7 +1974,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1974
1974
  }
1975
1975
  /** @deprecated Use the standalone `getAnnotationBounds` from the geometry module. */
1976
1976
  getAnnotationBounds(ann) {
1977
- return _chunk65GNHOD4cjs.getAnnotationBounds.call(void 0, ann);
1977
+ return _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, ann);
1978
1978
  }
1979
1979
  /**
1980
1980
  * Draws a rule-of-thirds crop grid overlay. All rectangles come from
@@ -2056,8 +2056,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2056
2056
  }
2057
2057
  const { width: naturalWidth, height: naturalHeight } = getSourceSize(img);
2058
2058
  const { crop, transform, annotations } = state;
2059
- const region = crop ? _chunk65GNHOD4cjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2060
- const rotated = _chunk65GNHOD4cjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2059
+ const region = crop ? _chunkYAFS2QFZcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2060
+ const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2061
2061
  const baseW = Math.max(1, Math.round(rotated.width));
2062
2062
  const baseH = Math.max(1, Math.round(rotated.height));
2063
2063
  const exportW = options.width || baseW;
@@ -2086,7 +2086,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2086
2086
  const bctx = baseCanvas.getContext("2d");
2087
2087
  if (bctx) {
2088
2088
  bctx.save();
2089
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2089
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2090
2090
  bctx.beginPath();
2091
2091
  bctx.rect(region.x, region.y, region.width, region.height);
2092
2092
  bctx.clip();
@@ -2099,7 +2099,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2099
2099
  if (options.includeAnnotations !== false && overlay.length > 0) {
2100
2100
  ctx.save();
2101
2101
  ctx.scale(exportW / baseW, exportH / baseH);
2102
- _chunk65GNHOD4cjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2102
+ _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2103
2103
  for (const ann of overlay) {
2104
2104
  await this.drawAnnotation(ctx, ann);
2105
2105
  }
@@ -2189,7 +2189,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2189
2189
  case "rect":
2190
2190
  case "image":
2191
2191
  case "text": {
2192
- const b = _chunk65GNHOD4cjs.getAnnotationBounds.call(void 0, ann);
2192
+ const b = _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, ann);
2193
2193
  ctx.fillRect(b.x, b.y, b.width, b.height);
2194
2194
  break;
2195
2195
  }
@@ -2209,7 +2209,7 @@ function getSourceSize(img, fallbackW = 800, fallbackH = 600) {
2209
2209
  function getBaseProjection(region, transform, baseW, baseH) {
2210
2210
  return {
2211
2211
  region,
2212
- angle: _chunk65GNHOD4cjs.normalizeAngle.call(void 0, transform.rotate),
2212
+ angle: _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate),
2213
2213
  flipH: transform.flipH,
2214
2214
  flipV: transform.flipV,
2215
2215
  scale: 1,
@@ -2313,8 +2313,8 @@ function polygonCoverage(points, width, height, antiAlias = true) {
2313
2313
  }
2314
2314
  function toMask(width, height, coverage) {
2315
2315
  const out = new Uint8Array(coverage.length);
2316
- for (let i = 0; i < out.length; i++) out[i] = _chunk65GNHOD4cjs.coverageToByte.call(void 0, coverage[i]);
2317
- return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, width, height, out);
2316
+ for (let i = 0; i < out.length; i++) out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, coverage[i]);
2317
+ return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height, out);
2318
2318
  }
2319
2319
  function polygonSelection(width, height, points, options = {}) {
2320
2320
  return toMask(width, height, polygonCoverage(points, width, height, _nullishCoalesce(options.antiAlias, () => ( true))));
@@ -2441,7 +2441,7 @@ function magicWand(pixels, seed, options = {}) {
2441
2441
  const { width: w, height: h } = pixels;
2442
2442
  const sx = Math.floor(seed.x);
2443
2443
  const sy = Math.floor(seed.y);
2444
- if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, w, h);
2444
+ if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h);
2445
2445
  const similar = similarity(pixels, sy * w + sx, _nullishCoalesce(options.tolerance, () => ( 32)), _nullishCoalesce(options.distance, () => ( "rgb")));
2446
2446
  const marks = new Uint8Array(n);
2447
2447
  let bx0 = w;
@@ -2489,9 +2489,9 @@ function magicWand(pixels, seed, options = {}) {
2489
2489
  }
2490
2490
  }
2491
2491
  }
2492
- if (bx1 < 0) return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, w, h);
2493
- if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, w, h, marks);
2494
- return _chunk65GNHOD4cjs.createSelectionMask.call(void 0,
2492
+ if (bx1 < 0) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h);
2493
+ if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h, marks);
2494
+ return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0,
2495
2495
  w,
2496
2496
  h,
2497
2497
  antialiasMarks(marks, w, h, Math.max(0, bx0 - 1), Math.max(0, by0 - 1), Math.min(w, bx1 + 2), Math.min(h, by1 + 2))
@@ -2513,7 +2513,7 @@ function colorRange(pixels, samples, options = {}) {
2513
2513
  const parsed = samples.map((s) => ({ c: sampleColor(s.color), at: s.at }));
2514
2514
  const radius = options.localized !== void 0 ? Math.max(1, options.localized) : void 0;
2515
2515
  const out = new Uint8Array(n);
2516
- if (!parsed.length) return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, w, h, out);
2516
+ if (!parsed.length) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h, out);
2517
2517
  for (let i = 0; i < n; i++) {
2518
2518
  const p = i * 4;
2519
2519
  if (data[p + 3] <= 0) continue;
@@ -2529,9 +2529,9 @@ function colorRange(pixels, samples, options = {}) {
2529
2529
  }
2530
2530
  if (k > best) best = k;
2531
2531
  }
2532
- out[i] = _chunk65GNHOD4cjs.coverageToByte.call(void 0, best);
2532
+ out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, best);
2533
2533
  }
2534
- return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, w, h, out);
2534
+ return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h, out);
2535
2535
  }
2536
2536
  var TONE_RANGE_PRESETS = {
2537
2537
  shadows: [0, 65],
@@ -2549,9 +2549,9 @@ function toneRange(pixels, range, falloff = 20) {
2549
2549
  if (d[p + 3] <= 0) continue;
2550
2550
  const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
2551
2551
  const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
2552
- out[i] = _chunk65GNHOD4cjs.coverageToByte.call(void 0, 1 - outside / ramp);
2552
+ out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, 1 - outside / ramp);
2553
2553
  }
2554
- return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2554
+ return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2555
2555
  }
2556
2556
  function hueRange(pixels, center) {
2557
2557
  const n = checkPixels(pixels);
@@ -2574,9 +2574,9 @@ function hueRange(pixels, center) {
2574
2574
  hue *= 60;
2575
2575
  let dh = ((hue - center) % 360 + 360) % 360;
2576
2576
  dh = Math.min(dh, 360 - dh);
2577
- out[i] = _chunk65GNHOD4cjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2577
+ out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2578
2578
  }
2579
- return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2579
+ return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2580
2580
  }
2581
2581
 
2582
2582
  // src/image-editor/selection/refine.ts
@@ -2710,9 +2710,9 @@ function edgeWidth(guide, w, h, r) {
2710
2710
  g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
2711
2711
  }
2712
2712
  }
2713
- const gm = _chunk65GNHOD4cjs.greyMorphology.call(void 0, g, w, h, r, true);
2714
- const hi = _chunk65GNHOD4cjs.greyMorphology.call(void 0, y, w, h, r, true);
2715
- const lo = _chunk65GNHOD4cjs.greyMorphology.call(void 0, y, w, h, r, false);
2713
+ const gm = _chunkYAFS2QFZcjs.greyMorphology.call(void 0, g, w, h, r, true);
2714
+ const hi = _chunkYAFS2QFZcjs.greyMorphology.call(void 0, y, w, h, r, true);
2715
+ const lo = _chunkYAFS2QFZcjs.greyMorphology.call(void 0, y, w, h, r, false);
2716
2716
  const out = new Float32Array(n);
2717
2717
  for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
2718
2718
  return out;
@@ -2736,7 +2736,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2736
2736
  }
2737
2737
  }
2738
2738
  if (any) {
2739
- const dist = _chunk65GNHOD4cjs.distanceTransform.call(void 0, boundary, w, h);
2739
+ const dist = _chunkYAFS2QFZcjs.distanceTransform.call(void 0, boundary, w, h);
2740
2740
  const r = gfRadius(p);
2741
2741
  const q = guidedFilterColor(guide, m, w, h, r);
2742
2742
  const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
@@ -2762,7 +2762,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2762
2762
  for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
2763
2763
  }
2764
2764
  const amount = shiftAmount(p);
2765
- if (Math.abs(amount) >= 1e-4) a = _chunk65GNHOD4cjs.shiftCoverage.call(void 0, a, w, h, amount);
2765
+ if (Math.abs(amount) >= 1e-4) a = _chunkYAFS2QFZcjs.shiftCoverage.call(void 0, a, w, h, amount);
2766
2766
  return a;
2767
2767
  }
2768
2768
  function guidePlanes(pixels, win) {
@@ -2806,9 +2806,9 @@ function refineSelection(pixels, mask, params = {}) {
2806
2806
  const out = new Uint8Array(mask.width * mask.height);
2807
2807
  for (let y = 0; y < wh; y++) {
2808
2808
  const dst = (y0 + y) * mask.width + x0;
2809
- for (let x = 0; x < ww; x++) out[dst + x] = _chunk65GNHOD4cjs.coverageToByte.call(void 0, refined[y * ww + x]);
2809
+ for (let x = 0; x < ww; x++) out[dst + x] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, refined[y * ww + x]);
2810
2810
  }
2811
- return _chunk65GNHOD4cjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2811
+ return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2812
2812
  }
2813
2813
 
2814
2814
  // src/image-editor/effects.ts
@@ -2978,7 +2978,7 @@ var ImageEffectsEngine = (_class4 = class {
2978
2978
  // src/image-editor/free-transform.ts
2979
2979
  var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
2980
2980
  var fail = (message) => {
2981
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(message);
2981
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(message);
2982
2982
  };
2983
2983
  var T = (x, y) => [1, 0, x, 0, 1, y, 0, 0, 1];
2984
2984
  function previewStep(scale) {
@@ -3087,7 +3087,7 @@ var FreeTransformSession = (_class5 = class {
3087
3087
  } else {
3088
3088
  const id = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
3089
3089
  if (!id) fail("No layer given and none is active; pass layerId (see list_layers).");
3090
- const layer = _chunk65GNHOD4cjs.requireLayer.call(void 0, layers, id).layer;
3090
+ const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, layers, id).layer;
3091
3091
  this.layerId = layer.id;
3092
3092
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
3093
3093
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
@@ -3098,20 +3098,20 @@ var FreeTransformSession = (_class5 = class {
3098
3098
  if (!maskAlone && layer.type !== "pixel" && layer.type !== "smart" && layer.type !== "shape" && layer.type !== "type") fail(`Layer "${layer.name || id}" is a ${layer.type} layer; Free Transform works on pixel, shape, type and smart object layers, layer masks (channel mask) and selections.`);
3099
3099
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
3100
3100
  if (content !== "selection-copy") {
3101
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3102
- if (!maskAlone) _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3101
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3102
+ if (!maskAlone) _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3103
3103
  }
3104
3104
  const o = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
3105
3105
  const pixels = layer.type === "pixel" ? host.pixelsOf(layer) : null;
3106
3106
  if (layer.type === "smart" && !maskAlone) {
3107
3107
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a smart object, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3108
- if (!_chunk65GNHOD4cjs.isContentsDecoded.call(void 0, layer.contents)) fail(`The contents of "${layer.name || id}" are not decoded here, so it cannot be transformed; run prepareSmartObjects() first.`);
3108
+ if (!_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, layer.contents)) fail(`The contents of "${layer.name || id}" are not decoded here, so it cannot be transformed; run prepareSmartObjects() first.`);
3109
3109
  this.smart = layer;
3110
3110
  this.smartObject = true;
3111
- this.startGeometry = _chunk65GNHOD4cjs.placementGeometry.call(void 0, layer);
3111
+ this.startGeometry = _chunkYAFS2QFZcjs.placementGeometry.call(void 0, layer);
3112
3112
  if (init.interpolation === void 0 && layer.placement.interpolation) this.interp = layer.placement.interpolation;
3113
3113
  this.startInterp = this.interp;
3114
- this.box = _chunk65GNHOD4cjs.contentsBox.call(void 0, layer.contents);
3114
+ this.box = _chunkYAFS2QFZcjs.contentsBox.call(void 0, layer.contents);
3115
3115
  this.moves = mask && linked ? ["pixels", "mask"] : ["pixels"];
3116
3116
  this.geometryValue = this.startGeometry;
3117
3117
  this.shown = this.startLayers;
@@ -3119,8 +3119,8 @@ var FreeTransformSession = (_class5 = class {
3119
3119
  }
3120
3120
  if (layer.type === "type" && !maskAlone) {
3121
3121
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a type layer, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3122
- const frame = _chunk65GNHOD4cjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3123
- const m = _chunk65GNHOD4cjs.textMatrix.call(void 0, layer);
3122
+ const frame = _chunkYAFS2QFZcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3123
+ const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer);
3124
3124
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
3125
3125
  this.typeTarget = layer;
3126
3126
  this.typeLayer = true;
@@ -3139,7 +3139,7 @@ var FreeTransformSession = (_class5 = class {
3139
3139
  }
3140
3140
  if (layer.type === "shape" && !maskAlone) {
3141
3141
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a shape layer, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3142
- const g = _chunk65GNHOD4cjs.shapeGeometryBounds.call(void 0, layer);
3142
+ const g = _chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer);
3143
3143
  if (!g) fail(`Shape layer "${layer.name || id}" has no path to transform.`);
3144
3144
  const w = Math.max(g.width, 1);
3145
3145
  const h = Math.max(g.height, 1);
@@ -3187,7 +3187,7 @@ var FreeTransformSession = (_class5 = class {
3187
3187
  if (box) {
3188
3188
  const copy = {
3189
3189
  type: "pixel",
3190
- id: _chunk65GNHOD4cjs.newLayerId.call(void 0, ),
3190
+ id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
3191
3191
  name: `${layer.name || "Layer"} copy`,
3192
3192
  visible: true,
3193
3193
  opacity: 1,
@@ -3211,7 +3211,7 @@ var FreeTransformSession = (_class5 = class {
3211
3211
  if (!box) fail(content === "layer" ? "The layer has no pixels to transform." : "The selection holds no pixels of this layer; select some, or transform the outline (content selection-outline).");
3212
3212
  this.box = box;
3213
3213
  this.moves = moves;
3214
- this.startGeometry = _chunk65GNHOD4cjs.identityTransform.call(void 0, box);
3214
+ this.startGeometry = _chunkYAFS2QFZcjs.identityTransform.call(void 0, box);
3215
3215
  this.startInterp = this.interp;
3216
3216
  this.geometryValue = this.startGeometry;
3217
3217
  this.shown = this.startLayers;
@@ -3289,8 +3289,8 @@ var FreeTransformSession = (_class5 = class {
3289
3289
  warp: changes.warp === void 0 ? _nullishCoalesce(this.geometryValue.warp, () => ( null)) : changes.warp
3290
3290
  };
3291
3291
  if (next.corners.length !== 4 || !next.corners.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) fail("corners must be four finite points: top-left, top-right, bottom-right, bottom-left.");
3292
- if (!_chunk65GNHOD4cjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3293
- if (this.typeTarget && (_chunk65GNHOD4cjs.hasWarp.call(void 0, next) || !_chunk65GNHOD4cjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3292
+ if (!_chunkYAFS2QFZcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3293
+ if (this.typeTarget && (_chunkYAFS2QFZcjs.hasWarp.call(void 0, next) || !_chunkYAFS2QFZcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3294
3294
  fail("Type layers take scale, rotate, skew and flips only (the corners must stay a parallelogram, no warp); rasterize the layer (rasterize_layer) for distort, perspective or warp.");
3295
3295
  }
3296
3296
  this.geometryValue = next;
@@ -3302,10 +3302,10 @@ var FreeTransformSession = (_class5 = class {
3302
3302
  if (this.smart) return { layers: this.resampleSmart(final, preview), selection: this.startSelection };
3303
3303
  if (this.typeTarget) return { layers: this.resampleType(), selection: this.startSelection };
3304
3304
  const g = this.geometryValue;
3305
- const identity = _chunk65GNHOD4cjs.isIdentityTransform.call(void 0, g);
3306
- const warp = _chunk65GNHOD4cjs.hasWarp.call(void 0, g);
3307
- const h = warp ? null : _chunk65GNHOD4cjs.geometryHomography.call(void 0, g);
3308
- const f = warp ? _chunk65GNHOD4cjs.transformMap.call(void 0, g) : null;
3305
+ const identity = _chunkYAFS2QFZcjs.isIdentityTransform.call(void 0, g);
3306
+ const warp = _chunkYAFS2QFZcjs.hasWarp.call(void 0, g);
3307
+ const h = warp ? null : _chunkYAFS2QFZcjs.geometryHomography.call(void 0, g);
3308
+ const f = warp ? _chunkYAFS2QFZcjs.transformMap.call(void 0, g) : null;
3309
3309
  const step = final ? 1 : previewStep(preview.scale);
3310
3310
  const interpolation = final ? this.interp : this.interp === "nearest" ? "nearest" : "bilinear";
3311
3311
  let layers = this.startLayers;
@@ -3349,7 +3349,7 @@ var FreeTransformSession = (_class5 = class {
3349
3349
  if (part.what === "selection") {
3350
3350
  const { width, height } = this.host.canvas();
3351
3351
  const data = new Uint8Array(_chunkJ5BA3BQ6cjs.readRegion.call(void 0, result, { x: 0, y: 0, width, height }).buffer);
3352
- const next = _chunk65GNHOD4cjs.createSelectionMask.call(void 0, width, height, data);
3352
+ const next = _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height, data);
3353
3353
  selection = next.bounds ? next : null;
3354
3354
  } else if (part.what === "pixels") {
3355
3355
  layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, targetId, (l) => {
@@ -3371,14 +3371,14 @@ var FreeTransformSession = (_class5 = class {
3371
3371
  resampleShape(final, preview, warpMap, h) {
3372
3372
  const layer = this.shape;
3373
3373
  let components = layer.components;
3374
- if (!_chunk65GNHOD4cjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3374
+ if (!_chunkYAFS2QFZcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3375
3375
  const affine = !warpMap && h && Math.abs(h[6]) < 1e-12 && Math.abs(h[7]) < 1e-12 && Math.abs(h[8] - 1) < 1e-12 ? [h[0], h[3], h[1], h[4], h[2], h[5]] : void 0;
3376
3376
  const map = _nullishCoalesce(warpMap, () => ( ((p) => h ? _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p) : p)));
3377
- components = _chunk65GNHOD4cjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3377
+ components = _chunkYAFS2QFZcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3378
3378
  }
3379
3379
  const moved = { ...layer, components };
3380
3380
  delete moved.annotation;
3381
- const surface = _chunk65GNHOD4cjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3381
+ const surface = _chunkYAFS2QFZcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3382
3382
  return _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => ({ ...moved, surface }));
3383
3383
  }
3384
3384
  /**
@@ -3388,13 +3388,13 @@ var FreeTransformSession = (_class5 = class {
3388
3388
  resampleType() {
3389
3389
  const layer = this.typeTarget;
3390
3390
  const g = this.geometryValue;
3391
- if (_chunk65GNHOD4cjs.hasWarp.call(void 0, g)) fail("Type layers cannot be warped here; rasterize the layer first (rasterize_layer), or transform it with scale, rotate and skew.");
3392
- const m = _chunk65GNHOD4cjs.matrixFromCorners.call(void 0, g.box, g.corners);
3391
+ if (_chunkYAFS2QFZcjs.hasWarp.call(void 0, g)) fail("Type layers cannot be warped here; rasterize the layer first (rasterize_layer), or transform it with scale, rotate and skew.");
3392
+ const m = _chunkYAFS2QFZcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3393
3393
  if (!m) fail("Type layers take scale, rotate, skew and flips only (the corners must stay a parallelogram); rasterize the layer for distort or perspective.");
3394
3394
  const next = { ...layer, transform: m };
3395
3395
  delete next.annotation;
3396
- let layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunk65GNHOD4cjs.rerenderText.call(void 0, next, this.host.textEnv()));
3397
- const change = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, _chunkF7GGEAO2cjs.invertMatrix.call(void 0, _chunk65GNHOD4cjs.textMatrix.call(void 0, layer))), _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, m));
3396
+ let layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkYAFS2QFZcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3397
+ const change = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, _chunkZ2H7KECKcjs.invertMatrix.call(void 0, _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer))), _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, m));
3398
3398
  for (const part of this.parts) {
3399
3399
  if (part.what !== "mask") continue;
3400
3400
  const surface = _chunk24ATT2PEcjs.transformSurface.call(void 0, part.moving, change, { interpolation: this.interp === "nearest" ? "nearest" : "bilinear" });
@@ -3410,12 +3410,12 @@ var FreeTransformSession = (_class5 = class {
3410
3410
  const canvas = this.host.canvas();
3411
3411
  try {
3412
3412
  if (final) {
3413
- const res = _chunk65GNHOD4cjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3413
+ const res = _chunkYAFS2QFZcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3414
3414
  this.smartMasksMoved = res.masksMoved;
3415
3415
  return res.layers;
3416
3416
  }
3417
3417
  const step = previewStep(preview.scale);
3418
- const surface = _chunk65GNHOD4cjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3418
+ const surface = _chunkYAFS2QFZcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3419
3419
  return _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, (l) => ({ ...l, placement, surface }));
3420
3420
  } catch (e) {
3421
3421
  if (e instanceof _chunk24ATT2PEcjs.TransformTooLargeError) fail(e.message);
@@ -3425,10 +3425,10 @@ var FreeTransformSession = (_class5 = class {
3425
3425
  /** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
3426
3426
  isChanged() {
3427
3427
  const g = this.geometryValue;
3428
- if (!this.smart && !this.typeTarget) return !_chunk65GNHOD4cjs.isIdentityTransform.call(void 0, g);
3428
+ if (!this.smart && !this.typeTarget) return !_chunkYAFS2QFZcjs.isIdentityTransform.call(void 0, g);
3429
3429
  const a = this.startGeometry;
3430
3430
  const same = g.corners.every((c, i) => Math.abs(c.x - a.corners[i].x) < 1e-9 && Math.abs(c.y - a.corners[i].y) < 1e-9);
3431
- const warp = (w, box) => w && _chunk65GNHOD4cjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3431
+ const warp = (w, box) => w && _chunkYAFS2QFZcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3432
3432
  return !same || warp(g.warp, g.box) !== warp(a.warp, a.box) || this.interp !== this.startInterp;
3433
3433
  }
3434
3434
  render(preview) {
@@ -3688,7 +3688,7 @@ function convertSurfaceColors(surface, t) {
3688
3688
  }
3689
3689
 
3690
3690
  // src/image-editor/controller.ts
3691
- var IMAGE_EDITOR_SCHEMA_VERSION = _chunk65GNHOD4cjs.LAYERED_SCHEMA_VERSION;
3691
+ var IMAGE_EDITOR_SCHEMA_VERSION = _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION;
3692
3692
  var RETOUCH_TOOLS = ["clone", "heal", "spot-heal", "smudge", "dodge", "burn", "sponge", "blur", "sharpen", "history"];
3693
3693
  var isRetouchTool = (tool) => RETOUCH_TOOLS.includes(tool);
3694
3694
  var STROKE_TOOLS = ["brush", "eraser", "mixer", ...RETOUCH_TOOLS];
@@ -3882,7 +3882,7 @@ var PaintStrokeSession = (_class6 = class {
3882
3882
  for (const t of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, { x: r.x - this.apply.offset.x, y: r.y - this.apply.offset.y, width: r.width, height: r.height })) {
3883
3883
  const key = _chunkJ5BA3BQ6cjs.tileKey.call(void 0, t.tx, t.ty);
3884
3884
  const cur = regions.get(key);
3885
- regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunk65GNHOD4cjs.unionRect.call(void 0, cur.r, r) : r });
3885
+ regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkYAFS2QFZcjs.unionRect.call(void 0, cur.r, r) : r });
3886
3886
  }
3887
3887
  }
3888
3888
  for (const [key, { tx, ty, r }] of regions) {
@@ -3914,7 +3914,7 @@ var PaintStrokeSession = (_class6 = class {
3914
3914
  }
3915
3915
  /** Finishes the stroke (one undo step) and returns what changed. */
3916
3916
  end() {
3917
- if (this.closed) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("This stroke has already ended.");
3917
+ if (this.closed) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("This stroke has already ended.");
3918
3918
  const last = _nullishCoalesce(this.last, () => ( void 0));
3919
3919
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
3920
3920
  _optionalChain([this, 'access', _109 => _109.flushView, 'optionalCall', _110 => _110()]);
@@ -4050,20 +4050,20 @@ function sameTile(a, b) {
4050
4050
  for (let i = 0; i < a.data.length; i++) if (a.data[i] !== b.data[i]) return false;
4051
4051
  return true;
4052
4052
  }
4053
- var DEFAULT_ADJUSTMENTS = _chunk65GNHOD4cjs.DEFAULT_ADJUSTMENTS_VALUES;
4053
+ var DEFAULT_ADJUSTMENTS = _chunkYAFS2QFZcjs.DEFAULT_ADJUSTMENTS_VALUES;
4054
4054
  function normalizeStoredAdjustments(stored) {
4055
4055
  if (!stored) return { ...DEFAULT_ADJUSTMENTS };
4056
4056
  const out = {
4057
4057
  ...DEFAULT_ADJUSTMENTS,
4058
4058
  ...stored,
4059
- process: _chunk65GNHOD4cjs.normalizeProcessVersion.call(void 0, stored.process)
4059
+ process: _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, stored.process)
4060
4060
  };
4061
- const layers = _chunk65GNHOD4cjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4061
+ const layers = _chunkYAFS2QFZcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4062
4062
  if (layers.length) out.layers = layers;
4063
4063
  else delete out.layers;
4064
4064
  return out;
4065
4065
  }
4066
- var isLayered = (data) => Boolean(data && data.version === _chunk65GNHOD4cjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4066
+ var isLayered = (data) => Boolean(data && data.version === _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4067
4067
  function migrateSerializedImageEditorState(data) {
4068
4068
  if (isLayered(data)) {
4069
4069
  const out = {
@@ -4095,10 +4095,10 @@ function migrateSerializedImageEditorState(data) {
4095
4095
  function migrateToLayeredState(data, size) {
4096
4096
  const clean = migrateSerializedImageEditorState(data);
4097
4097
  if (isLayered(clean)) return clean;
4098
- const stack = _chunk65GNHOD4cjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4099
- const { layers, assets } = _chunk65GNHOD4cjs.serializeLayers.call(void 0, stack.layers);
4098
+ const stack = _chunkYAFS2QFZcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4099
+ const { layers, assets } = _chunkYAFS2QFZcjs.serializeLayers.call(void 0, stack.layers);
4100
4100
  const out = {
4101
- version: _chunk65GNHOD4cjs.LAYERED_SCHEMA_VERSION,
4101
+ version: _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION,
4102
4102
  width: Math.round(size.width),
4103
4103
  height: Math.round(size.height),
4104
4104
  layers,
@@ -4112,8 +4112,8 @@ function migrateToLayeredState(data, size) {
4112
4112
  if (clean.selection) out.selection = clean.selection;
4113
4113
  return out;
4114
4114
  }
4115
- var DEFAULT_TRANSFORM = _chunk65GNHOD4cjs.DEFAULT_TRANSFORM_VALUES;
4116
- var DEFAULT_DEPTH_MASK = _chunk65GNHOD4cjs.DEFAULT_DEPTH_MASK_VALUES;
4115
+ var DEFAULT_TRANSFORM = _chunkYAFS2QFZcjs.DEFAULT_TRANSFORM_VALUES;
4116
+ var DEFAULT_DEPTH_MASK = _chunkYAFS2QFZcjs.DEFAULT_DEPTH_MASK_VALUES;
4117
4117
  var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
4118
4118
  var ImageEditorController = (_class7 = class {
4119
4119
 
@@ -4136,7 +4136,7 @@ var ImageEditorController = (_class7 = class {
4136
4136
  __init62() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
4137
4137
  __init63() {this.viewKey = []}
4138
4138
  /** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
4139
- __init64() {this.compositor = new (0, _chunk65GNHOD4cjs.LayerCompositor)()}
4139
+ __init64() {this.compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)()}
4140
4140
  /** The effects provider slot (see `setEffectsProvider`). */
4141
4141
  __init65() {this.effects = new (0, _chunkJODTP4DPcjs.EffectsSlot)()}
4142
4142
  /** Renders provider effects: effect smart filter results and effect layers. */
@@ -4194,7 +4194,7 @@ var ImageEditorController = (_class7 = class {
4194
4194
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
4195
4195
  if (_optionalChain([options, 'access', _126 => _126.initialState, 'optionalAccess', _127 => _127.selection])) {
4196
4196
  try {
4197
- this.state.selection = normalizeSelection(_chunk65GNHOD4cjs.deserializeSelection.call(void 0, options.initialState.selection));
4197
+ this.state.selection = normalizeSelection(_chunkYAFS2QFZcjs.deserializeSelection.call(void 0, options.initialState.selection));
4198
4198
  } catch (e15) {
4199
4199
  }
4200
4200
  }
@@ -4306,10 +4306,10 @@ var ImageEditorController = (_class7 = class {
4306
4306
  if (l.type === "group") {
4307
4307
  const children = walk(l.children);
4308
4308
  if (children !== l.children) next2 = { ...l, children };
4309
- } else if (l.type === "smart" && _optionalChain([l, 'access', _130 => _130.smartFilters, 'optionalAccess', _131 => _131.filters, 'access', _132 => _132.some, 'call', _133 => _133((f) => f.kind === "effect")]) && (all || _chunk65GNHOD4cjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4309
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _130 => _130.smartFilters, 'optionalAccess', _131 => _131.filters, 'access', _132 => _132.some, 'call', _133 => _133((f) => f.kind === "effect")]) && (all || _chunkYAFS2QFZcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4310
4310
  try {
4311
- const r = _chunk65GNHOD4cjs.rerender.call(void 0, l, canvas);
4312
- if (all || !_chunk65GNHOD4cjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4311
+ const r = _chunkYAFS2QFZcjs.rerender.call(void 0, l, canvas);
4312
+ if (all || !_chunkYAFS2QFZcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4313
4313
  } catch (e17) {
4314
4314
  }
4315
4315
  }
@@ -4365,19 +4365,19 @@ var ImageEditorController = (_class7 = class {
4365
4365
  const d = await this.describeEffect(effect, "filter");
4366
4366
  const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
4367
4367
  const found = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, layerId);
4368
- if (!found) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4368
+ if (!found) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4369
4369
  let layers = this.state.layers;
4370
4370
  let id = layerId;
4371
4371
  let converted = false;
4372
4372
  if (found.layer.type !== "smart") {
4373
- if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${found.layer.name || layerId}" is ${found.layer.type === "adjustment" ? "an adjustment layer" : "an annotation"}, which has no pixels to filter; apply the effect to a pixel layer or smart object.`);
4374
- const res2 = _chunk65GNHOD4cjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4373
+ if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${found.layer.name || layerId}" is ${found.layer.type === "adjustment" ? "an adjustment layer" : "an annotation"}, which has no pixels to filter; apply the effect to a pixel layer or smart object.`);
4374
+ const res2 = _chunkYAFS2QFZcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4375
4375
  layers = res2.layers;
4376
4376
  id = res2.layer.id;
4377
4377
  converted = true;
4378
4378
  }
4379
- const filter = _chunk65GNHOD4cjs.normalizeSmartFilter.call(void 0, { kind: "effect", effect: d.id, provider: this.effects.require().id, name: d.name, values, enabled: options.enabled !== false, blend: options.blend, opacity: options.opacity });
4380
- const res = _chunk65GNHOD4cjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4379
+ const filter = _chunkYAFS2QFZcjs.normalizeSmartFilter.call(void 0, { kind: "effect", effect: d.id, provider: this.effects.require().id, name: d.name, values, enabled: options.enabled !== false, blend: options.blend, opacity: options.opacity });
4380
+ const res = _chunkYAFS2QFZcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4381
4381
  this.commitLayers(res.layers);
4382
4382
  return { layerId: id, filter: res.filter, converted };
4383
4383
  }
@@ -4388,9 +4388,9 @@ var ImageEditorController = (_class7 = class {
4388
4388
  * false, during a drag).
4389
4389
  */
4390
4390
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
4391
- const layer = _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4391
+ const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4392
4392
  const was = _optionalChain([layer, 'access', _134 => _134.smartFilters, 'optionalAccess', _135 => _135.filters, 'access', _136 => _136.find, 'call', _137 => _137((f) => f.id === filterId)]);
4393
- if (!was || was.kind !== "effect") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _138 => _138.smartFilters, 'optionalAccess', _139 => _139.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
4393
+ if (!was || was.kind !== "effect") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _138 => _138.smartFilters, 'optionalAccess', _139 => _139.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
4394
4394
  const update = {};
4395
4395
  if (changes.values) {
4396
4396
  const d = await this.describeEffect(was.effect);
@@ -4399,15 +4399,15 @@ var ImageEditorController = (_class7 = class {
4399
4399
  for (const [k, v] of Object.entries(changes.values)) {
4400
4400
  if (v !== null) given[k] = v;
4401
4401
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4402
- else throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4402
+ else throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4403
4403
  }
4404
4404
  update.values = { ...base, ..._chunkJODTP4DPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4405
4405
  }
4406
4406
  for (const k of ["enabled", "blend", "opacity"]) if (changes[k] !== void 0) update[k] = changes[k];
4407
- let res = _chunk65GNHOD4cjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4408
- if (changes.index !== void 0) res = { ...res, layers: _chunk65GNHOD4cjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4407
+ let res = _chunkYAFS2QFZcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4408
+ if (changes.index !== void 0) res = { ...res, layers: _chunkYAFS2QFZcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4409
4409
  this.commitLayers(res.layers, void 0, commitToHistory);
4410
- return _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4410
+ return _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4411
4411
  }
4412
4412
  /**
4413
4413
  * Adds an effect layer: a pixel layer drawn by a provider generator, overlay or title effect at
@@ -4419,12 +4419,12 @@ var ImageEditorController = (_class7 = class {
4419
4419
  const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
4420
4420
  const { width, height } = this.naturalSize;
4421
4421
  const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time: options.time });
4422
- const blend = _chunk65GNHOD4cjs.parseBlend.call(void 0, options.blend);
4423
- if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("opacity must be from 0 to 1.");
4422
+ const blend = _chunkYAFS2QFZcjs.parseBlend.call(void 0, options.blend);
4423
+ if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be from 0 to 1.");
4424
4424
  const ids = new Set(_chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4425
4425
  const layer = {
4426
4426
  type: "pixel",
4427
- id: options.id && !ids.has(options.id) ? options.id : _chunk65GNHOD4cjs.newLayerId.call(void 0, ),
4427
+ id: options.id && !ids.has(options.id) ? options.id : _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
4428
4428
  name: _optionalChain([options, 'access', _140 => _140.name, 'optionalAccess', _141 => _141.trim, 'call', _142 => _142()]) || d.name,
4429
4429
  visible: true,
4430
4430
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
@@ -4433,7 +4433,7 @@ var ImageEditorController = (_class7 = class {
4433
4433
  offset: { x: 0, y: 0 },
4434
4434
  generator: { effect: d.id, provider: this.effects.require().id, name: d.name, values, ...options.time ? { time: options.time } : {} }
4435
4435
  };
4436
- const next = _chunk65GNHOD4cjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4436
+ const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4437
4437
  this.commitLayers(next, () => {
4438
4438
  this.state.activeLayerId = layer.id;
4439
4439
  this.state.activeTarget = "pixels";
@@ -4448,8 +4448,8 @@ var ImageEditorController = (_class7 = class {
4448
4448
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
4449
4449
  const found = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, layerId);
4450
4450
  const layer = _optionalChain([found, 'optionalAccess', _143 => _143.layer]);
4451
- if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4452
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4451
+ if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4452
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4453
4453
  const g = layer.generator;
4454
4454
  const d = await this.describeEffect(g.effect);
4455
4455
  const base = { ...g.values };
@@ -4457,7 +4457,7 @@ var ImageEditorController = (_class7 = class {
4457
4457
  for (const [k, v] of Object.entries(_nullishCoalesce(changes.values, () => ( {})))) {
4458
4458
  if (v !== null) given[k] = v;
4459
4459
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4460
- else throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4460
+ else throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4461
4461
  }
4462
4462
  const values = { ...base, ..._chunkJODTP4DPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4463
4463
  const time = _nullishCoalesce(_nullishCoalesce(changes.time, () => ( g.time)), () => ( 0));
@@ -4472,7 +4472,7 @@ var ImageEditorController = (_class7 = class {
4472
4472
  /** Turns an effect layer into a plain pixel layer keeping its pixels (one undo step). */
4473
4473
  rasterizeEffectLayer(layerId) {
4474
4474
  const found = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, layerId);
4475
- if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4475
+ if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4476
4476
  this.commitLayers(
4477
4477
  _chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
4478
4478
  const { generator: _g, ...rest } = l;
@@ -4500,7 +4500,7 @@ var ImageEditorController = (_class7 = class {
4500
4500
  if (key.length === this.viewKey.length && key.every((v, i) => v === this.viewKey[i])) return;
4501
4501
  this.viewKey = key;
4502
4502
  const { width, height } = this.naturalSize;
4503
- const view = _chunk65GNHOD4cjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4503
+ const view = _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4504
4504
  s.adjustments = view.adjustments;
4505
4505
  s.depthMask = view.depthMask;
4506
4506
  s.annotations = view.annotations;
@@ -4654,7 +4654,7 @@ var ImageEditorController = (_class7 = class {
4654
4654
  applyCropPreset(ratio) {
4655
4655
  this.recordHistory();
4656
4656
  const { width, height } = this.state.imageDimensions;
4657
- if (ratio && _chunk65GNHOD4cjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4657
+ if (ratio && _chunkYAFS2QFZcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4658
4658
  ratio = 1 / ratio;
4659
4659
  }
4660
4660
  if (!ratio) {
@@ -4736,7 +4736,7 @@ var ImageEditorController = (_class7 = class {
4736
4736
  */
4737
4737
  getLayerPixels(id) {
4738
4738
  const layer = this.getLayer(id);
4739
- if (!layer || !_chunk65GNHOD4cjs.hasSurface.call(void 0, layer)) return null;
4739
+ if (!layer || !_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return null;
4740
4740
  const surface = this.surfaceOf(layer);
4741
4741
  const b = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, surface);
4742
4742
  if (!b) return null;
@@ -4749,7 +4749,7 @@ var ImageEditorController = (_class7 = class {
4749
4749
  */
4750
4750
  getLayerBounds(id) {
4751
4751
  const layer = this.getLayer(id);
4752
- if (!layer || !_chunk65GNHOD4cjs.hasSurface.call(void 0, layer)) return null;
4752
+ if (!layer || !_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return null;
4753
4753
  const surface = this.surfaceOf(layer);
4754
4754
  let b = this.boundsCache.get(surface);
4755
4755
  if (b === void 0) {
@@ -4764,9 +4764,9 @@ var ImageEditorController = (_class7 = class {
4764
4764
  */
4765
4765
  getLayerDataURL(id) {
4766
4766
  const layer = this.getLayer(id);
4767
- if (!layer || !_chunk65GNHOD4cjs.hasSurface.call(void 0, layer)) return null;
4767
+ if (!layer || !_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return null;
4768
4768
  const surface = this.surfaceOf(layer);
4769
- const enc = _chunk65GNHOD4cjs.encodeSurface.call(void 0, surface);
4769
+ const enc = _chunkYAFS2QFZcjs.encodeSurface.call(void 0, surface);
4770
4770
  return enc ? enc.url : null;
4771
4771
  }
4772
4772
  /**
@@ -4908,19 +4908,19 @@ var ImageEditorController = (_class7 = class {
4908
4908
  if (init.pixels) {
4909
4909
  const px2 = init.pixels;
4910
4910
  if (!(px2.width > 0 && px2.height > 0) || px2.data.length < px2.width * px2.height * 4) {
4911
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4911
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4912
4912
  }
4913
4913
  surface = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, px2, 4);
4914
4914
  } else if (init.color !== void 0) {
4915
4915
  const c = parseColor(init.color);
4916
4916
  surface = _chunkJ5BA3BQ6cjs.solidSurface.call(void 0, 4, { x: 0, y: 0, width, height }, _chunkJ5BA3BQ6cjs.packRgba.call(void 0, c[0], c[1], c[2], c[3]));
4917
4917
  }
4918
- const blend = _chunk65GNHOD4cjs.parseBlend.call(void 0, init.blend);
4919
- if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("opacity must be from 0 to 1.");
4918
+ const blend = _chunkYAFS2QFZcjs.parseBlend.call(void 0, init.blend);
4919
+ if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be from 0 to 1.");
4920
4920
  const ids = new Set(_chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4921
4921
  const layer = {
4922
4922
  type: "pixel",
4923
- id: init.id && !ids.has(init.id) ? init.id : _chunk65GNHOD4cjs.newLayerId.call(void 0, ),
4923
+ id: init.id && !ids.has(init.id) ? init.id : _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
4924
4924
  name: _optionalChain([init, 'access', _155 => _155.name, 'optionalAccess', _156 => _156.trim, 'call', _157 => _157()]) || this.nextLayerName(),
4925
4925
  visible: _nullishCoalesce(init.visible, () => ( true)),
4926
4926
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
@@ -4929,7 +4929,7 @@ var ImageEditorController = (_class7 = class {
4929
4929
  offset: { x: Math.round(_nullishCoalesce(init.x, () => ( 0))), y: Math.round(_nullishCoalesce(init.y, () => ( 0))) }
4930
4930
  };
4931
4931
  if (init.fillOpacity !== void 0 && init.fillOpacity !== 1) layer.fillOpacity = init.fillOpacity;
4932
- const next = _chunk65GNHOD4cjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4932
+ const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4933
4933
  this.commitLayers(next, () => {
4934
4934
  this.state.activeLayerId = layer.id;
4935
4935
  this.state.activeTarget = "pixels";
@@ -4969,12 +4969,12 @@ var ImageEditorController = (_class7 = class {
4969
4969
  try {
4970
4970
  img = await this.renderer.imageCache.get(src);
4971
4971
  } catch (e22) {
4972
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
4972
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
4973
4973
  }
4974
4974
  const w = img.naturalWidth || img.width;
4975
4975
  const h = img.naturalHeight || img.height;
4976
4976
  const ctx = this.renderer.createCanvas(w, h).getContext("2d");
4977
- if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4977
+ if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4978
4978
  ctx.drawImage(img, 0, 0, w, h);
4979
4979
  const data = ctx.getImageData(0, 0, w, h);
4980
4980
  return { width: w, height: h, data: data.data };
@@ -4987,7 +4987,7 @@ var ImageEditorController = (_class7 = class {
4987
4987
  }
4988
4988
  /** Duplicates a layer (with its children) directly above it, as one undo step. Returns the copy's id. */
4989
4989
  duplicateLayer(id, name) {
4990
- const res = _chunk65GNHOD4cjs.duplicateLayer.call(void 0, this.state.layers, id, name);
4990
+ const res = _chunkYAFS2QFZcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
4991
4991
  this.commitLayers(res.layers, () => {
4992
4992
  this.state.activeLayerId = res.id;
4993
4993
  });
@@ -4995,16 +4995,16 @@ var ImageEditorController = (_class7 = class {
4995
4995
  }
4996
4996
  /** Deletes a layer (refused when locked), as one undo step. */
4997
4997
  removeLayer(id) {
4998
- const next = _chunk65GNHOD4cjs.removeLayer.call(void 0, this.state.layers, id);
4998
+ const next = _chunkYAFS2QFZcjs.removeLayer.call(void 0, this.state.layers, id);
4999
4999
  this.commitLayers(next, () => {
5000
- if (this.state.selectedAnnotationId && !_chunk24ATT2PEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunk65GNHOD4cjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
5000
+ if (this.state.selectedAnnotationId && !_chunk24ATT2PEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkYAFS2QFZcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
5001
5001
  this.state.selectedAnnotationId = null;
5002
5002
  }
5003
5003
  });
5004
5004
  }
5005
5005
  /** Moves a layer above / below another, or into a group, as one undo step. Returns its new parent and index. */
5006
5006
  moveLayer(id, placement) {
5007
- const next = _chunk65GNHOD4cjs.moveLayer.call(void 0, this.state.layers, id, placement);
5007
+ const next = _chunkYAFS2QFZcjs.moveLayer.call(void 0, this.state.layers, id, placement);
5008
5008
  const loc = _chunk24ATT2PEcjs.findLayer.call(void 0, next, id);
5009
5009
  if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _160 => _160.parent, 'optionalAccess', _161 => _161.id]), () => ( null)), index: loc.index };
5010
5010
  this.commitLayers(next);
@@ -5015,23 +5015,23 @@ var ImageEditorController = (_class7 = class {
5015
5015
  * one undo step (`commitToHistory = false` for the moves of a slider drag). Returns the layer.
5016
5016
  */
5017
5017
  setLayerProperties(id, props, commitToHistory = true) {
5018
- const next = _chunk65GNHOD4cjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5018
+ const next = _chunkYAFS2QFZcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5019
5019
  this.commitLayers(next, void 0, commitToHistory);
5020
5020
  return _chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer;
5021
5021
  }
5022
5022
  /** Adds an empty pass-through group above the active layer (or at `placement`) and makes it active. Returns its id. */
5023
5023
  addGroup(init = {}) {
5024
- const blend = init.blend === void 0 ? "pass-through" : _chunk65GNHOD4cjs.parseBlend.call(void 0, init.blend, true);
5024
+ const blend = init.blend === void 0 ? "pass-through" : _chunkYAFS2QFZcjs.parseBlend.call(void 0, init.blend, true);
5025
5025
  const group = {
5026
5026
  type: "group",
5027
- id: _chunk65GNHOD4cjs.newLayerId.call(void 0, "group"),
5027
+ id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, "group"),
5028
5028
  name: _optionalChain([init, 'access', _164 => _164.name, 'optionalAccess', _165 => _165.trim, 'call', _166 => _166()]) || "Group",
5029
5029
  visible: true,
5030
5030
  opacity: 1,
5031
5031
  blend,
5032
5032
  children: []
5033
5033
  };
5034
- const next = _chunk65GNHOD4cjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5034
+ const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5035
5035
  this.commitLayers(next, () => {
5036
5036
  this.state.activeLayerId = group.id;
5037
5037
  this.state.activeTarget = "pixels";
@@ -5040,7 +5040,7 @@ var ImageEditorController = (_class7 = class {
5040
5040
  }
5041
5041
  /** Puts sibling layers into a new group (one undo step). Returns the group id. */
5042
5042
  groupLayers(ids, name) {
5043
- const res = _chunk65GNHOD4cjs.groupLayers.call(void 0, this.state.layers, ids, name);
5043
+ const res = _chunkYAFS2QFZcjs.groupLayers.call(void 0, this.state.layers, ids, name);
5044
5044
  this.commitLayers(res.layers, () => {
5045
5045
  this.state.activeLayerId = res.id;
5046
5046
  });
@@ -5048,7 +5048,7 @@ var ImageEditorController = (_class7 = class {
5048
5048
  }
5049
5049
  /** Replaces a group by its children (one undo step). Returns the child ids, bottom to top. */
5050
5050
  ungroupLayer(id) {
5051
- const res = _chunk65GNHOD4cjs.ungroupLayer.call(void 0, this.state.layers, id);
5051
+ const res = _chunkYAFS2QFZcjs.ungroupLayer.call(void 0, this.state.layers, id);
5052
5052
  this.commitLayers(res.layers);
5053
5053
  return res.ids;
5054
5054
  }
@@ -5057,38 +5057,38 @@ var ImageEditorController = (_class7 = class {
5057
5057
  * (`commitToHistory = false` for the moves of a drag). Returns the offset and document bounds.
5058
5058
  */
5059
5059
  offsetLayer(id, move, commitToHistory = true) {
5060
- const layer = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id).layer;
5060
+ const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5061
5061
  if (layer.type === "smart") {
5062
5062
  const tl = layer.placement.corners[0];
5063
5063
  const dx = move.x !== void 0 ? move.x - tl.x : _nullishCoalesce(move.dx, () => ( 0));
5064
5064
  const dy = move.y !== void 0 ? move.y - tl.y : _nullishCoalesce(move.dy, () => ( 0));
5065
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("x and y must be numbers.");
5066
- this.commitLayers(_chunk65GNHOD4cjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5065
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers.");
5066
+ this.commitLayers(_chunkYAFS2QFZcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5067
5067
  const moved = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, id).layer;
5068
5068
  return { offset: { x: Math.round(moved.placement.corners[0].x), y: Math.round(moved.placement.corners[0].y) }, bounds: this.getLayerBounds(id) };
5069
5069
  }
5070
5070
  if (layer.type === "shape") {
5071
- const g = _nullishCoalesce(_chunk65GNHOD4cjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5071
+ const g = _nullishCoalesce(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5072
5072
  const dx = move.x !== void 0 ? move.x - g.x : _nullishCoalesce(move.dx, () => ( 0));
5073
5073
  const dy = move.y !== void 0 ? move.y - g.y : _nullishCoalesce(move.dy, () => ( 0));
5074
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("x and y must be numbers.");
5075
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "position", "move it");
5076
- let moved = _chunk65GNHOD4cjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5074
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers.");
5075
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5076
+ let moved = _chunkYAFS2QFZcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5077
5077
  const mask = layer.mask;
5078
5078
  if (mask && mask.linked !== false && !mask.source && (Math.round(dx) || Math.round(dy))) moved = { ...moved, mask: { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, Math.round(dx), Math.round(dy)) } };
5079
5079
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
5080
- const b = _nullishCoalesce(_chunk65GNHOD4cjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5080
+ const b = _nullishCoalesce(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5081
5081
  return { offset: { x: Math.round(b.x), y: Math.round(b.y) }, bounds: this.getLayerBounds(id) };
5082
5082
  }
5083
5083
  if (layer.type === "type") {
5084
5084
  const m = _nullishCoalesce(layer.transform, () => ( [1, 0, 0, 1, 0, 0]));
5085
5085
  const dx = move.x !== void 0 ? move.x - m[4] : _nullishCoalesce(move.dx, () => ( 0));
5086
5086
  const dy = move.y !== void 0 ? move.y - m[5] : _nullishCoalesce(move.dy, () => ( 0));
5087
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("x and y must be numbers.");
5088
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "position", "move it");
5087
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers.");
5088
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5089
5089
  const mx = Math.round(dx);
5090
5090
  const my = Math.round(dy);
5091
- let moved = { ..._chunk65GNHOD4cjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, mx, my) };
5091
+ let moved = { ..._chunkYAFS2QFZcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, mx, my) };
5092
5092
  const mask = layer.mask;
5093
5093
  if (mask && mask.linked !== false && !mask.source && (mx || my)) moved = { ...moved, mask: { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, mx, my) } };
5094
5094
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
@@ -5098,7 +5098,7 @@ var ImageEditorController = (_class7 = class {
5098
5098
  const current = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
5099
5099
  const x = _nullishCoalesce(move.x, () => ( current.x + (_nullishCoalesce(move.dx, () => ( 0)))));
5100
5100
  const y = _nullishCoalesce(move.y, () => ( current.y + (_nullishCoalesce(move.dy, () => ( 0)))));
5101
- const next = _chunk65GNHOD4cjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5101
+ const next = _chunkYAFS2QFZcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5102
5102
  this.commitLayers(next, void 0, commitToHistory);
5103
5103
  return { offset: { x: Math.round(x), y: Math.round(y) }, bounds: this.getLayerBounds(id) };
5104
5104
  }
@@ -5108,11 +5108,11 @@ var ImageEditorController = (_class7 = class {
5108
5108
  * target when the layer is active.
5109
5109
  */
5110
5110
  addLayerMask(id, from = "reveal-all", props = {}) {
5111
- const layer = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id).layer;
5111
+ const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5112
5112
  let mask;
5113
5113
  if (from === "selection") {
5114
5114
  const sel = this.state.selection;
5115
- if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5115
+ if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5116
5116
  mask = this.maskFromSelection(sel, props);
5117
5117
  if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
5118
5118
  mask = { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
@@ -5121,7 +5121,7 @@ var ImageEditorController = (_class7 = class {
5121
5121
  const v = from === "reveal-all" ? 255 : 0;
5122
5122
  mask = withMaskProps({ surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5123
5123
  }
5124
- const next = _chunk65GNHOD4cjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5124
+ const next = _chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5125
5125
  this.commitLayers(next, () => {
5126
5126
  if (this.state.activeLayerId === id) this.state.activeTarget = "mask";
5127
5127
  });
@@ -5129,18 +5129,18 @@ var ImageEditorController = (_class7 = class {
5129
5129
  }
5130
5130
  /** Removes a layer's mask (one undo step). */
5131
5131
  removeLayerMask(id) {
5132
- const layer = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id).layer;
5133
- if (!layer.mask) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5134
- this.commitLayers(_chunk65GNHOD4cjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5132
+ const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5133
+ if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5134
+ this.commitLayers(_chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5135
5135
  if (this.state.activeLayerId === id) this.state.activeTarget = "pixels";
5136
5136
  });
5137
5137
  }
5138
5138
  /** Changes any layer mask's density, feather, enabled or linked flag (pixels kept). Returns the mask. */
5139
5139
  setLayerMaskProps(id, props, commitToHistory = true) {
5140
- const layer = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id).layer;
5141
- if (!layer.mask) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5140
+ const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5141
+ if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5142
5142
  const mask = withMaskProps(layer.mask, props);
5143
- this.commitLayers(_chunk65GNHOD4cjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5143
+ this.commitLayers(_chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5144
5144
  return mask;
5145
5145
  }
5146
5146
  /**
@@ -5148,11 +5148,11 @@ var ImageEditorController = (_class7 = class {
5148
5148
  * the depth map) and removes the mask, as one undo step.
5149
5149
  */
5150
5150
  async applyLayerMask(id) {
5151
- const loc = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id);
5151
+ const loc = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id);
5152
5152
  const layer = loc.layer;
5153
- if (layer.type !== "pixel") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Only a pixel layer's mask can be applied to its pixels; "${id}" is a ${layer.type} layer. Remove the mask or keep it.`);
5154
- if (!layer.mask) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5155
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5153
+ if (layer.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Only a pixel layer's mask can be applied to its pixels; "${id}" is a ${layer.type} layer. Remove the mask or keep it.`);
5154
+ if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5155
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5156
5156
  const { width, height } = this.naturalSize;
5157
5157
  await this.renderer.prepareLayerAssets([layer], width, height);
5158
5158
  const sources = this.renderer.compositorSources(width, height);
@@ -5185,13 +5185,13 @@ var ImageEditorController = (_class7 = class {
5185
5185
  */
5186
5186
  layerViaCopy(options = {}) {
5187
5187
  const id = _nullishCoalesce(options.layerId, () => ( this.state.activeLayerId));
5188
- if (!id) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5189
- const loc = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id);
5188
+ if (!id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5189
+ const loc = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id);
5190
5190
  const layer = loc.layer;
5191
- if (layer.type !== "pixel") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5191
+ if (layer.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5192
5192
  const sel = this.state.selection;
5193
- if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5194
- if (options.cut) _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5193
+ if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5194
+ if (options.cut) _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5195
5195
  const surface = this.surfaceOf(layer);
5196
5196
  const sb = sel.bounds;
5197
5197
  const src = { x: sb.x - layer.offset.x, y: sb.y - layer.offset.y, width: sb.width, height: sb.height };
@@ -5207,7 +5207,7 @@ var ImageEditorController = (_class7 = class {
5207
5207
  }
5208
5208
  const copy = {
5209
5209
  type: "pixel",
5210
- id: _chunk65GNHOD4cjs.newLayerId.call(void 0, ),
5210
+ id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
5211
5211
  name: _optionalChain([options, 'access', _169 => _169.name, 'optionalAccess', _170 => _170.trim, 'call', _171 => _171()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
5212
5212
  visible: true,
5213
5213
  opacity: 1,
@@ -5280,7 +5280,7 @@ var ImageEditorController = (_class7 = class {
5280
5280
  * Refused while another transform is open.
5281
5281
  */
5282
5282
  beginFreeTransform(init = {}) {
5283
- if (this.getFreeTransform()) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5283
+ if (this.getFreeTransform()) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5284
5284
  const session = new FreeTransformSession(this.transformHost(), init);
5285
5285
  this.openTransform = session;
5286
5286
  this.notify();
@@ -5294,26 +5294,26 @@ var ImageEditorController = (_class7 = class {
5294
5294
  */
5295
5295
  transformLayer(spec) {
5296
5296
  const given = [spec.matrix, spec.corners, spec.params].filter((v) => v !== void 0).length;
5297
- if (given > 1) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give only one of matrix, corners and params.");
5298
- if (!given && spec.warp === void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5297
+ if (given > 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5298
+ if (!given && spec.warp === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5299
5299
  if (spec.matrix && !(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) {
5300
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5300
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5301
5301
  }
5302
5302
  if (spec.matrix) {
5303
5303
  const [a, b, c, d] = spec.matrix;
5304
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5304
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5305
5305
  }
5306
5306
  const session = this.beginFreeTransform(spec);
5307
5307
  try {
5308
5308
  const g = session.startGeometry;
5309
- const corners = spec.matrix ? g.corners.map((p) => _chunkF7GGEAO2cjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunk65GNHOD4cjs.applyParams.call(void 0, g, spec.params) : g.corners;
5309
+ const corners = spec.matrix ? g.corners.map((p) => _chunkZ2H7KECKcjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkYAFS2QFZcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5310
5310
  let warp = spec.warp === void 0 ? _nullishCoalesce(g.warp, () => ( null)) : null;
5311
5311
  if (spec.warp) {
5312
5312
  if ("style" in spec.warp) {
5313
- if (!_chunkF7GGEAO2cjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkF7GGEAO2cjs.WARP_STYLES.join(", ")}.`);
5314
- warp = _chunk65GNHOD4cjs.presetWarp.call(void 0, session.box, spec.warp);
5313
+ if (!_chunkZ2H7KECKcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkZ2H7KECKcjs.WARP_STYLES.join(", ")}.`);
5314
+ warp = _chunkYAFS2QFZcjs.presetWarp.call(void 0, session.box, spec.warp);
5315
5315
  } else {
5316
- if (!_chunk65GNHOD4cjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points, row by row.");
5316
+ if (!_chunkYAFS2QFZcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points, row by row.");
5317
5317
  warp = spec.warp;
5318
5318
  }
5319
5319
  }
@@ -5326,10 +5326,10 @@ var ImageEditorController = (_class7 = class {
5326
5326
  }
5327
5327
  /** Flips the layer (or its selected pixels, or the outline) about the frame's centre, exactly (one undo step). */
5328
5328
  flipLayer(axis, init = {}) {
5329
- if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5329
+ if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5330
5330
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5331
5331
  try {
5332
- session.update({ corners: _chunk65GNHOD4cjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5332
+ session.update({ corners: _chunkYAFS2QFZcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5333
5333
  return session.commit();
5334
5334
  } catch (e) {
5335
5335
  session.cancel();
@@ -5341,16 +5341,16 @@ var ImageEditorController = (_class7 = class {
5341
5341
  * centre, snapped so pixels land on whole pixels: exact, no resampling (one undo step).
5342
5342
  */
5343
5343
  rotateLayer90(turn, init = {}) {
5344
- if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5344
+ if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5345
5345
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5346
5346
  try {
5347
- const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunk65GNHOD4cjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5347
+ const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkYAFS2QFZcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5348
5348
  const cx = b.x + b.width / 2;
5349
5349
  const cy = b.y + b.height / 2;
5350
5350
  const ox = turn === 180 ? 0 : Math.round(cx - b.height / 2) - (cx - b.height / 2);
5351
5351
  const oy = turn === 180 ? 0 : Math.round(cy - b.width / 2) - (cy - b.width / 2);
5352
5352
  const m = turn === 90 ? [0, 1, -1, 0, cx + cy + ox, cy - cx + oy] : turn === -90 ? [0, -1, 1, 0, cx - cy + ox, cy + cx + oy] : [-1, 0, 0, -1, 2 * cx, 2 * cy];
5353
- session.update({ corners: session.startGeometry.corners.map((p) => _chunkF7GGEAO2cjs.applyMatrix.call(void 0, m, p)) }, false);
5353
+ session.update({ corners: session.startGeometry.corners.map((p) => _chunkZ2H7KECKcjs.applyMatrix.call(void 0, m, p)) }, false);
5354
5354
  return session.commit();
5355
5355
  } catch (e) {
5356
5356
  session.cancel();
@@ -5359,20 +5359,20 @@ var ImageEditorController = (_class7 = class {
5359
5359
  }
5360
5360
  /** Adds a `develop` or `blur` filter to a pixel layer (one undo step). Returns the layer's filters. */
5361
5361
  addLayerFilter(id, filter) {
5362
- const f = _chunk65GNHOD4cjs.normalizeFilter.call(void 0, filter);
5363
- const next = _chunk65GNHOD4cjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5362
+ const f = _chunkYAFS2QFZcjs.normalizeFilter.call(void 0, filter);
5363
+ const next = _chunkYAFS2QFZcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5364
5364
  this.commitLayers(next);
5365
5365
  return _nullishCoalesce(_chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5366
5366
  }
5367
5367
  /** Changes one filter (one undo step, or none with `commitToHistory = false` during a drag). Returns the filters. */
5368
5368
  updateLayerFilter(id, filterId, changes, commitToHistory = true) {
5369
- const next = _chunk65GNHOD4cjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5369
+ const next = _chunkYAFS2QFZcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5370
5370
  this.commitLayers(next, void 0, commitToHistory);
5371
5371
  return _nullishCoalesce(_chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5372
5372
  }
5373
5373
  /** Removes one filter (one undo step). Returns the remaining filters. */
5374
5374
  removeLayerFilter(id, filterId) {
5375
- const next = _chunk65GNHOD4cjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5375
+ const next = _chunkYAFS2QFZcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5376
5376
  this.commitLayers(next);
5377
5377
  return _nullishCoalesce(_chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5378
5378
  }
@@ -5388,8 +5388,8 @@ var ImageEditorController = (_class7 = class {
5388
5388
  */
5389
5389
  convertToSmartObject(ids, options = {}) {
5390
5390
  const list = _optionalChain([ids, 'optionalAccess', _177 => _177.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
5391
- if (!list.length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5392
- const res = _chunk65GNHOD4cjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5391
+ if (!list.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5392
+ const res = _chunkYAFS2QFZcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5393
5393
  this.commitLayers(res.layers, () => {
5394
5394
  this.state.activeLayerId = res.layer.id;
5395
5395
  this.state.activeTarget = "pixels";
@@ -5398,7 +5398,7 @@ var ImageEditorController = (_class7 = class {
5398
5398
  }
5399
5399
  /** Layer › Smart Objects › Rasterize (one undo step): the smart object becomes a pixel layer holding what it renders. */
5400
5400
  rasterizeSmartObject(id) {
5401
- const res = _chunk65GNHOD4cjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5401
+ const res = _chunkYAFS2QFZcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5402
5402
  this.commitLayers(res.layers, () => {
5403
5403
  if (this.state.activeLayerId === id && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
5404
5404
  });
@@ -5406,10 +5406,10 @@ var ImageEditorController = (_class7 = class {
5406
5406
  }
5407
5407
  /** A smart object's contents, placement and smart filters as plain data (see `SmartObjectInfo`). */
5408
5408
  getSmartObject(id) {
5409
- const layer = _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, id);
5409
+ const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5410
5410
  const c = layer.contents;
5411
- const g = _chunk65GNHOD4cjs.placementGeometry.call(void 0, layer);
5412
- const readout = _chunk65GNHOD4cjs.describeTransform.call(void 0, g);
5411
+ const g = _chunkYAFS2QFZcjs.placementGeometry.call(void 0, layer);
5412
+ const readout = _chunkYAFS2QFZcjs.describeTransform.call(void 0, g);
5413
5413
  const stack = layer.smartFilters;
5414
5414
  return {
5415
5415
  layerId: layer.id,
@@ -5419,10 +5419,10 @@ var ImageEditorController = (_class7 = class {
5419
5419
  kind: c.kind,
5420
5420
  width: c.width,
5421
5421
  height: c.height,
5422
- decoded: _chunk65GNHOD4cjs.isContentsDecoded.call(void 0, c),
5422
+ decoded: _chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, c),
5423
5423
  fileType: _nullishCoalesce(_optionalChain([c, 'access', _178 => _178.file, 'optionalAccess', _179 => _179.type]), () => ( null)),
5424
5424
  linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _180 => _180.linked, 'optionalAccess', _181 => _181.path]), () => ( null)),
5425
- instances: _chunk65GNHOD4cjs.instancesOf.call(void 0, this.state.layers, c.id),
5425
+ instances: _chunkYAFS2QFZcjs.instancesOf.call(void 0, this.state.layers, c.id),
5426
5426
  layerCount: c.document ? _chunk24ATT2PEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
5427
5427
  },
5428
5428
  placement: {
@@ -5434,8 +5434,8 @@ var ImageEditorController = (_class7 = class {
5434
5434
  scaleY: readout.scaleY,
5435
5435
  rotate: readout.rotate,
5436
5436
  skewX: readout.skewX,
5437
- center: _chunk65GNHOD4cjs.anchorPoint.call(void 0, g, "center"),
5438
- bounds: _chunk65GNHOD4cjs.transformedBox.call(void 0, g)
5437
+ center: _chunkYAFS2QFZcjs.anchorPoint.call(void 0, g, "center"),
5438
+ bounds: _chunkYAFS2QFZcjs.transformedBox.call(void 0, g)
5439
5439
  },
5440
5440
  smartFilters: {
5441
5441
  enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _182 => _182.enabled]), () => ( true)),
@@ -5452,7 +5452,7 @@ var ImageEditorController = (_class7 = class {
5452
5452
  * change. Returns the new placement summary.
5453
5453
  */
5454
5454
  setSmartObjectPlacement(id, placement, commitToHistory = true) {
5455
- const res = _chunk65GNHOD4cjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5455
+ const res = _chunkYAFS2QFZcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5456
5456
  this.commitLayers(res.layers, void 0, commitToHistory);
5457
5457
  return { ...this.getSmartObject(id).placement, masksMoved: res.masksMoved };
5458
5458
  }
@@ -5465,23 +5465,23 @@ var ImageEditorController = (_class7 = class {
5465
5465
  * nothing is relative to the current transform.
5466
5466
  */
5467
5467
  setSmartObjectTransform(id, spec) {
5468
- const layer = _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, id);
5469
- const g = _chunk65GNHOD4cjs.placementGeometry.call(void 0, layer);
5468
+ const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5469
+ const g = _chunkYAFS2QFZcjs.placementGeometry.call(void 0, layer);
5470
5470
  const numeric = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y"].filter((k) => spec[k] !== void 0);
5471
5471
  const ways = [spec.corners !== void 0, spec.matrix !== void 0, numeric.length > 0].filter(Boolean).length;
5472
- if (ways > 1) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5472
+ if (ways > 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5473
5473
  let corners = g.corners;
5474
5474
  if (spec.corners) corners = spec.corners;
5475
5475
  else if (spec.matrix) {
5476
- if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5476
+ if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5477
5477
  const [a, b, c, d] = spec.matrix;
5478
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5479
- corners = _chunk65GNHOD4cjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5478
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5479
+ corners = _chunkYAFS2QFZcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5480
5480
  } else if (numeric.length) {
5481
- if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5482
- for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`${k} must be a finite number.`);
5483
- const now = _chunk65GNHOD4cjs.describeTransform.call(void 0, g);
5484
- const centre = _chunk65GNHOD4cjs.anchorPoint.call(void 0, g, "center");
5481
+ if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5482
+ for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${k} must be a finite number.`);
5483
+ const now = _chunkYAFS2QFZcjs.describeTransform.call(void 0, g);
5484
+ const centre = _chunkYAFS2QFZcjs.anchorPoint.call(void 0, g, "center");
5485
5485
  const params = {
5486
5486
  scaleX: _nullishCoalesce(spec.scaleX, () => ( (now.affine ? now.scaleX : 100))),
5487
5487
  scaleY: _nullishCoalesce(spec.scaleY, () => ( (now.affine ? now.scaleY : 100))),
@@ -5489,20 +5489,20 @@ var ImageEditorController = (_class7 = class {
5489
5489
  skewX: _nullishCoalesce(spec.skewX, () => ( (now.affine ? now.skewX : 0))),
5490
5490
  skewY: _nullishCoalesce(spec.skewY, () => ( 0))
5491
5491
  };
5492
- const m = _chunk65GNHOD4cjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5492
+ const m = _chunkYAFS2QFZcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5493
5493
  const cx = g.box.width / 2;
5494
5494
  const cy = g.box.height / 2;
5495
5495
  const to = { x: _nullishCoalesce(spec.x, () => ( centre.x)), y: _nullishCoalesce(spec.y, () => ( centre.y)) };
5496
- corners = _chunk65GNHOD4cjs.cornersFromMatrix.call(void 0, g.box, _chunkF7GGEAO2cjs.multiplyMatrices.call(void 0, m, _chunkF7GGEAO2cjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5496
+ corners = _chunkYAFS2QFZcjs.cornersFromMatrix.call(void 0, g.box, _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, m, _chunkZ2H7KECKcjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5497
5497
  }
5498
5498
  let warp = _nullishCoalesce(layer.placement.warp, () => ( null));
5499
5499
  if (spec.warp === null) warp = null;
5500
5500
  else if (spec.warp) {
5501
5501
  if ("style" in spec.warp) {
5502
- if (!_chunkF7GGEAO2cjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkF7GGEAO2cjs.WARP_STYLES.join(", ")}.`);
5503
- warp = _chunk65GNHOD4cjs.presetWarp.call(void 0, g.box, spec.warp);
5502
+ if (!_chunkZ2H7KECKcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkZ2H7KECKcjs.WARP_STYLES.join(", ")}.`);
5503
+ warp = _chunkYAFS2QFZcjs.presetWarp.call(void 0, g.box, spec.warp);
5504
5504
  } else {
5505
- if (!_chunk65GNHOD4cjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels, row by row.");
5505
+ if (!_chunkYAFS2QFZcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels, row by row.");
5506
5506
  warp = spec.warp;
5507
5507
  }
5508
5508
  }
@@ -5516,16 +5516,16 @@ var ImageEditorController = (_class7 = class {
5516
5516
  * the layers that changed.
5517
5517
  */
5518
5518
  replaceSmartObjectContents(id, source) {
5519
- const layer = _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, id);
5519
+ const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5520
5520
  let contents;
5521
5521
  if ("contents" in source) contents = source.contents;
5522
- else if ("pixels" in source) contents = _chunk65GNHOD4cjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5522
+ else if ("pixels" in source) contents = _chunkYAFS2QFZcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5523
5523
  else {
5524
- const psd = _chunk65GNHOD4cjs.importPsd.call(void 0, source.psd, { newId: () => _chunk65GNHOD4cjs.newLayerId.call(void 0, ) });
5525
- contents = _chunk65GNHOD4cjs.documentContents.call(void 0, { layers: psd.layers, globalLight: psd.globalLight, patterns: psd.patterns.length ? psd.patterns : void 0 }, psd.width, psd.height, _nullishCoalesce(source.name, () => ( `${layer.name || "Contents"}.psb`)));
5524
+ const psd = _chunkYAFS2QFZcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkYAFS2QFZcjs.newLayerId.call(void 0, ) });
5525
+ contents = _chunkYAFS2QFZcjs.documentContents.call(void 0, { layers: psd.layers, globalLight: psd.globalLight, patterns: psd.patterns.length ? psd.patterns : void 0 }, psd.width, psd.height, _nullishCoalesce(source.name, () => ( `${layer.name || "Contents"}.psb`)));
5526
5526
  contents.file = { bytes: source.psd.slice(), type: psd.info.psb ? "psb" : "psd" };
5527
5527
  }
5528
- const res = _chunk65GNHOD4cjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5528
+ const res = _chunkYAFS2QFZcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5529
5529
  this.commitLayers(res.layers);
5530
5530
  return { contentsId: layer.contents.id, width: contents.width, height: contents.height, layerIds: res.ids };
5531
5531
  }
@@ -5540,16 +5540,16 @@ var ImageEditorController = (_class7 = class {
5540
5540
  * and bytes.
5541
5541
  */
5542
5542
  exportSmartObjectContents(id) {
5543
- const layer = _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, id);
5543
+ const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5544
5544
  const c = layer.contents;
5545
5545
  const base = c.name.replace(/\.\w+$/, "") || "Contents";
5546
5546
  if (c.file) {
5547
- const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunk65GNHOD4cjs.BROWSER_IMAGE_TYPES };
5547
+ const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkYAFS2QFZcjs.BROWSER_IMAGE_TYPES };
5548
5548
  const ext = c.file.type.toLowerCase();
5549
5549
  return { name: /\.\w+$/.test(c.name) ? c.name : `${base}.${ext}`, mimeType: _nullishCoalesce(mime[ext], () => ( "application/octet-stream")), bytes: c.file.bytes };
5550
5550
  }
5551
- if (!_chunk65GNHOD4cjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5552
- const f = _chunk65GNHOD4cjs.smartContentsFile.call(void 0, c);
5551
+ if (!_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5552
+ const f = _chunkYAFS2QFZcjs.smartContentsFile.call(void 0, c);
5553
5553
  return { name: f.name, mimeType: f.name.endsWith(".png") ? "image/png" : "image/vnd.adobe.photoshop", bytes: f.bytes };
5554
5554
  }
5555
5555
  /**
@@ -5558,7 +5558,7 @@ var ImageEditorController = (_class7 = class {
5558
5558
  * undo step. Returns the copy's id.
5559
5559
  */
5560
5560
  copySmartObject(id, linked = false, name) {
5561
- const res = _chunk65GNHOD4cjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5561
+ const res = _chunkYAFS2QFZcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5562
5562
  this.commitLayers(res.layers, () => {
5563
5563
  this.state.activeLayerId = res.layer.id;
5564
5564
  this.state.activeTarget = "pixels";
@@ -5567,31 +5567,31 @@ var ImageEditorController = (_class7 = class {
5567
5567
  }
5568
5568
  /** Adds a smart filter (`develop` or `blur`, with `blend` and `opacity`) at `index` (default the top), as one undo step. */
5569
5569
  addSmartFilter(id, filter, index) {
5570
- const res = _chunk65GNHOD4cjs.addSmartFilter.call(void 0, this.state.layers, id, _chunk65GNHOD4cjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5570
+ const res = _chunkYAFS2QFZcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkYAFS2QFZcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5571
5571
  this.commitLayers(res.layers);
5572
5572
  return res.filter;
5573
5573
  }
5574
5574
  /** Changes one smart filter (one undo step, or none with `commitToHistory = false` during a drag). */
5575
5575
  updateSmartFilter(id, filterId, changes, commitToHistory = true) {
5576
- const res = _chunk65GNHOD4cjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5576
+ const res = _chunkYAFS2QFZcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5577
5577
  this.commitLayers(res.layers, void 0, commitToHistory);
5578
5578
  return res.filter;
5579
5579
  }
5580
5580
  /** Removes one smart filter (one undo step). Returns the remaining filters. */
5581
5581
  removeSmartFilter(id, filterId) {
5582
- const res = _chunk65GNHOD4cjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5582
+ const res = _chunkYAFS2QFZcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5583
5583
  this.commitLayers(res.layers);
5584
5584
  return _nullishCoalesce(_optionalChain([res, 'access', _185 => _185.layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.filters]), () => ( []));
5585
5585
  }
5586
5586
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
5587
5587
  moveSmartFilter(id, filterId, index) {
5588
- const res = _chunk65GNHOD4cjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5588
+ const res = _chunkYAFS2QFZcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5589
5589
  this.commitLayers(res.layers);
5590
5590
  return _nullishCoalesce(_optionalChain([res, 'access', _188 => _188.layer, 'access', _189 => _189.smartFilters, 'optionalAccess', _190 => _190.filters]), () => ( []));
5591
5591
  }
5592
5592
  /** Turns a smart object's whole filter stack on or off (one undo step). */
5593
5593
  setSmartFiltersEnabled(id, enabled) {
5594
- const res = _chunk65GNHOD4cjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5594
+ const res = _chunkYAFS2QFZcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5595
5595
  this.commitLayers(res.layers);
5596
5596
  return _nullishCoalesce(_optionalChain([res, 'access', _191 => _191.layer, 'access', _192 => _192.smartFilters, 'optionalAccess', _193 => _193.enabled]), () => ( true));
5597
5597
  }
@@ -5601,21 +5601,21 @@ var ImageEditorController = (_class7 = class {
5601
5601
  * Painting it targets channel `filter-mask`. Returns the mask, or `null` when removed.
5602
5602
  */
5603
5603
  setSmartFilterMask(id, from, props = {}, commitToHistory = true) {
5604
- const layer = _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, id);
5604
+ const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5605
5605
  let mask;
5606
5606
  if (from === "none") mask = null;
5607
5607
  else if (from === "keep") {
5608
- if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5608
+ if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5609
5609
  mask = withMaskProps(layer.smartFilters.mask, props);
5610
5610
  } else if (from === "selection") {
5611
5611
  const sel = this.state.selection;
5612
- if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5612
+ if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5613
5613
  mask = this.maskFromSelection(sel, props);
5614
5614
  } else {
5615
5615
  const v = from === "reveal-all" ? 255 : 0;
5616
5616
  mask = withMaskProps({ surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5617
5617
  }
5618
- const res = _chunk65GNHOD4cjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5618
+ const res = _chunkYAFS2QFZcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5619
5619
  this.commitLayers(res.layers, () => {
5620
5620
  if (this.state.activeLayerId !== id) return;
5621
5621
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
@@ -5631,14 +5631,14 @@ var ImageEditorController = (_class7 = class {
5631
5631
  async prepareSmartObjects() {
5632
5632
  const pending = /* @__PURE__ */ new Map();
5633
5633
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers)) {
5634
- if (l.type === "smart" && !_chunk65GNHOD4cjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunk65GNHOD4cjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5634
+ if (l.type === "smart" && !_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkYAFS2QFZcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5635
5635
  }
5636
5636
  const left = [];
5637
5637
  for (const [cid, c] of pending) {
5638
5638
  try {
5639
- const url = `data:${_chunk65GNHOD4cjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkDCLJNVZScjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5639
+ const url = `data:${_chunkYAFS2QFZcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkDCLJNVZScjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5640
5640
  const px2 = await this.decodeImage(url);
5641
- const decoded = { ...c, kind: "raster", raster: _chunk65GNHOD4cjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5641
+ const decoded = { ...c, kind: "raster", raster: _chunkYAFS2QFZcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5642
5642
  const swap = (layers) => {
5643
5643
  let out = layers;
5644
5644
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, layers)) if (l.type === "smart" && l.contents.id === cid) out = _chunk24ATT2PEcjs.mapLayer.call(void 0, out, l.id, (x) => ({ ...x, contents: decoded }));
@@ -5666,10 +5666,10 @@ var ImageEditorController = (_class7 = class {
5666
5666
  * Contents can nest. Returns the contents' size and layer ids.
5667
5667
  */
5668
5668
  editSmartObjectContents(id) {
5669
- if (this.getFreeTransform()) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5670
- const layer = _chunk65GNHOD4cjs.requireSmartObject.call(void 0, this.state.layers, id);
5669
+ if (this.getFreeTransform()) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5670
+ const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5671
5671
  const c = layer.contents;
5672
- if (!_chunk65GNHOD4cjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _200 => _200.file, 'optionalAccess', _201 => _201.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
5672
+ if (!_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _200 => _200.file, 'optionalAccess', _201 => _201.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
5673
5673
  const saved = {
5674
5674
  state: { ...this.state },
5675
5675
  undo: this.undoStack,
@@ -5680,7 +5680,7 @@ var ImageEditorController = (_class7 = class {
5680
5680
  samplePixelsOverride: this.samplePixelsOverride,
5681
5681
  psdResolution: this.psdResolution
5682
5682
  };
5683
- const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunk65GNHOD4cjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5683
+ const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5684
5684
  this.contentsStack.push({ layerId: layer.id, contentsId: c.id, name: layer.name || c.name, saved });
5685
5685
  const s = this.state;
5686
5686
  this.state = {
@@ -5688,7 +5688,7 @@ var ImageEditorController = (_class7 = class {
5688
5688
  sourceUrl: null,
5689
5689
  imageDimensions: { width: c.width, height: c.height },
5690
5690
  crop: null,
5691
- transform: { ..._chunk65GNHOD4cjs.DEFAULT_TRANSFORM_VALUES },
5691
+ transform: { ..._chunkYAFS2QFZcjs.DEFAULT_TRANSFORM_VALUES },
5692
5692
  layers,
5693
5693
  activeLayerId: layers.length ? layers[layers.length - 1].id : null,
5694
5694
  activeTarget: "pixels",
@@ -5721,7 +5721,7 @@ var ImageEditorController = (_class7 = class {
5721
5721
  */
5722
5722
  closeSmartObjectContents(save = true) {
5723
5723
  const top = this.contentsStack.pop();
5724
- if (!top) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5724
+ if (!top) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5725
5725
  if (_optionalChain([this, 'access', _207 => _207.openTransform, 'optionalAccess', _208 => _208.isOpen])) this.openTransform.cancel();
5726
5726
  this.openTransform = null;
5727
5727
  const edited = this.state;
@@ -5735,10 +5735,10 @@ var ImageEditorController = (_class7 = class {
5735
5735
  const plain3 = _optionalChain([only, 'optionalAccess', _211 => _211.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _212 => _212.filters, 'optionalAccess', _213 => _213.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
5736
5736
  if (_optionalChain([old, 'optionalAccess', _214 => _214.kind]) === "raster" && plain3) {
5737
5737
  const px2 = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
5738
- next = _chunk65GNHOD4cjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5738
+ next = _chunkYAFS2QFZcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5739
5739
  } else {
5740
5740
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
5741
- next = _chunk65GNHOD4cjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _215 => _215.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _216 => _216.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
5741
+ next = _chunkYAFS2QFZcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _215 => _215.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _216 => _216.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
5742
5742
  }
5743
5743
  }
5744
5744
  const saved = top.saved;
@@ -5757,7 +5757,7 @@ var ImageEditorController = (_class7 = class {
5757
5757
  this.notify();
5758
5758
  return { layerId: top.layerId, changed: false, layerIds: [] };
5759
5759
  }
5760
- const res = _chunk65GNHOD4cjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5760
+ const res = _chunkYAFS2QFZcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5761
5761
  this.commitLayers(res.layers);
5762
5762
  return { layerId: top.layerId, changed: true, layerIds: res.ids };
5763
5763
  }
@@ -5772,35 +5772,35 @@ var ImageEditorController = (_class7 = class {
5772
5772
  // --- Layer effects ---
5773
5773
  /** A layer's effects (an empty, enabled list when it has none). */
5774
5774
  getLayerEffects(id) {
5775
- return _chunk65GNHOD4cjs.layerEffectsOf.call(void 0, _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id).layer);
5775
+ return _chunkYAFS2QFZcjs.layerEffectsOf.call(void 0, _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer);
5776
5776
  }
5777
5777
  /**
5778
5778
  * Adds an effect of `kind` with Photoshop's defaults and `params` applied (one undo step), at
5779
5779
  * `index` in the layer's effect list (default the end). Returns the new effect and the effects.
5780
5780
  */
5781
5781
  addLayerEffect(id, kind, params = {}, index) {
5782
- const res = _chunk65GNHOD4cjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5782
+ const res = _chunkYAFS2QFZcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5783
5783
  this.commitLayers(res.layers);
5784
5784
  return { effect: res.effect, effects: this.getLayerEffects(id) };
5785
5785
  }
5786
5786
  /** Changes one effect (one undo step, or none with `commitToHistory = false` during a drag). Returns the effects. */
5787
5787
  updateLayerEffect(id, effectId, changes, commitToHistory = true) {
5788
- this.commitLayers(_chunk65GNHOD4cjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5788
+ this.commitLayers(_chunkYAFS2QFZcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5789
5789
  return this.getLayerEffects(id);
5790
5790
  }
5791
5791
  /** Removes one effect (one undo step). Returns the remaining effects. */
5792
5792
  removeLayerEffect(id, effectId) {
5793
- this.commitLayers(_chunk65GNHOD4cjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5793
+ this.commitLayers(_chunkYAFS2QFZcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5794
5794
  return this.getLayerEffects(id);
5795
5795
  }
5796
5796
  /** Turns a layer's effects on or off as a whole and, when given, sets Scale Effects (one undo step). */
5797
5797
  setLayerEffectsEnabled(id, enabled, scale, commitToHistory = true) {
5798
- this.commitLayers(_chunk65GNHOD4cjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5798
+ this.commitLayers(_chunkYAFS2QFZcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5799
5799
  return this.getLayerEffects(id);
5800
5800
  }
5801
5801
  /** Replaces a layer's effects (one undo step; `null` removes them). Returns the effects. */
5802
5802
  setLayerEffects(id, effects, commitToHistory = true) {
5803
- this.commitLayers(_chunk65GNHOD4cjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5803
+ this.commitLayers(_chunkYAFS2QFZcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5804
5804
  return this.getLayerEffects(id);
5805
5805
  }
5806
5806
  __init76() {this.patternIds = /* @__PURE__ */ new WeakMap()}
@@ -5826,8 +5826,8 @@ var ImageEditorController = (_class7 = class {
5826
5826
  /** Sets the global light (one undo step). `angle` -360..360°, `altitude` 0..90°. Returns it. */
5827
5827
  setGlobalLight(light, commitToHistory = true) {
5828
5828
  const next = { ...this.getGlobalLight(), ...light };
5829
- if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5830
- if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5829
+ if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5830
+ if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5831
5831
  if (commitToHistory) this.recordHistory();
5832
5832
  if (next.angle === _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
5833
5833
  else this.state.globalLight = next;
@@ -5838,16 +5838,16 @@ var ImageEditorController = (_class7 = class {
5838
5838
  async compositeToSurface(layers, rect) {
5839
5839
  const { width, height } = this.naturalSize;
5840
5840
  if (_chunk24ATT2PEcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
5841
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5841
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5842
5842
  }
5843
5843
  await this.renderer.prepareLayerAssets(layers, width, height);
5844
5844
  const sources = this.renderer.compositorSources(width, height);
5845
5845
  const depth = this.bitDepth;
5846
5846
  if (depth !== 8) {
5847
- const samples = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunk65GNHOD4cjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5847
+ const samples = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkYAFS2QFZcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5848
5848
  return _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels.call(void 0, { width: rect.width, height: rect.height, data: samples }, 4, rect.x, rect.y);
5849
5849
  }
5850
- const data = new (0, _chunk65GNHOD4cjs.LayerCompositor)().composite(layers, rect, sources);
5850
+ const data = new (0, _chunkYAFS2QFZcjs.LayerCompositor)().composite(layers, rect, sources);
5851
5851
  return _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width: rect.width, height: rect.height, data }, 4, rect.x, rect.y);
5852
5852
  }
5853
5853
  /**
@@ -5860,22 +5860,22 @@ var ImageEditorController = (_class7 = class {
5860
5860
  const r = _nullishCoalesce(rect, () => ( { x: 0, y: 0, width, height }));
5861
5861
  const depth = this.bitDepth;
5862
5862
  if (depth === 8) return { width: r.width, height: r.height, depth: 16, data: _chunkJ5BA3BQ6cjs.to16From8.call(void 0, this.compositePixels(r).data) };
5863
- const data = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunk65GNHOD4cjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5863
+ const data = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkYAFS2QFZcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5864
5864
  return { width: r.width, height: r.height, depth, data };
5865
5865
  }
5866
5866
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
5867
5867
  paintBounds(layer) {
5868
5868
  const { width, height } = this.naturalSize;
5869
5869
  const canvas = { x: 0, y: 0, width, height };
5870
- if (_chunk65GNHOD4cjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5870
+ if (_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5871
5871
  if (layer.type === "annotation") {
5872
- const b = _chunk65GNHOD4cjs.getAnnotationBounds.call(void 0, layer.annotation);
5872
+ const b = _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, layer.annotation);
5873
5873
  const pad = 4 + ("strokeWidth" in layer.annotation ? layer.annotation.strokeWidth : 0);
5874
5874
  return coveringRect({ x: b.x - pad, y: b.y - pad, width: b.width + 2 * pad, height: b.height + 2 * pad });
5875
5875
  }
5876
5876
  if (layer.type === "group") {
5877
5877
  let r = null;
5878
- for (const c of layer.children) r = _chunk65GNHOD4cjs.unionRect.call(void 0, r, this.paintBounds(c));
5878
+ for (const c of layer.children) r = _chunkYAFS2QFZcjs.unionRect.call(void 0, r, this.paintBounds(c));
5879
5879
  return _nullishCoalesce(r, () => ( canvas));
5880
5880
  }
5881
5881
  return canvas;
@@ -5886,16 +5886,16 @@ var ImageEditorController = (_class7 = class {
5886
5886
  * Returns the merged id.
5887
5887
  */
5888
5888
  async mergeDown(id) {
5889
- const loc = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id);
5889
+ const loc = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id);
5890
5890
  const upper = loc.layer;
5891
5891
  const siblings = loc.parent ? loc.parent.children : this.state.layers;
5892
5892
  const lower = siblings[loc.index - 1];
5893
- if (!lower) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5894
- if (lower.type !== "pixel") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Merge Down needs a pixel layer below; "${lower.name || lower.id}" is a ${lower.type} layer. Move the layer or merge into another one.`);
5895
- if (!upper.visible) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5896
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5897
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5898
- let rect = _nullishCoalesce(_chunk65GNHOD4cjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5893
+ if (!lower) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5894
+ if (lower.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Merge Down needs a pixel layer below; "${lower.name || lower.id}" is a ${lower.type} layer. Move the layer or merge into another one.`);
5895
+ if (!upper.visible) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5896
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5897
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5898
+ let rect = _nullishCoalesce(_chunkYAFS2QFZcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5899
5899
  const reach = Math.max(_chunk24ATT2PEcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunk24ATT2PEcjs.effectsMargin.call(void 0, upper.effects));
5900
5900
  if (reach) rect = { x: rect.x - reach, y: rect.y - reach, width: rect.width + 2 * reach, height: rect.height + 2 * reach };
5901
5901
  const base = { ...lower, blend: "normal", opacity: 1 };
@@ -5921,12 +5921,12 @@ var ImageEditorController = (_class7 = class {
5921
5921
  */
5922
5922
  async mergeVisible() {
5923
5923
  const visible = this.state.layers.filter((l) => l.visible);
5924
- if (!visible.length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("No layer is visible.");
5924
+ if (!visible.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No layer is visible.");
5925
5925
  const { width, height } = this.naturalSize;
5926
5926
  const surface = await this.compositeToSurface(visible, { x: 0, y: 0, width, height });
5927
5927
  const merged = {
5928
5928
  type: "pixel",
5929
- id: _chunk65GNHOD4cjs.newLayerId.call(void 0, ),
5929
+ id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
5930
5930
  name: "Merged",
5931
5931
  visible: true,
5932
5932
  opacity: 1,
@@ -5950,8 +5950,8 @@ var ImageEditorController = (_class7 = class {
5950
5950
  const surface = await this.compositeToSurface(this.state.layers, { x: 0, y: 0, width, height });
5951
5951
  const bg = {
5952
5952
  type: "pixel",
5953
- id: _chunk65GNHOD4cjs.BACKGROUND_LAYER_ID,
5954
- name: _chunk65GNHOD4cjs.BACKGROUND_LAYER_NAME,
5953
+ id: _chunkYAFS2QFZcjs.BACKGROUND_LAYER_ID,
5954
+ name: _chunkYAFS2QFZcjs.BACKGROUND_LAYER_NAME,
5955
5955
  visible: true,
5956
5956
  opacity: 1,
5957
5957
  blend: "normal",
@@ -5978,7 +5978,7 @@ var ImageEditorController = (_class7 = class {
5978
5978
  const k = Math.min(1, side / Math.max(width, height));
5979
5979
  const tw = Math.max(1, Math.round(width * k));
5980
5980
  const th = Math.max(1, Math.round(height * k));
5981
- const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunk65GNHOD4cjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5981
+ const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkYAFS2QFZcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5982
5982
  if (!surface) return null;
5983
5983
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
5984
5984
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -6073,7 +6073,7 @@ var ImageEditorController = (_class7 = class {
6073
6073
  * pixels. The next stroke fixes the offset from its first point. View state, no undo.
6074
6074
  */
6075
6075
  setCloneSource(point) {
6076
- if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6076
+ if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6077
6077
  const source = point ? { x: Math.round(point.x), y: Math.round(point.y), offset: null } : null;
6078
6078
  this.state.paint = { ...this.state.paint, cloneSource: source };
6079
6079
  this.notify();
@@ -6091,27 +6091,27 @@ var ImageEditorController = (_class7 = class {
6091
6091
  /** Resolves and validates what a stroke, fill or clear paints into. */
6092
6092
  paintTarget(layerId, channel, action) {
6093
6093
  const id = _nullishCoalesce(layerId, () => ( this.state.activeLayerId));
6094
- if (!id) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6095
- const layer = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id).layer;
6094
+ if (!id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6095
+ const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6096
6096
  const ch = _nullishCoalesce(channel, () => ( (id === this.state.activeLayerId ? this.state.activeTarget : "pixels")));
6097
6097
  if (ch === "mask") {
6098
- if (!layer.mask) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6099
- if (layer.mask.source) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6100
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "all", action);
6098
+ if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6099
+ if (layer.mask.source) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6100
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", action);
6101
6101
  } else if (ch === "filter-mask") {
6102
6102
  if (layer.type !== "smart" || !_optionalChain([layer, 'access', _224 => _224.smartFilters, 'optionalAccess', _225 => _225.mask])) {
6103
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6103
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6104
6104
  }
6105
- if (!_chunk65GNHOD4cjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6106
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "all", action);
6105
+ if (!_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6106
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", action);
6107
6107
  } else {
6108
- if (layer.type === "smart") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" is a smart object; its pixels come from its contents. Rasterize it (rasterize_smart_object), edit its contents (edit_smart_object_contents), or ${action} on its mask or filter mask.`);
6109
- if (layer.type === "shape") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" is a shape layer; its pixels are drawn from its paths. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6110
- if (layer.type === "type") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" is a type layer; its pixels are drawn from its text. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6111
- if (layer.type !== "pixel") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6112
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "pixels", action);
6108
+ if (layer.type === "smart") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is a smart object; its pixels come from its contents. Rasterize it (rasterize_smart_object), edit its contents (edit_smart_object_contents), or ${action} on its mask or filter mask.`);
6109
+ if (layer.type === "shape") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is a shape layer; its pixels are drawn from its paths. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6110
+ if (layer.type === "type") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is a type layer; its pixels are drawn from its text. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6111
+ if (layer.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6112
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6113
6113
  }
6114
- if (!layer.visible) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6114
+ if (!layer.visible) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6115
6115
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
6116
6116
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
6117
6117
  const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _226 => _226.locks, 'optionalAccess', _227 => _227.transparency]));
@@ -6120,7 +6120,7 @@ var ImageEditorController = (_class7 = class {
6120
6120
  /** The layer with its pixels (or mask) replaced by `surface`. */
6121
6121
  withSurface(layer, channel, surface) {
6122
6122
  if (channel === "mask") return { ...layer, mask: { ...layer.mask, surface } };
6123
- if (channel === "filter-mask") return _chunk65GNHOD4cjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6123
+ if (channel === "filter-mask") return _chunkYAFS2QFZcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6124
6124
  const next = { ...layer, surface };
6125
6125
  delete next.source;
6126
6126
  return next;
@@ -6133,10 +6133,10 @@ var ImageEditorController = (_class7 = class {
6133
6133
  */
6134
6134
  beginStroke(init = {}) {
6135
6135
  const tool = _nullishCoalesce(init.tool, () => ( "brush"));
6136
- if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6136
+ if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6137
6137
  const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : isRetouchTool(tool) ? "retouch" : "paint");
6138
6138
  if (tool === "mixer" && target.channel !== "pixels") {
6139
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6139
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6140
6140
  }
6141
6141
  const brush = _chunk6GFRKLLScjs.normalizeBrush.call(void 0, { ...this.state.paint.brush, ..._nullishCoalesce(init.brush, () => ( {})) });
6142
6142
  let strokePaint = null;
@@ -6170,7 +6170,7 @@ var ImageEditorController = (_class7 = class {
6170
6170
  retouchStroke(tool, init, brush, target, apply) {
6171
6171
  const settings = _chunkNVTHUPJ6cjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
6172
6172
  const mask = target.channel !== "pixels";
6173
- if (tool === "sponge" && mask) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6173
+ if (tool === "sponge" && mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6174
6174
  if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunkNVTHUPJ6cjs.RetouchDabStroke)(brush, pixels, _chunkNVTHUPJ6cjs.smudgeEffect.call(void 0, brush, settings.strength)) };
6175
6175
  if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunkNVTHUPJ6cjs.RetouchDabStroke)(brush, pixels, _chunkNVTHUPJ6cjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
6176
6176
  const retouchApply = {
@@ -6209,11 +6209,11 @@ var ImageEditorController = (_class7 = class {
6209
6209
  if (tool === "history") {
6210
6210
  const steps = settings.historySteps;
6211
6211
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
6212
- if (!entry) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
6212
+ if (!entry) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
6213
6213
  const then = _optionalChain([_chunk24ATT2PEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _232 => _232.layer]);
6214
- if (!then) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6214
+ if (!then) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6215
6215
  const surface = target.channel === "mask" ? _optionalChain([then, 'access', _233 => _233.mask, 'optionalAccess', _234 => _234.surface]) : then.type === "pixel" ? then.surface : void 0;
6216
- if (!surface) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6216
+ if (!surface) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6217
6217
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
6218
6218
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
6219
6219
  const source2 = depth ? new (0, _chunkNVTHUPJ6cjs.TilePixelSource)((tx, ty) => workTileOf(surface.tiles.get(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, tx, ty))), 4, offset2) : this.surfaceSource(surface, offset2);
@@ -6258,7 +6258,7 @@ var ImageEditorController = (_class7 = class {
6258
6258
  }
6259
6259
  if (init.source) this.setCloneSource(init.source);
6260
6260
  const cs = this.state.paint.cloneSource;
6261
- if (!cs) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`The ${tool === "clone" ? "Clone Stamp" : "Healing Brush"} needs a source point; Alt-click the canvas, call set_clone_source, or pass source { x, y }.`);
6261
+ if (!cs) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`The ${tool === "clone" ? "Clone Stamp" : "Healing Brush"} needs a source point; Alt-click the canvas, call set_clone_source, or pass source { x, y }.`);
6262
6262
  let offset = { x: 0, y: 0 };
6263
6263
  let first = { x: 0, y: 0 };
6264
6264
  const paint = () => ({ kind: "source", source, dx: offset.x, dy: offset.y });
@@ -6293,7 +6293,7 @@ var ImageEditorController = (_class7 = class {
6293
6293
  const sources = this.compositorSources();
6294
6294
  if (depth) {
6295
6295
  return new (0, _chunkNVTHUPJ6cjs.TilePixelSource)((tx, ty) => {
6296
- const w = _chunk65GNHOD4cjs.compositeDeep.call(void 0, layers, { x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, sources, depth);
6296
+ const w = _chunkYAFS2QFZcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, sources, depth);
6297
6297
  for (let i = 0; i < w.length; i += 4) {
6298
6298
  if (depth === 32) for (let c = 0; c < 3; c++) w[i + c] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, w[i + c]);
6299
6299
  for (let c = 0; c < 4; c++) w[i + c] *= 255;
@@ -6301,7 +6301,7 @@ var ImageEditorController = (_class7 = class {
6301
6301
  return w;
6302
6302
  }, 4);
6303
6303
  }
6304
- const compositor = new (0, _chunk65GNHOD4cjs.LayerCompositor)();
6304
+ const compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)();
6305
6305
  return new (0, _chunkNVTHUPJ6cjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
6306
6306
  }
6307
6307
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
@@ -6351,9 +6351,9 @@ var ImageEditorController = (_class7 = class {
6351
6351
  * document bounds and the number of dabs.
6352
6352
  */
6353
6353
  paintStroke(init) {
6354
- if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("points must hold at least one { x, y } point.");
6354
+ if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6355
6355
  for (const p of init.points) {
6356
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _239 => _239.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _240 => _240.y]))) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6356
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _239 => _239.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _240 => _240.y]))) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6357
6357
  }
6358
6358
  const session = this.beginStroke(init);
6359
6359
  session.push(init.points);
@@ -6379,8 +6379,8 @@ var ImageEditorController = (_class7 = class {
6379
6379
  const target = this.paintTarget(options.layerId, options.channel, mode === "paint" ? "fill" : "clear");
6380
6380
  const { width, height } = this.naturalSize;
6381
6381
  const opacity = _nullishCoalesce(options.opacity, () => ( 1));
6382
- if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("opacity must be from 0 to 1.");
6383
- const blend = _nullishCoalesce(_chunk65GNHOD4cjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6382
+ if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be from 0 to 1.");
6383
+ const blend = _nullishCoalesce(_chunkYAFS2QFZcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6384
6384
  const sel = options.useSelection !== false && _optionalChain([this, 'access', _241 => _241.state, 'access', _242 => _242.selection, 'optionalAccess', _243 => _243.bounds]) ? this.state.selection : null;
6385
6385
  const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _244 => _244.bounds]), () => ( { x: 0, y: 0, width, height }));
6386
6386
  const coverage = new (0, _chunk6GFRKLLScjs.CoverageMap)();
@@ -6416,7 +6416,7 @@ var ImageEditorController = (_class7 = class {
6416
6416
  // --- Adjustments ---
6417
6417
  /** The pixel layer the base sliders edit: the active pixel layer, else the Background. */
6418
6418
  developLayer() {
6419
- return _chunk65GNHOD4cjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6419
+ return _chunkYAFS2QFZcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6420
6420
  }
6421
6421
  /**
6422
6422
  * Sets base adjustment values as one undo step (unless `commitToHistory` is false). The base
@@ -6442,7 +6442,7 @@ var ImageEditorController = (_class7 = class {
6442
6442
  this.state.outputOpacity = Math.min(1, Math.max(0, partial.opacity));
6443
6443
  }
6444
6444
  if ("layers" in partial) {
6445
- layers = this.replaceAdjustmentNodes(layers, _chunk65GNHOD4cjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6445
+ layers = this.replaceAdjustmentNodes(layers, _chunkYAFS2QFZcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6446
6446
  }
6447
6447
  this.state.layers = layers;
6448
6448
  this.notify();
@@ -6450,7 +6450,7 @@ var ImageEditorController = (_class7 = class {
6450
6450
  /** True when the adjustments use an older rendering process than {@link LATEST_PROCESS_VERSION}. */
6451
6451
  get isProcessOutdated() {
6452
6452
  this.syncViews();
6453
- return _chunk65GNHOD4cjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunk65GNHOD4cjs.LATEST_PROCESS_VERSION;
6453
+ return _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION;
6454
6454
  }
6455
6455
  /**
6456
6456
  * Update to Current Process: re-interprets the current adjustment values with the latest
@@ -6458,7 +6458,7 @@ var ImageEditorController = (_class7 = class {
6458
6458
  */
6459
6459
  upgradeProcess() {
6460
6460
  if (!this.isProcessOutdated) return false;
6461
- this.setAdjustments({ process: _chunk65GNHOD4cjs.LATEST_PROCESS_VERSION });
6461
+ this.setAdjustments({ process: _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION });
6462
6462
  return true;
6463
6463
  }
6464
6464
  /** Resets the base sliders (latest process). Adjustment layers are kept; see `clearAdjustmentLayers`. */
@@ -6469,7 +6469,7 @@ var ImageEditorController = (_class7 = class {
6469
6469
  this.state.layers = _chunk24ATT2PEcjs.mapLayer.call(void 0,
6470
6470
  this.state.layers,
6471
6471
  target.id,
6472
- (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunk65GNHOD4cjs.LATEST_PROCESS_VERSION }), 0)
6472
+ (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION }), 0)
6473
6473
  );
6474
6474
  }
6475
6475
  delete this.state.legacyOutputBlur;
@@ -6533,7 +6533,7 @@ var ImageEditorController = (_class7 = class {
6533
6533
  const existing = new Set(this.adjustmentNodes(out).map((n) => n.id));
6534
6534
  for (const l of next) {
6535
6535
  if (existing.has(l.id)) continue;
6536
- out = this.placeLayer(out, _chunk65GNHOD4cjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6536
+ out = this.placeLayer(out, _chunkYAFS2QFZcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6537
6537
  }
6538
6538
  const order = next.map((l) => l.id);
6539
6539
  for (let to = 0; to < order.length; to++) out = this.moveAdjustmentNode(out, order[to], to);
@@ -6548,7 +6548,7 @@ var ImageEditorController = (_class7 = class {
6548
6548
  addAdjustmentLayer(init, index) {
6549
6549
  const spec = typeof init === "string" ? { kind: init } : init;
6550
6550
  const ids = new Set(_chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
6551
- const layer = _chunk65GNHOD4cjs.createAdjustmentLayer.call(void 0, spec.kind, {
6551
+ const layer = _chunkYAFS2QFZcjs.createAdjustmentLayer.call(void 0, spec.kind, {
6552
6552
  id: spec.id && !ids.has(spec.id) ? spec.id : void 0,
6553
6553
  name: spec.name,
6554
6554
  params: spec.params,
@@ -6557,10 +6557,10 @@ var ImageEditorController = (_class7 = class {
6557
6557
  blend: spec.blend,
6558
6558
  mask: _nullishCoalesce(spec.mask, () => ( void 0))
6559
6559
  });
6560
- while (ids.has(layer.id)) layer.id = _chunk65GNHOD4cjs.newLayerId.call(void 0, "adj");
6560
+ while (ids.has(layer.id)) layer.id = _chunkYAFS2QFZcjs.newLayerId.call(void 0, "adj");
6561
6561
  const { width, height } = this.naturalSize;
6562
6562
  this.recordHistory();
6563
- const node = _chunk65GNHOD4cjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6563
+ const node = _chunkYAFS2QFZcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6564
6564
  const positioned = Boolean(spec.aboveId || spec.parentId);
6565
6565
  this.state.layers = this.placeLayer(this.state.layers, node, {
6566
6566
  aboveId: spec.aboveId,
@@ -6580,7 +6580,7 @@ var ImageEditorController = (_class7 = class {
6580
6580
  if (!loc || loc.layer.type !== "adjustment") return false;
6581
6581
  const { width, height } = this.naturalSize;
6582
6582
  const node = loc.layer;
6583
- const merged = _chunk65GNHOD4cjs.normalizeAdjustmentLayer.call(void 0, {
6583
+ const merged = _chunkYAFS2QFZcjs.normalizeAdjustmentLayer.call(void 0, {
6584
6584
  id: node.id,
6585
6585
  kind: node.kind,
6586
6586
  enabled: _nullishCoalesce(update.enabled, () => ( node.visible)),
@@ -6600,7 +6600,7 @@ var ImageEditorController = (_class7 = class {
6600
6600
  params: merged.params
6601
6601
  };
6602
6602
  if (update.mask !== void 0) {
6603
- const mask = update.mask ? _chunk65GNHOD4cjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6603
+ const mask = update.mask ? _chunkYAFS2QFZcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6604
6604
  if (mask) next.mask = mask;
6605
6605
  else delete next.mask;
6606
6606
  }
@@ -6687,8 +6687,8 @@ var ImageEditorController = (_class7 = class {
6687
6687
  const { width, height } = this.naturalSize;
6688
6688
  let next = null;
6689
6689
  if (mask) {
6690
- const sized = mask.width === width && mask.height === height ? mask : _chunk65GNHOD4cjs.resizeSelection.call(void 0, mask, width, height);
6691
- next = _chunk65GNHOD4cjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6690
+ const sized = mask.width === width && mask.height === height ? mask : _chunkYAFS2QFZcjs.resizeSelection.call(void 0, mask, width, height);
6691
+ next = _chunkYAFS2QFZcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6692
6692
  } else if (mode !== "replace") {
6693
6693
  return false;
6694
6694
  }
@@ -6702,7 +6702,7 @@ var ImageEditorController = (_class7 = class {
6702
6702
  /** Select › All. */
6703
6703
  selectAll() {
6704
6704
  const { width, height } = this.naturalSize;
6705
- return this.setSelection(_chunk65GNHOD4cjs.fullSelection.call(void 0, width, height));
6705
+ return this.setSelection(_chunkYAFS2QFZcjs.fullSelection.call(void 0, width, height));
6706
6706
  }
6707
6707
  /** Select › Deselect. */
6708
6708
  deselect() {
@@ -6711,11 +6711,11 @@ var ImageEditorController = (_class7 = class {
6711
6711
  /** Select › Inverse (with nothing selected, selects everything). */
6712
6712
  invertSelection() {
6713
6713
  const { width, height } = this.naturalSize;
6714
- const current = _nullishCoalesce(this.state.selection, () => ( _chunk65GNHOD4cjs.createSelectionMask.call(void 0, width, height)));
6715
- return this.setSelection(_chunk65GNHOD4cjs.invertSelection.call(void 0, current));
6714
+ const current = _nullishCoalesce(this.state.selection, () => ( _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height)));
6715
+ return this.setSelection(_chunkYAFS2QFZcjs.invertSelection.call(void 0, current));
6716
6716
  }
6717
6717
  shapeCommand(mask, options) {
6718
- const shaped = options.feather && options.feather > 0 ? _chunk65GNHOD4cjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6718
+ const shaped = options.feather && options.feather > 0 ? _chunkYAFS2QFZcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6719
6719
  return this.setSelection(shaped, _nullishCoalesce(options.mode, () => ( "replace")));
6720
6720
  }
6721
6721
  /** Rectangular marquee in natural image pixels. */
@@ -6769,11 +6769,11 @@ var ImageEditorController = (_class7 = class {
6769
6769
  if (!this.samplePixelsOverride && !options.pixels) this.samplePixels = null;
6770
6770
  return null;
6771
6771
  }
6772
- const legacy = _chunk65GNHOD4cjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6772
+ const legacy = _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6773
6773
  if (options.sample === "active-layer") {
6774
6774
  const layer = this.getActiveLayer();
6775
6775
  if (!layer || layer.type !== "pixel") {
6776
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6776
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6777
6777
  }
6778
6778
  const surface = layer.source === "document" && options.pixels ? _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, options.pixels, 4) : this.surfaceOf(layer);
6779
6779
  return { width, height, data: _chunkJ5BA3BQ6cjs.readRegion.call(void 0, surface, { x: -layer.offset.x, y: -layer.offset.y, width, height }) };
@@ -6782,7 +6782,7 @@ var ImageEditorController = (_class7 = class {
6782
6782
  this.syncViews();
6783
6783
  if (legacy && !options.pixels) {
6784
6784
  const copy = { width: base.width, height: base.height, data: new Uint8ClampedArray(base.data) };
6785
- _chunk65GNHOD4cjs.applyAdjustments.call(void 0, copy, _chunk65GNHOD4cjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6785
+ _chunkYAFS2QFZcjs.applyAdjustments.call(void 0, copy, _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6786
6786
  return copy;
6787
6787
  }
6788
6788
  const pixels = options.pixels;
@@ -6794,7 +6794,7 @@ var ImageEditorController = (_class7 = class {
6794
6794
  };
6795
6795
  const stack = withoutAnnotations(this.state.layers);
6796
6796
  const layers = options.sampleMerged ? stack : pixelsOnly(stack);
6797
- const data = new (0, _chunk65GNHOD4cjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6797
+ const data = new (0, _chunkYAFS2QFZcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6798
6798
  return { width, height, data };
6799
6799
  }
6800
6800
  async requirePixels(options) {
@@ -6821,7 +6821,7 @@ var ImageEditorController = (_class7 = class {
6821
6821
  modifySelection(op, radius) {
6822
6822
  const sel = this.state.selection;
6823
6823
  if (!_optionalChain([sel, 'optionalAccess', _258 => _258.bounds])) return false;
6824
- return this.setSelection(_chunk65GNHOD4cjs.modifySelection.call(void 0, sel, op, radius));
6824
+ return this.setSelection(_chunkYAFS2QFZcjs.modifySelection.call(void 0, sel, op, radius));
6825
6825
  }
6826
6826
  /**
6827
6827
  * Refine Edge: snaps the selection (e.g. a coarse AI mask loaded with `loadSelectionFromImage`)
@@ -6852,7 +6852,7 @@ var ImageEditorController = (_class7 = class {
6852
6852
  } else {
6853
6853
  pixels = source;
6854
6854
  }
6855
- this.setSelection(_chunk65GNHOD4cjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6855
+ this.setSelection(_chunkYAFS2QFZcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6856
6856
  return this.getSelection();
6857
6857
  }
6858
6858
  /** Quick Mask view (tints the unselected area). View state: no undo step. */
@@ -6864,7 +6864,7 @@ var ImageEditorController = (_class7 = class {
6864
6864
  // --- Layer masks ---
6865
6865
  maskFromSelection(sel, props = {}) {
6866
6866
  const { width, height } = this.naturalSize;
6867
- const sized = sel.width === width && sel.height === height ? sel : _chunk65GNHOD4cjs.resizeSelection.call(void 0, sel, width, height);
6867
+ const sized = sel.width === width && sel.height === height ? sel : _chunkYAFS2QFZcjs.resizeSelection.call(void 0, sel, width, height);
6868
6868
  const mask = { surface: _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0), defaultValue: 0 };
6869
6869
  return withMaskProps(mask, props);
6870
6870
  }
@@ -6910,7 +6910,7 @@ var ImageEditorController = (_class7 = class {
6910
6910
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
6911
6911
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
6912
6912
  const data = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, layer.mask.surface, { x: -ox, y: -oy, width, height });
6913
- const sel = _chunk65GNHOD4cjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6913
+ const sel = _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6914
6914
  return this.setSelection(sel, mode);
6915
6915
  }
6916
6916
  // --- Histogram ---
@@ -6940,9 +6940,9 @@ var ImageEditorController = (_class7 = class {
6940
6940
  merged.depthRange = [...merged.depthRange];
6941
6941
  this.state.layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
6942
6942
  const next = { ...l };
6943
- if (_chunk65GNHOD4cjs.isDefaultDepthMask.call(void 0, merged)) {
6943
+ if (_chunkYAFS2QFZcjs.isDefaultDepthMask.call(void 0, merged)) {
6944
6944
  if (_optionalChain([next, 'access', _264 => _264.mask, 'optionalAccess', _265 => _265.source])) delete next.mask;
6945
- } else next.mask = _chunk65GNHOD4cjs.depthRasterMask.call(void 0, merged);
6945
+ } else next.mask = _chunkYAFS2QFZcjs.depthRasterMask.call(void 0, merged);
6946
6946
  return next;
6947
6947
  });
6948
6948
  }
@@ -6963,7 +6963,7 @@ var ImageEditorController = (_class7 = class {
6963
6963
  // --- Annotations & Layers ---
6964
6964
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
6965
6965
  annotationLayer(id) {
6966
- return _chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunk65GNHOD4cjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _268 => _268.id]) === id);
6966
+ return _chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkYAFS2QFZcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _268 => _268.id]) === id);
6967
6967
  }
6968
6968
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
6969
6969
  annotationEnv() {
@@ -6979,7 +6979,7 @@ var ImageEditorController = (_class7 = class {
6979
6979
  this.recordHistory();
6980
6980
  const id = `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`;
6981
6981
  const fullAnnotation = { ...annotation, id };
6982
- const layer = _chunk65GNHOD4cjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
6982
+ const layer = _chunkYAFS2QFZcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
6983
6983
  const loc = placement.aboveId ? _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
6984
6984
  this.state.layers = loc ? _chunk24ATT2PEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _269 => _269.parent, 'optionalAccess', _270 => _270.id]), () => ( null)), loc.index + 1) : _chunk24ATT2PEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
6985
6985
  this.state.selectedAnnotationId = id;
@@ -6991,17 +6991,17 @@ var ImageEditorController = (_class7 = class {
6991
6991
  this.recordHistory();
6992
6992
  }
6993
6993
  const layer = this.annotationLayer(id);
6994
- const current = layer ? _chunk65GNHOD4cjs.annotationOfLayer.call(void 0, layer) : null;
6994
+ const current = layer ? _chunkYAFS2QFZcjs.annotationOfLayer.call(void 0, layer) : null;
6995
6995
  if (layer && current) {
6996
6996
  const annotation = { ...current, ...partial, id };
6997
- const name = layer.name === _chunk65GNHOD4cjs.annotationLayerName.call(void 0, current) ? _chunk65GNHOD4cjs.annotationLayerName.call(void 0, annotation) : layer.name;
6997
+ const name = layer.name === _chunkYAFS2QFZcjs.annotationLayerName.call(void 0, current) ? _chunkYAFS2QFZcjs.annotationLayerName.call(void 0, annotation) : layer.name;
6998
6998
  this.state.layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => this.layerForAnnotation(layer, annotation, name));
6999
6999
  }
7000
7000
  this.notify();
7001
7001
  }
7002
7002
  /** `layer` (an annotation, or a shape or type layer migrated from one) showing `annotation` instead, keeping its other properties. */
7003
7003
  layerForAnnotation(layer, annotation, name) {
7004
- const fresh = _chunk65GNHOD4cjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7004
+ const fresh = _chunkYAFS2QFZcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7005
7005
  const keep = { id: layer.id, visible: layer.visible, opacity: layer.opacity };
7006
7006
  for (const k of ["clipped", "mask", "locks", "effects"]) if (layer[k] !== void 0) keep[k] = layer[k];
7007
7007
  if (fresh.type !== "annotation" && layer.type !== "annotation" && layer.fillOpacity !== void 0) keep.fillOpacity = layer.fillOpacity;
@@ -7285,8 +7285,8 @@ var ImageEditorController = (_class7 = class {
7285
7285
  return;
7286
7286
  }
7287
7287
  const target = this.developLayer();
7288
- if (!target) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("There is no pixel layer to mask.");
7289
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, target, "all", "mask it");
7288
+ if (!target) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("There is no pixel layer to mask.");
7289
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7290
7290
  const { width, height } = this.naturalSize;
7291
7291
  let px2 = await this.decodeImage(newDataUrl);
7292
7292
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
@@ -7294,14 +7294,14 @@ var ImageEditorController = (_class7 = class {
7294
7294
  for (let p = 0; p < alpha.length; p++) alpha[p] = px2.data[p * 4 + 3];
7295
7295
  let surface = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: alpha }, 1, 0, 0, 0);
7296
7296
  if (target.offset.x || target.offset.y) surface = _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, surface, -target.offset.x, -target.offset.y);
7297
- this.commitLayers(_chunk65GNHOD4cjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7297
+ this.commitLayers(_chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7298
7298
  return target.id;
7299
7299
  }
7300
7300
  // --- Type layers ---
7301
7301
 
7302
7302
  /** The shaper that lays out and draws type layers (`null` when there is none here). */
7303
7303
  getTextShaper() {
7304
- if (this.textShaperValue === void 0) this.textShaperValue = _chunkF7GGEAO2cjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7304
+ if (this.textShaperValue === void 0) this.textShaperValue = _chunkZ2H7KECKcjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7305
7305
  return this.textShaperValue;
7306
7306
  }
7307
7307
  /** Sets the text shaper (fonts) type layers lay out and draw with; existing layers redraw on their next edit. */
@@ -7318,7 +7318,7 @@ var ImageEditorController = (_class7 = class {
7318
7318
  return _nullishCoalesce(_optionalChain([this, 'access', _277 => _277.getTextShaper, 'call', _278 => _278(), 'optionalAccess', _279 => _279.families, 'optionalCall', _280 => _280()]), () => ( ["sans-serif", "serif", "monospace"]));
7319
7319
  }
7320
7320
  typeInfo(id) {
7321
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7321
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7322
7322
  const ranges = (runs) => {
7323
7323
  let at = 0;
7324
7324
  return runs.map((r) => {
@@ -7331,7 +7331,7 @@ var ImageEditorController = (_class7 = class {
7331
7331
  let lines = [];
7332
7332
  let missing = _nullishCoalesce(layer.missingFonts, () => ( []));
7333
7333
  if (shaper) {
7334
- const layout = _chunkF7GGEAO2cjs.layoutText.call(void 0, layer, shaper);
7334
+ const layout = _chunkZ2H7KECKcjs.layoutText.call(void 0, layer, shaper);
7335
7335
  const r = (n) => Math.round(n * 1e3) / 1e3;
7336
7336
  lines = layout.lines.map((l) => ({ start: l.start, end: l.end, baseline: r(l.baseline), width: r(l.width) }));
7337
7337
  if (layer.rendering === "stored") missing = layout.missingFonts;
@@ -7361,25 +7361,25 @@ var ImageEditorController = (_class7 = class {
7361
7361
  * text wrapped in `box`. Refused without a text shaper. Returns its id.
7362
7362
  */
7363
7363
  addTextLayer(init) {
7364
- const text = _chunk65GNHOD4cjs.normalizeText.call(void 0, init.text);
7365
- if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("x and y must be numbers (document pixels).");
7366
- const style = _chunk65GNHOD4cjs.patchTextStyle.call(void 0, { ..._chunkF7GGEAO2cjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7367
- const paragraph = _chunk65GNHOD4cjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7364
+ const text = _chunkYAFS2QFZcjs.normalizeText.call(void 0, init.text);
7365
+ if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers (document pixels).");
7366
+ const style = _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, { ..._chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7367
+ const paragraph = _chunkYAFS2QFZcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7368
7368
  let frame = { kind: "point" };
7369
7369
  if (init.box) {
7370
7370
  const { width, height } = init.box;
7371
- if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7371
+ if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7372
7372
  frame = { kind: "box", width, height };
7373
7373
  }
7374
- if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("rotation must be a number of degrees.");
7375
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("opacity must be between 0 and 1.");
7376
- if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7374
+ if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("rotation must be a number of degrees.");
7375
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be between 0 and 1.");
7376
+ if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7377
7377
  const t = [1, 0, 0, 1, init.x, init.y];
7378
- const transform = init.rotation ? _chunkF7GGEAO2cjs.multiplyMatrices.call(void 0, t, _chunkF7GGEAO2cjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7379
- const layer = _chunk65GNHOD4cjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunk65GNHOD4cjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7378
+ const transform = init.rotation ? _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, t, _chunkZ2H7KECKcjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7379
+ const layer = _chunkYAFS2QFZcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkYAFS2QFZcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7380
7380
  if (init.opacity !== void 0) layer.opacity = init.opacity;
7381
7381
  if (init.blend !== void 0) layer.blend = init.blend;
7382
- const next = _chunk65GNHOD4cjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7382
+ const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7383
7383
  this.commitLayers(next, () => {
7384
7384
  this.state.activeLayerId = layer.id;
7385
7385
  this.state.activeTarget = "pixels";
@@ -7391,28 +7391,28 @@ var ImageEditorController = (_class7 = class {
7391
7391
  * `start`. One undo step unless `commitToHistory` is false (typing). Returns the layer.
7392
7392
  */
7393
7393
  setText(id, text, range = {}, commitToHistory = true) {
7394
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7395
- const insert = _chunk65GNHOD4cjs.normalizeText.call(void 0, text);
7396
- const [start, end] = _chunk65GNHOD4cjs.textRange.call(void 0, layer.text, range.start, range.end);
7397
- const { layers } = _chunk65GNHOD4cjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunk65GNHOD4cjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7394
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7395
+ const insert = _chunkYAFS2QFZcjs.normalizeText.call(void 0, text);
7396
+ const [start, end] = _chunkYAFS2QFZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7397
+ const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkYAFS2QFZcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7398
7398
  this.commitLayers(layers, void 0, commitToHistory);
7399
7399
  return this.typeInfo(id);
7400
7400
  }
7401
7401
  /** Sets character style fields over [start, end) (default all), one undo step. Returns the layer. */
7402
7402
  setTextStyle(id, style, range = {}, commitToHistory = true) {
7403
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7404
- const [start, end] = _chunk65GNHOD4cjs.textRange.call(void 0, layer.text, range.start, range.end);
7405
- if (!Object.keys(style).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give at least one style field to set.");
7406
- _chunk65GNHOD4cjs.patchTextStyle.call(void 0, _chunkF7GGEAO2cjs.DEFAULT_TEXT_STYLE, style);
7407
- const { layers } = _chunk65GNHOD4cjs.updateTypeLayer.call(void 0,
7403
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7404
+ const [start, end] = _chunkYAFS2QFZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7405
+ if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one style field to set.");
7406
+ _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE, style);
7407
+ const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0,
7408
7408
  this.state.layers,
7409
7409
  id,
7410
7410
  (l) => {
7411
7411
  if (start === end) {
7412
- if (l.text.length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7413
- return { runs: [{ length: 0, style: _chunk65GNHOD4cjs.patchTextStyle.call(void 0, _chunkF7GGEAO2cjs.styleAt.call(void 0, l.runs, 0, _chunkF7GGEAO2cjs.DEFAULT_TEXT_STYLE), style) }] };
7412
+ if (l.text.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7413
+ return { runs: [{ length: 0, style: _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, _chunkZ2H7KECKcjs.styleAt.call(void 0, l.runs, 0, _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE), style) }] };
7414
7414
  }
7415
- return { runs: _chunkF7GGEAO2cjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunk65GNHOD4cjs.patchTextStyle.call(void 0, s, style)) };
7415
+ return { runs: _chunkZ2H7KECKcjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, s, style)) };
7416
7416
  },
7417
7417
  this.textEnv(),
7418
7418
  "restyle its text"
@@ -7422,11 +7422,11 @@ var ImageEditorController = (_class7 = class {
7422
7422
  }
7423
7423
  /** Sets paragraph style fields on every paragraph that [start, end) touches (default all), one undo step. */
7424
7424
  setParagraphStyle(id, style, range = {}, commitToHistory = true) {
7425
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7426
- const [start, end] = _chunk65GNHOD4cjs.textRange.call(void 0, layer.text, range.start, range.end);
7427
- if (!Object.keys(style).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give at least one paragraph field to set.");
7428
- _chunk65GNHOD4cjs.patchParagraphStyle.call(void 0, {}, style);
7429
- const { layers } = _chunk65GNHOD4cjs.updateTypeLayer.call(void 0,
7425
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7426
+ const [start, end] = _chunkYAFS2QFZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7427
+ if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one paragraph field to set.");
7428
+ _chunkYAFS2QFZcjs.patchParagraphStyle.call(void 0, {}, style);
7429
+ const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0,
7430
7430
  this.state.layers,
7431
7431
  id,
7432
7432
  (l) => {
@@ -7435,7 +7435,7 @@ var ImageEditorController = (_class7 = class {
7435
7435
  const a = at;
7436
7436
  at += p.length;
7437
7437
  const touches = a < end && at > start || start === end && start >= a && (start < at || at === l.text.length);
7438
- return touches || !l.text.length ? { length: p.length, style: _chunk65GNHOD4cjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7438
+ return touches || !l.text.length ? { length: p.length, style: _chunkYAFS2QFZcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7439
7439
  });
7440
7440
  return { paragraphs };
7441
7441
  },
@@ -7451,21 +7451,21 @@ var ImageEditorController = (_class7 = class {
7451
7451
  * paragraph. Also resizes a box. One undo step.
7452
7452
  */
7453
7453
  setTextFrame(id, frame, commitToHistory = true) {
7454
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7455
- if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("width and height must be at least 1 pixel.");
7456
- if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("kind must be point or box.");
7454
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7455
+ if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("width and height must be at least 1 pixel.");
7456
+ if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("kind must be point or box.");
7457
7457
  const shaper = this.getTextShaper();
7458
- const { layers } = _chunk65GNHOD4cjs.updateTypeLayer.call(void 0,
7458
+ const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0,
7459
7459
  this.state.layers,
7460
7460
  id,
7461
7461
  (l) => {
7462
7462
  if (frame.kind === "box" && l.frame.kind === "box") return { frame: { kind: "box", width: frame.width, height: frame.height } };
7463
- if (!shaper) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7464
- const lines = _chunkF7GGEAO2cjs.layoutText.call(void 0, l, shaper).lines;
7463
+ if (!shaper) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7464
+ const lines = _chunkZ2H7KECKcjs.layoutText.call(void 0, l, shaper).lines;
7465
7465
  const first = lines[0];
7466
7466
  const dx = frame.kind === "box" ? first ? first.x : 0 : 0;
7467
7467
  const dy = frame.kind === "box" ? first ? first.baseline - first.ascent : 0 : first ? first.baseline : 0;
7468
- const m = _chunk65GNHOD4cjs.textMatrix.call(void 0, l);
7468
+ const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, l);
7469
7469
  const shifted = [m[0], m[1], m[2], m[3], m[0] * dx + m[2] * dy + m[4], m[1] * dx + m[3] * dy + m[5]];
7470
7470
  const nextFrame = frame.kind === "box" ? { kind: "box", width: frame.width, height: frame.height } : { kind: "point" };
7471
7471
  return { frame: nextFrame, transform: shifted };
@@ -7482,21 +7482,21 @@ var ImageEditorController = (_class7 = class {
7482
7482
  * `warnings` says when other colours were dropped. One undo step.
7483
7483
  */
7484
7484
  convertTextToShape(id) {
7485
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7486
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7485
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7486
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7487
7487
  const shaper = this.getTextShaper();
7488
- if (!shaper) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7489
- const parts = _chunk65GNHOD4cjs.textOutlines.call(void 0, layer, shaper);
7490
- const subpaths = parts.flatMap((p) => _chunkF7GGEAO2cjs.bezierToSubpaths.call(void 0, p.path));
7491
- if (!subpaths.length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7488
+ if (!shaper) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7489
+ const parts = _chunkYAFS2QFZcjs.textOutlines.call(void 0, layer, shaper);
7490
+ const subpaths = parts.flatMap((p) => _chunkZ2H7KECKcjs.bezierToSubpaths.call(void 0, p.path));
7491
+ if (!subpaths.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7492
7492
  const warnings = [];
7493
7493
  const colors = new Set(layer.runs.filter((r) => r.length > 0).map((r) => `${r.style.color}/${_nullishCoalesce(r.style.opacity, () => ( 1))}`));
7494
7494
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
7495
- const missing = _chunkF7GGEAO2cjs.layoutText.call(void 0, layer, shaper).missingFonts;
7495
+ const missing = _chunkZ2H7KECKcjs.layoutText.call(void 0, layer, shaper).missingFonts;
7496
7496
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
7497
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _281 => _281.runs, 'access', _282 => _282.find, 'call', _283 => _283((r) => r.length > 0), 'optionalAccess', _284 => _284.style]), () => ( _chunkF7GGEAO2cjs.DEFAULT_TEXT_STYLE));
7497
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _281 => _281.runs, 'access', _282 => _282.find, 'call', _283 => _283((r) => r.length > 0), 'optionalAccess', _284 => _284.style]), () => ( _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE));
7498
7498
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
7499
- const shape = _chunk65GNHOD4cjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7499
+ const shape = _chunkYAFS2QFZcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7500
7500
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
7501
7501
  for (const k of ["clipped", "mask", "locks", "effects", "fillOpacity"]) if (layer[k] !== void 0) keep[k] = layer[k];
7502
7502
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => ({ ...shape, ...keep })));
@@ -7504,23 +7504,23 @@ var ImageEditorController = (_class7 = class {
7504
7504
  }
7505
7505
  /** The layout of a type layer (lines, characters, bounds in text space), or `null` without a shaper. */
7506
7506
  getTextLayout(id) {
7507
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7507
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7508
7508
  const shaper = this.getTextShaper();
7509
- return shaper ? _chunkF7GGEAO2cjs.layoutText.call(void 0, layer, shaper) : null;
7509
+ return shaper ? _chunkZ2H7KECKcjs.layoutText.call(void 0, layer, shaper) : null;
7510
7510
  }
7511
7511
  /** The text index nearest a document point (for clicks on a type layer). */
7512
7512
  textIndexAt(id, point) {
7513
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7513
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7514
7514
  const layout = this.getTextLayout(id);
7515
- return layout ? _chunkF7GGEAO2cjs.textIndexAt.call(void 0, layout, _chunk65GNHOD4cjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7515
+ return layout ? _chunkZ2H7KECKcjs.textIndexAt.call(void 0, layout, _chunkYAFS2QFZcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7516
7516
  }
7517
7517
  /** The caret at text index `index` as a document-space segment (top to bottom), for drawing it. */
7518
7518
  textCaret(id, index) {
7519
- const layer = _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, this.state.layers, id);
7519
+ const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7520
7520
  const layout = this.getTextLayout(id);
7521
7521
  if (!layout) return null;
7522
- const c = _chunkF7GGEAO2cjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7523
- const m = _chunk65GNHOD4cjs.textMatrix.call(void 0, layer);
7522
+ const c = _chunkZ2H7KECKcjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7523
+ const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer);
7524
7524
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
7525
7525
  return { top: at(c.x, c.top), bottom: at(c.x, c.bottom), line: c.line };
7526
7526
  }
@@ -7531,14 +7531,14 @@ var ImageEditorController = (_class7 = class {
7531
7531
  }
7532
7532
  /** One component from tool or UI input (validated). */
7533
7533
  componentFrom(spec, path) {
7534
- const op = _chunk65GNHOD4cjs.requireOperation.call(void 0, spec.op, `${path}op`);
7535
- if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7536
- if (spec.shape !== void 0) return _chunk65GNHOD4cjs.liveComponent.call(void 0, _chunk65GNHOD4cjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7537
- if (spec.subpaths !== void 0) return { op, subpaths: _chunk65GNHOD4cjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7538
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7534
+ const op = _chunkYAFS2QFZcjs.requireOperation.call(void 0, spec.op, `${path}op`);
7535
+ if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7536
+ if (spec.shape !== void 0) return _chunkYAFS2QFZcjs.liveComponent.call(void 0, _chunkYAFS2QFZcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7537
+ if (spec.subpaths !== void 0) return { op, subpaths: _chunkYAFS2QFZcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7538
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7539
7539
  }
7540
7540
  shapeInfo(id) {
7541
- const layer = _chunk65GNHOD4cjs.requireShapeLayer.call(void 0, this.state.layers, id);
7541
+ const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7542
7542
  const r = (n) => Math.round(n * 1e3) / 1e3;
7543
7543
  const box = (b) => b ? { x: r(b.x), y: r(b.y), width: r(b.width), height: r(b.height) } : null;
7544
7544
  const info = {
@@ -7548,13 +7548,13 @@ var ImageEditorController = (_class7 = class {
7548
7548
  index,
7549
7549
  op: c.op,
7550
7550
  live: c.live ? JSON.parse(JSON.stringify(c.live)) : null,
7551
- subpaths: _chunkF7GGEAO2cjs.roundSubpaths.call(void 0, c.subpaths),
7552
- bounds: box(_chunk65GNHOD4cjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7551
+ subpaths: _chunkZ2H7KECKcjs.roundSubpaths.call(void 0, c.subpaths),
7552
+ bounds: box(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7553
7553
  })),
7554
7554
  fillRule: _nullishCoalesce(layer.fillRule, () => ( "nonzero")),
7555
7555
  fill: layer.fill ? JSON.parse(JSON.stringify(layer.fill)) : null,
7556
7556
  stroke: layer.stroke ? JSON.parse(JSON.stringify(layer.stroke)) : null,
7557
- geometryBounds: box(_chunk65GNHOD4cjs.shapeGeometryBounds.call(void 0, layer)),
7557
+ geometryBounds: box(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer)),
7558
7558
  bounds: this.getLayerBounds(id)
7559
7559
  };
7560
7560
  if (layer.annotation) info.annotationId = layer.annotation.id;
@@ -7571,17 +7571,17 @@ var ImageEditorController = (_class7 = class {
7571
7571
  */
7572
7572
  addShapeLayer(init) {
7573
7573
  const specs = _optionalChain([init, 'access', _289 => _289.components, 'optionalAccess', _290 => _290.length]) ? init.components : [init];
7574
- if (_optionalChain([init, 'access', _291 => _291.components, 'optionalAccess', _292 => _292.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7574
+ if (_optionalChain([init, 'access', _291 => _291.components, 'optionalAccess', _292 => _292.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7575
7575
  const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _293 => _293.components, 'optionalAccess', _294 => _294.length]) ? `components[${i}].` : ""));
7576
- const stroke = init.stroke ? _chunk65GNHOD4cjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7576
+ const stroke = init.stroke ? _chunkYAFS2QFZcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7577
7577
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
7578
- const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunk65GNHOD4cjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunk65GNHOD4cjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7579
- if (!fill && !stroke) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7580
- if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7581
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("opacity must be between 0 and 1.");
7582
- if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7583
- const layer = _chunk65GNHOD4cjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7584
- const next = _chunk65GNHOD4cjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7578
+ const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkYAFS2QFZcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkYAFS2QFZcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7579
+ if (!fill && !stroke) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7580
+ if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7581
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be between 0 and 1.");
7582
+ if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7583
+ const layer = _chunkYAFS2QFZcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7584
+ const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7585
7585
  this.commitLayers(next, () => {
7586
7586
  this.state.activeLayerId = layer.id;
7587
7587
  this.state.activeTarget = "pixels";
@@ -7594,18 +7594,18 @@ var ImageEditorController = (_class7 = class {
7594
7594
  * only those settings of the current stroke. Returns the shape.
7595
7595
  */
7596
7596
  setShapeStyle(id, changes, commitToHistory = true) {
7597
- const layer = _chunk65GNHOD4cjs.requireShapeLayer.call(void 0, this.state.layers, id);
7598
- const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunk65GNHOD4cjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7599
- const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunk65GNHOD4cjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7600
- if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7597
+ const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7598
+ const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkYAFS2QFZcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7599
+ const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkYAFS2QFZcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7600
+ if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7601
7601
  const fillRule = _nullishCoalesce(_nullishCoalesce(changes.fillRule, () => ( layer.fillRule)), () => ( "nonzero"));
7602
- const { layers } = _chunk65GNHOD4cjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7602
+ const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7603
7603
  this.commitLayers(layers, void 0, commitToHistory);
7604
7604
  return this.shapeInfo(id);
7605
7605
  }
7606
7606
  componentIndex(layer, index) {
7607
7607
  if (!Number.isInteger(index) || index < 0 || index >= layer.components.length) {
7608
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7608
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7609
7609
  }
7610
7610
  return index;
7611
7611
  }
@@ -7615,36 +7615,36 @@ var ImageEditorController = (_class7 = class {
7615
7615
  * the live shape) or its operation. Returns the shape.
7616
7616
  */
7617
7617
  setShapeComponent(id, index, change, commitToHistory = true) {
7618
- const layer = _chunk65GNHOD4cjs.requireShapeLayer.call(void 0, this.state.layers, id);
7618
+ const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7619
7619
  const i = this.componentIndex(layer, index);
7620
7620
  const current = layer.components[i];
7621
7621
  let shape = change.shape;
7622
7622
  if (shape && current.live && shape.kind === void 0) shape = { ...current.live, ...shape };
7623
7623
  else if (shape && current.live && shape.kind === current.live.kind) shape = { ...current.live, ...shape };
7624
- const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunk65GNHOD4cjs.requireOperation.call(void 0, change.op) };
7624
+ const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkYAFS2QFZcjs.requireOperation.call(void 0, change.op) };
7625
7625
  const components = layer.components.map((c, k) => k === i ? next : c);
7626
- const { layers } = _chunk65GNHOD4cjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7626
+ const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7627
7627
  this.commitLayers(layers, void 0, commitToHistory);
7628
7628
  return this.shapeInfo(id);
7629
7629
  }
7630
7630
  /** Adds a component to a shape (path operations), on top unless `index` is given (one undo step). Returns the shape. */
7631
7631
  addShapeComponent(id, spec, index) {
7632
- const layer = _chunk65GNHOD4cjs.requireShapeLayer.call(void 0, this.state.layers, id);
7632
+ const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7633
7633
  const c = this.componentFrom(spec, "");
7634
7634
  const at = index === void 0 ? layer.components.length : index;
7635
- if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7635
+ if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7636
7636
  const components = [...layer.components.slice(0, at), c, ...layer.components.slice(at)];
7637
- const { layers } = _chunk65GNHOD4cjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7637
+ const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7638
7638
  this.commitLayers(layers);
7639
7639
  return this.shapeInfo(id);
7640
7640
  }
7641
7641
  /** Removes one component of a shape (one undo step); the last one cannot go (delete the layer instead). Returns the shape. */
7642
7642
  removeShapeComponent(id, index) {
7643
- const layer = _chunk65GNHOD4cjs.requireShapeLayer.call(void 0, this.state.layers, id);
7643
+ const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7644
7644
  const i = this.componentIndex(layer, index);
7645
- if (layer.components.length === 1) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7645
+ if (layer.components.length === 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7646
7646
  const components = layer.components.filter((_, k) => k !== i);
7647
- const { layers } = _chunk65GNHOD4cjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7647
+ const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7648
7648
  this.commitLayers(layers);
7649
7649
  return this.shapeInfo(id);
7650
7650
  }
@@ -7653,10 +7653,10 @@ var ImageEditorController = (_class7 = class {
7653
7653
  * shapes become paths), as one undo step. Returns the shape.
7654
7654
  */
7655
7655
  mergeShapeComponents(id) {
7656
- const layer = _chunk65GNHOD4cjs.requireShapeLayer.call(void 0, this.state.layers, id);
7657
- if (layer.components.length < 2) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7658
- const components = _chunk65GNHOD4cjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7659
- const { layers } = _chunk65GNHOD4cjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7656
+ const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7657
+ if (layer.components.length < 2) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7658
+ const components = _chunkYAFS2QFZcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7659
+ const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7660
7660
  this.commitLayers(layers);
7661
7661
  return this.shapeInfo(id);
7662
7662
  }
@@ -7666,8 +7666,8 @@ var ImageEditorController = (_class7 = class {
7666
7666
  * step. Returns the layer id.
7667
7667
  */
7668
7668
  async rasterizeLayer(id) {
7669
- const layer = _chunk65GNHOD4cjs.requireLayer.call(void 0, this.state.layers, id).layer;
7670
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7669
+ const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7670
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7671
7671
  const { width, height } = this.naturalSize;
7672
7672
  const canvas = { x: 0, y: 0, width, height };
7673
7673
  let next;
@@ -7683,8 +7683,8 @@ var ImageEditorController = (_class7 = class {
7683
7683
  if (layer.locks) next.locks = layer.locks;
7684
7684
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
7685
7685
  } else if (layer.type === "pixel") {
7686
- if (!_optionalChain([layer, 'access', _295 => _295.filters, 'optionalAccess', _296 => _296.length])) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7687
- _chunk65GNHOD4cjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7686
+ if (!_optionalChain([layer, 'access', _295 => _295.filters, 'optionalAccess', _296 => _296.length])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7687
+ _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7688
7688
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
7689
7689
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
7690
7690
  delete content.mask;
@@ -7701,10 +7701,10 @@ var ImageEditorController = (_class7 = class {
7701
7701
  } else if (layer.type === "smart") {
7702
7702
  return this.rasterizeSmartObject(id);
7703
7703
  } else if (layer.type === "shape" || layer.type === "type") {
7704
- next = layer.type === "shape" ? _chunk65GNHOD4cjs.shapeAsPixelLayer.call(void 0, layer) : _chunk65GNHOD4cjs.typeAsPixelLayer.call(void 0, layer);
7704
+ next = layer.type === "shape" ? _chunkYAFS2QFZcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkYAFS2QFZcjs.typeAsPixelLayer.call(void 0, layer);
7705
7705
  if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _297 => _297.annotation, 'optionalAccess', _298 => _298.id])) this.state.selectedAnnotationId = null;
7706
7706
  } else {
7707
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
7707
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
7708
7708
  }
7709
7709
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
7710
7710
  return id;
@@ -7729,7 +7729,7 @@ var ImageEditorController = (_class7 = class {
7729
7729
  setColorMode(mode, options = {}) {
7730
7730
  let next;
7731
7731
  if (mode === "rgb") {
7732
- if (options.profile !== void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7732
+ if (options.profile !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7733
7733
  next = null;
7734
7734
  } else if (mode === "lab") next = { mode: "lab" };
7735
7735
  else if (mode === "cmyk") {
@@ -7737,14 +7737,14 @@ var ImageEditorController = (_class7 = class {
7737
7737
  try {
7738
7738
  doc = documentProfile(_nullishCoalesce(options.profile, () => ( "coated-cmyk")));
7739
7739
  } catch (e) {
7740
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7740
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7741
7741
  }
7742
7742
  const cs = resolveProfile(doc).colorSpace;
7743
- if (cs !== "cmyk") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7743
+ if (cs !== "cmyk") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7744
7744
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7745
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7745
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7746
7746
  next = { mode: "cmyk", profile: doc, intent };
7747
- } else throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7747
+ } else throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7748
7748
  this.recordHistory();
7749
7749
  if (next) this.state.colorMode = next;
7750
7750
  else delete this.state.colorMode;
@@ -7757,10 +7757,10 @@ var ImageEditorController = (_class7 = class {
7757
7757
  try {
7758
7758
  doc = documentProfile(profile);
7759
7759
  } catch (e) {
7760
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7760
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7761
7761
  }
7762
7762
  const cs = resolveProfile(doc).colorSpace;
7763
- if (cs !== "rgb") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`${action} needs an RGB profile; "${doc.name}" is ${cs.toUpperCase()}. The document is RGB: soft-proof CMYK with set_proof_setup, or export to it.`);
7763
+ if (cs !== "rgb") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${action} needs an RGB profile; "${doc.name}" is ${cs.toUpperCase()}. The document is RGB: soft-proof CMYK with set_proof_setup, or export to it.`);
7764
7764
  return doc;
7765
7765
  }
7766
7766
  /**
@@ -7786,7 +7786,7 @@ var ImageEditorController = (_class7 = class {
7786
7786
  convertToProfile(profile, options = {}) {
7787
7787
  const doc = this.rgbProfileArg(profile, "Convert to Profile");
7788
7788
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7789
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7789
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7790
7790
  const t = _chunkG5NMLUVFcjs.Transform.create(resolveProfile(this.state.colorProfile), resolveProfile(doc), { intent, bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7791
7791
  const converted = [];
7792
7792
  const unconverted = [];
@@ -7816,11 +7816,11 @@ var ImageEditorController = (_class7 = class {
7816
7816
  else if (l.type === "pixel") next2 = { ...next2, surface: convertSurfaceColors(this.surfaceOf(l), t), source: void 0 };
7817
7817
  else if (l.type === "shape") {
7818
7818
  const s = next2;
7819
- next2 = _chunk65GNHOD4cjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
7819
+ next2 = _chunkYAFS2QFZcjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
7820
7820
  } else if (l.type === "type") {
7821
7821
  const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
7822
7822
  try {
7823
- next2 = _chunk65GNHOD4cjs.rerenderText.call(void 0, recoloured, textEnv);
7823
+ next2 = _chunkYAFS2QFZcjs.rerenderText.call(void 0, recoloured, textEnv);
7824
7824
  } catch (e27) {
7825
7825
  next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
7826
7826
  }
@@ -7850,12 +7850,12 @@ var ImageEditorController = (_class7 = class {
7850
7850
  try {
7851
7851
  doc = documentProfile(setup.profile);
7852
7852
  } catch (e) {
7853
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7853
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7854
7854
  }
7855
7855
  const intent = _nullishCoalesce(setup.intent, () => ( DEFAULT_PROOF.intent));
7856
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7856
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7857
7857
  const next = { ...DEFAULT_PROOF, ...setup, intent, profile: doc };
7858
- if (!_chunkG5NMLUVFcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7858
+ if (!_chunkG5NMLUVFcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7859
7859
  this.state.proofSetup = next;
7860
7860
  this.notify();
7861
7861
  return next;
@@ -7872,14 +7872,14 @@ var ImageEditorController = (_class7 = class {
7872
7872
  src = options.from !== void 0 ? resolveProfile(documentProfile(options.from)) : resolveProfile(this.state.colorProfile);
7873
7873
  dst = resolveProfile(documentProfile(to));
7874
7874
  } catch (e) {
7875
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7875
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7876
7876
  }
7877
- if (src.colorSpace !== "rgb") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7877
+ if (src.colorSpace !== "rgb") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7878
7878
  const t = _chunkG5NMLUVFcjs.Transform.create(src, dst, { intent: _nullishCoalesce(options.intent, () => ( "relative")), bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7879
7879
  const toLab = _chunkG5NMLUVFcjs.Transform.create(src, _chunkG5NMLUVFcjs.builtinProfile.call(void 0, "lab-d50"), { intent: "relative", bpc: false });
7880
7880
  return colors.map((input) => {
7881
7881
  const m = /^#?([0-9a-f]{6})$/i.exec(input.trim());
7882
- if (!m) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7882
+ if (!m) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7883
7883
  const n = parseInt(m[1], 16);
7884
7884
  const rgb = [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255];
7885
7885
  const out = new Float32Array(16);
@@ -7905,7 +7905,7 @@ var ImageEditorController = (_class7 = class {
7905
7905
  * the ids of the layers whose pixels changed.
7906
7906
  */
7907
7907
  setBitDepth(depth) {
7908
- if (!_chunkJ5BA3BQ6cjs.isBitDepth.call(void 0, depth)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7908
+ if (!_chunkJ5BA3BQ6cjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7909
7909
  const changed = [];
7910
7910
  const withMask = (l) => {
7911
7911
  const m = l.mask;
@@ -7954,7 +7954,7 @@ var ImageEditorController = (_class7 = class {
7954
7954
  * Throws `PsdError` for files that cannot be read at all.
7955
7955
  */
7956
7956
  loadPsd(bytes) {
7957
- const result = _chunk65GNHOD4cjs.importPsd.call(void 0, bytes, { newId: () => _chunk65GNHOD4cjs.newLayerId.call(void 0, ) });
7957
+ const result = _chunkYAFS2QFZcjs.importPsd.call(void 0, bytes, { newId: () => _chunkYAFS2QFZcjs.newLayerId.call(void 0, ) });
7958
7958
  this.abandonContents();
7959
7959
  this.recordHistory();
7960
7960
  const s = this.state;
@@ -7964,7 +7964,7 @@ var ImageEditorController = (_class7 = class {
7964
7964
  if (!this.samplePixelsOverride) this.samplePixels = null;
7965
7965
  s.layers = this.checkPsdFonts(result);
7966
7966
  s.crop = null;
7967
- s.transform = { ..._chunk65GNHOD4cjs.DEFAULT_TRANSFORM_VALUES };
7967
+ s.transform = { ..._chunkYAFS2QFZcjs.DEFAULT_TRANSFORM_VALUES };
7968
7968
  s.outputOpacity = 1;
7969
7969
  delete s.legacyOutputBlur;
7970
7970
  s.selection = null;
@@ -8015,7 +8015,7 @@ var ImageEditorController = (_class7 = class {
8015
8015
  let layers = result.layers;
8016
8016
  const missing = /* @__PURE__ */ new Map();
8017
8017
  for (const l of types) {
8018
- const fonts = shaper ? _chunkF7GGEAO2cjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8018
+ const fonts = shaper ? _chunkZ2H7KECKcjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8019
8019
  if (!fonts.length) continue;
8020
8020
  layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, missingFonts: fonts }));
8021
8021
  for (const f of fonts) missing.set(f, [..._nullishCoalesce(missing.get(f), () => ( [])), l.name]);
@@ -8043,7 +8043,7 @@ var ImageEditorController = (_class7 = class {
8043
8043
  const canRasterize = this.renderer.canRasterize();
8044
8044
  await this.renderer.prepareLayerAssets(this.state.layers, width, height);
8045
8045
  const sources = this.renderer.compositorSources(width, height);
8046
- const compositor = new (0, _chunk65GNHOD4cjs.LayerCompositor)();
8046
+ const compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)();
8047
8047
  const bakeMask = (layer) => {
8048
8048
  const mask = layer.mask;
8049
8049
  if (!_optionalChain([mask, 'optionalAccess', _309 => _309.source])) return mask;
@@ -8125,7 +8125,7 @@ var ImageEditorController = (_class7 = class {
8125
8125
  out.surface = this.surfaceOf(layer);
8126
8126
  delete out.source;
8127
8127
  }
8128
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _313 => _313.filters, 'optionalAccess', _314 => _314.filter, 'call', _315 => _315(_chunk65GNHOD4cjs.isActiveFilter)]), () => ( []));
8128
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _313 => _313.filters, 'optionalAccess', _314 => _314.filter, 'call', _315 => _315(_chunkYAFS2QFZcjs.isActiveFilter)]), () => ( []));
8129
8129
  if (active.length) {
8130
8130
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
8131
8131
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -8158,8 +8158,8 @@ var ImageEditorController = (_class7 = class {
8158
8158
  const color = this.psdColorOptions(warnings);
8159
8159
  if (color.colorMode && this.bitDepth === 32) warnings.push(`${color.colorMode.toUpperCase()} files are written at 16 bits per channel at most; the 32-bit samples were converted (colour above 1 clipped).`);
8160
8160
  const depth = color.colorMode && this.bitDepth === 32 ? 16 : this.bitDepth;
8161
- const mergedDeep = depth === 8 ? void 0 : _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunk65GNHOD4cjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8162
- const result = _chunk65GNHOD4cjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8161
+ const mergedDeep = depth === 8 ? void 0 : _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkYAFS2QFZcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8162
+ const result = _chunkYAFS2QFZcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8163
8163
  warnings.push(...result.warnings);
8164
8164
  return { bytes: result.bytes, warnings, psb: result.psb, width, height };
8165
8165
  }
@@ -8175,13 +8175,13 @@ var ImageEditorController = (_class7 = class {
8175
8175
  if (!this.samplePixelsOverride) this.samplePixels = null;
8176
8176
  if (this.state.selection && (sx !== 1 || sy !== 1)) {
8177
8177
  this.state.selection = normalizeSelection(
8178
- _chunk65GNHOD4cjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8178
+ _chunkYAFS2QFZcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8179
8179
  );
8180
8180
  }
8181
8181
  let layers = this.state.layers;
8182
8182
  if (sx !== 1 || sy !== 1) {
8183
8183
  if (this.state.crop) {
8184
- this.state.crop = _chunk65GNHOD4cjs.clampCropToImage.call(void 0,
8184
+ this.state.crop = _chunkYAFS2QFZcjs.clampCropToImage.call(void 0,
8185
8185
  {
8186
8186
  x: Math.round(this.state.crop.x * sx),
8187
8187
  y: Math.round(this.state.crop.y * sy),
@@ -8200,17 +8200,17 @@ var ImageEditorController = (_class7 = class {
8200
8200
  } else if (l.type === "shape") {
8201
8201
  const a = l.annotation;
8202
8202
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
8203
- const fromAnnotation = scaled ? _chunk65GNHOD4cjs.shapeFromAnnotation.call(void 0, scaled) : null;
8203
+ const fromAnnotation = scaled ? _chunkYAFS2QFZcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8204
8204
  const m = [sx, 0, 0, sy, 0, 0];
8205
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _323 => _323.components]), () => ( _chunk65GNHOD4cjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8205
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _323 => _323.components]), () => ( _chunkYAFS2QFZcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8206
8206
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
8207
8207
  if (scaled && fromAnnotation) moved.annotation = scaled;
8208
8208
  else delete moved.annotation;
8209
- layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => _chunk65GNHOD4cjs.rerenderShape.call(void 0, moved, env));
8209
+ layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkYAFS2QFZcjs.rerenderShape.call(void 0, moved, env));
8210
8210
  }
8211
8211
  }
8212
8212
  }
8213
- const bg = _chunk65GNHOD4cjs.developTarget.call(void 0, layers, null);
8213
+ const bg = _chunkYAFS2QFZcjs.developTarget.call(void 0, layers, null);
8214
8214
  if (bg && bg.source !== "document") layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
8215
8215
  if (clearAnnotations) {
8216
8216
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation" || (l.type === "shape" || l.type === "type") && l.annotation) layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => null);
@@ -8231,7 +8231,7 @@ var ImageEditorController = (_class7 = class {
8231
8231
  let out;
8232
8232
  try {
8233
8233
  out = this.serializeState();
8234
- if (_optionalChain([this, 'access', _327 => _327.state, 'access', _328 => _328.selection, 'optionalAccess', _329 => _329.bounds])) out.selection = _chunk65GNHOD4cjs.serializeSelection.call(void 0, this.state.selection);
8234
+ if (_optionalChain([this, 'access', _327 => _327.state, 'access', _328 => _328.selection, 'optionalAccess', _329 => _329.bounds])) out.selection = _chunkYAFS2QFZcjs.serializeSelection.call(void 0, this.state.selection);
8235
8235
  } finally {
8236
8236
  if (root) {
8237
8237
  this.state = current;
@@ -8239,8 +8239,8 @@ var ImageEditorController = (_class7 = class {
8239
8239
  this.viewKey = [];
8240
8240
  }
8241
8241
  }
8242
- if (!options || out.version !== _chunk65GNHOD4cjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8243
- return _chunk65GNHOD4cjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8242
+ if (!options || out.version !== _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8243
+ return _chunkYAFS2QFZcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8244
8244
  }
8245
8245
  /**
8246
8246
  * Loads a stored state whose v3 assets may live in an asset store (references other than data
@@ -8248,12 +8248,12 @@ var ImageEditorController = (_class7 = class {
8248
8248
  * out and listed in `lastLoadProblems`.
8249
8249
  */
8250
8250
  async loadJSONAsync(data, options = {}) {
8251
- if (data.version !== _chunk65GNHOD4cjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8251
+ if (data.version !== _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8252
8252
  this.loadJSON(data);
8253
8253
  return;
8254
8254
  }
8255
8255
  const problems = [];
8256
- const assets = await _chunk65GNHOD4cjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8256
+ const assets = await _chunkYAFS2QFZcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8257
8257
  this.loadJSON({ ...data, assets });
8258
8258
  this.lastLoadProblems = [...problems, ...this.lastLoadProblems];
8259
8259
  }
@@ -8265,7 +8265,7 @@ var ImageEditorController = (_class7 = class {
8265
8265
  let selection = null;
8266
8266
  if (data.selection) {
8267
8267
  try {
8268
- selection = normalizeSelection(_chunk65GNHOD4cjs.deserializeSelection.call(void 0, data.selection));
8268
+ selection = normalizeSelection(_chunkYAFS2QFZcjs.deserializeSelection.call(void 0, data.selection));
8269
8269
  } catch (e28) {
8270
8270
  selection = null;
8271
8271
  }
@@ -8283,8 +8283,8 @@ var ImageEditorController = (_class7 = class {
8283
8283
  if (isLayered(data)) {
8284
8284
  const problems = [];
8285
8285
  const canvas = typeof data.width === "number" && data.width > 0 && typeof data.height === "number" && data.height > 0 ? { width: data.width, height: data.height } : this.naturalSize;
8286
- const storedPatterns = _chunk65GNHOD4cjs.deserializePatterns.call(void 0, data.patterns, []);
8287
- s.layers = _chunk65GNHOD4cjs.deserializeLayers.call(void 0, data.layers, {
8286
+ const storedPatterns = _chunkYAFS2QFZcjs.deserializePatterns.call(void 0, data.patterns, []);
8287
+ s.layers = _chunkYAFS2QFZcjs.deserializeLayers.call(void 0, data.layers, {
8288
8288
  assets: _nullishCoalesce(data.assets, () => ( {})),
8289
8289
  problems,
8290
8290
  smartContents: Array.isArray(data.smartContents) ? data.smartContents : [],
@@ -8302,7 +8302,7 @@ var ImageEditorController = (_class7 = class {
8302
8302
  const light = data.globalLight;
8303
8303
  if (light && Number.isFinite(light.angle) && Number.isFinite(light.altitude)) s.globalLight = { angle: light.angle, altitude: Math.min(90, Math.max(0, light.altitude)) };
8304
8304
  else delete s.globalLight;
8305
- const patterns = _chunk65GNHOD4cjs.deserializePatterns.call(void 0, data.patterns, problems);
8305
+ const patterns = _chunkYAFS2QFZcjs.deserializePatterns.call(void 0, data.patterns, problems);
8306
8306
  if (patterns.length) s.patterns = patterns;
8307
8307
  else delete s.patterns;
8308
8308
  if (data.bitDepth === 16 || data.bitDepth === 32) s.bitDepth = data.bitDepth;
@@ -8318,7 +8318,7 @@ var ImageEditorController = (_class7 = class {
8318
8318
  }
8319
8319
  } else {
8320
8320
  const { width, height } = this.naturalSize;
8321
- const stack = _chunk65GNHOD4cjs.layersFromLegacy.call(void 0, data, width, height);
8321
+ const stack = _chunkYAFS2QFZcjs.layersFromLegacy.call(void 0, data, width, height);
8322
8322
  s.layers = stack.layers;
8323
8323
  s.outputOpacity = stack.outputOpacity;
8324
8324
  if (stack.legacyOutputBlur !== void 0) s.legacyOutputBlur = stack.legacyOutputBlur;
@@ -8339,7 +8339,7 @@ var ImageEditorController = (_class7 = class {
8339
8339
  }
8340
8340
  serializeState() {
8341
8341
  const { width, height } = this.naturalSize;
8342
- const view = _chunk65GNHOD4cjs.legacyView.call(void 0, this.stack(), width, height, null);
8342
+ const view = _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, null);
8343
8343
  if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _330 => _330.state, 'access', _331 => _331.patterns, 'optionalAccess', _332 => _332.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
8344
8344
  return {
8345
8345
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
@@ -8354,9 +8354,9 @@ var ImageEditorController = (_class7 = class {
8354
8354
  annotations: JSON.parse(JSON.stringify(view.annotations))
8355
8355
  };
8356
8356
  }
8357
- const { layers, assets, smartContents } = _chunk65GNHOD4cjs.serializeLayers.call(void 0, this.state.layers);
8357
+ const { layers, assets, smartContents } = _chunkYAFS2QFZcjs.serializeLayers.call(void 0, this.state.layers);
8358
8358
  const out = {
8359
- version: _chunk65GNHOD4cjs.LAYERED_SCHEMA_VERSION,
8359
+ version: _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION,
8360
8360
  width,
8361
8361
  height,
8362
8362
  layers,
@@ -8368,7 +8368,7 @@ var ImageEditorController = (_class7 = class {
8368
8368
  };
8369
8369
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
8370
8370
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
8371
- if (_optionalChain([this, 'access', _336 => _336.state, 'access', _337 => _337.patterns, 'optionalAccess', _338 => _338.length])) out.patterns = _chunk65GNHOD4cjs.serializePatterns.call(void 0, this.state.patterns);
8371
+ if (_optionalChain([this, 'access', _336 => _336.state, 'access', _337 => _337.patterns, 'optionalAccess', _338 => _338.length])) out.patterns = _chunkYAFS2QFZcjs.serializePatterns.call(void 0, this.state.patterns);
8372
8372
  if (smartContents) out.smartContents = smartContents;
8373
8373
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
8374
8374
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -8380,7 +8380,7 @@ function serializeAdjustments(adjustments) {
8380
8380
  const out = { ...adjustments };
8381
8381
  if (_optionalChain([out, 'access', _339 => _339.layers, 'optionalAccess', _340 => _340.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
8382
8382
  else delete out.layers;
8383
- if (_chunk65GNHOD4cjs.normalizeProcessVersion.call(void 0, out.process) === _chunk65GNHOD4cjs.LEGACY_PROCESS_VERSION) {
8383
+ if (_chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkYAFS2QFZcjs.LEGACY_PROCESS_VERSION) {
8384
8384
  delete out.process;
8385
8385
  if (!out.tint) delete out.tint;
8386
8386
  }
@@ -8391,7 +8391,7 @@ function withDevelop(layer, partial) {
8391
8391
  let i = filters.findIndex((f) => f.kind === "develop");
8392
8392
  if (i === -1) {
8393
8393
  filters.unshift({
8394
- id: layer.source === "document" ? _chunk65GNHOD4cjs.DEVELOP_FILTER_ID : _chunk65GNHOD4cjs.newLayerId.call(void 0, "flt"),
8394
+ id: layer.source === "document" ? _chunkYAFS2QFZcjs.DEVELOP_FILTER_ID : _chunkYAFS2QFZcjs.newLayerId.call(void 0, "flt"),
8395
8395
  kind: "develop",
8396
8396
  enabled: true,
8397
8397
  brightness: 0,
@@ -8400,7 +8400,7 @@ function withDevelop(layer, partial) {
8400
8400
  exposure: 0,
8401
8401
  temperature: 0,
8402
8402
  tint: 0,
8403
- process: _chunk65GNHOD4cjs.LATEST_PROCESS_VERSION
8403
+ process: _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION
8404
8404
  });
8405
8405
  i = 0;
8406
8406
  }
@@ -8409,7 +8409,7 @@ function withDevelop(layer, partial) {
8409
8409
  const v = partial[k];
8410
8410
  if (typeof v === "number" && Number.isFinite(v)) next[k] = v;
8411
8411
  }
8412
- if ("process" in partial) next.process = _chunk65GNHOD4cjs.normalizeProcessVersion.call(void 0, partial.process);
8412
+ if ("process" in partial) next.process = _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, partial.process);
8413
8413
  filters[i] = next;
8414
8414
  return { ...layer, filters };
8415
8415
  }
@@ -8418,7 +8418,7 @@ function withBlur(layer, radius) {
8418
8418
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
8419
8419
  if (radius > 0) {
8420
8420
  filters.push({
8421
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _344 => _344.id]), () => ( (layer.source === "document" ? _chunk65GNHOD4cjs.BLUR_FILTER_ID : _chunk65GNHOD4cjs.newLayerId.call(void 0, "flt")))),
8421
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _344 => _344.id]), () => ( (layer.source === "document" ? _chunkYAFS2QFZcjs.BLUR_FILTER_ID : _chunkYAFS2QFZcjs.newLayerId.call(void 0, "flt")))),
8422
8422
  kind: "blur",
8423
8423
  enabled: true,
8424
8424
  radius
@@ -8442,7 +8442,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8442
8442
  if (!update.mask) delete next.mask;
8443
8443
  else {
8444
8444
  const current = node.mask && !node.mask.source ? node.mask : null;
8445
- const memo = current ? _chunk65GNHOD4cjs.legacyMaskOf.call(void 0, current, width, height) : null;
8445
+ const memo = current ? _chunkYAFS2QFZcjs.legacyMaskOf.call(void 0, current, width, height) : null;
8446
8446
  if (current && memo && memo.width === update.mask.width && memo.height === update.mask.height && memo.rle === update.mask.rle) {
8447
8447
  next.mask = withMaskProps(current, {
8448
8448
  density: _nullishCoalesce(update.mask.density, () => ( 1)),
@@ -8450,7 +8450,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8450
8450
  enabled: update.mask.enabled !== false
8451
8451
  });
8452
8452
  } else {
8453
- const m = _chunk65GNHOD4cjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8453
+ const m = _chunkYAFS2QFZcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8454
8454
  if (m) next.mask = m;
8455
8455
  else delete next.mask;
8456
8456
  }
@@ -8489,7 +8489,7 @@ function resizeLegacyMasks(layers, from, to) {
8489
8489
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, layers)) {
8490
8490
  if (l.type !== "adjustment" || !l.mask || l.mask.source) continue;
8491
8491
  const old = l.mask;
8492
- const mask = _chunk65GNHOD4cjs.rasterMaskFromLegacy.call(void 0, _chunk65GNHOD4cjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8492
+ const mask = _chunkYAFS2QFZcjs.rasterMaskFromLegacy.call(void 0, _chunkYAFS2QFZcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8493
8493
  if (!mask) continue;
8494
8494
  out = _chunk24ATT2PEcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
8495
8495
  }
@@ -8585,12 +8585,12 @@ function withoutAnnotations(layers) {
8585
8585
  function parseColor(value) {
8586
8586
  if (Array.isArray(value)) {
8587
8587
  if (value.length < 3 || value.length > 4 || !value.every((v) => typeof v === "number" && v >= 0 && v <= 255)) {
8588
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8588
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8589
8589
  }
8590
8590
  return [Math.round(value[0]), Math.round(value[1]), Math.round(value[2]), Math.round(_nullishCoalesce(value[3], () => ( 255)))];
8591
8591
  }
8592
8592
  const m = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(String(value).trim());
8593
- if (!m) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8593
+ if (!m) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8594
8594
  let hex = m[1];
8595
8595
  if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
8596
8596
  const n = (i) => parseInt(hex.slice(i, i + 2), 16);
@@ -8600,7 +8600,7 @@ function readImagePaint(raw) {
8600
8600
  try {
8601
8601
  return _chunk6GFRKLLScjs.parsePaintSource.call(void 0, raw);
8602
8602
  } catch (e) {
8603
- if (e instanceof _chunk6GFRKLLScjs.PaintSourceError) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(e.message);
8603
+ if (e instanceof _chunk6GFRKLLScjs.PaintSourceError) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e.message);
8604
8604
  throw e;
8605
8605
  }
8606
8606
  }
@@ -8748,7 +8748,7 @@ function loadImageEditorDocument(input) {
8748
8748
  // Optional: only present when something was selected when saving.
8749
8749
  selection: {
8750
8750
  parse: (value) => {
8751
- const mask = _chunk65GNHOD4cjs.deserializeSelection.call(void 0, value);
8751
+ const mask = _chunkYAFS2QFZcjs.deserializeSelection.call(void 0, value);
8752
8752
  const v = value;
8753
8753
  return { width: mask.width, height: mask.height, rle: v.rle };
8754
8754
  },
@@ -8836,7 +8836,7 @@ function loadLayeredDocument(doc) {
8836
8836
  },
8837
8837
  selection: {
8838
8838
  parse: (value) => {
8839
- const mask = _chunk65GNHOD4cjs.deserializeSelection.call(void 0, value);
8839
+ const mask = _chunkYAFS2QFZcjs.deserializeSelection.call(void 0, value);
8840
8840
  const v = value;
8841
8841
  return { width: mask.width, height: mask.height, rle: v.rle };
8842
8842
  },
@@ -9230,14 +9230,14 @@ function describeSelection(mask) {
9230
9230
  // src/image-editor/selection-tools.ts
9231
9231
  var modeSchema = {
9232
9232
  type: "string",
9233
- enum: [..._chunk65GNHOD4cjs.SELECTION_MODES],
9233
+ enum: [..._chunkYAFS2QFZcjs.SELECTION_MODES],
9234
9234
  description: "How the result combines with the current selection (default replace)."
9235
9235
  };
9236
9236
  var num = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
9237
9237
  function summary(controller) {
9238
9238
  const sel = controller.getSelection();
9239
9239
  const { width, height } = controller.getState().imageDimensions;
9240
- const area = _chunk65GNHOD4cjs.selectionArea.call(void 0, sel);
9240
+ const area = _chunkYAFS2QFZcjs.selectionArea.call(void 0, sel);
9241
9241
  return {
9242
9242
  empty: !sel,
9243
9243
  bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _356 => _356.bounds]), () => ( null)),
@@ -9283,7 +9283,7 @@ function createImageSelectionTools(controller) {
9283
9283
  },
9284
9284
  annotations: writeAnnotations("Select a region", true),
9285
9285
  handler: ({ shape, x, y, width, height, mode, feather }) => {
9286
- const opts = { mode: _chunk65GNHOD4cjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9286
+ const opts = { mode: _chunkYAFS2QFZcjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9287
9287
  switch (shape) {
9288
9288
  case "all":
9289
9289
  controller.selectAll();
@@ -9336,7 +9336,7 @@ function createImageSelectionTools(controller) {
9336
9336
  annotations: writeAnnotations("Select by colour", true),
9337
9337
  handler: async ({ x, y, color, tolerance, contiguous, fuzziness, sampleMerged, sample, mode }) => {
9338
9338
  const common = {
9339
- mode: _chunk65GNHOD4cjs.parseSelectionMode.call(void 0, mode),
9339
+ mode: _chunkYAFS2QFZcjs.parseSelectionMode.call(void 0, mode),
9340
9340
  sampleMerged: sampleMerged === true,
9341
9341
  sample: _nullishCoalesce(sample, () => ( "composite"))
9342
9342
  };
@@ -9357,7 +9357,7 @@ function createImageSelectionTools(controller) {
9357
9357
  inputSchema: {
9358
9358
  type: "object",
9359
9359
  properties: {
9360
- op: { type: "string", enum: [..._chunk65GNHOD4cjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9360
+ op: { type: "string", enum: [..._chunkYAFS2QFZcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9361
9361
  radius: { type: "number", minimum: 0, maximum: 500, description: "Radius in pixels." }
9362
9362
  },
9363
9363
  required: ["op", "radius"],
@@ -9365,7 +9365,7 @@ function createImageSelectionTools(controller) {
9365
9365
  },
9366
9366
  annotations: writeAnnotations("Modify the selection"),
9367
9367
  handler: ({ op, radius }) => {
9368
- if (!_chunk65GNHOD4cjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9368
+ if (!_chunkYAFS2QFZcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9369
9369
  if (!controller.getSelection()) throw new Error("Nothing is selected.");
9370
9370
  controller.modifySelection(op, Math.min(500, Math.max(0, num(radius, 0))));
9371
9371
  return summary(controller);
@@ -9409,7 +9409,7 @@ function createImageSelectionTools(controller) {
9409
9409
  type: "object",
9410
9410
  properties: {
9411
9411
  layerId: { type: "string", description: "Existing adjustment layer to mask." },
9412
- kind: { type: "string", enum: _chunk65GNHOD4cjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9412
+ kind: { type: "string", enum: _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9413
9413
  params: { type: "object", description: "Parameters for the new layer (see list_controls)." },
9414
9414
  density: { type: "number", minimum: 0, maximum: 1, description: "Mask density 0-1." },
9415
9415
  feather: { type: "number", minimum: 0, maximum: 1e3, description: "Mask feather in pixels." }
@@ -9429,11 +9429,11 @@ function createImageSelectionTools(controller) {
9429
9429
  if (!controller.getAdjustmentLayer(layerId)) throw new Error(`No adjustment layer "${layerId}".`);
9430
9430
  controller.applySelectionAsLayerMask(layerId, props);
9431
9431
  id = layerId;
9432
- } else if (_chunk65GNHOD4cjs.isAdjustmentKind.call(void 0, kind)) {
9432
+ } else if (_chunkYAFS2QFZcjs.isAdjustmentKind.call(void 0, kind)) {
9433
9433
  id = controller.addAdjustmentLayer({
9434
9434
  kind,
9435
9435
  params,
9436
- mask: _chunk65GNHOD4cjs.layerMaskFromSelection.call(void 0, sel, props)
9436
+ mask: _chunkYAFS2QFZcjs.layerMaskFromSelection.call(void 0, sel, props)
9437
9437
  });
9438
9438
  } else {
9439
9439
  throw new Error("Pass layerId (an existing layer) or kind (a new adjustment layer).");
@@ -9570,11 +9570,11 @@ function createImageEditTools(controller) {
9570
9570
  const geometry2 = () => {
9571
9571
  const s = controller.getState();
9572
9572
  const region = _nullishCoalesce(s.crop, () => ( { x: 0, y: 0, ...s.imageDimensions }));
9573
- const out = _chunk65GNHOD4cjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9573
+ const out = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9574
9574
  return {
9575
9575
  image: { ...s.imageDimensions },
9576
9576
  crop: s.crop ? { ...s.crop } : null,
9577
- rotation: _chunk65GNHOD4cjs.normalizeAngle.call(void 0, s.transform.rotate),
9577
+ rotation: _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, s.transform.rotate),
9578
9578
  flipH: s.transform.flipH,
9579
9579
  flipV: s.transform.flipV,
9580
9580
  output: { width: Math.round(out.width), height: Math.round(out.height) }
@@ -9809,7 +9809,7 @@ function describeLayer(layer, activeId, boundsOf) {
9809
9809
  const out = {
9810
9810
  id: layer.id,
9811
9811
  type: layer.type,
9812
- name: layer.name || (layer.type === "adjustment" ? _chunk65GNHOD4cjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9812
+ name: layer.name || (layer.type === "adjustment" ? _chunkYAFS2QFZcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9813
9813
  visible: layer.visible,
9814
9814
  opacity: round3(layer.opacity),
9815
9815
  blend: layer.blend,
@@ -9898,8 +9898,8 @@ function createImageLayerTools(controller) {
9898
9898
  };
9899
9899
  };
9900
9900
  const exists = (id, what = "layerId") => {
9901
- if (typeof id !== "string" || !id) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9902
- _chunk65GNHOD4cjs.requireLayer.call(void 0, controller.getLayers(), id);
9901
+ if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9902
+ _chunkYAFS2QFZcjs.requireLayer.call(void 0, controller.getLayers(), id);
9903
9903
  return id;
9904
9904
  };
9905
9905
  const listLayers = {
@@ -9935,7 +9935,7 @@ function createImageLayerTools(controller) {
9935
9935
  handler: ({ layerId, target }) => {
9936
9936
  const id = exists(layerId);
9937
9937
  const layer = controller.getLayer(id);
9938
- if (target === "mask" && !layer.mask) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9938
+ if (target === "mask" && !layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9939
9939
  controller.setActiveLayer(id, _nullishCoalesce(target, () => ( "pixels")));
9940
9940
  return { layer: describe(id), activeTarget: controller.getState().activeTarget };
9941
9941
  }
@@ -9960,7 +9960,7 @@ function createImageLayerTools(controller) {
9960
9960
  },
9961
9961
  annotations: { title: "Add a pixel layer", ...WRITE2 },
9962
9962
  handler: async (args) => {
9963
- if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give color or image, not both.");
9963
+ if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give color or image, not both.");
9964
9964
  for (const k of ["aboveId", "belowId", "parentId"]) if (args[k] !== void 0) exists(args[k], k);
9965
9965
  const init = {
9966
9966
  name: args.name,
@@ -10050,7 +10050,7 @@ function createImageLayerTools(controller) {
10050
10050
  const id = exists(args.layerId);
10051
10051
  const props = {};
10052
10052
  for (const k of ["name", "visible", "opacity", "fillOpacity", "blend", "clipped", "locks", "collapsed"]) if (args[k] !== void 0) props[k] = args[k];
10053
- if (!Object.keys(props).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give at least one property to change.");
10053
+ if (!Object.keys(props).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one property to change.");
10054
10054
  controller.setLayerProperties(id, props);
10055
10055
  return { layer: describe(id) };
10056
10056
  }
@@ -10144,8 +10144,8 @@ function createImageLayerTools(controller) {
10144
10144
  annotations: { title: "Move a layer's pixels", ...WRITE2 },
10145
10145
  handler: ({ layerId, x, y, dx, dy }) => {
10146
10146
  const id = exists(layerId);
10147
- if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give x and y, or dx and dy.");
10148
- if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give x / y or dx / dy, not both.");
10147
+ if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give x and y, or dx and dy.");
10148
+ if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
10149
10149
  return { layerId: id, ...controller.offsetLayer(id, { x, y, dx, dy }) };
10150
10150
  }
10151
10151
  };
@@ -10217,7 +10217,7 @@ function createImageLayerTools(controller) {
10217
10217
  annotations: { title: "Set layer mask properties", ...WRITE_IDEMPOTENT2 },
10218
10218
  handler: ({ layerId, density, feather, enabled, linked }) => {
10219
10219
  const id = exists(layerId);
10220
- if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give density, feather, enabled or linked.");
10220
+ if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give density, feather, enabled or linked.");
10221
10221
  const mask = controller.setLayerMaskProps(id, {
10222
10222
  density,
10223
10223
  feather,
@@ -10300,7 +10300,7 @@ function createImageLayerTools(controller) {
10300
10300
  handler: (args) => {
10301
10301
  const id = exists(args.layerId);
10302
10302
  const changes = filterValues(args);
10303
- if (!Object.keys(changes).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give at least one value to change.");
10303
+ if (!Object.keys(changes).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one value to change.");
10304
10304
  return { layerId: id, filters: controller.updateLayerFilter(id, args.filterId, changes) };
10305
10305
  }
10306
10306
  };
@@ -10564,8 +10564,8 @@ function describeLayerEffects(effects) {
10564
10564
  }
10565
10565
  function createImageEffectTools(controller) {
10566
10566
  const layerArg = (id) => {
10567
- if (typeof id !== "string" || !id) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10568
- _chunk65GNHOD4cjs.requireLayer.call(void 0, controller.getLayers(), id);
10567
+ if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10568
+ _chunkYAFS2QFZcjs.requireLayer.call(void 0, controller.getLayers(), id);
10569
10569
  return id;
10570
10570
  };
10571
10571
  const result = (layerId, extra = {}) => ({ layerId, ...extra, ...describeLayerEffects(controller.getLayerEffects(layerId)) });
@@ -10596,7 +10596,7 @@ function createImageEffectTools(controller) {
10596
10596
  annotations: { title: "Add a layer effect", ...WRITE3 },
10597
10597
  handler: ({ layerId, kind, settings, index }) => {
10598
10598
  const id = layerArg(layerId);
10599
- if (!_chunk24ATT2PEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`kind must be one of ${_chunk24ATT2PEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10599
+ if (!_chunk24ATT2PEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`kind must be one of ${_chunk24ATT2PEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10600
10600
  const { effect } = controller.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
10601
10601
  return result(id, { effectId: effect.id });
10602
10602
  }
@@ -10616,7 +10616,7 @@ function createImageEffectTools(controller) {
10616
10616
  handler: ({ layerId, effectId, settings }) => {
10617
10617
  const id = layerArg(layerId);
10618
10618
  const changes = _nullishCoalesce(settings, () => ( {}));
10619
- if (!Object.keys(changes).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give at least one setting to change.");
10619
+ if (!Object.keys(changes).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one setting to change.");
10620
10620
  controller.updateLayerEffect(id, effectId, changes);
10621
10621
  return result(id);
10622
10622
  }
@@ -10668,7 +10668,7 @@ function createImageEffectTools(controller) {
10668
10668
  },
10669
10669
  annotations: { title: "Set the global light", ...WRITE_IDEMPOTENT3 },
10670
10670
  handler: ({ angle, altitude }) => {
10671
- if (angle === void 0 && altitude === void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give angle, altitude or both.");
10671
+ if (angle === void 0 && altitude === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give angle, altitude or both.");
10672
10672
  const next = {};
10673
10673
  if (angle !== void 0) next.angle = angle;
10674
10674
  if (altitude !== void 0) next.altitude = altitude;
@@ -10857,7 +10857,7 @@ var PaintGesture = (_class8 = class {
10857
10857
  if (layer.type !== "pixel" && layer.type !== "shape" && layer.type !== "smart") throw new Error(`Only pixel, shape and smart object layers move; "${layer.name}" is a ${layer.type} layer.`);
10858
10858
  if (_optionalChain([layer, 'access', _370 => _370.locks, 'optionalAccess', _371 => _371.all]) || _optionalChain([layer, 'access', _372 => _372.locks, 'optionalAccess', _373 => _373.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
10859
10859
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
10860
- const b = _chunk65GNHOD4cjs.shapeGeometryBounds.call(void 0, layer);
10860
+ const b = _chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer);
10861
10861
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
10862
10862
  })();
10863
10863
  this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin, moved: false };
@@ -11015,9 +11015,9 @@ function createImagePaintTools(controller) {
11015
11015
  annotations: { title: "Paint a brush stroke", ...WRITE4 },
11016
11016
  handler: (args) => {
11017
11017
  const tool = args.tool;
11018
- if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11019
- if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11020
- if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give color or paint, not both.");
11018
+ if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11019
+ if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11020
+ if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give color or paint, not both.");
11021
11021
  const result = controller.paintStroke({
11022
11022
  tool,
11023
11023
  points: args.points,
@@ -11148,7 +11148,7 @@ function profileArg(v) {
11148
11148
  try {
11149
11149
  return _chunkDCLJNVZScjs.base64ToBytes.call(void 0, s.slice(4));
11150
11150
  } catch (e30) {
11151
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("The icc: value is not valid base64.");
11151
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The icc: value is not valid base64.");
11152
11152
  }
11153
11153
  }
11154
11154
  return s;
@@ -11213,10 +11213,10 @@ function createImageColorTools(controller) {
11213
11213
  annotations: { title: "Set up soft proofing", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11214
11214
  handler: (args) => {
11215
11215
  if (args.off === true) {
11216
- if (args.profile !== void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give either off true or a profile, not both.");
11216
+ if (args.profile !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give either off true or a profile, not both.");
11217
11217
  return controller.setProofSetup(null);
11218
11218
  }
11219
- if (args.profile === void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11219
+ if (args.profile === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11220
11220
  const s = controller.setProofSetup({
11221
11221
  profile: profileArg(args.profile),
11222
11222
  ...args.intent !== void 0 ? { intent: args.intent } : {},
@@ -11268,7 +11268,7 @@ function createImageColorTools(controller) {
11268
11268
  },
11269
11269
  annotations: { title: "Set the colour mode", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11270
11270
  handler: (args) => {
11271
- if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11271
+ if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11272
11272
  return controller.setColorMode(args.mode, {
11273
11273
  ...args.profile !== void 0 ? { profile: profileArg(args.profile) } : {},
11274
11274
  ...args.intent !== void 0 ? { intent: args.intent } : {}
@@ -11333,7 +11333,7 @@ function checkSource(controller, source) {
11333
11333
  const p = source;
11334
11334
  const { width, height } = controller.getState().imageDimensions;
11335
11335
  if (!(p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
11336
- throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11336
+ throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11337
11337
  }
11338
11338
  return p;
11339
11339
  }
@@ -11573,10 +11573,10 @@ function createImageRetouchTools(controller) {
11573
11573
  annotations: { title: "Set the clone source", ...WRITE5, idempotentHint: true },
11574
11574
  handler: (args) => {
11575
11575
  if (args.clear === true) {
11576
- if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give either clear true or x and y, not both.");
11576
+ if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give either clear true or x and y, not both.");
11577
11577
  return controller.setCloneSource(null);
11578
11578
  }
11579
- if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11579
+ if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11580
11580
  return controller.setCloneSource(checkSource(controller, { x: args.x, y: args.y }));
11581
11581
  }
11582
11582
  };
@@ -11597,11 +11597,11 @@ var DATA = {
11597
11597
  description: "The PSD or PSB file as base64 (a `data:` URL prefix is accepted)."
11598
11598
  };
11599
11599
  function psdBytesFromBase64(data) {
11600
- if (typeof data !== "string" || !data.trim()) throw new (0, _chunk65GNHOD4cjs.PsdError)("data is required: the PSD file as base64.");
11600
+ if (typeof data !== "string" || !data.trim()) throw new (0, _chunkYAFS2QFZcjs.PsdError)("data is required: the PSD file as base64.");
11601
11601
  const body = data.trim().replace(/^data:[^,]*;base64,/i, "");
11602
- if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunk65GNHOD4cjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11602
+ if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkYAFS2QFZcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11603
11603
  const bytes = _chunkDCLJNVZScjs.base64ToBytes.call(void 0, body);
11604
- if (bytes.length < 26) throw new (0, _chunk65GNHOD4cjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11604
+ if (bytes.length < 26) throw new (0, _chunkYAFS2QFZcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11605
11605
  return bytes;
11606
11606
  }
11607
11607
  function createImagePsdTools(controller) {
@@ -11612,7 +11612,7 @@ function createImagePsdTools(controller) {
11612
11612
  inputSchema: { type: "object", properties: { data: DATA }, required: ["data"], additionalProperties: false },
11613
11613
  annotations: { title: "Inspect a PSD", ...READ7 },
11614
11614
  handler: ({ data }) => {
11615
- const res = _chunk65GNHOD4cjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11615
+ const res = _chunkYAFS2QFZcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11616
11616
  return {
11617
11617
  width: res.width,
11618
11618
  height: res.height,
@@ -11699,7 +11699,7 @@ var GEOMETRY = {
11699
11699
  dy: { type: "number", description: "Move down after scaling and rotating, in document pixels (default 0)." },
11700
11700
  reference: {
11701
11701
  description: "Fixed point of scale, skew and rotate: an anchor of the frame (top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right; default center) or a document point {x, y}.",
11702
- anyOf: [{ type: "string", enum: _chunk65GNHOD4cjs.TRANSFORM_ANCHORS }, POINT]
11702
+ anyOf: [{ type: "string", enum: _chunkYAFS2QFZcjs.TRANSFORM_ANCHORS }, POINT]
11703
11703
  },
11704
11704
  matrix: {
11705
11705
  type: "array",
@@ -11720,14 +11720,14 @@ var NUMERIC = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "dx", "dy", "refe
11720
11720
  function geometryFrom(args) {
11721
11721
  const numeric = NUMERIC.filter((k) => args[k] !== void 0);
11722
11722
  const ways = [numeric.length > 0, args.matrix !== void 0, args.corners !== void 0].filter(Boolean).length;
11723
- if (ways === 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11724
- if (ways > 1) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11723
+ if (ways === 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11724
+ if (ways > 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11725
11725
  if (args.matrix !== void 0) return { matrix: args.matrix };
11726
11726
  if (args.corners !== void 0) return { corners: args.corners };
11727
11727
  const params = {};
11728
11728
  for (const k of NUMERIC) if (args[k] !== void 0) params[k] = args[k];
11729
- if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11730
- if (typeof params.reference === "string" && !_chunk65GNHOD4cjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunk65GNHOD4cjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11729
+ if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11730
+ if (typeof params.reference === "string" && !_chunkYAFS2QFZcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkYAFS2QFZcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11731
11731
  return { params };
11732
11732
  }
11733
11733
  function targetFrom(args) {
@@ -11776,15 +11776,15 @@ function createImageTransformTools(controller) {
11776
11776
  moved: [...s.moves],
11777
11777
  frame: { ...s.box },
11778
11778
  corners: s.startGeometry.corners.map(roundPoint),
11779
- center: roundPoint(_chunk65GNHOD4cjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11779
+ center: roundPoint(_chunkYAFS2QFZcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11780
11780
  };
11781
11781
  if (s.smartObject) out.smartObject = true;
11782
11782
  s.cancel();
11783
11783
  if (args.meshColumns !== void 0) {
11784
11784
  const cols = args.meshColumns;
11785
11785
  const rows = _nullishCoalesce(args.meshRows, () => ( cols));
11786
- const mesh = _chunkF7GGEAO2cjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11787
- out.mesh = { columns: cols, rows, pointsPerRow: _chunkF7GGEAO2cjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkF7GGEAO2cjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11786
+ const mesh = _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11787
+ out.mesh = { columns: cols, rows, pointsPerRow: _chunkZ2H7KECKcjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkZ2H7KECKcjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11788
11788
  }
11789
11789
  return out;
11790
11790
  }
@@ -11809,7 +11809,7 @@ function createImageTransformTools(controller) {
11809
11809
  type: "object",
11810
11810
  properties: {
11811
11811
  ...TARGET3,
11812
- style: { type: "string", enum: _chunkF7GGEAO2cjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11812
+ style: { type: "string", enum: _chunkZ2H7KECKcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11813
11813
  bend: { type: "number", minimum: -100, maximum: 100, description: "Preset bend in percent, \u2212100..100 (default 50)." },
11814
11814
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Preset horizontal distortion in percent, \u2212100..100 (default 0)." },
11815
11815
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Preset vertical distortion in percent, \u2212100..100 (default 0)." },
@@ -11831,11 +11831,11 @@ function createImageTransformTools(controller) {
11831
11831
  annotations: { title: "Warp a layer", ...WRITE6 },
11832
11832
  handler: (args) => {
11833
11833
  const hasPreset = ["style", "bend", "horizontal", "vertical", "orientation"].some((k) => args[k] !== void 0);
11834
- if (hasPreset && args.mesh !== void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11835
- if (!hasPreset && args.mesh === void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give a preset style or a mesh.");
11834
+ if (hasPreset && args.mesh !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11835
+ if (!hasPreset && args.mesh === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give a preset style or a mesh.");
11836
11836
  let warp;
11837
11837
  if (hasPreset) {
11838
- if (args.style === void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkF7GGEAO2cjs.WARP_STYLES.join(", ")}.`);
11838
+ if (args.style === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkZ2H7KECKcjs.WARP_STYLES.join(", ")}.`);
11839
11839
  warp = {
11840
11840
  style: args.style,
11841
11841
  bend: _nullishCoalesce(args.bend, () => ( 50)),
@@ -11846,7 +11846,7 @@ function createImageTransformTools(controller) {
11846
11846
  } else {
11847
11847
  const m = args.mesh;
11848
11848
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
11849
- if (m.points.length !== want) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
11849
+ if (m.points.length !== want) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
11850
11850
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
11851
11851
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
11852
11852
  }
@@ -11941,13 +11941,13 @@ function settingsFrom(args) {
11941
11941
  return out;
11942
11942
  }
11943
11943
  function imageArg(image) {
11944
- if (typeof image !== "string" || !image.trim()) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
11944
+ if (typeof image !== "string" || !image.trim()) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
11945
11945
  return image.trim();
11946
11946
  }
11947
11947
  function createImageSmartObjectTools(controller) {
11948
11948
  const smartId = (id) => {
11949
- if (typeof id !== "string" || !id) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
11950
- _chunk65GNHOD4cjs.requireSmartObject.call(void 0, controller.getLayers(), id);
11949
+ if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
11950
+ _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
11951
11951
  return id;
11952
11952
  };
11953
11953
  const info = (id) => {
@@ -11984,7 +11984,7 @@ function createImageSmartObjectTools(controller) {
11984
11984
  },
11985
11985
  annotations: { title: "Convert to Smart Object", ...WRITE7 },
11986
11986
  handler: ({ layerIds, name }) => {
11987
- for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunk65GNHOD4cjs.requireLayer.call(void 0, controller.getLayers(), id2);
11987
+ for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkYAFS2QFZcjs.requireLayer.call(void 0, controller.getLayers(), id2);
11988
11988
  const id = controller.convertToSmartObject(layerIds, { name });
11989
11989
  return { layer: layerSummary(id), smartObject: info(id) };
11990
11990
  }
@@ -12021,7 +12021,7 @@ function createImageSmartObjectTools(controller) {
12021
12021
  {
12022
12022
  type: "object",
12023
12023
  properties: {
12024
- style: { type: "string", enum: _chunkF7GGEAO2cjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12024
+ style: { type: "string", enum: _chunkZ2H7KECKcjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12025
12025
  bend: { type: "number", minimum: -100, maximum: 100, description: "Bend in percent (default 50)." },
12026
12026
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Horizontal distortion in percent (default 0)." },
12027
12027
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Vertical distortion in percent (default 0)." },
@@ -12057,12 +12057,12 @@ function createImageSmartObjectTools(controller) {
12057
12057
  else if (w) {
12058
12058
  const m = w;
12059
12059
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
12060
- if (m.points.length !== want) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
12060
+ if (m.points.length !== want) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
12061
12061
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
12062
12062
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
12063
12063
  }
12064
12064
  const keys = ["corners", "matrix", "scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y", "warp", "interpolation"];
12065
- if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12065
+ if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12066
12066
  const res = controller.setSmartObjectTransform(id, {
12067
12067
  corners: args.corners,
12068
12068
  matrix: args.matrix,
@@ -12187,7 +12187,7 @@ function createImageSmartObjectTools(controller) {
12187
12187
  handler: (args) => {
12188
12188
  const id = smartId(args.layerId);
12189
12189
  const changes = settingsFrom(args);
12190
- if (!Object.keys(changes).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give at least one value to change.");
12190
+ if (!Object.keys(changes).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one value to change.");
12191
12191
  const filter = controller.updateSmartFilter(id, args.filterId, changes);
12192
12192
  return { layerId: id, filter, smartFilters: info(id).smartFilters };
12193
12193
  }
@@ -12508,8 +12508,8 @@ function geometry(args) {
12508
12508
  }
12509
12509
  function createImageShapeTools(controller) {
12510
12510
  const shapeId = (id) => {
12511
- if (typeof id !== "string" || !id) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12512
- _chunk65GNHOD4cjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12511
+ if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12512
+ _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12513
12513
  return id;
12514
12514
  };
12515
12515
  const layerSummary = (id) => {
@@ -12584,7 +12584,7 @@ function createImageShapeTools(controller) {
12584
12584
  annotations: { title: "Restyle a shape", ...WRITE_IDEMPOTENT5 },
12585
12585
  handler: ({ layerId, fill, stroke, fillRule }) => {
12586
12586
  const id = shapeId(layerId);
12587
- if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12587
+ if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12588
12588
  return controller.setShapeStyle(id, { fill, stroke, fillRule });
12589
12589
  }
12590
12590
  };
@@ -12633,7 +12633,7 @@ function createImageShapeTools(controller) {
12633
12633
  handler: ({ layerId, componentIndex, ...rest }) => {
12634
12634
  const id = shapeId(layerId);
12635
12635
  const change = geometry(rest);
12636
- if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("Give shape, subpaths or op to change.");
12636
+ if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give shape, subpaths or op to change.");
12637
12637
  return controller.setShapeComponent(id, componentIndex, change);
12638
12638
  }
12639
12639
  };
@@ -12707,8 +12707,8 @@ function pick2(args, keys) {
12707
12707
  }
12708
12708
  function createImageTypeTools(controller) {
12709
12709
  const typeId = (id) => {
12710
- if (typeof id !== "string" || !id) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12711
- _chunk65GNHOD4cjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12710
+ if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12711
+ _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12712
12712
  return id;
12713
12713
  };
12714
12714
  const layerSummary = (id) => {
@@ -12788,7 +12788,7 @@ function createImageTypeTools(controller) {
12788
12788
  annotations: { title: "Style a range of text", ...WRITE_IDEMPOTENT6 },
12789
12789
  handler: (args) => {
12790
12790
  const style = pick2(args, Object.keys(STYLE));
12791
- if (!Object.keys(style).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12791
+ if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12792
12792
  return controller.setTextStyle(typeId(args.layerId), style, range(args));
12793
12793
  }
12794
12794
  };
@@ -12800,7 +12800,7 @@ function createImageTypeTools(controller) {
12800
12800
  annotations: { title: "Style paragraphs", ...WRITE_IDEMPOTENT6 },
12801
12801
  handler: (args) => {
12802
12802
  const style = pick2(args, Object.keys(PARAGRAPH));
12803
- if (!Object.keys(style).length) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12803
+ if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12804
12804
  return controller.setParagraphStyle(typeId(args.layerId), style, range(args));
12805
12805
  }
12806
12806
  };
@@ -12822,7 +12822,7 @@ function createImageTypeTools(controller) {
12822
12822
  annotations: { title: "Point or paragraph text", ...WRITE_IDEMPOTENT6 },
12823
12823
  handler: ({ layerId, kind, width, height }) => {
12824
12824
  const id = typeId(layerId);
12825
- if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunk65GNHOD4cjs.LayerOperationError)("kind box needs width and height in pixels.");
12825
+ if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("kind box needs width and height in pixels.");
12826
12826
  return controller.setTextFrame(id, kind === "box" ? { kind: "box", width, height } : { kind: "point" });
12827
12827
  }
12828
12828
  };
@@ -12844,7 +12844,7 @@ function createImageTypeTools(controller) {
12844
12844
  var LAYER_PATH = /^layers\.([^.]+)\.(.+)$/;
12845
12845
  function adjustmentsSummary(adjustments) {
12846
12846
  return {
12847
- process: _chunk65GNHOD4cjs.normalizeProcessVersion.call(void 0, adjustments.process),
12847
+ process: _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, adjustments.process),
12848
12848
  values: readAdjustmentControls(adjustments),
12849
12849
  layers: (_nullishCoalesce(adjustments.layers, () => ( []))).map((l) => JSON.parse(JSON.stringify(l)))
12850
12850
  };
@@ -12887,7 +12887,7 @@ function createImageEditorToolProvider(controller, options = {}) {
12887
12887
  default: def,
12888
12888
  ...requiresProcess ? { requiresProcess } : {}
12889
12889
  })),
12890
- layerKinds: _chunk65GNHOD4cjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12890
+ layerKinds: _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12891
12891
  kind,
12892
12892
  label,
12893
12893
  controls: [...ADJUSTMENT_LAYER_CONTROLS[kind], ADJUSTMENT_LAYER_OPACITY_CONTROL].map(({ id, label: l, min, max, step, default: def }) => ({
@@ -12973,7 +12973,7 @@ function createImageEditorToolProvider(controller, options = {}) {
12973
12973
  const result = { applied, clamped };
12974
12974
  if (typeof label === "string" && label) result.label = label;
12975
12975
  const notes = [];
12976
- if ("tint" in applied && _chunk65GNHOD4cjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
12976
+ if ("tint" in applied && _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
12977
12977
  notes.push("Tint has no effect on process 1 edits.");
12978
12978
  }
12979
12979
  if (notes.length) result.notes = notes;
@@ -12983,11 +12983,11 @@ function createImageEditorToolProvider(controller, options = {}) {
12983
12983
  const addLayer = {
12984
12984
  name: "add_adjustment_layer",
12985
12985
  title: "Add an adjustment layer",
12986
- description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunk65GNHOD4cjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
12986
+ description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
12987
12987
  inputSchema: {
12988
12988
  type: "object",
12989
12989
  properties: {
12990
- kind: { type: "string", enum: _chunk65GNHOD4cjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
12990
+ kind: { type: "string", enum: _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
12991
12991
  params: { type: "object", description: "Initial parameters (see list_controls); merged with neutral defaults." },
12992
12992
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Layer opacity 0-1 (default 1)." },
12993
12993
  blend: { type: "string", enum: _chunkJ5BA3BQ6cjs.BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal)." },
@@ -13006,7 +13006,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13006
13006
  openWorldHint: false
13007
13007
  },
13008
13008
  handler: ({ kind, params, opacity, blend, name, aboveId, parentId }) => {
13009
- if (!_chunk65GNHOD4cjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13009
+ if (!_chunkYAFS2QFZcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13010
13010
  if (blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, blend)) throw new Error(`Unknown blend mode "${blend}".`);
13011
13011
  if (aboveId !== void 0 && parentId !== void 0) throw new Error("Give aboveId or parentId, not both.");
13012
13012
  for (const ref of [aboveId, parentId]) {
@@ -13100,7 +13100,7 @@ function boxToCurvePoint(x, y, width, height) {
13100
13100
  return { input: clampLevel(x / (width || 1) * 255), output: clampLevel((height - y) / (height || 1) * 255) };
13101
13101
  }
13102
13102
  function curveSvgPath(points, width, height, samples = 64) {
13103
- const lut = _chunk65GNHOD4cjs.curveLutFromLevels.call(void 0, points);
13103
+ const lut = _chunkYAFS2QFZcjs.curveLutFromLevels.call(void 0, points);
13104
13104
  const n = lut.length - 1;
13105
13105
  let d = "";
13106
13106
  for (let i = 0; i <= samples; i++) {
@@ -13610,7 +13610,7 @@ var TextEditSession = (_class11 = class {
13610
13610
  else {
13611
13611
  const layout = this.layout();
13612
13612
  if (layout && layout.lines.length) {
13613
- const c = _chunkF7GGEAO2cjs.caretAt.call(void 0, layout, f);
13613
+ const c = _chunkZ2H7KECKcjs.caretAt.call(void 0, layout, f);
13614
13614
  const line = layout.lines[c.line];
13615
13615
  if (to === "home") f = line.start;
13616
13616
  else if (to === "end") {
@@ -13705,7 +13705,7 @@ var TextEditSession = (_class11 = class {
13705
13705
  styleHere() {
13706
13706
  const layer = this.layer;
13707
13707
  const at = this.start > 0 && this.start === this.end ? this.start - 1 : this.start;
13708
- return _chunkF7GGEAO2cjs.styleAt.call(void 0, layer.runs, at, _chunkF7GGEAO2cjs.DEFAULT_TEXT_STYLE);
13708
+ return _chunkZ2H7KECKcjs.styleAt.call(void 0, layer.runs, at, _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE);
13709
13709
  }
13710
13710
  info() {
13711
13711
  return this.controller.getTextLayer(this.layerId);
@@ -13714,8 +13714,8 @@ var TextEditSession = (_class11 = class {
13714
13714
  overlay() {
13715
13715
  const layer = this.layer;
13716
13716
  const layout = this.layout();
13717
- const m = _chunk65GNHOD4cjs.textMatrix.call(void 0, layer);
13718
- const at = (x, y) => _chunkF7GGEAO2cjs.applyMatrix.call(void 0, m, { x, y });
13717
+ const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer);
13718
+ const at = (x, y) => _chunkZ2H7KECKcjs.applyMatrix.call(void 0, m, { x, y });
13719
13719
  let frame = null;
13720
13720
  if (layer.frame.kind === "box") frame = [at(0, 0), at(layer.frame.width, 0), at(layer.frame.width, layer.frame.height), at(0, layer.frame.height)];
13721
13721
  else if (layout) {
@@ -13735,7 +13735,7 @@ var TextEditSession = (_class11 = class {
13735
13735
  selection.push([at(x0, top), at(x1, top), at(x1, bottom), at(x0, bottom)]);
13736
13736
  }
13737
13737
  }
13738
- const c = _chunkF7GGEAO2cjs.caretAt.call(void 0, layout, this.focus);
13738
+ const c = _chunkZ2H7KECKcjs.caretAt.call(void 0, layout, this.focus);
13739
13739
  return { caret: [at(c.x, c.top), at(c.x, c.bottom)], selection, frame };
13740
13740
  }
13741
13741
  /** Ends editing: an empty layer made for this session is deleted (as Photoshop does). Returns whether the layer remains. */
@@ -13750,7 +13750,7 @@ var TextEditSession = (_class11 = class {
13750
13750
  }
13751
13751
  if (this.layer.name === "Text" && this.changed) {
13752
13752
  try {
13753
- this.controller.setLayerProperties(this.layerId, { name: _chunk65GNHOD4cjs.typeLayerName.call(void 0, this.text) }, false);
13753
+ this.controller.setLayerProperties(this.layerId, { name: _chunkYAFS2QFZcjs.typeLayerName.call(void 0, this.text) }, false);
13754
13754
  } catch (e32) {
13755
13755
  }
13756
13756
  }
@@ -13761,8 +13761,8 @@ function typeLayerAt(controller, p, slop = 4) {
13761
13761
  const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
13762
13762
  for (const l of layers) {
13763
13763
  if (!l.visible) continue;
13764
- const inv = invert(_chunk65GNHOD4cjs.textMatrix.call(void 0, l));
13765
- const q = _chunkF7GGEAO2cjs.applyMatrix.call(void 0, inv, p);
13764
+ const inv = invert(_chunkYAFS2QFZcjs.textMatrix.call(void 0, l));
13765
+ const q = _chunkZ2H7KECKcjs.applyMatrix.call(void 0, inv, p);
13766
13766
  let b = null;
13767
13767
  if (l.frame.kind === "box") b = { x: 0, y: 0, width: l.frame.width, height: l.frame.height };
13768
13768
  else {
@@ -13872,7 +13872,7 @@ function layerPanelRows(layers, activeId) {
13872
13872
  }
13873
13873
  function layerLabel(layer) {
13874
13874
  if (layer.name) return layer.name;
13875
- if (layer.type === "adjustment") return _chunk65GNHOD4cjs.adjustmentKindLabel.call(void 0, layer.kind);
13875
+ if (layer.type === "adjustment") return _chunkYAFS2QFZcjs.adjustmentKindLabel.call(void 0, layer.kind);
13876
13876
  return layer.type === "group" ? "Group" : "Layer";
13877
13877
  }
13878
13878
  function layerBadge(layer) {
@@ -14344,7 +14344,7 @@ var FREE_TRANSFORM_MODE_OPTIONS = [
14344
14344
  ];
14345
14345
  var WARP_STYLE_OPTIONS = [
14346
14346
  { id: "custom", label: "Custom" },
14347
- ..._chunkF7GGEAO2cjs.WARP_STYLES.map((id) => ({ id, label: _chunkF7GGEAO2cjs.WARP_STYLE_LABELS[id] }))
14347
+ ..._chunkZ2H7KECKcjs.WARP_STYLES.map((id) => ({ id, label: _chunkZ2H7KECKcjs.WARP_STYLE_LABELS[id] }))
14348
14348
  ];
14349
14349
  var WARP_GRID_OPTIONS = [
14350
14350
  { id: "1x1", label: "Default", columns: 1, rows: 1 },
@@ -14480,7 +14480,7 @@ var FreeTransformTool = (_class13 = class {
14480
14480
  setMode(mode) {
14481
14481
  this.modeValue = mode;
14482
14482
  const s = this.session;
14483
- if (mode === "warp" && s && !this.mesh) this.mesh = _chunkF7GGEAO2cjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14483
+ if (mode === "warp" && s && !this.mesh) this.mesh = _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14484
14484
  this.changed();
14485
14485
  }
14486
14486
  /** The Warp options bar's settings. */
@@ -14502,13 +14502,13 @@ var FreeTransformTool = (_class13 = class {
14502
14502
  this.modeValue = "warp";
14503
14503
  const next = { ...this.warpSettings, ...changes };
14504
14504
  this.warpSettings = next;
14505
- let mesh = _nullishCoalesce(this.mesh, () => ( _chunkF7GGEAO2cjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14505
+ let mesh = _nullishCoalesce(this.mesh, () => ( _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14506
14506
  if (next.style !== "custom" && ("style" in changes || "bend" in changes || "horizontal" in changes || "vertical" in changes || "orientation" in changes)) {
14507
14507
  const preset = { style: next.style, bend: next.bend, horizontal: next.horizontal, vertical: next.vertical, orientation: next.orientation };
14508
- mesh = _nullishCoalesce(_chunkF7GGEAO2cjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkF7GGEAO2cjs.identityWarpMesh.call(void 0, s.box)));
14509
- mesh = _chunkF7GGEAO2cjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14508
+ mesh = _nullishCoalesce(_chunkZ2H7KECKcjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box)));
14509
+ mesh = _chunkZ2H7KECKcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14510
14510
  }
14511
- if ("columns" in changes || "rows" in changes) mesh = _chunkF7GGEAO2cjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14511
+ if ("columns" in changes || "rows" in changes) mesh = _chunkZ2H7KECKcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14512
14512
  this.mesh = mesh;
14513
14513
  this.changed();
14514
14514
  this.preview();
@@ -14555,11 +14555,11 @@ var FreeTransformTool = (_class13 = class {
14555
14555
  const m = this.mesh;
14556
14556
  const at = (p) => _nullishCoalesce(_chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p), () => ( p));
14557
14557
  const pts = m.points.map(at);
14558
- const edit = _chunkF7GGEAO2cjs.warpMeshEditPoints.call(void 0, m);
14558
+ const edit = _chunkZ2H7KECKcjs.warpMeshEditPoints.call(void 0, m);
14559
14559
  out.handles = [];
14560
- out.outline = _chunkF7GGEAO2cjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14560
+ out.outline = _chunkZ2H7KECKcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14561
14561
  out.warp = {
14562
- curves: _chunkF7GGEAO2cjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14562
+ curves: _chunkZ2H7KECKcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14563
14563
  anchors: edit.anchors.map((i) => pts[i]),
14564
14564
  handles: edit.handles.map((e) => ({ point: pts[e.index], anchor: pts[e.anchor] }))
14565
14565
  };
@@ -14583,7 +14583,7 @@ var FreeTransformTool = (_class13 = class {
14583
14583
  if (!o) return null;
14584
14584
  if (this.modeValue === "warp" && this.mesh) {
14585
14585
  const h = this.homography();
14586
- const edit = _chunkF7GGEAO2cjs.warpMeshEditPoints.call(void 0, this.mesh);
14586
+ const edit = _chunkZ2H7KECKcjs.warpMeshEditPoints.call(void 0, this.mesh);
14587
14587
  let best2 = -1;
14588
14588
  let bestD2 = tolerance;
14589
14589
  for (const i of [...edit.anchors, ...edit.handles.map((e) => e.index)]) {
@@ -14628,7 +14628,7 @@ var FreeTransformTool = (_class13 = class {
14628
14628
  if (this.modeValue === "warp" && this.mesh && handle === "inside") {
14629
14629
  const q = this.toFrame(p, this.corners);
14630
14630
  if (q) {
14631
- const r = _chunkF7GGEAO2cjs.warpMeshParamAt.call(void 0, this.mesh, q);
14631
+ const r = _chunkZ2H7KECKcjs.warpMeshParamAt.call(void 0, this.mesh, q);
14632
14632
  st = { s: r.s, t: r.t };
14633
14633
  }
14634
14634
  }
@@ -14661,8 +14661,8 @@ var FreeTransformTool = (_class13 = class {
14661
14661
  if (!a || !b) return;
14662
14662
  const delta = { x: b.x - a.x, y: b.y - a.y };
14663
14663
  const i = meshIndex(d.handle);
14664
- if (i >= 0) this.mesh = _chunkF7GGEAO2cjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14665
- else if (d.handle === "inside" && d.st) this.mesh = _chunkF7GGEAO2cjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14664
+ if (i >= 0) this.mesh = _chunkZ2H7KECKcjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14665
+ else if (d.handle === "inside" && d.st) this.mesh = _chunkZ2H7KECKcjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14666
14666
  else return;
14667
14667
  this.warpSettings = { ...this.warpSettings, style: "custom" };
14668
14668
  this.changed();
@@ -14786,7 +14786,7 @@ var FreeTransformTool = (_class13 = class {
14786
14786
  bar() {
14787
14787
  const s = this.session;
14788
14788
  if (!s || !this.corners) return null;
14789
- const read = _chunk65GNHOD4cjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14789
+ const read = _chunkYAFS2QFZcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14790
14790
  return {
14791
14791
  affine: read.affine,
14792
14792
  x: _nullishCoalesce(this.typed.x, () => ( read.x)),
@@ -14811,7 +14811,7 @@ var FreeTransformTool = (_class13 = class {
14811
14811
  this.changed();
14812
14812
  return;
14813
14813
  }
14814
- const m = _chunk65GNHOD4cjs.matrixFromParams.call(void 0, s.box, {
14814
+ const m = _chunkYAFS2QFZcjs.matrixFromParams.call(void 0, s.box, {
14815
14815
  scaleX: next.scaleX,
14816
14816
  scaleY: next.scaleY,
14817
14817
  rotate: next.rotate,
@@ -14821,7 +14821,7 @@ var FreeTransformTool = (_class13 = class {
14821
14821
  dx: next.x - this.refBox.x,
14822
14822
  dy: next.y - this.refBox.y
14823
14823
  });
14824
- this.setCorners(_chunk65GNHOD4cjs.cornersFromMatrix.call(void 0, s.box, m));
14824
+ this.setCorners(_chunkYAFS2QFZcjs.cornersFromMatrix.call(void 0, s.box, m));
14825
14825
  this.typed = { scaleX: next.scaleX, scaleY: next.scaleY, rotate: next.rotate, skewX: next.skewX, skewY: next.skewY, x: next.x, y: next.y };
14826
14826
  this.changed();
14827
14827
  }
@@ -15914,5 +15914,5 @@ function createImageEffectsToolProvider(controller, options = {}) {
15914
15914
 
15915
15915
 
15916
15916
 
15917
- exports.ADJUSTMENT_KEYS = _chunk65GNHOD4cjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunk65GNHOD4cjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunk65GNHOD4cjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunk65GNHOD4cjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunk65GNHOD4cjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunk65GNHOD4cjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkJ5BA3BQ6cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkJ5BA3BQ6cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunk65GNHOD4cjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkFHPVDTI2cjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkG5NMLUVFcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkZ6OUCS2Kcjs.BrushstrokeCache; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunk6GFRKLLScjs.CoverageMap; exports.D50 = _chunk65GNHOD4cjs.D50; exports.D65 = _chunk65GNHOD4cjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkF7GGEAO2cjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunk6GFRKLLScjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunk6GFRKLLScjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkFHPVDTI2cjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunk65GNHOD4cjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunk6GFRKLLScjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkNVTHUPJ6cjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunk6GFRKLLScjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkF7GGEAO2cjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkFHPVDTI2cjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkFHPVDTI2cjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunk65GNHOD4cjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunk24ATT2PEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkFHPVDTI2cjs.DRY_EPS; exports.DabWalker = _chunk6GFRKLLScjs.DabWalker; exports.EMPTY_DISTANCE = _chunk65GNHOD4cjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunk6GFRKLLScjs.EMPTY_MIXER_LOAD; exports.EX = _chunkFHPVDTI2cjs.EX; exports.EY = _chunkFHPVDTI2cjs.EY; exports.FLAG_ALIVE = _chunkFHPVDTI2cjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkFHPVDTI2cjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkFHPVDTI2cjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkFHPVDTI2cjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkFHPVDTI2cjs.FLAG_TOP; exports.FLAG_WET = _chunkFHPVDTI2cjs.FLAG_WET; exports.FLAT = _chunkFHPVDTI2cjs.FLAT; exports.FREE_INTERVAL = _chunkFHPVDTI2cjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunk65GNHOD4cjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkFHPVDTI2cjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunk65GNHOD4cjs.HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = _chunk65GNHOD4cjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.INTENTS = _chunkG5NMLUVFcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunk24ATT2PEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunk65GNHOD4cjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunk65GNHOD4cjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunk24ATT2PEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunk65GNHOD4cjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunk65GNHOD4cjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunk65GNHOD4cjs.LUMA_709; exports.LayerCompositor = _chunk65GNHOD4cjs.LayerCompositor; exports.LayerEffectError = _chunk24ATT2PEcjs.LayerEffectError; exports.LayerOperationError = _chunk65GNHOD4cjs.LayerOperationError; exports.MAX_BATCH = _chunkFHPVDTI2cjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunk6GFRKLLScjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunk24ATT2PEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunk65GNHOD4cjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkFHPVDTI2cjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunk24ATT2PEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkFHPVDTI2cjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkFHPVDTI2cjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunk65GNHOD4cjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunk65GNHOD4cjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunk6GFRKLLScjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunk6GFRKLLScjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunk6GFRKLLScjs.MIXING_MODELS; exports.MixerStroke = _chunk6GFRKLLScjs.MixerStroke; exports.OPP = _chunkFHPVDTI2cjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkJ5BA3BQ6cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunk6GFRKLLScjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunk6GFRKLLScjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunk6GFRKLLScjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkFHPVDTI2cjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunk65GNHOD4cjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkFHPVDTI2cjs.PARAM; exports.PARAM_FLOATS = _chunkFHPVDTI2cjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunk65GNHOD4cjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkJ5BA3BQ6cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkFHPVDTI2cjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkFHPVDTI2cjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkJ5BA3BQ6cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkFHPVDTI2cjs.PLANE; exports.PLANE_BYTES = _chunkFHPVDTI2cjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunk65GNHOD4cjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkFHPVDTI2cjs.P_D0; exports.P_EDGE = _chunkFHPVDTI2cjs.P_EDGE; exports.P_FX = _chunkFHPVDTI2cjs.P_FX; exports.P_FY = _chunkFHPVDTI2cjs.P_FY; exports.P_H = _chunkFHPVDTI2cjs.P_H; exports.P_P0 = _chunkFHPVDTI2cjs.P_P0; exports.P_RHO = _chunkFHPVDTI2cjs.P_RHO; exports.P_SW = _chunkFHPVDTI2cjs.P_SW; exports.P_UX = _chunkFHPVDTI2cjs.P_UX; exports.P_UY = _chunkFHPVDTI2cjs.P_UY; exports.PaintExchange = _chunk6GFRKLLScjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunk6GFRKLLScjs.PaintGradientSampler; exports.PaintSourceError = _chunk6GFRKLLScjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunk24ATT2PEcjs.PatternPlacement; exports.PatternTile = _chunk24ATT2PEcjs.PatternTile; exports.PsdError = _chunk65GNHOD4cjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkNVTHUPJ6cjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkNVTHUPJ6cjs.RegionPixelSource; exports.RetouchDabStroke = _chunkNVTHUPJ6cjs.RetouchDabStroke; exports.SELECTION_MODES = _chunk65GNHOD4cjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunk65GNHOD4cjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkFHPVDTI2cjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkJ5BA3BQ6cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunk65GNHOD4cjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunk65GNHOD4cjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkFHPVDTI2cjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkFHPVDTI2cjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkFHPVDTI2cjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunk65GNHOD4cjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkNVTHUPJ6cjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkFHPVDTI2cjs.SRGB_TO_LINEAR; exports.STRIP = _chunkFHPVDTI2cjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunk65GNHOD4cjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk6GFRKLLScjs.SmudgeTip; exports.StrokeCoverage = _chunk6GFRKLLScjs.StrokeCoverage; exports.SurfaceDraft = _chunkJ5BA3BQ6cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunk65GNHOD4cjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunk65GNHOD4cjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunk65GNHOD4cjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkJ5BA3BQ6cjs.TILE; exports.TILE_SHIFT = _chunkJ5BA3BQ6cjs.TILE_SHIFT; exports.TINT_SCALE = _chunk65GNHOD4cjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunk6GFRKLLScjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunk65GNHOD4cjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkNVTHUPJ6cjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunk65GNHOD4cjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk6GFRKLLScjs.TileMedium; exports.TilePixelSource = _chunkNVTHUPJ6cjs.TilePixelSource; exports.TiledSurface = _chunkJ5BA3BQ6cjs.TiledSurface; exports.TransformTooLargeError = _chunk24ATT2PEcjs.TransformTooLargeError; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkFHPVDTI2cjs.U_MAX; exports.VIBRANCE_GREY = _chunk65GNHOD4cjs.VIBRANCE_GREY; exports.W9 = _chunkFHPVDTI2cjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkF7GGEAO2cjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkF7GGEAO2cjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkFHPVDTI2cjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkFHPVDTI2cjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkFHPVDTI2cjs.WET_TILE; exports.WGSL_HALO = _chunkFHPVDTI2cjs.WGSL_HALO; exports.WGSL_SHADE = _chunkFHPVDTI2cjs.WGSL_SHADE; exports.WGSL_STEP = _chunkFHPVDTI2cjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkFHPVDTI2cjs.WetGpuEngine; exports.WetMedium = _chunkFHPVDTI2cjs.WetMedium; exports.WetWorkerPool = _chunkFHPVDTI2cjs.WetWorkerPool; exports.WetWorld = _chunkFHPVDTI2cjs.WetWorld; exports.WetWorldError = _chunkFHPVDTI2cjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunk65GNHOD4cjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunk643B2HKCcjs.ZlibError; exports.activeAdjustmentLayers = _chunk65GNHOD4cjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunk65GNHOD4cjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunk65GNHOD4cjs.activeSmartFilters; exports.addLayerEffect = _chunk65GNHOD4cjs.addLayerEffect; exports.addLayerFilter = _chunk65GNHOD4cjs.addLayerFilter; exports.addPaintGradientStop = _chunk6GFRKLLScjs.addPaintGradientStop; exports.addSmartFilter = _chunk65GNHOD4cjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunk65GNHOD4cjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunk65GNHOD4cjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunk65GNHOD4cjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunk65GNHOD4cjs.adjustmentNodeFromLegacy; exports.adler32 = _chunk643B2HKCcjs.adler32; exports.anchorPoint = _chunk65GNHOD4cjs.anchorPoint; exports.annotationBlend = _chunk65GNHOD4cjs.annotationBlend; exports.annotationLayerFor = _chunk65GNHOD4cjs.annotationLayerFor; exports.annotationLayerName = _chunk65GNHOD4cjs.annotationLayerName; exports.annotationOfLayer = _chunk65GNHOD4cjs.annotationOfLayer; exports.annotationOfShape = _chunk65GNHOD4cjs.annotationOfShape; exports.annotationOfType = _chunk65GNHOD4cjs.annotationOfType; exports.applyAdjustmentLayers = _chunk65GNHOD4cjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunk65GNHOD4cjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunk65GNHOD4cjs.applyAdjustments; exports.applyBoxBlur = _chunk65GNHOD4cjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunk65GNHOD4cjs.applyBoxBlurFloat; exports.applyDepthMask = _chunk65GNHOD4cjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunk65GNHOD4cjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunk65GNHOD4cjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunk65GNHOD4cjs.applyLegacyFloat; exports.applyMatrix3 = _chunk65GNHOD4cjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunk65GNHOD4cjs.applyParams; exports.applyProcess2Adjustments = _chunk65GNHOD4cjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunk65GNHOD4cjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkNVTHUPJ6cjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunk65GNHOD4cjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunk6GFRKLLScjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunk6GFRKLLScjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkNVTHUPJ6cjs.applyToneToDeepTile; exports.backgroundLayer = _chunk65GNHOD4cjs.backgroundLayer; exports.base64ToBytes = _chunkDCLJNVZScjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkNVTHUPJ6cjs.bestOffset; exports.blackWhiteGray = _chunk65GNHOD4cjs.blackWhiteGray; exports.blendChannel = _chunkJ5BA3BQ6cjs.blendChannel; exports.blendImageData = _chunkJ5BA3BQ6cjs.blendImageData; exports.blendLum = _chunkJ5BA3BQ6cjs.blendLum; exports.blendPixel = _chunkJ5BA3BQ6cjs.blendPixel; exports.blendRadius = _chunk6GFRKLLScjs.blendRadius; exports.blendRgb = _chunkJ5BA3BQ6cjs.blendRgb; exports.blendTile = _chunk24ATT2PEcjs.blendTile; exports.blenderDab = _chunk6GFRKLLScjs.blenderDab; exports.blurFilter = _chunk65GNHOD4cjs.blurFilter; exports.borderCoverage = _chunk65GNHOD4cjs.borderCoverage; exports.boxBlurPixels = _chunkNVTHUPJ6cjs.boxBlurPixels; exports.boxMean = boxMean; exports.boxPointOf = _chunk65GNHOD4cjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunk65GNHOD4cjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkZ6OUCS2Kcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkZ6OUCS2Kcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkZ6OUCS2Kcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkSYPFUL5Bcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkZ6OUCS2Kcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkZ6OUCS2Kcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunk65GNHOD4cjs.buildLayerMaskPlanes; exports.buildToneLut = _chunk65GNHOD4cjs.buildToneLut; exports.builtinPattern = _chunk24ATT2PEcjs.builtinPattern; exports.builtinPatternIds = _chunk24ATT2PEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkDCLJNVZScjs.bytesToBase64; exports.calculateCropDrag = _chunk65GNHOD4cjs.calculateCropDrag; exports.canShareMemory = _chunkFHPVDTI2cjs.canShareMemory; exports.canvasCompositeOperation = _chunkJ5BA3BQ6cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunk65GNHOD4cjs.canvasToImagePoint; exports.caretAt = _chunkF7GGEAO2cjs.caretAt; exports.changedTiles = _chunk24ATT2PEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunk65GNHOD4cjs.clampCropToImage; exports.cleanMixer = _chunk6GFRKLLScjs.cleanMixer; exports.cloneSourceLabel = cloneSourceLabel; exports.collectTiles = _chunkJ5BA3BQ6cjs.collectTiles; exports.colorBalanceChannel = _chunk65GNHOD4cjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunk65GNHOD4cjs.combineSelections; exports.compileAdjustmentLayer = _chunk65GNHOD4cjs.compileAdjustmentLayer; exports.componentPath = _chunk65GNHOD4cjs.componentPath; exports.compositeDeep = _chunk65GNHOD4cjs.compositeDeep; exports.compositeSurfaceOver = _chunk24ATT2PEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunk65GNHOD4cjs.computeSelectionBounds; exports.contentAwareFill = _chunkNVTHUPJ6cjs.contentAwareFill; exports.contentBounds = _chunkJ5BA3BQ6cjs.contentBounds; exports.contentsBox = _chunk65GNHOD4cjs.contentsBox; exports.contentsSurface = _chunk65GNHOD4cjs.contentsSurface; exports.contractCoverage = _chunk65GNHOD4cjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkJ5BA3BQ6cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunk65GNHOD4cjs.convertToSmartObject; exports.copySmartObject = _chunk65GNHOD4cjs.copySmartObject; exports.cornersFromMatrix = _chunk65GNHOD4cjs.cornersFromMatrix; exports.coverageTileCoord = _chunk6GFRKLLScjs.coverageTileCoord; exports.coverageToByte = _chunk65GNHOD4cjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunk65GNHOD4cjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk6GFRKLLScjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkF7GGEAO2cjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkF7GGEAO2cjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkF7GGEAO2cjs.createOutlineTextShaper; exports.createPigment = _chunkJ5BA3BQ6cjs.createPigment; exports.createPigmentTools = _chunkFHPVDTI2cjs.createPigmentTools; exports.createSelectionMask = _chunk65GNHOD4cjs.createSelectionMask; exports.createShapeLayer = _chunk65GNHOD4cjs.createShapeLayer; exports.createTypeLayer = _chunk65GNHOD4cjs.createTypeLayer; exports.createWetGpuEngine = _chunkFHPVDTI2cjs.createWetGpuEngine; exports.cssFont = _chunkF7GGEAO2cjs.cssFont; exports.cssFontFamily = _chunkF7GGEAO2cjs.cssFontFamily; exports.curveLut = _chunk24ATT2PEcjs.curveLut; exports.curveLutFromLevels = _chunk65GNHOD4cjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk6GFRKLLScjs.dabCoverage; exports.dabRect = _chunk6GFRKLLScjs.dabRect; exports.decodeDeepSurface = _chunk65GNHOD4cjs.decodeDeepSurface; exports.decodeLayerChannel = _chunk65GNHOD4cjs.decodeLayerChannel; exports.decodeLayerMask = _chunk65GNHOD4cjs.decodeLayerMask; exports.decodeMergedImage = _chunk65GNHOD4cjs.decodeMergedImage; exports.decodePlanes = _chunk65GNHOD4cjs.decodePlanes; exports.decodePng = _chunkDCLJNVZScjs.decodePng; exports.decodePngDataUrl = _chunk65GNHOD4cjs.decodePngDataUrl; exports.decodeSelectionRle = _chunk65GNHOD4cjs.decodeSelectionRle; exports.deepBytes = _chunkJ5BA3BQ6cjs.deepBytes; exports.deepTile = _chunkJ5BA3BQ6cjs.deepTile; exports.defaultAdjustmentParams = _chunk65GNHOD4cjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunk24ATT2PEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunk24ATT2PEcjs.defaultLayerEffect; exports.defaultShapeName = _chunk65GNHOD4cjs.defaultShapeName; exports.deflate = _chunk643B2HKCcjs.deflate; exports.deflateRaw = _chunk643B2HKCcjs.deflateRaw; exports.depthMaskAlpha = _chunk65GNHOD4cjs.depthMaskAlpha; exports.depthOf = _chunkJ5BA3BQ6cjs.depthOf; exports.depthRasterMask = _chunk65GNHOD4cjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunk65GNHOD4cjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunk65GNHOD4cjs.deserializeEffects; exports.deserializeLayer = _chunk65GNHOD4cjs.deserializeLayer; exports.deserializeLayers = _chunk65GNHOD4cjs.deserializeLayers; exports.deserializePatterns = _chunk65GNHOD4cjs.deserializePatterns; exports.deserializeSelection = _chunk65GNHOD4cjs.deserializeSelection; exports.developFilter = _chunk65GNHOD4cjs.developFilter; exports.developFromAdjustments = _chunk65GNHOD4cjs.developFromAdjustments; exports.developTarget = _chunk65GNHOD4cjs.developTarget; exports.dexp = _chunkFHPVDTI2cjs.dexp; exports.dilateMask = _chunkNVTHUPJ6cjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunk65GNHOD4cjs.distanceTransform; exports.dlog = _chunkFHPVDTI2cjs.dlog; exports.documentContents = _chunk65GNHOD4cjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkNVTHUPJ6cjs.dodgeBurn; exports.dodgeBurnCurve = _chunkNVTHUPJ6cjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkFHPVDTI2cjs.dpow; exports.dragWarpMeshPoint = _chunkF7GGEAO2cjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkFHPVDTI2cjs.dsincos; exports.duplicateLayer = _chunk65GNHOD4cjs.duplicateLayer; exports.edgeBits = _chunkFHPVDTI2cjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunk24ATT2PEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunk24ATT2PEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunk24ATT2PEcjs.effectsFingerprint; exports.effectsMargin = _chunk24ATT2PEcjs.effectsMargin; exports.effectsScale = _chunk24ATT2PEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkJ5BA3BQ6cjs.emptySurface; exports.encodeDeepSurface = _chunk65GNHOD4cjs.encodeDeepSurface; exports.encodePng = _chunkDCLJNVZScjs.encodePng; exports.encodeRle = _chunk65GNHOD4cjs.encodeRle; exports.encodeSelectionRle = _chunk65GNHOD4cjs.encodeSelectionRle; exports.encodeSurface = _chunk65GNHOD4cjs.encodeSurface; exports.evalWarpMesh = _chunkF7GGEAO2cjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunk65GNHOD4cjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk6GFRKLLScjs.exchangeRates; exports.expNeg = _chunkFHPVDTI2cjs.expNeg; exports.expandCoverage = _chunk65GNHOD4cjs.expandCoverage; exports.exportPsd = _chunk65GNHOD4cjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunk65GNHOD4cjs.featherCoverage; exports.fillRect = _chunkJ5BA3BQ6cjs.fillRect; exports.filmPixel = _chunkFHPVDTI2cjs.filmPixel; exports.filmReflectance = _chunkFHPVDTI2cjs.filmReflectance; exports.filterMaskCoverage = _chunk65GNHOD4cjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunk24ATT2PEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkFHPVDTI2cjs.findWebGpu; exports.finishTile = _chunkJ5BA3BQ6cjs.finishTile; exports.fitParagraphRuns = _chunkF7GGEAO2cjs.fitParagraphRuns; exports.fitRuns = _chunkF7GGEAO2cjs.fitRuns; exports.flattenLayers = _chunk24ATT2PEcjs.flattenLayers; exports.flattenPath = _chunk65GNHOD4cjs.flattenPath; exports.flipCorners = _chunk65GNHOD4cjs.flipCorners; exports.flowField = _chunkFHPVDTI2cjs.flowField; exports.fontOf = _chunkF7GGEAO2cjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunk65GNHOD4cjs.fullSelection; exports.gaussianBlur = _chunk24ATT2PEcjs.gaussianBlur; exports.geometryHomography = _chunk65GNHOD4cjs.geometryHomography; exports.getAnnotationBounds = _chunk65GNHOD4cjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunk65GNHOD4cjs.getCropCursor; exports.getRotatedSize = _chunk65GNHOD4cjs.getRotatedSize; exports.getViewportMetrics = _chunk65GNHOD4cjs.getViewportMetrics; exports.getViewportProjection = _chunk65GNHOD4cjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunk6GFRKLLScjs.gradientDabColor; exports.greyMorphology = _chunk65GNHOD4cjs.greyMorphology; exports.groupLayers = _chunk65GNHOD4cjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunk24ATT2PEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunk65GNHOD4cjs.hasResampledLegacyMask; exports.hasSurface = _chunk65GNHOD4cjs.hasSurface; exports.hasWarp = _chunk65GNHOD4cjs.hasWarp; exports.hash2 = _chunk6GFRKLLScjs.hash2; exports.hashMaskContent = _chunk65GNHOD4cjs.hashMaskContent; exports.hashNoise = _chunk24ATT2PEcjs.hashNoise; exports.healPixels = _chunkNVTHUPJ6cjs.healPixels; exports.hexToPaintRgb = _chunk6GFRKLLScjs.hexToPaintRgb; exports.hexToRgb = _chunk65GNHOD4cjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunk65GNHOD4cjs.hitTestAnnotation; exports.hitTestCrop = _chunk65GNHOD4cjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunk65GNHOD4cjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunk65GNHOD4cjs.hueRangeTables; exports.hueRangeWeight = _chunk65GNHOD4cjs.hueRangeWeight; exports.hueSaturation = _chunk65GNHOD4cjs.hueSaturation; exports.identityCurve = _chunk65GNHOD4cjs.identityCurve; exports.identityLevels = _chunk65GNHOD4cjs.identityLevels; exports.identityTransform = _chunk65GNHOD4cjs.identityTransform; exports.identityWarpMesh = _chunkF7GGEAO2cjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunk65GNHOD4cjs.imageToCanvasPoint; exports.importPsd = _chunk65GNHOD4cjs.importPsd; exports.inflate = _chunk643B2HKCcjs.inflate; exports.inflateRaw = _chunk643B2HKCcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunk24ATT2PEcjs.insertLayer; exports.instancesOf = _chunk65GNHOD4cjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunk65GNHOD4cjs.invertMatrix3; exports.invertSelection = _chunk65GNHOD4cjs.invertSelection; exports.isActiveFilter = _chunk65GNHOD4cjs.isActiveFilter; exports.isAdjustmentKind = _chunk65GNHOD4cjs.isAdjustmentKind; exports.isBitDepth = _chunkJ5BA3BQ6cjs.isBitDepth; exports.isBlendMode = _chunkJ5BA3BQ6cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkZ6OUCS2Kcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunk65GNHOD4cjs.isContentsDecoded; exports.isDefaultDepthMask = _chunk65GNHOD4cjs.isDefaultDepthMask; exports.isGradientPaint = _chunk6GFRKLLScjs.isGradientPaint; exports.isIdentityTransform = _chunk65GNHOD4cjs.isIdentityTransform; exports.isInterpolation = _chunk24ATT2PEcjs.isInterpolation; exports.isLayerEffectKind = _chunk24ATT2PEcjs.isLayerEffectKind; exports.isLayerLocked = _chunk24ATT2PEcjs.isLayerLocked; exports.isLegacyShape = _chunk65GNHOD4cjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkJ5BA3BQ6cjs.isPainterlyBlendMode; exports.isPng = _chunkDCLJNVZScjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunk65GNHOD4cjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunk65GNHOD4cjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunk65GNHOD4cjs.isSelectionEmpty; exports.isSelectionMode = _chunk65GNHOD4cjs.isSelectionMode; exports.isSeparableBlendMode = _chunkJ5BA3BQ6cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunk65GNHOD4cjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunk65GNHOD4cjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunk65GNHOD4cjs.isTransformAnchor; exports.isValidWarp = _chunk65GNHOD4cjs.isValidWarp; exports.keepDeepSamples = _chunkJ5BA3BQ6cjs.keepDeepSamples; exports.kelvinToTemperature = _chunk65GNHOD4cjs.kelvinToTemperature; exports.keysWeight = _chunk24ATT2PEcjs.keysWeight; exports.latticeViscosity = _chunkFHPVDTI2cjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunk24ATT2PEcjs.layerEffectFields; exports.layerEffectLabel = _chunk24ATT2PEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunk65GNHOD4cjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunk65GNHOD4cjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunk65GNHOD4cjs.layerMaskFromSelection; exports.layerMaskKey = _chunk65GNHOD4cjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunk65GNHOD4cjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunk65GNHOD4cjs.layerTree; exports.layerTypeLabel = _chunk65GNHOD4cjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunk65GNHOD4cjs.layersFromLegacy; exports.layoutText = _chunkF7GGEAO2cjs.layoutText; exports.legacyAdjustmentLayer = _chunk65GNHOD4cjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunk65GNHOD4cjs.legacyMaskOf; exports.legacyView = _chunk65GNHOD4cjs.legacyView; exports.lerpPigment = _chunkJ5BA3BQ6cjs.lerpPigment; exports.lerpPigmentInto = _chunkJ5BA3BQ6cjs.lerpPigmentInto; exports.levelsValue = _chunk65GNHOD4cjs.levelsValue; exports.linearSrgbToXy = _chunk65GNHOD4cjs.linearSrgbToXy; exports.linearToSrgb = _chunk65GNHOD4cjs.linearToSrgb; exports.linearToSrgb8 = _chunkFHPVDTI2cjs.linearToSrgb8; exports.liveComponent = _chunk65GNHOD4cjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunk65GNHOD4cjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk6GFRKLLScjs.loadMixer; exports.loadOpenTypeFont = _chunk2OJACTPRcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkFHPVDTI2cjs.loadWetKernel; exports.luma = _chunkNVTHUPJ6cjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunk65GNHOD4cjs.mapCropHandle; exports.mapLayer = _chunk24ATT2PEcjs.mapLayer; exports.mapSubpaths = _chunk65GNHOD4cjs.mapSubpaths; exports.maskBounds = _chunkNVTHUPJ6cjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunk65GNHOD4cjs.matrixFromCorners; exports.matrixFromParams = _chunk65GNHOD4cjs.matrixFromParams; exports.membraneFill = _chunkNVTHUPJ6cjs.membraneFill; exports.mergeLayerEffect = _chunk24ATT2PEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunk65GNHOD4cjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunk6GFRKLLScjs.mix32; exports.mixPigment8 = _chunkJ5BA3BQ6cjs.mixPigment8; exports.mixPigmentRgb = _chunkJ5BA3BQ6cjs.mixPigmentRgb; exports.mixPigments = _chunkJ5BA3BQ6cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunk6GFRKLLScjs.mixerRates; exports.modifySelection = _chunk65GNHOD4cjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunk65GNHOD4cjs.moveLayer; exports.moveSmartFilter = _chunk65GNHOD4cjs.moveSmartFilter; exports.mulMatrix3 = _chunk65GNHOD4cjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunk65GNHOD4cjs.neutralHueRange; exports.newContentsId = _chunk65GNHOD4cjs.newContentsId; exports.newEffectId = _chunk24ATT2PEcjs.newEffectId; exports.newLayerId = _chunk65GNHOD4cjs.newLayerId; exports.normalizeAdjustmentLayer = _chunk65GNHOD4cjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunk65GNHOD4cjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunk65GNHOD4cjs.normalizeAngle; exports.normalizeBlendMode = _chunkJ5BA3BQ6cjs.normalizeBlendMode; exports.normalizeBlender = _chunk6GFRKLLScjs.normalizeBlender; exports.normalizeBrush = _chunk6GFRKLLScjs.normalizeBrush; exports.normalizeFilter = _chunk65GNHOD4cjs.normalizeFilter; exports.normalizeFlow = _chunkFHPVDTI2cjs.normalizeFlow; exports.normalizeHexColor = _chunk6GFRKLLScjs.normalizeHexColor; exports.normalizeLayerEffects = _chunk24ATT2PEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunk65GNHOD4cjs.normalizeLayerMask; exports.normalizeLiveShape = _chunk65GNHOD4cjs.normalizeLiveShape; exports.normalizeMixer = _chunk6GFRKLLScjs.normalizeMixer; exports.normalizePlacement = _chunk65GNHOD4cjs.normalizePlacement; exports.normalizeProcessVersion = _chunk65GNHOD4cjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkNVTHUPJ6cjs.normalizeRetouch; exports.normalizeShapePaint = _chunk65GNHOD4cjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunk65GNHOD4cjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunk65GNHOD4cjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk6GFRKLLScjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunk65GNHOD4cjs.normalizeSubpaths; exports.normalizeText = _chunk65GNHOD4cjs.normalizeText; exports.normalizeTilt = _chunkFHPVDTI2cjs.normalizeTilt; exports.normalizeWetParams = _chunkFHPVDTI2cjs.normalizeWetParams; exports.offsetLayer = _chunk65GNHOD4cjs.offsetLayer; exports.offsetShape = _chunk65GNHOD4cjs.offsetShape; exports.offsetSmartObject = _chunk65GNHOD4cjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkJ5BA3BQ6cjs.packRgba; exports.packWetParams = _chunkFHPVDTI2cjs.packWetParams; exports.paintGradientMappingFor = _chunk6GFRKLLScjs.paintGradientMappingFor; exports.paintPathStroke = _chunkZ6OUCS2Kcjs.paintPathStroke; exports.paintSourceColor = _chunk6GFRKLLScjs.paintSourceColor; exports.paintSourceCss = _chunk6GFRKLLScjs.paintSourceCss; exports.paragraphRanges = _chunkF7GGEAO2cjs.paragraphRanges; exports.parseAdjustmentBlock = _chunk65GNHOD4cjs.parseAdjustmentBlock; exports.parseBlend = _chunk65GNHOD4cjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunk2YQONY6Gcjs.parseCssColor; exports.parseDataUrl = _chunkDCLJNVZScjs.parseDataUrl; exports.parseEffectColor = _chunk24ATT2PEcjs.parseEffectColor; exports.parseLfx2 = _chunk65GNHOD4cjs.parseLfx2; exports.parseLrfx = _chunk65GNHOD4cjs.parseLrfx; exports.parseOpenTypeFont = _chunk2OJACTPRcjs.parseOpenTypeFont; exports.parsePaintSource = _chunk6GFRKLLScjs.parsePaintSource; exports.parsePatternBlock = _chunk65GNHOD4cjs.parsePatternBlock; exports.parseSelectionMode = _chunk65GNHOD4cjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunk65GNHOD4cjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunk65GNHOD4cjs.patchParagraphStyle; exports.patchTextStyle = _chunk65GNHOD4cjs.patchTextStyle; exports.pathStrokeCoverage = _chunkZ6OUCS2Kcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkZ6OUCS2Kcjs.pathStrokeDabs; exports.perDabStrength = _chunkNVTHUPJ6cjs.perDabStrength; exports.photoFilterMatrix = _chunk65GNHOD4cjs.photoFilterMatrix; exports.pigment8 = _chunkJ5BA3BQ6cjs.pigment8; exports.pigmentColor = _chunkFHPVDTI2cjs.pigmentColor; exports.pigmentOf = _chunkFHPVDTI2cjs.pigmentOf; exports.pixelLayerBounds = _chunk65GNHOD4cjs.pixelLayerBounds; exports.pixelLayers = _chunk65GNHOD4cjs.pixelLayers; exports.pixelPigment = _chunkFHPVDTI2cjs.pixelPigment; exports.placeContents = _chunk65GNHOD4cjs.placeContents; exports.placeLayer = _chunk65GNHOD4cjs.placeLayer; exports.placementAt = _chunk65GNHOD4cjs.placementAt; exports.placementBounds = _chunk65GNHOD4cjs.placementBounds; exports.placementGeometry = _chunk65GNHOD4cjs.placementGeometry; exports.pngDataUrl = _chunkDCLJNVZScjs.pngDataUrl; exports.pointerPressure = _chunkFHPVDTI2cjs.pointerPressure; exports.pointerStrokeSample = _chunkFHPVDTI2cjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkFHPVDTI2cjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunk65GNHOD4cjs.posterizeValue; exports.presetWarp = _chunk65GNHOD4cjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunk65GNHOD4cjs.projectImagePoint; exports.projectImageRect = _chunk65GNHOD4cjs.projectImageRect; exports.projectMaskCoverage = _chunk65GNHOD4cjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkJ5BA3BQ6cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunk65GNHOD4cjs.psdPatternToEffectPattern; exports.psdToLayers = _chunk65GNHOD4cjs.psdToLayers; exports.pullWarpMesh = _chunkF7GGEAO2cjs.pullWarpMesh; exports.put255 = _chunk6GFRKLLScjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunk6GFRKLLScjs.rand01; exports.rangeLightness = _chunk65GNHOD4cjs.rangeLightness; exports.rasterContents = _chunk65GNHOD4cjs.rasterContents; exports.rasterMaskFromLegacy = _chunk65GNHOD4cjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunk65GNHOD4cjs.rasterizeCoverage; exports.rasterizeDab = _chunk6GFRKLLScjs.rasterizeDab; exports.rasterizeSmartObject = _chunk65GNHOD4cjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkJ5BA3BQ6cjs.readDeepRegion; exports.readPaintSource = _chunk6GFRKLLScjs.readPaintSource; exports.readPixel = _chunkJ5BA3BQ6cjs.readPixel; exports.readPsd = _chunk65GNHOD4cjs.readPsd; exports.readRegion = _chunkJ5BA3BQ6cjs.readRegion; exports.readSourceRegion = _chunkNVTHUPJ6cjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunk24ATT2PEcjs.reduceSurface; exports.referencePoint = _chunk65GNHOD4cjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkJ5BA3BQ6cjs.reflectanceToRgb; exports.removeAlpha = _chunk65GNHOD4cjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunk65GNHOD4cjs.removeLayer; exports.removeLayerEffect = _chunk65GNHOD4cjs.removeLayerEffect; exports.removeLayerFilter = _chunk65GNHOD4cjs.removeLayerFilter; exports.removePaintGradientStop = _chunk6GFRKLLScjs.removePaintGradientStop; exports.removeSmartFilter = _chunk65GNHOD4cjs.removeSmartFilter; exports.renderBrushstroke = _chunkZ6OUCS2Kcjs.renderBrushstroke; exports.renderLayerEffects = _chunk24ATT2PEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunk65GNHOD4cjs.renderShape; exports.renderShapeRect = _chunk65GNHOD4cjs.renderShapeRect; exports.renderSmartObject = _chunk65GNHOD4cjs.renderSmartObject; exports.renderText = _chunk65GNHOD4cjs.renderText; exports.replaceContents = _chunk65GNHOD4cjs.replaceContents; exports.replaceTextRange = _chunk65GNHOD4cjs.replaceTextRange; exports.requireLayer = _chunk65GNHOD4cjs.requireLayer; exports.requireOperation = _chunk65GNHOD4cjs.requireOperation; exports.requireShapeLayer = _chunk65GNHOD4cjs.requireShapeLayer; exports.requireSmartObject = _chunk65GNHOD4cjs.requireSmartObject; exports.requireTypeLayer = _chunk65GNHOD4cjs.requireTypeLayer; exports.requireUnlocked = _chunk65GNHOD4cjs.requireUnlocked; exports.rerender = _chunk65GNHOD4cjs.rerender; exports.rerenderShape = _chunk65GNHOD4cjs.rerenderShape; exports.rerenderText = _chunk65GNHOD4cjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunk65GNHOD4cjs.resizeSelection; exports.resizeWarpMesh = _chunkF7GGEAO2cjs.resizeWarpMesh; exports.resolveExternalAssets = _chunk65GNHOD4cjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunk6GFRKLLScjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkF7GGEAO2cjs.restyleRange; exports.retouchFilter = _chunkNVTHUPJ6cjs.retouchFilter; exports.reversePaintGradient = _chunk6GFRKLLScjs.reversePaintGradient; exports.rgbToGray = _chunk65GNHOD4cjs.rgbToGray; exports.rgbToHsl = _chunk65GNHOD4cjs.rgbToHsl; exports.rgbToReflectance = _chunkJ5BA3BQ6cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkNVTHUPJ6cjs.rgbaViewOfGrey; exports.runLayerFilters = _chunk65GNHOD4cjs.runLayerFilters; exports.runLayerFiltersFloat = _chunk65GNHOD4cjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunk65GNHOD4cjs.sampleLut; exports.sampleToneLut = _chunk65GNHOD4cjs.sampleToneLut; exports.saturationOf = _chunkNVTHUPJ6cjs.saturationOf; exports.scaleLayerEffect = _chunk24ATT2PEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunk6GFRKLLScjs.scalePaintGradient; exports.seamlessClone = _chunkNVTHUPJ6cjs.seamlessClone; exports.selectionArea = _chunk65GNHOD4cjs.selectionArea; exports.selectionFromCoverage = _chunk65GNHOD4cjs.selectionFromCoverage; exports.selectionFromPixels = _chunk65GNHOD4cjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunk65GNHOD4cjs.selectionToCoverage; exports.selectionToPixels = _chunk65GNHOD4cjs.selectionToPixels; exports.selectionValueAt = _chunk65GNHOD4cjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunk65GNHOD4cjs.serializeContents; exports.serializeEffects = _chunk65GNHOD4cjs.serializeEffects; exports.serializeLayer = _chunk65GNHOD4cjs.serializeLayer; exports.serializeLayers = _chunk65GNHOD4cjs.serializeLayers; exports.serializeLayersExternal = _chunk65GNHOD4cjs.serializeLayersExternal; exports.serializePatterns = _chunk65GNHOD4cjs.serializePatterns; exports.serializeSelection = _chunk65GNHOD4cjs.serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunk65GNHOD4cjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunk65GNHOD4cjs.setLayerEffectsEnabled; exports.setLayerMask = _chunk65GNHOD4cjs.setLayerMask; exports.setLayerProperties = _chunk65GNHOD4cjs.setLayerProperties; exports.setLum = _chunkJ5BA3BQ6cjs.setLum; exports.setPigmentColor = _chunkJ5BA3BQ6cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunk65GNHOD4cjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunk65GNHOD4cjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunk65GNHOD4cjs.setSmartPlacement; exports.shadeTile = _chunkFHPVDTI2cjs.shadeTile; exports.shapeAsPixelLayer = _chunk65GNHOD4cjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunk65GNHOD4cjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunk65GNHOD4cjs.shapeGeometryBounds; exports.shapeLayers = _chunk65GNHOD4cjs.shapeLayers; exports.shapeOutline = _chunk65GNHOD4cjs.shapeOutline; exports.shapeRenderClip = _chunk65GNHOD4cjs.shapeRenderClip; exports.shiftCoverage = _chunk65GNHOD4cjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunk65GNHOD4cjs.smartObjectLayers; exports.smoothCoverage = _chunk65GNHOD4cjs.smoothCoverage; exports.smoothPoints = _chunk6GFRKLLScjs.smoothPoints; exports.smudgeEffect = _chunkNVTHUPJ6cjs.smudgeEffect; exports.solidPaint = _chunk6GFRKLLScjs.solidPaint; exports.solidSurface = _chunkJ5BA3BQ6cjs.solidSurface; exports.solveMembrane = _chunkNVTHUPJ6cjs.solveMembrane; exports.spliceRuns = _chunkF7GGEAO2cjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkNVTHUPJ6cjs.sponge; exports.spongeEffect = _chunkNVTHUPJ6cjs.spongeEffect; exports.spotHealPixels = _chunkNVTHUPJ6cjs.spotHealPixels; exports.spotHealWindow = _chunkNVTHUPJ6cjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkFHPVDTI2cjs.srgbByteToLinear; exports.srgbDecode = _chunkJ5BA3BQ6cjs.srgbDecode; exports.srgbEncode = _chunkJ5BA3BQ6cjs.srgbEncode; exports.srgbToLinear = _chunk65GNHOD4cjs.srgbToLinear; exports.standardBlendMode = _chunkJ5BA3BQ6cjs.standardBlendMode; exports.stepSlotTs = _chunkFHPVDTI2cjs.stepSlotTs; exports.styleAt = _chunkF7GGEAO2cjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkJ5BA3BQ6cjs.surfaceBytes; exports.surfaceDepth = _chunkJ5BA3BQ6cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkJ5BA3BQ6cjs.surfaceFromPixels; exports.surfacesEqual = _chunkJ5BA3BQ6cjs.surfacesEqual; exports.tempTintToXy = _chunk65GNHOD4cjs.tempTintToXy; exports.temperatureToKelvin = _chunk65GNHOD4cjs.temperatureToKelvin; exports.textIndexAt = _chunkF7GGEAO2cjs.textIndexAt; exports.textMatrix = _chunk65GNHOD4cjs.textMatrix; exports.textOutlines = _chunk65GNHOD4cjs.textOutlines; exports.textRange = _chunk65GNHOD4cjs.textRange; exports.tileCoord = _chunkJ5BA3BQ6cjs.tileCoord; exports.tileKey = _chunkJ5BA3BQ6cjs.tileKey; exports.tileRect = _chunkJ5BA3BQ6cjs.tileRect; exports.tileSamples = _chunkJ5BA3BQ6cjs.tileSamples; exports.tileSamples16 = _chunkJ5BA3BQ6cjs.tileSamples16; exports.tileSamples32 = _chunkJ5BA3BQ6cjs.tileSamples32; exports.tilesInRect = _chunkJ5BA3BQ6cjs.tilesInRect; exports.tipFalloff = _chunk6GFRKLLScjs.tipFalloff; exports.tipReach = _chunk6GFRKLLScjs.tipReach; exports.tipShape = _chunk6GFRKLLScjs.tipShape; exports.to16From32 = _chunkJ5BA3BQ6cjs.to16From32; exports.to16From8 = _chunkJ5BA3BQ6cjs.to16From8; exports.to32From16 = _chunkJ5BA3BQ6cjs.to32From16; exports.to32From8 = _chunkJ5BA3BQ6cjs.to32From8; exports.to8From16 = _chunkJ5BA3BQ6cjs.to8From16; exports.to8From32 = _chunkJ5BA3BQ6cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunk65GNHOD4cjs.toTextSpace; exports.toneCurve = _chunk65GNHOD4cjs.toneCurve; exports.toneLuts = _chunk65GNHOD4cjs.toneLuts; exports.toneOf = _chunkNVTHUPJ6cjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunk65GNHOD4cjs.transformHomography; exports.transformMap = _chunk65GNHOD4cjs.transformMap; exports.transformShapeComponents = _chunk65GNHOD4cjs.transformShapeComponents; exports.transformSurface = _chunk24ATT2PEcjs.transformSurface; exports.transformTypeLayer = _chunk65GNHOD4cjs.transformTypeLayer; exports.transformedBounds = _chunk24ATT2PEcjs.transformedBounds; exports.transformedBox = _chunk65GNHOD4cjs.transformedBox; exports.transformedPoint = _chunk65GNHOD4cjs.transformedPoint; exports.translateSurface = _chunkJ5BA3BQ6cjs.translateSurface; exports.typeAsPixelLayer = _chunk65GNHOD4cjs.typeAsPixelLayer; exports.typeFrame = _chunk65GNHOD4cjs.typeFrame; exports.typeFromAnnotation = _chunk65GNHOD4cjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunk65GNHOD4cjs.typeLayerName; exports.ungroupLayer = _chunk65GNHOD4cjs.ungroupLayer; exports.uniformTile = _chunkJ5BA3BQ6cjs.uniformTile; exports.unionRect = _chunk65GNHOD4cjs.unionRect; exports.unprojectCanvasPoint = _chunk65GNHOD4cjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunk65GNHOD4cjs.updateLayerEffect; exports.updateLayerFilter = _chunk65GNHOD4cjs.updateLayerFilter; exports.updateLayerMaskProps = _chunk65GNHOD4cjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunk6GFRKLLScjs.updatePaintGradientStop; exports.updateShapeLayer = _chunk65GNHOD4cjs.updateShapeLayer; exports.updateSmartFilter = _chunk65GNHOD4cjs.updateSmartFilter; exports.updateTypeLayer = _chunk65GNHOD4cjs.updateTypeLayer; exports.uvToXy = _chunk65GNHOD4cjs.uvToXy; exports.validateEffectGradient = _chunk24ATT2PEcjs.validateEffectGradient; exports.validateLayerEffect = _chunk24ATT2PEcjs.validateLayerEffect; exports.validateLayerEffects = _chunk24ATT2PEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunk65GNHOD4cjs.versionedDescriptorBytes; exports.vibranceLinear = _chunk65GNHOD4cjs.vibranceLinear; exports.vibrancePixel = _chunk65GNHOD4cjs.vibrancePixel; exports.walkDabs = _chunk6GFRKLLScjs.walkDabs; exports.warpMeshEditPoints = _chunkF7GGEAO2cjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkF7GGEAO2cjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkF7GGEAO2cjs.warpMeshParamAt; exports.warpPresetMesh = _chunkF7GGEAO2cjs.warpPresetMesh; exports.warpSurface = _chunk24ATT2PEcjs.warpSurface; exports.wbMatrix = _chunk65GNHOD4cjs.wbMatrix; exports.wetGpuSupport = _chunkFHPVDTI2cjs.wetGpuSupport; exports.wetSimdSupported = _chunkFHPVDTI2cjs.wetSimdSupported; exports.wetSupport = _chunkFHPVDTI2cjs.wetSupport; exports.whiteBalanceFromSample = _chunk65GNHOD4cjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunk65GNHOD4cjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunk65GNHOD4cjs.withFilterMaskSurface; exports.withNewIds = _chunk65GNHOD4cjs.withNewIds; exports.writeAdjustmentBlock = _chunk65GNHOD4cjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkJ5BA3BQ6cjs.writeDeepRegion; exports.writeLfx2 = _chunk65GNHOD4cjs.writeLfx2; exports.writePatternBlock = _chunk65GNHOD4cjs.writePatternBlock; exports.writePsd = _chunk65GNHOD4cjs.writePsd; exports.writeRegion = _chunkJ5BA3BQ6cjs.writeRegion; exports.xyToTempTint = _chunk65GNHOD4cjs.xyToTempTint; exports.xyToUv = _chunk65GNHOD4cjs.xyToUv;
15917
+ exports.ADJUSTMENT_KEYS = _chunkYAFS2QFZcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkYAFS2QFZcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkYAFS2QFZcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkYAFS2QFZcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkYAFS2QFZcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkJ5BA3BQ6cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkJ5BA3BQ6cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkYAFS2QFZcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkFHPVDTI2cjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkG5NMLUVFcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkZ6OUCS2Kcjs.BrushstrokeCache; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunk6GFRKLLScjs.CoverageMap; exports.D50 = _chunkYAFS2QFZcjs.D50; exports.D65 = _chunkYAFS2QFZcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkZ2H7KECKcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunk6GFRKLLScjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunk6GFRKLLScjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkFHPVDTI2cjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkYAFS2QFZcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunk6GFRKLLScjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkNVTHUPJ6cjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunk6GFRKLLScjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkFHPVDTI2cjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkFHPVDTI2cjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkYAFS2QFZcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunk24ATT2PEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkFHPVDTI2cjs.DRY_EPS; exports.DabWalker = _chunk6GFRKLLScjs.DabWalker; exports.EMPTY_DISTANCE = _chunkYAFS2QFZcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunk6GFRKLLScjs.EMPTY_MIXER_LOAD; exports.EX = _chunkFHPVDTI2cjs.EX; exports.EY = _chunkFHPVDTI2cjs.EY; exports.FLAG_ALIVE = _chunkFHPVDTI2cjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkFHPVDTI2cjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkFHPVDTI2cjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkFHPVDTI2cjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkFHPVDTI2cjs.FLAG_TOP; exports.FLAG_WET = _chunkFHPVDTI2cjs.FLAG_WET; exports.FLAT = _chunkFHPVDTI2cjs.FLAT; exports.FREE_INTERVAL = _chunkFHPVDTI2cjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkYAFS2QFZcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkFHPVDTI2cjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkYAFS2QFZcjs.HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = _chunkYAFS2QFZcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.INTENTS = _chunkG5NMLUVFcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunk24ATT2PEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunk24ATT2PEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkYAFS2QFZcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkYAFS2QFZcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkYAFS2QFZcjs.LUMA_709; exports.LayerCompositor = _chunkYAFS2QFZcjs.LayerCompositor; exports.LayerEffectError = _chunk24ATT2PEcjs.LayerEffectError; exports.LayerOperationError = _chunkYAFS2QFZcjs.LayerOperationError; exports.MAX_BATCH = _chunkFHPVDTI2cjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunk6GFRKLLScjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunk24ATT2PEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkYAFS2QFZcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkFHPVDTI2cjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunk24ATT2PEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkFHPVDTI2cjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkFHPVDTI2cjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkYAFS2QFZcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkYAFS2QFZcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunk6GFRKLLScjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunk6GFRKLLScjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunk6GFRKLLScjs.MIXING_MODELS; exports.MixerStroke = _chunk6GFRKLLScjs.MixerStroke; exports.OPP = _chunkFHPVDTI2cjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkJ5BA3BQ6cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunk6GFRKLLScjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunk6GFRKLLScjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunk6GFRKLLScjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkFHPVDTI2cjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkYAFS2QFZcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkFHPVDTI2cjs.PARAM; exports.PARAM_FLOATS = _chunkFHPVDTI2cjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkYAFS2QFZcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkJ5BA3BQ6cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkFHPVDTI2cjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkFHPVDTI2cjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkJ5BA3BQ6cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkFHPVDTI2cjs.PLANE; exports.PLANE_BYTES = _chunkFHPVDTI2cjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkYAFS2QFZcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkFHPVDTI2cjs.P_D0; exports.P_EDGE = _chunkFHPVDTI2cjs.P_EDGE; exports.P_FX = _chunkFHPVDTI2cjs.P_FX; exports.P_FY = _chunkFHPVDTI2cjs.P_FY; exports.P_H = _chunkFHPVDTI2cjs.P_H; exports.P_P0 = _chunkFHPVDTI2cjs.P_P0; exports.P_RHO = _chunkFHPVDTI2cjs.P_RHO; exports.P_SW = _chunkFHPVDTI2cjs.P_SW; exports.P_UX = _chunkFHPVDTI2cjs.P_UX; exports.P_UY = _chunkFHPVDTI2cjs.P_UY; exports.PaintExchange = _chunk6GFRKLLScjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunk6GFRKLLScjs.PaintGradientSampler; exports.PaintSourceError = _chunk6GFRKLLScjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunk24ATT2PEcjs.PatternPlacement; exports.PatternTile = _chunk24ATT2PEcjs.PatternTile; exports.PsdError = _chunkYAFS2QFZcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkNVTHUPJ6cjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkNVTHUPJ6cjs.RegionPixelSource; exports.RetouchDabStroke = _chunkNVTHUPJ6cjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkYAFS2QFZcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkYAFS2QFZcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkFHPVDTI2cjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkJ5BA3BQ6cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkYAFS2QFZcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkYAFS2QFZcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkFHPVDTI2cjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkFHPVDTI2cjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkFHPVDTI2cjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkYAFS2QFZcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkNVTHUPJ6cjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkFHPVDTI2cjs.SRGB_TO_LINEAR; exports.STRIP = _chunkFHPVDTI2cjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkYAFS2QFZcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk6GFRKLLScjs.SmudgeTip; exports.StrokeCoverage = _chunk6GFRKLLScjs.StrokeCoverage; exports.SurfaceDraft = _chunkJ5BA3BQ6cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkYAFS2QFZcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkYAFS2QFZcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkYAFS2QFZcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkJ5BA3BQ6cjs.TILE; exports.TILE_SHIFT = _chunkJ5BA3BQ6cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkYAFS2QFZcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunk6GFRKLLScjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkYAFS2QFZcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkNVTHUPJ6cjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkYAFS2QFZcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk6GFRKLLScjs.TileMedium; exports.TilePixelSource = _chunkNVTHUPJ6cjs.TilePixelSource; exports.TiledSurface = _chunkJ5BA3BQ6cjs.TiledSurface; exports.TransformTooLargeError = _chunk24ATT2PEcjs.TransformTooLargeError; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkFHPVDTI2cjs.U_MAX; exports.VIBRANCE_GREY = _chunkYAFS2QFZcjs.VIBRANCE_GREY; exports.W9 = _chunkFHPVDTI2cjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkZ2H7KECKcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkZ2H7KECKcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkFHPVDTI2cjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkFHPVDTI2cjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkFHPVDTI2cjs.WET_TILE; exports.WGSL_HALO = _chunkFHPVDTI2cjs.WGSL_HALO; exports.WGSL_SHADE = _chunkFHPVDTI2cjs.WGSL_SHADE; exports.WGSL_STEP = _chunkFHPVDTI2cjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkFHPVDTI2cjs.WetGpuEngine; exports.WetMedium = _chunkFHPVDTI2cjs.WetMedium; exports.WetWorkerPool = _chunkFHPVDTI2cjs.WetWorkerPool; exports.WetWorld = _chunkFHPVDTI2cjs.WetWorld; exports.WetWorldError = _chunkFHPVDTI2cjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkYAFS2QFZcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunk643B2HKCcjs.ZlibError; exports.activeAdjustmentLayers = _chunkYAFS2QFZcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkYAFS2QFZcjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunkYAFS2QFZcjs.activeSmartFilters; exports.addLayerEffect = _chunkYAFS2QFZcjs.addLayerEffect; exports.addLayerFilter = _chunkYAFS2QFZcjs.addLayerFilter; exports.addPaintGradientStop = _chunk6GFRKLLScjs.addPaintGradientStop; exports.addSmartFilter = _chunkYAFS2QFZcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkYAFS2QFZcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkYAFS2QFZcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkYAFS2QFZcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkYAFS2QFZcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunk643B2HKCcjs.adler32; exports.anchorPoint = _chunkYAFS2QFZcjs.anchorPoint; exports.annotationBlend = _chunkYAFS2QFZcjs.annotationBlend; exports.annotationLayerFor = _chunkYAFS2QFZcjs.annotationLayerFor; exports.annotationLayerName = _chunkYAFS2QFZcjs.annotationLayerName; exports.annotationOfLayer = _chunkYAFS2QFZcjs.annotationOfLayer; exports.annotationOfShape = _chunkYAFS2QFZcjs.annotationOfShape; exports.annotationOfType = _chunkYAFS2QFZcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkYAFS2QFZcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkYAFS2QFZcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkYAFS2QFZcjs.applyAdjustments; exports.applyBoxBlur = _chunkYAFS2QFZcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkYAFS2QFZcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkYAFS2QFZcjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunkYAFS2QFZcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkYAFS2QFZcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkYAFS2QFZcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkYAFS2QFZcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkYAFS2QFZcjs.applyParams; exports.applyProcess2Adjustments = _chunkYAFS2QFZcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkYAFS2QFZcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkNVTHUPJ6cjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkYAFS2QFZcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunk6GFRKLLScjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunk6GFRKLLScjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkNVTHUPJ6cjs.applyToneToDeepTile; exports.backgroundLayer = _chunkYAFS2QFZcjs.backgroundLayer; exports.base64ToBytes = _chunkDCLJNVZScjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkNVTHUPJ6cjs.bestOffset; exports.blackWhiteGray = _chunkYAFS2QFZcjs.blackWhiteGray; exports.blendChannel = _chunkJ5BA3BQ6cjs.blendChannel; exports.blendImageData = _chunkJ5BA3BQ6cjs.blendImageData; exports.blendLum = _chunkJ5BA3BQ6cjs.blendLum; exports.blendPixel = _chunkJ5BA3BQ6cjs.blendPixel; exports.blendRadius = _chunk6GFRKLLScjs.blendRadius; exports.blendRgb = _chunkJ5BA3BQ6cjs.blendRgb; exports.blendTile = _chunk24ATT2PEcjs.blendTile; exports.blenderDab = _chunk6GFRKLLScjs.blenderDab; exports.blurFilter = _chunkYAFS2QFZcjs.blurFilter; exports.borderCoverage = _chunkYAFS2QFZcjs.borderCoverage; exports.boxBlurPixels = _chunkNVTHUPJ6cjs.boxBlurPixels; exports.boxMean = boxMean; exports.boxPointOf = _chunkYAFS2QFZcjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkYAFS2QFZcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkZ6OUCS2Kcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkZ6OUCS2Kcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkZ6OUCS2Kcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkSYPFUL5Bcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkZ6OUCS2Kcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkZ6OUCS2Kcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkYAFS2QFZcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkYAFS2QFZcjs.buildToneLut; exports.builtinPattern = _chunk24ATT2PEcjs.builtinPattern; exports.builtinPatternIds = _chunk24ATT2PEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkDCLJNVZScjs.bytesToBase64; exports.calculateCropDrag = _chunkYAFS2QFZcjs.calculateCropDrag; exports.canShareMemory = _chunkFHPVDTI2cjs.canShareMemory; exports.canvasCompositeOperation = _chunkJ5BA3BQ6cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkYAFS2QFZcjs.canvasToImagePoint; exports.caretAt = _chunkZ2H7KECKcjs.caretAt; exports.changedTiles = _chunk24ATT2PEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkYAFS2QFZcjs.clampCropToImage; exports.cleanMixer = _chunk6GFRKLLScjs.cleanMixer; exports.cloneSourceLabel = cloneSourceLabel; exports.collectTiles = _chunkJ5BA3BQ6cjs.collectTiles; exports.colorBalanceChannel = _chunkYAFS2QFZcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkYAFS2QFZcjs.combineSelections; exports.compileAdjustmentLayer = _chunkYAFS2QFZcjs.compileAdjustmentLayer; exports.componentPath = _chunkYAFS2QFZcjs.componentPath; exports.compositeDeep = _chunkYAFS2QFZcjs.compositeDeep; exports.compositeSurfaceOver = _chunk24ATT2PEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkYAFS2QFZcjs.computeSelectionBounds; exports.contentAwareFill = _chunkNVTHUPJ6cjs.contentAwareFill; exports.contentBounds = _chunkJ5BA3BQ6cjs.contentBounds; exports.contentsBox = _chunkYAFS2QFZcjs.contentsBox; exports.contentsSurface = _chunkYAFS2QFZcjs.contentsSurface; exports.contractCoverage = _chunkYAFS2QFZcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkJ5BA3BQ6cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkYAFS2QFZcjs.convertToSmartObject; exports.copySmartObject = _chunkYAFS2QFZcjs.copySmartObject; exports.cornersFromMatrix = _chunkYAFS2QFZcjs.cornersFromMatrix; exports.coverageTileCoord = _chunk6GFRKLLScjs.coverageTileCoord; exports.coverageToByte = _chunkYAFS2QFZcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkYAFS2QFZcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk6GFRKLLScjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkZ2H7KECKcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkZ2H7KECKcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkZ2H7KECKcjs.createOutlineTextShaper; exports.createPigment = _chunkJ5BA3BQ6cjs.createPigment; exports.createPigmentTools = _chunkFHPVDTI2cjs.createPigmentTools; exports.createSelectionMask = _chunkYAFS2QFZcjs.createSelectionMask; exports.createShapeLayer = _chunkYAFS2QFZcjs.createShapeLayer; exports.createTypeLayer = _chunkYAFS2QFZcjs.createTypeLayer; exports.createWetGpuEngine = _chunkFHPVDTI2cjs.createWetGpuEngine; exports.cssFont = _chunkZ2H7KECKcjs.cssFont; exports.cssFontFamily = _chunkZ2H7KECKcjs.cssFontFamily; exports.curveLut = _chunk24ATT2PEcjs.curveLut; exports.curveLutFromLevels = _chunkYAFS2QFZcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk6GFRKLLScjs.dabCoverage; exports.dabRect = _chunk6GFRKLLScjs.dabRect; exports.decodeDeepSurface = _chunkYAFS2QFZcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkYAFS2QFZcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkYAFS2QFZcjs.decodeLayerMask; exports.decodeMergedImage = _chunkYAFS2QFZcjs.decodeMergedImage; exports.decodePlanes = _chunkYAFS2QFZcjs.decodePlanes; exports.decodePng = _chunkDCLJNVZScjs.decodePng; exports.decodePngDataUrl = _chunkYAFS2QFZcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkYAFS2QFZcjs.decodeSelectionRle; exports.deepBytes = _chunkJ5BA3BQ6cjs.deepBytes; exports.deepTile = _chunkJ5BA3BQ6cjs.deepTile; exports.defaultAdjustmentParams = _chunkYAFS2QFZcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunk24ATT2PEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunk24ATT2PEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkYAFS2QFZcjs.defaultShapeName; exports.deflate = _chunk643B2HKCcjs.deflate; exports.deflateRaw = _chunk643B2HKCcjs.deflateRaw; exports.depthMaskAlpha = _chunkYAFS2QFZcjs.depthMaskAlpha; exports.depthOf = _chunkJ5BA3BQ6cjs.depthOf; exports.depthRasterMask = _chunkYAFS2QFZcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkYAFS2QFZcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkYAFS2QFZcjs.deserializeEffects; exports.deserializeLayer = _chunkYAFS2QFZcjs.deserializeLayer; exports.deserializeLayers = _chunkYAFS2QFZcjs.deserializeLayers; exports.deserializePatterns = _chunkYAFS2QFZcjs.deserializePatterns; exports.deserializeSelection = _chunkYAFS2QFZcjs.deserializeSelection; exports.developFilter = _chunkYAFS2QFZcjs.developFilter; exports.developFromAdjustments = _chunkYAFS2QFZcjs.developFromAdjustments; exports.developTarget = _chunkYAFS2QFZcjs.developTarget; exports.dexp = _chunkFHPVDTI2cjs.dexp; exports.dilateMask = _chunkNVTHUPJ6cjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkYAFS2QFZcjs.distanceTransform; exports.dlog = _chunkFHPVDTI2cjs.dlog; exports.documentContents = _chunkYAFS2QFZcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkNVTHUPJ6cjs.dodgeBurn; exports.dodgeBurnCurve = _chunkNVTHUPJ6cjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkFHPVDTI2cjs.dpow; exports.dragWarpMeshPoint = _chunkZ2H7KECKcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkFHPVDTI2cjs.dsincos; exports.duplicateLayer = _chunkYAFS2QFZcjs.duplicateLayer; exports.edgeBits = _chunkFHPVDTI2cjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunk24ATT2PEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunk24ATT2PEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunk24ATT2PEcjs.effectsFingerprint; exports.effectsMargin = _chunk24ATT2PEcjs.effectsMargin; exports.effectsScale = _chunk24ATT2PEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkJ5BA3BQ6cjs.emptySurface; exports.encodeDeepSurface = _chunkYAFS2QFZcjs.encodeDeepSurface; exports.encodePng = _chunkDCLJNVZScjs.encodePng; exports.encodeRle = _chunkYAFS2QFZcjs.encodeRle; exports.encodeSelectionRle = _chunkYAFS2QFZcjs.encodeSelectionRle; exports.encodeSurface = _chunkYAFS2QFZcjs.encodeSurface; exports.evalWarpMesh = _chunkZ2H7KECKcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkYAFS2QFZcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk6GFRKLLScjs.exchangeRates; exports.expNeg = _chunkFHPVDTI2cjs.expNeg; exports.expandCoverage = _chunkYAFS2QFZcjs.expandCoverage; exports.exportPsd = _chunkYAFS2QFZcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkYAFS2QFZcjs.featherCoverage; exports.fillRect = _chunkJ5BA3BQ6cjs.fillRect; exports.filmPixel = _chunkFHPVDTI2cjs.filmPixel; exports.filmReflectance = _chunkFHPVDTI2cjs.filmReflectance; exports.filterMaskCoverage = _chunkYAFS2QFZcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunk24ATT2PEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkFHPVDTI2cjs.findWebGpu; exports.finishTile = _chunkJ5BA3BQ6cjs.finishTile; exports.fitParagraphRuns = _chunkZ2H7KECKcjs.fitParagraphRuns; exports.fitRuns = _chunkZ2H7KECKcjs.fitRuns; exports.flattenLayers = _chunk24ATT2PEcjs.flattenLayers; exports.flattenPath = _chunkYAFS2QFZcjs.flattenPath; exports.flipCorners = _chunkYAFS2QFZcjs.flipCorners; exports.flowField = _chunkFHPVDTI2cjs.flowField; exports.fontOf = _chunkZ2H7KECKcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkYAFS2QFZcjs.fullSelection; exports.gaussianBlur = _chunk24ATT2PEcjs.gaussianBlur; exports.geometryHomography = _chunkYAFS2QFZcjs.geometryHomography; exports.getAnnotationBounds = _chunkYAFS2QFZcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkYAFS2QFZcjs.getCropCursor; exports.getRotatedSize = _chunkYAFS2QFZcjs.getRotatedSize; exports.getViewportMetrics = _chunkYAFS2QFZcjs.getViewportMetrics; exports.getViewportProjection = _chunkYAFS2QFZcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunk6GFRKLLScjs.gradientDabColor; exports.greyMorphology = _chunkYAFS2QFZcjs.greyMorphology; exports.groupLayers = _chunkYAFS2QFZcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunk24ATT2PEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkYAFS2QFZcjs.hasResampledLegacyMask; exports.hasSurface = _chunkYAFS2QFZcjs.hasSurface; exports.hasWarp = _chunkYAFS2QFZcjs.hasWarp; exports.hash2 = _chunk6GFRKLLScjs.hash2; exports.hashMaskContent = _chunkYAFS2QFZcjs.hashMaskContent; exports.hashNoise = _chunk24ATT2PEcjs.hashNoise; exports.healPixels = _chunkNVTHUPJ6cjs.healPixels; exports.hexToPaintRgb = _chunk6GFRKLLScjs.hexToPaintRgb; exports.hexToRgb = _chunkYAFS2QFZcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkYAFS2QFZcjs.hitTestAnnotation; exports.hitTestCrop = _chunkYAFS2QFZcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunkYAFS2QFZcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkYAFS2QFZcjs.hueRangeTables; exports.hueRangeWeight = _chunkYAFS2QFZcjs.hueRangeWeight; exports.hueSaturation = _chunkYAFS2QFZcjs.hueSaturation; exports.identityCurve = _chunkYAFS2QFZcjs.identityCurve; exports.identityLevels = _chunkYAFS2QFZcjs.identityLevels; exports.identityTransform = _chunkYAFS2QFZcjs.identityTransform; exports.identityWarpMesh = _chunkZ2H7KECKcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunkYAFS2QFZcjs.imageToCanvasPoint; exports.importPsd = _chunkYAFS2QFZcjs.importPsd; exports.inflate = _chunk643B2HKCcjs.inflate; exports.inflateRaw = _chunk643B2HKCcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunk24ATT2PEcjs.insertLayer; exports.instancesOf = _chunkYAFS2QFZcjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunkYAFS2QFZcjs.invertMatrix3; exports.invertSelection = _chunkYAFS2QFZcjs.invertSelection; exports.isActiveFilter = _chunkYAFS2QFZcjs.isActiveFilter; exports.isAdjustmentKind = _chunkYAFS2QFZcjs.isAdjustmentKind; exports.isBitDepth = _chunkJ5BA3BQ6cjs.isBitDepth; exports.isBlendMode = _chunkJ5BA3BQ6cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkZ6OUCS2Kcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkYAFS2QFZcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkYAFS2QFZcjs.isDefaultDepthMask; exports.isGradientPaint = _chunk6GFRKLLScjs.isGradientPaint; exports.isIdentityTransform = _chunkYAFS2QFZcjs.isIdentityTransform; exports.isInterpolation = _chunk24ATT2PEcjs.isInterpolation; exports.isLayerEffectKind = _chunk24ATT2PEcjs.isLayerEffectKind; exports.isLayerLocked = _chunk24ATT2PEcjs.isLayerLocked; exports.isLegacyShape = _chunkYAFS2QFZcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkJ5BA3BQ6cjs.isPainterlyBlendMode; exports.isPng = _chunkDCLJNVZScjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkYAFS2QFZcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkYAFS2QFZcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkYAFS2QFZcjs.isSelectionEmpty; exports.isSelectionMode = _chunkYAFS2QFZcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkJ5BA3BQ6cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkYAFS2QFZcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkYAFS2QFZcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkYAFS2QFZcjs.isTransformAnchor; exports.isValidWarp = _chunkYAFS2QFZcjs.isValidWarp; exports.keepDeepSamples = _chunkJ5BA3BQ6cjs.keepDeepSamples; exports.kelvinToTemperature = _chunkYAFS2QFZcjs.kelvinToTemperature; exports.keysWeight = _chunk24ATT2PEcjs.keysWeight; exports.latticeViscosity = _chunkFHPVDTI2cjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunk24ATT2PEcjs.layerEffectFields; exports.layerEffectLabel = _chunk24ATT2PEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkYAFS2QFZcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkYAFS2QFZcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkYAFS2QFZcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkYAFS2QFZcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkYAFS2QFZcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkYAFS2QFZcjs.layerTree; exports.layerTypeLabel = _chunkYAFS2QFZcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkYAFS2QFZcjs.layersFromLegacy; exports.layoutText = _chunkZ2H7KECKcjs.layoutText; exports.legacyAdjustmentLayer = _chunkYAFS2QFZcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkYAFS2QFZcjs.legacyMaskOf; exports.legacyView = _chunkYAFS2QFZcjs.legacyView; exports.lerpPigment = _chunkJ5BA3BQ6cjs.lerpPigment; exports.lerpPigmentInto = _chunkJ5BA3BQ6cjs.lerpPigmentInto; exports.levelsValue = _chunkYAFS2QFZcjs.levelsValue; exports.linearSrgbToXy = _chunkYAFS2QFZcjs.linearSrgbToXy; exports.linearToSrgb = _chunkYAFS2QFZcjs.linearToSrgb; exports.linearToSrgb8 = _chunkFHPVDTI2cjs.linearToSrgb8; exports.liveComponent = _chunkYAFS2QFZcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkYAFS2QFZcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk6GFRKLLScjs.loadMixer; exports.loadOpenTypeFont = _chunk2OJACTPRcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkFHPVDTI2cjs.loadWetKernel; exports.luma = _chunkNVTHUPJ6cjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkYAFS2QFZcjs.mapCropHandle; exports.mapLayer = _chunk24ATT2PEcjs.mapLayer; exports.mapSubpaths = _chunkYAFS2QFZcjs.mapSubpaths; exports.maskBounds = _chunkNVTHUPJ6cjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkYAFS2QFZcjs.matrixFromCorners; exports.matrixFromParams = _chunkYAFS2QFZcjs.matrixFromParams; exports.membraneFill = _chunkNVTHUPJ6cjs.membraneFill; exports.mergeLayerEffect = _chunk24ATT2PEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkYAFS2QFZcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunk6GFRKLLScjs.mix32; exports.mixPigment8 = _chunkJ5BA3BQ6cjs.mixPigment8; exports.mixPigmentRgb = _chunkJ5BA3BQ6cjs.mixPigmentRgb; exports.mixPigments = _chunkJ5BA3BQ6cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunk6GFRKLLScjs.mixerRates; exports.modifySelection = _chunkYAFS2QFZcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkYAFS2QFZcjs.moveLayer; exports.moveSmartFilter = _chunkYAFS2QFZcjs.moveSmartFilter; exports.mulMatrix3 = _chunkYAFS2QFZcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkYAFS2QFZcjs.neutralHueRange; exports.newContentsId = _chunkYAFS2QFZcjs.newContentsId; exports.newEffectId = _chunk24ATT2PEcjs.newEffectId; exports.newLayerId = _chunkYAFS2QFZcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkYAFS2QFZcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkYAFS2QFZcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkYAFS2QFZcjs.normalizeAngle; exports.normalizeBlendMode = _chunkJ5BA3BQ6cjs.normalizeBlendMode; exports.normalizeBlender = _chunk6GFRKLLScjs.normalizeBlender; exports.normalizeBrush = _chunk6GFRKLLScjs.normalizeBrush; exports.normalizeFilter = _chunkYAFS2QFZcjs.normalizeFilter; exports.normalizeFlow = _chunkFHPVDTI2cjs.normalizeFlow; exports.normalizeHexColor = _chunk6GFRKLLScjs.normalizeHexColor; exports.normalizeLayerEffects = _chunk24ATT2PEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkYAFS2QFZcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkYAFS2QFZcjs.normalizeLiveShape; exports.normalizeMixer = _chunk6GFRKLLScjs.normalizeMixer; exports.normalizePlacement = _chunkYAFS2QFZcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkYAFS2QFZcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkNVTHUPJ6cjs.normalizeRetouch; exports.normalizeShapePaint = _chunkYAFS2QFZcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkYAFS2QFZcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkYAFS2QFZcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk6GFRKLLScjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkYAFS2QFZcjs.normalizeSubpaths; exports.normalizeText = _chunkYAFS2QFZcjs.normalizeText; exports.normalizeTilt = _chunkFHPVDTI2cjs.normalizeTilt; exports.normalizeWetParams = _chunkFHPVDTI2cjs.normalizeWetParams; exports.offsetLayer = _chunkYAFS2QFZcjs.offsetLayer; exports.offsetShape = _chunkYAFS2QFZcjs.offsetShape; exports.offsetSmartObject = _chunkYAFS2QFZcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkJ5BA3BQ6cjs.packRgba; exports.packWetParams = _chunkFHPVDTI2cjs.packWetParams; exports.paintGradientMappingFor = _chunk6GFRKLLScjs.paintGradientMappingFor; exports.paintPathStroke = _chunkZ6OUCS2Kcjs.paintPathStroke; exports.paintSourceColor = _chunk6GFRKLLScjs.paintSourceColor; exports.paintSourceCss = _chunk6GFRKLLScjs.paintSourceCss; exports.paragraphRanges = _chunkZ2H7KECKcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkYAFS2QFZcjs.parseAdjustmentBlock; exports.parseBlend = _chunkYAFS2QFZcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunk2YQONY6Gcjs.parseCssColor; exports.parseDataUrl = _chunkDCLJNVZScjs.parseDataUrl; exports.parseEffectColor = _chunk24ATT2PEcjs.parseEffectColor; exports.parseLfx2 = _chunkYAFS2QFZcjs.parseLfx2; exports.parseLrfx = _chunkYAFS2QFZcjs.parseLrfx; exports.parseOpenTypeFont = _chunk2OJACTPRcjs.parseOpenTypeFont; exports.parsePaintSource = _chunk6GFRKLLScjs.parsePaintSource; exports.parsePatternBlock = _chunkYAFS2QFZcjs.parsePatternBlock; exports.parseSelectionMode = _chunkYAFS2QFZcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkYAFS2QFZcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkYAFS2QFZcjs.patchParagraphStyle; exports.patchTextStyle = _chunkYAFS2QFZcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkZ6OUCS2Kcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkZ6OUCS2Kcjs.pathStrokeDabs; exports.perDabStrength = _chunkNVTHUPJ6cjs.perDabStrength; exports.photoFilterMatrix = _chunkYAFS2QFZcjs.photoFilterMatrix; exports.pigment8 = _chunkJ5BA3BQ6cjs.pigment8; exports.pigmentColor = _chunkFHPVDTI2cjs.pigmentColor; exports.pigmentOf = _chunkFHPVDTI2cjs.pigmentOf; exports.pixelLayerBounds = _chunkYAFS2QFZcjs.pixelLayerBounds; exports.pixelLayers = _chunkYAFS2QFZcjs.pixelLayers; exports.pixelPigment = _chunkFHPVDTI2cjs.pixelPigment; exports.placeContents = _chunkYAFS2QFZcjs.placeContents; exports.placeLayer = _chunkYAFS2QFZcjs.placeLayer; exports.placementAt = _chunkYAFS2QFZcjs.placementAt; exports.placementBounds = _chunkYAFS2QFZcjs.placementBounds; exports.placementGeometry = _chunkYAFS2QFZcjs.placementGeometry; exports.pngDataUrl = _chunkDCLJNVZScjs.pngDataUrl; exports.pointerPressure = _chunkFHPVDTI2cjs.pointerPressure; exports.pointerStrokeSample = _chunkFHPVDTI2cjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkFHPVDTI2cjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkYAFS2QFZcjs.posterizeValue; exports.presetWarp = _chunkYAFS2QFZcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkYAFS2QFZcjs.projectImagePoint; exports.projectImageRect = _chunkYAFS2QFZcjs.projectImageRect; exports.projectMaskCoverage = _chunkYAFS2QFZcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkJ5BA3BQ6cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkYAFS2QFZcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkYAFS2QFZcjs.psdToLayers; exports.pullWarpMesh = _chunkZ2H7KECKcjs.pullWarpMesh; exports.put255 = _chunk6GFRKLLScjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunk6GFRKLLScjs.rand01; exports.rangeLightness = _chunkYAFS2QFZcjs.rangeLightness; exports.rasterContents = _chunkYAFS2QFZcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkYAFS2QFZcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkYAFS2QFZcjs.rasterizeCoverage; exports.rasterizeDab = _chunk6GFRKLLScjs.rasterizeDab; exports.rasterizeSmartObject = _chunkYAFS2QFZcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkJ5BA3BQ6cjs.readDeepRegion; exports.readPaintSource = _chunk6GFRKLLScjs.readPaintSource; exports.readPixel = _chunkJ5BA3BQ6cjs.readPixel; exports.readPsd = _chunkYAFS2QFZcjs.readPsd; exports.readRegion = _chunkJ5BA3BQ6cjs.readRegion; exports.readSourceRegion = _chunkNVTHUPJ6cjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunk24ATT2PEcjs.reduceSurface; exports.referencePoint = _chunkYAFS2QFZcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkJ5BA3BQ6cjs.reflectanceToRgb; exports.removeAlpha = _chunkYAFS2QFZcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkYAFS2QFZcjs.removeLayer; exports.removeLayerEffect = _chunkYAFS2QFZcjs.removeLayerEffect; exports.removeLayerFilter = _chunkYAFS2QFZcjs.removeLayerFilter; exports.removePaintGradientStop = _chunk6GFRKLLScjs.removePaintGradientStop; exports.removeSmartFilter = _chunkYAFS2QFZcjs.removeSmartFilter; exports.renderBrushstroke = _chunkZ6OUCS2Kcjs.renderBrushstroke; exports.renderLayerEffects = _chunk24ATT2PEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkYAFS2QFZcjs.renderShape; exports.renderShapeRect = _chunkYAFS2QFZcjs.renderShapeRect; exports.renderSmartObject = _chunkYAFS2QFZcjs.renderSmartObject; exports.renderText = _chunkYAFS2QFZcjs.renderText; exports.replaceContents = _chunkYAFS2QFZcjs.replaceContents; exports.replaceTextRange = _chunkYAFS2QFZcjs.replaceTextRange; exports.requireLayer = _chunkYAFS2QFZcjs.requireLayer; exports.requireOperation = _chunkYAFS2QFZcjs.requireOperation; exports.requireShapeLayer = _chunkYAFS2QFZcjs.requireShapeLayer; exports.requireSmartObject = _chunkYAFS2QFZcjs.requireSmartObject; exports.requireTypeLayer = _chunkYAFS2QFZcjs.requireTypeLayer; exports.requireUnlocked = _chunkYAFS2QFZcjs.requireUnlocked; exports.rerender = _chunkYAFS2QFZcjs.rerender; exports.rerenderShape = _chunkYAFS2QFZcjs.rerenderShape; exports.rerenderText = _chunkYAFS2QFZcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkYAFS2QFZcjs.resizeSelection; exports.resizeWarpMesh = _chunkZ2H7KECKcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkYAFS2QFZcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunk6GFRKLLScjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkZ2H7KECKcjs.restyleRange; exports.retouchFilter = _chunkNVTHUPJ6cjs.retouchFilter; exports.reversePaintGradient = _chunk6GFRKLLScjs.reversePaintGradient; exports.rgbToGray = _chunkYAFS2QFZcjs.rgbToGray; exports.rgbToHsl = _chunkYAFS2QFZcjs.rgbToHsl; exports.rgbToReflectance = _chunkJ5BA3BQ6cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkNVTHUPJ6cjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkYAFS2QFZcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkYAFS2QFZcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkYAFS2QFZcjs.sampleLut; exports.sampleToneLut = _chunkYAFS2QFZcjs.sampleToneLut; exports.saturationOf = _chunkNVTHUPJ6cjs.saturationOf; exports.scaleLayerEffect = _chunk24ATT2PEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunk6GFRKLLScjs.scalePaintGradient; exports.seamlessClone = _chunkNVTHUPJ6cjs.seamlessClone; exports.selectionArea = _chunkYAFS2QFZcjs.selectionArea; exports.selectionFromCoverage = _chunkYAFS2QFZcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkYAFS2QFZcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkYAFS2QFZcjs.selectionToCoverage; exports.selectionToPixels = _chunkYAFS2QFZcjs.selectionToPixels; exports.selectionValueAt = _chunkYAFS2QFZcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkYAFS2QFZcjs.serializeContents; exports.serializeEffects = _chunkYAFS2QFZcjs.serializeEffects; exports.serializeLayer = _chunkYAFS2QFZcjs.serializeLayer; exports.serializeLayers = _chunkYAFS2QFZcjs.serializeLayers; exports.serializeLayersExternal = _chunkYAFS2QFZcjs.serializeLayersExternal; exports.serializePatterns = _chunkYAFS2QFZcjs.serializePatterns; exports.serializeSelection = _chunkYAFS2QFZcjs.serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkYAFS2QFZcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkYAFS2QFZcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkYAFS2QFZcjs.setLayerMask; exports.setLayerProperties = _chunkYAFS2QFZcjs.setLayerProperties; exports.setLum = _chunkJ5BA3BQ6cjs.setLum; exports.setPigmentColor = _chunkJ5BA3BQ6cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkYAFS2QFZcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkYAFS2QFZcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkYAFS2QFZcjs.setSmartPlacement; exports.shadeTile = _chunkFHPVDTI2cjs.shadeTile; exports.shapeAsPixelLayer = _chunkYAFS2QFZcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkYAFS2QFZcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkYAFS2QFZcjs.shapeGeometryBounds; exports.shapeLayers = _chunkYAFS2QFZcjs.shapeLayers; exports.shapeOutline = _chunkYAFS2QFZcjs.shapeOutline; exports.shapeRenderClip = _chunkYAFS2QFZcjs.shapeRenderClip; exports.shiftCoverage = _chunkYAFS2QFZcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkYAFS2QFZcjs.smartObjectLayers; exports.smoothCoverage = _chunkYAFS2QFZcjs.smoothCoverage; exports.smoothPoints = _chunk6GFRKLLScjs.smoothPoints; exports.smudgeEffect = _chunkNVTHUPJ6cjs.smudgeEffect; exports.solidPaint = _chunk6GFRKLLScjs.solidPaint; exports.solidSurface = _chunkJ5BA3BQ6cjs.solidSurface; exports.solveMembrane = _chunkNVTHUPJ6cjs.solveMembrane; exports.spliceRuns = _chunkZ2H7KECKcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkNVTHUPJ6cjs.sponge; exports.spongeEffect = _chunkNVTHUPJ6cjs.spongeEffect; exports.spotHealPixels = _chunkNVTHUPJ6cjs.spotHealPixels; exports.spotHealWindow = _chunkNVTHUPJ6cjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkFHPVDTI2cjs.srgbByteToLinear; exports.srgbDecode = _chunkJ5BA3BQ6cjs.srgbDecode; exports.srgbEncode = _chunkJ5BA3BQ6cjs.srgbEncode; exports.srgbToLinear = _chunkYAFS2QFZcjs.srgbToLinear; exports.standardBlendMode = _chunkJ5BA3BQ6cjs.standardBlendMode; exports.stepSlotTs = _chunkFHPVDTI2cjs.stepSlotTs; exports.styleAt = _chunkZ2H7KECKcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkJ5BA3BQ6cjs.surfaceBytes; exports.surfaceDepth = _chunkJ5BA3BQ6cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkJ5BA3BQ6cjs.surfaceFromPixels; exports.surfacesEqual = _chunkJ5BA3BQ6cjs.surfacesEqual; exports.tempTintToXy = _chunkYAFS2QFZcjs.tempTintToXy; exports.temperatureToKelvin = _chunkYAFS2QFZcjs.temperatureToKelvin; exports.textIndexAt = _chunkZ2H7KECKcjs.textIndexAt; exports.textMatrix = _chunkYAFS2QFZcjs.textMatrix; exports.textOutlines = _chunkYAFS2QFZcjs.textOutlines; exports.textRange = _chunkYAFS2QFZcjs.textRange; exports.tileCoord = _chunkJ5BA3BQ6cjs.tileCoord; exports.tileKey = _chunkJ5BA3BQ6cjs.tileKey; exports.tileRect = _chunkJ5BA3BQ6cjs.tileRect; exports.tileSamples = _chunkJ5BA3BQ6cjs.tileSamples; exports.tileSamples16 = _chunkJ5BA3BQ6cjs.tileSamples16; exports.tileSamples32 = _chunkJ5BA3BQ6cjs.tileSamples32; exports.tilesInRect = _chunkJ5BA3BQ6cjs.tilesInRect; exports.tipFalloff = _chunk6GFRKLLScjs.tipFalloff; exports.tipReach = _chunk6GFRKLLScjs.tipReach; exports.tipShape = _chunk6GFRKLLScjs.tipShape; exports.to16From32 = _chunkJ5BA3BQ6cjs.to16From32; exports.to16From8 = _chunkJ5BA3BQ6cjs.to16From8; exports.to32From16 = _chunkJ5BA3BQ6cjs.to32From16; exports.to32From8 = _chunkJ5BA3BQ6cjs.to32From8; exports.to8From16 = _chunkJ5BA3BQ6cjs.to8From16; exports.to8From32 = _chunkJ5BA3BQ6cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkYAFS2QFZcjs.toTextSpace; exports.toneCurve = _chunkYAFS2QFZcjs.toneCurve; exports.toneLuts = _chunkYAFS2QFZcjs.toneLuts; exports.toneOf = _chunkNVTHUPJ6cjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkYAFS2QFZcjs.transformHomography; exports.transformMap = _chunkYAFS2QFZcjs.transformMap; exports.transformShapeComponents = _chunkYAFS2QFZcjs.transformShapeComponents; exports.transformSurface = _chunk24ATT2PEcjs.transformSurface; exports.transformTypeLayer = _chunkYAFS2QFZcjs.transformTypeLayer; exports.transformedBounds = _chunk24ATT2PEcjs.transformedBounds; exports.transformedBox = _chunkYAFS2QFZcjs.transformedBox; exports.transformedPoint = _chunkYAFS2QFZcjs.transformedPoint; exports.translateSurface = _chunkJ5BA3BQ6cjs.translateSurface; exports.typeAsPixelLayer = _chunkYAFS2QFZcjs.typeAsPixelLayer; exports.typeFrame = _chunkYAFS2QFZcjs.typeFrame; exports.typeFromAnnotation = _chunkYAFS2QFZcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkYAFS2QFZcjs.typeLayerName; exports.ungroupLayer = _chunkYAFS2QFZcjs.ungroupLayer; exports.uniformTile = _chunkJ5BA3BQ6cjs.uniformTile; exports.unionRect = _chunkYAFS2QFZcjs.unionRect; exports.unprojectCanvasPoint = _chunkYAFS2QFZcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkYAFS2QFZcjs.updateLayerEffect; exports.updateLayerFilter = _chunkYAFS2QFZcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkYAFS2QFZcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunk6GFRKLLScjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkYAFS2QFZcjs.updateShapeLayer; exports.updateSmartFilter = _chunkYAFS2QFZcjs.updateSmartFilter; exports.updateTypeLayer = _chunkYAFS2QFZcjs.updateTypeLayer; exports.uvToXy = _chunkYAFS2QFZcjs.uvToXy; exports.validateEffectGradient = _chunk24ATT2PEcjs.validateEffectGradient; exports.validateLayerEffect = _chunk24ATT2PEcjs.validateLayerEffect; exports.validateLayerEffects = _chunk24ATT2PEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkYAFS2QFZcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkYAFS2QFZcjs.vibranceLinear; exports.vibrancePixel = _chunkYAFS2QFZcjs.vibrancePixel; exports.walkDabs = _chunk6GFRKLLScjs.walkDabs; exports.warpMeshEditPoints = _chunkZ2H7KECKcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkZ2H7KECKcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkZ2H7KECKcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkZ2H7KECKcjs.warpPresetMesh; exports.warpSurface = _chunk24ATT2PEcjs.warpSurface; exports.wbMatrix = _chunkYAFS2QFZcjs.wbMatrix; exports.wetGpuSupport = _chunkFHPVDTI2cjs.wetGpuSupport; exports.wetSimdSupported = _chunkFHPVDTI2cjs.wetSimdSupported; exports.wetSupport = _chunkFHPVDTI2cjs.wetSupport; exports.whiteBalanceFromSample = _chunkYAFS2QFZcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkYAFS2QFZcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkYAFS2QFZcjs.withFilterMaskSurface; exports.withNewIds = _chunkYAFS2QFZcjs.withNewIds; exports.writeAdjustmentBlock = _chunkYAFS2QFZcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkJ5BA3BQ6cjs.writeDeepRegion; exports.writeLfx2 = _chunkYAFS2QFZcjs.writeLfx2; exports.writePatternBlock = _chunkYAFS2QFZcjs.writePatternBlock; exports.writePsd = _chunkYAFS2QFZcjs.writePsd; exports.writeRegion = _chunkJ5BA3BQ6cjs.writeRegion; exports.xyToTempTint = _chunkYAFS2QFZcjs.xyToTempTint; exports.xyToUv = _chunkYAFS2QFZcjs.xyToUv;
15918
15918
  //# sourceMappingURL=index.cjs.map