@pixerate/editor 0.96.0 → 0.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,7 @@ var _chunkVJUVNERTcjs = require('../chunk-VJUVNERT.cjs');
58
58
 
59
59
 
60
60
 
61
- var _chunkT422YCHRcjs = require('../chunk-T422YCHR.cjs');
61
+ var _chunk4AB5BHYKcjs = require('../chunk-4AB5BHYK.cjs');
62
62
 
63
63
 
64
64
 
@@ -557,20 +557,20 @@ function hitTestCrop(canvasPt, state, vpWidth, vpHeight, handleThreshold = 14, c
557
557
  }
558
558
  function hitTestCropRect(canvasPt, rect, handleThreshold) {
559
559
  const { x, y, width: w, height: h } = rect;
560
- const px = canvasPt.x;
560
+ const px2 = canvasPt.x;
561
561
  const py = canvasPt.y;
562
562
  const dist = (x1, y1, x2, y2) => Math.hypot(x1 - x2, y1 - y2);
563
- if (dist(px, py, x, y) <= handleThreshold) return "nw";
564
- if (dist(px, py, x + w, y) <= handleThreshold) return "ne";
565
- if (dist(px, py, x + w, y + h) <= handleThreshold) return "se";
566
- if (dist(px, py, x, y + h) <= handleThreshold) return "sw";
567
- const nearX = px >= x - handleThreshold && px <= x + w + handleThreshold;
563
+ if (dist(px2, py, x, y) <= handleThreshold) return "nw";
564
+ if (dist(px2, py, x + w, y) <= handleThreshold) return "ne";
565
+ if (dist(px2, py, x + w, y + h) <= handleThreshold) return "se";
566
+ if (dist(px2, py, x, y + h) <= handleThreshold) return "sw";
567
+ const nearX = px2 >= x - handleThreshold && px2 <= x + w + handleThreshold;
568
568
  const nearY = py >= y - handleThreshold && py <= y + h + handleThreshold;
569
569
  if (nearX && Math.abs(py - y) <= handleThreshold) return "n";
570
570
  if (nearX && Math.abs(py - (y + h)) <= handleThreshold) return "s";
571
- if (nearY && Math.abs(px - x) <= handleThreshold) return "w";
572
- if (nearY && Math.abs(px - (x + w)) <= handleThreshold) return "e";
573
- if (px >= x && px <= x + w && py >= y && py <= y + h) {
571
+ if (nearY && Math.abs(px2 - x) <= handleThreshold) return "w";
572
+ if (nearY && Math.abs(px2 - (x + w)) <= handleThreshold) return "e";
573
+ if (px2 >= x && px2 <= x + w && py >= y && py <= y + h) {
574
574
  return "inside";
575
575
  }
576
576
  return null;
@@ -1147,7 +1147,7 @@ function smoothCoverage(m, w, h, r) {
1147
1147
  return src;
1148
1148
  }
1149
1149
  function featherCoverage(m, w, h, radius) {
1150
- const out = _chunkT422YCHRcjs.gaussianBlur.call(void 0, m, w, h, Number.isFinite(radius) ? Math.max(0, radius) : 0, "zero");
1150
+ const out = _chunk4AB5BHYKcjs.gaussianBlur.call(void 0, m, w, h, Number.isFinite(radius) ? Math.max(0, radius) : 0, "zero");
1151
1151
  for (let i = 0; i < out.length; i++) if (Math.abs(out[i]) < 1e-7) out[i] = 0;
1152
1152
  return out;
1153
1153
  }
@@ -1295,7 +1295,7 @@ function layerMaskCoverage(mask) {
1295
1295
  let v = new Float32Array(sel.data.length);
1296
1296
  for (let i = 0; i < v.length; i++) v[i] = sel.data[i] / 255;
1297
1297
  const feather = _nullishCoalesce(mask.feather, () => ( 0));
1298
- if (feather > 0) v = _chunkT422YCHRcjs.gaussianBlur.call(void 0, v, mask.width, mask.height, feather, "clamp");
1298
+ if (feather > 0) v = _chunk4AB5BHYKcjs.gaussianBlur.call(void 0, v, mask.width, mask.height, feather, "clamp");
1299
1299
  const density = _nullishCoalesce(mask.density, () => ( 1));
1300
1300
  if (density !== 1) for (let i = 0; i < v.length; i++) v[i] = 1 - density * (1 - v[i]);
1301
1301
  return v;
@@ -1538,7 +1538,7 @@ function normalizeAdjustmentLayers(raw) {
1538
1538
  return out;
1539
1539
  }
1540
1540
  function curveLutFromLevels(points) {
1541
- return _chunkT422YCHRcjs.curveLut.call(void 0, points.map((p) => ({ input: p.input / 255, output: p.output / 255 })));
1541
+ return _chunk4AB5BHYKcjs.curveLut.call(void 0, points.map((p) => ({ input: p.input / 255, output: p.output / 255 })));
1542
1542
  }
1543
1543
  var toUnitLevels = (c) => ({
1544
1544
  inBlack: c.inBlack / 255,
@@ -1598,13 +1598,13 @@ function hslToRgb(h, s, l) {
1598
1598
  };
1599
1599
  return [f(h + 1 / 3), f(h), f(h - 1 / 3)];
1600
1600
  }
1601
- function hueRangeWeight(range, deg) {
1601
+ function hueRangeWeight(range, deg2) {
1602
1602
  const [a, b0, c0, d0] = range.bounds;
1603
1603
  const rel = (x) => Number.isFinite(x) && Number.isFinite(a) ? remEuclid(x - a, 360) : 0;
1604
1604
  const b = rel(b0);
1605
1605
  const c = Math.max(rel(c0), b);
1606
1606
  const d = Math.max(rel(d0), c);
1607
- const h = rel(deg);
1607
+ const h = rel(deg2);
1608
1608
  if (h <= b) return b <= 0 ? 1 : h / b;
1609
1609
  if (h <= c) return 1;
1610
1610
  if (h <= d) return d <= c ? 1 : (d - h) / (d - c);
@@ -1616,9 +1616,9 @@ function hueRangeTables(ranges) {
1616
1616
  const t = [new Float32Array(n), new Float32Array(n), new Float32Array(n)];
1617
1617
  const active = ranges.filter((r) => !isNeutralRange(r));
1618
1618
  for (let k = 0; k < n; k++) {
1619
- const deg = k / (n - 1) * 360;
1619
+ const deg2 = k / (n - 1) * 360;
1620
1620
  for (const r of active) {
1621
- const w = hueRangeWeight(r, deg);
1621
+ const w = hueRangeWeight(r, deg2);
1622
1622
  t[0][k] += w * r.hue;
1623
1623
  t[1][k] += w * r.saturation / 100;
1624
1624
  t[2][k] += w * r.lightness / 100;
@@ -2181,8 +2181,8 @@ function applyFastBoxBlur(imageData, radius) {
2181
2181
  let r = 0, g = 0, b = 0, a = 0;
2182
2182
  let count = 0;
2183
2183
  for (let k = -radius; k <= radius; k++) {
2184
- const px = Math.min(w - 1, Math.max(0, x + k));
2185
- const idx = (y * w + px) * 4;
2184
+ const px2 = Math.min(w - 1, Math.max(0, x + k));
2185
+ const idx = (y * w + px2) * 4;
2186
2186
  r += src[idx];
2187
2187
  g += src[idx + 1];
2188
2188
  b += src[idx + 2];
@@ -2364,7 +2364,7 @@ function newLayerId(prefix = "layer") {
2364
2364
  return `${prefix}_${Date.now().toString(36)}_${(++idCounter).toString(36)}`;
2365
2365
  }
2366
2366
  function pixelLayers(layers) {
2367
- return _chunkT422YCHRcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "pixel");
2367
+ return _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "pixel");
2368
2368
  }
2369
2369
  function developFilter(layer) {
2370
2370
  return _optionalChain([layer, 'access', _8 => _8.filters, 'optionalAccess', _9 => _9.find, 'call', _10 => _10((f) => f.kind === "develop")]);
@@ -2485,7 +2485,7 @@ var PHOTO_PROFILE = {
2485
2485
  return v;
2486
2486
  }
2487
2487
  };
2488
- var LayerCompositor = class extends _chunkT422YCHRcjs.RasterCompositor {
2488
+ var LayerCompositor = class extends _chunk4AB5BHYKcjs.RasterCompositor {
2489
2489
  constructor(options = {}) {
2490
2490
  super(PHOTO_PROFILE, options);
2491
2491
  }
@@ -3137,13 +3137,13 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
3137
3137
  ctx.save();
3138
3138
  try {
3139
3139
  applyImageProjectionToContext(ctx, projection);
3140
- const px = 1 / (projection.scale || 1);
3140
+ const px2 = 1 / (projection.scale || 1);
3141
3141
  ctx.beginPath();
3142
- ctx.arc(b.x, b.y, Math.max(px, b.diameter / 2), 0, Math.PI * 2);
3143
- ctx.lineWidth = 2 * px;
3142
+ ctx.arc(b.x, b.y, Math.max(px2, b.diameter / 2), 0, Math.PI * 2);
3143
+ ctx.lineWidth = 2 * px2;
3144
3144
  ctx.strokeStyle = "rgba(0,0,0,0.6)";
3145
3145
  ctx.stroke();
3146
- ctx.lineWidth = px;
3146
+ ctx.lineWidth = px2;
3147
3147
  ctx.strokeStyle = "#ffffff";
3148
3148
  ctx.stroke();
3149
3149
  } catch (e5) {
@@ -3262,7 +3262,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
3262
3262
  /** Loads what the compositor reads synchronously: depth maps (at canvas size) and annotation images. */
3263
3263
  /** Loads depth maps and annotation images the compositor reads synchronously. */
3264
3264
  async prepareLayerAssets(layers, width, height) {
3265
- for (const l of _chunkT422YCHRcjs.flattenLayers.call(void 0, layers)) {
3265
+ for (const l of _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers)) {
3266
3266
  const source = _optionalChain([l, 'access', _57 => _57.mask, 'optionalAccess', _58 => _58.source]);
3267
3267
  if (_optionalChain([source, 'optionalAccess', _59 => _59.enabled]) && source.maskSource) {
3268
3268
  const key = `${source.maskSource}|${width}x${height}`;
@@ -3426,32 +3426,32 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
3426
3426
  this.outlineCache.set(selection, segs);
3427
3427
  }
3428
3428
  if (!segs.length) return;
3429
- const px = 1 / (scale || 1);
3429
+ const px2 = 1 / (scale || 1);
3430
3430
  ctx.beginPath();
3431
3431
  for (let i = 0; i < segs.length; i += 4) {
3432
3432
  ctx.moveTo(segs[i], segs[i + 1]);
3433
3433
  ctx.lineTo(segs[i + 2], segs[i + 3]);
3434
3434
  }
3435
- ctx.lineWidth = px;
3435
+ ctx.lineWidth = px2;
3436
3436
  ctx.strokeStyle = "#ffffff";
3437
3437
  ctx.stroke();
3438
3438
  if (typeof ctx.setLineDash === "function") {
3439
- ctx.setLineDash([4 * px, 4 * px]);
3440
- ctx.lineDashOffset = -offset * px;
3439
+ ctx.setLineDash([4 * px2, 4 * px2]);
3440
+ ctx.lineDashOffset = -offset * px2;
3441
3441
  }
3442
3442
  ctx.strokeStyle = "#000000";
3443
3443
  ctx.stroke();
3444
3444
  if (typeof ctx.setLineDash === "function") ctx.setLineDash([]);
3445
3445
  }
3446
3446
  drawDraftPath(ctx, points, scale) {
3447
- const px = 1 / (scale || 1);
3447
+ const px2 = 1 / (scale || 1);
3448
3448
  ctx.beginPath();
3449
3449
  points.forEach((p, i) => i === 0 ? ctx.moveTo(p.x, p.y) : ctx.lineTo(p.x, p.y));
3450
3450
  ctx.closePath();
3451
- ctx.lineWidth = px;
3451
+ ctx.lineWidth = px2;
3452
3452
  ctx.strokeStyle = "#ffffff";
3453
3453
  ctx.stroke();
3454
- if (typeof ctx.setLineDash === "function") ctx.setLineDash([4 * px, 4 * px]);
3454
+ if (typeof ctx.setLineDash === "function") ctx.setLineDash([4 * px2, 4 * px2]);
3455
3455
  ctx.strokeStyle = "#000000";
3456
3456
  ctx.stroke();
3457
3457
  if (typeof ctx.setLineDash === "function") ctx.setLineDash([]);
@@ -4297,8 +4297,8 @@ var gfRadius = (p) => Math.min(64, Math.max(1, Math.ceil(p.radius)));
4297
4297
  var smoothSigma = (p) => p.smooth / 100 * 4;
4298
4298
  var featherSigma = (p) => p.feather / 2;
4299
4299
  function shiftAmount(p) {
4300
- const px = p.shiftEdge / 100 * Math.max(p.radius, 4);
4301
- return Number.isFinite(px) ? Math.min(64, Math.max(-64, px)) : 0;
4300
+ const px2 = p.shiftEdge / 100 * Math.max(p.radius, 4);
4301
+ return Number.isFinite(px2) ? Math.min(64, Math.max(-64, px2)) : 0;
4302
4302
  }
4303
4303
  function refineEdgeHalo(params = {}) {
4304
4304
  const p = normalizeRefineEdgeParams(params);
@@ -4445,11 +4445,11 @@ function refineCoverage(guide, m, w, h, params = {}) {
4445
4445
  }
4446
4446
  const ss = smoothSigma(p);
4447
4447
  if (ss >= 0.3) {
4448
- a = _chunkT422YCHRcjs.gaussianBlur.call(void 0, a, w, h, ss, "clamp");
4448
+ a = _chunk4AB5BHYKcjs.gaussianBlur.call(void 0, a, w, h, ss, "clamp");
4449
4449
  const gain = 1 + ss;
4450
4450
  for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
4451
4451
  }
4452
- a = _chunkT422YCHRcjs.gaussianBlur.call(void 0, a, w, h, featherSigma(p), "clamp");
4452
+ a = _chunk4AB5BHYKcjs.gaussianBlur.call(void 0, a, w, h, featherSigma(p), "clamp");
4453
4453
  if (p.contrast > 0) {
4454
4454
  const gain = 1 / (1 - 0.99 * p.contrast / 100);
4455
4455
  for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
@@ -4507,7 +4507,7 @@ function refineSelection(pixels, mask, params = {}) {
4507
4507
  // src/image-editor/layers/serialize.ts
4508
4508
  var LAYERED_SCHEMA_VERSION = 3;
4509
4509
  function serializePatterns(patterns) {
4510
- return patterns.map((p) => ({ id: p.id, name: p.name, png: _chunkT422YCHRcjs.pngDataUrl.call(void 0, p.width, p.height, p.data) }));
4510
+ return patterns.map((p) => ({ id: p.id, name: p.name, png: _chunk4AB5BHYKcjs.pngDataUrl.call(void 0, p.width, p.height, p.data) }));
4511
4511
  }
4512
4512
  function deserializePatterns(raw, problems = []) {
4513
4513
  if (!Array.isArray(raw)) return [];
@@ -4530,7 +4530,7 @@ function encodeSurface(surface) {
4530
4530
  let out = null;
4531
4531
  if (b) {
4532
4532
  const data = _chunkCRMAXIUVcjs.readRegion.call(void 0, surface, b);
4533
- out = { url: _chunkT422YCHRcjs.pngDataUrl.call(void 0, b.width, b.height, data, surface.channels), x: b.x, y: b.y };
4533
+ out = { url: _chunk4AB5BHYKcjs.pngDataUrl.call(void 0, b.width, b.height, data, surface.channels), x: b.x, y: b.y };
4534
4534
  }
4535
4535
  encodedCache.set(surface, out);
4536
4536
  return out;
@@ -4552,7 +4552,7 @@ function baseFields(layer, ctx) {
4552
4552
  function serializeEffects(effects) {
4553
4553
  const out = { enabled: effects.enabled, items: JSON.parse(JSON.stringify(effects.items)) };
4554
4554
  if (effects.scale !== void 0 && effects.scale !== 1) out.scale = effects.scale;
4555
- if (effects.psd) out.psd = { key: effects.psd.key, data: _chunkT422YCHRcjs.bytesToBase64.call(void 0, effects.psd.data) };
4555
+ if (effects.psd) out.psd = { key: effects.psd.key, data: _chunk4AB5BHYKcjs.bytesToBase64.call(void 0, effects.psd.data) };
4556
4556
  return out;
4557
4557
  }
4558
4558
  function deserializeEffects(raw) {
@@ -4562,12 +4562,12 @@ function deserializeEffects(raw) {
4562
4562
  const p = r.psd;
4563
4563
  if (p && typeof p.key === "string" && typeof p.data === "string") {
4564
4564
  try {
4565
- psd = { key: p.key, data: _chunkT422YCHRcjs.base64ToBytes.call(void 0, p.data) };
4565
+ psd = { key: p.key, data: _chunk4AB5BHYKcjs.base64ToBytes.call(void 0, p.data) };
4566
4566
  } catch (e12) {
4567
4567
  psd = void 0;
4568
4568
  }
4569
4569
  }
4570
- return _chunkT422YCHRcjs.normalizeLayerEffects.call(void 0, { ...r, psd });
4570
+ return _chunk4AB5BHYKcjs.normalizeLayerEffects.call(void 0, { ...r, psd });
4571
4571
  }
4572
4572
  function serializeMask(mask, hint, ctx) {
4573
4573
  const out = { defaultValue: mask.defaultValue };
@@ -4639,7 +4639,7 @@ async function serializeLayersExternal(layers, store) {
4639
4639
  for (const [id, url] of Object.entries(inline.assets)) {
4640
4640
  let ref = refs.get(url);
4641
4641
  if (!ref) {
4642
- const parsed = _chunkT422YCHRcjs.parseDataUrl.call(void 0, url);
4642
+ const parsed = _chunk4AB5BHYKcjs.parseDataUrl.call(void 0, url);
4643
4643
  const png = decodePngHeader(parsed.bytes);
4644
4644
  ref = await store.put(new Blob([parsed.bytes], { type: "image/png" }), { id, width: png.width, height: png.height });
4645
4645
  if (typeof ref !== "string" || !ref) throw new Error(`The asset store returned no reference for "${id}".`);
@@ -4667,7 +4667,7 @@ async function resolveExternalAssets(assets, store, problems) {
4667
4667
  try {
4668
4668
  const blob = await store.get(ref);
4669
4669
  const bytes = new Uint8Array(await blob.arrayBuffer());
4670
- out[id] = `data:image/png;base64,${_chunkT422YCHRcjs.bytesToBase64.call(void 0, bytes)}`;
4670
+ out[id] = `data:image/png;base64,${_chunk4AB5BHYKcjs.bytesToBase64.call(void 0, bytes)}`;
4671
4671
  } catch (err) {
4672
4672
  problems.push(`Asset "${id}" (${ref}) could not be fetched: ${err.message}`);
4673
4673
  }
@@ -4675,9 +4675,9 @@ async function resolveExternalAssets(assets, store, problems) {
4675
4675
  return out;
4676
4676
  }
4677
4677
  function decodePngDataUrl(url, channels) {
4678
- const parsed = _chunkT422YCHRcjs.parseDataUrl.call(void 0, url);
4678
+ const parsed = _chunk4AB5BHYKcjs.parseDataUrl.call(void 0, url);
4679
4679
  if (!parsed) throw new Error("Asset is not a data URL.");
4680
- const png = _chunkT422YCHRcjs.decodePng.call(void 0, parsed.bytes, { keepGray: channels === 1 });
4680
+ const png = _chunk4AB5BHYKcjs.decodePng.call(void 0, parsed.bytes, { keepGray: channels === 1 });
4681
4681
  if (png.channels === channels) return png;
4682
4682
  if (channels === 1) {
4683
4683
  const out2 = new Uint8ClampedArray(png.width * png.height);
@@ -4702,8 +4702,8 @@ function readSurface(ref, x, y, channels, defaultValue, ctx, what) {
4702
4702
  return _chunkCRMAXIUVcjs.emptySurface.call(void 0, channels, defaultValue);
4703
4703
  }
4704
4704
  try {
4705
- const px = (_nullishCoalesce(ctx.decodeAsset, () => ( decodePngDataUrl)))(url, channels);
4706
- return _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, px, channels, Math.round(num(x, -1e7, 1e7, 0)), Math.round(num(y, -1e7, 1e7, 0)), defaultValue);
4705
+ const px2 = (_nullishCoalesce(ctx.decodeAsset, () => ( decodePngDataUrl)))(url, channels);
4706
+ return _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, px2, channels, Math.round(num(x, -1e7, 1e7, 0)), Math.round(num(y, -1e7, 1e7, 0)), defaultValue);
4707
4707
  } catch (err) {
4708
4708
  ctx.problems.push(`${what}: asset "${ref}" could not be decoded (${err.message})`);
4709
4709
  return _chunkCRMAXIUVcjs.emptySurface.call(void 0, channels, defaultValue);
@@ -4839,47 +4839,47 @@ var fail = (message) => {
4839
4839
  throw new LayerOperationError(message);
4840
4840
  };
4841
4841
  function requireLayer(layers, id) {
4842
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, layers, id);
4842
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, layers, id);
4843
4843
  if (!loc) {
4844
- const ids = _chunkT422YCHRcjs.flattenLayers.call(void 0, layers).map((l) => l.id);
4844
+ const ids = _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers).map((l) => l.id);
4845
4845
  fail(`Unknown layer "${id}". ${ids.length ? `Layers: ${ids.join(", ")}.` : "The document has no layers."} Call list_layers for ids.`);
4846
4846
  }
4847
4847
  return loc;
4848
4848
  }
4849
4849
  function requireUnlocked(layer, what, action) {
4850
- if (_chunkT422YCHRcjs.isLayerLocked.call(void 0, layer, "all")) fail(`Layer "${layer.name || layer.id}" is locked (all); unlock it before you ${action}.`);
4851
- if (what !== "all" && _chunkT422YCHRcjs.isLayerLocked.call(void 0, layer, what)) fail(`Layer "${layer.name || layer.id}" has its ${what} locked; unlock it before you ${action}.`);
4850
+ if (_chunk4AB5BHYKcjs.isLayerLocked.call(void 0, layer, "all")) fail(`Layer "${layer.name || layer.id}" is locked (all); unlock it before you ${action}.`);
4851
+ if (what !== "all" && _chunk4AB5BHYKcjs.isLayerLocked.call(void 0, layer, what)) fail(`Layer "${layer.name || layer.id}" has its ${what} locked; unlock it before you ${action}.`);
4852
4852
  }
4853
4853
  function placeLayer(layers, layer, placement = {}, defaultIndex) {
4854
4854
  const given = [placement.aboveId, placement.belowId, placement.parentId].filter((v) => v !== void 0).length;
4855
4855
  if (given > 1) fail("Give only one of aboveId, belowId and parentId.");
4856
4856
  if (placement.aboveId || placement.belowId) {
4857
4857
  const ref = requireLayer(layers, _nullishCoalesce(placement.aboveId, () => ( placement.belowId)));
4858
- return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, layer, _nullishCoalesce(_optionalChain([ref, 'access', _79 => _79.parent, 'optionalAccess', _80 => _80.id]), () => ( null)), ref.index + (placement.aboveId ? 1 : 0));
4858
+ return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, layer, _nullishCoalesce(_optionalChain([ref, 'access', _79 => _79.parent, 'optionalAccess', _80 => _80.id]), () => ( null)), ref.index + (placement.aboveId ? 1 : 0));
4859
4859
  }
4860
4860
  if (placement.parentId) {
4861
4861
  const ref = requireLayer(layers, placement.parentId);
4862
4862
  if (ref.layer.type !== "group") fail(`Layer "${placement.parentId}" is not a group; parentId must be a group id.`);
4863
- return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, layer, ref.layer.id, placement.index);
4863
+ return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, layer, ref.layer.id, placement.index);
4864
4864
  }
4865
- return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, layer, null, _nullishCoalesce(placement.index, () => ( defaultIndex)));
4865
+ return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, layer, null, _nullishCoalesce(placement.index, () => ( defaultIndex)));
4866
4866
  }
4867
4867
  function removeLayer(layers, id) {
4868
4868
  const loc = requireLayer(layers, id);
4869
4869
  requireUnlocked(loc.layer, "all", "delete it");
4870
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => null);
4870
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => null);
4871
4871
  }
4872
4872
  function moveLayer(layers, id, placement) {
4873
4873
  const loc = requireLayer(layers, id);
4874
4874
  requireUnlocked(loc.layer, "all", "move it");
4875
4875
  const target = _nullishCoalesce(_nullishCoalesce(placement.aboveId, () => ( placement.belowId)), () => ( placement.parentId));
4876
4876
  if (target === id) fail("A layer cannot be placed relative to itself.");
4877
- if (target && loc.layer.type === "group" && _chunkT422YCHRcjs.flattenLayers.call(void 0, loc.layer.children).some((l) => l.id === target)) {
4877
+ if (target && loc.layer.type === "group" && _chunk4AB5BHYKcjs.flattenLayers.call(void 0, loc.layer.children).some((l) => l.id === target)) {
4878
4878
  fail(`Group "${id}" cannot be moved into its own child "${target}".`);
4879
4879
  }
4880
4880
  if (target) requireLayer(layers, target);
4881
4881
  if (!target && placement.index === void 0) fail("Give aboveId, belowId, parentId or index.");
4882
- const without = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => null);
4882
+ const without = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => null);
4883
4883
  return placeLayer(without, loc.layer, placement);
4884
4884
  }
4885
4885
  function withNewIds(layer) {
@@ -4893,7 +4893,7 @@ function duplicateLayer(layers, id, name) {
4893
4893
  const copy = withNewIds(loc.layer);
4894
4894
  copy.name = _nullishCoalesce(name, () => ( `${loc.layer.name || "Layer"} copy`));
4895
4895
  delete copy.locks;
4896
- return { layers: _chunkT422YCHRcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _81 => _81.parent, 'optionalAccess', _82 => _82.id]), () => ( null)), loc.index + 1), id: copy.id };
4896
+ return { layers: _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _81 => _81.parent, 'optionalAccess', _82 => _82.id]), () => ( null)), loc.index + 1), id: copy.id };
4897
4897
  }
4898
4898
  function setLayerProperties(layers, id, props) {
4899
4899
  const loc = requireLayer(layers, id);
@@ -4940,7 +4940,7 @@ function setLayerProperties(layers, id, props) {
4940
4940
  if (props.collapsed) g.collapsed = true;
4941
4941
  else delete g.collapsed;
4942
4942
  }
4943
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => next);
4943
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => next);
4944
4944
  }
4945
4945
  function groupLayers(layers, ids, name = "Group") {
4946
4946
  if (!ids.length) fail("Give at least one layer id to group.");
@@ -4969,17 +4969,17 @@ function groupLayers(layers, ids, name = "Group") {
4969
4969
  group.children[0] = c;
4970
4970
  }
4971
4971
  let out = layers;
4972
- for (const l of ordered) out = _chunkT422YCHRcjs.mapLayer.call(void 0, out, l.layer.id, () => null);
4973
- return { layers: _chunkT422YCHRcjs.insertLayer.call(void 0, out, group, parent, top - below), id: group.id };
4972
+ for (const l of ordered) out = _chunk4AB5BHYKcjs.mapLayer.call(void 0, out, l.layer.id, () => null);
4973
+ return { layers: _chunk4AB5BHYKcjs.insertLayer.call(void 0, out, group, parent, top - below), id: group.id };
4974
4974
  }
4975
4975
  function ungroupLayer(layers, id) {
4976
4976
  const loc = requireLayer(layers, id);
4977
4977
  if (loc.layer.type !== "group") fail(`Layer "${id}" is not a group.`);
4978
4978
  requireUnlocked(loc.layer, "all", "ungroup it");
4979
4979
  const group = loc.layer;
4980
- let out = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => null);
4980
+ let out = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => null);
4981
4981
  group.children.forEach((c, i) => {
4982
- out = _chunkT422YCHRcjs.insertLayer.call(void 0, out, c, _nullishCoalesce(_optionalChain([loc, 'access', _91 => _91.parent, 'optionalAccess', _92 => _92.id]), () => ( null)), loc.index + i);
4982
+ out = _chunk4AB5BHYKcjs.insertLayer.call(void 0, out, c, _nullishCoalesce(_optionalChain([loc, 'access', _91 => _91.parent, 'optionalAccess', _92 => _92.id]), () => ( null)), loc.index + i);
4983
4983
  });
4984
4984
  return { layers: out, ids: group.children.map((c) => c.id) };
4985
4985
  }
@@ -4989,12 +4989,12 @@ function offsetLayer(layers, id, offset) {
4989
4989
  requireUnlocked(loc.layer, "position", "move it");
4990
4990
  if (!Number.isFinite(offset.x) || !Number.isFinite(offset.y)) fail("x and y must be numbers.");
4991
4991
  const layer = loc.layer;
4992
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, offset: { x: Math.round(offset.x), y: Math.round(offset.y) } }));
4992
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, offset: { x: Math.round(offset.x), y: Math.round(offset.y) } }));
4993
4993
  }
4994
4994
  function setLayerMask(layers, id, mask) {
4995
4995
  const loc = requireLayer(layers, id);
4996
4996
  requireUnlocked(loc.layer, "all", "change its mask");
4997
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, (l) => {
4997
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, (l) => {
4998
4998
  const next = { ...l };
4999
4999
  if (mask) next.mask = mask;
5000
5000
  else delete next.mask;
@@ -5033,7 +5033,7 @@ function requirePixelLayer(layers, id) {
5033
5033
  function addLayerFilter(layers, id, filter) {
5034
5034
  const layer = requirePixelLayer(layers, id);
5035
5035
  if (_optionalChain([layer, 'access', _93 => _93.filters, 'optionalAccess', _94 => _94.some, 'call', _95 => _95((f) => f.kind === filter.kind)])) fail(`Layer "${id}" already has a ${filter.kind} filter; change it with update_layer_filter.`);
5036
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters: [..._nullishCoalesce(layer.filters, () => ( [])), filter] }));
5036
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters: [..._nullishCoalesce(layer.filters, () => ( [])), filter] }));
5037
5037
  }
5038
5038
  function updateLayerFilter(layers, id, filterId, changes) {
5039
5039
  const layer = requirePixelLayer(layers, id);
@@ -5044,7 +5044,7 @@ function updateLayerFilter(layers, id, filterId, changes) {
5044
5044
  const merged = normalizeFilter({ ...current, ...changes, kind: current.kind }, current.id);
5045
5045
  const filters = [...layer.filters];
5046
5046
  filters[i] = merged;
5047
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters }));
5047
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters }));
5048
5048
  }
5049
5049
  function removeLayerFilter(layers, id, filterId) {
5050
5050
  const layer = requirePixelLayer(layers, id);
@@ -5053,7 +5053,7 @@ function removeLayerFilter(layers, id, filterId) {
5053
5053
  const next = { ...layer };
5054
5054
  if (filters.length) next.filters = filters;
5055
5055
  else delete next.filters;
5056
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => next);
5056
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => next);
5057
5057
  }
5058
5058
  function requireEffectLayer(layers, id, action) {
5059
5059
  const layer = requireLayer(layers, id).layer;
@@ -5068,7 +5068,7 @@ function guard(fn) {
5068
5068
  try {
5069
5069
  return fn();
5070
5070
  } catch (e) {
5071
- if (e instanceof _chunkT422YCHRcjs.LayerEffectError) fail(e.message);
5071
+ if (e instanceof _chunk4AB5BHYKcjs.LayerEffectError) fail(e.message);
5072
5072
  throw e;
5073
5073
  }
5074
5074
  }
@@ -5076,20 +5076,20 @@ function setLayerEffects(layers, id, effects) {
5076
5076
  const layer = requireEffectLayer(layers, id, "change its effects");
5077
5077
  const next = { ...layer };
5078
5078
  if (effects && (effects.items.length || effects.psd || effects.scale !== void 0 || !effects.enabled)) {
5079
- guard(() => _chunkT422YCHRcjs.validateLayerEffects.call(void 0, effects));
5079
+ guard(() => _chunk4AB5BHYKcjs.validateLayerEffects.call(void 0, effects));
5080
5080
  next.effects = effects;
5081
5081
  } else delete next.effects;
5082
- return _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => next);
5082
+ return _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => next);
5083
5083
  }
5084
5084
  function addLayerEffect(layers, id, kind, params = {}, index) {
5085
- if (!_chunkT422YCHRcjs.isLayerEffectKind.call(void 0, kind)) fail(`Unknown effect kind "${String(kind)}". Kinds: ${_chunkT422YCHRcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
5085
+ if (!_chunk4AB5BHYKcjs.isLayerEffectKind.call(void 0, kind)) fail(`Unknown effect kind "${String(kind)}". Kinds: ${_chunk4AB5BHYKcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
5086
5086
  const layer = requireEffectLayer(layers, id, "add effects");
5087
5087
  const current = layerEffectsOf(layer);
5088
5088
  const ids = new Set(current.items.map((e) => e.id));
5089
- let effectId = _chunkT422YCHRcjs.newEffectId.call(void 0, );
5090
- while (ids.has(effectId)) effectId = _chunkT422YCHRcjs.newEffectId.call(void 0, );
5089
+ let effectId = _chunk4AB5BHYKcjs.newEffectId.call(void 0, );
5090
+ while (ids.has(effectId)) effectId = _chunk4AB5BHYKcjs.newEffectId.call(void 0, );
5091
5091
  const { id: _ignored, kind: _kind, ...rest } = params;
5092
- const effect = guard(() => _chunkT422YCHRcjs.mergeLayerEffect.call(void 0, _chunkT422YCHRcjs.defaultLayerEffect.call(void 0, kind, effectId), rest));
5092
+ const effect = guard(() => _chunk4AB5BHYKcjs.mergeLayerEffect.call(void 0, _chunk4AB5BHYKcjs.defaultLayerEffect.call(void 0, kind, effectId), rest));
5093
5093
  const items = [...current.items];
5094
5094
  const at = index === void 0 ? items.length : Math.max(0, Math.min(items.length, Math.floor(index)));
5095
5095
  items.splice(at, 0, effect);
@@ -5106,7 +5106,7 @@ function updateLayerEffect(layers, id, effectId, changes) {
5106
5106
  const i = requireEffect(layer, effectId);
5107
5107
  const current = layer.effects;
5108
5108
  const items = [...current.items];
5109
- items[i] = guard(() => _chunkT422YCHRcjs.mergeLayerEffect.call(void 0, items[i], changes));
5109
+ items[i] = guard(() => _chunk4AB5BHYKcjs.mergeLayerEffect.call(void 0, items[i], changes));
5110
5110
  return setLayerEffects(layers, id, { ...current, items });
5111
5111
  }
5112
5112
  function removeLayerEffect(layers, id, effectId) {
@@ -6041,9 +6041,9 @@ function packbitsDecodeInto(src, expected, out, at) {
6041
6041
  function inflateChecked(data, expected) {
6042
6042
  let out;
6043
6043
  try {
6044
- out = _chunkT422YCHRcjs.inflate.call(void 0, data, { maxOutput: expected + (1 << 20), sizeHint: expected, verify: false });
6044
+ out = _chunk4AB5BHYKcjs.inflate.call(void 0, data, { maxOutput: expected + (1 << 20), sizeHint: expected, verify: false });
6045
6045
  } catch (e) {
6046
- throw new PsdError(`ZIP channel data: ${e instanceof _chunkT422YCHRcjs.ZlibError || e instanceof Error ? e.message : String(e)}`);
6046
+ throw new PsdError(`ZIP channel data: ${e instanceof _chunk4AB5BHYKcjs.ZlibError || e instanceof Error ? e.message : String(e)}`);
6047
6047
  }
6048
6048
  if (out.length < expected) throw new PsdError(`ZIP stream produced ${out.length} of ${expected} bytes.`);
6049
6049
  return out.length === expected ? out : out.subarray(0, expected);
@@ -6780,34 +6780,34 @@ function blendOf(d, key, fallback, notes) {
6780
6780
  function colorOf(d, fallback = "#000000") {
6781
6781
  if (!d) return fallback;
6782
6782
  const g = (k) => descNumber(d, k);
6783
- if (g("redFloat") !== void 0) return _chunkT422YCHRcjs.effectColorHex.call(void 0, [g("redFloat"), _nullishCoalesce(g("greenFloat"), () => ( 0)), _nullishCoalesce(g("blueFloat"), () => ( 0))]);
6783
+ if (g("redFloat") !== void 0) return _chunk4AB5BHYKcjs.effectColorHex.call(void 0, [g("redFloat"), _nullishCoalesce(g("greenFloat"), () => ( 0)), _nullishCoalesce(g("blueFloat"), () => ( 0))]);
6784
6784
  switch (d.classId) {
6785
6785
  case "HSBC": {
6786
6786
  const rgb = decodePsdColor(1, [(_nullishCoalesce(g("H "), () => ( 0))) / 360 * 65535, (_nullishCoalesce(g("Strt"), () => ( 0))) / 100 * 65535, (_nullishCoalesce(g("Brgh"), () => ( 0))) / 100 * 65535]);
6787
- return rgb ? _chunkT422YCHRcjs.effectColorHex.call(void 0, rgb) : fallback;
6787
+ return rgb ? _chunk4AB5BHYKcjs.effectColorHex.call(void 0, rgb) : fallback;
6788
6788
  }
6789
6789
  case "CMYC": {
6790
6790
  const inv = (k) => (1 - (_nullishCoalesce(g(k), () => ( 0))) / 100) * 65535;
6791
6791
  const rgb = decodePsdColor(2, [inv("Cyn "), inv("Mgnt"), inv("Ylw "), inv("Blck")]);
6792
- return rgb ? _chunkT422YCHRcjs.effectColorHex.call(void 0, rgb) : fallback;
6792
+ return rgb ? _chunk4AB5BHYKcjs.effectColorHex.call(void 0, rgb) : fallback;
6793
6793
  }
6794
6794
  case "LbCl": {
6795
6795
  const rgb = decodePsdColor(7, [(_nullishCoalesce(g("Lmnc"), () => ( 0))) * 100, Math.round((_nullishCoalesce(g("A "), () => ( 0))) * 100) & 65535, Math.round((_nullishCoalesce(g("B "), () => ( 0))) * 100) & 65535]);
6796
- return rgb ? _chunkT422YCHRcjs.effectColorHex.call(void 0, rgb) : fallback;
6796
+ return rgb ? _chunk4AB5BHYKcjs.effectColorHex.call(void 0, rgb) : fallback;
6797
6797
  }
6798
6798
  case "Grsc": {
6799
6799
  const v = 1 - (_nullishCoalesce(g("Gry "), () => ( 0))) / 100;
6800
- return _chunkT422YCHRcjs.effectColorHex.call(void 0, [v, v, v]);
6800
+ return _chunk4AB5BHYKcjs.effectColorHex.call(void 0, [v, v, v]);
6801
6801
  }
6802
6802
  }
6803
6803
  const r = g("Rd ");
6804
6804
  const gr = g("Grn ");
6805
6805
  const b = g("Bl ");
6806
6806
  if (r === void 0 || gr === void 0 || b === void 0) return fallback;
6807
- return _chunkT422YCHRcjs.effectColorHex.call(void 0, [r / 255, gr / 255, b / 255]);
6807
+ return _chunk4AB5BHYKcjs.effectColorHex.call(void 0, [r / 255, gr / 255, b / 255]);
6808
6808
  }
6809
6809
  function colorDesc(hex) {
6810
- const [r, g, b] = _nullishCoalesce(_chunkT422YCHRcjs.parseEffectColor.call(void 0, hex), () => ( [0, 0, 0]));
6810
+ const [r, g, b] = _nullishCoalesce(_chunk4AB5BHYKcjs.parseEffectColor.call(void 0, hex), () => ( [0, 0, 0]));
6811
6811
  return descriptor("RGBC", [
6812
6812
  ["Rd ", dbl(r * 255)],
6813
6813
  ["Grn ", dbl(g * 255)],
@@ -6890,9 +6890,9 @@ function gradientOf(d, notes) {
6890
6890
  raw.forEach((s, i) => {
6891
6891
  if (i > 0 && Math.abs(s.mid - 0.5) > 1e-3) {
6892
6892
  const a = raw[i - 1];
6893
- const ca = _chunkT422YCHRcjs.parseEffectColor.call(void 0, a.color);
6894
- const cb = _chunkT422YCHRcjs.parseEffectColor.call(void 0, s.color);
6895
- stops.push({ position: a.position + (s.position - a.position) * s.mid, color: _chunkT422YCHRcjs.effectColorHex.call(void 0, ca.map((v, k) => (v + cb[k]) / 2)) });
6893
+ const ca = _chunk4AB5BHYKcjs.parseEffectColor.call(void 0, a.color);
6894
+ const cb = _chunk4AB5BHYKcjs.parseEffectColor.call(void 0, s.color);
6895
+ stops.push({ position: a.position + (s.position - a.position) * s.mid, color: _chunk4AB5BHYKcjs.effectColorHex.call(void 0, ca.map((v, k) => (v + cb[k]) / 2)) });
6896
6896
  notes.add("gradient midpoints are drawn as straight segments");
6897
6897
  }
6898
6898
  stops.push({ position: s.position, color: s.color });
@@ -7004,8 +7004,8 @@ var KINDS = [
7004
7004
  ["FrFX", "frameFXMulti", "stroke"]
7005
7005
  ];
7006
7006
  function common(d, kind, notes) {
7007
- const def = _chunkT422YCHRcjs.defaultLayerEffect.call(void 0, kind, "x");
7008
- return { id: _chunkT422YCHRcjs.newEffectId.call(void 0, ), enabled: descBool(d, "enab") !== false, blend: blendOf(d, "Md ", def.blend, notes), opacity: clamp3(pct(d, "Opct", def.opacity), 0, 1) };
7007
+ const def = _chunk4AB5BHYKcjs.defaultLayerEffect.call(void 0, kind, "x");
7008
+ return { id: _chunk4AB5BHYKcjs.newEffectId.call(void 0, ), enabled: descBool(d, "enab") !== false, blend: blendOf(d, "Md ", def.blend, notes), opacity: clamp3(pct(d, "Opct", def.opacity), 0, 1) };
7009
7009
  }
7010
7010
  function readOne(kind, d, notes) {
7011
7011
  const size = (key, fallback) => clamp3(num2(d, key, fallback), 0, 250);
@@ -7048,7 +7048,7 @@ function readOne(kind, d, notes) {
7048
7048
  case "bevel-emboss": {
7049
7049
  const styles = { OtrB: "outer-bevel", InrB: "inner-bevel", Embs: "emboss", PlEb: "pillow-emboss", strokeEmboss: "stroke-emboss" };
7050
7050
  const out = {
7051
- id: _chunkT422YCHRcjs.newEffectId.call(void 0, ),
7051
+ id: _chunk4AB5BHYKcjs.newEffectId.call(void 0, ),
7052
7052
  enabled: descBool(d, "enab") !== false,
7053
7053
  kind,
7054
7054
  style: _nullishCoalesce(styles[_nullishCoalesce(enumOf(d, "bvlS"), () => ( ""))], () => ( "inner-bevel")),
@@ -7259,10 +7259,10 @@ function writeLfx2(effects) {
7259
7259
  ["Scl ", unit("#Prc", 100)],
7260
7260
  ["masterFXSwitch", boolV(effects.enabled)]
7261
7261
  ];
7262
- const scale = _chunkT422YCHRcjs.effectsScale.call(void 0, effects);
7262
+ const scale = _chunk4AB5BHYKcjs.effectsScale.call(void 0, effects);
7263
7263
  let dropped = 0;
7264
7264
  for (const [single, multi, kind] of KINDS) {
7265
- const of = effects.items.filter((e) => e.kind === kind).map((e) => writeOne(_chunkT422YCHRcjs.scaleLayerEffect.call(void 0, e, scale)));
7265
+ const of = effects.items.filter((e) => e.kind === kind).map((e) => writeOne(_chunk4AB5BHYKcjs.scaleLayerEffect.call(void 0, e, scale)));
7266
7266
  if (!of.length) continue;
7267
7267
  if (of.length === 1) items.push([single, obj(of[0])]);
7268
7268
  else if (multi) items.push([multi, { type: "VlLs", items: of.map(obj) }]);
@@ -7294,7 +7294,7 @@ function parseLrfx(data) {
7294
7294
  const colorAt = (rd) => {
7295
7295
  rd.u16();
7296
7296
  const c = [rd.u16(), rd.u16(), rd.u16(), rd.u16()];
7297
- return _chunkT422YCHRcjs.effectColorHex.call(void 0, [c[0] >> 8, c[1] >> 8, c[2] >> 8].map((v) => v / 255));
7297
+ return _chunk4AB5BHYKcjs.effectColorHex.call(void 0, [c[0] >> 8, c[1] >> 8, c[2] >> 8].map((v) => v / 255));
7298
7298
  };
7299
7299
  const blendAt = (rd) => {
7300
7300
  rd.skip(4);
@@ -7313,7 +7313,7 @@ function parseLrfx(data) {
7313
7313
  const enabled = b.u8() !== 0;
7314
7314
  const useGlobalLight = b.u8() !== 0;
7315
7315
  const opacity = b.u8() / 255;
7316
- const base = { id: _chunkT422YCHRcjs.newEffectId.call(void 0, ), enabled, blend, opacity, color, angle, useGlobalLight, distance: clamp3(distance, 0, 3e4), size: clamp3(blur, 0, 250), antiAlias: false, noise: 0 };
7316
+ const base = { id: _chunk4AB5BHYKcjs.newEffectId.call(void 0, ), enabled, blend, opacity, color, angle, useGlobalLight, distance: clamp3(distance, 0, 3e4), size: clamp3(blur, 0, 250), antiAlias: false, noise: 0 };
7317
7317
  items.push(key === "dsdw" ? { ...base, kind: "drop-shadow", spread: 0, knocksOut: true } : { ...base, kind: "inner-shadow", choke: 0 });
7318
7318
  } else if (key === "oglw" || key === "iglw") {
7319
7319
  b.u32();
@@ -7323,7 +7323,7 @@ function parseLrfx(data) {
7323
7323
  const blend = blendAt(b);
7324
7324
  const enabled = b.u8() !== 0;
7325
7325
  const opacity = b.u8() / 255;
7326
- const base = { id: _chunkT422YCHRcjs.newEffectId.call(void 0, ), enabled, blend, opacity, fill: { type: "color", color }, technique: "softer", size: clamp3(blur, 0, 250), antiAlias: false, range: 0.5, jitter: 0, noise: 0 };
7326
+ const base = { id: _chunk4AB5BHYKcjs.newEffectId.call(void 0, ), enabled, blend, opacity, fill: { type: "color", color }, technique: "softer", size: clamp3(blur, 0, 250), antiAlias: false, range: 0.5, jitter: 0, noise: 0 };
7327
7327
  items.push(key === "oglw" ? { ...base, kind: "outer-glow", spread: 0 } : { ...base, kind: "inner-glow", choke: 0, source: "edge" });
7328
7328
  } else if (key === "sofi") {
7329
7329
  b.u32();
@@ -7331,7 +7331,7 @@ function parseLrfx(data) {
7331
7331
  const color = colorAt(b);
7332
7332
  const opacity = b.u8() / 255;
7333
7333
  const enabled = b.u8() !== 0;
7334
- items.push({ id: _chunkT422YCHRcjs.newEffectId.call(void 0, ), kind: "color-overlay", enabled, blend, opacity, color });
7334
+ items.push({ id: _chunk4AB5BHYKcjs.newEffectId.call(void 0, ), kind: "color-overlay", enabled, blend, opacity, color });
7335
7335
  } else if (key === "bevl") notes.add("legacy bevels are not read");
7336
7336
  }
7337
7337
  return { effects: { enabled: true, items }, notes: [...notes] };
@@ -7657,7 +7657,7 @@ function recordEffects(ctx, rec, name, notes, group) {
7657
7657
  }
7658
7658
  for (const e of parsed.effects.items) {
7659
7659
  for (const id of patternIds(e)) {
7660
- if (ctx.patterns.has(id) || _chunkT422YCHRcjs.builtinPattern.call(void 0, id)) continue;
7660
+ if (ctx.patterns.has(id) || _chunk4AB5BHYKcjs.builtinPattern.call(void 0, id)) continue;
7661
7661
  ctx.warn.add("A pattern effect uses a pattern the file does not contain, and paints nothing", name);
7662
7662
  notes.push(`pattern "${id}" is not in the file`);
7663
7663
  }
@@ -7919,7 +7919,7 @@ function exportPsd(input) {
7919
7919
  const key = layer.type === "group" ? "lfxs" : "lfx2";
7920
7920
  if (fx.psd) {
7921
7921
  const original = parseLfx2(fx.psd.data);
7922
- if (original ? _chunkT422YCHRcjs.effectsFingerprint.call(void 0, original.effects) === _chunkT422YCHRcjs.effectsFingerprint.call(void 0, fx) : !fx.items.length) return { key, data: padEven(fx.psd.data) };
7922
+ if (original ? _chunk4AB5BHYKcjs.effectsFingerprint.call(void 0, original.effects) === _chunk4AB5BHYKcjs.effectsFingerprint.call(void 0, fx) : !fx.items.length) return { key, data: padEven(fx.psd.data) };
7923
7923
  }
7924
7924
  if (!fx.items.length && fx.enabled && (_nullishCoalesce(fx.scale, () => ( 1))) === 1) return null;
7925
7925
  const { data, dropped } = writeLfx2(fx);
@@ -8064,7 +8064,7 @@ function exportPsd(input) {
8064
8064
  const byId = new Map((_nullishCoalesce(input.patterns, () => ( []))).map((p) => [p.id, p]));
8065
8065
  const embed = [];
8066
8066
  for (const id of patternIds2) {
8067
- const p = _nullishCoalesce(byId.get(id), () => ( _chunkT422YCHRcjs.builtinPattern.call(void 0, id)));
8067
+ const p = _nullishCoalesce(byId.get(id), () => ( _chunk4AB5BHYKcjs.builtinPattern.call(void 0, id)));
8068
8068
  if (p) embed.push(p);
8069
8069
  else note(`Pattern "${id}" is not in the document and was not embedded`, id);
8070
8070
  }
@@ -8664,7 +8664,7 @@ var ImageEditorController = (_class7 = class {
8664
8664
  return this.state.layers;
8665
8665
  }
8666
8666
  getLayer(id) {
8667
- return _optionalChain([_chunkT422YCHRcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _167 => _167.layer]);
8667
+ return _optionalChain([_chunk4AB5BHYKcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _167 => _167.layer]);
8668
8668
  }
8669
8669
  /** The active layer, or `undefined`. */
8670
8670
  getActiveLayer() {
@@ -8723,7 +8723,7 @@ var ImageEditorController = (_class7 = class {
8723
8723
  let layers = this.state.layers;
8724
8724
  if (options.layerIds) {
8725
8725
  const keep = new Set(options.layerIds);
8726
- layers = _chunkT422YCHRcjs.flattenLayers.call(void 0, layers).filter((l) => keep.has(l.id) && l.type !== "group");
8726
+ layers = _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers).filter((l) => keep.has(l.id) && l.type !== "group");
8727
8727
  }
8728
8728
  const data = this.compositor.composite(layers, r, this.compositorSources());
8729
8729
  return { width: r.width, height: r.height, data };
@@ -8763,17 +8763,17 @@ var ImageEditorController = (_class7 = class {
8763
8763
  */
8764
8764
  sourceSurface() {
8765
8765
  const { width, height } = this.naturalSize;
8766
- const fromPixels = (px2) => {
8767
- let s = this.sourceSurfaces.get(px2);
8766
+ const fromPixels = (px3) => {
8767
+ let s = this.sourceSurfaces.get(px3);
8768
8768
  if (!s) {
8769
- s = _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, px2, 4);
8770
- this.sourceSurfaces.set(px2, s);
8769
+ s = _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, px3, 4);
8770
+ this.sourceSurfaces.set(px3, s);
8771
8771
  }
8772
8772
  return s;
8773
8773
  };
8774
- const px = this.samplePixels;
8775
- const fits = Boolean(px && px.width === width && px.height === height);
8776
- if (this.samplePixelsOverride && fits) return fromPixels(px);
8774
+ const px2 = this.samplePixels;
8775
+ const fits = Boolean(px2 && px2.width === width && px2.height === height);
8776
+ if (this.samplePixelsOverride && fits) return fromPixels(px2);
8777
8777
  const el = this.imageElement;
8778
8778
  if (el) {
8779
8779
  const cached = this.sourceSurfaces.get(el);
@@ -8787,7 +8787,7 @@ var ImageEditorController = (_class7 = class {
8787
8787
  return s;
8788
8788
  }
8789
8789
  }
8790
- return fits ? fromPixels(px) : null;
8790
+ return fits ? fromPixels(px2) : null;
8791
8791
  }
8792
8792
  __init48() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
8793
8793
  /** Whether every source pixel is opaque (some legacy renders depend on it). */
@@ -8825,7 +8825,7 @@ var ImageEditorController = (_class7 = class {
8825
8825
  if (commitToHistory) this.recordHistory();
8826
8826
  this.state.layers = next;
8827
8827
  _optionalChain([extra, 'optionalCall', _174 => _174()]);
8828
- if (this.state.activeLayerId && !_chunkT422YCHRcjs.findLayer.call(void 0, next, this.state.activeLayerId)) {
8828
+ if (this.state.activeLayerId && !_chunk4AB5BHYKcjs.findLayer.call(void 0, next, this.state.activeLayerId)) {
8829
8829
  this.state.activeLayerId = null;
8830
8830
  this.state.activeTarget = "pixels";
8831
8831
  }
@@ -8834,7 +8834,7 @@ var ImageEditorController = (_class7 = class {
8834
8834
  /** The default position of a new layer: above the active layer, else the top of the stack. */
8835
8835
  newLayerPlacement(placement) {
8836
8836
  if (placement.aboveId || placement.belowId || placement.parentId || placement.index !== void 0) return placement;
8837
- const active = this.state.activeLayerId ? _chunkT422YCHRcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId) : null;
8837
+ const active = this.state.activeLayerId ? _chunk4AB5BHYKcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId) : null;
8838
8838
  return active ? { aboveId: active.layer.id } : {};
8839
8839
  }
8840
8840
  /**
@@ -8846,18 +8846,18 @@ var ImageEditorController = (_class7 = class {
8846
8846
  const { width, height } = this.naturalSize;
8847
8847
  let surface = _chunkCRMAXIUVcjs.emptySurface.call(void 0, 4);
8848
8848
  if (init.pixels) {
8849
- const px = init.pixels;
8850
- if (!(px.width > 0 && px.height > 0) || px.data.length < px.width * px.height * 4) {
8849
+ const px2 = init.pixels;
8850
+ if (!(px2.width > 0 && px2.height > 0) || px2.data.length < px2.width * px2.height * 4) {
8851
8851
  throw new LayerOperationError("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
8852
8852
  }
8853
- surface = _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, px, 4);
8853
+ surface = _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, px2, 4);
8854
8854
  } else if (init.color !== void 0) {
8855
8855
  const c = parseColor(init.color);
8856
8856
  surface = _chunkCRMAXIUVcjs.solidSurface.call(void 0, 4, { x: 0, y: 0, width, height }, _chunkCRMAXIUVcjs.packRgba.call(void 0, c[0], c[1], c[2], c[3]));
8857
8857
  }
8858
8858
  const blend = parseBlend(init.blend);
8859
8859
  if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new LayerOperationError("opacity must be from 0 to 1.");
8860
- const ids = new Set(_chunkT422YCHRcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
8860
+ const ids = new Set(_chunk4AB5BHYKcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
8861
8861
  const layer = {
8862
8862
  type: "pixel",
8863
8863
  id: init.id && !ids.has(init.id) ? init.id : newLayerId(),
@@ -8888,23 +8888,23 @@ var ImageEditorController = (_class7 = class {
8888
8888
  async decodeImage(image) {
8889
8889
  const trimmed = image.trim();
8890
8890
  let png = null;
8891
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkT422YCHRcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _178 => _178.bytes]), () => ( null));
8891
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunk4AB5BHYKcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _178 => _178.bytes]), () => ( null));
8892
8892
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
8893
8893
  try {
8894
- const bytes = _chunkT422YCHRcjs.base64ToBytes.call(void 0, trimmed);
8895
- if (_chunkT422YCHRcjs.isPng.call(void 0, bytes)) png = bytes;
8894
+ const bytes = _chunk4AB5BHYKcjs.base64ToBytes.call(void 0, trimmed);
8895
+ if (_chunk4AB5BHYKcjs.isPng.call(void 0, bytes)) png = bytes;
8896
8896
  } catch (e22) {
8897
8897
  png = null;
8898
8898
  }
8899
8899
  }
8900
8900
  if (png) {
8901
8901
  try {
8902
- const d = _chunkT422YCHRcjs.decodePng.call(void 0, png);
8902
+ const d = _chunk4AB5BHYKcjs.decodePng.call(void 0, png);
8903
8903
  return { width: d.width, height: d.height, data: d.data };
8904
8904
  } catch (e23) {
8905
8905
  }
8906
8906
  }
8907
- const src = png ? `data:image/png;base64,${_chunkT422YCHRcjs.bytesToBase64.call(void 0, png)}` : trimmed;
8907
+ const src = png ? `data:image/png;base64,${_chunk4AB5BHYKcjs.bytesToBase64.call(void 0, png)}` : trimmed;
8908
8908
  let img;
8909
8909
  try {
8910
8910
  img = await this.renderer.imageCache.get(src);
@@ -8920,7 +8920,7 @@ var ImageEditorController = (_class7 = class {
8920
8920
  return { width: w, height: h, data: data.data };
8921
8921
  }
8922
8922
  nextLayerName() {
8923
- const names = new Set(_chunkT422YCHRcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.name));
8923
+ const names = new Set(_chunk4AB5BHYKcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.name));
8924
8924
  let n = 1;
8925
8925
  while (names.has(`Layer ${n}`)) n++;
8926
8926
  return `Layer ${n}`;
@@ -8937,7 +8937,7 @@ var ImageEditorController = (_class7 = class {
8937
8937
  removeLayer(id) {
8938
8938
  const next = removeLayer(this.state.layers, id);
8939
8939
  this.commitLayers(next, () => {
8940
- if (this.state.selectedAnnotationId && !_chunkT422YCHRcjs.flattenLayers.call(void 0, next).some((l) => l.type === "annotation" && l.annotation.id === this.state.selectedAnnotationId)) {
8940
+ if (this.state.selectedAnnotationId && !_chunk4AB5BHYKcjs.flattenLayers.call(void 0, next).some((l) => l.type === "annotation" && l.annotation.id === this.state.selectedAnnotationId)) {
8941
8941
  this.state.selectedAnnotationId = null;
8942
8942
  }
8943
8943
  });
@@ -8945,7 +8945,7 @@ var ImageEditorController = (_class7 = class {
8945
8945
  /** Moves a layer above / below another, or into a group, as one undo step. Returns its new parent and index. */
8946
8946
  moveLayer(id, placement) {
8947
8947
  const next = moveLayer(this.state.layers, id, placement);
8948
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, next, id);
8948
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, next, id);
8949
8949
  if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _179 => _179.parent, 'optionalAccess', _180 => _180.id]), () => ( null)), index: loc.index };
8950
8950
  this.commitLayers(next);
8951
8951
  return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _181 => _181.parent, 'optionalAccess', _182 => _182.id]), () => ( null)), index: loc.index };
@@ -8957,7 +8957,7 @@ var ImageEditorController = (_class7 = class {
8957
8957
  setLayerProperties(id, props, commitToHistory = true) {
8958
8958
  const next = setLayerProperties(this.state.layers, id, props);
8959
8959
  this.commitLayers(next, void 0, commitToHistory);
8960
- return _chunkT422YCHRcjs.findLayer.call(void 0, next, id).layer;
8960
+ return _chunk4AB5BHYKcjs.findLayer.call(void 0, next, id).layer;
8961
8961
  }
8962
8962
  /** Adds an empty pass-through group above the active layer (or at `placement`) and makes it active. Returns its id. */
8963
8963
  addGroup(init = {}) {
@@ -9078,7 +9078,7 @@ var ImageEditorController = (_class7 = class {
9078
9078
  const next = { ...layer, surface: out };
9079
9079
  delete next.mask;
9080
9080
  delete next.source;
9081
- this.commitLayers(_chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, id, () => next), () => {
9081
+ this.commitLayers(_chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, id, () => next), () => {
9082
9082
  if (this.state.activeLayerId === id) this.state.activeTarget = "pixels";
9083
9083
  });
9084
9084
  }
@@ -9098,14 +9098,14 @@ var ImageEditorController = (_class7 = class {
9098
9098
  const surface = this.surfaceOf(layer);
9099
9099
  const sb = sel.bounds;
9100
9100
  const src = { x: sb.x - layer.offset.x, y: sb.y - layer.offset.y, width: sb.width, height: sb.height };
9101
- const px = _chunkCRMAXIUVcjs.readRegion.call(void 0, surface, src);
9102
- const kept = options.cut ? new Uint8ClampedArray(px) : null;
9101
+ const px2 = _chunkCRMAXIUVcjs.readRegion.call(void 0, surface, src);
9102
+ const kept = options.cut ? new Uint8ClampedArray(px2) : null;
9103
9103
  for (let y = 0; y < sb.height; y++) {
9104
9104
  for (let x = 0; x < sb.width; x++) {
9105
9105
  const c = sel.data[(sb.y + y) * sel.width + sb.x + x];
9106
9106
  const i = (y * sb.width + x) * 4 + 3;
9107
9107
  if (kept) kept[i] = Math.round(kept[i] * (1 - c / 255));
9108
- px[i] = Math.round(px[i] * (c / 255));
9108
+ px2[i] = Math.round(px2[i] * (c / 255));
9109
9109
  }
9110
9110
  }
9111
9111
  const copy = {
@@ -9115,14 +9115,14 @@ var ImageEditorController = (_class7 = class {
9115
9115
  visible: true,
9116
9116
  opacity: 1,
9117
9117
  blend: "normal",
9118
- surface: _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px }, 4, src.x, src.y),
9118
+ surface: _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
9119
9119
  offset: { ...layer.offset }
9120
9120
  };
9121
- let next = _chunkT422YCHRcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _191 => _191.parent, 'optionalAccess', _192 => _192.id]), () => ( null)), loc.index + 1);
9121
+ let next = _chunk4AB5BHYKcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _191 => _191.parent, 'optionalAccess', _192 => _192.id]), () => ( null)), loc.index + 1);
9122
9122
  if (kept) {
9123
9123
  const cutLayer = { ...layer, surface: _chunkCRMAXIUVcjs.writeRegion.call(void 0, surface, src, kept) };
9124
9124
  delete cutLayer.source;
9125
- next = _chunkT422YCHRcjs.mapLayer.call(void 0, next, id, () => cutLayer);
9125
+ next = _chunk4AB5BHYKcjs.mapLayer.call(void 0, next, id, () => cutLayer);
9126
9126
  }
9127
9127
  this.commitLayers(next, () => {
9128
9128
  this.state.activeLayerId = copy.id;
@@ -9135,19 +9135,19 @@ var ImageEditorController = (_class7 = class {
9135
9135
  const f = normalizeFilter(filter);
9136
9136
  const next = addLayerFilter(this.state.layers, id, f);
9137
9137
  this.commitLayers(next);
9138
- return _nullishCoalesce(_chunkT422YCHRcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
9138
+ return _nullishCoalesce(_chunk4AB5BHYKcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
9139
9139
  }
9140
9140
  /** Changes one filter (one undo step, or none with `commitToHistory = false` during a drag). Returns the filters. */
9141
9141
  updateLayerFilter(id, filterId, changes, commitToHistory = true) {
9142
9142
  const next = updateLayerFilter(this.state.layers, id, filterId, changes);
9143
9143
  this.commitLayers(next, void 0, commitToHistory);
9144
- return _nullishCoalesce(_chunkT422YCHRcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
9144
+ return _nullishCoalesce(_chunk4AB5BHYKcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
9145
9145
  }
9146
9146
  /** Removes one filter (one undo step). Returns the remaining filters. */
9147
9147
  removeLayerFilter(id, filterId) {
9148
9148
  const next = removeLayerFilter(this.state.layers, id, filterId);
9149
9149
  this.commitLayers(next);
9150
- return _nullishCoalesce(_chunkT422YCHRcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
9150
+ return _nullishCoalesce(_chunk4AB5BHYKcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
9151
9151
  }
9152
9152
  // --- Layer effects ---
9153
9153
  /** A layer's effects (an empty, enabled list when it has none). */
@@ -9201,7 +9201,7 @@ var ImageEditorController = (_class7 = class {
9201
9201
  }
9202
9202
  /** The light effects with "use global light" follow. */
9203
9203
  getGlobalLight() {
9204
- return { ..._nullishCoalesce(this.state.globalLight, () => ( _chunkT422YCHRcjs.DEFAULT_GLOBAL_LIGHT)) };
9204
+ return { ..._nullishCoalesce(this.state.globalLight, () => ( _chunk4AB5BHYKcjs.DEFAULT_GLOBAL_LIGHT)) };
9205
9205
  }
9206
9206
  /** Sets the global light (one undo step). `angle` -360..360°, `altitude` 0..90°. Returns it. */
9207
9207
  setGlobalLight(light, commitToHistory = true) {
@@ -9209,7 +9209,7 @@ var ImageEditorController = (_class7 = class {
9209
9209
  if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new LayerOperationError(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
9210
9210
  if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new LayerOperationError(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
9211
9211
  if (commitToHistory) this.recordHistory();
9212
- if (next.angle === _chunkT422YCHRcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunkT422YCHRcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
9212
+ if (next.angle === _chunk4AB5BHYKcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunk4AB5BHYKcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
9213
9213
  else this.state.globalLight = next;
9214
9214
  this.notify();
9215
9215
  return this.getGlobalLight();
@@ -9217,7 +9217,7 @@ var ImageEditorController = (_class7 = class {
9217
9217
  /** Composites `layers` (in isolation) over `rect` into a surface, loading depth maps first. */
9218
9218
  async compositeToSurface(layers, rect) {
9219
9219
  const { width, height } = this.naturalSize;
9220
- if (_chunkT422YCHRcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
9220
+ if (_chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
9221
9221
  throw new LayerOperationError("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
9222
9222
  }
9223
9223
  await this.renderer.prepareLayerAssets(layers, width, height);
@@ -9257,7 +9257,7 @@ var ImageEditorController = (_class7 = class {
9257
9257
  requireUnlocked(upper, "all", "merge it");
9258
9258
  requireUnlocked(lower, "pixels", "merge into it");
9259
9259
  let rect = _nullishCoalesce(unionRect(this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
9260
- const reach = Math.max(_chunkT422YCHRcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunkT422YCHRcjs.effectsMargin.call(void 0, upper.effects));
9260
+ const reach = Math.max(_chunk4AB5BHYKcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunk4AB5BHYKcjs.effectsMargin.call(void 0, upper.effects));
9261
9261
  if (reach) rect = { x: rect.x - reach, y: rect.y - reach, width: rect.width + 2 * reach, height: rect.height + 2 * reach };
9262
9262
  const base = { ...lower, blend: "normal", opacity: 1 };
9263
9263
  delete base.clipped;
@@ -9268,8 +9268,8 @@ var ImageEditorController = (_class7 = class {
9268
9268
  delete merged.filters;
9269
9269
  delete merged.source;
9270
9270
  delete merged.effects;
9271
- let next = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, id, () => null);
9272
- next = _chunkT422YCHRcjs.mapLayer.call(void 0, next, lower.id, () => merged);
9271
+ let next = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, id, () => null);
9272
+ next = _chunk4AB5BHYKcjs.mapLayer.call(void 0, next, lower.id, () => merged);
9273
9273
  this.commitLayers(next, () => {
9274
9274
  this.state.activeLayerId = merged.id;
9275
9275
  this.state.activeTarget = "pixels";
@@ -9495,12 +9495,12 @@ var ImageEditorController = (_class7 = class {
9495
9495
  }
9496
9496
  /** @internal Shows a stroke's live surface (no history). */
9497
9497
  _strokeUpdate(layerId, channel, surface, rects) {
9498
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => this.withSurface(l, channel, surface));
9498
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => this.withSurface(l, channel, surface));
9499
9499
  this.notify(rects);
9500
9500
  }
9501
9501
  /** @internal Commits a finished stroke as one undo step (`before` is the pre-stroke state). */
9502
9502
  _strokeCommit(before, layerId, channel, surface) {
9503
- if (surface) this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => this.withSurface(l, channel, surface));
9503
+ if (surface) this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => this.withSurface(l, channel, surface));
9504
9504
  else this.state.layers = before.layers;
9505
9505
  if (surface && !this.isApplyingHistory) {
9506
9506
  this.undoStack.push(before);
@@ -9577,7 +9577,7 @@ var ImageEditorController = (_class7 = class {
9577
9577
  offset: target.offset
9578
9578
  };
9579
9579
  const surface = paintCoverageInto(target.surface, coverage, apply, [region]);
9580
- const next = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => this.withSurface(l, target.channel, surface));
9580
+ const next = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => this.withSurface(l, target.channel, surface));
9581
9581
  this.commitLayers(next);
9582
9582
  return { layerId: target.id, channel: target.channel, bounds: region, dabs: 0 };
9583
9583
  }
@@ -9599,12 +9599,12 @@ var ImageEditorController = (_class7 = class {
9599
9599
  const target = this.developLayer();
9600
9600
  let layers = this.state.layers;
9601
9601
  if (target && (DEVELOP_KEYS.some((k) => k in partial) || "process" in partial)) {
9602
- layers = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, target.id, (l) => withDevelop(l, partial));
9602
+ layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, target.id, (l) => withDevelop(l, partial));
9603
9603
  }
9604
9604
  if ("blur" in partial && typeof partial.blur === "number") {
9605
9605
  const blur = Math.max(0, partial.blur);
9606
9606
  if (this.state.legacyOutputBlur !== void 0) this.state.legacyOutputBlur = blur;
9607
- else if (target) layers = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, target.id, (l) => withBlur(l, blur));
9607
+ else if (target) layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, target.id, (l) => withBlur(l, blur));
9608
9608
  }
9609
9609
  if ("opacity" in partial && typeof partial.opacity === "number") {
9610
9610
  this.state.outputOpacity = Math.min(1, Math.max(0, partial.opacity));
@@ -9634,7 +9634,7 @@ var ImageEditorController = (_class7 = class {
9634
9634
  this.recordHistory();
9635
9635
  const target = this.developLayer();
9636
9636
  if (target) {
9637
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0,
9637
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0,
9638
9638
  this.state.layers,
9639
9639
  target.id,
9640
9640
  (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: LATEST_PROCESS_VERSION }), 0)
@@ -9654,7 +9654,7 @@ var ImageEditorController = (_class7 = class {
9654
9654
  return this.getAdjustmentLayers().find((l) => l.id === id);
9655
9655
  }
9656
9656
  adjustmentNodes(layers = this.state.layers) {
9657
- return _chunkT422YCHRcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "adjustment");
9657
+ return _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "adjustment");
9658
9658
  }
9659
9659
  /**
9660
9660
  * Where a new layer goes when no position is given: directly above the topmost layer that is
@@ -9668,26 +9668,26 @@ var ImageEditorController = (_class7 = class {
9668
9668
  /** Inserts `node` by `aboveId` / `parentId` / adjustment index / default position. */
9669
9669
  placeLayer(layers, node, where) {
9670
9670
  if (where.aboveId) {
9671
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, layers, where.aboveId);
9672
- if (loc) return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _206 => _206.parent, 'optionalAccess', _207 => _207.id]), () => ( null)), loc.index + 1);
9671
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, layers, where.aboveId);
9672
+ if (loc) return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _206 => _206.parent, 'optionalAccess', _207 => _207.id]), () => ( null)), loc.index + 1);
9673
9673
  }
9674
9674
  if (where.parentId) {
9675
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, layers, where.parentId);
9676
- if (loc && loc.layer.type === "group") return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, node, loc.layer.id);
9675
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, layers, where.parentId);
9676
+ if (loc && loc.layer.type === "group") return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, node, loc.layer.id);
9677
9677
  }
9678
9678
  if (where.adjustmentIndex !== void 0) {
9679
9679
  const nodes = this.adjustmentNodes(layers);
9680
9680
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
9681
9681
  if (at < nodes.length) {
9682
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, layers, nodes[at].id);
9683
- return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _208 => _208.parent, 'optionalAccess', _209 => _209.id]), () => ( null)), loc.index);
9682
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, layers, nodes[at].id);
9683
+ return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _208 => _208.parent, 'optionalAccess', _209 => _209.id]), () => ( null)), loc.index);
9684
9684
  }
9685
9685
  if (nodes.length) {
9686
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
9687
- return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _210 => _210.parent, 'optionalAccess', _211 => _211.id]), () => ( null)), loc.index + 1);
9686
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
9687
+ return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _210 => _210.parent, 'optionalAccess', _211 => _211.id]), () => ( null)), loc.index + 1);
9688
9688
  }
9689
9689
  }
9690
- return _chunkT422YCHRcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
9690
+ return _chunk4AB5BHYKcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
9691
9691
  }
9692
9692
  /** `setAdjustments({ layers })`: updates nodes by id in place, removes missing ones, adds new ones. */
9693
9693
  replaceAdjustmentNodes(layers, next) {
@@ -9696,7 +9696,7 @@ var ImageEditorController = (_class7 = class {
9696
9696
  let out = layers;
9697
9697
  for (const node of this.adjustmentNodes(layers)) {
9698
9698
  const update = byId.get(node.id);
9699
- out = _chunkT422YCHRcjs.mapLayer.call(void 0, out, node.id, () => update ? mergeAdjustmentNode(node, update, width, height) : null);
9699
+ out = _chunk4AB5BHYKcjs.mapLayer.call(void 0, out, node.id, () => update ? mergeAdjustmentNode(node, update, width, height) : null);
9700
9700
  }
9701
9701
  const existing = new Set(this.adjustmentNodes(out).map((n) => n.id));
9702
9702
  for (const l of next) {
@@ -9715,7 +9715,7 @@ var ImageEditorController = (_class7 = class {
9715
9715
  */
9716
9716
  addAdjustmentLayer(init, index) {
9717
9717
  const spec = typeof init === "string" ? { kind: init } : init;
9718
- const ids = new Set(_chunkT422YCHRcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
9718
+ const ids = new Set(_chunk4AB5BHYKcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
9719
9719
  const layer = createAdjustmentLayer(spec.kind, {
9720
9720
  id: spec.id && !ids.has(spec.id) ? spec.id : void 0,
9721
9721
  name: spec.name,
@@ -9744,7 +9744,7 @@ var ImageEditorController = (_class7 = class {
9744
9744
  * Returns false for an unknown id.
9745
9745
  */
9746
9746
  updateAdjustmentLayer(id, update, commitToHistory = true) {
9747
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, this.state.layers, id);
9747
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, this.state.layers, id);
9748
9748
  if (!loc || loc.layer.type !== "adjustment") return false;
9749
9749
  const { width, height } = this.naturalSize;
9750
9750
  const node = loc.layer;
@@ -9772,16 +9772,16 @@ var ImageEditorController = (_class7 = class {
9772
9772
  if (mask) next.mask = mask;
9773
9773
  else delete next.mask;
9774
9774
  }
9775
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, id, () => next);
9775
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, id, () => next);
9776
9776
  this.notify();
9777
9777
  return true;
9778
9778
  }
9779
9779
  /** Removes a layer as one undo step. Returns false for an unknown id. */
9780
9780
  removeAdjustmentLayer(id) {
9781
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, this.state.layers, id);
9781
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, this.state.layers, id);
9782
9782
  if (!loc || loc.layer.type !== "adjustment") return false;
9783
9783
  this.recordHistory();
9784
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, id, () => null);
9784
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, id, () => null);
9785
9785
  if (this.state.activeLayerId === id) this.state.activeLayerId = null;
9786
9786
  this.notify();
9787
9787
  return true;
@@ -9794,9 +9794,9 @@ var ImageEditorController = (_class7 = class {
9794
9794
  if (to === from) return layers;
9795
9795
  const node = nodes[from];
9796
9796
  const anchor = nodes[to];
9797
- const without = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, id, () => null);
9798
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, without, anchor.id);
9799
- return _chunkT422YCHRcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _212 => _212.parent, 'optionalAccess', _213 => _213.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9797
+ const without = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, id, () => null);
9798
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, without, anchor.id);
9799
+ return _chunk4AB5BHYKcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _212 => _212.parent, 'optionalAccess', _213 => _213.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9800
9800
  }
9801
9801
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
9802
9802
  moveAdjustmentLayer(id, toIndex) {
@@ -9821,7 +9821,7 @@ var ImageEditorController = (_class7 = class {
9821
9821
  if (!nodes.length) return;
9822
9822
  this.recordHistory();
9823
9823
  let layers = this.state.layers;
9824
- for (const n of nodes) layers = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, n.id, () => null);
9824
+ for (const n of nodes) layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, n.id, () => null);
9825
9825
  this.state.layers = layers;
9826
9826
  if (nodes.some((n) => n.id === this.state.activeLayerId)) this.state.activeLayerId = null;
9827
9827
  this.notify();
@@ -10046,10 +10046,10 @@ var ImageEditorController = (_class7 = class {
10046
10046
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
10047
10047
  }
10048
10048
  setLayerMask(layerId, mask, commitToHistory = true) {
10049
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, this.state.layers, layerId);
10049
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, this.state.layers, layerId);
10050
10050
  if (!loc) return false;
10051
10051
  if (commitToHistory) this.recordHistory();
10052
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
10052
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
10053
10053
  const next = { ...l };
10054
10054
  if (mask) next.mask = mask;
10055
10055
  else delete next.mask;
@@ -10106,7 +10106,7 @@ var ImageEditorController = (_class7 = class {
10106
10106
  if (target) {
10107
10107
  const merged = { ...this.state.depthMask, ...partial };
10108
10108
  merged.depthRange = [...merged.depthRange];
10109
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10109
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10110
10110
  const next = { ...l };
10111
10111
  if (isDefaultDepthMask(merged)) {
10112
10112
  if (_optionalChain([next, 'access', _225 => _225.mask, 'optionalAccess', _226 => _226.source])) delete next.mask;
@@ -10120,7 +10120,7 @@ var ImageEditorController = (_class7 = class {
10120
10120
  this.recordHistory();
10121
10121
  const target = this.developLayer();
10122
10122
  if (_optionalChain([target, 'optionalAccess', _227 => _227.mask, 'optionalAccess', _228 => _228.source])) {
10123
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10123
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10124
10124
  const next = { ...l };
10125
10125
  delete next.mask;
10126
10126
  return next;
@@ -10130,7 +10130,7 @@ var ImageEditorController = (_class7 = class {
10130
10130
  }
10131
10131
  // --- Annotations & Layers ---
10132
10132
  annotationLayer(id) {
10133
- return _chunkT422YCHRcjs.flattenLayers.call(void 0, this.state.layers).find(
10133
+ return _chunk4AB5BHYKcjs.flattenLayers.call(void 0, this.state.layers).find(
10134
10134
  (l) => l.type === "annotation" && l.annotation.id === id
10135
10135
  );
10136
10136
  }
@@ -10140,8 +10140,8 @@ var ImageEditorController = (_class7 = class {
10140
10140
  const id = `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`;
10141
10141
  const fullAnnotation = { ...annotation, id };
10142
10142
  const layer = annotationLayerFor(fullAnnotation);
10143
- const loc = placement.aboveId ? _chunkT422YCHRcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
10144
- this.state.layers = loc ? _chunkT422YCHRcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _229 => _229.parent, 'optionalAccess', _230 => _230.id]), () => ( null)), loc.index + 1) : _chunkT422YCHRcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10143
+ const loc = placement.aboveId ? _chunk4AB5BHYKcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
10144
+ this.state.layers = loc ? _chunk4AB5BHYKcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _229 => _229.parent, 'optionalAccess', _230 => _230.id]), () => ( null)), loc.index + 1) : _chunk4AB5BHYKcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10145
10145
  this.state.selectedAnnotationId = id;
10146
10146
  this.notify();
10147
10147
  return id;
@@ -10154,14 +10154,14 @@ var ImageEditorController = (_class7 = class {
10154
10154
  if (layer) {
10155
10155
  const annotation = { ...layer.annotation, ...partial, id };
10156
10156
  const name = layer.name === annotationLayerName(layer.annotation) ? annotationLayerName(annotation) : layer.name;
10157
- this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => ({ ...layer, annotation, name }));
10157
+ this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => ({ ...layer, annotation, name }));
10158
10158
  }
10159
10159
  this.notify();
10160
10160
  }
10161
10161
  removeAnnotation(id) {
10162
10162
  this.recordHistory();
10163
10163
  const layer = this.annotationLayer(id);
10164
- if (layer) this.state.layers = _chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => null);
10164
+ if (layer) this.state.layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => null);
10165
10165
  if (this.state.selectedAnnotationId === id) {
10166
10166
  this.state.selectedAnnotationId = null;
10167
10167
  }
@@ -10170,7 +10170,7 @@ var ImageEditorController = (_class7 = class {
10170
10170
  clearAnnotations() {
10171
10171
  this.recordHistory();
10172
10172
  let layers = this.state.layers;
10173
- for (const l of _chunkT422YCHRcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation") layers = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, l.id, () => null);
10173
+ for (const l of _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation") layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, l.id, () => null);
10174
10174
  this.state.layers = layers;
10175
10175
  this.state.selectedAnnotationId = null;
10176
10176
  this.notify();
@@ -10249,7 +10249,7 @@ var ImageEditorController = (_class7 = class {
10249
10249
  this.syncViews();
10250
10250
  if (_optionalChain([options, 'optionalAccess', _231 => _231.layerIds])) {
10251
10251
  const keep = new Set(options.layerIds);
10252
- const layers = _chunkT422YCHRcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
10252
+ const layers = _chunk4AB5BHYKcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
10253
10253
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
10254
10254
  }
10255
10255
  return this.renderer.renderExport(source, this.state, options);
@@ -10359,10 +10359,10 @@ var ImageEditorController = (_class7 = class {
10359
10359
  /** No source image, and no layer reading one (an opened PSD): the layers are the whole document. */
10360
10360
  isSourceless() {
10361
10361
  if (this.imageElement || this.state.sourceUrl || !this.state.layers.length) return false;
10362
- return !_chunkT422YCHRcjs.flattenLayers.call(void 0, this.state.layers).some((l) => l.type === "pixel" && l.source === "document");
10362
+ return !_chunk4AB5BHYKcjs.flattenLayers.call(void 0, this.state.layers).some((l) => l.type === "pixel" && l.source === "document");
10363
10363
  }
10364
10364
  get isMultiLayer() {
10365
- return _chunkT422YCHRcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" || l.type === "group").length > 1;
10365
+ return _chunk4AB5BHYKcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" || l.type === "group").length > 1;
10366
10366
  }
10367
10367
  /**
10368
10368
  * Applies an inpainted result (natural image space, see `toSourceDataURL`) as ONE undoable step.
@@ -10377,9 +10377,9 @@ var ImageEditorController = (_class7 = class {
10377
10377
  return;
10378
10378
  }
10379
10379
  const { width, height } = this.naturalSize;
10380
- let px = await this.decodeImage(newDataUrl);
10381
- if (px.width !== width || px.height !== height) px = resizePixels(px, width, height);
10382
- const data = new Uint8ClampedArray(px.data);
10380
+ let px2 = await this.decodeImage(newDataUrl);
10381
+ if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
10382
+ const data = new Uint8ClampedArray(px2.data);
10383
10383
  const sel = _optionalChain([this, 'access', _232 => _232.state, 'access', _233 => _233.selection, 'optionalAccess', _234 => _234.bounds]) ? this.state.selection : null;
10384
10384
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
10385
10385
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
@@ -10400,10 +10400,10 @@ var ImageEditorController = (_class7 = class {
10400
10400
  if (!target) throw new LayerOperationError("There is no pixel layer to mask.");
10401
10401
  requireUnlocked(target, "all", "mask it");
10402
10402
  const { width, height } = this.naturalSize;
10403
- let px = await this.decodeImage(newDataUrl);
10404
- if (px.width !== width || px.height !== height) px = resizePixels(px, width, height);
10403
+ let px2 = await this.decodeImage(newDataUrl);
10404
+ if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
10405
10405
  const alpha = new Uint8ClampedArray(width * height);
10406
- for (let p = 0; p < alpha.length; p++) alpha[p] = px.data[p * 4 + 3];
10406
+ for (let p = 0; p < alpha.length; p++) alpha[p] = px2.data[p * 4 + 3];
10407
10407
  let surface = _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, { width, height, data: alpha }, 1, 0, 0, 0);
10408
10408
  if (target.offset.x || target.offset.y) surface = _chunkCRMAXIUVcjs.translateSurface.call(void 0, surface, -target.offset.x, -target.offset.y);
10409
10409
  this.commitLayers(setLayerMask(this.state.layers, target.id, { surface, defaultValue: 0 }));
@@ -10450,7 +10450,7 @@ var ImageEditorController = (_class7 = class {
10450
10450
  } else {
10451
10451
  throw new LayerOperationError(`Only annotation layers and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
10452
10452
  }
10453
- this.commitLayers(_chunkT422YCHRcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
10453
+ this.commitLayers(_chunk4AB5BHYKcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
10454
10454
  return id;
10455
10455
  }
10456
10456
  // --- PSD ---
@@ -10477,7 +10477,7 @@ var ImageEditorController = (_class7 = class {
10477
10477
  delete s.legacyOutputBlur;
10478
10478
  s.selection = null;
10479
10479
  s.selectedAnnotationId = null;
10480
- const pixels = _chunkT422YCHRcjs.flattenLayers.call(void 0, result.layers).filter((l) => l.type === "pixel");
10480
+ const pixels = _chunk4AB5BHYKcjs.flattenLayers.call(void 0, result.layers).filter((l) => l.type === "pixel");
10481
10481
  s.activeLayerId = pixels.length ? pixels[pixels.length - 1].id : null;
10482
10482
  s.activeTarget = "pixels";
10483
10483
  this.psdResolution = result.resolution;
@@ -10488,7 +10488,7 @@ var ImageEditorController = (_class7 = class {
10488
10488
  this.lastLoadProblems = result.warnings;
10489
10489
  this.notify();
10490
10490
  return {
10491
- layerIds: _chunkT422YCHRcjs.flattenLayers.call(void 0, result.layers).map((l) => l.id),
10491
+ layerIds: _chunk4AB5BHYKcjs.flattenLayers.call(void 0, result.layers).map((l) => l.id),
10492
10492
  warnings: result.warnings,
10493
10493
  width: result.width,
10494
10494
  height: result.height,
@@ -10641,16 +10641,16 @@ var ImageEditorController = (_class7 = class {
10641
10641
  );
10642
10642
  }
10643
10643
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
10644
- for (const l of _chunkT422YCHRcjs.flattenLayers.call(void 0, layers)) {
10644
+ for (const l of _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers)) {
10645
10645
  if (l.type === "annotation") {
10646
- layers = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
10646
+ layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
10647
10647
  }
10648
10648
  }
10649
10649
  }
10650
10650
  const bg = developTarget(layers, null);
10651
- if (bg && bg.source !== "document") layers = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
10651
+ if (bg && bg.source !== "document") layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
10652
10652
  if (clearAnnotations) {
10653
- for (const l of _chunkT422YCHRcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation") layers = _chunkT422YCHRcjs.mapLayer.call(void 0, layers, l.id, () => null);
10653
+ for (const l of _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation") layers = _chunk4AB5BHYKcjs.mapLayer.call(void 0, layers, l.id, () => null);
10654
10654
  this.state.selectedAnnotationId = null;
10655
10655
  }
10656
10656
  this.state.layers = layers;
@@ -10708,7 +10708,7 @@ var ImageEditorController = (_class7 = class {
10708
10708
  s.outputOpacity = data.opacity;
10709
10709
  if (typeof data.legacyOutputBlur === "number" && data.legacyOutputBlur >= 0) s.legacyOutputBlur = data.legacyOutputBlur;
10710
10710
  else delete s.legacyOutputBlur;
10711
- s.activeLayerId = data.activeLayerId && _chunkT422YCHRcjs.findLayer.call(void 0, s.layers, data.activeLayerId) ? data.activeLayerId : null;
10711
+ s.activeLayerId = data.activeLayerId && _chunk4AB5BHYKcjs.findLayer.call(void 0, s.layers, data.activeLayerId) ? data.activeLayerId : null;
10712
10712
  const light = data.globalLight;
10713
10713
  if (light && Number.isFinite(light.angle) && Number.isFinite(light.altitude)) s.globalLight = { angle: light.angle, altitude: Math.min(90, Math.max(0, light.altitude)) };
10714
10714
  else delete s.globalLight;
@@ -10877,12 +10877,12 @@ function resizeLegacyMasks(layers, from, to) {
10877
10877
  const th = Math.max(1, Math.round(to.height));
10878
10878
  if (fw === tw && fh === th) return layers;
10879
10879
  let out = layers;
10880
- for (const l of _chunkT422YCHRcjs.flattenLayers.call(void 0, layers)) {
10880
+ for (const l of _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers)) {
10881
10881
  if (l.type !== "adjustment" || !l.mask || l.mask.source) continue;
10882
10882
  const old = l.mask;
10883
10883
  const mask = rasterMaskFromLegacy(legacyMaskOf(old, fw, fh), tw, th);
10884
10884
  if (!mask) continue;
10885
- out = _chunkT422YCHRcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
10885
+ out = _chunk4AB5BHYKcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
10886
10886
  }
10887
10887
  return out;
10888
10888
  }
@@ -10895,7 +10895,7 @@ function isOpaqueInside(surface, width, height) {
10895
10895
  return true;
10896
10896
  }
10897
10897
  function collectStateTiles(layers, into) {
10898
- for (const l of _chunkT422YCHRcjs.flattenLayers.call(void 0, layers)) {
10898
+ for (const l of _chunk4AB5BHYKcjs.flattenLayers.call(void 0, layers)) {
10899
10899
  if (l.type === "pixel" && l.source !== "document") _chunkCRMAXIUVcjs.collectTiles.call(void 0, l.surface, into);
10900
10900
  if (l.mask && !l.mask.source) _chunkCRMAXIUVcjs.collectTiles.call(void 0, l.mask.surface, into);
10901
10901
  }
@@ -10913,24 +10913,24 @@ function pixelsOnly(layers) {
10913
10913
  }
10914
10914
  return out;
10915
10915
  }
10916
- function resizePixels(px, width, height) {
10917
- const src = px.data;
10916
+ function resizePixels(px2, width, height) {
10917
+ const src = px2.data;
10918
10918
  const out = new Uint8ClampedArray(width * height * 4);
10919
- const kx = px.width / width;
10920
- const ky = px.height / height;
10919
+ const kx = px2.width / width;
10920
+ const ky = px2.height / height;
10921
10921
  for (let y = 0; y < height; y++) {
10922
- const fy = Math.min(px.height - 1, Math.max(0, (y + 0.5) * ky - 0.5));
10922
+ const fy = Math.min(px2.height - 1, Math.max(0, (y + 0.5) * ky - 0.5));
10923
10923
  const y0 = Math.floor(fy);
10924
- const y1 = Math.min(px.height - 1, y0 + 1);
10924
+ const y1 = Math.min(px2.height - 1, y0 + 1);
10925
10925
  const ty = fy - y0;
10926
10926
  for (let x = 0; x < width; x++) {
10927
- const fx = Math.min(px.width - 1, Math.max(0, (x + 0.5) * kx - 0.5));
10927
+ const fx = Math.min(px2.width - 1, Math.max(0, (x + 0.5) * kx - 0.5));
10928
10928
  const x0 = Math.floor(fx);
10929
- const x1 = Math.min(px.width - 1, x0 + 1);
10929
+ const x1 = Math.min(px2.width - 1, x0 + 1);
10930
10930
  const tx = fx - x0;
10931
10931
  for (let c = 0; c < 4; c++) {
10932
- const a = src[(y0 * px.width + x0) * 4 + c] * (1 - tx) + src[(y0 * px.width + x1) * 4 + c] * tx;
10933
- const b = src[(y1 * px.width + x0) * 4 + c] * (1 - tx) + src[(y1 * px.width + x1) * 4 + c] * tx;
10932
+ const a = src[(y0 * px2.width + x0) * 4 + c] * (1 - tx) + src[(y0 * px2.width + x1) * 4 + c] * tx;
10933
+ const b = src[(y1 * px2.width + x0) * 4 + c] * (1 - tx) + src[(y1 * px2.width + x1) * 4 + c] * tx;
10934
10934
  out[(y * width + x) * 4 + c] = a * (1 - ty) + b * ty;
10935
10935
  }
10936
10936
  }
@@ -11425,8 +11425,8 @@ function describeSelection(mask) {
11425
11425
  if (!mask || !mask.bounds) return "No selection";
11426
11426
  let sum = 0;
11427
11427
  for (let i = 0; i < mask.data.length; i++) sum += mask.data[i];
11428
- const pct2 = sum / 255 / mask.data.length * 100;
11429
- const shown = pct2 >= 10 ? Math.round(pct2) : Math.round(pct2 * 10) / 10;
11428
+ const pct3 = sum / 255 / mask.data.length * 100;
11429
+ const shown = pct3 >= 10 ? Math.round(pct3) : Math.round(pct3 * 10) / 10;
11430
11430
  return `${mask.bounds.width} \xD7 ${mask.bounds.height} px selected (${shown}% of the image)`;
11431
11431
  }
11432
11432
 
@@ -11746,14 +11746,14 @@ function rebin(bins, count) {
11746
11746
  return out;
11747
11747
  }
11748
11748
  function histogramSummary(h, bins) {
11749
- const pct2 = (n) => h.samples ? round(n / h.samples * 100) : 0;
11749
+ const pct3 = (n) => h.samples ? round(n / h.samples * 100) : 0;
11750
11750
  const channels = { red: h.red, green: h.green, blue: h.blue, luminance: h.luminance };
11751
11751
  return {
11752
11752
  samples: h.samples,
11753
11753
  transparent: h.transparent,
11754
11754
  clipping: {
11755
- shadowsPercent: { red: pct2(h.shadows[0]), green: pct2(h.shadows[1]), blue: pct2(h.shadows[2]) },
11756
- highlightsPercent: { red: pct2(h.highlights[0]), green: pct2(h.highlights[1]), blue: pct2(h.highlights[2]) }
11755
+ shadowsPercent: { red: pct3(h.shadows[0]), green: pct3(h.shadows[1]), blue: pct3(h.shadows[2]) },
11756
+ highlightsPercent: { red: pct3(h.highlights[0]), green: pct3(h.highlights[1]), blue: pct3(h.highlights[2]) }
11757
11757
  },
11758
11758
  stats: Object.fromEntries(Object.entries(channels).map(([k, v]) => [k, binStats(v, h.samples)])),
11759
11759
  ...bins ? { bins: Object.fromEntries(Object.entries(channels).map(([k, v]) => [k, rebin(v, bins)])) } : {}
@@ -12049,7 +12049,7 @@ function placementFrom(args) {
12049
12049
  function createImageLayerTools(controller) {
12050
12050
  const describe = (id) => {
12051
12051
  const s = controller.getState();
12052
- const loc = _chunkT422YCHRcjs.findLayer.call(void 0, s.layers, id);
12052
+ const loc = _chunk4AB5BHYKcjs.findLayer.call(void 0, s.layers, id);
12053
12053
  if (!loc) return null;
12054
12054
  return {
12055
12055
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
@@ -12620,7 +12620,7 @@ var DEFS = {
12620
12620
  };
12621
12621
  var nullable = (schema, description) => ({ anyOf: [schema, { type: "null" }], description });
12622
12622
  function settingsSchema(forUpdate) {
12623
- const opt = (schema, description) => forUpdate ? nullable(schema, `${description} null removes it.`) : { ...schema, description };
12623
+ const opt2 = (schema, description) => forUpdate ? nullable(schema, `${description} null removes it.`) : { ...schema, description };
12624
12624
  return {
12625
12625
  type: "object",
12626
12626
  description: forUpdate ? "Settings to change (only these; nested objects are replaced whole). Which settings a kind takes: see add_layer_effect." : "Settings to change from Photoshop's defaults (all optional). Unknown settings for the kind are refused with the list of its settings.",
@@ -12635,7 +12635,7 @@ function settingsSchema(forUpdate) {
12635
12635
  spread: { type: "number", minimum: 0, maximum: 1, description: "drop-shadow, outer-glow: 0..1 of the size made solid (default 0)." },
12636
12636
  choke: { type: "number", minimum: 0, maximum: 1, description: "inner-shadow, inner-glow: 0..1 of the size made solid (default 0)." },
12637
12637
  size: { type: "number", minimum: 0, maximum: 250, description: "Shadows, glows, satin, bevel-emboss: blur / size in px (default 5; satin 14); stroke: width in px (default 3)." },
12638
- contour: opt({ $ref: "#/$defs/contour" }, "Shadows, glows, satin: coverage contour (default linear)."),
12638
+ contour: opt2({ $ref: "#/$defs/contour" }, "Shadows, glows, satin: coverage contour (default linear)."),
12639
12639
  antiAlias: { type: "boolean", description: "Shadows, glows, satin: smooth the contour (default false; satin true)." },
12640
12640
  noise: { type: "number", minimum: 0, maximum: 1, description: "Shadows, glows: speckle 0..1 (default 0)." },
12641
12641
  knocksOut: { type: "boolean", description: "drop-shadow: the layer hides the shadow beneath its see-through fill (default true)." },
@@ -12649,14 +12649,14 @@ function settingsSchema(forUpdate) {
12649
12649
  direction: { type: "string", enum: ["up", "down"], description: "bevel-emboss: raised (up, default) or sunk (down)." },
12650
12650
  soften: { type: "number", minimum: 0, maximum: 16, description: "bevel-emboss: blur of the height in px (default 0)." },
12651
12651
  altitude: { type: "number", minimum: 0, maximum: 90, description: "bevel-emboss: light altitude in degrees (default 30)." },
12652
- glossContour: opt({ $ref: "#/$defs/contour" }, "bevel-emboss: gloss contour over the shading (default linear)."),
12652
+ glossContour: opt2({ $ref: "#/$defs/contour" }, "bevel-emboss: gloss contour over the shading (default linear)."),
12653
12653
  highlightColor: { $ref: "#/$defs/color", description: "bevel-emboss: highlight colour (default #ffffff)." },
12654
12654
  highlightBlend: { type: "string", enum: BLEND_IDS, description: "bevel-emboss: highlight mode (default screen)." },
12655
12655
  highlightOpacity: { type: "number", minimum: 0, maximum: 1, description: "bevel-emboss: highlight opacity (default 0.75)." },
12656
12656
  shadowColor: { $ref: "#/$defs/color", description: "bevel-emboss: shadow colour (default #000000)." },
12657
12657
  shadowBlend: { type: "string", enum: BLEND_IDS, description: "bevel-emboss: shadow mode (default multiply)." },
12658
12658
  shadowOpacity: { type: "number", minimum: 0, maximum: 1, description: "bevel-emboss: shadow opacity (default 0.75)." },
12659
- contourElement: opt(
12659
+ contourElement: opt2(
12660
12660
  {
12661
12661
  type: "object",
12662
12662
  properties: {
@@ -12669,7 +12669,7 @@ function settingsSchema(forUpdate) {
12669
12669
  },
12670
12670
  "bevel-emboss: the Contour element, shaping the bevel's height profile (default off)."
12671
12671
  ),
12672
- texture: opt(
12672
+ texture: opt2(
12673
12673
  {
12674
12674
  type: "object",
12675
12675
  properties: {
@@ -12701,8 +12701,8 @@ function settingsSchema(forUpdate) {
12701
12701
  }
12702
12702
  function patternList(controller) {
12703
12703
  const doc = controller.getDocumentPatterns().map((p) => ({ id: p.id, name: p.name, width: p.width, height: p.height, builtin: false }));
12704
- const builtins = _chunkT422YCHRcjs.builtinPatternIds.call(void 0, ).map((id) => {
12705
- const p = _chunkT422YCHRcjs.builtinPattern.call(void 0, id);
12704
+ const builtins = _chunk4AB5BHYKcjs.builtinPatternIds.call(void 0, ).map((id) => {
12705
+ const p = _chunk4AB5BHYKcjs.builtinPattern.call(void 0, id);
12706
12706
  return { id, name: p.name, width: p.width, height: p.height, builtin: true };
12707
12707
  });
12708
12708
  return [...doc, ...builtins];
@@ -12711,9 +12711,9 @@ function describeLayerEffects(effects) {
12711
12711
  return {
12712
12712
  enabled: effects.enabled,
12713
12713
  scale: _nullishCoalesce(effects.scale, () => ( 1)),
12714
- margin: _chunkT422YCHRcjs.effectsMargin.call(void 0, effects),
12714
+ margin: _chunk4AB5BHYKcjs.effectsMargin.call(void 0, effects),
12715
12715
  fromPsd: Boolean(effects.psd),
12716
- effects: effects.items.map((e) => ({ ...JSON.parse(JSON.stringify(e)), label: _chunkT422YCHRcjs.layerEffectLabel.call(void 0, e.kind) }))
12716
+ effects: effects.items.map((e) => ({ ...JSON.parse(JSON.stringify(e)), label: _chunk4AB5BHYKcjs.layerEffectLabel.call(void 0, e.kind) }))
12717
12717
  };
12718
12718
  }
12719
12719
  function createImageEffectTools(controller) {
@@ -12729,7 +12729,7 @@ function createImageEffectTools(controller) {
12729
12729
  description: "Returns a layer's effects: the master switch (enabled), Scale Effects (scale, 1 = 100 %), margin (px the effects reach beyond the shape), whether they came from a PSD, and every effect with its id, kind, label and all settings. Also returns the document global light and the pattern ids pattern effects can use.",
12730
12730
  inputSchema: { type: "object", properties: { layerId: LAYER_ID3 }, required: ["layerId"], additionalProperties: false },
12731
12731
  annotations: { title: "List layer effects", ...READ3 },
12732
- handler: ({ layerId }) => result(layerArg(layerId), { globalLight: controller.getGlobalLight(), patterns: patternList(controller), kinds: [..._chunkT422YCHRcjs.LAYER_EFFECT_KINDS] })
12732
+ handler: ({ layerId }) => result(layerArg(layerId), { globalLight: controller.getGlobalLight(), patterns: patternList(controller), kinds: [..._chunk4AB5BHYKcjs.LAYER_EFFECT_KINDS] })
12733
12733
  };
12734
12734
  const add = {
12735
12735
  name: "add_layer_effect",
@@ -12740,7 +12740,7 @@ function createImageEffectTools(controller) {
12740
12740
  $defs: DEFS,
12741
12741
  properties: {
12742
12742
  layerId: LAYER_ID3,
12743
- kind: { type: "string", enum: [..._chunkT422YCHRcjs.LAYER_EFFECT_KINDS], description: "Effect kind." },
12743
+ kind: { type: "string", enum: [..._chunk4AB5BHYKcjs.LAYER_EFFECT_KINDS], description: "Effect kind." },
12744
12744
  settings: settingsSchema(false),
12745
12745
  index: { type: "integer", minimum: 0, description: "Position in the layer's effect list (default the end)." }
12746
12746
  },
@@ -12750,7 +12750,7 @@ function createImageEffectTools(controller) {
12750
12750
  annotations: { title: "Add a layer effect", ...WRITE3 },
12751
12751
  handler: ({ layerId, kind, settings, index }) => {
12752
12752
  const id = layerArg(layerId);
12753
- if (!_chunkT422YCHRcjs.isLayerEffectKind.call(void 0, kind)) throw new LayerOperationError(`kind must be one of ${_chunkT422YCHRcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
12753
+ if (!_chunk4AB5BHYKcjs.isLayerEffectKind.call(void 0, kind)) throw new LayerOperationError(`kind must be one of ${_chunk4AB5BHYKcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
12754
12754
  const { effect } = controller.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
12755
12755
  return result(id, { effectId: effect.id });
12756
12756
  }
@@ -13174,7 +13174,7 @@ function psdBytesFromBase64(data) {
13174
13174
  if (typeof data !== "string" || !data.trim()) throw new PsdError("data is required: the PSD file as base64.");
13175
13175
  const body = data.trim().replace(/^data:[^,]*;base64,/i, "");
13176
13176
  if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new PsdError("data is not base64; send the PSD file bytes base64-encoded.");
13177
- const bytes = _chunkT422YCHRcjs.base64ToBytes.call(void 0, body);
13177
+ const bytes = _chunk4AB5BHYKcjs.base64ToBytes.call(void 0, body);
13178
13178
  if (bytes.length < 26) throw new PsdError(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
13179
13179
  return bytes;
13180
13180
  }
@@ -13225,7 +13225,7 @@ function createImagePsdTools(controller) {
13225
13225
  handler: async () => {
13226
13226
  const res = await controller.toPsd();
13227
13227
  return {
13228
- data: _chunkT422YCHRcjs.bytesToBase64.call(void 0, res.bytes),
13228
+ data: _chunk4AB5BHYKcjs.bytesToBase64.call(void 0, res.bytes),
13229
13229
  mimeType: "image/vnd.adobe.photoshop",
13230
13230
  size: res.bytes.length,
13231
13231
  psb: res.psb,
@@ -13686,8 +13686,8 @@ function applyRegionMosaic(imageData, regions, blockSize = 12) {
13686
13686
  const count = bw * bh;
13687
13687
  for (let py = by; py < by + bh; py++) {
13688
13688
  const rowOffset = py * width;
13689
- for (let px = bx; px < bx + bw; px++) {
13690
- const idx = (rowOffset + px) * 4;
13689
+ for (let px2 = bx; px2 < bx + bw; px2++) {
13690
+ const idx = (rowOffset + px2) * 4;
13691
13691
  rSum += data[idx];
13692
13692
  gSum += data[idx + 1];
13693
13693
  bSum += data[idx + 2];
@@ -13700,8 +13700,8 @@ function applyRegionMosaic(imageData, regions, blockSize = 12) {
13700
13700
  const aAvg = Math.round(aSum / count);
13701
13701
  for (let py = by; py < by + bh; py++) {
13702
13702
  const rowOffset = py * width;
13703
- for (let px = bx; px < bx + bw; px++) {
13704
- const idx = (rowOffset + px) * 4;
13703
+ for (let px2 = bx; px2 < bx + bw; px2++) {
13704
+ const idx = (rowOffset + px2) * 4;
13705
13705
  data[idx] = rAvg;
13706
13706
  data[idx + 1] = gAvg;
13707
13707
  data[idx + 2] = bAvg;
@@ -13821,7 +13821,7 @@ function dropZone(fraction, isGroup) {
13821
13821
  }
13822
13822
  function dropPlacement(layers, dragId, targetId, zone) {
13823
13823
  if (dragId === targetId) return null;
13824
- const target = _chunkT422YCHRcjs.findLayer.call(void 0, layers, targetId);
13824
+ const target = _chunk4AB5BHYKcjs.findLayer.call(void 0, layers, targetId);
13825
13825
  if (!target) return null;
13826
13826
  if (zone === "inside" && target.layer.type === "group") return { parentId: targetId };
13827
13827
  return zone === "above" ? { aboveId: targetId } : { belowId: targetId };
@@ -13829,7 +13829,7 @@ function dropPlacement(layers, dragId, targetId, zone) {
13829
13829
  function layerMenu(controller) {
13830
13830
  const s = controller.getState();
13831
13831
  const active = controller.getActiveLayer();
13832
- const loc = active ? _chunkT422YCHRcjs.findLayer.call(void 0, s.layers, active.id) : null;
13832
+ const loc = active ? _chunk4AB5BHYKcjs.findLayer.call(void 0, s.layers, active.id) : null;
13833
13833
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
13834
13834
  const below = loc ? siblings[loc.index - 1] : void 0;
13835
13835
  const hasSel = controller.hasSelection;
@@ -13919,6 +13919,179 @@ async function runLayerMenuAction(controller, action) {
13919
13919
  }
13920
13920
  }
13921
13921
 
13922
+ // src/image-editor/layers/effects-ui.ts
13923
+ function layerEffectsPanel(layer) {
13924
+ const empty = { readOnly: true, enabled: true, scale: 1, rows: [] };
13925
+ if (!layer) return { ...empty, available: false, reason: "Select a layer to add effects." };
13926
+ if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have effects." };
13927
+ const fx = layer.effects;
13928
+ const readOnly = Boolean(_optionalChain([layer, 'access', _307 => _307.locks, 'optionalAccess', _308 => _308.all]));
13929
+ return {
13930
+ available: true,
13931
+ readOnly,
13932
+ reason: readOnly ? "The layer is locked; unlock it to change its effects." : void 0,
13933
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _309 => _309.enabled]), () => ( true)),
13934
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _310 => _310.scale]), () => ( 1)),
13935
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _311 => _311.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunk4AB5BHYKcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
13936
+ };
13937
+ }
13938
+ function layerEffectsBadge(layer) {
13939
+ if (!_optionalChain([layer, 'access', _312 => _312.effects, 'optionalAccess', _313 => _313.items, 'access', _314 => _314.length])) return null;
13940
+ return _chunk4AB5BHYKcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
13941
+ }
13942
+ var LAYER_EFFECT_MENU = _chunk4AB5BHYKcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunk4AB5BHYKcjs.layerEffectLabel.call(void 0, kind) }));
13943
+ var BLENDS = _chunkCRMAXIUVcjs.BLEND_MODES.filter((m) => m.id !== "pigment").map((m) => ({ value: m.id, label: m.label }));
13944
+ var opt = (...pairs) => pairs.map(([value, label]) => ({ value, label }));
13945
+ function patternOptions(patterns) {
13946
+ return [...patterns.map((p) => ({ value: p.id, label: p.name || p.id })), ..._chunk4AB5BHYKcjs.builtinPatternIds.call(void 0, ).map((id) => ({ value: id, label: _chunk4AB5BHYKcjs.builtinPattern.call(void 0, id).name }))];
13947
+ }
13948
+ function getPath(o, path) {
13949
+ let v = o;
13950
+ for (const p of path.split(".")) {
13951
+ if (v === null || v === void 0) return void 0;
13952
+ if (Array.isArray(v)) v = p === "last" ? v[v.length - 1] : v[Number(p)];
13953
+ else v = v[p];
13954
+ }
13955
+ return v;
13956
+ }
13957
+ function setPath(o, parts, value) {
13958
+ if (!parts.length) return value;
13959
+ const [p, ...rest] = parts;
13960
+ if (Array.isArray(o)) {
13961
+ const i = p === "last" ? o.length - 1 : Number(p);
13962
+ const out = [...o];
13963
+ out[i] = setPath(o[i], rest, value);
13964
+ return out;
13965
+ }
13966
+ const r = _nullishCoalesce(o, () => ( {}));
13967
+ return { ...r, [p]: setPath(r[p], rest, value) };
13968
+ }
13969
+ function fillControls(f, allowPattern, patterns) {
13970
+ const types = allowPattern ? opt(["color", "Color"], ["gradient", "Gradient"], ["pattern", "Pattern"]) : opt(["color", "Color"], ["gradient", "Gradient"]);
13971
+ const out = [{ key: "fill.type", label: "Fill", type: "select", value: f.type, options: types }];
13972
+ if (f.type === "color") out.push({ key: "fill.color", label: "Color", type: "color", value: f.color });
13973
+ else if (f.type === "gradient") out.push(...gradientControls("fill.gradient", f.gradient));
13974
+ else {
13975
+ out.push(
13976
+ { key: "fill.patternId", label: "Pattern", type: "select", value: f.patternId, options: patternOptions(patterns) },
13977
+ { key: "fill.scale", label: "Scale", type: "range", min: 0.01, max: 10, step: 0.01, value: f.scale, percent: true, unit: "%" }
13978
+ );
13979
+ }
13980
+ return out;
13981
+ }
13982
+ function gradientControls(prefix, g) {
13983
+ return [
13984
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _315 => _315.stops, 'access', _316 => _316[0], 'optionalAccess', _317 => _317.color]), () => ( "#000000")) },
13985
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _318 => _318.stops, 'access', _319 => _319[g.stops.length - 1], 'optionalAccess', _320 => _320.color]), () => ( "#ffffff")) },
13986
+ { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
13987
+ { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
13988
+ { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
13989
+ { key: `${prefix}.reverse`, label: "Reverse", type: "checkbox", value: g.reverse },
13990
+ { key: `${prefix}.align`, label: "Align with layer", type: "checkbox", value: g.align }
13991
+ ];
13992
+ }
13993
+ var px = (key, label, value, max = 250) => ({ key, label, type: "range", min: 0, max, step: 1, value, unit: "px" });
13994
+ var pct2 = (key, label, value, min = 0, max = 1) => ({ key, label, type: "range", min, max, step: 0.01, value, percent: true, unit: "%" });
13995
+ var deg = (key, label, value, min = -180, max = 180) => ({ key, label, type: "range", min, max, step: 1, value, unit: "\xB0" });
13996
+ function layerEffectControls(e, patterns = []) {
13997
+ const blended = e.kind === "bevel-emboss" ? [] : [
13998
+ { key: "blend", label: "Blend mode", type: "select", value: e.blend, options: BLENDS },
13999
+ pct2("opacity", "Opacity", e.opacity)
14000
+ ];
14001
+ switch (e.kind) {
14002
+ case "drop-shadow":
14003
+ case "inner-shadow":
14004
+ return [
14005
+ ...blended,
14006
+ { key: "color", label: "Color", type: "color", value: e.color },
14007
+ { key: "useGlobalLight", label: "Use global light", type: "checkbox", value: e.useGlobalLight },
14008
+ deg("angle", "Angle", e.angle),
14009
+ px("distance", "Distance", e.distance, 500),
14010
+ e.kind === "drop-shadow" ? pct2("spread", "Spread", e.spread) : pct2("choke", "Choke", e.choke),
14011
+ px("size", "Size", e.size),
14012
+ pct2("noise", "Noise", e.noise),
14013
+ ...e.kind === "drop-shadow" ? [{ key: "knocksOut", label: "Layer knocks out shadow", type: "checkbox", value: e.knocksOut }] : []
14014
+ ];
14015
+ case "outer-glow":
14016
+ case "inner-glow":
14017
+ return [
14018
+ ...blended,
14019
+ ...fillControls(e.fill, false, patterns),
14020
+ { key: "technique", label: "Technique", type: "select", value: e.technique, options: opt(["softer", "Softer"], ["precise", "Precise"]) },
14021
+ ...e.kind === "inner-glow" ? [{ key: "source", label: "Source", type: "select", value: e.source, options: opt(["edge", "Edge"], ["center", "Center"]) }] : [],
14022
+ e.kind === "outer-glow" ? pct2("spread", "Spread", e.spread) : pct2("choke", "Choke", e.choke),
14023
+ px("size", "Size", e.size),
14024
+ pct2("range", "Range", e.range, 0.01, 1),
14025
+ pct2("noise", "Noise", e.noise)
14026
+ ];
14027
+ case "bevel-emboss":
14028
+ return [
14029
+ { key: "style", label: "Style", type: "select", value: e.style, options: opt(["inner-bevel", "Inner Bevel"], ["outer-bevel", "Outer Bevel"], ["emboss", "Emboss"], ["pillow-emboss", "Pillow Emboss"], ["stroke-emboss", "Stroke Emboss"]) },
14030
+ { key: "technique", label: "Technique", type: "select", value: e.technique, options: opt(["smooth", "Smooth"], ["chisel-hard", "Chisel Hard"], ["chisel-soft", "Chisel Soft"]) },
14031
+ pct2("depth", "Depth", e.depth, 0, 10),
14032
+ { key: "direction", label: "Direction", type: "select", value: e.direction, options: opt(["up", "Up"], ["down", "Down"]) },
14033
+ px("size", "Size", e.size),
14034
+ px("soften", "Soften", e.soften, 16),
14035
+ { key: "useGlobalLight", label: "Use global light", type: "checkbox", value: e.useGlobalLight },
14036
+ deg("angle", "Angle", e.angle),
14037
+ deg("altitude", "Altitude", e.altitude, 0, 90),
14038
+ { key: "highlightColor", label: "Highlight", type: "color", value: e.highlightColor },
14039
+ { key: "highlightBlend", label: "Highlight mode", type: "select", value: e.highlightBlend, options: BLENDS },
14040
+ pct2("highlightOpacity", "Highlight opacity", e.highlightOpacity),
14041
+ { key: "shadowColor", label: "Shadow", type: "color", value: e.shadowColor },
14042
+ { key: "shadowBlend", label: "Shadow mode", type: "select", value: e.shadowBlend, options: BLENDS },
14043
+ pct2("shadowOpacity", "Shadow opacity", e.shadowOpacity)
14044
+ ];
14045
+ case "satin":
14046
+ return [
14047
+ ...blended,
14048
+ { key: "color", label: "Color", type: "color", value: e.color },
14049
+ deg("angle", "Angle", e.angle),
14050
+ px("distance", "Distance", e.distance),
14051
+ px("size", "Size", e.size),
14052
+ { key: "invert", label: "Invert", type: "checkbox", value: e.invert }
14053
+ ];
14054
+ case "color-overlay":
14055
+ return [...blended, { key: "color", label: "Color", type: "color", value: e.color }];
14056
+ case "gradient-overlay":
14057
+ return [...blended, ...gradientControls("gradient", e.gradient)];
14058
+ case "pattern-overlay":
14059
+ return [
14060
+ ...blended,
14061
+ { key: "patternId", label: "Pattern", type: "select", value: e.patternId, options: patternOptions(patterns) },
14062
+ pct2("scale", "Scale", e.scale, 0.01, 10),
14063
+ deg("angle", "Angle", _nullishCoalesce(e.angle, () => ( 0))),
14064
+ { key: "link", label: "Link with layer", type: "checkbox", value: _nullishCoalesce(e.link, () => ( true)) }
14065
+ ];
14066
+ case "stroke":
14067
+ return [
14068
+ ...blended,
14069
+ px("size", "Size", e.size),
14070
+ { key: "position", label: "Position", type: "select", value: e.position, options: opt(["outside", "Outside"], ["inside", "Inside"], ["center", "Center"]) },
14071
+ ...fillControls(e.fill, true, patterns)
14072
+ ];
14073
+ }
14074
+ }
14075
+ function fillOfType(current, type, patterns) {
14076
+ if (type === "gradient") return { type: "gradient", gradient: _chunk4AB5BHYKcjs.defaultEffectGradient.call(void 0, ) };
14077
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _321 => _321[0], 'optionalAccess', _322 => _322.id]), () => ( "checker")), scale: 1 };
14078
+ return { type: "color", color: current.type === "color" ? current.color : "#000000" };
14079
+ }
14080
+ function effectControlChange(effect, key, value, patterns = []) {
14081
+ const [top, ...rest] = key.split(".");
14082
+ if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
14083
+ if (top === "patternId" && !rest.length) {
14084
+ const name = _optionalChain([patternOptions, 'call', _323 => _323(patterns), 'access', _324 => _324.find, 'call', _325 => _325((o) => o.value === value), 'optionalAccess', _326 => _326.label]);
14085
+ return name ? { patternId: value, name } : { patternId: value };
14086
+ }
14087
+ if (!rest.length) return { [top]: value };
14088
+ if (top === "fill" && rest[0] === "patternId") {
14089
+ const name = _optionalChain([patternOptions, 'call', _327 => _327(patterns), 'access', _328 => _328.find, 'call', _329 => _329((o) => o.value === value), 'optionalAccess', _330 => _330.label]);
14090
+ return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
14091
+ }
14092
+ return { [top]: setPath(getPath(effect, top), rest, value) };
14093
+ }
14094
+
13922
14095
  // src/image-editor/psd/ui.ts
13923
14096
  var PSD_FILE_ACCEPT = ".psd,.psb,image/vnd.adobe.photoshop,application/x-photoshop";
13924
14097
  function blobBytes(file) {
@@ -14422,5 +14595,10 @@ async function downloadPsd(controller, name = "image") {
14422
14595
 
14423
14596
 
14424
14597
 
14425
- exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.BLEND_MODES = _chunkCRMAXIUVcjs.BLEND_MODES; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.CoverageMap = _chunkZZOTHJ4Kcjs.CoverageMap; exports.D50 = D50; exports.D65 = D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_BRUSH = _chunkZZOTHJ4Kcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_GLOBAL_LIGHT = _chunkT422YCHRcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MIXER = _chunkZZOTHJ4Kcjs.DEFAULT_MIXER; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkT422YCHRcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DabWalker = _chunkZZOTHJ4Kcjs.DabWalker; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkZZOTHJ4Kcjs.EMPTY_MIXER_LOAD; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkT422YCHRcjs.LAYER_EFFECT_KINDS; exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LUMA_709 = LUMA_709; exports.LayerCompositor = LayerCompositor; exports.LayerEffectError = _chunkT422YCHRcjs.LayerEffectError; exports.LayerOperationError = LayerOperationError; exports.MAX_BRUSH_SIZE = _chunkZZOTHJ4Kcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkT422YCHRcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = MAX_KELVIN; exports.MIN_KELVIN = MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkZZOTHJ4Kcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkZZOTHJ4Kcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkZZOTHJ4Kcjs.MIXING_MODELS; exports.MixerStroke = _chunkZZOTHJ4Kcjs.MixerStroke; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCRMAXIUVcjs.PIGMENT_BANDS; exports.PIGMENT_LAMBDA_MIN = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_WAVELENGTHS = _chunkCRMAXIUVcjs.PIGMENT_WAVELENGTHS; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.PaintGesture = PaintGesture; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunkT422YCHRcjs.PatternPlacement; exports.PatternTile = _chunkT422YCHRcjs.PatternTile; exports.PsdError = PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.SELECTION_MODES = SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.StrokeCoverage = _chunkZZOTHJ4Kcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCRMAXIUVcjs.SurfaceDraft; exports.TILE = _chunkCRMAXIUVcjs.TILE; exports.TILE_SHIFT = _chunkCRMAXIUVcjs.TILE_SHIFT; exports.TINT_SCALE = TINT_SCALE; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TiledSurface = _chunkCRMAXIUVcjs.TiledSurface; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.ZlibError = _chunkT422YCHRcjs.ZlibError; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.addLayerEffect = addLayerEffect; exports.addLayerFilter = addLayerFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = adjustmentKindLabel; exports.adjustmentLayersKey = adjustmentLayersKey; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.adler32 = _chunkT422YCHRcjs.adler32; exports.annotationLayerFor = annotationLayerFor; exports.annotationLayerName = annotationLayerName; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustments = applyAdjustments; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyMatrix3 = applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyStrokeToTile = _chunkZZOTHJ4Kcjs.applyStrokeToTile; exports.backgroundLayer = backgroundLayer; exports.base64ToBytes = _chunkT422YCHRcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.blackWhiteGray = blackWhiteGray; exports.blendChannel = _chunkCRMAXIUVcjs.blendChannel; exports.blendImageData = _chunkCRMAXIUVcjs.blendImageData; exports.blendLum = _chunkCRMAXIUVcjs.blendLum; exports.blendPixel = _chunkCRMAXIUVcjs.blendPixel; exports.blendRgb = _chunkCRMAXIUVcjs.blendRgb; exports.blendTile = _chunkT422YCHRcjs.blendTile; exports.blurFilter = blurFilter; exports.borderCoverage = borderCoverage; exports.boxMean = boxMean; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = bradfordAdaptation; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.buildToneLut = buildToneLut; exports.builtinPattern = _chunkT422YCHRcjs.builtinPattern; exports.builtinPatternIds = _chunkT422YCHRcjs.builtinPatternIds; exports.bytesToBase64 = _chunkT422YCHRcjs.bytesToBase64; exports.calculateCropDrag = calculateCropDrag; exports.canvasCompositeOperation = _chunkCRMAXIUVcjs.canvasCompositeOperation; exports.canvasToImagePoint = canvasToImagePoint; exports.changedTiles = _chunkT422YCHRcjs.changedTiles; exports.clampControlValue = clampControlValue; exports.clampCropToImage = clampCropToImage; exports.cleanMixer = _chunkZZOTHJ4Kcjs.cleanMixer; exports.collectTiles = _chunkCRMAXIUVcjs.collectTiles; exports.colorBalanceChannel = colorBalanceChannel; exports.colorRange = colorRange; exports.combineSelections = combineSelections; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = computeSelectionBounds; exports.contentBounds = _chunkCRMAXIUVcjs.contentBounds; exports.contractCoverage = contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.coverageTileCoord = _chunkZZOTHJ4Kcjs.coverageTileCoord; exports.coverageToByte = coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = createAdjustmentLayer; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createPigment = _chunkCRMAXIUVcjs.createPigment; exports.createPigmentTools = _chunkZZOTHJ4Kcjs.createPigmentTools; exports.createSelectionMask = createSelectionMask; exports.curveLut = _chunkT422YCHRcjs.curveLut; exports.curveLutFromLevels = curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkZZOTHJ4Kcjs.dabCoverage; exports.dabRect = _chunkZZOTHJ4Kcjs.dabRect; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeLayerMask = decodeLayerMask; exports.decodeMergedImage = decodeMergedImage; exports.decodePlanes = decodePlanes; exports.decodePng = _chunkT422YCHRcjs.decodePng; exports.decodePngDataUrl = decodePngDataUrl; exports.decodeSelectionRle = decodeSelectionRle; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.defaultEffectGradient = _chunkT422YCHRcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkT422YCHRcjs.defaultLayerEffect; exports.deflate = _chunkT422YCHRcjs.deflate; exports.deflateRaw = _chunkT422YCHRcjs.deflateRaw; exports.depthMaskAlpha = depthMaskAlpha; exports.depthRasterMask = depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.deserializeEffects = deserializeEffects; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.deserializePatterns = deserializePatterns; exports.deserializeSelection = deserializeSelection; exports.developFilter = developFilter; exports.developFromAdjustments = developFromAdjustments; exports.developTarget = developTarget; exports.distanceTransform = distanceTransform; exports.downloadPsd = downloadPsd; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.duplicateLayer = duplicateLayer; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkT422YCHRcjs.effectColorHex; exports.effectReach = _chunkT422YCHRcjs.effectReach; exports.effectsFingerprint = _chunkT422YCHRcjs.effectsFingerprint; exports.effectsMargin = _chunkT422YCHRcjs.effectsMargin; exports.effectsScale = _chunkT422YCHRcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCRMAXIUVcjs.emptySurface; exports.encodePng = _chunkT422YCHRcjs.encodePng; exports.encodeRle = encodeRle; exports.encodeSelectionRle = encodeSelectionRle; exports.encodeSurface = encodeSurface; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.expandCoverage = expandCoverage; exports.exportPsd = exportPsd; exports.featherCoverage = featherCoverage; exports.fillRect = _chunkCRMAXIUVcjs.fillRect; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkT422YCHRcjs.findLayer; exports.findLayerControl = findLayerControl; exports.finishTile = _chunkCRMAXIUVcjs.finishTile; exports.flattenLayers = _chunkT422YCHRcjs.flattenLayers; exports.formatControlValue = formatControlValue; exports.fullSelection = fullSelection; exports.gaussianBlur = _chunkT422YCHRcjs.gaussianBlur; exports.getAnnotationBounds = getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = getCropCursor; exports.getRotatedSize = getRotatedSize; exports.getViewportMetrics = getViewportMetrics; exports.getViewportProjection = getViewportProjection; exports.globalImageCache = globalImageCache; exports.greyMorphology = greyMorphology; exports.groupLayers = groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkT422YCHRcjs.hasActiveEffects; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.hashMaskContent = hashMaskContent; exports.hashNoise = _chunkT422YCHRcjs.hashNoise; exports.hexToRgb = hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = hitTestAnnotation; exports.hitTestCrop = hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.hslToRgb = hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = hueRangeTables; exports.hueRangeWeight = hueRangeWeight; exports.hueSaturation = hueSaturation; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageToCanvasPoint = imageToCanvasPoint; exports.importPsd = importPsd; exports.inflate = _chunkT422YCHRcjs.inflate; exports.inflateRaw = _chunkT422YCHRcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkT422YCHRcjs.insertLayer; exports.invertMatrix3 = invertMatrix3; exports.invertSelection = invertSelection; exports.isActiveFilter = isActiveFilter; exports.isAdjustmentKind = isAdjustmentKind; exports.isBlendMode = _chunkCRMAXIUVcjs.isBlendMode; exports.isDefaultDepthMask = isDefaultDepthMask; exports.isLayerEffectKind = _chunkT422YCHRcjs.isLayerEffectKind; exports.isLayerLocked = _chunkT422YCHRcjs.isLayerLocked; exports.isLegacyShape = isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPng = _chunkT422YCHRcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.isSelectionEmpty = isSelectionEmpty; exports.isSelectionMode = isSelectionMode; exports.isSeparableBlendMode = _chunkCRMAXIUVcjs.isSeparableBlendMode; exports.isSpatialFilter = isSpatialFilter; exports.kelvinToTemperature = kelvinToTemperature; exports.layerBadge = layerBadge; exports.layerEffectFields = _chunkT422YCHRcjs.layerEffectFields; exports.layerEffectLabel = _chunkT422YCHRcjs.layerEffectLabel; exports.layerEffectsOf = layerEffectsOf; exports.layerLabel = layerLabel; exports.layerMaskCoverage = layerMaskCoverage; exports.layerMaskFromSelection = layerMaskFromSelection; exports.layerMaskKey = layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = layerTree; exports.layerTypeLabel = layerTypeLabel; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.legacyMaskOf = legacyMaskOf; exports.legacyView = legacyView; exports.lerpPigment = _chunkCRMAXIUVcjs.lerpPigment; exports.lerpPigmentInto = _chunkCRMAXIUVcjs.lerpPigmentInto; exports.levelsValue = levelsValue; exports.linearSrgbToXy = linearSrgbToXy; exports.linearToSrgb = linearToSrgb; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkZZOTHJ4Kcjs.loadMixer; exports.magicWand = magicWand; exports.mapCropHandle = mapCropHandle; exports.mapLayer = _chunkT422YCHRcjs.mapLayer; exports.maskSummary = maskSummary; exports.mergeLayerEffect = _chunkT422YCHRcjs.mergeLayerEffect; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mixPigment8 = _chunkCRMAXIUVcjs.mixPigment8; exports.mixPigmentRgb = _chunkCRMAXIUVcjs.mixPigmentRgb; exports.mixPigments = _chunkCRMAXIUVcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.modifySelection = modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = moveLayer; exports.mulMatrix3 = mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = neutralHueRange; exports.newEffectId = _chunkT422YCHRcjs.newEffectId; exports.newLayerId = newLayerId; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.normalizeAngle = normalizeAngle; exports.normalizeBlendMode = _chunkCRMAXIUVcjs.normalizeBlendMode; exports.normalizeBrush = _chunkZZOTHJ4Kcjs.normalizeBrush; exports.normalizeFilter = normalizeFilter; exports.normalizeLayerEffects = _chunkT422YCHRcjs.normalizeLayerEffects; exports.normalizeLayerMask = normalizeLayerMask; exports.normalizeMixer = _chunkZZOTHJ4Kcjs.normalizeMixer; exports.normalizeProcessVersion = normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.offsetLayer = offsetLayer; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCRMAXIUVcjs.packRgba; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.parseBlend = parseBlend; exports.parseColor = parseColor; exports.parseDataUrl = _chunkT422YCHRcjs.parseDataUrl; exports.parseEffectColor = _chunkT422YCHRcjs.parseEffectColor; exports.parseLfx2 = parseLfx2; exports.parseLrfx = parseLrfx; exports.parsePatternBlock = parsePatternBlock; exports.parseSelectionMode = parseSelectionMode; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.photoFilterMatrix = photoFilterMatrix; exports.pixelLayerBounds = pixelLayerBounds; exports.pixelLayers = pixelLayers; exports.placeLayer = placeLayer; exports.pngDataUrl = _chunkT422YCHRcjs.pngDataUrl; exports.pointerPressure = pointerPressure; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = posterizeValue; exports.projectImagePoint = projectImagePoint; exports.projectImageRect = projectImageRect; exports.projectMaskCoverage = projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.psdToLayers = psdToLayers; exports.quickMaskPixels = quickMaskPixels; exports.rangeLightness = rangeLightness; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.rasterizeDab = _chunkZZOTHJ4Kcjs.rasterizeDab; exports.readAdjustmentControls = readAdjustmentControls; exports.readPixel = _chunkCRMAXIUVcjs.readPixel; exports.readPsd = readPsd; exports.readRegion = _chunkCRMAXIUVcjs.readRegion; exports.rectSelection = rectSelection; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCRMAXIUVcjs.reflectanceToRgb; exports.removeAlpha = removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = removeLayer; exports.removeLayerEffect = removeLayerEffect; exports.removeLayerFilter = removeLayerFilter; exports.renderLayerEffects = _chunkT422YCHRcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.resizePixels = resizePixels; exports.resizeSelection = resizeSelection; exports.resolveExternalAssets = resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.rgbToGray = rgbToGray; exports.rgbToHsl = rgbToHsl; exports.rgbToReflectance = _chunkCRMAXIUVcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = sampleLut; exports.sampleToneLut = sampleToneLut; exports.scaleLayerEffect = _chunkT422YCHRcjs.scaleLayerEffect; exports.selectionArea = selectionArea; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionFromPixels = selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = selectionToCoverage; exports.selectionToPixels = selectionToPixels; exports.selectionValueAt = selectionValueAt; exports.serializeEffects = serializeEffects; exports.serializeLayer = serializeLayer; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.serializePatterns = serializePatterns; exports.serializeSelection = serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = setLayerEffects; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.setLayerMask = setLayerMask; exports.setLayerProperties = setLayerProperties; exports.setLum = _chunkCRMAXIUVcjs.setLum; exports.setPigmentColor = _chunkCRMAXIUVcjs.setPigmentColor; exports.shiftCoverage = shiftCoverage; exports.smoothCoverage = smoothCoverage; exports.smoothPoints = _chunkZZOTHJ4Kcjs.smoothPoints; exports.solidSurface = _chunkCRMAXIUVcjs.solidSurface; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.srgb8ToLab = srgb8ToLab; exports.srgbToLinear = srgbToLinear; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCRMAXIUVcjs.surfaceBytes; exports.surfaceFromPixels = _chunkCRMAXIUVcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCRMAXIUVcjs.surfacesEqual; exports.tempTintToXy = tempTintToXy; exports.temperatureToKelvin = temperatureToKelvin; exports.tileCoord = _chunkCRMAXIUVcjs.tileCoord; exports.tileKey = _chunkCRMAXIUVcjs.tileKey; exports.tileRect = _chunkCRMAXIUVcjs.tileRect; exports.tilesInRect = _chunkCRMAXIUVcjs.tilesInRect; exports.tipFalloff = _chunkZZOTHJ4Kcjs.tipFalloff; exports.tipReach = _chunkZZOTHJ4Kcjs.tipReach; exports.tipShape = _chunkZZOTHJ4Kcjs.tipShape; exports.toHex = toHex2; exports.toneCurve = toneCurve; exports.toneLuts = toneLuts; exports.toneRange = toneRange; exports.translateSurface = _chunkCRMAXIUVcjs.translateSurface; exports.ungroupLayer = ungroupLayer; exports.uniformTile = _chunkCRMAXIUVcjs.uniformTile; exports.unionRect = unionRect; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.updateLayerEffect = updateLayerEffect; exports.updateLayerFilter = updateLayerFilter; exports.updateLayerMaskProps = updateLayerMaskProps; exports.uvToXy = uvToXy; exports.validateEffectGradient = _chunkT422YCHRcjs.validateEffectGradient; exports.validateLayerEffect = _chunkT422YCHRcjs.validateLayerEffect; exports.validateLayerEffects = _chunkT422YCHRcjs.validateLayerEffects; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.walkDabs = _chunkZZOTHJ4Kcjs.walkDabs; exports.wbMatrix = wbMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.withNewIds = withNewIds; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.writeLfx2 = writeLfx2; exports.writePatternBlock = writePatternBlock; exports.writePsd = writePsd; exports.writeRegion = _chunkCRMAXIUVcjs.writeRegion; exports.xyToTempTint = xyToTempTint; exports.xyToUv = xyToUv;
14598
+
14599
+
14600
+
14601
+
14602
+
14603
+ exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.BLEND_MODES = _chunkCRMAXIUVcjs.BLEND_MODES; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.CoverageMap = _chunkZZOTHJ4Kcjs.CoverageMap; exports.D50 = D50; exports.D65 = D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_BRUSH = _chunkZZOTHJ4Kcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_GLOBAL_LIGHT = _chunk4AB5BHYKcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MIXER = _chunkZZOTHJ4Kcjs.DEFAULT_MIXER; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunk4AB5BHYKcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DabWalker = _chunkZZOTHJ4Kcjs.DabWalker; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkZZOTHJ4Kcjs.EMPTY_MIXER_LOAD; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunk4AB5BHYKcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LUMA_709 = LUMA_709; exports.LayerCompositor = LayerCompositor; exports.LayerEffectError = _chunk4AB5BHYKcjs.LayerEffectError; exports.LayerOperationError = LayerOperationError; exports.MAX_BRUSH_SIZE = _chunkZZOTHJ4Kcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunk4AB5BHYKcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = MAX_KELVIN; exports.MIN_KELVIN = MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkZZOTHJ4Kcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkZZOTHJ4Kcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkZZOTHJ4Kcjs.MIXING_MODELS; exports.MixerStroke = _chunkZZOTHJ4Kcjs.MixerStroke; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCRMAXIUVcjs.PIGMENT_BANDS; exports.PIGMENT_LAMBDA_MIN = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_WAVELENGTHS = _chunkCRMAXIUVcjs.PIGMENT_WAVELENGTHS; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.PaintGesture = PaintGesture; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunk4AB5BHYKcjs.PatternPlacement; exports.PatternTile = _chunk4AB5BHYKcjs.PatternTile; exports.PsdError = PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.SELECTION_MODES = SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.StrokeCoverage = _chunkZZOTHJ4Kcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCRMAXIUVcjs.SurfaceDraft; exports.TILE = _chunkCRMAXIUVcjs.TILE; exports.TILE_SHIFT = _chunkCRMAXIUVcjs.TILE_SHIFT; exports.TINT_SCALE = TINT_SCALE; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TiledSurface = _chunkCRMAXIUVcjs.TiledSurface; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.ZlibError = _chunk4AB5BHYKcjs.ZlibError; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.addLayerEffect = addLayerEffect; exports.addLayerFilter = addLayerFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = adjustmentKindLabel; exports.adjustmentLayersKey = adjustmentLayersKey; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.adler32 = _chunk4AB5BHYKcjs.adler32; exports.annotationLayerFor = annotationLayerFor; exports.annotationLayerName = annotationLayerName; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustments = applyAdjustments; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyMatrix3 = applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyStrokeToTile = _chunkZZOTHJ4Kcjs.applyStrokeToTile; exports.backgroundLayer = backgroundLayer; exports.base64ToBytes = _chunk4AB5BHYKcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.blackWhiteGray = blackWhiteGray; exports.blendChannel = _chunkCRMAXIUVcjs.blendChannel; exports.blendImageData = _chunkCRMAXIUVcjs.blendImageData; exports.blendLum = _chunkCRMAXIUVcjs.blendLum; exports.blendPixel = _chunkCRMAXIUVcjs.blendPixel; exports.blendRgb = _chunkCRMAXIUVcjs.blendRgb; exports.blendTile = _chunk4AB5BHYKcjs.blendTile; exports.blurFilter = blurFilter; exports.borderCoverage = borderCoverage; exports.boxMean = boxMean; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = bradfordAdaptation; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.buildToneLut = buildToneLut; exports.builtinPattern = _chunk4AB5BHYKcjs.builtinPattern; exports.builtinPatternIds = _chunk4AB5BHYKcjs.builtinPatternIds; exports.bytesToBase64 = _chunk4AB5BHYKcjs.bytesToBase64; exports.calculateCropDrag = calculateCropDrag; exports.canvasCompositeOperation = _chunkCRMAXIUVcjs.canvasCompositeOperation; exports.canvasToImagePoint = canvasToImagePoint; exports.changedTiles = _chunk4AB5BHYKcjs.changedTiles; exports.clampControlValue = clampControlValue; exports.clampCropToImage = clampCropToImage; exports.cleanMixer = _chunkZZOTHJ4Kcjs.cleanMixer; exports.collectTiles = _chunkCRMAXIUVcjs.collectTiles; exports.colorBalanceChannel = colorBalanceChannel; exports.colorRange = colorRange; exports.combineSelections = combineSelections; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = computeSelectionBounds; exports.contentBounds = _chunkCRMAXIUVcjs.contentBounds; exports.contractCoverage = contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.coverageTileCoord = _chunkZZOTHJ4Kcjs.coverageTileCoord; exports.coverageToByte = coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = createAdjustmentLayer; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createPigment = _chunkCRMAXIUVcjs.createPigment; exports.createPigmentTools = _chunkZZOTHJ4Kcjs.createPigmentTools; exports.createSelectionMask = createSelectionMask; exports.curveLut = _chunk4AB5BHYKcjs.curveLut; exports.curveLutFromLevels = curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkZZOTHJ4Kcjs.dabCoverage; exports.dabRect = _chunkZZOTHJ4Kcjs.dabRect; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeLayerMask = decodeLayerMask; exports.decodeMergedImage = decodeMergedImage; exports.decodePlanes = decodePlanes; exports.decodePng = _chunk4AB5BHYKcjs.decodePng; exports.decodePngDataUrl = decodePngDataUrl; exports.decodeSelectionRle = decodeSelectionRle; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.defaultEffectGradient = _chunk4AB5BHYKcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunk4AB5BHYKcjs.defaultLayerEffect; exports.deflate = _chunk4AB5BHYKcjs.deflate; exports.deflateRaw = _chunk4AB5BHYKcjs.deflateRaw; exports.depthMaskAlpha = depthMaskAlpha; exports.depthRasterMask = depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.deserializeEffects = deserializeEffects; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.deserializePatterns = deserializePatterns; exports.deserializeSelection = deserializeSelection; exports.developFilter = developFilter; exports.developFromAdjustments = developFromAdjustments; exports.developTarget = developTarget; exports.distanceTransform = distanceTransform; exports.downloadPsd = downloadPsd; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.duplicateLayer = duplicateLayer; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunk4AB5BHYKcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectReach = _chunk4AB5BHYKcjs.effectReach; exports.effectsFingerprint = _chunk4AB5BHYKcjs.effectsFingerprint; exports.effectsMargin = _chunk4AB5BHYKcjs.effectsMargin; exports.effectsScale = _chunk4AB5BHYKcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCRMAXIUVcjs.emptySurface; exports.encodePng = _chunk4AB5BHYKcjs.encodePng; exports.encodeRle = encodeRle; exports.encodeSelectionRle = encodeSelectionRle; exports.encodeSurface = encodeSurface; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.expandCoverage = expandCoverage; exports.exportPsd = exportPsd; exports.featherCoverage = featherCoverage; exports.fillRect = _chunkCRMAXIUVcjs.fillRect; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunk4AB5BHYKcjs.findLayer; exports.findLayerControl = findLayerControl; exports.finishTile = _chunkCRMAXIUVcjs.finishTile; exports.flattenLayers = _chunk4AB5BHYKcjs.flattenLayers; exports.formatControlValue = formatControlValue; exports.fullSelection = fullSelection; exports.gaussianBlur = _chunk4AB5BHYKcjs.gaussianBlur; exports.getAnnotationBounds = getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = getCropCursor; exports.getRotatedSize = getRotatedSize; exports.getViewportMetrics = getViewportMetrics; exports.getViewportProjection = getViewportProjection; exports.globalImageCache = globalImageCache; exports.greyMorphology = greyMorphology; exports.groupLayers = groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunk4AB5BHYKcjs.hasActiveEffects; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.hashMaskContent = hashMaskContent; exports.hashNoise = _chunk4AB5BHYKcjs.hashNoise; exports.hexToRgb = hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = hitTestAnnotation; exports.hitTestCrop = hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.hslToRgb = hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = hueRangeTables; exports.hueRangeWeight = hueRangeWeight; exports.hueSaturation = hueSaturation; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageToCanvasPoint = imageToCanvasPoint; exports.importPsd = importPsd; exports.inflate = _chunk4AB5BHYKcjs.inflate; exports.inflateRaw = _chunk4AB5BHYKcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunk4AB5BHYKcjs.insertLayer; exports.invertMatrix3 = invertMatrix3; exports.invertSelection = invertSelection; exports.isActiveFilter = isActiveFilter; exports.isAdjustmentKind = isAdjustmentKind; exports.isBlendMode = _chunkCRMAXIUVcjs.isBlendMode; exports.isDefaultDepthMask = isDefaultDepthMask; exports.isLayerEffectKind = _chunk4AB5BHYKcjs.isLayerEffectKind; exports.isLayerLocked = _chunk4AB5BHYKcjs.isLayerLocked; exports.isLegacyShape = isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPng = _chunk4AB5BHYKcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.isSelectionEmpty = isSelectionEmpty; exports.isSelectionMode = isSelectionMode; exports.isSeparableBlendMode = _chunkCRMAXIUVcjs.isSeparableBlendMode; exports.isSpatialFilter = isSpatialFilter; exports.kelvinToTemperature = kelvinToTemperature; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunk4AB5BHYKcjs.layerEffectFields; exports.layerEffectLabel = _chunk4AB5BHYKcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerLabel = layerLabel; exports.layerMaskCoverage = layerMaskCoverage; exports.layerMaskFromSelection = layerMaskFromSelection; exports.layerMaskKey = layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = layerTree; exports.layerTypeLabel = layerTypeLabel; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.legacyMaskOf = legacyMaskOf; exports.legacyView = legacyView; exports.lerpPigment = _chunkCRMAXIUVcjs.lerpPigment; exports.lerpPigmentInto = _chunkCRMAXIUVcjs.lerpPigmentInto; exports.levelsValue = levelsValue; exports.linearSrgbToXy = linearSrgbToXy; exports.linearToSrgb = linearToSrgb; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkZZOTHJ4Kcjs.loadMixer; exports.magicWand = magicWand; exports.mapCropHandle = mapCropHandle; exports.mapLayer = _chunk4AB5BHYKcjs.mapLayer; exports.maskSummary = maskSummary; exports.mergeLayerEffect = _chunk4AB5BHYKcjs.mergeLayerEffect; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mixPigment8 = _chunkCRMAXIUVcjs.mixPigment8; exports.mixPigmentRgb = _chunkCRMAXIUVcjs.mixPigmentRgb; exports.mixPigments = _chunkCRMAXIUVcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.modifySelection = modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = moveLayer; exports.mulMatrix3 = mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = neutralHueRange; exports.newEffectId = _chunk4AB5BHYKcjs.newEffectId; exports.newLayerId = newLayerId; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.normalizeAngle = normalizeAngle; exports.normalizeBlendMode = _chunkCRMAXIUVcjs.normalizeBlendMode; exports.normalizeBrush = _chunkZZOTHJ4Kcjs.normalizeBrush; exports.normalizeFilter = normalizeFilter; exports.normalizeLayerEffects = _chunk4AB5BHYKcjs.normalizeLayerEffects; exports.normalizeLayerMask = normalizeLayerMask; exports.normalizeMixer = _chunkZZOTHJ4Kcjs.normalizeMixer; exports.normalizeProcessVersion = normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.offsetLayer = offsetLayer; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCRMAXIUVcjs.packRgba; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.parseBlend = parseBlend; exports.parseColor = parseColor; exports.parseDataUrl = _chunk4AB5BHYKcjs.parseDataUrl; exports.parseEffectColor = _chunk4AB5BHYKcjs.parseEffectColor; exports.parseLfx2 = parseLfx2; exports.parseLrfx = parseLrfx; exports.parsePatternBlock = parsePatternBlock; exports.parseSelectionMode = parseSelectionMode; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.photoFilterMatrix = photoFilterMatrix; exports.pixelLayerBounds = pixelLayerBounds; exports.pixelLayers = pixelLayers; exports.placeLayer = placeLayer; exports.pngDataUrl = _chunk4AB5BHYKcjs.pngDataUrl; exports.pointerPressure = pointerPressure; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = posterizeValue; exports.projectImagePoint = projectImagePoint; exports.projectImageRect = projectImageRect; exports.projectMaskCoverage = projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.psdToLayers = psdToLayers; exports.quickMaskPixels = quickMaskPixels; exports.rangeLightness = rangeLightness; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.rasterizeDab = _chunkZZOTHJ4Kcjs.rasterizeDab; exports.readAdjustmentControls = readAdjustmentControls; exports.readPixel = _chunkCRMAXIUVcjs.readPixel; exports.readPsd = readPsd; exports.readRegion = _chunkCRMAXIUVcjs.readRegion; exports.rectSelection = rectSelection; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCRMAXIUVcjs.reflectanceToRgb; exports.removeAlpha = removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = removeLayer; exports.removeLayerEffect = removeLayerEffect; exports.removeLayerFilter = removeLayerFilter; exports.renderLayerEffects = _chunk4AB5BHYKcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.resizePixels = resizePixels; exports.resizeSelection = resizeSelection; exports.resolveExternalAssets = resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.rgbToGray = rgbToGray; exports.rgbToHsl = rgbToHsl; exports.rgbToReflectance = _chunkCRMAXIUVcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = sampleLut; exports.sampleToneLut = sampleToneLut; exports.scaleLayerEffect = _chunk4AB5BHYKcjs.scaleLayerEffect; exports.selectionArea = selectionArea; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionFromPixels = selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = selectionToCoverage; exports.selectionToPixels = selectionToPixels; exports.selectionValueAt = selectionValueAt; exports.serializeEffects = serializeEffects; exports.serializeLayer = serializeLayer; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.serializePatterns = serializePatterns; exports.serializeSelection = serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = setLayerEffects; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.setLayerMask = setLayerMask; exports.setLayerProperties = setLayerProperties; exports.setLum = _chunkCRMAXIUVcjs.setLum; exports.setPigmentColor = _chunkCRMAXIUVcjs.setPigmentColor; exports.shiftCoverage = shiftCoverage; exports.smoothCoverage = smoothCoverage; exports.smoothPoints = _chunkZZOTHJ4Kcjs.smoothPoints; exports.solidSurface = _chunkCRMAXIUVcjs.solidSurface; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.srgb8ToLab = srgb8ToLab; exports.srgbToLinear = srgbToLinear; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCRMAXIUVcjs.surfaceBytes; exports.surfaceFromPixels = _chunkCRMAXIUVcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCRMAXIUVcjs.surfacesEqual; exports.tempTintToXy = tempTintToXy; exports.temperatureToKelvin = temperatureToKelvin; exports.tileCoord = _chunkCRMAXIUVcjs.tileCoord; exports.tileKey = _chunkCRMAXIUVcjs.tileKey; exports.tileRect = _chunkCRMAXIUVcjs.tileRect; exports.tilesInRect = _chunkCRMAXIUVcjs.tilesInRect; exports.tipFalloff = _chunkZZOTHJ4Kcjs.tipFalloff; exports.tipReach = _chunkZZOTHJ4Kcjs.tipReach; exports.tipShape = _chunkZZOTHJ4Kcjs.tipShape; exports.toHex = toHex2; exports.toneCurve = toneCurve; exports.toneLuts = toneLuts; exports.toneRange = toneRange; exports.translateSurface = _chunkCRMAXIUVcjs.translateSurface; exports.ungroupLayer = ungroupLayer; exports.uniformTile = _chunkCRMAXIUVcjs.uniformTile; exports.unionRect = unionRect; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.updateLayerEffect = updateLayerEffect; exports.updateLayerFilter = updateLayerFilter; exports.updateLayerMaskProps = updateLayerMaskProps; exports.uvToXy = uvToXy; exports.validateEffectGradient = _chunk4AB5BHYKcjs.validateEffectGradient; exports.validateLayerEffect = _chunk4AB5BHYKcjs.validateLayerEffect; exports.validateLayerEffects = _chunk4AB5BHYKcjs.validateLayerEffects; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.walkDabs = _chunkZZOTHJ4Kcjs.walkDabs; exports.wbMatrix = wbMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.withNewIds = withNewIds; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.writeLfx2 = writeLfx2; exports.writePatternBlock = writePatternBlock; exports.writePsd = writePsd; exports.writeRegion = _chunkCRMAXIUVcjs.writeRegion; exports.xyToTempTint = xyToTempTint; exports.xyToUv = xyToUv;
14426
14604
  //# sourceMappingURL=index.cjs.map