@pixerate/editor 0.140.3 → 0.140.4

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.
@@ -363,7 +363,7 @@ var _chunk5UEFNX24cjs = require('../chunk-5UEFNX24.cjs');
363
363
 
364
364
 
365
365
 
366
- var _chunkO3ZU6QIZcjs = require('../chunk-O3ZU6QIZ.cjs');
366
+ var _chunkXNZWATSBcjs = require('../chunk-XNZWATSB.cjs');
367
367
 
368
368
 
369
369
  var _chunkA2IS7EHEcjs = require('../chunk-A2IS7EHE.cjs');
@@ -622,7 +622,7 @@ require('../chunk-2BSBFBOA.cjs');
622
622
 
623
623
 
624
624
 
625
- var _chunkRCUX6CT2cjs = require('../chunk-RCUX6CT2.cjs');
625
+ var _chunkHRI3ZMDMcjs = require('../chunk-HRI3ZMDM.cjs');
626
626
  require('../chunk-BXMIBMVG.cjs');
627
627
  require('../chunk-CVFAAZXE.cjs');
628
628
  require('../chunk-GF2RBSDM.cjs');
@@ -938,7 +938,7 @@ function quickMaskPixels(mask, style = {}) {
938
938
 
939
939
  // src/image-editor/layers/render.ts
940
940
  function isQuarterTurn(rotate) {
941
- return _chunkO3ZU6QIZcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
941
+ return _chunkXNZWATSBcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
942
942
  }
943
943
  function isIntegerRect(r) {
944
944
  return Number.isInteger(r.x) && Number.isInteger(r.y) && Number.isInteger(r.width) && Number.isInteger(r.height);
@@ -946,7 +946,7 @@ function isIntegerRect(r) {
946
946
  function baseProjection(region, transform, baseW, baseH) {
947
947
  return {
948
948
  region,
949
- angle: _chunkO3ZU6QIZcjs.normalizeAngle.call(void 0, transform.rotate),
949
+ angle: _chunkXNZWATSBcjs.normalizeAngle.call(void 0, transform.rotate),
950
950
  flipH: transform.flipH,
951
951
  flipV: transform.flipV,
952
952
  scale: 1,
@@ -955,14 +955,14 @@ function baseProjection(region, transform, baseW, baseH) {
955
955
  };
956
956
  }
957
957
  function projectQuarterTurn(src, srcRect, region, transform) {
958
- const rotated = _chunkO3ZU6QIZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
958
+ const rotated = _chunkXNZWATSBcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
959
959
  const w = Math.max(1, Math.round(rotated.width));
960
960
  const h = Math.max(1, Math.round(rotated.height));
961
961
  const out = new Uint8ClampedArray(w * h * 4);
962
962
  const p = baseProjection(region, transform, w, h);
963
- const o = _chunkO3ZU6QIZcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
964
- const ox = _chunkO3ZU6QIZcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
965
- const oy = _chunkO3ZU6QIZcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
963
+ const o = _chunkXNZWATSBcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
964
+ const ox = _chunkXNZWATSBcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
965
+ const oy = _chunkXNZWATSBcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
966
966
  const ux = Math.round(ox.x - o.x);
967
967
  const vx = Math.round(ox.y - o.y);
968
968
  const uy = Math.round(oy.x - o.x);
@@ -991,23 +991,23 @@ function applyOutputStage(img, opacity, legacyOutputBlur) {
991
991
  const d = img.data;
992
992
  for (let i = 3; i < d.length; i += 4) d[i] = d[i] * opacity;
993
993
  }
994
- if (legacyOutputBlur && legacyOutputBlur > 0) _chunkO3ZU6QIZcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
994
+ if (legacyOutputBlur && legacyOutputBlur > 0) _chunkXNZWATSBcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
995
995
  }
996
996
  function needsLegacyBase(input) {
997
997
  const { stack, region, canvas, transform } = input;
998
- if (!_chunkO3ZU6QIZcjs.isLegacyShape.call(void 0, stack)) return false;
998
+ if (!_chunkXNZWATSBcjs.isLegacyShape.call(void 0, stack)) return false;
999
999
  const bg = stack.layers[0];
1000
1000
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
1001
1001
  if (_optionalChain([bg, 'access', _2 => _2.mask, 'optionalAccess', _3 => _3.source, 'optionalAccess', _4 => _4.enabled]) && bg.mask.source.maskSource) return true;
1002
1002
  if (stack.outputOpacity < 1) return true;
1003
- const blur = _chunkO3ZU6QIZcjs.blurFilter.call(void 0, bg);
1003
+ const blur = _chunkXNZWATSBcjs.blurFilter.call(void 0, bg);
1004
1004
  if (blur && blur.enabled && blur.radius > 0) {
1005
1005
  const full = region.x === 0 && region.y === 0 && region.width === canvas.width && region.height === canvas.height;
1006
- const angle = _chunkO3ZU6QIZcjs.normalizeAngle.call(void 0, transform.rotate);
1006
+ const angle = _chunkXNZWATSBcjs.normalizeAngle.call(void 0, transform.rotate);
1007
1007
  if (!full || angle === 90 || angle === 270) return true;
1008
1008
  }
1009
1009
  if ((_nullishCoalesce(stack.legacyOutputBlur, () => ( 0))) > 0 && !input.sourceOpaque) return true;
1010
- if (_chunkO3ZU6QIZcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
1010
+ if (_chunkXNZWATSBcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
1011
1011
  return false;
1012
1012
  }
1013
1013
  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;
@@ -1039,7 +1039,7 @@ function coveringRect(region) {
1039
1039
  const y = Math.floor(region.y);
1040
1040
  return { x, y, width: Math.ceil(region.x + region.width) - x, height: Math.ceil(region.y + region.height) - y };
1041
1041
  }
1042
- function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)()) {
1042
+ function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkXNZWATSBcjs.LayerCompositor)()) {
1043
1043
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) {
1044
1044
  throw new Error("renderLayeredBase needs an integer region and a quarter-turn rotation.");
1045
1045
  }
@@ -1173,8 +1173,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1173
1173
  * The viewport's compositor. It only ever composites the viewport's stack, so its tile cache can
1174
1174
  * trust dirty rectangles; exports use `exportCompositor`.
1175
1175
  */
1176
- __init8() {this.compositor = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)()}
1177
- __init9() {this.exportCompositor = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1176
+ __init8() {this.compositor = new (0, _chunkXNZWATSBcjs.LayerCompositor)()}
1177
+ __init9() {this.exportCompositor = new (0, _chunkXNZWATSBcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1178
1178
  /** How the host resolves layer pixels (set by the controller). */
1179
1179
 
1180
1180
  /**
@@ -1251,9 +1251,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1251
1251
  return;
1252
1252
  }
1253
1253
  const isActivelyCropping = Boolean(options.showCropOverlay || state.activeTool === "crop");
1254
- const projection = _chunkO3ZU6QIZcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1254
+ const projection = _chunkXNZWATSBcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1255
1255
  const { region } = projection;
1256
- const rotated = _chunkO3ZU6QIZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1256
+ const rotated = _chunkXNZWATSBcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1257
1257
  const route = this.chooseRoute(state, region, naturalWidth, naturalHeight);
1258
1258
  let overlay = annotations;
1259
1259
  if (route === "legacy") {
@@ -1263,8 +1263,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1263
1263
  `${naturalWidth}x${naturalHeight}`,
1264
1264
  `${region.x},${region.y},${region.width},${region.height}`,
1265
1265
  `${projection.angle},${transform.flipH},${transform.flipV}`,
1266
- `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkO3ZU6QIZcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1267
- _chunkO3ZU6QIZcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1266
+ `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkXNZWATSBcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1267
+ _chunkXNZWATSBcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1268
1268
  `${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}`,
1269
1269
  `d${this.displayKey}`
1270
1270
  ].join("|");
@@ -1298,7 +1298,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1298
1298
  }
1299
1299
  if (overlay.length > 0 || options.draftAnnotation) {
1300
1300
  ctx.save();
1301
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1301
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1302
1302
  ctx.beginPath();
1303
1303
  ctx.rect(region.x, region.y, region.width, region.height);
1304
1304
  ctx.clip();
@@ -1321,7 +1321,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1321
1321
  if (_optionalChain([state, 'access', _15 => _15.selection, 'optionalAccess', _16 => _16.bounds]) && display !== "none" || _optionalChain([options, 'access', _17 => _17.draftSelectionPath, 'optionalAccess', _18 => _18.length])) {
1322
1322
  ctx.save();
1323
1323
  try {
1324
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1324
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1325
1325
  ctx.beginPath();
1326
1326
  ctx.rect(region.x, region.y, region.width, region.height);
1327
1327
  ctx.clip();
@@ -1336,7 +1336,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1336
1336
  const b = options.brushCursor;
1337
1337
  ctx.save();
1338
1338
  try {
1339
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1339
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1340
1340
  const px2 = 1 / (projection.scale || 1);
1341
1341
  ctx.beginPath();
1342
1342
  ctx.arc(b.x, b.y, Math.max(px2, b.diameter / 2), 0, Math.PI * 2);
@@ -1351,7 +1351,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1351
1351
  ctx.restore();
1352
1352
  }
1353
1353
  if (options.cloneSourceMarker) {
1354
- const m = _chunkO3ZU6QIZcjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1354
+ const m = _chunkXNZWATSBcjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1355
1355
  ctx.save();
1356
1356
  try {
1357
1357
  const r = 7;
@@ -1375,7 +1375,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1375
1375
  const t = options.textEdit;
1376
1376
  ctx.save();
1377
1377
  try {
1378
- const scr = (p) => _chunkO3ZU6QIZcjs.projectImagePoint.call(void 0, p, projection);
1378
+ const scr = (p) => _chunkXNZWATSBcjs.projectImagePoint.call(void 0, p, projection);
1379
1379
  const poly = (pts) => {
1380
1380
  ctx.beginPath();
1381
1381
  pts.map(scr).forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
@@ -1414,7 +1414,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1414
1414
  const t = options.freeTransform;
1415
1415
  ctx.save();
1416
1416
  try {
1417
- const scr = (p) => _chunkO3ZU6QIZcjs.projectImagePoint.call(void 0, p, projection);
1417
+ const scr = (p) => _chunkXNZWATSBcjs.projectImagePoint.call(void 0, p, projection);
1418
1418
  ctx.beginPath();
1419
1419
  if (t.warp) {
1420
1420
  for (const c of t.warp.curves) {
@@ -1472,7 +1472,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1472
1472
  }
1473
1473
  if (isActivelyCropping) {
1474
1474
  const activeCrop = options.draftCrop !== void 0 && options.draftCrop !== null ? options.draftCrop : _nullishCoalesce(crop, () => ( { x: 0, y: 0, width: naturalWidth, height: naturalHeight }));
1475
- this.drawCropOverlay(ctx, _chunkO3ZU6QIZcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1475
+ this.drawCropOverlay(ctx, _chunkXNZWATSBcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1476
1476
  }
1477
1477
  }
1478
1478
  /**
@@ -1481,7 +1481,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1481
1481
  */
1482
1482
  async renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, onPixels) {
1483
1483
  const { adjustments, depthMask } = state;
1484
- const rotated = _chunkO3ZU6QIZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1484
+ const rotated = _chunkXNZWATSBcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1485
1485
  const baseW = Math.max(1, Math.round(rotated.width));
1486
1486
  const baseH = Math.max(1, Math.round(rotated.height));
1487
1487
  const baseCanvas = this.createCanvas(baseW, baseH);
@@ -1489,7 +1489,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1489
1489
  if (!baseCtx) return baseCanvas;
1490
1490
  const projection = getBaseProjection(region, transform, baseW, baseH);
1491
1491
  baseCtx.save();
1492
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1492
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1493
1493
  baseCtx.drawImage(
1494
1494
  img,
1495
1495
  region.x,
@@ -1504,8 +1504,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1504
1504
  baseCtx.restore();
1505
1505
  const imageData = baseCtx.getImageData(0, 0, baseW, baseH);
1506
1506
  if (imageData) {
1507
- const layerMasks = _chunkO3ZU6QIZcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1508
- _chunkO3ZU6QIZcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1507
+ const layerMasks = _chunkXNZWATSBcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1508
+ _chunkXNZWATSBcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1509
1509
  if (depthMask.enabled && depthMask.maskSource) {
1510
1510
  try {
1511
1511
  const maskImg = await this.imageCache.get(depthMask.maskSource);
@@ -1516,7 +1516,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1516
1516
  const maskCtx = maskCanvas.getContext("2d");
1517
1517
  if (maskCtx) {
1518
1518
  maskCtx.save();
1519
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1519
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1520
1520
  maskCtx.drawImage(
1521
1521
  maskImg,
1522
1522
  region.x * sx,
@@ -1531,7 +1531,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1531
1531
  maskCtx.restore();
1532
1532
  const maskData = maskCtx.getImageData(0, 0, baseW, baseH);
1533
1533
  if (maskData) {
1534
- _chunkO3ZU6QIZcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1534
+ _chunkXNZWATSBcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1535
1535
  }
1536
1536
  }
1537
1537
  } catch (e8) {
@@ -1550,7 +1550,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1550
1550
  else if (this.baseRoute === "layers") route = "layers";
1551
1551
  else {
1552
1552
  const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
1553
- const shaped = this.baseRoute === "legacy" && _chunkO3ZU6QIZcjs.isLegacyShape.call(void 0, stack);
1553
+ const shaped = this.baseRoute === "legacy" && _chunkXNZWATSBcjs.isLegacyShape.call(void 0, stack);
1554
1554
  route = shaped || needsLegacyBase({
1555
1555
  stack,
1556
1556
  region,
@@ -1685,17 +1685,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1685
1685
  if (!comp) return null;
1686
1686
  const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
1687
1687
  const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
1688
- const rotated = _chunkO3ZU6QIZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1688
+ const rotated = _chunkXNZWATSBcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1689
1689
  const baseW = Math.max(1, Math.round(rotated.width));
1690
1690
  const baseH = Math.max(1, Math.round(rotated.height));
1691
- const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkO3ZU6QIZcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1691
+ const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkXNZWATSBcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1692
1692
  if (this.cachedPostCanvas && this.cachedPostKey === key) return { canvas: this.cachedPostCanvas, histogram: this.cachedPostHistogram };
1693
1693
  const canvas = this.cachedPostCanvas && this.cachedPostCanvas.width === baseW && this.cachedPostCanvas.height === baseH ? this.cachedPostCanvas : this.createCanvas(baseW, baseH);
1694
1694
  const ctx = canvas.getContext("2d");
1695
1695
  if (!ctx) return null;
1696
1696
  ctx.clearRect(0, 0, baseW, baseH);
1697
1697
  ctx.save();
1698
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1698
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1699
1699
  ctx.beginPath();
1700
1700
  ctx.rect(region.x, region.y, region.width, region.height);
1701
1701
  ctx.clip();
@@ -1967,7 +1967,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1967
1967
  ctx.strokeStyle = "#3b82f6";
1968
1968
  ctx.lineWidth = 1.5;
1969
1969
  ctx.setLineDash([4, 4]);
1970
- const bounds = _chunkO3ZU6QIZcjs.getAnnotationBounds.call(void 0, ann);
1970
+ const bounds = _chunkXNZWATSBcjs.getAnnotationBounds.call(void 0, ann);
1971
1971
  const pad = 4;
1972
1972
  ctx.strokeRect(bounds.x - pad, bounds.y - pad, bounds.width + pad * 2, bounds.height + pad * 2);
1973
1973
  ctx.fillStyle = "#ffffff";
@@ -1988,7 +1988,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1988
1988
  }
1989
1989
  /** @deprecated Use the standalone `getAnnotationBounds` from the geometry module. */
1990
1990
  getAnnotationBounds(ann) {
1991
- return _chunkO3ZU6QIZcjs.getAnnotationBounds.call(void 0, ann);
1991
+ return _chunkXNZWATSBcjs.getAnnotationBounds.call(void 0, ann);
1992
1992
  }
1993
1993
  /**
1994
1994
  * Draws a rule-of-thirds crop grid overlay. All rectangles come from
@@ -2070,8 +2070,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2070
2070
  }
2071
2071
  const { width: naturalWidth, height: naturalHeight } = getSourceSize(img);
2072
2072
  const { crop, transform, annotations } = state;
2073
- const region = crop ? _chunkO3ZU6QIZcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2074
- const rotated = _chunkO3ZU6QIZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2073
+ const region = crop ? _chunkXNZWATSBcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2074
+ const rotated = _chunkXNZWATSBcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2075
2075
  const baseW = Math.max(1, Math.round(rotated.width));
2076
2076
  const baseH = Math.max(1, Math.round(rotated.height));
2077
2077
  const exportW = options.width || baseW;
@@ -2100,7 +2100,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2100
2100
  const bctx = baseCanvas.getContext("2d");
2101
2101
  if (bctx) {
2102
2102
  bctx.save();
2103
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2103
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2104
2104
  bctx.beginPath();
2105
2105
  bctx.rect(region.x, region.y, region.width, region.height);
2106
2106
  bctx.clip();
@@ -2113,7 +2113,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2113
2113
  if (options.includeAnnotations !== false && overlay.length > 0) {
2114
2114
  ctx.save();
2115
2115
  ctx.scale(exportW / baseW, exportH / baseH);
2116
- _chunkO3ZU6QIZcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2116
+ _chunkXNZWATSBcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2117
2117
  for (const ann of overlay) {
2118
2118
  await this.drawAnnotation(ctx, ann);
2119
2119
  }
@@ -2203,7 +2203,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2203
2203
  case "rect":
2204
2204
  case "image":
2205
2205
  case "text": {
2206
- const b = _chunkO3ZU6QIZcjs.getAnnotationBounds.call(void 0, ann);
2206
+ const b = _chunkXNZWATSBcjs.getAnnotationBounds.call(void 0, ann);
2207
2207
  ctx.fillRect(b.x, b.y, b.width, b.height);
2208
2208
  break;
2209
2209
  }
@@ -2223,7 +2223,7 @@ function getSourceSize(img, fallbackW = 800, fallbackH = 600) {
2223
2223
  function getBaseProjection(region, transform, baseW, baseH) {
2224
2224
  return {
2225
2225
  region,
2226
- angle: _chunkO3ZU6QIZcjs.normalizeAngle.call(void 0, transform.rotate),
2226
+ angle: _chunkXNZWATSBcjs.normalizeAngle.call(void 0, transform.rotate),
2227
2227
  flipH: transform.flipH,
2228
2228
  flipV: transform.flipV,
2229
2229
  scale: 1,
@@ -2327,8 +2327,8 @@ function polygonCoverage(points, width, height, antiAlias = true) {
2327
2327
  }
2328
2328
  function toMask(width, height, coverage) {
2329
2329
  const out = new Uint8Array(coverage.length);
2330
- for (let i = 0; i < out.length; i++) out[i] = _chunkO3ZU6QIZcjs.coverageToByte.call(void 0, coverage[i]);
2331
- return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, width, height, out);
2330
+ for (let i = 0; i < out.length; i++) out[i] = _chunkXNZWATSBcjs.coverageToByte.call(void 0, coverage[i]);
2331
+ return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, width, height, out);
2332
2332
  }
2333
2333
  function polygonSelection(width, height, points, options = {}) {
2334
2334
  return toMask(width, height, polygonCoverage(points, width, height, _nullishCoalesce(options.antiAlias, () => ( true))));
@@ -2455,7 +2455,7 @@ function magicWand(pixels, seed, options = {}) {
2455
2455
  const { width: w, height: h } = pixels;
2456
2456
  const sx = Math.floor(seed.x);
2457
2457
  const sy = Math.floor(seed.y);
2458
- if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, w, h);
2458
+ if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, w, h);
2459
2459
  const similar = similarity(pixels, sy * w + sx, _nullishCoalesce(options.tolerance, () => ( 32)), _nullishCoalesce(options.distance, () => ( "rgb")));
2460
2460
  const marks = new Uint8Array(n);
2461
2461
  let bx0 = w;
@@ -2503,9 +2503,9 @@ function magicWand(pixels, seed, options = {}) {
2503
2503
  }
2504
2504
  }
2505
2505
  }
2506
- if (bx1 < 0) return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, w, h);
2507
- if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, w, h, marks);
2508
- return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0,
2506
+ if (bx1 < 0) return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, w, h);
2507
+ if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, w, h, marks);
2508
+ return _chunkXNZWATSBcjs.createSelectionMask.call(void 0,
2509
2509
  w,
2510
2510
  h,
2511
2511
  antialiasMarks(marks, w, h, Math.max(0, bx0 - 1), Math.max(0, by0 - 1), Math.min(w, bx1 + 2), Math.min(h, by1 + 2))
@@ -2527,7 +2527,7 @@ function colorRange(pixels, samples, options = {}) {
2527
2527
  const parsed = samples.map((s) => ({ c: sampleColor(s.color), at: s.at }));
2528
2528
  const radius = options.localized !== void 0 ? Math.max(1, options.localized) : void 0;
2529
2529
  const out = new Uint8Array(n);
2530
- if (!parsed.length) return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, w, h, out);
2530
+ if (!parsed.length) return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, w, h, out);
2531
2531
  for (let i = 0; i < n; i++) {
2532
2532
  const p = i * 4;
2533
2533
  if (data[p + 3] <= 0) continue;
@@ -2543,9 +2543,9 @@ function colorRange(pixels, samples, options = {}) {
2543
2543
  }
2544
2544
  if (k > best) best = k;
2545
2545
  }
2546
- out[i] = _chunkO3ZU6QIZcjs.coverageToByte.call(void 0, best);
2546
+ out[i] = _chunkXNZWATSBcjs.coverageToByte.call(void 0, best);
2547
2547
  }
2548
- return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, w, h, out);
2548
+ return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, w, h, out);
2549
2549
  }
2550
2550
  var TONE_RANGE_PRESETS = {
2551
2551
  shadows: [0, 65],
@@ -2563,9 +2563,9 @@ function toneRange(pixels, range, falloff = 20) {
2563
2563
  if (d[p + 3] <= 0) continue;
2564
2564
  const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
2565
2565
  const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
2566
- out[i] = _chunkO3ZU6QIZcjs.coverageToByte.call(void 0, 1 - outside / ramp);
2566
+ out[i] = _chunkXNZWATSBcjs.coverageToByte.call(void 0, 1 - outside / ramp);
2567
2567
  }
2568
- return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2568
+ return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2569
2569
  }
2570
2570
  function hueRange(pixels, center) {
2571
2571
  const n = checkPixels(pixels);
@@ -2588,9 +2588,9 @@ function hueRange(pixels, center) {
2588
2588
  hue *= 60;
2589
2589
  let dh = ((hue - center) % 360 + 360) % 360;
2590
2590
  dh = Math.min(dh, 360 - dh);
2591
- out[i] = _chunkO3ZU6QIZcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2591
+ out[i] = _chunkXNZWATSBcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2592
2592
  }
2593
- return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2593
+ return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2594
2594
  }
2595
2595
 
2596
2596
  // src/image-editor/selection/refine.ts
@@ -2724,9 +2724,9 @@ function edgeWidth(guide, w, h, r) {
2724
2724
  g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
2725
2725
  }
2726
2726
  }
2727
- const gm = _chunkO3ZU6QIZcjs.greyMorphology.call(void 0, g, w, h, r, true);
2728
- const hi = _chunkO3ZU6QIZcjs.greyMorphology.call(void 0, y, w, h, r, true);
2729
- const lo = _chunkO3ZU6QIZcjs.greyMorphology.call(void 0, y, w, h, r, false);
2727
+ const gm = _chunkXNZWATSBcjs.greyMorphology.call(void 0, g, w, h, r, true);
2728
+ const hi = _chunkXNZWATSBcjs.greyMorphology.call(void 0, y, w, h, r, true);
2729
+ const lo = _chunkXNZWATSBcjs.greyMorphology.call(void 0, y, w, h, r, false);
2730
2730
  const out = new Float32Array(n);
2731
2731
  for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
2732
2732
  return out;
@@ -2750,7 +2750,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2750
2750
  }
2751
2751
  }
2752
2752
  if (any) {
2753
- const dist = _chunkO3ZU6QIZcjs.distanceTransform.call(void 0, boundary, w, h);
2753
+ const dist = _chunkXNZWATSBcjs.distanceTransform.call(void 0, boundary, w, h);
2754
2754
  const r = gfRadius(p);
2755
2755
  const q = guidedFilterColor(guide, m, w, h, r);
2756
2756
  const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
@@ -2776,7 +2776,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2776
2776
  for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
2777
2777
  }
2778
2778
  const amount = shiftAmount(p);
2779
- if (Math.abs(amount) >= 1e-4) a = _chunkO3ZU6QIZcjs.shiftCoverage.call(void 0, a, w, h, amount);
2779
+ if (Math.abs(amount) >= 1e-4) a = _chunkXNZWATSBcjs.shiftCoverage.call(void 0, a, w, h, amount);
2780
2780
  return a;
2781
2781
  }
2782
2782
  function guidePlanes(pixels, win) {
@@ -2820,9 +2820,9 @@ function refineSelection(pixels, mask, params = {}) {
2820
2820
  const out = new Uint8Array(mask.width * mask.height);
2821
2821
  for (let y = 0; y < wh; y++) {
2822
2822
  const dst = (y0 + y) * mask.width + x0;
2823
- for (let x = 0; x < ww; x++) out[dst + x] = _chunkO3ZU6QIZcjs.coverageToByte.call(void 0, refined[y * ww + x]);
2823
+ for (let x = 0; x < ww; x++) out[dst + x] = _chunkXNZWATSBcjs.coverageToByte.call(void 0, refined[y * ww + x]);
2824
2824
  }
2825
- return _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2825
+ return _chunkXNZWATSBcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2826
2826
  }
2827
2827
 
2828
2828
  // src/image-editor/effects.ts
@@ -2992,7 +2992,7 @@ var ImageEffectsEngine = (_class4 = class {
2992
2992
  // src/image-editor/free-transform.ts
2993
2993
  var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
2994
2994
  var fail = (message) => {
2995
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(message);
2995
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(message);
2996
2996
  };
2997
2997
  var T = (x, y) => [1, 0, x, 0, 1, y, 0, 0, 1];
2998
2998
  function previewStep(scale) {
@@ -3101,7 +3101,7 @@ var FreeTransformSession = (_class5 = class {
3101
3101
  } else {
3102
3102
  const id = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
3103
3103
  if (!id) fail("No layer given and none is active; pass layerId (see list_layers).");
3104
- const layer = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, layers, id).layer;
3104
+ const layer = _chunkXNZWATSBcjs.requireLayer.call(void 0, layers, id).layer;
3105
3105
  this.layerId = layer.id;
3106
3106
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
3107
3107
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
@@ -3112,20 +3112,20 @@ var FreeTransformSession = (_class5 = class {
3112
3112
  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.`);
3113
3113
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
3114
3114
  if (content !== "selection-copy") {
3115
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3116
- if (!maskAlone) _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3115
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3116
+ if (!maskAlone) _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3117
3117
  }
3118
3118
  const o = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
3119
3119
  const pixels = layer.type === "pixel" ? host.pixelsOf(layer) : null;
3120
3120
  if (layer.type === "smart" && !maskAlone) {
3121
3121
  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).`);
3122
- if (!_chunkO3ZU6QIZcjs.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.`);
3122
+ if (!_chunkXNZWATSBcjs.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.`);
3123
3123
  this.smart = layer;
3124
3124
  this.smartObject = true;
3125
- this.startGeometry = _chunkO3ZU6QIZcjs.placementGeometry.call(void 0, layer);
3125
+ this.startGeometry = _chunkXNZWATSBcjs.placementGeometry.call(void 0, layer);
3126
3126
  if (init.interpolation === void 0 && layer.placement.interpolation) this.interp = layer.placement.interpolation;
3127
3127
  this.startInterp = this.interp;
3128
- this.box = _chunkO3ZU6QIZcjs.contentsBox.call(void 0, layer.contents);
3128
+ this.box = _chunkXNZWATSBcjs.contentsBox.call(void 0, layer.contents);
3129
3129
  this.moves = mask && linked ? ["pixels", "mask"] : ["pixels"];
3130
3130
  this.geometryValue = this.startGeometry;
3131
3131
  this.shown = this.startLayers;
@@ -3133,8 +3133,8 @@ var FreeTransformSession = (_class5 = class {
3133
3133
  }
3134
3134
  if (layer.type === "type" && !maskAlone) {
3135
3135
  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).`);
3136
- const frame = _chunkO3ZU6QIZcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3137
- const m = _chunkO3ZU6QIZcjs.textMatrix.call(void 0, layer);
3136
+ const frame = _chunkXNZWATSBcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3137
+ const m = _chunkXNZWATSBcjs.textMatrix.call(void 0, layer);
3138
3138
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
3139
3139
  this.typeTarget = layer;
3140
3140
  this.typeLayer = true;
@@ -3153,7 +3153,7 @@ var FreeTransformSession = (_class5 = class {
3153
3153
  }
3154
3154
  if (layer.type === "shape" && !maskAlone) {
3155
3155
  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).`);
3156
- const g = _chunkO3ZU6QIZcjs.shapeGeometryBounds.call(void 0, layer);
3156
+ const g = _chunkXNZWATSBcjs.shapeGeometryBounds.call(void 0, layer);
3157
3157
  if (!g) fail(`Shape layer "${layer.name || id}" has no path to transform.`);
3158
3158
  const w = Math.max(g.width, 1);
3159
3159
  const h = Math.max(g.height, 1);
@@ -3201,7 +3201,7 @@ var FreeTransformSession = (_class5 = class {
3201
3201
  if (box) {
3202
3202
  const copy = {
3203
3203
  type: "pixel",
3204
- id: _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ),
3204
+ id: _chunkXNZWATSBcjs.newLayerId.call(void 0, ),
3205
3205
  name: `${layer.name || "Layer"} copy`,
3206
3206
  visible: true,
3207
3207
  opacity: 1,
@@ -3225,7 +3225,7 @@ var FreeTransformSession = (_class5 = class {
3225
3225
  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).");
3226
3226
  this.box = box;
3227
3227
  this.moves = moves;
3228
- this.startGeometry = _chunkO3ZU6QIZcjs.identityTransform.call(void 0, box);
3228
+ this.startGeometry = _chunkXNZWATSBcjs.identityTransform.call(void 0, box);
3229
3229
  this.startInterp = this.interp;
3230
3230
  this.geometryValue = this.startGeometry;
3231
3231
  this.shown = this.startLayers;
@@ -3303,8 +3303,8 @@ var FreeTransformSession = (_class5 = class {
3303
3303
  warp: changes.warp === void 0 ? _nullishCoalesce(this.geometryValue.warp, () => ( null)) : changes.warp
3304
3304
  };
3305
3305
  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.");
3306
- if (!_chunkO3ZU6QIZcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3307
- if (this.typeTarget && (_chunkO3ZU6QIZcjs.hasWarp.call(void 0, next) || !_chunkO3ZU6QIZcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3306
+ if (!_chunkXNZWATSBcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3307
+ if (this.typeTarget && (_chunkXNZWATSBcjs.hasWarp.call(void 0, next) || !_chunkXNZWATSBcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3308
3308
  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.");
3309
3309
  }
3310
3310
  this.geometryValue = next;
@@ -3316,10 +3316,10 @@ var FreeTransformSession = (_class5 = class {
3316
3316
  if (this.smart) return { layers: this.resampleSmart(final, preview), selection: this.startSelection };
3317
3317
  if (this.typeTarget) return { layers: this.resampleType(), selection: this.startSelection };
3318
3318
  const g = this.geometryValue;
3319
- const identity = _chunkO3ZU6QIZcjs.isIdentityTransform.call(void 0, g);
3320
- const warp = _chunkO3ZU6QIZcjs.hasWarp.call(void 0, g);
3321
- const h = warp ? null : _chunkO3ZU6QIZcjs.geometryHomography.call(void 0, g);
3322
- const f = warp ? _chunkO3ZU6QIZcjs.transformMap.call(void 0, g) : null;
3319
+ const identity = _chunkXNZWATSBcjs.isIdentityTransform.call(void 0, g);
3320
+ const warp = _chunkXNZWATSBcjs.hasWarp.call(void 0, g);
3321
+ const h = warp ? null : _chunkXNZWATSBcjs.geometryHomography.call(void 0, g);
3322
+ const f = warp ? _chunkXNZWATSBcjs.transformMap.call(void 0, g) : null;
3323
3323
  const step = final ? 1 : previewStep(preview.scale);
3324
3324
  const interpolation = final ? this.interp : this.interp === "nearest" ? "nearest" : "bilinear";
3325
3325
  let layers = this.startLayers;
@@ -3363,7 +3363,7 @@ var FreeTransformSession = (_class5 = class {
3363
3363
  if (part.what === "selection") {
3364
3364
  const { width, height } = this.host.canvas();
3365
3365
  const data = new Uint8Array(_chunkCWM3CUUXcjs.readRegion.call(void 0, result, { x: 0, y: 0, width, height }).buffer);
3366
- const next = _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, width, height, data);
3366
+ const next = _chunkXNZWATSBcjs.createSelectionMask.call(void 0, width, height, data);
3367
3367
  selection = next.bounds ? next : null;
3368
3368
  } else if (part.what === "pixels") {
3369
3369
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, targetId, (l) => {
@@ -3385,14 +3385,14 @@ var FreeTransformSession = (_class5 = class {
3385
3385
  resampleShape(final, preview, warpMap, h) {
3386
3386
  const layer = this.shape;
3387
3387
  let components = layer.components;
3388
- if (!_chunkO3ZU6QIZcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3388
+ if (!_chunkXNZWATSBcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3389
3389
  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;
3390
3390
  const map = _nullishCoalesce(warpMap, () => ( ((p) => h ? _chunkQT26RHKKcjs.applyHomography.call(void 0, h, p) : p)));
3391
- components = _chunkO3ZU6QIZcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3391
+ components = _chunkXNZWATSBcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3392
3392
  }
3393
3393
  const moved = { ...layer, components };
3394
3394
  delete moved.annotation;
3395
- const surface = _chunkO3ZU6QIZcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3395
+ const surface = _chunkXNZWATSBcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3396
3396
  return _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => ({ ...moved, surface }));
3397
3397
  }
3398
3398
  /**
@@ -3402,13 +3402,13 @@ var FreeTransformSession = (_class5 = class {
3402
3402
  resampleType() {
3403
3403
  const layer = this.typeTarget;
3404
3404
  const g = this.geometryValue;
3405
- if (_chunkO3ZU6QIZcjs.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.");
3406
- const m = _chunkO3ZU6QIZcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3405
+ if (_chunkXNZWATSBcjs.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.");
3406
+ const m = _chunkXNZWATSBcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3407
3407
  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.");
3408
3408
  const next = { ...layer, transform: m };
3409
3409
  delete next.annotation;
3410
- let layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkO3ZU6QIZcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3411
- const change = _chunkQT26RHKKcjs.multiplyHomographies.call(void 0, _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, _chunkRCUX6CT2cjs.invertMatrix.call(void 0, _chunkO3ZU6QIZcjs.textMatrix.call(void 0, layer))), _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, m));
3410
+ let layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkXNZWATSBcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3411
+ const change = _chunkQT26RHKKcjs.multiplyHomographies.call(void 0, _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, _chunkHRI3ZMDMcjs.invertMatrix.call(void 0, _chunkXNZWATSBcjs.textMatrix.call(void 0, layer))), _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, m));
3412
3412
  for (const part of this.parts) {
3413
3413
  if (part.what !== "mask") continue;
3414
3414
  const surface = _chunkHGTDMKNEcjs.transformSurface.call(void 0, part.moving, change, { interpolation: this.interp === "nearest" ? "nearest" : "bilinear" });
@@ -3424,12 +3424,12 @@ var FreeTransformSession = (_class5 = class {
3424
3424
  const canvas = this.host.canvas();
3425
3425
  try {
3426
3426
  if (final) {
3427
- const res = _chunkO3ZU6QIZcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3427
+ const res = _chunkXNZWATSBcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3428
3428
  this.smartMasksMoved = res.masksMoved;
3429
3429
  return res.layers;
3430
3430
  }
3431
3431
  const step = previewStep(preview.scale);
3432
- const surface = _chunkO3ZU6QIZcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3432
+ const surface = _chunkXNZWATSBcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3433
3433
  return _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, (l) => ({ ...l, placement, surface }));
3434
3434
  } catch (e) {
3435
3435
  if (e instanceof _chunkHGTDMKNEcjs.TransformTooLargeError) fail(e.message);
@@ -3439,10 +3439,10 @@ var FreeTransformSession = (_class5 = class {
3439
3439
  /** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
3440
3440
  isChanged() {
3441
3441
  const g = this.geometryValue;
3442
- if (!this.smart && !this.typeTarget) return !_chunkO3ZU6QIZcjs.isIdentityTransform.call(void 0, g);
3442
+ if (!this.smart && !this.typeTarget) return !_chunkXNZWATSBcjs.isIdentityTransform.call(void 0, g);
3443
3443
  const a = this.startGeometry;
3444
3444
  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);
3445
- const warp = (w, box) => w && _chunkO3ZU6QIZcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3445
+ const warp = (w, box) => w && _chunkXNZWATSBcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3446
3446
  return !same || warp(g.warp, g.box) !== warp(a.warp, a.box) || this.interp !== this.startInterp;
3447
3447
  }
3448
3448
  render(preview) {
@@ -3702,7 +3702,7 @@ function convertSurfaceColors(surface, t) {
3702
3702
  }
3703
3703
 
3704
3704
  // src/image-editor/controller.ts
3705
- var IMAGE_EDITOR_SCHEMA_VERSION = _chunkO3ZU6QIZcjs.LAYERED_SCHEMA_VERSION;
3705
+ var IMAGE_EDITOR_SCHEMA_VERSION = _chunkXNZWATSBcjs.LAYERED_SCHEMA_VERSION;
3706
3706
  var RETOUCH_TOOLS = ["clone", "heal", "spot-heal", "smudge", "dodge", "burn", "sponge", "blur", "sharpen", "history"];
3707
3707
  var isRetouchTool = (tool) => RETOUCH_TOOLS.includes(tool);
3708
3708
  var STROKE_TOOLS = ["brush", "eraser", "mixer", ...RETOUCH_TOOLS];
@@ -3896,7 +3896,7 @@ var PaintStrokeSession = (_class6 = class {
3896
3896
  for (const t of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, { x: r.x - this.apply.offset.x, y: r.y - this.apply.offset.y, width: r.width, height: r.height })) {
3897
3897
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, t.tx, t.ty);
3898
3898
  const cur = regions.get(key);
3899
- regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkO3ZU6QIZcjs.unionRect.call(void 0, cur.r, r) : r });
3899
+ regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkXNZWATSBcjs.unionRect.call(void 0, cur.r, r) : r });
3900
3900
  }
3901
3901
  }
3902
3902
  for (const [key, { tx, ty, r }] of regions) {
@@ -3928,7 +3928,7 @@ var PaintStrokeSession = (_class6 = class {
3928
3928
  }
3929
3929
  /** Finishes the stroke (one undo step) and returns what changed. */
3930
3930
  end() {
3931
- if (this.closed) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("This stroke has already ended.");
3931
+ if (this.closed) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("This stroke has already ended.");
3932
3932
  const last = _nullishCoalesce(this.last, () => ( void 0));
3933
3933
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
3934
3934
  _optionalChain([this, 'access', _109 => _109.flushView, 'optionalCall', _110 => _110()]);
@@ -4064,20 +4064,20 @@ function sameTile(a, b) {
4064
4064
  for (let i = 0; i < a.data.length; i++) if (a.data[i] !== b.data[i]) return false;
4065
4065
  return true;
4066
4066
  }
4067
- var DEFAULT_ADJUSTMENTS = _chunkO3ZU6QIZcjs.DEFAULT_ADJUSTMENTS_VALUES;
4067
+ var DEFAULT_ADJUSTMENTS = _chunkXNZWATSBcjs.DEFAULT_ADJUSTMENTS_VALUES;
4068
4068
  function normalizeStoredAdjustments(stored) {
4069
4069
  if (!stored) return { ...DEFAULT_ADJUSTMENTS };
4070
4070
  const out = {
4071
4071
  ...DEFAULT_ADJUSTMENTS,
4072
4072
  ...stored,
4073
- process: _chunkO3ZU6QIZcjs.normalizeProcessVersion.call(void 0, stored.process)
4073
+ process: _chunkXNZWATSBcjs.normalizeProcessVersion.call(void 0, stored.process)
4074
4074
  };
4075
- const layers = _chunkO3ZU6QIZcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4075
+ const layers = _chunkXNZWATSBcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4076
4076
  if (layers.length) out.layers = layers;
4077
4077
  else delete out.layers;
4078
4078
  return out;
4079
4079
  }
4080
- var isLayered = (data) => Boolean(data && data.version === _chunkO3ZU6QIZcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4080
+ var isLayered = (data) => Boolean(data && data.version === _chunkXNZWATSBcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4081
4081
  function migrateSerializedImageEditorState(data) {
4082
4082
  if (isLayered(data)) {
4083
4083
  const out = {
@@ -4109,10 +4109,10 @@ function migrateSerializedImageEditorState(data) {
4109
4109
  function migrateToLayeredState(data, size) {
4110
4110
  const clean = migrateSerializedImageEditorState(data);
4111
4111
  if (isLayered(clean)) return clean;
4112
- const stack = _chunkO3ZU6QIZcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4113
- const { layers, assets } = _chunkO3ZU6QIZcjs.serializeLayers.call(void 0, stack.layers);
4112
+ const stack = _chunkXNZWATSBcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4113
+ const { layers, assets } = _chunkXNZWATSBcjs.serializeLayers.call(void 0, stack.layers);
4114
4114
  const out = {
4115
- version: _chunkO3ZU6QIZcjs.LAYERED_SCHEMA_VERSION,
4115
+ version: _chunkXNZWATSBcjs.LAYERED_SCHEMA_VERSION,
4116
4116
  width: Math.round(size.width),
4117
4117
  height: Math.round(size.height),
4118
4118
  layers,
@@ -4126,8 +4126,8 @@ function migrateToLayeredState(data, size) {
4126
4126
  if (clean.selection) out.selection = clean.selection;
4127
4127
  return out;
4128
4128
  }
4129
- var DEFAULT_TRANSFORM = _chunkO3ZU6QIZcjs.DEFAULT_TRANSFORM_VALUES;
4130
- var DEFAULT_DEPTH_MASK = _chunkO3ZU6QIZcjs.DEFAULT_DEPTH_MASK_VALUES;
4129
+ var DEFAULT_TRANSFORM = _chunkXNZWATSBcjs.DEFAULT_TRANSFORM_VALUES;
4130
+ var DEFAULT_DEPTH_MASK = _chunkXNZWATSBcjs.DEFAULT_DEPTH_MASK_VALUES;
4131
4131
  var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
4132
4132
  var ImageEditorController = (_class7 = class {
4133
4133
 
@@ -4150,7 +4150,7 @@ var ImageEditorController = (_class7 = class {
4150
4150
  __init62() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
4151
4151
  __init63() {this.viewKey = []}
4152
4152
  /** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
4153
- __init64() {this.compositor = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)()}
4153
+ __init64() {this.compositor = new (0, _chunkXNZWATSBcjs.LayerCompositor)()}
4154
4154
  /** The effects provider slot (see `setEffectsProvider`). */
4155
4155
  __init65() {this.effects = new (0, _chunkRUZQMYXHcjs.EffectsSlot)()}
4156
4156
  /** Renders provider effects: effect smart filter results and effect layers. */
@@ -4208,7 +4208,7 @@ var ImageEditorController = (_class7 = class {
4208
4208
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
4209
4209
  if (_optionalChain([options, 'access', _126 => _126.initialState, 'optionalAccess', _127 => _127.selection])) {
4210
4210
  try {
4211
- this.state.selection = normalizeSelection(_chunkO3ZU6QIZcjs.deserializeSelection.call(void 0, options.initialState.selection));
4211
+ this.state.selection = normalizeSelection(_chunkXNZWATSBcjs.deserializeSelection.call(void 0, options.initialState.selection));
4212
4212
  } catch (e15) {
4213
4213
  }
4214
4214
  }
@@ -4320,10 +4320,10 @@ var ImageEditorController = (_class7 = class {
4320
4320
  if (l.type === "group") {
4321
4321
  const children = walk(l.children);
4322
4322
  if (children !== l.children) next2 = { ...l, children };
4323
- } 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 || _chunkO3ZU6QIZcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4323
+ } 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 || _chunkXNZWATSBcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4324
4324
  try {
4325
- const r = _chunkO3ZU6QIZcjs.rerender.call(void 0, l, canvas);
4326
- if (all || !_chunkO3ZU6QIZcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4325
+ const r = _chunkXNZWATSBcjs.rerender.call(void 0, l, canvas);
4326
+ if (all || !_chunkXNZWATSBcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4327
4327
  } catch (e17) {
4328
4328
  }
4329
4329
  }
@@ -4379,19 +4379,19 @@ var ImageEditorController = (_class7 = class {
4379
4379
  const d = await this.describeEffect(effect, "filter");
4380
4380
  const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
4381
4381
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
4382
- if (!found) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4382
+ if (!found) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4383
4383
  let layers = this.state.layers;
4384
4384
  let id = layerId;
4385
4385
  let converted = false;
4386
4386
  if (found.layer.type !== "smart") {
4387
- if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkO3ZU6QIZcjs.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.`);
4388
- const res2 = _chunkO3ZU6QIZcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4387
+ if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkXNZWATSBcjs.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.`);
4388
+ const res2 = _chunkXNZWATSBcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4389
4389
  layers = res2.layers;
4390
4390
  id = res2.layer.id;
4391
4391
  converted = true;
4392
4392
  }
4393
- const filter = _chunkO3ZU6QIZcjs.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 });
4394
- const res = _chunkO3ZU6QIZcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4393
+ const filter = _chunkXNZWATSBcjs.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 });
4394
+ const res = _chunkXNZWATSBcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4395
4395
  this.commitLayers(res.layers);
4396
4396
  return { layerId: id, filter: res.filter, converted };
4397
4397
  }
@@ -4402,9 +4402,9 @@ var ImageEditorController = (_class7 = class {
4402
4402
  * false, during a drag).
4403
4403
  */
4404
4404
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
4405
- const layer = _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4405
+ const layer = _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4406
4406
  const was = _optionalChain([layer, 'access', _134 => _134.smartFilters, 'optionalAccess', _135 => _135.filters, 'access', _136 => _136.find, 'call', _137 => _137((f) => f.id === filterId)]);
4407
- if (!was || was.kind !== "effect") throw new (0, _chunkO3ZU6QIZcjs.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"}.`);
4407
+ if (!was || was.kind !== "effect") throw new (0, _chunkXNZWATSBcjs.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"}.`);
4408
4408
  const update = {};
4409
4409
  if (changes.values) {
4410
4410
  const d = await this.describeEffect(was.effect);
@@ -4413,15 +4413,15 @@ var ImageEditorController = (_class7 = class {
4413
4413
  for (const [k, v] of Object.entries(changes.values)) {
4414
4414
  if (v !== null) given[k] = v;
4415
4415
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4416
- else throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4416
+ else throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4417
4417
  }
4418
4418
  update.values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4419
4419
  }
4420
4420
  for (const k of ["enabled", "blend", "opacity"]) if (changes[k] !== void 0) update[k] = changes[k];
4421
- let res = _chunkO3ZU6QIZcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4422
- if (changes.index !== void 0) res = { ...res, layers: _chunkO3ZU6QIZcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4421
+ let res = _chunkXNZWATSBcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4422
+ if (changes.index !== void 0) res = { ...res, layers: _chunkXNZWATSBcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4423
4423
  this.commitLayers(res.layers, void 0, commitToHistory);
4424
- return _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4424
+ return _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4425
4425
  }
4426
4426
  /**
4427
4427
  * Adds an effect layer: a pixel layer drawn by a provider generator, overlay or title effect at
@@ -4433,12 +4433,12 @@ var ImageEditorController = (_class7 = class {
4433
4433
  const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
4434
4434
  const { width, height } = this.naturalSize;
4435
4435
  const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time: options.time });
4436
- const blend = _chunkO3ZU6QIZcjs.parseBlend.call(void 0, options.blend);
4437
- if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("opacity must be from 0 to 1.");
4436
+ const blend = _chunkXNZWATSBcjs.parseBlend.call(void 0, options.blend);
4437
+ if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("opacity must be from 0 to 1.");
4438
4438
  const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4439
4439
  const layer = {
4440
4440
  type: "pixel",
4441
- id: options.id && !ids.has(options.id) ? options.id : _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ),
4441
+ id: options.id && !ids.has(options.id) ? options.id : _chunkXNZWATSBcjs.newLayerId.call(void 0, ),
4442
4442
  name: _optionalChain([options, 'access', _140 => _140.name, 'optionalAccess', _141 => _141.trim, 'call', _142 => _142()]) || d.name,
4443
4443
  visible: true,
4444
4444
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
@@ -4447,7 +4447,7 @@ var ImageEditorController = (_class7 = class {
4447
4447
  offset: { x: 0, y: 0 },
4448
4448
  generator: { effect: d.id, provider: this.effects.require().id, name: d.name, values, ...options.time ? { time: options.time } : {} }
4449
4449
  };
4450
- const next = _chunkO3ZU6QIZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4450
+ const next = _chunkXNZWATSBcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4451
4451
  this.commitLayers(next, () => {
4452
4452
  this.state.activeLayerId = layer.id;
4453
4453
  this.state.activeTarget = "pixels";
@@ -4462,8 +4462,8 @@ var ImageEditorController = (_class7 = class {
4462
4462
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
4463
4463
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
4464
4464
  const layer = _optionalChain([found, 'optionalAccess', _143 => _143.layer]);
4465
- if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4466
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4465
+ if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4466
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4467
4467
  const g = layer.generator;
4468
4468
  const d = await this.describeEffect(g.effect);
4469
4469
  const base = { ...g.values };
@@ -4471,7 +4471,7 @@ var ImageEditorController = (_class7 = class {
4471
4471
  for (const [k, v] of Object.entries(_nullishCoalesce(changes.values, () => ( {})))) {
4472
4472
  if (v !== null) given[k] = v;
4473
4473
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4474
- else throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4474
+ else throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4475
4475
  }
4476
4476
  const values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4477
4477
  const time = _nullishCoalesce(_nullishCoalesce(changes.time, () => ( g.time)), () => ( 0));
@@ -4486,7 +4486,7 @@ var ImageEditorController = (_class7 = class {
4486
4486
  /** Turns an effect layer into a plain pixel layer keeping its pixels (one undo step). */
4487
4487
  rasterizeEffectLayer(layerId) {
4488
4488
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
4489
- if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4489
+ if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4490
4490
  this.commitLayers(
4491
4491
  _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
4492
4492
  const { generator: _g, ...rest } = l;
@@ -4514,7 +4514,7 @@ var ImageEditorController = (_class7 = class {
4514
4514
  if (key.length === this.viewKey.length && key.every((v, i) => v === this.viewKey[i])) return;
4515
4515
  this.viewKey = key;
4516
4516
  const { width, height } = this.naturalSize;
4517
- const view = _chunkO3ZU6QIZcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4517
+ const view = _chunkXNZWATSBcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4518
4518
  s.adjustments = view.adjustments;
4519
4519
  s.depthMask = view.depthMask;
4520
4520
  s.annotations = view.annotations;
@@ -4668,7 +4668,7 @@ var ImageEditorController = (_class7 = class {
4668
4668
  applyCropPreset(ratio) {
4669
4669
  this.recordHistory();
4670
4670
  const { width, height } = this.state.imageDimensions;
4671
- if (ratio && _chunkO3ZU6QIZcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4671
+ if (ratio && _chunkXNZWATSBcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4672
4672
  ratio = 1 / ratio;
4673
4673
  }
4674
4674
  if (!ratio) {
@@ -4750,7 +4750,7 @@ var ImageEditorController = (_class7 = class {
4750
4750
  */
4751
4751
  getLayerPixels(id) {
4752
4752
  const layer = this.getLayer(id);
4753
- if (!layer || !_chunkO3ZU6QIZcjs.hasSurface.call(void 0, layer)) return null;
4753
+ if (!layer || !_chunkXNZWATSBcjs.hasSurface.call(void 0, layer)) return null;
4754
4754
  const surface = this.surfaceOf(layer);
4755
4755
  const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, surface);
4756
4756
  if (!b) return null;
@@ -4763,7 +4763,7 @@ var ImageEditorController = (_class7 = class {
4763
4763
  */
4764
4764
  getLayerBounds(id) {
4765
4765
  const layer = this.getLayer(id);
4766
- if (!layer || !_chunkO3ZU6QIZcjs.hasSurface.call(void 0, layer)) return null;
4766
+ if (!layer || !_chunkXNZWATSBcjs.hasSurface.call(void 0, layer)) return null;
4767
4767
  const surface = this.surfaceOf(layer);
4768
4768
  let b = this.boundsCache.get(surface);
4769
4769
  if (b === void 0) {
@@ -4778,9 +4778,9 @@ var ImageEditorController = (_class7 = class {
4778
4778
  */
4779
4779
  getLayerDataURL(id) {
4780
4780
  const layer = this.getLayer(id);
4781
- if (!layer || !_chunkO3ZU6QIZcjs.hasSurface.call(void 0, layer)) return null;
4781
+ if (!layer || !_chunkXNZWATSBcjs.hasSurface.call(void 0, layer)) return null;
4782
4782
  const surface = this.surfaceOf(layer);
4783
- const enc = _chunkO3ZU6QIZcjs.encodeSurface.call(void 0, surface);
4783
+ const enc = _chunkXNZWATSBcjs.encodeSurface.call(void 0, surface);
4784
4784
  return enc ? enc.url : null;
4785
4785
  }
4786
4786
  /**
@@ -4922,19 +4922,19 @@ var ImageEditorController = (_class7 = class {
4922
4922
  if (init.pixels) {
4923
4923
  const px2 = init.pixels;
4924
4924
  if (!(px2.width > 0 && px2.height > 0) || px2.data.length < px2.width * px2.height * 4) {
4925
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4925
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4926
4926
  }
4927
4927
  surface = _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, px2, 4);
4928
4928
  } else if (init.color !== void 0) {
4929
4929
  const c = parseColor(init.color);
4930
4930
  surface = _chunkCWM3CUUXcjs.solidSurface.call(void 0, 4, { x: 0, y: 0, width, height }, _chunkCWM3CUUXcjs.packRgba.call(void 0, c[0], c[1], c[2], c[3]));
4931
4931
  }
4932
- const blend = _chunkO3ZU6QIZcjs.parseBlend.call(void 0, init.blend);
4933
- if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("opacity must be from 0 to 1.");
4932
+ const blend = _chunkXNZWATSBcjs.parseBlend.call(void 0, init.blend);
4933
+ if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("opacity must be from 0 to 1.");
4934
4934
  const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4935
4935
  const layer = {
4936
4936
  type: "pixel",
4937
- id: init.id && !ids.has(init.id) ? init.id : _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ),
4937
+ id: init.id && !ids.has(init.id) ? init.id : _chunkXNZWATSBcjs.newLayerId.call(void 0, ),
4938
4938
  name: _optionalChain([init, 'access', _155 => _155.name, 'optionalAccess', _156 => _156.trim, 'call', _157 => _157()]) || this.nextLayerName(),
4939
4939
  visible: _nullishCoalesce(init.visible, () => ( true)),
4940
4940
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
@@ -4943,7 +4943,7 @@ var ImageEditorController = (_class7 = class {
4943
4943
  offset: { x: Math.round(_nullishCoalesce(init.x, () => ( 0))), y: Math.round(_nullishCoalesce(init.y, () => ( 0))) }
4944
4944
  };
4945
4945
  if (init.fillOpacity !== void 0 && init.fillOpacity !== 1) layer.fillOpacity = init.fillOpacity;
4946
- const next = _chunkO3ZU6QIZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4946
+ const next = _chunkXNZWATSBcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4947
4947
  this.commitLayers(next, () => {
4948
4948
  this.state.activeLayerId = layer.id;
4949
4949
  this.state.activeTarget = "pixels";
@@ -4983,12 +4983,12 @@ var ImageEditorController = (_class7 = class {
4983
4983
  try {
4984
4984
  img = await this.renderer.imageCache.get(src);
4985
4985
  } catch (e22) {
4986
- throw new (0, _chunkO3ZU6QIZcjs.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.");
4986
+ throw new (0, _chunkXNZWATSBcjs.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.");
4987
4987
  }
4988
4988
  const w = img.naturalWidth || img.width;
4989
4989
  const h = img.naturalHeight || img.height;
4990
4990
  const ctx = this.renderer.createCanvas(w, h).getContext("2d");
4991
- if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4991
+ if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4992
4992
  ctx.drawImage(img, 0, 0, w, h);
4993
4993
  const data = ctx.getImageData(0, 0, w, h);
4994
4994
  return { width: w, height: h, data: data.data };
@@ -5001,7 +5001,7 @@ var ImageEditorController = (_class7 = class {
5001
5001
  }
5002
5002
  /** Duplicates a layer (with its children) directly above it, as one undo step. Returns the copy's id. */
5003
5003
  duplicateLayer(id, name) {
5004
- const res = _chunkO3ZU6QIZcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
5004
+ const res = _chunkXNZWATSBcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
5005
5005
  this.commitLayers(res.layers, () => {
5006
5006
  this.state.activeLayerId = res.id;
5007
5007
  });
@@ -5009,16 +5009,16 @@ var ImageEditorController = (_class7 = class {
5009
5009
  }
5010
5010
  /** Deletes a layer (refused when locked), as one undo step. */
5011
5011
  removeLayer(id) {
5012
- const next = _chunkO3ZU6QIZcjs.removeLayer.call(void 0, this.state.layers, id);
5012
+ const next = _chunkXNZWATSBcjs.removeLayer.call(void 0, this.state.layers, id);
5013
5013
  this.commitLayers(next, () => {
5014
- if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkO3ZU6QIZcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
5014
+ if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkXNZWATSBcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
5015
5015
  this.state.selectedAnnotationId = null;
5016
5016
  }
5017
5017
  });
5018
5018
  }
5019
5019
  /** Moves a layer above / below another, or into a group, as one undo step. Returns its new parent and index. */
5020
5020
  moveLayer(id, placement) {
5021
- const next = _chunkO3ZU6QIZcjs.moveLayer.call(void 0, this.state.layers, id, placement);
5021
+ const next = _chunkXNZWATSBcjs.moveLayer.call(void 0, this.state.layers, id, placement);
5022
5022
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
5023
5023
  if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _160 => _160.parent, 'optionalAccess', _161 => _161.id]), () => ( null)), index: loc.index };
5024
5024
  this.commitLayers(next);
@@ -5029,23 +5029,23 @@ var ImageEditorController = (_class7 = class {
5029
5029
  * one undo step (`commitToHistory = false` for the moves of a slider drag). Returns the layer.
5030
5030
  */
5031
5031
  setLayerProperties(id, props, commitToHistory = true) {
5032
- const next = _chunkO3ZU6QIZcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5032
+ const next = _chunkXNZWATSBcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5033
5033
  this.commitLayers(next, void 0, commitToHistory);
5034
5034
  return _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer;
5035
5035
  }
5036
5036
  /** Adds an empty pass-through group above the active layer (or at `placement`) and makes it active. Returns its id. */
5037
5037
  addGroup(init = {}) {
5038
- const blend = init.blend === void 0 ? "pass-through" : _chunkO3ZU6QIZcjs.parseBlend.call(void 0, init.blend, true);
5038
+ const blend = init.blend === void 0 ? "pass-through" : _chunkXNZWATSBcjs.parseBlend.call(void 0, init.blend, true);
5039
5039
  const group = {
5040
5040
  type: "group",
5041
- id: _chunkO3ZU6QIZcjs.newLayerId.call(void 0, "group"),
5041
+ id: _chunkXNZWATSBcjs.newLayerId.call(void 0, "group"),
5042
5042
  name: _optionalChain([init, 'access', _164 => _164.name, 'optionalAccess', _165 => _165.trim, 'call', _166 => _166()]) || "Group",
5043
5043
  visible: true,
5044
5044
  opacity: 1,
5045
5045
  blend,
5046
5046
  children: []
5047
5047
  };
5048
- const next = _chunkO3ZU6QIZcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5048
+ const next = _chunkXNZWATSBcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5049
5049
  this.commitLayers(next, () => {
5050
5050
  this.state.activeLayerId = group.id;
5051
5051
  this.state.activeTarget = "pixels";
@@ -5054,7 +5054,7 @@ var ImageEditorController = (_class7 = class {
5054
5054
  }
5055
5055
  /** Puts sibling layers into a new group (one undo step). Returns the group id. */
5056
5056
  groupLayers(ids, name) {
5057
- const res = _chunkO3ZU6QIZcjs.groupLayers.call(void 0, this.state.layers, ids, name);
5057
+ const res = _chunkXNZWATSBcjs.groupLayers.call(void 0, this.state.layers, ids, name);
5058
5058
  this.commitLayers(res.layers, () => {
5059
5059
  this.state.activeLayerId = res.id;
5060
5060
  });
@@ -5062,7 +5062,7 @@ var ImageEditorController = (_class7 = class {
5062
5062
  }
5063
5063
  /** Replaces a group by its children (one undo step). Returns the child ids, bottom to top. */
5064
5064
  ungroupLayer(id) {
5065
- const res = _chunkO3ZU6QIZcjs.ungroupLayer.call(void 0, this.state.layers, id);
5065
+ const res = _chunkXNZWATSBcjs.ungroupLayer.call(void 0, this.state.layers, id);
5066
5066
  this.commitLayers(res.layers);
5067
5067
  return res.ids;
5068
5068
  }
@@ -5071,38 +5071,38 @@ var ImageEditorController = (_class7 = class {
5071
5071
  * (`commitToHistory = false` for the moves of a drag). Returns the offset and document bounds.
5072
5072
  */
5073
5073
  offsetLayer(id, move, commitToHistory = true) {
5074
- const layer = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5074
+ const layer = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5075
5075
  if (layer.type === "smart") {
5076
5076
  const tl = layer.placement.corners[0];
5077
5077
  const dx = move.x !== void 0 ? move.x - tl.x : _nullishCoalesce(move.dx, () => ( 0));
5078
5078
  const dy = move.y !== void 0 ? move.y - tl.y : _nullishCoalesce(move.dy, () => ( 0));
5079
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("x and y must be numbers.");
5080
- this.commitLayers(_chunkO3ZU6QIZcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5079
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("x and y must be numbers.");
5080
+ this.commitLayers(_chunkXNZWATSBcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5081
5081
  const moved = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id).layer;
5082
5082
  return { offset: { x: Math.round(moved.placement.corners[0].x), y: Math.round(moved.placement.corners[0].y) }, bounds: this.getLayerBounds(id) };
5083
5083
  }
5084
5084
  if (layer.type === "shape") {
5085
- const g = _nullishCoalesce(_chunkO3ZU6QIZcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5085
+ const g = _nullishCoalesce(_chunkXNZWATSBcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5086
5086
  const dx = move.x !== void 0 ? move.x - g.x : _nullishCoalesce(move.dx, () => ( 0));
5087
5087
  const dy = move.y !== void 0 ? move.y - g.y : _nullishCoalesce(move.dy, () => ( 0));
5088
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("x and y must be numbers.");
5089
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5090
- let moved = _chunkO3ZU6QIZcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5088
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("x and y must be numbers.");
5089
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5090
+ let moved = _chunkXNZWATSBcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5091
5091
  const mask = layer.mask;
5092
5092
  if (mask && mask.linked !== false && !mask.source && (Math.round(dx) || Math.round(dy))) moved = { ...moved, mask: { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, Math.round(dx), Math.round(dy)) } };
5093
5093
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
5094
- const b = _nullishCoalesce(_chunkO3ZU6QIZcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5094
+ const b = _nullishCoalesce(_chunkXNZWATSBcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5095
5095
  return { offset: { x: Math.round(b.x), y: Math.round(b.y) }, bounds: this.getLayerBounds(id) };
5096
5096
  }
5097
5097
  if (layer.type === "type") {
5098
5098
  const m = _nullishCoalesce(layer.transform, () => ( [1, 0, 0, 1, 0, 0]));
5099
5099
  const dx = move.x !== void 0 ? move.x - m[4] : _nullishCoalesce(move.dx, () => ( 0));
5100
5100
  const dy = move.y !== void 0 ? move.y - m[5] : _nullishCoalesce(move.dy, () => ( 0));
5101
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("x and y must be numbers.");
5102
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5101
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("x and y must be numbers.");
5102
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5103
5103
  const mx = Math.round(dx);
5104
5104
  const my = Math.round(dy);
5105
- let moved = { ..._chunkO3ZU6QIZcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, mx, my) };
5105
+ let moved = { ..._chunkXNZWATSBcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, mx, my) };
5106
5106
  const mask = layer.mask;
5107
5107
  if (mask && mask.linked !== false && !mask.source && (mx || my)) moved = { ...moved, mask: { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, mx, my) } };
5108
5108
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
@@ -5112,7 +5112,7 @@ var ImageEditorController = (_class7 = class {
5112
5112
  const current = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
5113
5113
  const x = _nullishCoalesce(move.x, () => ( current.x + (_nullishCoalesce(move.dx, () => ( 0)))));
5114
5114
  const y = _nullishCoalesce(move.y, () => ( current.y + (_nullishCoalesce(move.dy, () => ( 0)))));
5115
- const next = _chunkO3ZU6QIZcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5115
+ const next = _chunkXNZWATSBcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5116
5116
  this.commitLayers(next, void 0, commitToHistory);
5117
5117
  return { offset: { x: Math.round(x), y: Math.round(y) }, bounds: this.getLayerBounds(id) };
5118
5118
  }
@@ -5122,11 +5122,11 @@ var ImageEditorController = (_class7 = class {
5122
5122
  * target when the layer is active.
5123
5123
  */
5124
5124
  addLayerMask(id, from = "reveal-all", props = {}) {
5125
- const layer = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5125
+ const layer = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5126
5126
  let mask;
5127
5127
  if (from === "selection") {
5128
5128
  const sel = this.state.selection;
5129
- if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5129
+ if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5130
5130
  mask = this.maskFromSelection(sel, props);
5131
5131
  if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
5132
5132
  mask = { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
@@ -5135,7 +5135,7 @@ var ImageEditorController = (_class7 = class {
5135
5135
  const v = from === "reveal-all" ? 255 : 0;
5136
5136
  mask = withMaskProps({ surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5137
5137
  }
5138
- const next = _chunkO3ZU6QIZcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5138
+ const next = _chunkXNZWATSBcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5139
5139
  this.commitLayers(next, () => {
5140
5140
  if (this.state.activeLayerId === id) this.state.activeTarget = "mask";
5141
5141
  });
@@ -5143,18 +5143,18 @@ var ImageEditorController = (_class7 = class {
5143
5143
  }
5144
5144
  /** Removes a layer's mask (one undo step). */
5145
5145
  removeLayerMask(id) {
5146
- const layer = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5147
- if (!layer.mask) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5148
- this.commitLayers(_chunkO3ZU6QIZcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5146
+ const layer = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5147
+ if (!layer.mask) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5148
+ this.commitLayers(_chunkXNZWATSBcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5149
5149
  if (this.state.activeLayerId === id) this.state.activeTarget = "pixels";
5150
5150
  });
5151
5151
  }
5152
5152
  /** Changes any layer mask's density, feather, enabled or linked flag (pixels kept). Returns the mask. */
5153
5153
  setLayerMaskProps(id, props, commitToHistory = true) {
5154
- const layer = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5155
- if (!layer.mask) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5154
+ const layer = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5155
+ if (!layer.mask) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5156
5156
  const mask = withMaskProps(layer.mask, props);
5157
- this.commitLayers(_chunkO3ZU6QIZcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5157
+ this.commitLayers(_chunkXNZWATSBcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5158
5158
  return mask;
5159
5159
  }
5160
5160
  /**
@@ -5162,11 +5162,11 @@ var ImageEditorController = (_class7 = class {
5162
5162
  * the depth map) and removes the mask, as one undo step.
5163
5163
  */
5164
5164
  async applyLayerMask(id) {
5165
- const loc = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id);
5165
+ const loc = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id);
5166
5166
  const layer = loc.layer;
5167
- if (layer.type !== "pixel") throw new (0, _chunkO3ZU6QIZcjs.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.`);
5168
- if (!layer.mask) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5169
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5167
+ if (layer.type !== "pixel") throw new (0, _chunkXNZWATSBcjs.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.`);
5168
+ if (!layer.mask) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5169
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5170
5170
  const { width, height } = this.naturalSize;
5171
5171
  await this.renderer.prepareLayerAssets([layer], width, height);
5172
5172
  const sources = this.renderer.compositorSources(width, height);
@@ -5199,13 +5199,13 @@ var ImageEditorController = (_class7 = class {
5199
5199
  */
5200
5200
  layerViaCopy(options = {}) {
5201
5201
  const id = _nullishCoalesce(options.layerId, () => ( this.state.activeLayerId));
5202
- if (!id) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5203
- const loc = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id);
5202
+ if (!id) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5203
+ const loc = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id);
5204
5204
  const layer = loc.layer;
5205
- if (layer.type !== "pixel") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5205
+ if (layer.type !== "pixel") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5206
5206
  const sel = this.state.selection;
5207
- if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5208
- if (options.cut) _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5207
+ if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5208
+ if (options.cut) _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5209
5209
  const surface = this.surfaceOf(layer);
5210
5210
  const sb = sel.bounds;
5211
5211
  const src = { x: sb.x - layer.offset.x, y: sb.y - layer.offset.y, width: sb.width, height: sb.height };
@@ -5221,7 +5221,7 @@ var ImageEditorController = (_class7 = class {
5221
5221
  }
5222
5222
  const copy = {
5223
5223
  type: "pixel",
5224
- id: _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ),
5224
+ id: _chunkXNZWATSBcjs.newLayerId.call(void 0, ),
5225
5225
  name: _optionalChain([options, 'access', _169 => _169.name, 'optionalAccess', _170 => _170.trim, 'call', _171 => _171()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
5226
5226
  visible: true,
5227
5227
  opacity: 1,
@@ -5294,7 +5294,7 @@ var ImageEditorController = (_class7 = class {
5294
5294
  * Refused while another transform is open.
5295
5295
  */
5296
5296
  beginFreeTransform(init = {}) {
5297
- if (this.getFreeTransform()) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5297
+ if (this.getFreeTransform()) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5298
5298
  const session = new FreeTransformSession(this.transformHost(), init);
5299
5299
  this.openTransform = session;
5300
5300
  this.notify();
@@ -5308,26 +5308,26 @@ var ImageEditorController = (_class7 = class {
5308
5308
  */
5309
5309
  transformLayer(spec) {
5310
5310
  const given = [spec.matrix, spec.corners, spec.params].filter((v) => v !== void 0).length;
5311
- if (given > 1) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5312
- if (!given && spec.warp === void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5311
+ if (given > 1) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5312
+ if (!given && spec.warp === void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5313
5313
  if (spec.matrix && !(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) {
5314
- throw new (0, _chunkO3ZU6QIZcjs.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).");
5314
+ throw new (0, _chunkXNZWATSBcjs.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).");
5315
5315
  }
5316
5316
  if (spec.matrix) {
5317
5317
  const [a, b, c, d] = spec.matrix;
5318
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5318
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5319
5319
  }
5320
5320
  const session = this.beginFreeTransform(spec);
5321
5321
  try {
5322
5322
  const g = session.startGeometry;
5323
- const corners = spec.matrix ? g.corners.map((p) => _chunkRCUX6CT2cjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkO3ZU6QIZcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5323
+ const corners = spec.matrix ? g.corners.map((p) => _chunkHRI3ZMDMcjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkXNZWATSBcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5324
5324
  let warp = spec.warp === void 0 ? _nullishCoalesce(g.warp, () => ( null)) : null;
5325
5325
  if (spec.warp) {
5326
5326
  if ("style" in spec.warp) {
5327
- if (!_chunkRCUX6CT2cjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkRCUX6CT2cjs.WARP_STYLES.join(", ")}.`);
5328
- warp = _chunkO3ZU6QIZcjs.presetWarp.call(void 0, session.box, spec.warp);
5327
+ if (!_chunkHRI3ZMDMcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkHRI3ZMDMcjs.WARP_STYLES.join(", ")}.`);
5328
+ warp = _chunkXNZWATSBcjs.presetWarp.call(void 0, session.box, spec.warp);
5329
5329
  } else {
5330
- if (!_chunkO3ZU6QIZcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkO3ZU6QIZcjs.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.");
5330
+ if (!_chunkXNZWATSBcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkXNZWATSBcjs.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.");
5331
5331
  warp = spec.warp;
5332
5332
  }
5333
5333
  }
@@ -5340,10 +5340,10 @@ var ImageEditorController = (_class7 = class {
5340
5340
  }
5341
5341
  /** Flips the layer (or its selected pixels, or the outline) about the frame's centre, exactly (one undo step). */
5342
5342
  flipLayer(axis, init = {}) {
5343
- if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5343
+ if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5344
5344
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5345
5345
  try {
5346
- session.update({ corners: _chunkO3ZU6QIZcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5346
+ session.update({ corners: _chunkXNZWATSBcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5347
5347
  return session.commit();
5348
5348
  } catch (e) {
5349
5349
  session.cancel();
@@ -5355,16 +5355,16 @@ var ImageEditorController = (_class7 = class {
5355
5355
  * centre, snapped so pixels land on whole pixels: exact, no resampling (one undo step).
5356
5356
  */
5357
5357
  rotateLayer90(turn, init = {}) {
5358
- if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5358
+ if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5359
5359
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5360
5360
  try {
5361
- const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkO3ZU6QIZcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5361
+ const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkXNZWATSBcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5362
5362
  const cx = b.x + b.width / 2;
5363
5363
  const cy = b.y + b.height / 2;
5364
5364
  const ox = turn === 180 ? 0 : Math.round(cx - b.height / 2) - (cx - b.height / 2);
5365
5365
  const oy = turn === 180 ? 0 : Math.round(cy - b.width / 2) - (cy - b.width / 2);
5366
5366
  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];
5367
- session.update({ corners: session.startGeometry.corners.map((p) => _chunkRCUX6CT2cjs.applyMatrix.call(void 0, m, p)) }, false);
5367
+ session.update({ corners: session.startGeometry.corners.map((p) => _chunkHRI3ZMDMcjs.applyMatrix.call(void 0, m, p)) }, false);
5368
5368
  return session.commit();
5369
5369
  } catch (e) {
5370
5370
  session.cancel();
@@ -5373,20 +5373,20 @@ var ImageEditorController = (_class7 = class {
5373
5373
  }
5374
5374
  /** Adds a `develop` or `blur` filter to a pixel layer (one undo step). Returns the layer's filters. */
5375
5375
  addLayerFilter(id, filter) {
5376
- const f = _chunkO3ZU6QIZcjs.normalizeFilter.call(void 0, filter);
5377
- const next = _chunkO3ZU6QIZcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5376
+ const f = _chunkXNZWATSBcjs.normalizeFilter.call(void 0, filter);
5377
+ const next = _chunkXNZWATSBcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5378
5378
  this.commitLayers(next);
5379
5379
  return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5380
5380
  }
5381
5381
  /** Changes one filter (one undo step, or none with `commitToHistory = false` during a drag). Returns the filters. */
5382
5382
  updateLayerFilter(id, filterId, changes, commitToHistory = true) {
5383
- const next = _chunkO3ZU6QIZcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5383
+ const next = _chunkXNZWATSBcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5384
5384
  this.commitLayers(next, void 0, commitToHistory);
5385
5385
  return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5386
5386
  }
5387
5387
  /** Removes one filter (one undo step). Returns the remaining filters. */
5388
5388
  removeLayerFilter(id, filterId) {
5389
- const next = _chunkO3ZU6QIZcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5389
+ const next = _chunkXNZWATSBcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5390
5390
  this.commitLayers(next);
5391
5391
  return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5392
5392
  }
@@ -5402,8 +5402,8 @@ var ImageEditorController = (_class7 = class {
5402
5402
  */
5403
5403
  convertToSmartObject(ids, options = {}) {
5404
5404
  const list = _optionalChain([ids, 'optionalAccess', _177 => _177.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
5405
- if (!list.length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5406
- const res = _chunkO3ZU6QIZcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5405
+ if (!list.length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5406
+ const res = _chunkXNZWATSBcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5407
5407
  this.commitLayers(res.layers, () => {
5408
5408
  this.state.activeLayerId = res.layer.id;
5409
5409
  this.state.activeTarget = "pixels";
@@ -5412,7 +5412,7 @@ var ImageEditorController = (_class7 = class {
5412
5412
  }
5413
5413
  /** Layer › Smart Objects › Rasterize (one undo step): the smart object becomes a pixel layer holding what it renders. */
5414
5414
  rasterizeSmartObject(id) {
5415
- const res = _chunkO3ZU6QIZcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5415
+ const res = _chunkXNZWATSBcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5416
5416
  this.commitLayers(res.layers, () => {
5417
5417
  if (this.state.activeLayerId === id && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
5418
5418
  });
@@ -5420,10 +5420,10 @@ var ImageEditorController = (_class7 = class {
5420
5420
  }
5421
5421
  /** A smart object's contents, placement and smart filters as plain data (see `SmartObjectInfo`). */
5422
5422
  getSmartObject(id) {
5423
- const layer = _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5423
+ const layer = _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, id);
5424
5424
  const c = layer.contents;
5425
- const g = _chunkO3ZU6QIZcjs.placementGeometry.call(void 0, layer);
5426
- const readout = _chunkO3ZU6QIZcjs.describeTransform.call(void 0, g);
5425
+ const g = _chunkXNZWATSBcjs.placementGeometry.call(void 0, layer);
5426
+ const readout = _chunkXNZWATSBcjs.describeTransform.call(void 0, g);
5427
5427
  const stack = layer.smartFilters;
5428
5428
  return {
5429
5429
  layerId: layer.id,
@@ -5433,10 +5433,10 @@ var ImageEditorController = (_class7 = class {
5433
5433
  kind: c.kind,
5434
5434
  width: c.width,
5435
5435
  height: c.height,
5436
- decoded: _chunkO3ZU6QIZcjs.isContentsDecoded.call(void 0, c),
5436
+ decoded: _chunkXNZWATSBcjs.isContentsDecoded.call(void 0, c),
5437
5437
  fileType: _nullishCoalesce(_optionalChain([c, 'access', _178 => _178.file, 'optionalAccess', _179 => _179.type]), () => ( null)),
5438
5438
  linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _180 => _180.linked, 'optionalAccess', _181 => _181.path]), () => ( null)),
5439
- instances: _chunkO3ZU6QIZcjs.instancesOf.call(void 0, this.state.layers, c.id),
5439
+ instances: _chunkXNZWATSBcjs.instancesOf.call(void 0, this.state.layers, c.id),
5440
5440
  layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
5441
5441
  },
5442
5442
  placement: {
@@ -5448,8 +5448,8 @@ var ImageEditorController = (_class7 = class {
5448
5448
  scaleY: readout.scaleY,
5449
5449
  rotate: readout.rotate,
5450
5450
  skewX: readout.skewX,
5451
- center: _chunkO3ZU6QIZcjs.anchorPoint.call(void 0, g, "center"),
5452
- bounds: _chunkO3ZU6QIZcjs.transformedBox.call(void 0, g)
5451
+ center: _chunkXNZWATSBcjs.anchorPoint.call(void 0, g, "center"),
5452
+ bounds: _chunkXNZWATSBcjs.transformedBox.call(void 0, g)
5453
5453
  },
5454
5454
  smartFilters: {
5455
5455
  enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _182 => _182.enabled]), () => ( true)),
@@ -5466,7 +5466,7 @@ var ImageEditorController = (_class7 = class {
5466
5466
  * change. Returns the new placement summary.
5467
5467
  */
5468
5468
  setSmartObjectPlacement(id, placement, commitToHistory = true) {
5469
- const res = _chunkO3ZU6QIZcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5469
+ const res = _chunkXNZWATSBcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5470
5470
  this.commitLayers(res.layers, void 0, commitToHistory);
5471
5471
  return { ...this.getSmartObject(id).placement, masksMoved: res.masksMoved };
5472
5472
  }
@@ -5479,23 +5479,23 @@ var ImageEditorController = (_class7 = class {
5479
5479
  * nothing is relative to the current transform.
5480
5480
  */
5481
5481
  setSmartObjectTransform(id, spec) {
5482
- const layer = _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5483
- const g = _chunkO3ZU6QIZcjs.placementGeometry.call(void 0, layer);
5482
+ const layer = _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, id);
5483
+ const g = _chunkXNZWATSBcjs.placementGeometry.call(void 0, layer);
5484
5484
  const numeric = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y"].filter((k) => spec[k] !== void 0);
5485
5485
  const ways = [spec.corners !== void 0, spec.matrix !== void 0, numeric.length > 0].filter(Boolean).length;
5486
- if (ways > 1) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5486
+ if (ways > 1) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5487
5487
  let corners = g.corners;
5488
5488
  if (spec.corners) corners = spec.corners;
5489
5489
  else if (spec.matrix) {
5490
- if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkO3ZU6QIZcjs.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).");
5490
+ if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkXNZWATSBcjs.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).");
5491
5491
  const [a, b, c, d] = spec.matrix;
5492
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5493
- corners = _chunkO3ZU6QIZcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5492
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5493
+ corners = _chunkXNZWATSBcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5494
5494
  } else if (numeric.length) {
5495
- if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5496
- for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`${k} must be a finite number.`);
5497
- const now = _chunkO3ZU6QIZcjs.describeTransform.call(void 0, g);
5498
- const centre = _chunkO3ZU6QIZcjs.anchorPoint.call(void 0, g, "center");
5495
+ if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5496
+ for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`${k} must be a finite number.`);
5497
+ const now = _chunkXNZWATSBcjs.describeTransform.call(void 0, g);
5498
+ const centre = _chunkXNZWATSBcjs.anchorPoint.call(void 0, g, "center");
5499
5499
  const params = {
5500
5500
  scaleX: _nullishCoalesce(spec.scaleX, () => ( (now.affine ? now.scaleX : 100))),
5501
5501
  scaleY: _nullishCoalesce(spec.scaleY, () => ( (now.affine ? now.scaleY : 100))),
@@ -5503,20 +5503,20 @@ var ImageEditorController = (_class7 = class {
5503
5503
  skewX: _nullishCoalesce(spec.skewX, () => ( (now.affine ? now.skewX : 0))),
5504
5504
  skewY: _nullishCoalesce(spec.skewY, () => ( 0))
5505
5505
  };
5506
- const m = _chunkO3ZU6QIZcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5506
+ const m = _chunkXNZWATSBcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5507
5507
  const cx = g.box.width / 2;
5508
5508
  const cy = g.box.height / 2;
5509
5509
  const to = { x: _nullishCoalesce(spec.x, () => ( centre.x)), y: _nullishCoalesce(spec.y, () => ( centre.y)) };
5510
- corners = _chunkO3ZU6QIZcjs.cornersFromMatrix.call(void 0, g.box, _chunkRCUX6CT2cjs.multiplyMatrices.call(void 0, m, _chunkRCUX6CT2cjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5510
+ corners = _chunkXNZWATSBcjs.cornersFromMatrix.call(void 0, g.box, _chunkHRI3ZMDMcjs.multiplyMatrices.call(void 0, m, _chunkHRI3ZMDMcjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5511
5511
  }
5512
5512
  let warp = _nullishCoalesce(layer.placement.warp, () => ( null));
5513
5513
  if (spec.warp === null) warp = null;
5514
5514
  else if (spec.warp) {
5515
5515
  if ("style" in spec.warp) {
5516
- if (!_chunkRCUX6CT2cjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkRCUX6CT2cjs.WARP_STYLES.join(", ")}.`);
5517
- warp = _chunkO3ZU6QIZcjs.presetWarp.call(void 0, g.box, spec.warp);
5516
+ if (!_chunkHRI3ZMDMcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkHRI3ZMDMcjs.WARP_STYLES.join(", ")}.`);
5517
+ warp = _chunkXNZWATSBcjs.presetWarp.call(void 0, g.box, spec.warp);
5518
5518
  } else {
5519
- if (!_chunkO3ZU6QIZcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkO3ZU6QIZcjs.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.");
5519
+ if (!_chunkXNZWATSBcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkXNZWATSBcjs.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.");
5520
5520
  warp = spec.warp;
5521
5521
  }
5522
5522
  }
@@ -5530,16 +5530,16 @@ var ImageEditorController = (_class7 = class {
5530
5530
  * the layers that changed.
5531
5531
  */
5532
5532
  replaceSmartObjectContents(id, source) {
5533
- const layer = _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5533
+ const layer = _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, id);
5534
5534
  let contents;
5535
5535
  if ("contents" in source) contents = source.contents;
5536
- else if ("pixels" in source) contents = _chunkO3ZU6QIZcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5536
+ else if ("pixels" in source) contents = _chunkXNZWATSBcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5537
5537
  else {
5538
- const psd = _chunkO3ZU6QIZcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ) });
5539
- contents = _chunkO3ZU6QIZcjs.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`)));
5538
+ const psd = _chunkXNZWATSBcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkXNZWATSBcjs.newLayerId.call(void 0, ) });
5539
+ contents = _chunkXNZWATSBcjs.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`)));
5540
5540
  contents.file = { bytes: source.psd.slice(), type: psd.info.psb ? "psb" : "psd" };
5541
5541
  }
5542
- const res = _chunkO3ZU6QIZcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5542
+ const res = _chunkXNZWATSBcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5543
5543
  this.commitLayers(res.layers);
5544
5544
  return { contentsId: layer.contents.id, width: contents.width, height: contents.height, layerIds: res.ids };
5545
5545
  }
@@ -5554,16 +5554,16 @@ var ImageEditorController = (_class7 = class {
5554
5554
  * and bytes.
5555
5555
  */
5556
5556
  exportSmartObjectContents(id) {
5557
- const layer = _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5557
+ const layer = _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, id);
5558
5558
  const c = layer.contents;
5559
5559
  const base = c.name.replace(/\.\w+$/, "") || "Contents";
5560
5560
  if (c.file) {
5561
- const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkO3ZU6QIZcjs.BROWSER_IMAGE_TYPES };
5561
+ const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkXNZWATSBcjs.BROWSER_IMAGE_TYPES };
5562
5562
  const ext = c.file.type.toLowerCase();
5563
5563
  return { name: /\.\w+$/.test(c.name) ? c.name : `${base}.${ext}`, mimeType: _nullishCoalesce(mime[ext], () => ( "application/octet-stream")), bytes: c.file.bytes };
5564
5564
  }
5565
- if (!_chunkO3ZU6QIZcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5566
- const f = _chunkO3ZU6QIZcjs.smartContentsFile.call(void 0, c);
5565
+ if (!_chunkXNZWATSBcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5566
+ const f = _chunkXNZWATSBcjs.smartContentsFile.call(void 0, c);
5567
5567
  return { name: f.name, mimeType: f.name.endsWith(".png") ? "image/png" : "image/vnd.adobe.photoshop", bytes: f.bytes };
5568
5568
  }
5569
5569
  /**
@@ -5572,7 +5572,7 @@ var ImageEditorController = (_class7 = class {
5572
5572
  * undo step. Returns the copy's id.
5573
5573
  */
5574
5574
  copySmartObject(id, linked = false, name) {
5575
- const res = _chunkO3ZU6QIZcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5575
+ const res = _chunkXNZWATSBcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5576
5576
  this.commitLayers(res.layers, () => {
5577
5577
  this.state.activeLayerId = res.layer.id;
5578
5578
  this.state.activeTarget = "pixels";
@@ -5581,31 +5581,31 @@ var ImageEditorController = (_class7 = class {
5581
5581
  }
5582
5582
  /** Adds a smart filter (`develop` or `blur`, with `blend` and `opacity`) at `index` (default the top), as one undo step. */
5583
5583
  addSmartFilter(id, filter, index) {
5584
- const res = _chunkO3ZU6QIZcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkO3ZU6QIZcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5584
+ const res = _chunkXNZWATSBcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkXNZWATSBcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5585
5585
  this.commitLayers(res.layers);
5586
5586
  return res.filter;
5587
5587
  }
5588
5588
  /** Changes one smart filter (one undo step, or none with `commitToHistory = false` during a drag). */
5589
5589
  updateSmartFilter(id, filterId, changes, commitToHistory = true) {
5590
- const res = _chunkO3ZU6QIZcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5590
+ const res = _chunkXNZWATSBcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5591
5591
  this.commitLayers(res.layers, void 0, commitToHistory);
5592
5592
  return res.filter;
5593
5593
  }
5594
5594
  /** Removes one smart filter (one undo step). Returns the remaining filters. */
5595
5595
  removeSmartFilter(id, filterId) {
5596
- const res = _chunkO3ZU6QIZcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5596
+ const res = _chunkXNZWATSBcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5597
5597
  this.commitLayers(res.layers);
5598
5598
  return _nullishCoalesce(_optionalChain([res, 'access', _185 => _185.layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.filters]), () => ( []));
5599
5599
  }
5600
5600
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
5601
5601
  moveSmartFilter(id, filterId, index) {
5602
- const res = _chunkO3ZU6QIZcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5602
+ const res = _chunkXNZWATSBcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5603
5603
  this.commitLayers(res.layers);
5604
5604
  return _nullishCoalesce(_optionalChain([res, 'access', _188 => _188.layer, 'access', _189 => _189.smartFilters, 'optionalAccess', _190 => _190.filters]), () => ( []));
5605
5605
  }
5606
5606
  /** Turns a smart object's whole filter stack on or off (one undo step). */
5607
5607
  setSmartFiltersEnabled(id, enabled) {
5608
- const res = _chunkO3ZU6QIZcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5608
+ const res = _chunkXNZWATSBcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5609
5609
  this.commitLayers(res.layers);
5610
5610
  return _nullishCoalesce(_optionalChain([res, 'access', _191 => _191.layer, 'access', _192 => _192.smartFilters, 'optionalAccess', _193 => _193.enabled]), () => ( true));
5611
5611
  }
@@ -5615,21 +5615,21 @@ var ImageEditorController = (_class7 = class {
5615
5615
  * Painting it targets channel `filter-mask`. Returns the mask, or `null` when removed.
5616
5616
  */
5617
5617
  setSmartFilterMask(id, from, props = {}, commitToHistory = true) {
5618
- const layer = _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5618
+ const layer = _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, id);
5619
5619
  let mask;
5620
5620
  if (from === "none") mask = null;
5621
5621
  else if (from === "keep") {
5622
- if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5622
+ if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5623
5623
  mask = withMaskProps(layer.smartFilters.mask, props);
5624
5624
  } else if (from === "selection") {
5625
5625
  const sel = this.state.selection;
5626
- if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5626
+ if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5627
5627
  mask = this.maskFromSelection(sel, props);
5628
5628
  } else {
5629
5629
  const v = from === "reveal-all" ? 255 : 0;
5630
5630
  mask = withMaskProps({ surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5631
5631
  }
5632
- const res = _chunkO3ZU6QIZcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5632
+ const res = _chunkXNZWATSBcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5633
5633
  this.commitLayers(res.layers, () => {
5634
5634
  if (this.state.activeLayerId !== id) return;
5635
5635
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
@@ -5645,14 +5645,14 @@ var ImageEditorController = (_class7 = class {
5645
5645
  async prepareSmartObjects() {
5646
5646
  const pending = /* @__PURE__ */ new Map();
5647
5647
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
5648
- if (l.type === "smart" && !_chunkO3ZU6QIZcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkO3ZU6QIZcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5648
+ if (l.type === "smart" && !_chunkXNZWATSBcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkXNZWATSBcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5649
5649
  }
5650
5650
  const left = [];
5651
5651
  for (const [cid, c] of pending) {
5652
5652
  try {
5653
- const url = `data:${_chunkO3ZU6QIZcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkCWM3CUUXcjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5653
+ const url = `data:${_chunkXNZWATSBcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkCWM3CUUXcjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5654
5654
  const px2 = await this.decodeImage(url);
5655
- const decoded = { ...c, kind: "raster", raster: _chunkO3ZU6QIZcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5655
+ const decoded = { ...c, kind: "raster", raster: _chunkXNZWATSBcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5656
5656
  const swap = (layers) => {
5657
5657
  let out = layers;
5658
5658
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) if (l.type === "smart" && l.contents.id === cid) out = _chunkHGTDMKNEcjs.mapLayer.call(void 0, out, l.id, (x) => ({ ...x, contents: decoded }));
@@ -5680,10 +5680,10 @@ var ImageEditorController = (_class7 = class {
5680
5680
  * Contents can nest. Returns the contents' size and layer ids.
5681
5681
  */
5682
5682
  editSmartObjectContents(id) {
5683
- if (this.getFreeTransform()) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5684
- const layer = _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5683
+ if (this.getFreeTransform()) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5684
+ const layer = _chunkXNZWATSBcjs.requireSmartObject.call(void 0, this.state.layers, id);
5685
5685
  const c = layer.contents;
5686
- if (!_chunkO3ZU6QIZcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkO3ZU6QIZcjs.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.`);
5686
+ if (!_chunkXNZWATSBcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkXNZWATSBcjs.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.`);
5687
5687
  const saved = {
5688
5688
  state: { ...this.state },
5689
5689
  undo: this.undoStack,
@@ -5694,7 +5694,7 @@ var ImageEditorController = (_class7 = class {
5694
5694
  samplePixelsOverride: this.samplePixelsOverride,
5695
5695
  psdResolution: this.psdResolution
5696
5696
  };
5697
- const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5697
+ const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkXNZWATSBcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5698
5698
  this.contentsStack.push({ layerId: layer.id, contentsId: c.id, name: layer.name || c.name, saved });
5699
5699
  const s = this.state;
5700
5700
  this.state = {
@@ -5702,7 +5702,7 @@ var ImageEditorController = (_class7 = class {
5702
5702
  sourceUrl: null,
5703
5703
  imageDimensions: { width: c.width, height: c.height },
5704
5704
  crop: null,
5705
- transform: { ..._chunkO3ZU6QIZcjs.DEFAULT_TRANSFORM_VALUES },
5705
+ transform: { ..._chunkXNZWATSBcjs.DEFAULT_TRANSFORM_VALUES },
5706
5706
  layers,
5707
5707
  activeLayerId: layers.length ? layers[layers.length - 1].id : null,
5708
5708
  activeTarget: "pixels",
@@ -5735,7 +5735,7 @@ var ImageEditorController = (_class7 = class {
5735
5735
  */
5736
5736
  closeSmartObjectContents(save = true) {
5737
5737
  const top = this.contentsStack.pop();
5738
- if (!top) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5738
+ if (!top) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5739
5739
  if (_optionalChain([this, 'access', _207 => _207.openTransform, 'optionalAccess', _208 => _208.isOpen])) this.openTransform.cancel();
5740
5740
  this.openTransform = null;
5741
5741
  const edited = this.state;
@@ -5749,10 +5749,10 @@ var ImageEditorController = (_class7 = class {
5749
5749
  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";
5750
5750
  if (_optionalChain([old, 'optionalAccess', _214 => _214.kind]) === "raster" && plain3) {
5751
5751
  const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
5752
- next = _chunkO3ZU6QIZcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5752
+ next = _chunkXNZWATSBcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5753
5753
  } else {
5754
5754
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
5755
- next = _chunkO3ZU6QIZcjs.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);
5755
+ next = _chunkXNZWATSBcjs.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);
5756
5756
  }
5757
5757
  }
5758
5758
  const saved = top.saved;
@@ -5771,7 +5771,7 @@ var ImageEditorController = (_class7 = class {
5771
5771
  this.notify();
5772
5772
  return { layerId: top.layerId, changed: false, layerIds: [] };
5773
5773
  }
5774
- const res = _chunkO3ZU6QIZcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5774
+ const res = _chunkXNZWATSBcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5775
5775
  this.commitLayers(res.layers);
5776
5776
  return { layerId: top.layerId, changed: true, layerIds: res.ids };
5777
5777
  }
@@ -5786,35 +5786,35 @@ var ImageEditorController = (_class7 = class {
5786
5786
  // --- Layer effects ---
5787
5787
  /** A layer's effects (an empty, enabled list when it has none). */
5788
5788
  getLayerEffects(id) {
5789
- return _chunkO3ZU6QIZcjs.layerEffectsOf.call(void 0, _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id).layer);
5789
+ return _chunkXNZWATSBcjs.layerEffectsOf.call(void 0, _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id).layer);
5790
5790
  }
5791
5791
  /**
5792
5792
  * Adds an effect of `kind` with Photoshop's defaults and `params` applied (one undo step), at
5793
5793
  * `index` in the layer's effect list (default the end). Returns the new effect and the effects.
5794
5794
  */
5795
5795
  addLayerEffect(id, kind, params = {}, index) {
5796
- const res = _chunkO3ZU6QIZcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5796
+ const res = _chunkXNZWATSBcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5797
5797
  this.commitLayers(res.layers);
5798
5798
  return { effect: res.effect, effects: this.getLayerEffects(id) };
5799
5799
  }
5800
5800
  /** Changes one effect (one undo step, or none with `commitToHistory = false` during a drag). Returns the effects. */
5801
5801
  updateLayerEffect(id, effectId, changes, commitToHistory = true) {
5802
- this.commitLayers(_chunkO3ZU6QIZcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5802
+ this.commitLayers(_chunkXNZWATSBcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5803
5803
  return this.getLayerEffects(id);
5804
5804
  }
5805
5805
  /** Removes one effect (one undo step). Returns the remaining effects. */
5806
5806
  removeLayerEffect(id, effectId) {
5807
- this.commitLayers(_chunkO3ZU6QIZcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5807
+ this.commitLayers(_chunkXNZWATSBcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5808
5808
  return this.getLayerEffects(id);
5809
5809
  }
5810
5810
  /** Turns a layer's effects on or off as a whole and, when given, sets Scale Effects (one undo step). */
5811
5811
  setLayerEffectsEnabled(id, enabled, scale, commitToHistory = true) {
5812
- this.commitLayers(_chunkO3ZU6QIZcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5812
+ this.commitLayers(_chunkXNZWATSBcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5813
5813
  return this.getLayerEffects(id);
5814
5814
  }
5815
5815
  /** Replaces a layer's effects (one undo step; `null` removes them). Returns the effects. */
5816
5816
  setLayerEffects(id, effects, commitToHistory = true) {
5817
- this.commitLayers(_chunkO3ZU6QIZcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5817
+ this.commitLayers(_chunkXNZWATSBcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5818
5818
  return this.getLayerEffects(id);
5819
5819
  }
5820
5820
  __init76() {this.patternIds = /* @__PURE__ */ new WeakMap()}
@@ -5840,8 +5840,8 @@ var ImageEditorController = (_class7 = class {
5840
5840
  /** Sets the global light (one undo step). `angle` -360..360°, `altitude` 0..90°. Returns it. */
5841
5841
  setGlobalLight(light, commitToHistory = true) {
5842
5842
  const next = { ...this.getGlobalLight(), ...light };
5843
- if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5844
- if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5843
+ if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5844
+ if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5845
5845
  if (commitToHistory) this.recordHistory();
5846
5846
  if (next.angle === _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
5847
5847
  else this.state.globalLight = next;
@@ -5852,16 +5852,16 @@ var ImageEditorController = (_class7 = class {
5852
5852
  async compositeToSurface(layers, rect) {
5853
5853
  const { width, height } = this.naturalSize;
5854
5854
  if (_chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
5855
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5855
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5856
5856
  }
5857
5857
  await this.renderer.prepareLayerAssets(layers, width, height);
5858
5858
  const sources = this.renderer.compositorSources(width, height);
5859
5859
  const depth = this.bitDepth;
5860
5860
  if (depth !== 8) {
5861
- const samples = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkO3ZU6QIZcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5861
+ const samples = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkXNZWATSBcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5862
5862
  return _chunkCWM3CUUXcjs.surfaceFromDeepPixels.call(void 0, { width: rect.width, height: rect.height, data: samples }, 4, rect.x, rect.y);
5863
5863
  }
5864
- const data = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)().composite(layers, rect, sources);
5864
+ const data = new (0, _chunkXNZWATSBcjs.LayerCompositor)().composite(layers, rect, sources);
5865
5865
  return _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: rect.width, height: rect.height, data }, 4, rect.x, rect.y);
5866
5866
  }
5867
5867
  /**
@@ -5874,22 +5874,22 @@ var ImageEditorController = (_class7 = class {
5874
5874
  const r = _nullishCoalesce(rect, () => ( { x: 0, y: 0, width, height }));
5875
5875
  const depth = this.bitDepth;
5876
5876
  if (depth === 8) return { width: r.width, height: r.height, depth: 16, data: _chunkCWM3CUUXcjs.to16From8.call(void 0, this.compositePixels(r).data) };
5877
- const data = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkO3ZU6QIZcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5877
+ const data = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkXNZWATSBcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5878
5878
  return { width: r.width, height: r.height, depth, data };
5879
5879
  }
5880
5880
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
5881
5881
  paintBounds(layer) {
5882
5882
  const { width, height } = this.naturalSize;
5883
5883
  const canvas = { x: 0, y: 0, width, height };
5884
- if (_chunkO3ZU6QIZcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5884
+ if (_chunkXNZWATSBcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5885
5885
  if (layer.type === "annotation") {
5886
- const b = _chunkO3ZU6QIZcjs.getAnnotationBounds.call(void 0, layer.annotation);
5886
+ const b = _chunkXNZWATSBcjs.getAnnotationBounds.call(void 0, layer.annotation);
5887
5887
  const pad = 4 + ("strokeWidth" in layer.annotation ? layer.annotation.strokeWidth : 0);
5888
5888
  return coveringRect({ x: b.x - pad, y: b.y - pad, width: b.width + 2 * pad, height: b.height + 2 * pad });
5889
5889
  }
5890
5890
  if (layer.type === "group") {
5891
5891
  let r = null;
5892
- for (const c of layer.children) r = _chunkO3ZU6QIZcjs.unionRect.call(void 0, r, this.paintBounds(c));
5892
+ for (const c of layer.children) r = _chunkXNZWATSBcjs.unionRect.call(void 0, r, this.paintBounds(c));
5893
5893
  return _nullishCoalesce(r, () => ( canvas));
5894
5894
  }
5895
5895
  return canvas;
@@ -5900,16 +5900,16 @@ var ImageEditorController = (_class7 = class {
5900
5900
  * Returns the merged id.
5901
5901
  */
5902
5902
  async mergeDown(id) {
5903
- const loc = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id);
5903
+ const loc = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id);
5904
5904
  const upper = loc.layer;
5905
5905
  const siblings = loc.parent ? loc.parent.children : this.state.layers;
5906
5906
  const lower = siblings[loc.index - 1];
5907
- if (!lower) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5908
- if (lower.type !== "pixel") throw new (0, _chunkO3ZU6QIZcjs.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.`);
5909
- if (!upper.visible) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5910
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5911
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5912
- let rect = _nullishCoalesce(_chunkO3ZU6QIZcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5907
+ if (!lower) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5908
+ if (lower.type !== "pixel") throw new (0, _chunkXNZWATSBcjs.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.`);
5909
+ if (!upper.visible) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5910
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5911
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5912
+ let rect = _nullishCoalesce(_chunkXNZWATSBcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5913
5913
  const reach = Math.max(_chunkHGTDMKNEcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunkHGTDMKNEcjs.effectsMargin.call(void 0, upper.effects));
5914
5914
  if (reach) rect = { x: rect.x - reach, y: rect.y - reach, width: rect.width + 2 * reach, height: rect.height + 2 * reach };
5915
5915
  const base = { ...lower, blend: "normal", opacity: 1 };
@@ -5935,12 +5935,12 @@ var ImageEditorController = (_class7 = class {
5935
5935
  */
5936
5936
  async mergeVisible() {
5937
5937
  const visible = this.state.layers.filter((l) => l.visible);
5938
- if (!visible.length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("No layer is visible.");
5938
+ if (!visible.length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("No layer is visible.");
5939
5939
  const { width, height } = this.naturalSize;
5940
5940
  const surface = await this.compositeToSurface(visible, { x: 0, y: 0, width, height });
5941
5941
  const merged = {
5942
5942
  type: "pixel",
5943
- id: _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ),
5943
+ id: _chunkXNZWATSBcjs.newLayerId.call(void 0, ),
5944
5944
  name: "Merged",
5945
5945
  visible: true,
5946
5946
  opacity: 1,
@@ -5964,8 +5964,8 @@ var ImageEditorController = (_class7 = class {
5964
5964
  const surface = await this.compositeToSurface(this.state.layers, { x: 0, y: 0, width, height });
5965
5965
  const bg = {
5966
5966
  type: "pixel",
5967
- id: _chunkO3ZU6QIZcjs.BACKGROUND_LAYER_ID,
5968
- name: _chunkO3ZU6QIZcjs.BACKGROUND_LAYER_NAME,
5967
+ id: _chunkXNZWATSBcjs.BACKGROUND_LAYER_ID,
5968
+ name: _chunkXNZWATSBcjs.BACKGROUND_LAYER_NAME,
5969
5969
  visible: true,
5970
5970
  opacity: 1,
5971
5971
  blend: "normal",
@@ -5992,7 +5992,7 @@ var ImageEditorController = (_class7 = class {
5992
5992
  const k = Math.min(1, side / Math.max(width, height));
5993
5993
  const tw = Math.max(1, Math.round(width * k));
5994
5994
  const th = Math.max(1, Math.round(height * k));
5995
- const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkO3ZU6QIZcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5995
+ const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkXNZWATSBcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5996
5996
  if (!surface) return null;
5997
5997
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
5998
5998
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -6088,7 +6088,7 @@ var ImageEditorController = (_class7 = class {
6088
6088
  * pixels. The next stroke fixes the offset from its first point. View state, no undo.
6089
6089
  */
6090
6090
  setCloneSource(point) {
6091
- if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6091
+ if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6092
6092
  const source = point ? { x: Math.round(point.x), y: Math.round(point.y), offset: null } : null;
6093
6093
  this.state.paint = { ...this.state.paint, cloneSource: source };
6094
6094
  this.notify();
@@ -6104,9 +6104,9 @@ var ImageEditorController = (_class7 = class {
6104
6104
  const next = t ? { ...cur, ...t } : { ..._chunk6FUAHCVIcjs.IDENTITY_CLONE_TRANSFORM };
6105
6105
  for (const k of ["scaleX", "scaleY"]) {
6106
6106
  const v = next[k];
6107
- if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
6107
+ if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
6108
6108
  }
6109
- if (!Number.isFinite(next.rotate)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("rotate must be a number of degrees.");
6109
+ if (!Number.isFinite(next.rotate)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("rotate must be a number of degrees.");
6110
6110
  next.rotate = ((next.rotate + 180) % 360 + 360) % 360 - 180;
6111
6111
  this.state.paint = { ...this.state.paint, cloneTransform: next };
6112
6112
  this.notify();
@@ -6124,27 +6124,27 @@ var ImageEditorController = (_class7 = class {
6124
6124
  /** Resolves and validates what a stroke, fill or clear paints into. */
6125
6125
  paintTarget(layerId, channel, action) {
6126
6126
  const id = _nullishCoalesce(layerId, () => ( this.state.activeLayerId));
6127
- if (!id) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6128
- const layer = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6127
+ if (!id) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6128
+ const layer = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6129
6129
  const ch = _nullishCoalesce(channel, () => ( (id === this.state.activeLayerId ? this.state.activeTarget : "pixels")));
6130
6130
  if (ch === "mask") {
6131
- if (!layer.mask) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6132
- if (layer.mask.source) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6133
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "all", action);
6131
+ if (!layer.mask) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6132
+ if (layer.mask.source) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6133
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "all", action);
6134
6134
  } else if (ch === "filter-mask") {
6135
6135
  if (layer.type !== "smart" || !_optionalChain([layer, 'access', _224 => _224.smartFilters, 'optionalAccess', _225 => _225.mask])) {
6136
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6136
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6137
6137
  }
6138
- if (!_chunkO3ZU6QIZcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6139
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "all", action);
6138
+ if (!_chunkXNZWATSBcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6139
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "all", action);
6140
6140
  } else {
6141
- if (layer.type === "smart") throw new (0, _chunkO3ZU6QIZcjs.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.`);
6142
- if (layer.type === "shape") throw new (0, _chunkO3ZU6QIZcjs.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).`);
6143
- if (layer.type === "type") throw new (0, _chunkO3ZU6QIZcjs.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).`);
6144
- if (layer.type !== "pixel") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6145
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6141
+ if (layer.type === "smart") throw new (0, _chunkXNZWATSBcjs.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.`);
6142
+ if (layer.type === "shape") throw new (0, _chunkXNZWATSBcjs.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).`);
6143
+ if (layer.type === "type") throw new (0, _chunkXNZWATSBcjs.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).`);
6144
+ if (layer.type !== "pixel") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6145
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6146
6146
  }
6147
- if (!layer.visible) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6147
+ if (!layer.visible) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6148
6148
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
6149
6149
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
6150
6150
  const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _226 => _226.locks, 'optionalAccess', _227 => _227.transparency]));
@@ -6153,7 +6153,7 @@ var ImageEditorController = (_class7 = class {
6153
6153
  /** The layer with its pixels (or mask) replaced by `surface`. */
6154
6154
  withSurface(layer, channel, surface) {
6155
6155
  if (channel === "mask") return { ...layer, mask: { ...layer.mask, surface } };
6156
- if (channel === "filter-mask") return _chunkO3ZU6QIZcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6156
+ if (channel === "filter-mask") return _chunkXNZWATSBcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6157
6157
  const next = { ...layer, surface };
6158
6158
  delete next.source;
6159
6159
  return next;
@@ -6166,10 +6166,10 @@ var ImageEditorController = (_class7 = class {
6166
6166
  */
6167
6167
  beginStroke(init = {}) {
6168
6168
  const tool = _nullishCoalesce(init.tool, () => ( "brush"));
6169
- if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6169
+ if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6170
6170
  const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : isRetouchTool(tool) ? "retouch" : "paint");
6171
6171
  if (tool === "mixer" && target.channel !== "pixels") {
6172
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6172
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6173
6173
  }
6174
6174
  const brush = _chunkLRRCMRSLcjs.normalizeBrush.call(void 0, { ...this.state.paint.brush, ..._nullishCoalesce(init.brush, () => ( {})) });
6175
6175
  let strokePaint = null;
@@ -6203,7 +6203,7 @@ var ImageEditorController = (_class7 = class {
6203
6203
  retouchStroke(tool, init, brush, target, apply) {
6204
6204
  const settings = _chunk6FUAHCVIcjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
6205
6205
  const mask = target.channel !== "pixels";
6206
- if (tool === "sponge" && mask) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6206
+ if (tool === "sponge" && mask) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6207
6207
  if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunk6FUAHCVIcjs.RetouchDabStroke)(brush, pixels, _chunk6FUAHCVIcjs.smudgeEffect.call(void 0, brush, settings.strength)) };
6208
6208
  if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunk6FUAHCVIcjs.RetouchDabStroke)(brush, pixels, _chunk6FUAHCVIcjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
6209
6209
  const retouchApply = {
@@ -6242,11 +6242,11 @@ var ImageEditorController = (_class7 = class {
6242
6242
  if (tool === "history") {
6243
6243
  const steps = settings.historySteps;
6244
6244
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
6245
- if (!entry) throw new (0, _chunkO3ZU6QIZcjs.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.");
6245
+ if (!entry) throw new (0, _chunkXNZWATSBcjs.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.");
6246
6246
  const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _232 => _232.layer]);
6247
- if (!then) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6247
+ if (!then) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6248
6248
  const surface = target.channel === "mask" ? _optionalChain([then, 'access', _233 => _233.mask, 'optionalAccess', _234 => _234.surface]) : then.type === "pixel" ? then.surface : void 0;
6249
- if (!surface) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6249
+ if (!surface) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6250
6250
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
6251
6251
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
6252
6252
  const source2 = depth ? new (0, _chunk6FUAHCVIcjs.TilePixelSource)((tx, ty) => workTileOf(surface.tiles.get(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty))), 4, offset2) : this.surfaceSource(surface, offset2);
@@ -6291,7 +6291,7 @@ var ImageEditorController = (_class7 = class {
6291
6291
  }
6292
6292
  if (init.source) this.setCloneSource(init.source);
6293
6293
  const cs = this.state.paint.cloneSource;
6294
- if (!cs) throw new (0, _chunkO3ZU6QIZcjs.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 }.`);
6294
+ if (!cs) throw new (0, _chunkXNZWATSBcjs.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 }.`);
6295
6295
  let offset = { x: 0, y: 0 };
6296
6296
  let first = { x: 0, y: 0 };
6297
6297
  const xf = this.state.paint.cloneTransform;
@@ -6328,7 +6328,7 @@ var ImageEditorController = (_class7 = class {
6328
6328
  const sources = this.compositorSources();
6329
6329
  if (depth) {
6330
6330
  return new (0, _chunk6FUAHCVIcjs.TilePixelSource)((tx, ty) => {
6331
- const w = _chunkO3ZU6QIZcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, sources, depth);
6331
+ const w = _chunkXNZWATSBcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, sources, depth);
6332
6332
  for (let i = 0; i < w.length; i += 4) {
6333
6333
  if (depth === 32) for (let c = 0; c < 3; c++) w[i + c] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, w[i + c]);
6334
6334
  for (let c = 0; c < 4; c++) w[i + c] *= 255;
@@ -6336,7 +6336,7 @@ var ImageEditorController = (_class7 = class {
6336
6336
  return w;
6337
6337
  }, 4);
6338
6338
  }
6339
- const compositor = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)();
6339
+ const compositor = new (0, _chunkXNZWATSBcjs.LayerCompositor)();
6340
6340
  return new (0, _chunk6FUAHCVIcjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
6341
6341
  }
6342
6342
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
@@ -6386,9 +6386,9 @@ var ImageEditorController = (_class7 = class {
6386
6386
  * document bounds and the number of dabs.
6387
6387
  */
6388
6388
  paintStroke(init) {
6389
- if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6389
+ if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6390
6390
  for (const p of init.points) {
6391
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _239 => _239.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _240 => _240.y]))) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6391
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _239 => _239.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _240 => _240.y]))) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6392
6392
  }
6393
6393
  const session = this.beginStroke(init);
6394
6394
  session.push(init.points);
@@ -6414,8 +6414,8 @@ var ImageEditorController = (_class7 = class {
6414
6414
  const target = this.paintTarget(options.layerId, options.channel, mode === "paint" ? "fill" : "clear");
6415
6415
  const { width, height } = this.naturalSize;
6416
6416
  const opacity = _nullishCoalesce(options.opacity, () => ( 1));
6417
- if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("opacity must be from 0 to 1.");
6418
- const blend = _nullishCoalesce(_chunkO3ZU6QIZcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6417
+ if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("opacity must be from 0 to 1.");
6418
+ const blend = _nullishCoalesce(_chunkXNZWATSBcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6419
6419
  const sel = options.useSelection !== false && _optionalChain([this, 'access', _241 => _241.state, 'access', _242 => _242.selection, 'optionalAccess', _243 => _243.bounds]) ? this.state.selection : null;
6420
6420
  const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _244 => _244.bounds]), () => ( { x: 0, y: 0, width, height }));
6421
6421
  const coverage = new (0, _chunkLRRCMRSLcjs.CoverageMap)();
@@ -6451,7 +6451,7 @@ var ImageEditorController = (_class7 = class {
6451
6451
  // --- Adjustments ---
6452
6452
  /** The pixel layer the base sliders edit: the active pixel layer, else the Background. */
6453
6453
  developLayer() {
6454
- return _chunkO3ZU6QIZcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6454
+ return _chunkXNZWATSBcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6455
6455
  }
6456
6456
  /**
6457
6457
  * Sets base adjustment values as one undo step (unless `commitToHistory` is false). The base
@@ -6477,7 +6477,7 @@ var ImageEditorController = (_class7 = class {
6477
6477
  this.state.outputOpacity = Math.min(1, Math.max(0, partial.opacity));
6478
6478
  }
6479
6479
  if ("layers" in partial) {
6480
- layers = this.replaceAdjustmentNodes(layers, _chunkO3ZU6QIZcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6480
+ layers = this.replaceAdjustmentNodes(layers, _chunkXNZWATSBcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6481
6481
  }
6482
6482
  this.state.layers = layers;
6483
6483
  this.notify();
@@ -6485,7 +6485,7 @@ var ImageEditorController = (_class7 = class {
6485
6485
  /** True when the adjustments use an older rendering process than {@link LATEST_PROCESS_VERSION}. */
6486
6486
  get isProcessOutdated() {
6487
6487
  this.syncViews();
6488
- return _chunkO3ZU6QIZcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkO3ZU6QIZcjs.LATEST_PROCESS_VERSION;
6488
+ return _chunkXNZWATSBcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkXNZWATSBcjs.LATEST_PROCESS_VERSION;
6489
6489
  }
6490
6490
  /**
6491
6491
  * Update to Current Process: re-interprets the current adjustment values with the latest
@@ -6493,7 +6493,7 @@ var ImageEditorController = (_class7 = class {
6493
6493
  */
6494
6494
  upgradeProcess() {
6495
6495
  if (!this.isProcessOutdated) return false;
6496
- this.setAdjustments({ process: _chunkO3ZU6QIZcjs.LATEST_PROCESS_VERSION });
6496
+ this.setAdjustments({ process: _chunkXNZWATSBcjs.LATEST_PROCESS_VERSION });
6497
6497
  return true;
6498
6498
  }
6499
6499
  /** Resets the base sliders (latest process). Adjustment layers are kept; see `clearAdjustmentLayers`. */
@@ -6504,7 +6504,7 @@ var ImageEditorController = (_class7 = class {
6504
6504
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0,
6505
6505
  this.state.layers,
6506
6506
  target.id,
6507
- (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkO3ZU6QIZcjs.LATEST_PROCESS_VERSION }), 0)
6507
+ (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkXNZWATSBcjs.LATEST_PROCESS_VERSION }), 0)
6508
6508
  );
6509
6509
  }
6510
6510
  delete this.state.legacyOutputBlur;
@@ -6568,7 +6568,7 @@ var ImageEditorController = (_class7 = class {
6568
6568
  const existing = new Set(this.adjustmentNodes(out).map((n) => n.id));
6569
6569
  for (const l of next) {
6570
6570
  if (existing.has(l.id)) continue;
6571
- out = this.placeLayer(out, _chunkO3ZU6QIZcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6571
+ out = this.placeLayer(out, _chunkXNZWATSBcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6572
6572
  }
6573
6573
  const order = next.map((l) => l.id);
6574
6574
  for (let to = 0; to < order.length; to++) out = this.moveAdjustmentNode(out, order[to], to);
@@ -6583,7 +6583,7 @@ var ImageEditorController = (_class7 = class {
6583
6583
  addAdjustmentLayer(init, index) {
6584
6584
  const spec = typeof init === "string" ? { kind: init } : init;
6585
6585
  const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
6586
- const layer = _chunkO3ZU6QIZcjs.createAdjustmentLayer.call(void 0, spec.kind, {
6586
+ const layer = _chunkXNZWATSBcjs.createAdjustmentLayer.call(void 0, spec.kind, {
6587
6587
  id: spec.id && !ids.has(spec.id) ? spec.id : void 0,
6588
6588
  name: spec.name,
6589
6589
  params: spec.params,
@@ -6592,10 +6592,10 @@ var ImageEditorController = (_class7 = class {
6592
6592
  blend: spec.blend,
6593
6593
  mask: _nullishCoalesce(spec.mask, () => ( void 0))
6594
6594
  });
6595
- while (ids.has(layer.id)) layer.id = _chunkO3ZU6QIZcjs.newLayerId.call(void 0, "adj");
6595
+ while (ids.has(layer.id)) layer.id = _chunkXNZWATSBcjs.newLayerId.call(void 0, "adj");
6596
6596
  const { width, height } = this.naturalSize;
6597
6597
  this.recordHistory();
6598
- const node = _chunkO3ZU6QIZcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6598
+ const node = _chunkXNZWATSBcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6599
6599
  const positioned = Boolean(spec.aboveId || spec.parentId);
6600
6600
  this.state.layers = this.placeLayer(this.state.layers, node, {
6601
6601
  aboveId: spec.aboveId,
@@ -6615,7 +6615,7 @@ var ImageEditorController = (_class7 = class {
6615
6615
  if (!loc || loc.layer.type !== "adjustment") return false;
6616
6616
  const { width, height } = this.naturalSize;
6617
6617
  const node = loc.layer;
6618
- const merged = _chunkO3ZU6QIZcjs.normalizeAdjustmentLayer.call(void 0, {
6618
+ const merged = _chunkXNZWATSBcjs.normalizeAdjustmentLayer.call(void 0, {
6619
6619
  id: node.id,
6620
6620
  kind: node.kind,
6621
6621
  enabled: _nullishCoalesce(update.enabled, () => ( node.visible)),
@@ -6635,7 +6635,7 @@ var ImageEditorController = (_class7 = class {
6635
6635
  params: merged.params
6636
6636
  };
6637
6637
  if (update.mask !== void 0) {
6638
- const mask = update.mask ? _chunkO3ZU6QIZcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6638
+ const mask = update.mask ? _chunkXNZWATSBcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6639
6639
  if (mask) next.mask = mask;
6640
6640
  else delete next.mask;
6641
6641
  }
@@ -6722,8 +6722,8 @@ var ImageEditorController = (_class7 = class {
6722
6722
  const { width, height } = this.naturalSize;
6723
6723
  let next = null;
6724
6724
  if (mask) {
6725
- const sized = mask.width === width && mask.height === height ? mask : _chunkO3ZU6QIZcjs.resizeSelection.call(void 0, mask, width, height);
6726
- next = _chunkO3ZU6QIZcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6725
+ const sized = mask.width === width && mask.height === height ? mask : _chunkXNZWATSBcjs.resizeSelection.call(void 0, mask, width, height);
6726
+ next = _chunkXNZWATSBcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6727
6727
  } else if (mode !== "replace") {
6728
6728
  return false;
6729
6729
  }
@@ -6737,7 +6737,7 @@ var ImageEditorController = (_class7 = class {
6737
6737
  /** Select › All. */
6738
6738
  selectAll() {
6739
6739
  const { width, height } = this.naturalSize;
6740
- return this.setSelection(_chunkO3ZU6QIZcjs.fullSelection.call(void 0, width, height));
6740
+ return this.setSelection(_chunkXNZWATSBcjs.fullSelection.call(void 0, width, height));
6741
6741
  }
6742
6742
  /** Select › Deselect. */
6743
6743
  deselect() {
@@ -6746,11 +6746,11 @@ var ImageEditorController = (_class7 = class {
6746
6746
  /** Select › Inverse (with nothing selected, selects everything). */
6747
6747
  invertSelection() {
6748
6748
  const { width, height } = this.naturalSize;
6749
- const current = _nullishCoalesce(this.state.selection, () => ( _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, width, height)));
6750
- return this.setSelection(_chunkO3ZU6QIZcjs.invertSelection.call(void 0, current));
6749
+ const current = _nullishCoalesce(this.state.selection, () => ( _chunkXNZWATSBcjs.createSelectionMask.call(void 0, width, height)));
6750
+ return this.setSelection(_chunkXNZWATSBcjs.invertSelection.call(void 0, current));
6751
6751
  }
6752
6752
  shapeCommand(mask, options) {
6753
- const shaped = options.feather && options.feather > 0 ? _chunkO3ZU6QIZcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6753
+ const shaped = options.feather && options.feather > 0 ? _chunkXNZWATSBcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6754
6754
  return this.setSelection(shaped, _nullishCoalesce(options.mode, () => ( "replace")));
6755
6755
  }
6756
6756
  /** Rectangular marquee in natural image pixels. */
@@ -6804,11 +6804,11 @@ var ImageEditorController = (_class7 = class {
6804
6804
  if (!this.samplePixelsOverride && !options.pixels) this.samplePixels = null;
6805
6805
  return null;
6806
6806
  }
6807
- const legacy = _chunkO3ZU6QIZcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6807
+ const legacy = _chunkXNZWATSBcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6808
6808
  if (options.sample === "active-layer") {
6809
6809
  const layer = this.getActiveLayer();
6810
6810
  if (!layer || layer.type !== "pixel") {
6811
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6811
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6812
6812
  }
6813
6813
  const surface = layer.source === "document" && options.pixels ? _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, options.pixels, 4) : this.surfaceOf(layer);
6814
6814
  return { width, height, data: _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, { x: -layer.offset.x, y: -layer.offset.y, width, height }) };
@@ -6817,7 +6817,7 @@ var ImageEditorController = (_class7 = class {
6817
6817
  this.syncViews();
6818
6818
  if (legacy && !options.pixels) {
6819
6819
  const copy = { width: base.width, height: base.height, data: new Uint8ClampedArray(base.data) };
6820
- _chunkO3ZU6QIZcjs.applyAdjustments.call(void 0, copy, _chunkO3ZU6QIZcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6820
+ _chunkXNZWATSBcjs.applyAdjustments.call(void 0, copy, _chunkXNZWATSBcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6821
6821
  return copy;
6822
6822
  }
6823
6823
  const pixels = options.pixels;
@@ -6829,7 +6829,7 @@ var ImageEditorController = (_class7 = class {
6829
6829
  };
6830
6830
  const stack = withoutAnnotations(this.state.layers);
6831
6831
  const layers = options.sampleMerged ? stack : pixelsOnly(stack);
6832
- const data = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6832
+ const data = new (0, _chunkXNZWATSBcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6833
6833
  return { width, height, data };
6834
6834
  }
6835
6835
  async requirePixels(options) {
@@ -6856,7 +6856,7 @@ var ImageEditorController = (_class7 = class {
6856
6856
  modifySelection(op, radius) {
6857
6857
  const sel = this.state.selection;
6858
6858
  if (!_optionalChain([sel, 'optionalAccess', _258 => _258.bounds])) return false;
6859
- return this.setSelection(_chunkO3ZU6QIZcjs.modifySelection.call(void 0, sel, op, radius));
6859
+ return this.setSelection(_chunkXNZWATSBcjs.modifySelection.call(void 0, sel, op, radius));
6860
6860
  }
6861
6861
  /**
6862
6862
  * Refine Edge: snaps the selection (e.g. a coarse AI mask loaded with `loadSelectionFromImage`)
@@ -6887,7 +6887,7 @@ var ImageEditorController = (_class7 = class {
6887
6887
  } else {
6888
6888
  pixels = source;
6889
6889
  }
6890
- this.setSelection(_chunkO3ZU6QIZcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6890
+ this.setSelection(_chunkXNZWATSBcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6891
6891
  return this.getSelection();
6892
6892
  }
6893
6893
  /** Quick Mask view (tints the unselected area). View state: no undo step. */
@@ -6899,7 +6899,7 @@ var ImageEditorController = (_class7 = class {
6899
6899
  // --- Layer masks ---
6900
6900
  maskFromSelection(sel, props = {}) {
6901
6901
  const { width, height } = this.naturalSize;
6902
- const sized = sel.width === width && sel.height === height ? sel : _chunkO3ZU6QIZcjs.resizeSelection.call(void 0, sel, width, height);
6902
+ const sized = sel.width === width && sel.height === height ? sel : _chunkXNZWATSBcjs.resizeSelection.call(void 0, sel, width, height);
6903
6903
  const mask = { surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0), defaultValue: 0 };
6904
6904
  return withMaskProps(mask, props);
6905
6905
  }
@@ -6945,7 +6945,7 @@ var ImageEditorController = (_class7 = class {
6945
6945
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
6946
6946
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
6947
6947
  const data = _chunkCWM3CUUXcjs.readRegion.call(void 0, layer.mask.surface, { x: -ox, y: -oy, width, height });
6948
- const sel = _chunkO3ZU6QIZcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6948
+ const sel = _chunkXNZWATSBcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6949
6949
  return this.setSelection(sel, mode);
6950
6950
  }
6951
6951
  // --- Histogram ---
@@ -6975,9 +6975,9 @@ var ImageEditorController = (_class7 = class {
6975
6975
  merged.depthRange = [...merged.depthRange];
6976
6976
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
6977
6977
  const next = { ...l };
6978
- if (_chunkO3ZU6QIZcjs.isDefaultDepthMask.call(void 0, merged)) {
6978
+ if (_chunkXNZWATSBcjs.isDefaultDepthMask.call(void 0, merged)) {
6979
6979
  if (_optionalChain([next, 'access', _264 => _264.mask, 'optionalAccess', _265 => _265.source])) delete next.mask;
6980
- } else next.mask = _chunkO3ZU6QIZcjs.depthRasterMask.call(void 0, merged);
6980
+ } else next.mask = _chunkXNZWATSBcjs.depthRasterMask.call(void 0, merged);
6981
6981
  return next;
6982
6982
  });
6983
6983
  }
@@ -6998,7 +6998,7 @@ var ImageEditorController = (_class7 = class {
6998
6998
  // --- Annotations & Layers ---
6999
6999
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
7000
7000
  annotationLayer(id) {
7001
- return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkO3ZU6QIZcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _268 => _268.id]) === id);
7001
+ return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkXNZWATSBcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _268 => _268.id]) === id);
7002
7002
  }
7003
7003
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
7004
7004
  annotationEnv() {
@@ -7014,7 +7014,7 @@ var ImageEditorController = (_class7 = class {
7014
7014
  this.recordHistory();
7015
7015
  const id = `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`;
7016
7016
  const fullAnnotation = { ...annotation, id };
7017
- const layer = _chunkO3ZU6QIZcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
7017
+ const layer = _chunkXNZWATSBcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
7018
7018
  const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
7019
7019
  this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _269 => _269.parent, 'optionalAccess', _270 => _270.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
7020
7020
  this.state.selectedAnnotationId = id;
@@ -7026,17 +7026,17 @@ var ImageEditorController = (_class7 = class {
7026
7026
  this.recordHistory();
7027
7027
  }
7028
7028
  const layer = this.annotationLayer(id);
7029
- const current = layer ? _chunkO3ZU6QIZcjs.annotationOfLayer.call(void 0, layer) : null;
7029
+ const current = layer ? _chunkXNZWATSBcjs.annotationOfLayer.call(void 0, layer) : null;
7030
7030
  if (layer && current) {
7031
7031
  const annotation = { ...current, ...partial, id };
7032
- const name = layer.name === _chunkO3ZU6QIZcjs.annotationLayerName.call(void 0, current) ? _chunkO3ZU6QIZcjs.annotationLayerName.call(void 0, annotation) : layer.name;
7032
+ const name = layer.name === _chunkXNZWATSBcjs.annotationLayerName.call(void 0, current) ? _chunkXNZWATSBcjs.annotationLayerName.call(void 0, annotation) : layer.name;
7033
7033
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => this.layerForAnnotation(layer, annotation, name));
7034
7034
  }
7035
7035
  this.notify();
7036
7036
  }
7037
7037
  /** `layer` (an annotation, or a shape or type layer migrated from one) showing `annotation` instead, keeping its other properties. */
7038
7038
  layerForAnnotation(layer, annotation, name) {
7039
- const fresh = _chunkO3ZU6QIZcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7039
+ const fresh = _chunkXNZWATSBcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7040
7040
  const keep = { id: layer.id, visible: layer.visible, opacity: layer.opacity };
7041
7041
  for (const k of ["clipped", "mask", "locks", "effects"]) if (layer[k] !== void 0) keep[k] = layer[k];
7042
7042
  if (fresh.type !== "annotation" && layer.type !== "annotation" && layer.fillOpacity !== void 0) keep.fillOpacity = layer.fillOpacity;
@@ -7323,8 +7323,8 @@ var ImageEditorController = (_class7 = class {
7323
7323
  return;
7324
7324
  }
7325
7325
  const target = this.developLayer();
7326
- if (!target) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("There is no pixel layer to mask.");
7327
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7326
+ if (!target) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("There is no pixel layer to mask.");
7327
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7328
7328
  const { width, height } = this.naturalSize;
7329
7329
  let px2 = await this.decodeImage(newDataUrl);
7330
7330
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
@@ -7332,14 +7332,14 @@ var ImageEditorController = (_class7 = class {
7332
7332
  for (let p = 0; p < alpha.length; p++) alpha[p] = px2.data[p * 4 + 3];
7333
7333
  let surface = _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data: alpha }, 1, 0, 0, 0);
7334
7334
  if (target.offset.x || target.offset.y) surface = _chunkCWM3CUUXcjs.translateSurface.call(void 0, surface, -target.offset.x, -target.offset.y);
7335
- this.commitLayers(_chunkO3ZU6QIZcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7335
+ this.commitLayers(_chunkXNZWATSBcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7336
7336
  return target.id;
7337
7337
  }
7338
7338
  // --- Type layers ---
7339
7339
 
7340
7340
  /** The shaper that lays out and draws type layers (`null` when there is none here). */
7341
7341
  getTextShaper() {
7342
- if (this.textShaperValue === void 0) this.textShaperValue = _chunkRCUX6CT2cjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7342
+ if (this.textShaperValue === void 0) this.textShaperValue = _chunkHRI3ZMDMcjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7343
7343
  return this.textShaperValue;
7344
7344
  }
7345
7345
  /** Sets the text shaper (fonts) type layers lay out and draw with; existing layers redraw on their next edit. */
@@ -7356,7 +7356,7 @@ var ImageEditorController = (_class7 = class {
7356
7356
  return _nullishCoalesce(_optionalChain([this, 'access', _277 => _277.getTextShaper, 'call', _278 => _278(), 'optionalAccess', _279 => _279.families, 'optionalCall', _280 => _280()]), () => ( ["sans-serif", "serif", "monospace"]));
7357
7357
  }
7358
7358
  typeInfo(id) {
7359
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7359
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7360
7360
  const ranges = (runs) => {
7361
7361
  let at = 0;
7362
7362
  return runs.map((r) => {
@@ -7369,7 +7369,7 @@ var ImageEditorController = (_class7 = class {
7369
7369
  let lines = [];
7370
7370
  let missing = _nullishCoalesce(layer.missingFonts, () => ( []));
7371
7371
  if (shaper) {
7372
- const layout = _chunkRCUX6CT2cjs.layoutText.call(void 0, layer, shaper);
7372
+ const layout = _chunkHRI3ZMDMcjs.layoutText.call(void 0, layer, shaper);
7373
7373
  const r = (n) => Math.round(n * 1e3) / 1e3;
7374
7374
  lines = layout.lines.map((l) => ({ start: l.start, end: l.end, baseline: r(l.baseline), width: r(l.width) }));
7375
7375
  if (layer.rendering === "stored") missing = layout.missingFonts;
@@ -7399,25 +7399,25 @@ var ImageEditorController = (_class7 = class {
7399
7399
  * text wrapped in `box`. Refused without a text shaper. Returns its id.
7400
7400
  */
7401
7401
  addTextLayer(init) {
7402
- const text = _chunkO3ZU6QIZcjs.normalizeText.call(void 0, init.text);
7403
- if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("x and y must be numbers (document pixels).");
7404
- const style = _chunkO3ZU6QIZcjs.patchTextStyle.call(void 0, { ..._chunkRCUX6CT2cjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7405
- const paragraph = _chunkO3ZU6QIZcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7402
+ const text = _chunkXNZWATSBcjs.normalizeText.call(void 0, init.text);
7403
+ if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("x and y must be numbers (document pixels).");
7404
+ const style = _chunkXNZWATSBcjs.patchTextStyle.call(void 0, { ..._chunkHRI3ZMDMcjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7405
+ const paragraph = _chunkXNZWATSBcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7406
7406
  let frame = { kind: "point" };
7407
7407
  if (init.box) {
7408
7408
  const { width, height } = init.box;
7409
- if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7409
+ if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7410
7410
  frame = { kind: "box", width, height };
7411
7411
  }
7412
- if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("rotation must be a number of degrees.");
7413
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("opacity must be between 0 and 1.");
7414
- if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7412
+ if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("rotation must be a number of degrees.");
7413
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("opacity must be between 0 and 1.");
7414
+ if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7415
7415
  const t = [1, 0, 0, 1, init.x, init.y];
7416
- const transform = init.rotation ? _chunkRCUX6CT2cjs.multiplyMatrices.call(void 0, t, _chunkRCUX6CT2cjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7417
- const layer = _chunkO3ZU6QIZcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkO3ZU6QIZcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7416
+ const transform = init.rotation ? _chunkHRI3ZMDMcjs.multiplyMatrices.call(void 0, t, _chunkHRI3ZMDMcjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7417
+ const layer = _chunkXNZWATSBcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkXNZWATSBcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7418
7418
  if (init.opacity !== void 0) layer.opacity = init.opacity;
7419
7419
  if (init.blend !== void 0) layer.blend = init.blend;
7420
- const next = _chunkO3ZU6QIZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7420
+ const next = _chunkXNZWATSBcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7421
7421
  this.commitLayers(next, () => {
7422
7422
  this.state.activeLayerId = layer.id;
7423
7423
  this.state.activeTarget = "pixels";
@@ -7429,28 +7429,28 @@ var ImageEditorController = (_class7 = class {
7429
7429
  * `start`. One undo step unless `commitToHistory` is false (typing). Returns the layer.
7430
7430
  */
7431
7431
  setText(id, text, range = {}, commitToHistory = true) {
7432
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7433
- const insert = _chunkO3ZU6QIZcjs.normalizeText.call(void 0, text);
7434
- const [start, end] = _chunkO3ZU6QIZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7435
- const { layers } = _chunkO3ZU6QIZcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkO3ZU6QIZcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7432
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7433
+ const insert = _chunkXNZWATSBcjs.normalizeText.call(void 0, text);
7434
+ const [start, end] = _chunkXNZWATSBcjs.textRange.call(void 0, layer.text, range.start, range.end);
7435
+ const { layers } = _chunkXNZWATSBcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkXNZWATSBcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7436
7436
  this.commitLayers(layers, void 0, commitToHistory);
7437
7437
  return this.typeInfo(id);
7438
7438
  }
7439
7439
  /** Sets character style fields over [start, end) (default all), one undo step. Returns the layer. */
7440
7440
  setTextStyle(id, style, range = {}, commitToHistory = true) {
7441
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7442
- const [start, end] = _chunkO3ZU6QIZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7443
- if (!Object.keys(style).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give at least one style field to set.");
7444
- _chunkO3ZU6QIZcjs.patchTextStyle.call(void 0, _chunkRCUX6CT2cjs.DEFAULT_TEXT_STYLE, style);
7445
- const { layers } = _chunkO3ZU6QIZcjs.updateTypeLayer.call(void 0,
7441
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7442
+ const [start, end] = _chunkXNZWATSBcjs.textRange.call(void 0, layer.text, range.start, range.end);
7443
+ if (!Object.keys(style).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give at least one style field to set.");
7444
+ _chunkXNZWATSBcjs.patchTextStyle.call(void 0, _chunkHRI3ZMDMcjs.DEFAULT_TEXT_STYLE, style);
7445
+ const { layers } = _chunkXNZWATSBcjs.updateTypeLayer.call(void 0,
7446
7446
  this.state.layers,
7447
7447
  id,
7448
7448
  (l) => {
7449
7449
  if (start === end) {
7450
- if (l.text.length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7451
- return { runs: [{ length: 0, style: _chunkO3ZU6QIZcjs.patchTextStyle.call(void 0, _chunkRCUX6CT2cjs.styleAt.call(void 0, l.runs, 0, _chunkRCUX6CT2cjs.DEFAULT_TEXT_STYLE), style) }] };
7450
+ if (l.text.length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7451
+ return { runs: [{ length: 0, style: _chunkXNZWATSBcjs.patchTextStyle.call(void 0, _chunkHRI3ZMDMcjs.styleAt.call(void 0, l.runs, 0, _chunkHRI3ZMDMcjs.DEFAULT_TEXT_STYLE), style) }] };
7452
7452
  }
7453
- return { runs: _chunkRCUX6CT2cjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkO3ZU6QIZcjs.patchTextStyle.call(void 0, s, style)) };
7453
+ return { runs: _chunkHRI3ZMDMcjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkXNZWATSBcjs.patchTextStyle.call(void 0, s, style)) };
7454
7454
  },
7455
7455
  this.textEnv(),
7456
7456
  "restyle its text"
@@ -7460,11 +7460,11 @@ var ImageEditorController = (_class7 = class {
7460
7460
  }
7461
7461
  /** Sets paragraph style fields on every paragraph that [start, end) touches (default all), one undo step. */
7462
7462
  setParagraphStyle(id, style, range = {}, commitToHistory = true) {
7463
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7464
- const [start, end] = _chunkO3ZU6QIZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7465
- if (!Object.keys(style).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give at least one paragraph field to set.");
7466
- _chunkO3ZU6QIZcjs.patchParagraphStyle.call(void 0, {}, style);
7467
- const { layers } = _chunkO3ZU6QIZcjs.updateTypeLayer.call(void 0,
7463
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7464
+ const [start, end] = _chunkXNZWATSBcjs.textRange.call(void 0, layer.text, range.start, range.end);
7465
+ if (!Object.keys(style).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give at least one paragraph field to set.");
7466
+ _chunkXNZWATSBcjs.patchParagraphStyle.call(void 0, {}, style);
7467
+ const { layers } = _chunkXNZWATSBcjs.updateTypeLayer.call(void 0,
7468
7468
  this.state.layers,
7469
7469
  id,
7470
7470
  (l) => {
@@ -7473,7 +7473,7 @@ var ImageEditorController = (_class7 = class {
7473
7473
  const a = at;
7474
7474
  at += p.length;
7475
7475
  const touches = a < end && at > start || start === end && start >= a && (start < at || at === l.text.length);
7476
- return touches || !l.text.length ? { length: p.length, style: _chunkO3ZU6QIZcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7476
+ return touches || !l.text.length ? { length: p.length, style: _chunkXNZWATSBcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7477
7477
  });
7478
7478
  return { paragraphs };
7479
7479
  },
@@ -7489,21 +7489,21 @@ var ImageEditorController = (_class7 = class {
7489
7489
  * paragraph. Also resizes a box. One undo step.
7490
7490
  */
7491
7491
  setTextFrame(id, frame, commitToHistory = true) {
7492
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7493
- if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("width and height must be at least 1 pixel.");
7494
- if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("kind must be point or box.");
7492
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7493
+ if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("width and height must be at least 1 pixel.");
7494
+ if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("kind must be point or box.");
7495
7495
  const shaper = this.getTextShaper();
7496
- const { layers } = _chunkO3ZU6QIZcjs.updateTypeLayer.call(void 0,
7496
+ const { layers } = _chunkXNZWATSBcjs.updateTypeLayer.call(void 0,
7497
7497
  this.state.layers,
7498
7498
  id,
7499
7499
  (l) => {
7500
7500
  if (frame.kind === "box" && l.frame.kind === "box") return { frame: { kind: "box", width: frame.width, height: frame.height } };
7501
- if (!shaper) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7502
- const lines = _chunkRCUX6CT2cjs.layoutText.call(void 0, l, shaper).lines;
7501
+ if (!shaper) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7502
+ const lines = _chunkHRI3ZMDMcjs.layoutText.call(void 0, l, shaper).lines;
7503
7503
  const first = lines[0];
7504
7504
  const dx = frame.kind === "box" ? first ? first.x : 0 : 0;
7505
7505
  const dy = frame.kind === "box" ? first ? first.baseline - first.ascent : 0 : first ? first.baseline : 0;
7506
- const m = _chunkO3ZU6QIZcjs.textMatrix.call(void 0, l);
7506
+ const m = _chunkXNZWATSBcjs.textMatrix.call(void 0, l);
7507
7507
  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]];
7508
7508
  const nextFrame = frame.kind === "box" ? { kind: "box", width: frame.width, height: frame.height } : { kind: "point" };
7509
7509
  return { frame: nextFrame, transform: shifted };
@@ -7520,21 +7520,21 @@ var ImageEditorController = (_class7 = class {
7520
7520
  * `warnings` says when other colours were dropped. One undo step.
7521
7521
  */
7522
7522
  convertTextToShape(id) {
7523
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7524
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7523
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7524
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7525
7525
  const shaper = this.getTextShaper();
7526
- if (!shaper) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7527
- const parts = _chunkO3ZU6QIZcjs.textOutlines.call(void 0, layer, shaper);
7528
- const subpaths = parts.flatMap((p) => _chunkRCUX6CT2cjs.bezierToSubpaths.call(void 0, p.path));
7529
- if (!subpaths.length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7526
+ if (!shaper) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7527
+ const parts = _chunkXNZWATSBcjs.textOutlines.call(void 0, layer, shaper);
7528
+ const subpaths = parts.flatMap((p) => _chunkHRI3ZMDMcjs.bezierToSubpaths.call(void 0, p.path));
7529
+ if (!subpaths.length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7530
7530
  const warnings = [];
7531
7531
  const colors = new Set(layer.runs.filter((r) => r.length > 0).map((r) => `${r.style.color}/${_nullishCoalesce(r.style.opacity, () => ( 1))}`));
7532
7532
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
7533
- const missing = _chunkRCUX6CT2cjs.layoutText.call(void 0, layer, shaper).missingFonts;
7533
+ const missing = _chunkHRI3ZMDMcjs.layoutText.call(void 0, layer, shaper).missingFonts;
7534
7534
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
7535
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _281 => _281.runs, 'access', _282 => _282.find, 'call', _283 => _283((r) => r.length > 0), 'optionalAccess', _284 => _284.style]), () => ( _chunkRCUX6CT2cjs.DEFAULT_TEXT_STYLE));
7535
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _281 => _281.runs, 'access', _282 => _282.find, 'call', _283 => _283((r) => r.length > 0), 'optionalAccess', _284 => _284.style]), () => ( _chunkHRI3ZMDMcjs.DEFAULT_TEXT_STYLE));
7536
7536
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
7537
- const shape = _chunkO3ZU6QIZcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7537
+ const shape = _chunkXNZWATSBcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7538
7538
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
7539
7539
  for (const k of ["clipped", "mask", "locks", "effects", "fillOpacity"]) if (layer[k] !== void 0) keep[k] = layer[k];
7540
7540
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => ({ ...shape, ...keep })));
@@ -7542,23 +7542,23 @@ var ImageEditorController = (_class7 = class {
7542
7542
  }
7543
7543
  /** The layout of a type layer (lines, characters, bounds in text space), or `null` without a shaper. */
7544
7544
  getTextLayout(id) {
7545
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7545
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7546
7546
  const shaper = this.getTextShaper();
7547
- return shaper ? _chunkRCUX6CT2cjs.layoutText.call(void 0, layer, shaper) : null;
7547
+ return shaper ? _chunkHRI3ZMDMcjs.layoutText.call(void 0, layer, shaper) : null;
7548
7548
  }
7549
7549
  /** The text index nearest a document point (for clicks on a type layer). */
7550
7550
  textIndexAt(id, point) {
7551
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7551
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7552
7552
  const layout = this.getTextLayout(id);
7553
- return layout ? _chunkRCUX6CT2cjs.textIndexAt.call(void 0, layout, _chunkO3ZU6QIZcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7553
+ return layout ? _chunkHRI3ZMDMcjs.textIndexAt.call(void 0, layout, _chunkXNZWATSBcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7554
7554
  }
7555
7555
  /** The caret at text index `index` as a document-space segment (top to bottom), for drawing it. */
7556
7556
  textCaret(id, index) {
7557
- const layer = _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7557
+ const layer = _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7558
7558
  const layout = this.getTextLayout(id);
7559
7559
  if (!layout) return null;
7560
- const c = _chunkRCUX6CT2cjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7561
- const m = _chunkO3ZU6QIZcjs.textMatrix.call(void 0, layer);
7560
+ const c = _chunkHRI3ZMDMcjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7561
+ const m = _chunkXNZWATSBcjs.textMatrix.call(void 0, layer);
7562
7562
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
7563
7563
  return { top: at(c.x, c.top), bottom: at(c.x, c.bottom), line: c.line };
7564
7564
  }
@@ -7569,14 +7569,14 @@ var ImageEditorController = (_class7 = class {
7569
7569
  }
7570
7570
  /** One component from tool or UI input (validated). */
7571
7571
  componentFrom(spec, path) {
7572
- const op = _chunkO3ZU6QIZcjs.requireOperation.call(void 0, spec.op, `${path}op`);
7573
- if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7574
- if (spec.shape !== void 0) return _chunkO3ZU6QIZcjs.liveComponent.call(void 0, _chunkO3ZU6QIZcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7575
- if (spec.subpaths !== void 0) return { op, subpaths: _chunkO3ZU6QIZcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7576
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7572
+ const op = _chunkXNZWATSBcjs.requireOperation.call(void 0, spec.op, `${path}op`);
7573
+ if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7574
+ if (spec.shape !== void 0) return _chunkXNZWATSBcjs.liveComponent.call(void 0, _chunkXNZWATSBcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7575
+ if (spec.subpaths !== void 0) return { op, subpaths: _chunkXNZWATSBcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7576
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7577
7577
  }
7578
7578
  shapeInfo(id) {
7579
- const layer = _chunkO3ZU6QIZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7579
+ const layer = _chunkXNZWATSBcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7580
7580
  const r = (n) => Math.round(n * 1e3) / 1e3;
7581
7581
  const box = (b) => b ? { x: r(b.x), y: r(b.y), width: r(b.width), height: r(b.height) } : null;
7582
7582
  const info = {
@@ -7586,13 +7586,13 @@ var ImageEditorController = (_class7 = class {
7586
7586
  index,
7587
7587
  op: c.op,
7588
7588
  live: c.live ? JSON.parse(JSON.stringify(c.live)) : null,
7589
- subpaths: _chunkRCUX6CT2cjs.roundSubpaths.call(void 0, c.subpaths),
7590
- bounds: box(_chunkO3ZU6QIZcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7589
+ subpaths: _chunkHRI3ZMDMcjs.roundSubpaths.call(void 0, c.subpaths),
7590
+ bounds: box(_chunkXNZWATSBcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7591
7591
  })),
7592
7592
  fillRule: _nullishCoalesce(layer.fillRule, () => ( "nonzero")),
7593
7593
  fill: layer.fill ? JSON.parse(JSON.stringify(layer.fill)) : null,
7594
7594
  stroke: layer.stroke ? JSON.parse(JSON.stringify(layer.stroke)) : null,
7595
- geometryBounds: box(_chunkO3ZU6QIZcjs.shapeGeometryBounds.call(void 0, layer)),
7595
+ geometryBounds: box(_chunkXNZWATSBcjs.shapeGeometryBounds.call(void 0, layer)),
7596
7596
  bounds: this.getLayerBounds(id)
7597
7597
  };
7598
7598
  if (layer.annotation) info.annotationId = layer.annotation.id;
@@ -7609,17 +7609,17 @@ var ImageEditorController = (_class7 = class {
7609
7609
  */
7610
7610
  addShapeLayer(init) {
7611
7611
  const specs = _optionalChain([init, 'access', _289 => _289.components, 'optionalAccess', _290 => _290.length]) ? init.components : [init];
7612
- if (_optionalChain([init, 'access', _291 => _291.components, 'optionalAccess', _292 => _292.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7612
+ if (_optionalChain([init, 'access', _291 => _291.components, 'optionalAccess', _292 => _292.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7613
7613
  const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _293 => _293.components, 'optionalAccess', _294 => _294.length]) ? `components[${i}].` : ""));
7614
- const stroke = init.stroke ? _chunkO3ZU6QIZcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7614
+ const stroke = init.stroke ? _chunkXNZWATSBcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7615
7615
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
7616
- const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkO3ZU6QIZcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkO3ZU6QIZcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7617
- if (!fill && !stroke) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7618
- if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7619
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("opacity must be between 0 and 1.");
7620
- if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7621
- const layer = _chunkO3ZU6QIZcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7622
- const next = _chunkO3ZU6QIZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7616
+ const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkXNZWATSBcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkXNZWATSBcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7617
+ if (!fill && !stroke) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7618
+ if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7619
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("opacity must be between 0 and 1.");
7620
+ if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7621
+ const layer = _chunkXNZWATSBcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7622
+ const next = _chunkXNZWATSBcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7623
7623
  this.commitLayers(next, () => {
7624
7624
  this.state.activeLayerId = layer.id;
7625
7625
  this.state.activeTarget = "pixels";
@@ -7632,18 +7632,18 @@ var ImageEditorController = (_class7 = class {
7632
7632
  * only those settings of the current stroke. Returns the shape.
7633
7633
  */
7634
7634
  setShapeStyle(id, changes, commitToHistory = true) {
7635
- const layer = _chunkO3ZU6QIZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7636
- const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkO3ZU6QIZcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7637
- const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkO3ZU6QIZcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7638
- if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7635
+ const layer = _chunkXNZWATSBcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7636
+ const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkXNZWATSBcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7637
+ const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkXNZWATSBcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7638
+ if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7639
7639
  const fillRule = _nullishCoalesce(_nullishCoalesce(changes.fillRule, () => ( layer.fillRule)), () => ( "nonzero"));
7640
- const { layers } = _chunkO3ZU6QIZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7640
+ const { layers } = _chunkXNZWATSBcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7641
7641
  this.commitLayers(layers, void 0, commitToHistory);
7642
7642
  return this.shapeInfo(id);
7643
7643
  }
7644
7644
  componentIndex(layer, index) {
7645
7645
  if (!Number.isInteger(index) || index < 0 || index >= layer.components.length) {
7646
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7646
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7647
7647
  }
7648
7648
  return index;
7649
7649
  }
@@ -7653,36 +7653,36 @@ var ImageEditorController = (_class7 = class {
7653
7653
  * the live shape) or its operation. Returns the shape.
7654
7654
  */
7655
7655
  setShapeComponent(id, index, change, commitToHistory = true) {
7656
- const layer = _chunkO3ZU6QIZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7656
+ const layer = _chunkXNZWATSBcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7657
7657
  const i = this.componentIndex(layer, index);
7658
7658
  const current = layer.components[i];
7659
7659
  let shape = change.shape;
7660
7660
  if (shape && current.live && shape.kind === void 0) shape = { ...current.live, ...shape };
7661
7661
  else if (shape && current.live && shape.kind === current.live.kind) shape = { ...current.live, ...shape };
7662
- const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkO3ZU6QIZcjs.requireOperation.call(void 0, change.op) };
7662
+ const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkXNZWATSBcjs.requireOperation.call(void 0, change.op) };
7663
7663
  const components = layer.components.map((c, k) => k === i ? next : c);
7664
- const { layers } = _chunkO3ZU6QIZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7664
+ const { layers } = _chunkXNZWATSBcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7665
7665
  this.commitLayers(layers, void 0, commitToHistory);
7666
7666
  return this.shapeInfo(id);
7667
7667
  }
7668
7668
  /** Adds a component to a shape (path operations), on top unless `index` is given (one undo step). Returns the shape. */
7669
7669
  addShapeComponent(id, spec, index) {
7670
- const layer = _chunkO3ZU6QIZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7670
+ const layer = _chunkXNZWATSBcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7671
7671
  const c = this.componentFrom(spec, "");
7672
7672
  const at = index === void 0 ? layer.components.length : index;
7673
- if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7673
+ if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7674
7674
  const components = [...layer.components.slice(0, at), c, ...layer.components.slice(at)];
7675
- const { layers } = _chunkO3ZU6QIZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7675
+ const { layers } = _chunkXNZWATSBcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7676
7676
  this.commitLayers(layers);
7677
7677
  return this.shapeInfo(id);
7678
7678
  }
7679
7679
  /** Removes one component of a shape (one undo step); the last one cannot go (delete the layer instead). Returns the shape. */
7680
7680
  removeShapeComponent(id, index) {
7681
- const layer = _chunkO3ZU6QIZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7681
+ const layer = _chunkXNZWATSBcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7682
7682
  const i = this.componentIndex(layer, index);
7683
- if (layer.components.length === 1) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7683
+ if (layer.components.length === 1) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7684
7684
  const components = layer.components.filter((_, k) => k !== i);
7685
- const { layers } = _chunkO3ZU6QIZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7685
+ const { layers } = _chunkXNZWATSBcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7686
7686
  this.commitLayers(layers);
7687
7687
  return this.shapeInfo(id);
7688
7688
  }
@@ -7691,10 +7691,10 @@ var ImageEditorController = (_class7 = class {
7691
7691
  * shapes become paths), as one undo step. Returns the shape.
7692
7692
  */
7693
7693
  mergeShapeComponents(id) {
7694
- const layer = _chunkO3ZU6QIZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7695
- if (layer.components.length < 2) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7696
- const components = _chunkO3ZU6QIZcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7697
- const { layers } = _chunkO3ZU6QIZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7694
+ const layer = _chunkXNZWATSBcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7695
+ if (layer.components.length < 2) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7696
+ const components = _chunkXNZWATSBcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7697
+ const { layers } = _chunkXNZWATSBcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7698
7698
  this.commitLayers(layers);
7699
7699
  return this.shapeInfo(id);
7700
7700
  }
@@ -7704,8 +7704,8 @@ var ImageEditorController = (_class7 = class {
7704
7704
  * step. Returns the layer id.
7705
7705
  */
7706
7706
  async rasterizeLayer(id) {
7707
- const layer = _chunkO3ZU6QIZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7708
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7707
+ const layer = _chunkXNZWATSBcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7708
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7709
7709
  const { width, height } = this.naturalSize;
7710
7710
  const canvas = { x: 0, y: 0, width, height };
7711
7711
  let next;
@@ -7721,8 +7721,8 @@ var ImageEditorController = (_class7 = class {
7721
7721
  if (layer.locks) next.locks = layer.locks;
7722
7722
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
7723
7723
  } else if (layer.type === "pixel") {
7724
- if (!_optionalChain([layer, 'access', _295 => _295.filters, 'optionalAccess', _296 => _296.length])) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7725
- _chunkO3ZU6QIZcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7724
+ if (!_optionalChain([layer, 'access', _295 => _295.filters, 'optionalAccess', _296 => _296.length])) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7725
+ _chunkXNZWATSBcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7726
7726
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
7727
7727
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
7728
7728
  delete content.mask;
@@ -7739,10 +7739,10 @@ var ImageEditorController = (_class7 = class {
7739
7739
  } else if (layer.type === "smart") {
7740
7740
  return this.rasterizeSmartObject(id);
7741
7741
  } else if (layer.type === "shape" || layer.type === "type") {
7742
- next = layer.type === "shape" ? _chunkO3ZU6QIZcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkO3ZU6QIZcjs.typeAsPixelLayer.call(void 0, layer);
7742
+ next = layer.type === "shape" ? _chunkXNZWATSBcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkXNZWATSBcjs.typeAsPixelLayer.call(void 0, layer);
7743
7743
  if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _297 => _297.annotation, 'optionalAccess', _298 => _298.id])) this.state.selectedAnnotationId = null;
7744
7744
  } else {
7745
- throw new (0, _chunkO3ZU6QIZcjs.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.`);
7745
+ throw new (0, _chunkXNZWATSBcjs.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.`);
7746
7746
  }
7747
7747
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
7748
7748
  return id;
@@ -7767,7 +7767,7 @@ var ImageEditorController = (_class7 = class {
7767
7767
  setColorMode(mode, options = {}) {
7768
7768
  let next;
7769
7769
  if (mode === "rgb") {
7770
- if (options.profile !== void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7770
+ if (options.profile !== void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7771
7771
  next = null;
7772
7772
  } else if (mode === "lab") next = { mode: "lab" };
7773
7773
  else if (mode === "cmyk") {
@@ -7775,14 +7775,14 @@ var ImageEditorController = (_class7 = class {
7775
7775
  try {
7776
7776
  doc = documentProfile(_nullishCoalesce(options.profile, () => ( "coated-cmyk")));
7777
7777
  } catch (e) {
7778
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7778
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7779
7779
  }
7780
7780
  const cs = resolveProfile(doc).colorSpace;
7781
- if (cs !== "cmyk") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7781
+ if (cs !== "cmyk") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7782
7782
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7783
- if (!_chunkONZJD2ODcjs.INTENTS.includes(intent)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkONZJD2ODcjs.INTENTS.join(", ")}.`);
7783
+ if (!_chunkONZJD2ODcjs.INTENTS.includes(intent)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkONZJD2ODcjs.INTENTS.join(", ")}.`);
7784
7784
  next = { mode: "cmyk", profile: doc, intent };
7785
- } else throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7785
+ } else throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7786
7786
  this.recordHistory();
7787
7787
  if (next) this.state.colorMode = next;
7788
7788
  else delete this.state.colorMode;
@@ -7795,10 +7795,10 @@ var ImageEditorController = (_class7 = class {
7795
7795
  try {
7796
7796
  doc = documentProfile(profile);
7797
7797
  } catch (e) {
7798
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7798
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7799
7799
  }
7800
7800
  const cs = resolveProfile(doc).colorSpace;
7801
- if (cs !== "rgb") throw new (0, _chunkO3ZU6QIZcjs.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.`);
7801
+ if (cs !== "rgb") throw new (0, _chunkXNZWATSBcjs.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.`);
7802
7802
  return doc;
7803
7803
  }
7804
7804
  /**
@@ -7824,7 +7824,7 @@ var ImageEditorController = (_class7 = class {
7824
7824
  convertToProfile(profile, options = {}) {
7825
7825
  const doc = this.rgbProfileArg(profile, "Convert to Profile");
7826
7826
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7827
- if (!_chunkONZJD2ODcjs.INTENTS.includes(intent)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkONZJD2ODcjs.INTENTS.join(", ")}.`);
7827
+ if (!_chunkONZJD2ODcjs.INTENTS.includes(intent)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkONZJD2ODcjs.INTENTS.join(", ")}.`);
7828
7828
  const t = _chunkONZJD2ODcjs.Transform.create(resolveProfile(this.state.colorProfile), resolveProfile(doc), { intent, bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7829
7829
  const converted = [];
7830
7830
  const unconverted = [];
@@ -7854,11 +7854,11 @@ var ImageEditorController = (_class7 = class {
7854
7854
  else if (l.type === "pixel") next2 = { ...next2, surface: convertSurfaceColors(this.surfaceOf(l), t), source: void 0 };
7855
7855
  else if (l.type === "shape") {
7856
7856
  const s = next2;
7857
- next2 = _chunkO3ZU6QIZcjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
7857
+ next2 = _chunkXNZWATSBcjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
7858
7858
  } else if (l.type === "type") {
7859
7859
  const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
7860
7860
  try {
7861
- next2 = _chunkO3ZU6QIZcjs.rerenderText.call(void 0, recoloured, textEnv);
7861
+ next2 = _chunkXNZWATSBcjs.rerenderText.call(void 0, recoloured, textEnv);
7862
7862
  } catch (e27) {
7863
7863
  next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
7864
7864
  }
@@ -7888,12 +7888,12 @@ var ImageEditorController = (_class7 = class {
7888
7888
  try {
7889
7889
  doc = documentProfile(setup.profile);
7890
7890
  } catch (e) {
7891
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7891
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7892
7892
  }
7893
7893
  const intent = _nullishCoalesce(setup.intent, () => ( DEFAULT_PROOF.intent));
7894
- if (!_chunkONZJD2ODcjs.INTENTS.includes(intent)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkONZJD2ODcjs.INTENTS.join(", ")}.`);
7894
+ if (!_chunkONZJD2ODcjs.INTENTS.includes(intent)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkONZJD2ODcjs.INTENTS.join(", ")}.`);
7895
7895
  const next = { ...DEFAULT_PROOF, ...setup, intent, profile: doc };
7896
- if (!_chunkONZJD2ODcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7896
+ if (!_chunkONZJD2ODcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7897
7897
  this.state.proofSetup = next;
7898
7898
  this.notify();
7899
7899
  return next;
@@ -7910,14 +7910,14 @@ var ImageEditorController = (_class7 = class {
7910
7910
  src = options.from !== void 0 ? resolveProfile(documentProfile(options.from)) : resolveProfile(this.state.colorProfile);
7911
7911
  dst = resolveProfile(documentProfile(to));
7912
7912
  } catch (e) {
7913
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7913
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7914
7914
  }
7915
- if (src.colorSpace !== "rgb") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7915
+ if (src.colorSpace !== "rgb") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7916
7916
  const t = _chunkONZJD2ODcjs.Transform.create(src, dst, { intent: _nullishCoalesce(options.intent, () => ( "relative")), bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7917
7917
  const toLab = _chunkONZJD2ODcjs.Transform.create(src, _chunkONZJD2ODcjs.builtinProfile.call(void 0, "lab-d50"), { intent: "relative", bpc: false });
7918
7918
  return colors.map((input) => {
7919
7919
  const m = /^#?([0-9a-f]{6})$/i.exec(input.trim());
7920
- if (!m) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7920
+ if (!m) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7921
7921
  const n = parseInt(m[1], 16);
7922
7922
  const rgb = [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255];
7923
7923
  const out = new Float32Array(16);
@@ -7943,7 +7943,7 @@ var ImageEditorController = (_class7 = class {
7943
7943
  * the ids of the layers whose pixels changed.
7944
7944
  */
7945
7945
  setBitDepth(depth) {
7946
- if (!_chunkCWM3CUUXcjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7946
+ if (!_chunkCWM3CUUXcjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7947
7947
  const changed = [];
7948
7948
  const withMask = (l) => {
7949
7949
  const m = l.mask;
@@ -7992,7 +7992,7 @@ var ImageEditorController = (_class7 = class {
7992
7992
  * Throws `PsdError` for files that cannot be read at all.
7993
7993
  */
7994
7994
  loadPsd(bytes) {
7995
- const result = _chunkO3ZU6QIZcjs.importPsd.call(void 0, bytes, { newId: () => _chunkO3ZU6QIZcjs.newLayerId.call(void 0, ) });
7995
+ const result = _chunkXNZWATSBcjs.importPsd.call(void 0, bytes, { newId: () => _chunkXNZWATSBcjs.newLayerId.call(void 0, ) });
7996
7996
  this.abandonContents();
7997
7997
  this.recordHistory();
7998
7998
  const s = this.state;
@@ -8002,7 +8002,7 @@ var ImageEditorController = (_class7 = class {
8002
8002
  if (!this.samplePixelsOverride) this.samplePixels = null;
8003
8003
  s.layers = this.checkPsdFonts(result);
8004
8004
  s.crop = null;
8005
- s.transform = { ..._chunkO3ZU6QIZcjs.DEFAULT_TRANSFORM_VALUES };
8005
+ s.transform = { ..._chunkXNZWATSBcjs.DEFAULT_TRANSFORM_VALUES };
8006
8006
  s.outputOpacity = 1;
8007
8007
  delete s.legacyOutputBlur;
8008
8008
  s.selection = null;
@@ -8053,7 +8053,7 @@ var ImageEditorController = (_class7 = class {
8053
8053
  let layers = result.layers;
8054
8054
  const missing = /* @__PURE__ */ new Map();
8055
8055
  for (const l of types) {
8056
- const fonts = shaper ? _chunkRCUX6CT2cjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8056
+ const fonts = shaper ? _chunkHRI3ZMDMcjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8057
8057
  if (!fonts.length) continue;
8058
8058
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, missingFonts: fonts }));
8059
8059
  for (const f of fonts) missing.set(f, [..._nullishCoalesce(missing.get(f), () => ( [])), l.name]);
@@ -8081,7 +8081,7 @@ var ImageEditorController = (_class7 = class {
8081
8081
  const canRasterize = this.renderer.canRasterize();
8082
8082
  await this.renderer.prepareLayerAssets(this.state.layers, width, height);
8083
8083
  const sources = this.renderer.compositorSources(width, height);
8084
- const compositor = new (0, _chunkO3ZU6QIZcjs.LayerCompositor)();
8084
+ const compositor = new (0, _chunkXNZWATSBcjs.LayerCompositor)();
8085
8085
  const bakeMask = (layer) => {
8086
8086
  const mask = layer.mask;
8087
8087
  if (!_optionalChain([mask, 'optionalAccess', _309 => _309.source])) return mask;
@@ -8163,7 +8163,7 @@ var ImageEditorController = (_class7 = class {
8163
8163
  out.surface = this.surfaceOf(layer);
8164
8164
  delete out.source;
8165
8165
  }
8166
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _313 => _313.filters, 'optionalAccess', _314 => _314.filter, 'call', _315 => _315(_chunkO3ZU6QIZcjs.isActiveFilter)]), () => ( []));
8166
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _313 => _313.filters, 'optionalAccess', _314 => _314.filter, 'call', _315 => _315(_chunkXNZWATSBcjs.isActiveFilter)]), () => ( []));
8167
8167
  if (active.length) {
8168
8168
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
8169
8169
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -8196,8 +8196,8 @@ var ImageEditorController = (_class7 = class {
8196
8196
  const color = this.psdColorOptions(warnings);
8197
8197
  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).`);
8198
8198
  const depth = color.colorMode && this.bitDepth === 32 ? 16 : this.bitDepth;
8199
- const mergedDeep = depth === 8 ? void 0 : _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkO3ZU6QIZcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8200
- const result = _chunkO3ZU6QIZcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8199
+ const mergedDeep = depth === 8 ? void 0 : _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkXNZWATSBcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8200
+ const result = _chunkXNZWATSBcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8201
8201
  warnings.push(...result.warnings);
8202
8202
  return { bytes: result.bytes, warnings, psb: result.psb, width, height };
8203
8203
  }
@@ -8213,13 +8213,13 @@ var ImageEditorController = (_class7 = class {
8213
8213
  if (!this.samplePixelsOverride) this.samplePixels = null;
8214
8214
  if (this.state.selection && (sx !== 1 || sy !== 1)) {
8215
8215
  this.state.selection = normalizeSelection(
8216
- _chunkO3ZU6QIZcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8216
+ _chunkXNZWATSBcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8217
8217
  );
8218
8218
  }
8219
8219
  let layers = this.state.layers;
8220
8220
  if (sx !== 1 || sy !== 1) {
8221
8221
  if (this.state.crop) {
8222
- this.state.crop = _chunkO3ZU6QIZcjs.clampCropToImage.call(void 0,
8222
+ this.state.crop = _chunkXNZWATSBcjs.clampCropToImage.call(void 0,
8223
8223
  {
8224
8224
  x: Math.round(this.state.crop.x * sx),
8225
8225
  y: Math.round(this.state.crop.y * sy),
@@ -8238,17 +8238,17 @@ var ImageEditorController = (_class7 = class {
8238
8238
  } else if (l.type === "shape") {
8239
8239
  const a = l.annotation;
8240
8240
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
8241
- const fromAnnotation = scaled ? _chunkO3ZU6QIZcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8241
+ const fromAnnotation = scaled ? _chunkXNZWATSBcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8242
8242
  const m = [sx, 0, 0, sy, 0, 0];
8243
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _323 => _323.components]), () => ( _chunkO3ZU6QIZcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8243
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _323 => _323.components]), () => ( _chunkXNZWATSBcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8244
8244
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
8245
8245
  if (scaled && fromAnnotation) moved.annotation = scaled;
8246
8246
  else delete moved.annotation;
8247
- layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkO3ZU6QIZcjs.rerenderShape.call(void 0, moved, env));
8247
+ layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkXNZWATSBcjs.rerenderShape.call(void 0, moved, env));
8248
8248
  }
8249
8249
  }
8250
8250
  }
8251
- const bg = _chunkO3ZU6QIZcjs.developTarget.call(void 0, layers, null);
8251
+ const bg = _chunkXNZWATSBcjs.developTarget.call(void 0, layers, null);
8252
8252
  if (bg && bg.source !== "document") layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
8253
8253
  if (clearAnnotations) {
8254
8254
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation" || (l.type === "shape" || l.type === "type") && l.annotation) layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => null);
@@ -8269,7 +8269,7 @@ var ImageEditorController = (_class7 = class {
8269
8269
  let out;
8270
8270
  try {
8271
8271
  out = this.serializeState();
8272
- if (_optionalChain([this, 'access', _327 => _327.state, 'access', _328 => _328.selection, 'optionalAccess', _329 => _329.bounds])) out.selection = _chunkO3ZU6QIZcjs.serializeSelection.call(void 0, this.state.selection);
8272
+ if (_optionalChain([this, 'access', _327 => _327.state, 'access', _328 => _328.selection, 'optionalAccess', _329 => _329.bounds])) out.selection = _chunkXNZWATSBcjs.serializeSelection.call(void 0, this.state.selection);
8273
8273
  } finally {
8274
8274
  if (root) {
8275
8275
  this.state = current;
@@ -8277,8 +8277,8 @@ var ImageEditorController = (_class7 = class {
8277
8277
  this.viewKey = [];
8278
8278
  }
8279
8279
  }
8280
- if (!options || out.version !== _chunkO3ZU6QIZcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8281
- return _chunkO3ZU6QIZcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8280
+ if (!options || out.version !== _chunkXNZWATSBcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8281
+ return _chunkXNZWATSBcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8282
8282
  }
8283
8283
  /**
8284
8284
  * Loads a stored state whose v3 assets may live in an asset store (references other than data
@@ -8286,12 +8286,12 @@ var ImageEditorController = (_class7 = class {
8286
8286
  * out and listed in `lastLoadProblems`.
8287
8287
  */
8288
8288
  async loadJSONAsync(data, options = {}) {
8289
- if (data.version !== _chunkO3ZU6QIZcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8289
+ if (data.version !== _chunkXNZWATSBcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8290
8290
  this.loadJSON(data);
8291
8291
  return;
8292
8292
  }
8293
8293
  const problems = [];
8294
- const assets = await _chunkO3ZU6QIZcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8294
+ const assets = await _chunkXNZWATSBcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8295
8295
  this.loadJSON({ ...data, assets });
8296
8296
  this.lastLoadProblems = [...problems, ...this.lastLoadProblems];
8297
8297
  }
@@ -8303,7 +8303,7 @@ var ImageEditorController = (_class7 = class {
8303
8303
  let selection = null;
8304
8304
  if (data.selection) {
8305
8305
  try {
8306
- selection = normalizeSelection(_chunkO3ZU6QIZcjs.deserializeSelection.call(void 0, data.selection));
8306
+ selection = normalizeSelection(_chunkXNZWATSBcjs.deserializeSelection.call(void 0, data.selection));
8307
8307
  } catch (e28) {
8308
8308
  selection = null;
8309
8309
  }
@@ -8321,8 +8321,8 @@ var ImageEditorController = (_class7 = class {
8321
8321
  if (isLayered(data)) {
8322
8322
  const problems = [];
8323
8323
  const canvas = typeof data.width === "number" && data.width > 0 && typeof data.height === "number" && data.height > 0 ? { width: data.width, height: data.height } : this.naturalSize;
8324
- const storedPatterns = _chunkO3ZU6QIZcjs.deserializePatterns.call(void 0, data.patterns, []);
8325
- s.layers = _chunkO3ZU6QIZcjs.deserializeLayers.call(void 0, data.layers, {
8324
+ const storedPatterns = _chunkXNZWATSBcjs.deserializePatterns.call(void 0, data.patterns, []);
8325
+ s.layers = _chunkXNZWATSBcjs.deserializeLayers.call(void 0, data.layers, {
8326
8326
  assets: _nullishCoalesce(data.assets, () => ( {})),
8327
8327
  problems,
8328
8328
  smartContents: Array.isArray(data.smartContents) ? data.smartContents : [],
@@ -8340,7 +8340,7 @@ var ImageEditorController = (_class7 = class {
8340
8340
  const light = data.globalLight;
8341
8341
  if (light && Number.isFinite(light.angle) && Number.isFinite(light.altitude)) s.globalLight = { angle: light.angle, altitude: Math.min(90, Math.max(0, light.altitude)) };
8342
8342
  else delete s.globalLight;
8343
- const patterns = _chunkO3ZU6QIZcjs.deserializePatterns.call(void 0, data.patterns, problems);
8343
+ const patterns = _chunkXNZWATSBcjs.deserializePatterns.call(void 0, data.patterns, problems);
8344
8344
  if (patterns.length) s.patterns = patterns;
8345
8345
  else delete s.patterns;
8346
8346
  if (data.bitDepth === 16 || data.bitDepth === 32) s.bitDepth = data.bitDepth;
@@ -8356,7 +8356,7 @@ var ImageEditorController = (_class7 = class {
8356
8356
  }
8357
8357
  } else {
8358
8358
  const { width, height } = this.naturalSize;
8359
- const stack = _chunkO3ZU6QIZcjs.layersFromLegacy.call(void 0, data, width, height);
8359
+ const stack = _chunkXNZWATSBcjs.layersFromLegacy.call(void 0, data, width, height);
8360
8360
  s.layers = stack.layers;
8361
8361
  s.outputOpacity = stack.outputOpacity;
8362
8362
  if (stack.legacyOutputBlur !== void 0) s.legacyOutputBlur = stack.legacyOutputBlur;
@@ -8377,7 +8377,7 @@ var ImageEditorController = (_class7 = class {
8377
8377
  }
8378
8378
  serializeState() {
8379
8379
  const { width, height } = this.naturalSize;
8380
- const view = _chunkO3ZU6QIZcjs.legacyView.call(void 0, this.stack(), width, height, null);
8380
+ const view = _chunkXNZWATSBcjs.legacyView.call(void 0, this.stack(), width, height, null);
8381
8381
  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) {
8382
8382
  return {
8383
8383
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
@@ -8392,9 +8392,9 @@ var ImageEditorController = (_class7 = class {
8392
8392
  annotations: JSON.parse(JSON.stringify(view.annotations))
8393
8393
  };
8394
8394
  }
8395
- const { layers, assets, smartContents } = _chunkO3ZU6QIZcjs.serializeLayers.call(void 0, this.state.layers);
8395
+ const { layers, assets, smartContents } = _chunkXNZWATSBcjs.serializeLayers.call(void 0, this.state.layers);
8396
8396
  const out = {
8397
- version: _chunkO3ZU6QIZcjs.LAYERED_SCHEMA_VERSION,
8397
+ version: _chunkXNZWATSBcjs.LAYERED_SCHEMA_VERSION,
8398
8398
  width,
8399
8399
  height,
8400
8400
  layers,
@@ -8406,7 +8406,7 @@ var ImageEditorController = (_class7 = class {
8406
8406
  };
8407
8407
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
8408
8408
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
8409
- if (_optionalChain([this, 'access', _336 => _336.state, 'access', _337 => _337.patterns, 'optionalAccess', _338 => _338.length])) out.patterns = _chunkO3ZU6QIZcjs.serializePatterns.call(void 0, this.state.patterns);
8409
+ if (_optionalChain([this, 'access', _336 => _336.state, 'access', _337 => _337.patterns, 'optionalAccess', _338 => _338.length])) out.patterns = _chunkXNZWATSBcjs.serializePatterns.call(void 0, this.state.patterns);
8410
8410
  if (smartContents) out.smartContents = smartContents;
8411
8411
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
8412
8412
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -8418,7 +8418,7 @@ function serializeAdjustments(adjustments) {
8418
8418
  const out = { ...adjustments };
8419
8419
  if (_optionalChain([out, 'access', _339 => _339.layers, 'optionalAccess', _340 => _340.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
8420
8420
  else delete out.layers;
8421
- if (_chunkO3ZU6QIZcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkO3ZU6QIZcjs.LEGACY_PROCESS_VERSION) {
8421
+ if (_chunkXNZWATSBcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkXNZWATSBcjs.LEGACY_PROCESS_VERSION) {
8422
8422
  delete out.process;
8423
8423
  if (!out.tint) delete out.tint;
8424
8424
  }
@@ -8429,7 +8429,7 @@ function withDevelop(layer, partial) {
8429
8429
  let i = filters.findIndex((f) => f.kind === "develop");
8430
8430
  if (i === -1) {
8431
8431
  filters.unshift({
8432
- id: layer.source === "document" ? _chunkO3ZU6QIZcjs.DEVELOP_FILTER_ID : _chunkO3ZU6QIZcjs.newLayerId.call(void 0, "flt"),
8432
+ id: layer.source === "document" ? _chunkXNZWATSBcjs.DEVELOP_FILTER_ID : _chunkXNZWATSBcjs.newLayerId.call(void 0, "flt"),
8433
8433
  kind: "develop",
8434
8434
  enabled: true,
8435
8435
  brightness: 0,
@@ -8438,7 +8438,7 @@ function withDevelop(layer, partial) {
8438
8438
  exposure: 0,
8439
8439
  temperature: 0,
8440
8440
  tint: 0,
8441
- process: _chunkO3ZU6QIZcjs.LATEST_PROCESS_VERSION
8441
+ process: _chunkXNZWATSBcjs.LATEST_PROCESS_VERSION
8442
8442
  });
8443
8443
  i = 0;
8444
8444
  }
@@ -8447,7 +8447,7 @@ function withDevelop(layer, partial) {
8447
8447
  const v = partial[k];
8448
8448
  if (typeof v === "number" && Number.isFinite(v)) next[k] = v;
8449
8449
  }
8450
- if ("process" in partial) next.process = _chunkO3ZU6QIZcjs.normalizeProcessVersion.call(void 0, partial.process);
8450
+ if ("process" in partial) next.process = _chunkXNZWATSBcjs.normalizeProcessVersion.call(void 0, partial.process);
8451
8451
  filters[i] = next;
8452
8452
  return { ...layer, filters };
8453
8453
  }
@@ -8456,7 +8456,7 @@ function withBlur(layer, radius) {
8456
8456
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
8457
8457
  if (radius > 0) {
8458
8458
  filters.push({
8459
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _344 => _344.id]), () => ( (layer.source === "document" ? _chunkO3ZU6QIZcjs.BLUR_FILTER_ID : _chunkO3ZU6QIZcjs.newLayerId.call(void 0, "flt")))),
8459
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _344 => _344.id]), () => ( (layer.source === "document" ? _chunkXNZWATSBcjs.BLUR_FILTER_ID : _chunkXNZWATSBcjs.newLayerId.call(void 0, "flt")))),
8460
8460
  kind: "blur",
8461
8461
  enabled: true,
8462
8462
  radius
@@ -8480,7 +8480,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8480
8480
  if (!update.mask) delete next.mask;
8481
8481
  else {
8482
8482
  const current = node.mask && !node.mask.source ? node.mask : null;
8483
- const memo = current ? _chunkO3ZU6QIZcjs.legacyMaskOf.call(void 0, current, width, height) : null;
8483
+ const memo = current ? _chunkXNZWATSBcjs.legacyMaskOf.call(void 0, current, width, height) : null;
8484
8484
  if (current && memo && memo.width === update.mask.width && memo.height === update.mask.height && memo.rle === update.mask.rle) {
8485
8485
  next.mask = withMaskProps(current, {
8486
8486
  density: _nullishCoalesce(update.mask.density, () => ( 1)),
@@ -8488,7 +8488,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8488
8488
  enabled: update.mask.enabled !== false
8489
8489
  });
8490
8490
  } else {
8491
- const m = _chunkO3ZU6QIZcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8491
+ const m = _chunkXNZWATSBcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8492
8492
  if (m) next.mask = m;
8493
8493
  else delete next.mask;
8494
8494
  }
@@ -8527,7 +8527,7 @@ function resizeLegacyMasks(layers, from, to) {
8527
8527
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
8528
8528
  if (l.type !== "adjustment" || !l.mask || l.mask.source) continue;
8529
8529
  const old = l.mask;
8530
- const mask = _chunkO3ZU6QIZcjs.rasterMaskFromLegacy.call(void 0, _chunkO3ZU6QIZcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8530
+ const mask = _chunkXNZWATSBcjs.rasterMaskFromLegacy.call(void 0, _chunkXNZWATSBcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8531
8531
  if (!mask) continue;
8532
8532
  out = _chunkHGTDMKNEcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
8533
8533
  }
@@ -8623,12 +8623,12 @@ function withoutAnnotations(layers) {
8623
8623
  function parseColor(value) {
8624
8624
  if (Array.isArray(value)) {
8625
8625
  if (value.length < 3 || value.length > 4 || !value.every((v) => typeof v === "number" && v >= 0 && v <= 255)) {
8626
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8626
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8627
8627
  }
8628
8628
  return [Math.round(value[0]), Math.round(value[1]), Math.round(value[2]), Math.round(_nullishCoalesce(value[3], () => ( 255)))];
8629
8629
  }
8630
8630
  const m = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(String(value).trim());
8631
- if (!m) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8631
+ if (!m) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8632
8632
  let hex = m[1];
8633
8633
  if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
8634
8634
  const n = (i) => parseInt(hex.slice(i, i + 2), 16);
@@ -8638,7 +8638,7 @@ function readImagePaint(raw) {
8638
8638
  try {
8639
8639
  return _chunkLRRCMRSLcjs.parsePaintSource.call(void 0, raw);
8640
8640
  } catch (e) {
8641
- if (e instanceof _chunkLRRCMRSLcjs.PaintSourceError) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(e.message);
8641
+ if (e instanceof _chunkLRRCMRSLcjs.PaintSourceError) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(e.message);
8642
8642
  throw e;
8643
8643
  }
8644
8644
  }
@@ -8786,7 +8786,7 @@ function loadImageEditorDocument(input) {
8786
8786
  // Optional: only present when something was selected when saving.
8787
8787
  selection: {
8788
8788
  parse: (value) => {
8789
- const mask = _chunkO3ZU6QIZcjs.deserializeSelection.call(void 0, value);
8789
+ const mask = _chunkXNZWATSBcjs.deserializeSelection.call(void 0, value);
8790
8790
  const v = value;
8791
8791
  return { width: mask.width, height: mask.height, rle: v.rle };
8792
8792
  },
@@ -8874,7 +8874,7 @@ function loadLayeredDocument(doc) {
8874
8874
  },
8875
8875
  selection: {
8876
8876
  parse: (value) => {
8877
- const mask = _chunkO3ZU6QIZcjs.deserializeSelection.call(void 0, value);
8877
+ const mask = _chunkXNZWATSBcjs.deserializeSelection.call(void 0, value);
8878
8878
  const v = value;
8879
8879
  return { width: mask.width, height: mask.height, rle: v.rle };
8880
8880
  },
@@ -9268,14 +9268,14 @@ function describeSelection(mask) {
9268
9268
  // src/image-editor/selection-tools.ts
9269
9269
  var modeSchema = {
9270
9270
  type: "string",
9271
- enum: [..._chunkO3ZU6QIZcjs.SELECTION_MODES],
9271
+ enum: [..._chunkXNZWATSBcjs.SELECTION_MODES],
9272
9272
  description: "How the result combines with the current selection (default replace)."
9273
9273
  };
9274
9274
  var num = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
9275
9275
  function summary(controller) {
9276
9276
  const sel = controller.getSelection();
9277
9277
  const { width, height } = controller.getState().imageDimensions;
9278
- const area = _chunkO3ZU6QIZcjs.selectionArea.call(void 0, sel);
9278
+ const area = _chunkXNZWATSBcjs.selectionArea.call(void 0, sel);
9279
9279
  return {
9280
9280
  empty: !sel,
9281
9281
  bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _356 => _356.bounds]), () => ( null)),
@@ -9321,7 +9321,7 @@ function createImageSelectionTools(controller) {
9321
9321
  },
9322
9322
  annotations: writeAnnotations("Select a region", true),
9323
9323
  handler: ({ shape, x, y, width, height, mode, feather }) => {
9324
- const opts = { mode: _chunkO3ZU6QIZcjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9324
+ const opts = { mode: _chunkXNZWATSBcjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9325
9325
  switch (shape) {
9326
9326
  case "all":
9327
9327
  controller.selectAll();
@@ -9374,7 +9374,7 @@ function createImageSelectionTools(controller) {
9374
9374
  annotations: writeAnnotations("Select by colour", true),
9375
9375
  handler: async ({ x, y, color, tolerance, contiguous, fuzziness, sampleMerged, sample, mode }) => {
9376
9376
  const common = {
9377
- mode: _chunkO3ZU6QIZcjs.parseSelectionMode.call(void 0, mode),
9377
+ mode: _chunkXNZWATSBcjs.parseSelectionMode.call(void 0, mode),
9378
9378
  sampleMerged: sampleMerged === true,
9379
9379
  sample: _nullishCoalesce(sample, () => ( "composite"))
9380
9380
  };
@@ -9395,7 +9395,7 @@ function createImageSelectionTools(controller) {
9395
9395
  inputSchema: {
9396
9396
  type: "object",
9397
9397
  properties: {
9398
- op: { type: "string", enum: [..._chunkO3ZU6QIZcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9398
+ op: { type: "string", enum: [..._chunkXNZWATSBcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9399
9399
  radius: { type: "number", minimum: 0, maximum: 500, description: "Radius in pixels." }
9400
9400
  },
9401
9401
  required: ["op", "radius"],
@@ -9403,7 +9403,7 @@ function createImageSelectionTools(controller) {
9403
9403
  },
9404
9404
  annotations: writeAnnotations("Modify the selection"),
9405
9405
  handler: ({ op, radius }) => {
9406
- if (!_chunkO3ZU6QIZcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9406
+ if (!_chunkXNZWATSBcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9407
9407
  if (!controller.getSelection()) throw new Error("Nothing is selected.");
9408
9408
  controller.modifySelection(op, Math.min(500, Math.max(0, num(radius, 0))));
9409
9409
  return summary(controller);
@@ -9447,7 +9447,7 @@ function createImageSelectionTools(controller) {
9447
9447
  type: "object",
9448
9448
  properties: {
9449
9449
  layerId: { type: "string", description: "Existing adjustment layer to mask." },
9450
- kind: { type: "string", enum: _chunkO3ZU6QIZcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9450
+ kind: { type: "string", enum: _chunkXNZWATSBcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9451
9451
  params: { type: "object", description: "Parameters for the new layer (see list_controls)." },
9452
9452
  density: { type: "number", minimum: 0, maximum: 1, description: "Mask density 0-1." },
9453
9453
  feather: { type: "number", minimum: 0, maximum: 1e3, description: "Mask feather in pixels." }
@@ -9467,11 +9467,11 @@ function createImageSelectionTools(controller) {
9467
9467
  if (!controller.getAdjustmentLayer(layerId)) throw new Error(`No adjustment layer "${layerId}".`);
9468
9468
  controller.applySelectionAsLayerMask(layerId, props);
9469
9469
  id = layerId;
9470
- } else if (_chunkO3ZU6QIZcjs.isAdjustmentKind.call(void 0, kind)) {
9470
+ } else if (_chunkXNZWATSBcjs.isAdjustmentKind.call(void 0, kind)) {
9471
9471
  id = controller.addAdjustmentLayer({
9472
9472
  kind,
9473
9473
  params,
9474
- mask: _chunkO3ZU6QIZcjs.layerMaskFromSelection.call(void 0, sel, props)
9474
+ mask: _chunkXNZWATSBcjs.layerMaskFromSelection.call(void 0, sel, props)
9475
9475
  });
9476
9476
  } else {
9477
9477
  throw new Error("Pass layerId (an existing layer) or kind (a new adjustment layer).");
@@ -9608,11 +9608,11 @@ function createImageEditTools(controller) {
9608
9608
  const geometry2 = () => {
9609
9609
  const s = controller.getState();
9610
9610
  const region = _nullishCoalesce(s.crop, () => ( { x: 0, y: 0, ...s.imageDimensions }));
9611
- const out = _chunkO3ZU6QIZcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9611
+ const out = _chunkXNZWATSBcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9612
9612
  return {
9613
9613
  image: { ...s.imageDimensions },
9614
9614
  crop: s.crop ? { ...s.crop } : null,
9615
- rotation: _chunkO3ZU6QIZcjs.normalizeAngle.call(void 0, s.transform.rotate),
9615
+ rotation: _chunkXNZWATSBcjs.normalizeAngle.call(void 0, s.transform.rotate),
9616
9616
  flipH: s.transform.flipH,
9617
9617
  flipV: s.transform.flipV,
9618
9618
  output: { width: Math.round(out.width), height: Math.round(out.height) }
@@ -9847,7 +9847,7 @@ function describeLayer(layer, activeId, boundsOf) {
9847
9847
  const out = {
9848
9848
  id: layer.id,
9849
9849
  type: layer.type,
9850
- name: layer.name || (layer.type === "adjustment" ? _chunkO3ZU6QIZcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9850
+ name: layer.name || (layer.type === "adjustment" ? _chunkXNZWATSBcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9851
9851
  visible: layer.visible,
9852
9852
  opacity: round3(layer.opacity),
9853
9853
  blend: layer.blend,
@@ -9936,8 +9936,8 @@ function createImageLayerTools(controller) {
9936
9936
  };
9937
9937
  };
9938
9938
  const exists = (id, what = "layerId") => {
9939
- if (typeof id !== "string" || !id) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9940
- _chunkO3ZU6QIZcjs.requireLayer.call(void 0, controller.getLayers(), id);
9939
+ if (typeof id !== "string" || !id) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9940
+ _chunkXNZWATSBcjs.requireLayer.call(void 0, controller.getLayers(), id);
9941
9941
  return id;
9942
9942
  };
9943
9943
  const listLayers = {
@@ -9973,7 +9973,7 @@ function createImageLayerTools(controller) {
9973
9973
  handler: ({ layerId, target }) => {
9974
9974
  const id = exists(layerId);
9975
9975
  const layer = controller.getLayer(id);
9976
- if (target === "mask" && !layer.mask) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9976
+ if (target === "mask" && !layer.mask) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9977
9977
  controller.setActiveLayer(id, _nullishCoalesce(target, () => ( "pixels")));
9978
9978
  return { layer: describe(id), activeTarget: controller.getState().activeTarget };
9979
9979
  }
@@ -9998,7 +9998,7 @@ function createImageLayerTools(controller) {
9998
9998
  },
9999
9999
  annotations: { title: "Add a pixel layer", ...WRITE2 },
10000
10000
  handler: async (args) => {
10001
- if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give color or image, not both.");
10001
+ if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give color or image, not both.");
10002
10002
  for (const k of ["aboveId", "belowId", "parentId"]) if (args[k] !== void 0) exists(args[k], k);
10003
10003
  const init = {
10004
10004
  name: args.name,
@@ -10088,7 +10088,7 @@ function createImageLayerTools(controller) {
10088
10088
  const id = exists(args.layerId);
10089
10089
  const props = {};
10090
10090
  for (const k of ["name", "visible", "opacity", "fillOpacity", "blend", "clipped", "locks", "collapsed"]) if (args[k] !== void 0) props[k] = args[k];
10091
- if (!Object.keys(props).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give at least one property to change.");
10091
+ if (!Object.keys(props).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give at least one property to change.");
10092
10092
  controller.setLayerProperties(id, props);
10093
10093
  return { layer: describe(id) };
10094
10094
  }
@@ -10182,8 +10182,8 @@ function createImageLayerTools(controller) {
10182
10182
  annotations: { title: "Move a layer's pixels", ...WRITE2 },
10183
10183
  handler: ({ layerId, x, y, dx, dy }) => {
10184
10184
  const id = exists(layerId);
10185
- if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give x and y, or dx and dy.");
10186
- if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
10185
+ if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give x and y, or dx and dy.");
10186
+ if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
10187
10187
  return { layerId: id, ...controller.offsetLayer(id, { x, y, dx, dy }) };
10188
10188
  }
10189
10189
  };
@@ -10255,7 +10255,7 @@ function createImageLayerTools(controller) {
10255
10255
  annotations: { title: "Set layer mask properties", ...WRITE_IDEMPOTENT2 },
10256
10256
  handler: ({ layerId, density, feather, enabled, linked }) => {
10257
10257
  const id = exists(layerId);
10258
- if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give density, feather, enabled or linked.");
10258
+ if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give density, feather, enabled or linked.");
10259
10259
  const mask = controller.setLayerMaskProps(id, {
10260
10260
  density,
10261
10261
  feather,
@@ -10338,7 +10338,7 @@ function createImageLayerTools(controller) {
10338
10338
  handler: (args) => {
10339
10339
  const id = exists(args.layerId);
10340
10340
  const changes = filterValues(args);
10341
- if (!Object.keys(changes).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give at least one value to change.");
10341
+ if (!Object.keys(changes).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give at least one value to change.");
10342
10342
  return { layerId: id, filters: controller.updateLayerFilter(id, args.filterId, changes) };
10343
10343
  }
10344
10344
  };
@@ -10602,8 +10602,8 @@ function describeLayerEffects(effects) {
10602
10602
  }
10603
10603
  function createImageEffectTools(controller) {
10604
10604
  const layerArg = (id) => {
10605
- if (typeof id !== "string" || !id) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10606
- _chunkO3ZU6QIZcjs.requireLayer.call(void 0, controller.getLayers(), id);
10605
+ if (typeof id !== "string" || !id) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10606
+ _chunkXNZWATSBcjs.requireLayer.call(void 0, controller.getLayers(), id);
10607
10607
  return id;
10608
10608
  };
10609
10609
  const result = (layerId, extra = {}) => ({ layerId, ...extra, ...describeLayerEffects(controller.getLayerEffects(layerId)) });
@@ -10634,7 +10634,7 @@ function createImageEffectTools(controller) {
10634
10634
  annotations: { title: "Add a layer effect", ...WRITE3 },
10635
10635
  handler: ({ layerId, kind, settings, index }) => {
10636
10636
  const id = layerArg(layerId);
10637
- if (!_chunkHGTDMKNEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`kind must be one of ${_chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10637
+ if (!_chunkHGTDMKNEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`kind must be one of ${_chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10638
10638
  const { effect } = controller.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
10639
10639
  return result(id, { effectId: effect.id });
10640
10640
  }
@@ -10654,7 +10654,7 @@ function createImageEffectTools(controller) {
10654
10654
  handler: ({ layerId, effectId, settings }) => {
10655
10655
  const id = layerArg(layerId);
10656
10656
  const changes = _nullishCoalesce(settings, () => ( {}));
10657
- if (!Object.keys(changes).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give at least one setting to change.");
10657
+ if (!Object.keys(changes).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give at least one setting to change.");
10658
10658
  controller.updateLayerEffect(id, effectId, changes);
10659
10659
  return result(id);
10660
10660
  }
@@ -10706,7 +10706,7 @@ function createImageEffectTools(controller) {
10706
10706
  },
10707
10707
  annotations: { title: "Set the global light", ...WRITE_IDEMPOTENT3 },
10708
10708
  handler: ({ angle, altitude }) => {
10709
- if (angle === void 0 && altitude === void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give angle, altitude or both.");
10709
+ if (angle === void 0 && altitude === void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give angle, altitude or both.");
10710
10710
  const next = {};
10711
10711
  if (angle !== void 0) next.angle = angle;
10712
10712
  if (altitude !== void 0) next.altitude = altitude;
@@ -10919,7 +10919,7 @@ var PaintGesture = (_class8 = class {
10919
10919
  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.`);
10920
10920
  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.`);
10921
10921
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
10922
- const b = _chunkO3ZU6QIZcjs.shapeGeometryBounds.call(void 0, layer);
10922
+ const b = _chunkXNZWATSBcjs.shapeGeometryBounds.call(void 0, layer);
10923
10923
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
10924
10924
  })();
10925
10925
  this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin, moved: false };
@@ -11077,9 +11077,9 @@ function createImagePaintTools(controller) {
11077
11077
  annotations: { title: "Paint a brush stroke", ...WRITE4 },
11078
11078
  handler: (args) => {
11079
11079
  const tool = args.tool;
11080
- if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11081
- if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11082
- if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give color or paint, not both.");
11080
+ if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11081
+ if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11082
+ if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give color or paint, not both.");
11083
11083
  const result = controller.paintStroke({
11084
11084
  tool,
11085
11085
  points: args.points,
@@ -11210,7 +11210,7 @@ function profileArg(v) {
11210
11210
  try {
11211
11211
  return _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, s.slice(4));
11212
11212
  } catch (e30) {
11213
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("The icc: value is not valid base64.");
11213
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("The icc: value is not valid base64.");
11214
11214
  }
11215
11215
  }
11216
11216
  return s;
@@ -11275,10 +11275,10 @@ function createImageColorTools(controller) {
11275
11275
  annotations: { title: "Set up soft proofing", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11276
11276
  handler: (args) => {
11277
11277
  if (args.off === true) {
11278
- if (args.profile !== void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give either off true or a profile, not both.");
11278
+ if (args.profile !== void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give either off true or a profile, not both.");
11279
11279
  return controller.setProofSetup(null);
11280
11280
  }
11281
- if (args.profile === void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11281
+ if (args.profile === void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11282
11282
  const s = controller.setProofSetup({
11283
11283
  profile: profileArg(args.profile),
11284
11284
  ...args.intent !== void 0 ? { intent: args.intent } : {},
@@ -11330,7 +11330,7 @@ function createImageColorTools(controller) {
11330
11330
  },
11331
11331
  annotations: { title: "Set the colour mode", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11332
11332
  handler: (args) => {
11333
- if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11333
+ if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11334
11334
  return controller.setColorMode(args.mode, {
11335
11335
  ...args.profile !== void 0 ? { profile: profileArg(args.profile) } : {},
11336
11336
  ...args.intent !== void 0 ? { intent: args.intent } : {}
@@ -11395,7 +11395,7 @@ function checkSource(controller, source) {
11395
11395
  const p = source;
11396
11396
  const { width, height } = controller.getState().imageDimensions;
11397
11397
  if (!(p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
11398
- throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11398
+ throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11399
11399
  }
11400
11400
  return p;
11401
11401
  }
@@ -11635,10 +11635,10 @@ function createImageRetouchTools(controller) {
11635
11635
  annotations: { title: "Set the clone source", ...WRITE5, idempotentHint: true },
11636
11636
  handler: (args) => {
11637
11637
  if (args.clear === true) {
11638
- if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give either clear true or x and y, not both.");
11638
+ if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give either clear true or x and y, not both.");
11639
11639
  return controller.setCloneSource(null);
11640
11640
  }
11641
- if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11641
+ if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11642
11642
  return controller.setCloneSource(checkSource(controller, { x: args.x, y: args.y }));
11643
11643
  }
11644
11644
  };
@@ -11661,7 +11661,7 @@ function createImageRetouchTools(controller) {
11661
11661
  annotations: { title: "Transform the clone source", ...WRITE5, idempotentHint: false },
11662
11662
  handler: (args) => {
11663
11663
  if (args.reset === true) {
11664
- if (Object.keys(args).some((k) => k !== "reset")) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give either reset true or transform values, not both.");
11664
+ if (Object.keys(args).some((k) => k !== "reset")) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give either reset true or transform values, not both.");
11665
11665
  return controller.setCloneTransform(null);
11666
11666
  }
11667
11667
  const cur = controller.getState().paint.cloneTransform;
@@ -11671,7 +11671,7 @@ function createImageRetouchTools(controller) {
11671
11671
  if (args.rotate !== void 0) next.rotate = args.rotate;
11672
11672
  if (args.flipHorizontal === true) next.scaleX = -(_nullishCoalesce(next.scaleX, () => ( cur.scaleX)));
11673
11673
  if (args.flipVertical === true) next.scaleY = -(_nullishCoalesce(next.scaleY, () => ( cur.scaleY)));
11674
- if (!Object.keys(next).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Pass scaleX, scaleY, rotate, flipHorizontal or flipVertical, or reset true.");
11674
+ if (!Object.keys(next).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Pass scaleX, scaleY, rotate, flipHorizontal or flipVertical, or reset true.");
11675
11675
  return controller.setCloneTransform(next);
11676
11676
  }
11677
11677
  };
@@ -11692,11 +11692,11 @@ var DATA = {
11692
11692
  description: "The PSD or PSB file as base64 (a `data:` URL prefix is accepted)."
11693
11693
  };
11694
11694
  function psdBytesFromBase64(data) {
11695
- if (typeof data !== "string" || !data.trim()) throw new (0, _chunkO3ZU6QIZcjs.PsdError)("data is required: the PSD file as base64.");
11695
+ if (typeof data !== "string" || !data.trim()) throw new (0, _chunkXNZWATSBcjs.PsdError)("data is required: the PSD file as base64.");
11696
11696
  const body = data.trim().replace(/^data:[^,]*;base64,/i, "");
11697
- if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkO3ZU6QIZcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11697
+ if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkXNZWATSBcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11698
11698
  const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, body);
11699
- if (bytes.length < 26) throw new (0, _chunkO3ZU6QIZcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11699
+ if (bytes.length < 26) throw new (0, _chunkXNZWATSBcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11700
11700
  return bytes;
11701
11701
  }
11702
11702
  function createImagePsdTools(controller) {
@@ -11707,7 +11707,7 @@ function createImagePsdTools(controller) {
11707
11707
  inputSchema: { type: "object", properties: { data: DATA }, required: ["data"], additionalProperties: false },
11708
11708
  annotations: { title: "Inspect a PSD", ...READ7 },
11709
11709
  handler: ({ data }) => {
11710
- const res = _chunkO3ZU6QIZcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11710
+ const res = _chunkXNZWATSBcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11711
11711
  return {
11712
11712
  width: res.width,
11713
11713
  height: res.height,
@@ -11794,7 +11794,7 @@ var GEOMETRY = {
11794
11794
  dy: { type: "number", description: "Move down after scaling and rotating, in document pixels (default 0)." },
11795
11795
  reference: {
11796
11796
  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}.",
11797
- anyOf: [{ type: "string", enum: _chunkO3ZU6QIZcjs.TRANSFORM_ANCHORS }, POINT]
11797
+ anyOf: [{ type: "string", enum: _chunkXNZWATSBcjs.TRANSFORM_ANCHORS }, POINT]
11798
11798
  },
11799
11799
  matrix: {
11800
11800
  type: "array",
@@ -11815,14 +11815,14 @@ var NUMERIC = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "dx", "dy", "refe
11815
11815
  function geometryFrom(args) {
11816
11816
  const numeric = NUMERIC.filter((k) => args[k] !== void 0);
11817
11817
  const ways = [numeric.length > 0, args.matrix !== void 0, args.corners !== void 0].filter(Boolean).length;
11818
- if (ways === 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11819
- if (ways > 1) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11818
+ if (ways === 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11819
+ if (ways > 1) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11820
11820
  if (args.matrix !== void 0) return { matrix: args.matrix };
11821
11821
  if (args.corners !== void 0) return { corners: args.corners };
11822
11822
  const params = {};
11823
11823
  for (const k of NUMERIC) if (args[k] !== void 0) params[k] = args[k];
11824
- if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11825
- if (typeof params.reference === "string" && !_chunkO3ZU6QIZcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkO3ZU6QIZcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11824
+ if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11825
+ if (typeof params.reference === "string" && !_chunkXNZWATSBcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkXNZWATSBcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11826
11826
  return { params };
11827
11827
  }
11828
11828
  function targetFrom(args) {
@@ -11871,15 +11871,15 @@ function createImageTransformTools(controller) {
11871
11871
  moved: [...s.moves],
11872
11872
  frame: { ...s.box },
11873
11873
  corners: s.startGeometry.corners.map(roundPoint),
11874
- center: roundPoint(_chunkO3ZU6QIZcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11874
+ center: roundPoint(_chunkXNZWATSBcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11875
11875
  };
11876
11876
  if (s.smartObject) out.smartObject = true;
11877
11877
  s.cancel();
11878
11878
  if (args.meshColumns !== void 0) {
11879
11879
  const cols = args.meshColumns;
11880
11880
  const rows = _nullishCoalesce(args.meshRows, () => ( cols));
11881
- const mesh = _chunkRCUX6CT2cjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11882
- out.mesh = { columns: cols, rows, pointsPerRow: _chunkRCUX6CT2cjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkRCUX6CT2cjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11881
+ const mesh = _chunkHRI3ZMDMcjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11882
+ out.mesh = { columns: cols, rows, pointsPerRow: _chunkHRI3ZMDMcjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkHRI3ZMDMcjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11883
11883
  }
11884
11884
  return out;
11885
11885
  }
@@ -11904,7 +11904,7 @@ function createImageTransformTools(controller) {
11904
11904
  type: "object",
11905
11905
  properties: {
11906
11906
  ...TARGET3,
11907
- style: { type: "string", enum: _chunkRCUX6CT2cjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11907
+ style: { type: "string", enum: _chunkHRI3ZMDMcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11908
11908
  bend: { type: "number", minimum: -100, maximum: 100, description: "Preset bend in percent, \u2212100..100 (default 50)." },
11909
11909
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Preset horizontal distortion in percent, \u2212100..100 (default 0)." },
11910
11910
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Preset vertical distortion in percent, \u2212100..100 (default 0)." },
@@ -11926,11 +11926,11 @@ function createImageTransformTools(controller) {
11926
11926
  annotations: { title: "Warp a layer", ...WRITE6 },
11927
11927
  handler: (args) => {
11928
11928
  const hasPreset = ["style", "bend", "horizontal", "vertical", "orientation"].some((k) => args[k] !== void 0);
11929
- if (hasPreset && args.mesh !== void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11930
- if (!hasPreset && args.mesh === void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give a preset style or a mesh.");
11929
+ if (hasPreset && args.mesh !== void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11930
+ if (!hasPreset && args.mesh === void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give a preset style or a mesh.");
11931
11931
  let warp;
11932
11932
  if (hasPreset) {
11933
- if (args.style === void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkRCUX6CT2cjs.WARP_STYLES.join(", ")}.`);
11933
+ if (args.style === void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkHRI3ZMDMcjs.WARP_STYLES.join(", ")}.`);
11934
11934
  warp = {
11935
11935
  style: args.style,
11936
11936
  bend: _nullishCoalesce(args.bend, () => ( 50)),
@@ -11941,7 +11941,7 @@ function createImageTransformTools(controller) {
11941
11941
  } else {
11942
11942
  const m = args.mesh;
11943
11943
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
11944
- if (m.points.length !== want) throw new (0, _chunkO3ZU6QIZcjs.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}.`);
11944
+ if (m.points.length !== want) throw new (0, _chunkXNZWATSBcjs.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}.`);
11945
11945
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
11946
11946
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
11947
11947
  }
@@ -12036,13 +12036,13 @@ function settingsFrom(args) {
12036
12036
  return out;
12037
12037
  }
12038
12038
  function imageArg(image) {
12039
- if (typeof image !== "string" || !image.trim()) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
12039
+ if (typeof image !== "string" || !image.trim()) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
12040
12040
  return image.trim();
12041
12041
  }
12042
12042
  function createImageSmartObjectTools(controller) {
12043
12043
  const smartId = (id) => {
12044
- if (typeof id !== "string" || !id) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
12045
- _chunkO3ZU6QIZcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
12044
+ if (typeof id !== "string" || !id) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
12045
+ _chunkXNZWATSBcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
12046
12046
  return id;
12047
12047
  };
12048
12048
  const info = (id) => {
@@ -12079,7 +12079,7 @@ function createImageSmartObjectTools(controller) {
12079
12079
  },
12080
12080
  annotations: { title: "Convert to Smart Object", ...WRITE7 },
12081
12081
  handler: ({ layerIds, name }) => {
12082
- for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkO3ZU6QIZcjs.requireLayer.call(void 0, controller.getLayers(), id2);
12082
+ for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkXNZWATSBcjs.requireLayer.call(void 0, controller.getLayers(), id2);
12083
12083
  const id = controller.convertToSmartObject(layerIds, { name });
12084
12084
  return { layer: layerSummary(id), smartObject: info(id) };
12085
12085
  }
@@ -12116,7 +12116,7 @@ function createImageSmartObjectTools(controller) {
12116
12116
  {
12117
12117
  type: "object",
12118
12118
  properties: {
12119
- style: { type: "string", enum: _chunkRCUX6CT2cjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12119
+ style: { type: "string", enum: _chunkHRI3ZMDMcjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12120
12120
  bend: { type: "number", minimum: -100, maximum: 100, description: "Bend in percent (default 50)." },
12121
12121
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Horizontal distortion in percent (default 0)." },
12122
12122
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Vertical distortion in percent (default 0)." },
@@ -12152,12 +12152,12 @@ function createImageSmartObjectTools(controller) {
12152
12152
  else if (w) {
12153
12153
  const m = w;
12154
12154
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
12155
- if (m.points.length !== want) throw new (0, _chunkO3ZU6QIZcjs.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}.`);
12155
+ if (m.points.length !== want) throw new (0, _chunkXNZWATSBcjs.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}.`);
12156
12156
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
12157
12157
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
12158
12158
  }
12159
12159
  const keys = ["corners", "matrix", "scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y", "warp", "interpolation"];
12160
- if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12160
+ if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12161
12161
  const res = controller.setSmartObjectTransform(id, {
12162
12162
  corners: args.corners,
12163
12163
  matrix: args.matrix,
@@ -12282,7 +12282,7 @@ function createImageSmartObjectTools(controller) {
12282
12282
  handler: (args) => {
12283
12283
  const id = smartId(args.layerId);
12284
12284
  const changes = settingsFrom(args);
12285
- if (!Object.keys(changes).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give at least one value to change.");
12285
+ if (!Object.keys(changes).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give at least one value to change.");
12286
12286
  const filter = controller.updateSmartFilter(id, args.filterId, changes);
12287
12287
  return { layerId: id, filter, smartFilters: info(id).smartFilters };
12288
12288
  }
@@ -12603,8 +12603,8 @@ function geometry(args) {
12603
12603
  }
12604
12604
  function createImageShapeTools(controller) {
12605
12605
  const shapeId = (id) => {
12606
- if (typeof id !== "string" || !id) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12607
- _chunkO3ZU6QIZcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12606
+ if (typeof id !== "string" || !id) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12607
+ _chunkXNZWATSBcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12608
12608
  return id;
12609
12609
  };
12610
12610
  const layerSummary = (id) => {
@@ -12679,7 +12679,7 @@ function createImageShapeTools(controller) {
12679
12679
  annotations: { title: "Restyle a shape", ...WRITE_IDEMPOTENT5 },
12680
12680
  handler: ({ layerId, fill, stroke, fillRule }) => {
12681
12681
  const id = shapeId(layerId);
12682
- if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12682
+ if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12683
12683
  return controller.setShapeStyle(id, { fill, stroke, fillRule });
12684
12684
  }
12685
12685
  };
@@ -12728,7 +12728,7 @@ function createImageShapeTools(controller) {
12728
12728
  handler: ({ layerId, componentIndex, ...rest }) => {
12729
12729
  const id = shapeId(layerId);
12730
12730
  const change = geometry(rest);
12731
- if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("Give shape, subpaths or op to change.");
12731
+ if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("Give shape, subpaths or op to change.");
12732
12732
  return controller.setShapeComponent(id, componentIndex, change);
12733
12733
  }
12734
12734
  };
@@ -12802,8 +12802,8 @@ function pick2(args, keys) {
12802
12802
  }
12803
12803
  function createImageTypeTools(controller) {
12804
12804
  const typeId = (id) => {
12805
- if (typeof id !== "string" || !id) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12806
- _chunkO3ZU6QIZcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12805
+ if (typeof id !== "string" || !id) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12806
+ _chunkXNZWATSBcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12807
12807
  return id;
12808
12808
  };
12809
12809
  const layerSummary = (id) => {
@@ -12883,7 +12883,7 @@ function createImageTypeTools(controller) {
12883
12883
  annotations: { title: "Style a range of text", ...WRITE_IDEMPOTENT6 },
12884
12884
  handler: (args) => {
12885
12885
  const style = pick2(args, Object.keys(STYLE));
12886
- if (!Object.keys(style).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12886
+ if (!Object.keys(style).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12887
12887
  return controller.setTextStyle(typeId(args.layerId), style, range(args));
12888
12888
  }
12889
12889
  };
@@ -12895,7 +12895,7 @@ function createImageTypeTools(controller) {
12895
12895
  annotations: { title: "Style paragraphs", ...WRITE_IDEMPOTENT6 },
12896
12896
  handler: (args) => {
12897
12897
  const style = pick2(args, Object.keys(PARAGRAPH));
12898
- if (!Object.keys(style).length) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12898
+ if (!Object.keys(style).length) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12899
12899
  return controller.setParagraphStyle(typeId(args.layerId), style, range(args));
12900
12900
  }
12901
12901
  };
@@ -12917,7 +12917,7 @@ function createImageTypeTools(controller) {
12917
12917
  annotations: { title: "Point or paragraph text", ...WRITE_IDEMPOTENT6 },
12918
12918
  handler: ({ layerId, kind, width, height }) => {
12919
12919
  const id = typeId(layerId);
12920
- if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkO3ZU6QIZcjs.LayerOperationError)("kind box needs width and height in pixels.");
12920
+ if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkXNZWATSBcjs.LayerOperationError)("kind box needs width and height in pixels.");
12921
12921
  return controller.setTextFrame(id, kind === "box" ? { kind: "box", width, height } : { kind: "point" });
12922
12922
  }
12923
12923
  };
@@ -12939,7 +12939,7 @@ function createImageTypeTools(controller) {
12939
12939
  var LAYER_PATH = /^layers\.([^.]+)\.(.+)$/;
12940
12940
  function adjustmentsSummary(adjustments) {
12941
12941
  return {
12942
- process: _chunkO3ZU6QIZcjs.normalizeProcessVersion.call(void 0, adjustments.process),
12942
+ process: _chunkXNZWATSBcjs.normalizeProcessVersion.call(void 0, adjustments.process),
12943
12943
  values: readAdjustmentControls(adjustments),
12944
12944
  layers: (_nullishCoalesce(adjustments.layers, () => ( []))).map((l) => JSON.parse(JSON.stringify(l)))
12945
12945
  };
@@ -12982,7 +12982,7 @@ function createImageEditorToolProvider(controller, options = {}) {
12982
12982
  default: def,
12983
12983
  ...requiresProcess ? { requiresProcess } : {}
12984
12984
  })),
12985
- layerKinds: _chunkO3ZU6QIZcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12985
+ layerKinds: _chunkXNZWATSBcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12986
12986
  kind,
12987
12987
  label,
12988
12988
  controls: [...ADJUSTMENT_LAYER_CONTROLS[kind], ADJUSTMENT_LAYER_OPACITY_CONTROL].map(({ id, label: l, min, max, step, default: def }) => ({
@@ -13068,7 +13068,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13068
13068
  const result = { applied, clamped };
13069
13069
  if (typeof label === "string" && label) result.label = label;
13070
13070
  const notes = [];
13071
- if ("tint" in applied && _chunkO3ZU6QIZcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
13071
+ if ("tint" in applied && _chunkXNZWATSBcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
13072
13072
  notes.push("Tint has no effect on process 1 edits.");
13073
13073
  }
13074
13074
  if (notes.length) result.notes = notes;
@@ -13078,11 +13078,11 @@ function createImageEditorToolProvider(controller, options = {}) {
13078
13078
  const addLayer = {
13079
13079
  name: "add_adjustment_layer",
13080
13080
  title: "Add an adjustment layer",
13081
- description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkO3ZU6QIZcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
13081
+ description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkXNZWATSBcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
13082
13082
  inputSchema: {
13083
13083
  type: "object",
13084
13084
  properties: {
13085
- kind: { type: "string", enum: _chunkO3ZU6QIZcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
13085
+ kind: { type: "string", enum: _chunkXNZWATSBcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
13086
13086
  params: { type: "object", description: "Initial parameters (see list_controls); merged with neutral defaults." },
13087
13087
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Layer opacity 0-1 (default 1)." },
13088
13088
  blend: { type: "string", enum: _chunkCWM3CUUXcjs.BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal)." },
@@ -13101,7 +13101,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13101
13101
  openWorldHint: false
13102
13102
  },
13103
13103
  handler: ({ kind, params, opacity, blend, name, aboveId, parentId }) => {
13104
- if (!_chunkO3ZU6QIZcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13104
+ if (!_chunkXNZWATSBcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13105
13105
  if (blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, blend)) throw new Error(`Unknown blend mode "${blend}".`);
13106
13106
  if (aboveId !== void 0 && parentId !== void 0) throw new Error("Give aboveId or parentId, not both.");
13107
13107
  for (const ref of [aboveId, parentId]) {
@@ -13198,7 +13198,7 @@ function boxToCurvePoint(x, y, width, height) {
13198
13198
  return { input: clampLevel(x / (width || 1) * 255), output: clampLevel((height - y) / (height || 1) * 255) };
13199
13199
  }
13200
13200
  function curveSvgPath(points, width, height, samples = 64) {
13201
- const lut = _chunkO3ZU6QIZcjs.curveLutFromLevels.call(void 0, points);
13201
+ const lut = _chunkXNZWATSBcjs.curveLutFromLevels.call(void 0, points);
13202
13202
  const n = lut.length - 1;
13203
13203
  let d = "";
13204
13204
  for (let i = 0; i <= samples; i++) {
@@ -13708,7 +13708,7 @@ var TextEditSession = (_class11 = class {
13708
13708
  else {
13709
13709
  const layout = this.layout();
13710
13710
  if (layout && layout.lines.length) {
13711
- const c = _chunkRCUX6CT2cjs.caretAt.call(void 0, layout, f);
13711
+ const c = _chunkHRI3ZMDMcjs.caretAt.call(void 0, layout, f);
13712
13712
  const line = layout.lines[c.line];
13713
13713
  if (to === "home") f = line.start;
13714
13714
  else if (to === "end") {
@@ -13803,7 +13803,7 @@ var TextEditSession = (_class11 = class {
13803
13803
  styleHere() {
13804
13804
  const layer = this.layer;
13805
13805
  const at = this.start > 0 && this.start === this.end ? this.start - 1 : this.start;
13806
- return _chunkRCUX6CT2cjs.styleAt.call(void 0, layer.runs, at, _chunkRCUX6CT2cjs.DEFAULT_TEXT_STYLE);
13806
+ return _chunkHRI3ZMDMcjs.styleAt.call(void 0, layer.runs, at, _chunkHRI3ZMDMcjs.DEFAULT_TEXT_STYLE);
13807
13807
  }
13808
13808
  info() {
13809
13809
  return this.controller.getTextLayer(this.layerId);
@@ -13812,8 +13812,8 @@ var TextEditSession = (_class11 = class {
13812
13812
  overlay() {
13813
13813
  const layer = this.layer;
13814
13814
  const layout = this.layout();
13815
- const m = _chunkO3ZU6QIZcjs.textMatrix.call(void 0, layer);
13816
- const at = (x, y) => _chunkRCUX6CT2cjs.applyMatrix.call(void 0, m, { x, y });
13815
+ const m = _chunkXNZWATSBcjs.textMatrix.call(void 0, layer);
13816
+ const at = (x, y) => _chunkHRI3ZMDMcjs.applyMatrix.call(void 0, m, { x, y });
13817
13817
  let frame = null;
13818
13818
  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)];
13819
13819
  else if (layout) {
@@ -13833,7 +13833,7 @@ var TextEditSession = (_class11 = class {
13833
13833
  selection.push([at(x0, top), at(x1, top), at(x1, bottom), at(x0, bottom)]);
13834
13834
  }
13835
13835
  }
13836
- const c = _chunkRCUX6CT2cjs.caretAt.call(void 0, layout, this.focus);
13836
+ const c = _chunkHRI3ZMDMcjs.caretAt.call(void 0, layout, this.focus);
13837
13837
  return { caret: [at(c.x, c.top), at(c.x, c.bottom)], selection, frame };
13838
13838
  }
13839
13839
  /** Ends editing: an empty layer made for this session is deleted (as Photoshop does). Returns whether the layer remains. */
@@ -13848,7 +13848,7 @@ var TextEditSession = (_class11 = class {
13848
13848
  }
13849
13849
  if (this.layer.name === "Text" && this.changed) {
13850
13850
  try {
13851
- this.controller.setLayerProperties(this.layerId, { name: _chunkO3ZU6QIZcjs.typeLayerName.call(void 0, this.text) }, false);
13851
+ this.controller.setLayerProperties(this.layerId, { name: _chunkXNZWATSBcjs.typeLayerName.call(void 0, this.text) }, false);
13852
13852
  } catch (e32) {
13853
13853
  }
13854
13854
  }
@@ -13859,8 +13859,8 @@ function typeLayerAt(controller, p, slop = 4) {
13859
13859
  const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
13860
13860
  for (const l of layers) {
13861
13861
  if (!l.visible) continue;
13862
- const inv = invert(_chunkO3ZU6QIZcjs.textMatrix.call(void 0, l));
13863
- const q = _chunkRCUX6CT2cjs.applyMatrix.call(void 0, inv, p);
13862
+ const inv = invert(_chunkXNZWATSBcjs.textMatrix.call(void 0, l));
13863
+ const q = _chunkHRI3ZMDMcjs.applyMatrix.call(void 0, inv, p);
13864
13864
  let b = null;
13865
13865
  if (l.frame.kind === "box") b = { x: 0, y: 0, width: l.frame.width, height: l.frame.height };
13866
13866
  else {
@@ -13970,7 +13970,7 @@ function layerPanelRows(layers, activeId) {
13970
13970
  }
13971
13971
  function layerLabel(layer) {
13972
13972
  if (layer.name) return layer.name;
13973
- if (layer.type === "adjustment") return _chunkO3ZU6QIZcjs.adjustmentKindLabel.call(void 0, layer.kind);
13973
+ if (layer.type === "adjustment") return _chunkXNZWATSBcjs.adjustmentKindLabel.call(void 0, layer.kind);
13974
13974
  return layer.type === "group" ? "Group" : "Layer";
13975
13975
  }
13976
13976
  function layerBadge(layer) {
@@ -14442,7 +14442,7 @@ var FREE_TRANSFORM_MODE_OPTIONS = [
14442
14442
  ];
14443
14443
  var WARP_STYLE_OPTIONS = [
14444
14444
  { id: "custom", label: "Custom" },
14445
- ..._chunkRCUX6CT2cjs.WARP_STYLES.map((id) => ({ id, label: _chunkRCUX6CT2cjs.WARP_STYLE_LABELS[id] }))
14445
+ ..._chunkHRI3ZMDMcjs.WARP_STYLES.map((id) => ({ id, label: _chunkHRI3ZMDMcjs.WARP_STYLE_LABELS[id] }))
14446
14446
  ];
14447
14447
  var WARP_GRID_OPTIONS = [
14448
14448
  { id: "1x1", label: "Default", columns: 1, rows: 1 },
@@ -14578,7 +14578,7 @@ var FreeTransformTool = (_class13 = class {
14578
14578
  setMode(mode) {
14579
14579
  this.modeValue = mode;
14580
14580
  const s = this.session;
14581
- if (mode === "warp" && s && !this.mesh) this.mesh = _chunkRCUX6CT2cjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14581
+ if (mode === "warp" && s && !this.mesh) this.mesh = _chunkHRI3ZMDMcjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14582
14582
  this.changed();
14583
14583
  }
14584
14584
  /** The Warp options bar's settings. */
@@ -14600,13 +14600,13 @@ var FreeTransformTool = (_class13 = class {
14600
14600
  this.modeValue = "warp";
14601
14601
  const next = { ...this.warpSettings, ...changes };
14602
14602
  this.warpSettings = next;
14603
- let mesh = _nullishCoalesce(this.mesh, () => ( _chunkRCUX6CT2cjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14603
+ let mesh = _nullishCoalesce(this.mesh, () => ( _chunkHRI3ZMDMcjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14604
14604
  if (next.style !== "custom" && ("style" in changes || "bend" in changes || "horizontal" in changes || "vertical" in changes || "orientation" in changes)) {
14605
14605
  const preset = { style: next.style, bend: next.bend, horizontal: next.horizontal, vertical: next.vertical, orientation: next.orientation };
14606
- mesh = _nullishCoalesce(_chunkRCUX6CT2cjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkRCUX6CT2cjs.identityWarpMesh.call(void 0, s.box)));
14607
- mesh = _chunkRCUX6CT2cjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14606
+ mesh = _nullishCoalesce(_chunkHRI3ZMDMcjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkHRI3ZMDMcjs.identityWarpMesh.call(void 0, s.box)));
14607
+ mesh = _chunkHRI3ZMDMcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14608
14608
  }
14609
- if ("columns" in changes || "rows" in changes) mesh = _chunkRCUX6CT2cjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14609
+ if ("columns" in changes || "rows" in changes) mesh = _chunkHRI3ZMDMcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14610
14610
  this.mesh = mesh;
14611
14611
  this.changed();
14612
14612
  this.preview();
@@ -14653,11 +14653,11 @@ var FreeTransformTool = (_class13 = class {
14653
14653
  const m = this.mesh;
14654
14654
  const at = (p) => _nullishCoalesce(_chunkQT26RHKKcjs.applyHomography.call(void 0, h, p), () => ( p));
14655
14655
  const pts = m.points.map(at);
14656
- const edit = _chunkRCUX6CT2cjs.warpMeshEditPoints.call(void 0, m);
14656
+ const edit = _chunkHRI3ZMDMcjs.warpMeshEditPoints.call(void 0, m);
14657
14657
  out.handles = [];
14658
- out.outline = _chunkRCUX6CT2cjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14658
+ out.outline = _chunkHRI3ZMDMcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14659
14659
  out.warp = {
14660
- curves: _chunkRCUX6CT2cjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14660
+ curves: _chunkHRI3ZMDMcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14661
14661
  anchors: edit.anchors.map((i) => pts[i]),
14662
14662
  handles: edit.handles.map((e) => ({ point: pts[e.index], anchor: pts[e.anchor] }))
14663
14663
  };
@@ -14681,7 +14681,7 @@ var FreeTransformTool = (_class13 = class {
14681
14681
  if (!o) return null;
14682
14682
  if (this.modeValue === "warp" && this.mesh) {
14683
14683
  const h = this.homography();
14684
- const edit = _chunkRCUX6CT2cjs.warpMeshEditPoints.call(void 0, this.mesh);
14684
+ const edit = _chunkHRI3ZMDMcjs.warpMeshEditPoints.call(void 0, this.mesh);
14685
14685
  let best2 = -1;
14686
14686
  let bestD2 = tolerance;
14687
14687
  for (const i of [...edit.anchors, ...edit.handles.map((e) => e.index)]) {
@@ -14726,7 +14726,7 @@ var FreeTransformTool = (_class13 = class {
14726
14726
  if (this.modeValue === "warp" && this.mesh && handle === "inside") {
14727
14727
  const q = this.toFrame(p, this.corners);
14728
14728
  if (q) {
14729
- const r = _chunkRCUX6CT2cjs.warpMeshParamAt.call(void 0, this.mesh, q);
14729
+ const r = _chunkHRI3ZMDMcjs.warpMeshParamAt.call(void 0, this.mesh, q);
14730
14730
  st = { s: r.s, t: r.t };
14731
14731
  }
14732
14732
  }
@@ -14759,8 +14759,8 @@ var FreeTransformTool = (_class13 = class {
14759
14759
  if (!a || !b) return;
14760
14760
  const delta = { x: b.x - a.x, y: b.y - a.y };
14761
14761
  const i = meshIndex(d.handle);
14762
- if (i >= 0) this.mesh = _chunkRCUX6CT2cjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14763
- else if (d.handle === "inside" && d.st) this.mesh = _chunkRCUX6CT2cjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14762
+ if (i >= 0) this.mesh = _chunkHRI3ZMDMcjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14763
+ else if (d.handle === "inside" && d.st) this.mesh = _chunkHRI3ZMDMcjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14764
14764
  else return;
14765
14765
  this.warpSettings = { ...this.warpSettings, style: "custom" };
14766
14766
  this.changed();
@@ -14884,7 +14884,7 @@ var FreeTransformTool = (_class13 = class {
14884
14884
  bar() {
14885
14885
  const s = this.session;
14886
14886
  if (!s || !this.corners) return null;
14887
- const read = _chunkO3ZU6QIZcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14887
+ const read = _chunkXNZWATSBcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14888
14888
  return {
14889
14889
  affine: read.affine,
14890
14890
  x: _nullishCoalesce(this.typed.x, () => ( read.x)),
@@ -14909,7 +14909,7 @@ var FreeTransformTool = (_class13 = class {
14909
14909
  this.changed();
14910
14910
  return;
14911
14911
  }
14912
- const m = _chunkO3ZU6QIZcjs.matrixFromParams.call(void 0, s.box, {
14912
+ const m = _chunkXNZWATSBcjs.matrixFromParams.call(void 0, s.box, {
14913
14913
  scaleX: next.scaleX,
14914
14914
  scaleY: next.scaleY,
14915
14915
  rotate: next.rotate,
@@ -14919,7 +14919,7 @@ var FreeTransformTool = (_class13 = class {
14919
14919
  dx: next.x - this.refBox.x,
14920
14920
  dy: next.y - this.refBox.y
14921
14921
  });
14922
- this.setCorners(_chunkO3ZU6QIZcjs.cornersFromMatrix.call(void 0, s.box, m));
14922
+ this.setCorners(_chunkXNZWATSBcjs.cornersFromMatrix.call(void 0, s.box, m));
14923
14923
  this.typed = { scaleX: next.scaleX, scaleY: next.scaleY, rotate: next.rotate, skewX: next.skewX, skewY: next.skewY, x: next.x, y: next.y };
14924
14924
  this.changed();
14925
14925
  }
@@ -16031,4 +16031,4 @@ function createImageEffectsToolProvider(controller, options = {}) {
16031
16031
 
16032
16032
 
16033
16033
 
16034
- exports.ADJUSTMENT_KEYS = _chunkO3ZU6QIZcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkO3ZU6QIZcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkO3ZU6QIZcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkO3ZU6QIZcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkO3ZU6QIZcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkO3ZU6QIZcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkO3ZU6QIZcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkGNK7SESQcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkONZJD2ODcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkLRRCMRSLcjs.BrushstrokeCache; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunkLRRCMRSLcjs.CoverageMap; exports.D50 = _chunkO3ZU6QIZcjs.D50; exports.D65 = _chunkO3ZU6QIZcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkRCUX6CT2cjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkLRRCMRSLcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkLRRCMRSLcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkGNK7SESQcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkO3ZU6QIZcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkLRRCMRSLcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkLRRCMRSLcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkLRRCMRSLcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk6FUAHCVIcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkLRRCMRSLcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkRCUX6CT2cjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkGNK7SESQcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkGNK7SESQcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkO3ZU6QIZcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkGNK7SESQcjs.DRY_EPS; exports.DabWalker = _chunkLRRCMRSLcjs.DabWalker; exports.EMPTY_DISTANCE = _chunkO3ZU6QIZcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkLRRCMRSLcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkGNK7SESQcjs.EX; exports.EY = _chunkGNK7SESQcjs.EY; exports.FLAG_ALIVE = _chunkGNK7SESQcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkGNK7SESQcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkGNK7SESQcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkGNK7SESQcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkGNK7SESQcjs.FLAG_TOP; exports.FLAG_WET = _chunkGNK7SESQcjs.FLAG_WET; exports.FLAT = _chunkGNK7SESQcjs.FLAT; exports.FREE_INTERVAL = _chunkGNK7SESQcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkO3ZU6QIZcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GRAIN_PATTERNS = _chunkLRRCMRSLcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkLRRCMRSLcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkGNK7SESQcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkO3ZU6QIZcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk6FUAHCVIcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkO3ZU6QIZcjs.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 = _chunkONZJD2ODcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkO3ZU6QIZcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkO3ZU6QIZcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkO3ZU6QIZcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkO3ZU6QIZcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkO3ZU6QIZcjs.LUMA_709; exports.LayerCompositor = _chunkO3ZU6QIZcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkO3ZU6QIZcjs.LayerOperationError; exports.MAX_BATCH = _chunkGNK7SESQcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkLRRCMRSLcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkO3ZU6QIZcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkGNK7SESQcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkGNK7SESQcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkGNK7SESQcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkO3ZU6QIZcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkO3ZU6QIZcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkLRRCMRSLcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkLRRCMRSLcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkLRRCMRSLcjs.MIXING_MODELS; exports.MixerStroke = _chunkLRRCMRSLcjs.MixerStroke; exports.OPP = _chunkGNK7SESQcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkLRRCMRSLcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkLRRCMRSLcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkLRRCMRSLcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkLRRCMRSLcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkLRRCMRSLcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkLRRCMRSLcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkGNK7SESQcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkO3ZU6QIZcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkGNK7SESQcjs.PARAM; exports.PARAM_FLOATS = _chunkGNK7SESQcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkO3ZU6QIZcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkGNK7SESQcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkGNK7SESQcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkGNK7SESQcjs.PLANE; exports.PLANE_BYTES = _chunkGNK7SESQcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkO3ZU6QIZcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkGNK7SESQcjs.P_D0; exports.P_EDGE = _chunkGNK7SESQcjs.P_EDGE; exports.P_FX = _chunkGNK7SESQcjs.P_FX; exports.P_FY = _chunkGNK7SESQcjs.P_FY; exports.P_H = _chunkGNK7SESQcjs.P_H; exports.P_P0 = _chunkGNK7SESQcjs.P_P0; exports.P_RHO = _chunkGNK7SESQcjs.P_RHO; exports.P_SW = _chunkGNK7SESQcjs.P_SW; exports.P_UX = _chunkGNK7SESQcjs.P_UX; exports.P_UY = _chunkGNK7SESQcjs.P_UY; exports.PaintExchange = _chunkLRRCMRSLcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkLRRCMRSLcjs.PaintGradientSampler; exports.PaintSourceError = _chunkLRRCMRSLcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkLRRCMRSLcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkO3ZU6QIZcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk6FUAHCVIcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk6FUAHCVIcjs.RegionPixelSource; exports.RetouchDabStroke = _chunk6FUAHCVIcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkO3ZU6QIZcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkO3ZU6QIZcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkGNK7SESQcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkO3ZU6QIZcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkO3ZU6QIZcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkGNK7SESQcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkGNK7SESQcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkGNK7SESQcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkO3ZU6QIZcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk6FUAHCVIcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkGNK7SESQcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkGNK7SESQcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkO3ZU6QIZcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkLRRCMRSLcjs.SmudgeTip; exports.StrokeCoverage = _chunkLRRCMRSLcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkO3ZU6QIZcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkO3ZU6QIZcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkO3ZU6QIZcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkO3ZU6QIZcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkLRRCMRSLcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkO3ZU6QIZcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk6FUAHCVIcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkO3ZU6QIZcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkLRRCMRSLcjs.TileMedium; exports.TilePixelSource = _chunk6FUAHCVIcjs.TilePixelSource; exports.TileableNoise = _chunkLRRCMRSLcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk6FUAHCVIcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkGNK7SESQcjs.U_MAX; exports.VIBRANCE_GREY = _chunkO3ZU6QIZcjs.VIBRANCE_GREY; exports.W9 = _chunkGNK7SESQcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkRCUX6CT2cjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkRCUX6CT2cjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkGNK7SESQcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkGNK7SESQcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkGNK7SESQcjs.WET_TILE; exports.WGSL_HALO = _chunkGNK7SESQcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkGNK7SESQcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkGNK7SESQcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkGNK7SESQcjs.WetGpuEngine; exports.WetMedium = _chunkGNK7SESQcjs.WetMedium; exports.WetWorkerPool = _chunkGNK7SESQcjs.WetWorkerPool; exports.WetWorld = _chunkGNK7SESQcjs.WetWorld; exports.WetWorldError = _chunkGNK7SESQcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkO3ZU6QIZcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkO3ZU6QIZcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkO3ZU6QIZcjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunkO3ZU6QIZcjs.activeSmartFilters; exports.addLayerEffect = _chunkO3ZU6QIZcjs.addLayerEffect; exports.addLayerFilter = _chunkO3ZU6QIZcjs.addLayerFilter; exports.addPaintGradientStop = _chunkLRRCMRSLcjs.addPaintGradientStop; exports.addSmartFilter = _chunkO3ZU6QIZcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkO3ZU6QIZcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkO3ZU6QIZcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkO3ZU6QIZcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkO3ZU6QIZcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.anchorPoint = _chunkO3ZU6QIZcjs.anchorPoint; exports.annotationBlend = _chunkO3ZU6QIZcjs.annotationBlend; exports.annotationLayerFor = _chunkO3ZU6QIZcjs.annotationLayerFor; exports.annotationLayerName = _chunkO3ZU6QIZcjs.annotationLayerName; exports.annotationOfLayer = _chunkO3ZU6QIZcjs.annotationOfLayer; exports.annotationOfShape = _chunkO3ZU6QIZcjs.annotationOfShape; exports.annotationOfType = _chunkO3ZU6QIZcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkO3ZU6QIZcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkO3ZU6QIZcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkO3ZU6QIZcjs.applyAdjustments; exports.applyBoxBlur = _chunkO3ZU6QIZcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkO3ZU6QIZcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkO3ZU6QIZcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkO3ZU6QIZcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkO3ZU6QIZcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkO3ZU6QIZcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkO3ZU6QIZcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkO3ZU6QIZcjs.applyParams; exports.applyProcess2Adjustments = _chunkO3ZU6QIZcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkO3ZU6QIZcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk6FUAHCVIcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkO3ZU6QIZcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkLRRCMRSLcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkLRRCMRSLcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk6FUAHCVIcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkO3ZU6QIZcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk6FUAHCVIcjs.bestOffset; exports.blackWhiteGray = _chunkO3ZU6QIZcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkLRRCMRSLcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkLRRCMRSLcjs.blenderDab; exports.blurFilter = _chunkO3ZU6QIZcjs.blurFilter; exports.borderCoverage = _chunkO3ZU6QIZcjs.borderCoverage; exports.boxBlurPixels = _chunk6FUAHCVIcjs.boxBlurPixels; exports.boxMean = boxMean; exports.boxPointOf = _chunkO3ZU6QIZcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkO3ZU6QIZcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkLRRCMRSLcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkLRRCMRSLcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkLRRCMRSLcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkLRRCMRSLcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkLRRCMRSLcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkO3ZU6QIZcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkO3ZU6QIZcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkO3ZU6QIZcjs.calculateCropDrag; exports.canShareMemory = _chunkGNK7SESQcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkO3ZU6QIZcjs.canvasToImagePoint; exports.caretAt = _chunkRCUX6CT2cjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkO3ZU6QIZcjs.clampCropToImage; exports.cleanMixer = _chunkLRRCMRSLcjs.cleanMixer; exports.cloneSamplePoint = _chunk6FUAHCVIcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkO3ZU6QIZcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkO3ZU6QIZcjs.combineSelections; exports.compileAdjustmentLayer = _chunkO3ZU6QIZcjs.compileAdjustmentLayer; exports.componentPath = _chunkO3ZU6QIZcjs.componentPath; exports.compositeDeep = _chunkO3ZU6QIZcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkO3ZU6QIZcjs.computeSelectionBounds; exports.contentAwareFill = _chunk6FUAHCVIcjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkO3ZU6QIZcjs.contentsBox; exports.contentsSurface = _chunkO3ZU6QIZcjs.contentsSurface; exports.contractCoverage = _chunkO3ZU6QIZcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkO3ZU6QIZcjs.convertToSmartObject; exports.copySmartObject = _chunkO3ZU6QIZcjs.copySmartObject; exports.cornersFromMatrix = _chunkO3ZU6QIZcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkLRRCMRSLcjs.coverageTileCoord; exports.coverageToByte = _chunkO3ZU6QIZcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkO3ZU6QIZcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkLRRCMRSLcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkRCUX6CT2cjs.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 = _chunkRCUX6CT2cjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkRCUX6CT2cjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkGNK7SESQcjs.createPigmentTools; exports.createSelectionMask = _chunkO3ZU6QIZcjs.createSelectionMask; exports.createShapeLayer = _chunkO3ZU6QIZcjs.createShapeLayer; exports.createTypeLayer = _chunkO3ZU6QIZcjs.createTypeLayer; exports.createWetGpuEngine = _chunkGNK7SESQcjs.createWetGpuEngine; exports.cssFont = _chunkRCUX6CT2cjs.cssFont; exports.cssFontFamily = _chunkRCUX6CT2cjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkO3ZU6QIZcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkLRRCMRSLcjs.dabCoverage; exports.dabRect = _chunkLRRCMRSLcjs.dabRect; exports.decodeDeepSurface = _chunkO3ZU6QIZcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkO3ZU6QIZcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkO3ZU6QIZcjs.decodeLayerMask; exports.decodeMergedImage = _chunkO3ZU6QIZcjs.decodeMergedImage; exports.decodePlanes = _chunkO3ZU6QIZcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkO3ZU6QIZcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkO3ZU6QIZcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultAdjustmentParams = _chunkO3ZU6QIZcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkO3ZU6QIZcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkO3ZU6QIZcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkO3ZU6QIZcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkO3ZU6QIZcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkO3ZU6QIZcjs.deserializeEffects; exports.deserializeLayer = _chunkO3ZU6QIZcjs.deserializeLayer; exports.deserializeLayers = _chunkO3ZU6QIZcjs.deserializeLayers; exports.deserializePatterns = _chunkO3ZU6QIZcjs.deserializePatterns; exports.deserializeSelection = _chunkO3ZU6QIZcjs.deserializeSelection; exports.developFilter = _chunkO3ZU6QIZcjs.developFilter; exports.developFromAdjustments = _chunkO3ZU6QIZcjs.developFromAdjustments; exports.developTarget = _chunkO3ZU6QIZcjs.developTarget; exports.dexp = _chunkGNK7SESQcjs.dexp; exports.dilateMask = _chunk6FUAHCVIcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkO3ZU6QIZcjs.distanceTransform; exports.dlog = _chunkGNK7SESQcjs.dlog; exports.documentContents = _chunkO3ZU6QIZcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk6FUAHCVIcjs.dodgeBurn; exports.dodgeBurnCurve = _chunk6FUAHCVIcjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkGNK7SESQcjs.dpow; exports.dragWarpMeshPoint = _chunkRCUX6CT2cjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkGNK7SESQcjs.dsincos; exports.duplicateLayer = _chunkO3ZU6QIZcjs.duplicateLayer; exports.edgeBits = _chunkGNK7SESQcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkO3ZU6QIZcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkO3ZU6QIZcjs.encodeRle; exports.encodeSelectionRle = _chunkO3ZU6QIZcjs.encodeSelectionRle; exports.encodeSurface = _chunkO3ZU6QIZcjs.encodeSurface; exports.evalWarpMesh = _chunkRCUX6CT2cjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkO3ZU6QIZcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkLRRCMRSLcjs.exchangeRates; exports.expNeg = _chunkGNK7SESQcjs.expNeg; exports.expandCoverage = _chunkO3ZU6QIZcjs.expandCoverage; exports.exportPsd = _chunkO3ZU6QIZcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkO3ZU6QIZcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkGNK7SESQcjs.filmPixel; exports.filmReflectance = _chunkGNK7SESQcjs.filmReflectance; exports.filterMaskCoverage = _chunkO3ZU6QIZcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkGNK7SESQcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkRCUX6CT2cjs.fitParagraphRuns; exports.fitRuns = _chunkRCUX6CT2cjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkO3ZU6QIZcjs.flattenPath; exports.flipCorners = _chunkO3ZU6QIZcjs.flipCorners; exports.flowField = _chunkGNK7SESQcjs.flowField; exports.fontOf = _chunkRCUX6CT2cjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkO3ZU6QIZcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkO3ZU6QIZcjs.geometryHomography; exports.getAnnotationBounds = _chunkO3ZU6QIZcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkO3ZU6QIZcjs.getCropCursor; exports.getRotatedSize = _chunkO3ZU6QIZcjs.getRotatedSize; exports.getViewportMetrics = _chunkO3ZU6QIZcjs.getViewportMetrics; exports.getViewportProjection = _chunkO3ZU6QIZcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkLRRCMRSLcjs.gradientDabColor; exports.grainCatch = _chunkLRRCMRSLcjs.grainCatch; exports.grainHeights = _chunkLRRCMRSLcjs.grainHeights; exports.greyMorphology = _chunkO3ZU6QIZcjs.greyMorphology; exports.groupLayers = _chunkO3ZU6QIZcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkO3ZU6QIZcjs.hasResampledLegacyMask; exports.hasSurface = _chunkO3ZU6QIZcjs.hasSurface; exports.hasWarp = _chunkO3ZU6QIZcjs.hasWarp; exports.hash2 = _chunkLRRCMRSLcjs.hash2; exports.hashMaskContent = _chunkO3ZU6QIZcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk6FUAHCVIcjs.healPixels; exports.hexToPaintRgb = _chunkLRRCMRSLcjs.hexToPaintRgb; exports.hexToRgb = _chunkO3ZU6QIZcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkO3ZU6QIZcjs.hitTestAnnotation; exports.hitTestCrop = _chunkO3ZU6QIZcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkO3ZU6QIZcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkO3ZU6QIZcjs.hueRangeTables; exports.hueRangeWeight = _chunkO3ZU6QIZcjs.hueRangeWeight; exports.hueSaturation = _chunkO3ZU6QIZcjs.hueSaturation; exports.identityCurve = _chunkO3ZU6QIZcjs.identityCurve; exports.identityLevels = _chunkO3ZU6QIZcjs.identityLevels; exports.identityTransform = _chunkO3ZU6QIZcjs.identityTransform; exports.identityWarpMesh = _chunkRCUX6CT2cjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunkO3ZU6QIZcjs.imageToCanvasPoint; exports.importPsd = _chunkO3ZU6QIZcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkO3ZU6QIZcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkO3ZU6QIZcjs.invertMatrix3; exports.invertSelection = _chunkO3ZU6QIZcjs.invertSelection; exports.isActiveFilter = _chunkO3ZU6QIZcjs.isActiveFilter; exports.isAdjustmentKind = _chunkO3ZU6QIZcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkLRRCMRSLcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkO3ZU6QIZcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkO3ZU6QIZcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkLRRCMRSLcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk6FUAHCVIcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkO3ZU6QIZcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkO3ZU6QIZcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkO3ZU6QIZcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkO3ZU6QIZcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkO3ZU6QIZcjs.isSelectionEmpty; exports.isSelectionMode = _chunkO3ZU6QIZcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkO3ZU6QIZcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkO3ZU6QIZcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkO3ZU6QIZcjs.isTransformAnchor; exports.isValidWarp = _chunkO3ZU6QIZcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkO3ZU6QIZcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkGNK7SESQcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkO3ZU6QIZcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkO3ZU6QIZcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkO3ZU6QIZcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkO3ZU6QIZcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkO3ZU6QIZcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkO3ZU6QIZcjs.layerTree; exports.layerTypeLabel = _chunkO3ZU6QIZcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkO3ZU6QIZcjs.layersFromLegacy; exports.layoutText = _chunkRCUX6CT2cjs.layoutText; exports.legacyAdjustmentLayer = _chunkO3ZU6QIZcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkO3ZU6QIZcjs.legacyMaskOf; exports.legacyView = _chunkO3ZU6QIZcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkO3ZU6QIZcjs.levelsValue; exports.linearSrgbToXy = _chunkO3ZU6QIZcjs.linearSrgbToXy; exports.linearToSrgb = _chunkO3ZU6QIZcjs.linearToSrgb; exports.linearToSrgb8 = _chunkGNK7SESQcjs.linearToSrgb8; exports.liveComponent = _chunkO3ZU6QIZcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkO3ZU6QIZcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkLRRCMRSLcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkGNK7SESQcjs.loadWetKernel; exports.luma = _chunk6FUAHCVIcjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkO3ZU6QIZcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkO3ZU6QIZcjs.mapSubpaths; exports.maskBounds = _chunk6FUAHCVIcjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkO3ZU6QIZcjs.matrixFromCorners; exports.matrixFromParams = _chunkO3ZU6QIZcjs.matrixFromParams; exports.membraneFill = _chunk6FUAHCVIcjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkO3ZU6QIZcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkLRRCMRSLcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkLRRCMRSLcjs.mixerRates; exports.modifySelection = _chunkO3ZU6QIZcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkO3ZU6QIZcjs.moveLayer; exports.moveSmartFilter = _chunkO3ZU6QIZcjs.moveSmartFilter; exports.mulMatrix3 = _chunkO3ZU6QIZcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkO3ZU6QIZcjs.neutralHueRange; exports.newContentsId = _chunkO3ZU6QIZcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkO3ZU6QIZcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkO3ZU6QIZcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkO3ZU6QIZcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkO3ZU6QIZcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkLRRCMRSLcjs.normalizeBlender; exports.normalizeBrush = _chunkLRRCMRSLcjs.normalizeBrush; exports.normalizeFilter = _chunkO3ZU6QIZcjs.normalizeFilter; exports.normalizeFlow = _chunkGNK7SESQcjs.normalizeFlow; exports.normalizeHexColor = _chunkLRRCMRSLcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkO3ZU6QIZcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkO3ZU6QIZcjs.normalizeLiveShape; exports.normalizeMixer = _chunkLRRCMRSLcjs.normalizeMixer; exports.normalizePlacement = _chunkO3ZU6QIZcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkO3ZU6QIZcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk6FUAHCVIcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkO3ZU6QIZcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkO3ZU6QIZcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkO3ZU6QIZcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkLRRCMRSLcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkO3ZU6QIZcjs.normalizeSubpaths; exports.normalizeText = _chunkO3ZU6QIZcjs.normalizeText; exports.normalizeTilt = _chunkGNK7SESQcjs.normalizeTilt; exports.normalizeWetParams = _chunkGNK7SESQcjs.normalizeWetParams; exports.offsetLayer = _chunkO3ZU6QIZcjs.offsetLayer; exports.offsetShape = _chunkO3ZU6QIZcjs.offsetShape; exports.offsetSmartObject = _chunkO3ZU6QIZcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkGNK7SESQcjs.packWetParams; exports.paintGradientMappingFor = _chunkLRRCMRSLcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkLRRCMRSLcjs.paintPathStroke; exports.paintSourceColor = _chunkLRRCMRSLcjs.paintSourceColor; exports.paintSourceCss = _chunkLRRCMRSLcjs.paintSourceCss; exports.paragraphRanges = _chunkRCUX6CT2cjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkO3ZU6QIZcjs.parseAdjustmentBlock; exports.parseBlend = _chunkO3ZU6QIZcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkO3ZU6QIZcjs.parseLfx2; exports.parseLrfx = _chunkO3ZU6QIZcjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkLRRCMRSLcjs.parsePaintSource; exports.parsePatternBlock = _chunkO3ZU6QIZcjs.parsePatternBlock; exports.parseSelectionMode = _chunkO3ZU6QIZcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkO3ZU6QIZcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkO3ZU6QIZcjs.patchParagraphStyle; exports.patchTextStyle = _chunkO3ZU6QIZcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkLRRCMRSLcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkLRRCMRSLcjs.pathStrokeDabs; exports.perDabStrength = _chunk6FUAHCVIcjs.perDabStrength; exports.photoFilterMatrix = _chunkO3ZU6QIZcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkGNK7SESQcjs.pigmentColor; exports.pigmentOf = _chunkGNK7SESQcjs.pigmentOf; exports.pixelLayerBounds = _chunkO3ZU6QIZcjs.pixelLayerBounds; exports.pixelLayers = _chunkO3ZU6QIZcjs.pixelLayers; exports.pixelPigment = _chunkGNK7SESQcjs.pixelPigment; exports.placeContents = _chunkO3ZU6QIZcjs.placeContents; exports.placeLayer = _chunkO3ZU6QIZcjs.placeLayer; exports.placementAt = _chunkO3ZU6QIZcjs.placementAt; exports.placementBounds = _chunkO3ZU6QIZcjs.placementBounds; exports.placementGeometry = _chunkO3ZU6QIZcjs.placementGeometry; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkGNK7SESQcjs.pointerPressure; exports.pointerStrokeSample = _chunkGNK7SESQcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkGNK7SESQcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkO3ZU6QIZcjs.posterizeValue; exports.presetWarp = _chunkO3ZU6QIZcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkO3ZU6QIZcjs.projectImagePoint; exports.projectImageRect = _chunkO3ZU6QIZcjs.projectImageRect; exports.projectMaskCoverage = _chunkO3ZU6QIZcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkO3ZU6QIZcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkO3ZU6QIZcjs.psdToLayers; exports.pullWarpMesh = _chunkRCUX6CT2cjs.pullWarpMesh; exports.put255 = _chunkLRRCMRSLcjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkLRRCMRSLcjs.rand01; exports.randSigned = _chunkLRRCMRSLcjs.randSigned; exports.rangeLightness = _chunkO3ZU6QIZcjs.rangeLightness; exports.rasterContents = _chunkO3ZU6QIZcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkO3ZU6QIZcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkO3ZU6QIZcjs.rasterizeCoverage; exports.rasterizeDab = _chunkLRRCMRSLcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkO3ZU6QIZcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkLRRCMRSLcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkO3ZU6QIZcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk6FUAHCVIcjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkO3ZU6QIZcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkO3ZU6QIZcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkO3ZU6QIZcjs.removeLayer; exports.removeLayerEffect = _chunkO3ZU6QIZcjs.removeLayerEffect; exports.removeLayerFilter = _chunkO3ZU6QIZcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkLRRCMRSLcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkO3ZU6QIZcjs.removeSmartFilter; exports.renderBrushstroke = _chunkLRRCMRSLcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkO3ZU6QIZcjs.renderShape; exports.renderShapeRect = _chunkO3ZU6QIZcjs.renderShapeRect; exports.renderSmartObject = _chunkO3ZU6QIZcjs.renderSmartObject; exports.renderText = _chunkO3ZU6QIZcjs.renderText; exports.replaceContents = _chunkO3ZU6QIZcjs.replaceContents; exports.replaceTextRange = _chunkO3ZU6QIZcjs.replaceTextRange; exports.requireLayer = _chunkO3ZU6QIZcjs.requireLayer; exports.requireOperation = _chunkO3ZU6QIZcjs.requireOperation; exports.requireShapeLayer = _chunkO3ZU6QIZcjs.requireShapeLayer; exports.requireSmartObject = _chunkO3ZU6QIZcjs.requireSmartObject; exports.requireTypeLayer = _chunkO3ZU6QIZcjs.requireTypeLayer; exports.requireUnlocked = _chunkO3ZU6QIZcjs.requireUnlocked; exports.rerender = _chunkO3ZU6QIZcjs.rerender; exports.rerenderShape = _chunkO3ZU6QIZcjs.rerenderShape; exports.rerenderText = _chunkO3ZU6QIZcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkO3ZU6QIZcjs.resizeSelection; exports.resizeWarpMesh = _chunkRCUX6CT2cjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkO3ZU6QIZcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkLRRCMRSLcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkRCUX6CT2cjs.restyleRange; exports.retouchFilter = _chunk6FUAHCVIcjs.retouchFilter; exports.reversePaintGradient = _chunkLRRCMRSLcjs.reversePaintGradient; exports.rgbToGray = _chunkO3ZU6QIZcjs.rgbToGray; exports.rgbToHsl = _chunkO3ZU6QIZcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk6FUAHCVIcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkO3ZU6QIZcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkO3ZU6QIZcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkO3ZU6QIZcjs.sampleLut; exports.sampleToneLut = _chunkO3ZU6QIZcjs.sampleToneLut; exports.saturationOf = _chunk6FUAHCVIcjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkLRRCMRSLcjs.scalePaintGradient; exports.seamlessClone = _chunk6FUAHCVIcjs.seamlessClone; exports.seedFromString = _chunkLRRCMRSLcjs.seedFromString; exports.selectionArea = _chunkO3ZU6QIZcjs.selectionArea; exports.selectionFromCoverage = _chunkO3ZU6QIZcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkO3ZU6QIZcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkO3ZU6QIZcjs.selectionToCoverage; exports.selectionToPixels = _chunkO3ZU6QIZcjs.selectionToPixels; exports.selectionValueAt = _chunkO3ZU6QIZcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkO3ZU6QIZcjs.serializeContents; exports.serializeEffects = _chunkO3ZU6QIZcjs.serializeEffects; exports.serializeLayer = _chunkO3ZU6QIZcjs.serializeLayer; exports.serializeLayers = _chunkO3ZU6QIZcjs.serializeLayers; exports.serializeLayersExternal = _chunkO3ZU6QIZcjs.serializeLayersExternal; exports.serializePatterns = _chunkO3ZU6QIZcjs.serializePatterns; exports.serializeSelection = _chunkO3ZU6QIZcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkO3ZU6QIZcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkO3ZU6QIZcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkO3ZU6QIZcjs.setLayerMask; exports.setLayerProperties = _chunkO3ZU6QIZcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkO3ZU6QIZcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkO3ZU6QIZcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkO3ZU6QIZcjs.setSmartPlacement; exports.shadeTile = _chunkGNK7SESQcjs.shadeTile; exports.shapeAsPixelLayer = _chunkO3ZU6QIZcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkO3ZU6QIZcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkO3ZU6QIZcjs.shapeGeometryBounds; exports.shapeLayers = _chunkO3ZU6QIZcjs.shapeLayers; exports.shapeOutline = _chunkO3ZU6QIZcjs.shapeOutline; exports.shapeRenderClip = _chunkO3ZU6QIZcjs.shapeRenderClip; exports.shiftCoverage = _chunkO3ZU6QIZcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkO3ZU6QIZcjs.smartObjectLayers; exports.smoothCoverage = _chunkO3ZU6QIZcjs.smoothCoverage; exports.smoothPoints = _chunkLRRCMRSLcjs.smoothPoints; exports.smudgeEffect = _chunk6FUAHCVIcjs.smudgeEffect; exports.solidPaint = _chunkLRRCMRSLcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk6FUAHCVIcjs.solveMembrane; exports.spliceRuns = _chunkRCUX6CT2cjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk6FUAHCVIcjs.sponge; exports.spongeEffect = _chunk6FUAHCVIcjs.spongeEffect; exports.spotHealPixels = _chunk6FUAHCVIcjs.spotHealPixels; exports.spotHealWindow = _chunk6FUAHCVIcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkGNK7SESQcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkO3ZU6QIZcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.stepSlotTs = _chunkGNK7SESQcjs.stepSlotTs; exports.strokeGrainCatch = _chunkLRRCMRSLcjs.strokeGrainCatch; exports.styleAt = _chunkRCUX6CT2cjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkO3ZU6QIZcjs.tempTintToXy; exports.temperatureToKelvin = _chunkO3ZU6QIZcjs.temperatureToKelvin; exports.textIndexAt = _chunkRCUX6CT2cjs.textIndexAt; exports.textMatrix = _chunkO3ZU6QIZcjs.textMatrix; exports.textOutlines = _chunkO3ZU6QIZcjs.textOutlines; exports.textRange = _chunkO3ZU6QIZcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkLRRCMRSLcjs.tipFalloff; exports.tipReach = _chunkLRRCMRSLcjs.tipReach; exports.tipShape = _chunkLRRCMRSLcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkO3ZU6QIZcjs.toTextSpace; exports.toneCurve = _chunkO3ZU6QIZcjs.toneCurve; exports.toneLuts = _chunkO3ZU6QIZcjs.toneLuts; exports.toneOf = _chunk6FUAHCVIcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkO3ZU6QIZcjs.transformHomography; exports.transformMap = _chunkO3ZU6QIZcjs.transformMap; exports.transformShapeComponents = _chunkO3ZU6QIZcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkO3ZU6QIZcjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkO3ZU6QIZcjs.transformedBox; exports.transformedPoint = _chunkO3ZU6QIZcjs.transformedPoint; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkO3ZU6QIZcjs.typeAsPixelLayer; exports.typeFrame = _chunkO3ZU6QIZcjs.typeFrame; exports.typeFromAnnotation = _chunkO3ZU6QIZcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkO3ZU6QIZcjs.typeLayerName; exports.ungroupLayer = _chunkO3ZU6QIZcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkO3ZU6QIZcjs.unionRect; exports.unprojectCanvasPoint = _chunkO3ZU6QIZcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkO3ZU6QIZcjs.updateLayerEffect; exports.updateLayerFilter = _chunkO3ZU6QIZcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkO3ZU6QIZcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkLRRCMRSLcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkO3ZU6QIZcjs.updateShapeLayer; exports.updateSmartFilter = _chunkO3ZU6QIZcjs.updateSmartFilter; exports.updateTypeLayer = _chunkO3ZU6QIZcjs.updateTypeLayer; exports.uvToXy = _chunkO3ZU6QIZcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkO3ZU6QIZcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkO3ZU6QIZcjs.vibranceLinear; exports.vibrancePixel = _chunkO3ZU6QIZcjs.vibrancePixel; exports.walkDabs = _chunkLRRCMRSLcjs.walkDabs; exports.warpMeshEditPoints = _chunkRCUX6CT2cjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkRCUX6CT2cjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkRCUX6CT2cjs.warpMeshParamAt; exports.warpPresetMesh = _chunkRCUX6CT2cjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.wbMatrix = _chunkO3ZU6QIZcjs.wbMatrix; exports.wetGpuSupport = _chunkGNK7SESQcjs.wetGpuSupport; exports.wetSimdSupported = _chunkGNK7SESQcjs.wetSimdSupported; exports.wetSupport = _chunkGNK7SESQcjs.wetSupport; exports.whiteBalanceFromSample = _chunkO3ZU6QIZcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkO3ZU6QIZcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkO3ZU6QIZcjs.withFilterMaskSurface; exports.withNewIds = _chunkO3ZU6QIZcjs.withNewIds; exports.writeAdjustmentBlock = _chunkO3ZU6QIZcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkO3ZU6QIZcjs.writeLfx2; exports.writePatternBlock = _chunkO3ZU6QIZcjs.writePatternBlock; exports.writePsd = _chunkO3ZU6QIZcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkO3ZU6QIZcjs.xyToTempTint; exports.xyToUv = _chunkO3ZU6QIZcjs.xyToUv;
16034
+ exports.ADJUSTMENT_KEYS = _chunkXNZWATSBcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkXNZWATSBcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkXNZWATSBcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkXNZWATSBcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkXNZWATSBcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkXNZWATSBcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkXNZWATSBcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkGNK7SESQcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkONZJD2ODcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkLRRCMRSLcjs.BrushstrokeCache; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunkLRRCMRSLcjs.CoverageMap; exports.D50 = _chunkXNZWATSBcjs.D50; exports.D65 = _chunkXNZWATSBcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkHRI3ZMDMcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkLRRCMRSLcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkLRRCMRSLcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkGNK7SESQcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkXNZWATSBcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkLRRCMRSLcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkLRRCMRSLcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkLRRCMRSLcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk6FUAHCVIcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkLRRCMRSLcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkHRI3ZMDMcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkGNK7SESQcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkGNK7SESQcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkXNZWATSBcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkGNK7SESQcjs.DRY_EPS; exports.DabWalker = _chunkLRRCMRSLcjs.DabWalker; exports.EMPTY_DISTANCE = _chunkXNZWATSBcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkLRRCMRSLcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkGNK7SESQcjs.EX; exports.EY = _chunkGNK7SESQcjs.EY; exports.FLAG_ALIVE = _chunkGNK7SESQcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkGNK7SESQcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkGNK7SESQcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkGNK7SESQcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkGNK7SESQcjs.FLAG_TOP; exports.FLAG_WET = _chunkGNK7SESQcjs.FLAG_WET; exports.FLAT = _chunkGNK7SESQcjs.FLAT; exports.FREE_INTERVAL = _chunkGNK7SESQcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkXNZWATSBcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GRAIN_PATTERNS = _chunkLRRCMRSLcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkLRRCMRSLcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkGNK7SESQcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkXNZWATSBcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk6FUAHCVIcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkXNZWATSBcjs.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 = _chunkONZJD2ODcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkXNZWATSBcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkXNZWATSBcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkXNZWATSBcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkXNZWATSBcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkXNZWATSBcjs.LUMA_709; exports.LayerCompositor = _chunkXNZWATSBcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkXNZWATSBcjs.LayerOperationError; exports.MAX_BATCH = _chunkGNK7SESQcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkLRRCMRSLcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkXNZWATSBcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkGNK7SESQcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkGNK7SESQcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkGNK7SESQcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkXNZWATSBcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkXNZWATSBcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkLRRCMRSLcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkLRRCMRSLcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkLRRCMRSLcjs.MIXING_MODELS; exports.MixerStroke = _chunkLRRCMRSLcjs.MixerStroke; exports.OPP = _chunkGNK7SESQcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkLRRCMRSLcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkLRRCMRSLcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkLRRCMRSLcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkLRRCMRSLcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkLRRCMRSLcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkLRRCMRSLcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkLRRCMRSLcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkGNK7SESQcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkXNZWATSBcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkGNK7SESQcjs.PARAM; exports.PARAM_FLOATS = _chunkGNK7SESQcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkXNZWATSBcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkGNK7SESQcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkGNK7SESQcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkGNK7SESQcjs.PLANE; exports.PLANE_BYTES = _chunkGNK7SESQcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkXNZWATSBcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkGNK7SESQcjs.P_D0; exports.P_EDGE = _chunkGNK7SESQcjs.P_EDGE; exports.P_FX = _chunkGNK7SESQcjs.P_FX; exports.P_FY = _chunkGNK7SESQcjs.P_FY; exports.P_H = _chunkGNK7SESQcjs.P_H; exports.P_P0 = _chunkGNK7SESQcjs.P_P0; exports.P_RHO = _chunkGNK7SESQcjs.P_RHO; exports.P_SW = _chunkGNK7SESQcjs.P_SW; exports.P_UX = _chunkGNK7SESQcjs.P_UX; exports.P_UY = _chunkGNK7SESQcjs.P_UY; exports.PaintExchange = _chunkLRRCMRSLcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkLRRCMRSLcjs.PaintGradientSampler; exports.PaintSourceError = _chunkLRRCMRSLcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkLRRCMRSLcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkXNZWATSBcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk6FUAHCVIcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk6FUAHCVIcjs.RegionPixelSource; exports.RetouchDabStroke = _chunk6FUAHCVIcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkXNZWATSBcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkXNZWATSBcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkGNK7SESQcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkXNZWATSBcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkXNZWATSBcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkGNK7SESQcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkGNK7SESQcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkGNK7SESQcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkXNZWATSBcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk6FUAHCVIcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkGNK7SESQcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkGNK7SESQcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkXNZWATSBcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkLRRCMRSLcjs.SmudgeTip; exports.StrokeCoverage = _chunkLRRCMRSLcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkXNZWATSBcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkXNZWATSBcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkXNZWATSBcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkXNZWATSBcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkLRRCMRSLcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkXNZWATSBcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk6FUAHCVIcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkXNZWATSBcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkLRRCMRSLcjs.TileMedium; exports.TilePixelSource = _chunk6FUAHCVIcjs.TilePixelSource; exports.TileableNoise = _chunkLRRCMRSLcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk6FUAHCVIcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkGNK7SESQcjs.U_MAX; exports.VIBRANCE_GREY = _chunkXNZWATSBcjs.VIBRANCE_GREY; exports.W9 = _chunkGNK7SESQcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkHRI3ZMDMcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkHRI3ZMDMcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkGNK7SESQcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkGNK7SESQcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkGNK7SESQcjs.WET_TILE; exports.WGSL_HALO = _chunkGNK7SESQcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkGNK7SESQcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkGNK7SESQcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkGNK7SESQcjs.WetGpuEngine; exports.WetMedium = _chunkGNK7SESQcjs.WetMedium; exports.WetWorkerPool = _chunkGNK7SESQcjs.WetWorkerPool; exports.WetWorld = _chunkGNK7SESQcjs.WetWorld; exports.WetWorldError = _chunkGNK7SESQcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkXNZWATSBcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkXNZWATSBcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkXNZWATSBcjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunkXNZWATSBcjs.activeSmartFilters; exports.addLayerEffect = _chunkXNZWATSBcjs.addLayerEffect; exports.addLayerFilter = _chunkXNZWATSBcjs.addLayerFilter; exports.addPaintGradientStop = _chunkLRRCMRSLcjs.addPaintGradientStop; exports.addSmartFilter = _chunkXNZWATSBcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkXNZWATSBcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkXNZWATSBcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkXNZWATSBcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkXNZWATSBcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.anchorPoint = _chunkXNZWATSBcjs.anchorPoint; exports.annotationBlend = _chunkXNZWATSBcjs.annotationBlend; exports.annotationLayerFor = _chunkXNZWATSBcjs.annotationLayerFor; exports.annotationLayerName = _chunkXNZWATSBcjs.annotationLayerName; exports.annotationOfLayer = _chunkXNZWATSBcjs.annotationOfLayer; exports.annotationOfShape = _chunkXNZWATSBcjs.annotationOfShape; exports.annotationOfType = _chunkXNZWATSBcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkXNZWATSBcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkXNZWATSBcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkXNZWATSBcjs.applyAdjustments; exports.applyBoxBlur = _chunkXNZWATSBcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkXNZWATSBcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkXNZWATSBcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkXNZWATSBcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkXNZWATSBcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkXNZWATSBcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkXNZWATSBcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkXNZWATSBcjs.applyParams; exports.applyProcess2Adjustments = _chunkXNZWATSBcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkXNZWATSBcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk6FUAHCVIcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkXNZWATSBcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkLRRCMRSLcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkLRRCMRSLcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk6FUAHCVIcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkXNZWATSBcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk6FUAHCVIcjs.bestOffset; exports.blackWhiteGray = _chunkXNZWATSBcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkLRRCMRSLcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkLRRCMRSLcjs.blenderDab; exports.blurFilter = _chunkXNZWATSBcjs.blurFilter; exports.borderCoverage = _chunkXNZWATSBcjs.borderCoverage; exports.boxBlurPixels = _chunk6FUAHCVIcjs.boxBlurPixels; exports.boxMean = boxMean; exports.boxPointOf = _chunkXNZWATSBcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkXNZWATSBcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkLRRCMRSLcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkLRRCMRSLcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkLRRCMRSLcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkLRRCMRSLcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkLRRCMRSLcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkXNZWATSBcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkXNZWATSBcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkXNZWATSBcjs.calculateCropDrag; exports.canShareMemory = _chunkGNK7SESQcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkXNZWATSBcjs.canvasToImagePoint; exports.caretAt = _chunkHRI3ZMDMcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkXNZWATSBcjs.clampCropToImage; exports.cleanMixer = _chunkLRRCMRSLcjs.cleanMixer; exports.cloneSamplePoint = _chunk6FUAHCVIcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkXNZWATSBcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkXNZWATSBcjs.combineSelections; exports.compileAdjustmentLayer = _chunkXNZWATSBcjs.compileAdjustmentLayer; exports.componentPath = _chunkXNZWATSBcjs.componentPath; exports.compositeDeep = _chunkXNZWATSBcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkXNZWATSBcjs.computeSelectionBounds; exports.contentAwareFill = _chunk6FUAHCVIcjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkXNZWATSBcjs.contentsBox; exports.contentsSurface = _chunkXNZWATSBcjs.contentsSurface; exports.contractCoverage = _chunkXNZWATSBcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkXNZWATSBcjs.convertToSmartObject; exports.copySmartObject = _chunkXNZWATSBcjs.copySmartObject; exports.cornersFromMatrix = _chunkXNZWATSBcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkLRRCMRSLcjs.coverageTileCoord; exports.coverageToByte = _chunkXNZWATSBcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkXNZWATSBcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkLRRCMRSLcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkHRI3ZMDMcjs.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 = _chunkHRI3ZMDMcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkHRI3ZMDMcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkGNK7SESQcjs.createPigmentTools; exports.createSelectionMask = _chunkXNZWATSBcjs.createSelectionMask; exports.createShapeLayer = _chunkXNZWATSBcjs.createShapeLayer; exports.createTypeLayer = _chunkXNZWATSBcjs.createTypeLayer; exports.createWetGpuEngine = _chunkGNK7SESQcjs.createWetGpuEngine; exports.cssFont = _chunkHRI3ZMDMcjs.cssFont; exports.cssFontFamily = _chunkHRI3ZMDMcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkXNZWATSBcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkLRRCMRSLcjs.dabCoverage; exports.dabRect = _chunkLRRCMRSLcjs.dabRect; exports.decodeDeepSurface = _chunkXNZWATSBcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkXNZWATSBcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkXNZWATSBcjs.decodeLayerMask; exports.decodeMergedImage = _chunkXNZWATSBcjs.decodeMergedImage; exports.decodePlanes = _chunkXNZWATSBcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkXNZWATSBcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkXNZWATSBcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultAdjustmentParams = _chunkXNZWATSBcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkXNZWATSBcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkXNZWATSBcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkXNZWATSBcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkXNZWATSBcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkXNZWATSBcjs.deserializeEffects; exports.deserializeLayer = _chunkXNZWATSBcjs.deserializeLayer; exports.deserializeLayers = _chunkXNZWATSBcjs.deserializeLayers; exports.deserializePatterns = _chunkXNZWATSBcjs.deserializePatterns; exports.deserializeSelection = _chunkXNZWATSBcjs.deserializeSelection; exports.developFilter = _chunkXNZWATSBcjs.developFilter; exports.developFromAdjustments = _chunkXNZWATSBcjs.developFromAdjustments; exports.developTarget = _chunkXNZWATSBcjs.developTarget; exports.dexp = _chunkGNK7SESQcjs.dexp; exports.dilateMask = _chunk6FUAHCVIcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkXNZWATSBcjs.distanceTransform; exports.dlog = _chunkGNK7SESQcjs.dlog; exports.documentContents = _chunkXNZWATSBcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk6FUAHCVIcjs.dodgeBurn; exports.dodgeBurnCurve = _chunk6FUAHCVIcjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkGNK7SESQcjs.dpow; exports.dragWarpMeshPoint = _chunkHRI3ZMDMcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkGNK7SESQcjs.dsincos; exports.duplicateLayer = _chunkXNZWATSBcjs.duplicateLayer; exports.edgeBits = _chunkGNK7SESQcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkXNZWATSBcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkXNZWATSBcjs.encodeRle; exports.encodeSelectionRle = _chunkXNZWATSBcjs.encodeSelectionRle; exports.encodeSurface = _chunkXNZWATSBcjs.encodeSurface; exports.evalWarpMesh = _chunkHRI3ZMDMcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkXNZWATSBcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkLRRCMRSLcjs.exchangeRates; exports.expNeg = _chunkGNK7SESQcjs.expNeg; exports.expandCoverage = _chunkXNZWATSBcjs.expandCoverage; exports.exportPsd = _chunkXNZWATSBcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkXNZWATSBcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkGNK7SESQcjs.filmPixel; exports.filmReflectance = _chunkGNK7SESQcjs.filmReflectance; exports.filterMaskCoverage = _chunkXNZWATSBcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkGNK7SESQcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkHRI3ZMDMcjs.fitParagraphRuns; exports.fitRuns = _chunkHRI3ZMDMcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkXNZWATSBcjs.flattenPath; exports.flipCorners = _chunkXNZWATSBcjs.flipCorners; exports.flowField = _chunkGNK7SESQcjs.flowField; exports.fontOf = _chunkHRI3ZMDMcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkXNZWATSBcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkXNZWATSBcjs.geometryHomography; exports.getAnnotationBounds = _chunkXNZWATSBcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkXNZWATSBcjs.getCropCursor; exports.getRotatedSize = _chunkXNZWATSBcjs.getRotatedSize; exports.getViewportMetrics = _chunkXNZWATSBcjs.getViewportMetrics; exports.getViewportProjection = _chunkXNZWATSBcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkLRRCMRSLcjs.gradientDabColor; exports.grainCatch = _chunkLRRCMRSLcjs.grainCatch; exports.grainHeights = _chunkLRRCMRSLcjs.grainHeights; exports.greyMorphology = _chunkXNZWATSBcjs.greyMorphology; exports.groupLayers = _chunkXNZWATSBcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkXNZWATSBcjs.hasResampledLegacyMask; exports.hasSurface = _chunkXNZWATSBcjs.hasSurface; exports.hasWarp = _chunkXNZWATSBcjs.hasWarp; exports.hash2 = _chunkLRRCMRSLcjs.hash2; exports.hashMaskContent = _chunkXNZWATSBcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk6FUAHCVIcjs.healPixels; exports.hexToPaintRgb = _chunkLRRCMRSLcjs.hexToPaintRgb; exports.hexToRgb = _chunkXNZWATSBcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkXNZWATSBcjs.hitTestAnnotation; exports.hitTestCrop = _chunkXNZWATSBcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkXNZWATSBcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkXNZWATSBcjs.hueRangeTables; exports.hueRangeWeight = _chunkXNZWATSBcjs.hueRangeWeight; exports.hueSaturation = _chunkXNZWATSBcjs.hueSaturation; exports.identityCurve = _chunkXNZWATSBcjs.identityCurve; exports.identityLevels = _chunkXNZWATSBcjs.identityLevels; exports.identityTransform = _chunkXNZWATSBcjs.identityTransform; exports.identityWarpMesh = _chunkHRI3ZMDMcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunkXNZWATSBcjs.imageToCanvasPoint; exports.importPsd = _chunkXNZWATSBcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkXNZWATSBcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkXNZWATSBcjs.invertMatrix3; exports.invertSelection = _chunkXNZWATSBcjs.invertSelection; exports.isActiveFilter = _chunkXNZWATSBcjs.isActiveFilter; exports.isAdjustmentKind = _chunkXNZWATSBcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkLRRCMRSLcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkXNZWATSBcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkXNZWATSBcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkLRRCMRSLcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk6FUAHCVIcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkXNZWATSBcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkXNZWATSBcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkXNZWATSBcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkXNZWATSBcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkXNZWATSBcjs.isSelectionEmpty; exports.isSelectionMode = _chunkXNZWATSBcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkXNZWATSBcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkXNZWATSBcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkXNZWATSBcjs.isTransformAnchor; exports.isValidWarp = _chunkXNZWATSBcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkXNZWATSBcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkGNK7SESQcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkXNZWATSBcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkXNZWATSBcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkXNZWATSBcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkXNZWATSBcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkXNZWATSBcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkXNZWATSBcjs.layerTree; exports.layerTypeLabel = _chunkXNZWATSBcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkXNZWATSBcjs.layersFromLegacy; exports.layoutText = _chunkHRI3ZMDMcjs.layoutText; exports.legacyAdjustmentLayer = _chunkXNZWATSBcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkXNZWATSBcjs.legacyMaskOf; exports.legacyView = _chunkXNZWATSBcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkXNZWATSBcjs.levelsValue; exports.linearSrgbToXy = _chunkXNZWATSBcjs.linearSrgbToXy; exports.linearToSrgb = _chunkXNZWATSBcjs.linearToSrgb; exports.linearToSrgb8 = _chunkGNK7SESQcjs.linearToSrgb8; exports.liveComponent = _chunkXNZWATSBcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkXNZWATSBcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkLRRCMRSLcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkGNK7SESQcjs.loadWetKernel; exports.luma = _chunk6FUAHCVIcjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkXNZWATSBcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkXNZWATSBcjs.mapSubpaths; exports.maskBounds = _chunk6FUAHCVIcjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkXNZWATSBcjs.matrixFromCorners; exports.matrixFromParams = _chunkXNZWATSBcjs.matrixFromParams; exports.membraneFill = _chunk6FUAHCVIcjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkXNZWATSBcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkLRRCMRSLcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkLRRCMRSLcjs.mixerRates; exports.modifySelection = _chunkXNZWATSBcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkXNZWATSBcjs.moveLayer; exports.moveSmartFilter = _chunkXNZWATSBcjs.moveSmartFilter; exports.mulMatrix3 = _chunkXNZWATSBcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkXNZWATSBcjs.neutralHueRange; exports.newContentsId = _chunkXNZWATSBcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkXNZWATSBcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkXNZWATSBcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkXNZWATSBcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkXNZWATSBcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkLRRCMRSLcjs.normalizeBlender; exports.normalizeBrush = _chunkLRRCMRSLcjs.normalizeBrush; exports.normalizeFilter = _chunkXNZWATSBcjs.normalizeFilter; exports.normalizeFlow = _chunkGNK7SESQcjs.normalizeFlow; exports.normalizeHexColor = _chunkLRRCMRSLcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkXNZWATSBcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkXNZWATSBcjs.normalizeLiveShape; exports.normalizeMixer = _chunkLRRCMRSLcjs.normalizeMixer; exports.normalizePlacement = _chunkXNZWATSBcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkXNZWATSBcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk6FUAHCVIcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkXNZWATSBcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkXNZWATSBcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkXNZWATSBcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkLRRCMRSLcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkXNZWATSBcjs.normalizeSubpaths; exports.normalizeText = _chunkXNZWATSBcjs.normalizeText; exports.normalizeTilt = _chunkGNK7SESQcjs.normalizeTilt; exports.normalizeWetParams = _chunkGNK7SESQcjs.normalizeWetParams; exports.offsetLayer = _chunkXNZWATSBcjs.offsetLayer; exports.offsetShape = _chunkXNZWATSBcjs.offsetShape; exports.offsetSmartObject = _chunkXNZWATSBcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkGNK7SESQcjs.packWetParams; exports.paintGradientMappingFor = _chunkLRRCMRSLcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkLRRCMRSLcjs.paintPathStroke; exports.paintSourceColor = _chunkLRRCMRSLcjs.paintSourceColor; exports.paintSourceCss = _chunkLRRCMRSLcjs.paintSourceCss; exports.paragraphRanges = _chunkHRI3ZMDMcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkXNZWATSBcjs.parseAdjustmentBlock; exports.parseBlend = _chunkXNZWATSBcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkXNZWATSBcjs.parseLfx2; exports.parseLrfx = _chunkXNZWATSBcjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkLRRCMRSLcjs.parsePaintSource; exports.parsePatternBlock = _chunkXNZWATSBcjs.parsePatternBlock; exports.parseSelectionMode = _chunkXNZWATSBcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkXNZWATSBcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkXNZWATSBcjs.patchParagraphStyle; exports.patchTextStyle = _chunkXNZWATSBcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkLRRCMRSLcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkLRRCMRSLcjs.pathStrokeDabs; exports.perDabStrength = _chunk6FUAHCVIcjs.perDabStrength; exports.photoFilterMatrix = _chunkXNZWATSBcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkGNK7SESQcjs.pigmentColor; exports.pigmentOf = _chunkGNK7SESQcjs.pigmentOf; exports.pixelLayerBounds = _chunkXNZWATSBcjs.pixelLayerBounds; exports.pixelLayers = _chunkXNZWATSBcjs.pixelLayers; exports.pixelPigment = _chunkGNK7SESQcjs.pixelPigment; exports.placeContents = _chunkXNZWATSBcjs.placeContents; exports.placeLayer = _chunkXNZWATSBcjs.placeLayer; exports.placementAt = _chunkXNZWATSBcjs.placementAt; exports.placementBounds = _chunkXNZWATSBcjs.placementBounds; exports.placementGeometry = _chunkXNZWATSBcjs.placementGeometry; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkGNK7SESQcjs.pointerPressure; exports.pointerStrokeSample = _chunkGNK7SESQcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkGNK7SESQcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkXNZWATSBcjs.posterizeValue; exports.presetWarp = _chunkXNZWATSBcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkXNZWATSBcjs.projectImagePoint; exports.projectImageRect = _chunkXNZWATSBcjs.projectImageRect; exports.projectMaskCoverage = _chunkXNZWATSBcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkXNZWATSBcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkXNZWATSBcjs.psdToLayers; exports.pullWarpMesh = _chunkHRI3ZMDMcjs.pullWarpMesh; exports.put255 = _chunkLRRCMRSLcjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkLRRCMRSLcjs.rand01; exports.randSigned = _chunkLRRCMRSLcjs.randSigned; exports.rangeLightness = _chunkXNZWATSBcjs.rangeLightness; exports.rasterContents = _chunkXNZWATSBcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkXNZWATSBcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkXNZWATSBcjs.rasterizeCoverage; exports.rasterizeDab = _chunkLRRCMRSLcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkXNZWATSBcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkLRRCMRSLcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkXNZWATSBcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk6FUAHCVIcjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkXNZWATSBcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkXNZWATSBcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkXNZWATSBcjs.removeLayer; exports.removeLayerEffect = _chunkXNZWATSBcjs.removeLayerEffect; exports.removeLayerFilter = _chunkXNZWATSBcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkLRRCMRSLcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkXNZWATSBcjs.removeSmartFilter; exports.renderBrushstroke = _chunkLRRCMRSLcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkXNZWATSBcjs.renderShape; exports.renderShapeRect = _chunkXNZWATSBcjs.renderShapeRect; exports.renderSmartObject = _chunkXNZWATSBcjs.renderSmartObject; exports.renderText = _chunkXNZWATSBcjs.renderText; exports.replaceContents = _chunkXNZWATSBcjs.replaceContents; exports.replaceTextRange = _chunkXNZWATSBcjs.replaceTextRange; exports.requireLayer = _chunkXNZWATSBcjs.requireLayer; exports.requireOperation = _chunkXNZWATSBcjs.requireOperation; exports.requireShapeLayer = _chunkXNZWATSBcjs.requireShapeLayer; exports.requireSmartObject = _chunkXNZWATSBcjs.requireSmartObject; exports.requireTypeLayer = _chunkXNZWATSBcjs.requireTypeLayer; exports.requireUnlocked = _chunkXNZWATSBcjs.requireUnlocked; exports.rerender = _chunkXNZWATSBcjs.rerender; exports.rerenderShape = _chunkXNZWATSBcjs.rerenderShape; exports.rerenderText = _chunkXNZWATSBcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkXNZWATSBcjs.resizeSelection; exports.resizeWarpMesh = _chunkHRI3ZMDMcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkXNZWATSBcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkLRRCMRSLcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkHRI3ZMDMcjs.restyleRange; exports.retouchFilter = _chunk6FUAHCVIcjs.retouchFilter; exports.reversePaintGradient = _chunkLRRCMRSLcjs.reversePaintGradient; exports.rgbToGray = _chunkXNZWATSBcjs.rgbToGray; exports.rgbToHsl = _chunkXNZWATSBcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk6FUAHCVIcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkXNZWATSBcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkXNZWATSBcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkXNZWATSBcjs.sampleLut; exports.sampleToneLut = _chunkXNZWATSBcjs.sampleToneLut; exports.saturationOf = _chunk6FUAHCVIcjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkLRRCMRSLcjs.scalePaintGradient; exports.seamlessClone = _chunk6FUAHCVIcjs.seamlessClone; exports.seedFromString = _chunkLRRCMRSLcjs.seedFromString; exports.selectionArea = _chunkXNZWATSBcjs.selectionArea; exports.selectionFromCoverage = _chunkXNZWATSBcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkXNZWATSBcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkXNZWATSBcjs.selectionToCoverage; exports.selectionToPixels = _chunkXNZWATSBcjs.selectionToPixels; exports.selectionValueAt = _chunkXNZWATSBcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkXNZWATSBcjs.serializeContents; exports.serializeEffects = _chunkXNZWATSBcjs.serializeEffects; exports.serializeLayer = _chunkXNZWATSBcjs.serializeLayer; exports.serializeLayers = _chunkXNZWATSBcjs.serializeLayers; exports.serializeLayersExternal = _chunkXNZWATSBcjs.serializeLayersExternal; exports.serializePatterns = _chunkXNZWATSBcjs.serializePatterns; exports.serializeSelection = _chunkXNZWATSBcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkXNZWATSBcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkXNZWATSBcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkXNZWATSBcjs.setLayerMask; exports.setLayerProperties = _chunkXNZWATSBcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkXNZWATSBcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkXNZWATSBcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkXNZWATSBcjs.setSmartPlacement; exports.shadeTile = _chunkGNK7SESQcjs.shadeTile; exports.shapeAsPixelLayer = _chunkXNZWATSBcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkXNZWATSBcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkXNZWATSBcjs.shapeGeometryBounds; exports.shapeLayers = _chunkXNZWATSBcjs.shapeLayers; exports.shapeOutline = _chunkXNZWATSBcjs.shapeOutline; exports.shapeRenderClip = _chunkXNZWATSBcjs.shapeRenderClip; exports.shiftCoverage = _chunkXNZWATSBcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkXNZWATSBcjs.smartObjectLayers; exports.smoothCoverage = _chunkXNZWATSBcjs.smoothCoverage; exports.smoothPoints = _chunkLRRCMRSLcjs.smoothPoints; exports.smudgeEffect = _chunk6FUAHCVIcjs.smudgeEffect; exports.solidPaint = _chunkLRRCMRSLcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk6FUAHCVIcjs.solveMembrane; exports.spliceRuns = _chunkHRI3ZMDMcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk6FUAHCVIcjs.sponge; exports.spongeEffect = _chunk6FUAHCVIcjs.spongeEffect; exports.spotHealPixels = _chunk6FUAHCVIcjs.spotHealPixels; exports.spotHealWindow = _chunk6FUAHCVIcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkGNK7SESQcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkXNZWATSBcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.stepSlotTs = _chunkGNK7SESQcjs.stepSlotTs; exports.strokeGrainCatch = _chunkLRRCMRSLcjs.strokeGrainCatch; exports.styleAt = _chunkHRI3ZMDMcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkXNZWATSBcjs.tempTintToXy; exports.temperatureToKelvin = _chunkXNZWATSBcjs.temperatureToKelvin; exports.textIndexAt = _chunkHRI3ZMDMcjs.textIndexAt; exports.textMatrix = _chunkXNZWATSBcjs.textMatrix; exports.textOutlines = _chunkXNZWATSBcjs.textOutlines; exports.textRange = _chunkXNZWATSBcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkLRRCMRSLcjs.tipFalloff; exports.tipReach = _chunkLRRCMRSLcjs.tipReach; exports.tipShape = _chunkLRRCMRSLcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkXNZWATSBcjs.toTextSpace; exports.toneCurve = _chunkXNZWATSBcjs.toneCurve; exports.toneLuts = _chunkXNZWATSBcjs.toneLuts; exports.toneOf = _chunk6FUAHCVIcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkXNZWATSBcjs.transformHomography; exports.transformMap = _chunkXNZWATSBcjs.transformMap; exports.transformShapeComponents = _chunkXNZWATSBcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkXNZWATSBcjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkXNZWATSBcjs.transformedBox; exports.transformedPoint = _chunkXNZWATSBcjs.transformedPoint; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkXNZWATSBcjs.typeAsPixelLayer; exports.typeFrame = _chunkXNZWATSBcjs.typeFrame; exports.typeFromAnnotation = _chunkXNZWATSBcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkXNZWATSBcjs.typeLayerName; exports.ungroupLayer = _chunkXNZWATSBcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkXNZWATSBcjs.unionRect; exports.unprojectCanvasPoint = _chunkXNZWATSBcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkXNZWATSBcjs.updateLayerEffect; exports.updateLayerFilter = _chunkXNZWATSBcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkXNZWATSBcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkLRRCMRSLcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkXNZWATSBcjs.updateShapeLayer; exports.updateSmartFilter = _chunkXNZWATSBcjs.updateSmartFilter; exports.updateTypeLayer = _chunkXNZWATSBcjs.updateTypeLayer; exports.uvToXy = _chunkXNZWATSBcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkXNZWATSBcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkXNZWATSBcjs.vibranceLinear; exports.vibrancePixel = _chunkXNZWATSBcjs.vibrancePixel; exports.walkDabs = _chunkLRRCMRSLcjs.walkDabs; exports.warpMeshEditPoints = _chunkHRI3ZMDMcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkHRI3ZMDMcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkHRI3ZMDMcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkHRI3ZMDMcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.wbMatrix = _chunkXNZWATSBcjs.wbMatrix; exports.wetGpuSupport = _chunkGNK7SESQcjs.wetGpuSupport; exports.wetSimdSupported = _chunkGNK7SESQcjs.wetSimdSupported; exports.wetSupport = _chunkGNK7SESQcjs.wetSupport; exports.whiteBalanceFromSample = _chunkXNZWATSBcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkXNZWATSBcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkXNZWATSBcjs.withFilterMaskSurface; exports.withNewIds = _chunkXNZWATSBcjs.withNewIds; exports.writeAdjustmentBlock = _chunkXNZWATSBcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkXNZWATSBcjs.writeLfx2; exports.writePatternBlock = _chunkXNZWATSBcjs.writePatternBlock; exports.writePsd = _chunkXNZWATSBcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkXNZWATSBcjs.xyToTempTint; exports.xyToUv = _chunkXNZWATSBcjs.xyToUv;