@pixerate/editor 0.199.0 → 0.201.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.
@@ -3049,8 +3049,9 @@ var GridGraph = class {
3049
3049
  var WORK_SIZE = 512;
3050
3050
  var workCache = /* @__PURE__ */ new WeakMap();
3051
3051
  function workImage(pixels, maxSide = WORK_SIZE) {
3052
- const cached = workCache.get(pixels.data);
3053
- if (cached && cached.maxSide === maxSide && cached.work.sourceWidth === pixels.width && cached.work.sourceHeight === pixels.height) return cached.work;
3052
+ const sizes = workCache.get(pixels.data);
3053
+ const cached = _optionalChain([sizes, 'optionalAccess', _64 => _64.get, 'call', _65 => _65(maxSide)]);
3054
+ if (cached && cached.sourceWidth === pixels.width && cached.sourceHeight === pixels.height) return cached;
3054
3055
  const { width: W, height: H, data } = pixels;
3055
3056
  const scale = Math.min(1, maxSide / Math.max(W, H));
3056
3057
  const w = Math.max(1, Math.round(W * scale));
@@ -3079,7 +3080,8 @@ function workImage(pixels, maxSide = WORK_SIZE) {
3079
3080
  rgb[i * 3 + 2] = sum[i * 3 + 2] / c;
3080
3081
  }
3081
3082
  const work = { sourceWidth: W, sourceHeight: H, width: w, height: h, scale: w / W, rgb };
3082
- workCache.set(pixels.data, { maxSide, work });
3083
+ if (sizes) sizes.set(maxSide, work);
3084
+ else workCache.set(pixels.data, /* @__PURE__ */ new Map([[maxSide, work]]));
3083
3085
  return work;
3084
3086
  }
3085
3087
  var GAMMA = 50;
@@ -3300,7 +3302,7 @@ function segmentStroke(work, stroke, grown, start) {
3300
3302
  const bin = binOf(rgb, g);
3301
3303
  bgHist[bin]++;
3302
3304
  bgN++;
3303
- if (stroke.mask[g] || _optionalChain([grown, 'optionalAccess', _64 => _64[g]])) {
3305
+ if (stroke.mask[g] || _optionalChain([grown, 'optionalAccess', _66 => _66[g]])) {
3304
3306
  fgHist[bin]++;
3305
3307
  fgN++;
3306
3308
  }
@@ -3382,7 +3384,7 @@ function quickSelectStroke(pixels, stroke, options = {}) {
3382
3384
  const roi = { x: rx, y: ry, width: Math.min(w, Math.ceil(x1 + margin)) - rx, height: Math.min(h, Math.ceil(y1 + margin)) - ry };
3383
3385
  let grown = null;
3384
3386
  const sel = options.grow ? options.selection : null;
3385
- if (_optionalChain([sel, 'optionalAccess', _65 => _65.bounds])) {
3387
+ if (_optionalChain([sel, 'optionalAccess', _67 => _67.bounds])) {
3386
3388
  grown = new Uint8Array(w * h);
3387
3389
  const b = sel.bounds;
3388
3390
  for (let y = Math.max(0, Math.floor(b.y * scale)); y < Math.min(h, Math.ceil((b.y + b.height) * scale)); y++) {
@@ -3554,7 +3556,7 @@ function grabCutLabels(work, setup, iterations) {
3554
3556
  const graph = new GridGraph(rw, rh);
3555
3557
  for (let p = 0; p < n; p++) {
3556
3558
  if (hardBg[p]) graph.addTerminal(p, 0, HARD);
3557
- else if (_optionalChain([hardFg, 'optionalAccess', _66 => _66[p]])) graph.addTerminal(p, HARD, 0);
3559
+ else if (_optionalChain([hardFg, 'optionalAccess', _68 => _68[p]])) graph.addTerminal(p, HARD, 0);
3558
3560
  else {
3559
3561
  const i = global[p] * 3;
3560
3562
  graph.addTerminal(p, Math.round(bg.cost(rgb[i], rgb[i + 1], rgb[i + 2]) * UNITS), Math.round(fg.cost(rgb[i], rgb[i + 1], rgb[i + 2]) * UNITS));
@@ -3690,14 +3692,14 @@ function toLab(r, g, b) {
3690
3692
  function slicSuperpixels(work, target = 400, compactness = 10, rounds = 5) {
3691
3693
  const { width: w, height: h, rgb } = work;
3692
3694
  const n = w * h;
3693
- const lab = new Float32Array(n * 3);
3694
- for (let i = 0; i < n; i++) lab.set(toLab(rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]), i * 3);
3695
+ const lab2 = new Float32Array(n * 3);
3696
+ for (let i = 0; i < n; i++) lab2.set(toLab(rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]), i * 3);
3695
3697
  const S = Math.max(2, Math.round(Math.sqrt(n / target)));
3696
3698
  const seeds = [];
3697
3699
  for (let y = Math.floor(S / 2); y < h; y += S) {
3698
3700
  for (let x = Math.floor(S / 2); x < w; x += S) {
3699
3701
  const i = y * w + x;
3700
- seeds.push([lab[i * 3], lab[i * 3 + 1], lab[i * 3 + 2], x, y]);
3702
+ seeds.push([lab2[i * 3], lab2[i * 3 + 1], lab2[i * 3 + 2], x, y]);
3701
3703
  }
3702
3704
  }
3703
3705
  const k = seeds.length;
@@ -3715,7 +3717,7 @@ function slicSuperpixels(work, target = 400, compactness = 10, rounds = 5) {
3715
3717
  for (let y = y0; y <= y1; y++) {
3716
3718
  for (let x = x0; x <= x1; x++) {
3717
3719
  const i = y * w + x;
3718
- const d = (lab[i * 3] - L) ** 2 + (lab[i * 3 + 1] - A) ** 2 + (lab[i * 3 + 2] - B) ** 2 + m2 * ((x - cx) ** 2 + (y - cy) ** 2);
3720
+ const d = (lab2[i * 3] - L) ** 2 + (lab2[i * 3 + 1] - A) ** 2 + (lab2[i * 3 + 2] - B) ** 2 + m2 * ((x - cx) ** 2 + (y - cy) ** 2);
3719
3721
  if (d < best[i]) {
3720
3722
  best[i] = d;
3721
3723
  label[i] = c;
@@ -3726,9 +3728,9 @@ function slicSuperpixels(work, target = 400, compactness = 10, rounds = 5) {
3726
3728
  const sum = new Float64Array(k * 6);
3727
3729
  for (let i = 0; i < n; i++) {
3728
3730
  const c = label[i];
3729
- sum[c * 6] += lab[i * 3];
3730
- sum[c * 6 + 1] += lab[i * 3 + 1];
3731
- sum[c * 6 + 2] += lab[i * 3 + 2];
3731
+ sum[c * 6] += lab2[i * 3];
3732
+ sum[c * 6 + 1] += lab2[i * 3 + 1];
3733
+ sum[c * 6 + 2] += lab2[i * 3 + 2];
3732
3734
  sum[c * 6 + 3] += i % w;
3733
3735
  sum[c * 6 + 4] += Math.floor(i / w);
3734
3736
  sum[c * 6 + 5]++;
@@ -3746,9 +3748,9 @@ function slicSuperpixels(work, target = 400, compactness = 10, rounds = 5) {
3746
3748
  const size = new Int32Array(count);
3747
3749
  for (let i = 0; i < n; i++) {
3748
3750
  const c = label[i] = remap[label[i]];
3749
- meanLab[c * 3] += lab[i * 3];
3750
- meanLab[c * 3 + 1] += lab[i * 3 + 1];
3751
- meanLab[c * 3 + 2] += lab[i * 3 + 2];
3751
+ meanLab[c * 3] += lab2[i * 3];
3752
+ meanLab[c * 3 + 1] += lab2[i * 3 + 1];
3753
+ meanLab[c * 3 + 2] += lab2[i * 3 + 2];
3752
3754
  centre[c * 2] += i % w;
3753
3755
  centre[c * 2 + 1] += Math.floor(i / w);
3754
3756
  size[c]++;
@@ -3761,8 +3763,8 @@ function slicSuperpixels(work, target = 400, compactness = 10, rounds = 5) {
3761
3763
  return { label, count, lab: meanLab, centre, size };
3762
3764
  }
3763
3765
  function superpixelSaliency(sp, width, height) {
3764
- const { count, lab, centre, size, label } = sp;
3765
- const dist = (a, b) => Math.hypot(lab[a * 3] - lab[b * 3], lab[a * 3 + 1] - lab[b * 3 + 1], lab[a * 3 + 2] - lab[b * 3 + 2]);
3766
+ const { count, lab: lab2, centre, size, label } = sp;
3767
+ const dist = (a, b) => Math.hypot(lab2[a * 3] - lab2[b * 3], lab2[a * 3 + 1] - lab2[b * 3 + 1], lab2[a * 3 + 2] - lab2[b * 3 + 2]);
3766
3768
  const onBorder = new Uint8Array(count);
3767
3769
  for (let x = 0; x < width; x++) {
3768
3770
  onBorder[label[x]] = 1;
@@ -3875,6 +3877,463 @@ function findSubject(pixels, options = {}) {
3875
3877
  return { selection: upscaleRegion(work, pixels, roi, label, _nullishCoalesce(options.enhanceEdge, () => ( false))) };
3876
3878
  }
3877
3879
 
3880
+ // src/image-editor/selection/refine.ts
3881
+ var DEFAULT_REFINE_EDGE_PARAMS = {
3882
+ radius: 0,
3883
+ smartRadius: false,
3884
+ smooth: 0,
3885
+ feather: 0,
3886
+ contrast: 0,
3887
+ shiftEdge: 0
3888
+ };
3889
+ var GUIDED_FILTER_EPS = 1e-4;
3890
+ var fin = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
3891
+ function normalizeRefineEdgeParams(p = {}) {
3892
+ return {
3893
+ radius: Math.min(250, Math.max(0, fin(p.radius, 0))),
3894
+ smartRadius: p.smartRadius === true,
3895
+ smooth: Math.min(100, Math.max(0, fin(p.smooth, 0))),
3896
+ feather: Math.min(1e3, Math.max(0, fin(p.feather, 0))),
3897
+ contrast: Math.min(100, Math.max(0, fin(p.contrast, 0))),
3898
+ shiftEdge: Math.min(100, Math.max(-100, fin(p.shiftEdge, 0)))
3899
+ };
3900
+ }
3901
+ var gfRadius = (p) => Math.min(64, Math.max(1, Math.ceil(p.radius)));
3902
+ var smoothSigma = (p) => p.smooth / 100 * 4;
3903
+ var featherSigma = (p) => p.feather / 2;
3904
+ function shiftAmount(p) {
3905
+ const px2 = p.shiftEdge / 100 * Math.max(p.radius, 4);
3906
+ return Number.isFinite(px2) ? Math.min(64, Math.max(-64, px2)) : 0;
3907
+ }
3908
+ function refineEdgeHalo(params = {}) {
3909
+ const p = normalizeRefineEdgeParams(params);
3910
+ const g = gfRadius(p);
3911
+ const edge = p.radius > 0 ? Math.max(Math.ceil(p.radius), 2 * g + (p.smartRadius ? g + 1 : 0)) : 0;
3912
+ return edge + Math.ceil(3 * smoothSigma(p)) + Math.ceil(3 * featherSigma(p)) + Math.ceil(Math.abs(shiftAmount(p))) + 2;
3913
+ }
3914
+ function boxMean(src, w, h, r) {
3915
+ const tmp = new Float32Array(w * h);
3916
+ const pre = new Float64Array(Math.max(w, h) + 1);
3917
+ for (let y = 0; y < h; y++) {
3918
+ const row = y * w;
3919
+ for (let x = 0; x < w; x++) pre[x + 1] = pre[x] + src[row + x];
3920
+ for (let x = 0; x < w; x++) {
3921
+ const lo = Math.max(0, x - r);
3922
+ const hi = Math.min(w, x + r + 1);
3923
+ tmp[row + x] = (pre[hi] - pre[lo]) / (hi - lo);
3924
+ }
3925
+ }
3926
+ const out = new Float32Array(w * h);
3927
+ for (let x = 0; x < w; x++) {
3928
+ for (let y = 0; y < h; y++) pre[y + 1] = pre[y] + tmp[y * w + x];
3929
+ for (let y = 0; y < h; y++) {
3930
+ const lo = Math.max(0, y - r);
3931
+ const hi = Math.min(h, y + r + 1);
3932
+ out[y * w + x] = (pre[hi] - pre[lo]) / (hi - lo);
3933
+ }
3934
+ }
3935
+ return out;
3936
+ }
3937
+ function guidedFilterColor(guide, p, w, h, r, eps = GUIDED_FILTER_EPS) {
3938
+ const n = w * h;
3939
+ const [c0, c1, c2] = guide;
3940
+ const prod = (a, b2) => {
3941
+ const o = new Float32Array(n);
3942
+ for (let i = 0; i < n; i++) o[i] = a[i] * b2[i];
3943
+ return o;
3944
+ };
3945
+ const m0 = boxMean(c0, w, h, r);
3946
+ const m1 = boxMean(c1, w, h, r);
3947
+ const m2 = boxMean(c2, w, h, r);
3948
+ const mp = boxMean(p, w, h, r);
3949
+ const mip0 = boxMean(prod(c0, p), w, h, r);
3950
+ const mip1 = boxMean(prod(c1, p), w, h, r);
3951
+ const mip2 = boxMean(prod(c2, p), w, h, r);
3952
+ const s00 = boxMean(prod(c0, c0), w, h, r);
3953
+ const s01 = boxMean(prod(c0, c1), w, h, r);
3954
+ const s02 = boxMean(prod(c0, c2), w, h, r);
3955
+ const s11 = boxMean(prod(c1, c1), w, h, r);
3956
+ const s12 = boxMean(prod(c1, c2), w, h, r);
3957
+ const s22 = boxMean(prod(c2, c2), w, h, r);
3958
+ const a0 = new Float32Array(n);
3959
+ const a1 = new Float32Array(n);
3960
+ const a2 = new Float32Array(n);
3961
+ const b = new Float32Array(n);
3962
+ for (let i = 0; i < n; i++) {
3963
+ const u0 = m0[i], u1 = m1[i], u2 = m2[i], up = mp[i];
3964
+ const rr = s00[i] - u0 * u0 + eps;
3965
+ const rg = s01[i] - u0 * u1;
3966
+ const rb = s02[i] - u0 * u2;
3967
+ const gg = s11[i] - u1 * u1 + eps;
3968
+ const gb = s12[i] - u1 * u2;
3969
+ const bb = s22[i] - u2 * u2 + eps;
3970
+ const v0 = mip0[i] - u0 * up;
3971
+ const v1 = mip1[i] - u1 * up;
3972
+ const v2 = mip2[i] - u2 * up;
3973
+ const i00 = gg * bb - gb * gb;
3974
+ const i01 = gb * rb - rg * bb;
3975
+ const i02 = rg * gb - gg * rb;
3976
+ const i11 = rr * bb - rb * rb;
3977
+ const i12 = rb * rg - rr * gb;
3978
+ const i22 = rr * gg - rg * rg;
3979
+ const det = rr * i00 + rg * i01 + rb * i02;
3980
+ let x0 = 0, x1 = 0, x2 = 0;
3981
+ if (Math.abs(det) >= 1e-30) {
3982
+ x0 = (i00 * v0 + i01 * v1 + i02 * v2) / det;
3983
+ x1 = (i01 * v0 + i11 * v1 + i12 * v2) / det;
3984
+ x2 = (i02 * v0 + i12 * v1 + i22 * v2) / det;
3985
+ }
3986
+ a0[i] = x0;
3987
+ a1[i] = x1;
3988
+ a2[i] = x2;
3989
+ b[i] = up - x0 * u0 - x1 * u1 - x2 * u2;
3990
+ }
3991
+ const ma0 = boxMean(a0, w, h, r);
3992
+ const ma1 = boxMean(a1, w, h, r);
3993
+ const ma2 = boxMean(a2, w, h, r);
3994
+ const mb = boxMean(b, w, h, r);
3995
+ const out = new Float32Array(n);
3996
+ for (let i = 0; i < n; i++) out[i] = ma0[i] * c0[i] + ma1[i] * c1[i] + ma2[i] * c2[i] + mb[i];
3997
+ return out;
3998
+ }
3999
+ function edgeWidth(guide, w, h, r) {
4000
+ const n = w * h;
4001
+ const y = new Float32Array(n);
4002
+ for (let i = 0; i < n; i++) y[i] = 0.299 * guide[0][i] + 0.587 * guide[1][i] + 0.114 * guide[2][i];
4003
+ const g = new Float32Array(n);
4004
+ for (let yy = 0; yy < h; yy++) {
4005
+ for (let xx = 0; xx < w; xx++) {
4006
+ const gx = (y[yy * w + Math.min(w - 1, xx + 1)] - y[yy * w + Math.max(0, xx - 1)]) / 2;
4007
+ const gy = (y[Math.min(h - 1, yy + 1) * w + xx] - y[Math.max(0, yy - 1) * w + xx]) / 2;
4008
+ g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
4009
+ }
4010
+ }
4011
+ const gm = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, g, w, h, r, true);
4012
+ const hi = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, true);
4013
+ const lo = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, false);
4014
+ const out = new Float32Array(n);
4015
+ for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
4016
+ return out;
4017
+ }
4018
+ function refineCoverage(guide, m, w, h, params = {}) {
4019
+ const p = normalizeRefineEdgeParams(params);
4020
+ let a = Float32Array.from(m);
4021
+ if (p.radius > 0 && guide) {
4022
+ const n = w * h;
4023
+ const boundary = new Uint8Array(n);
4024
+ let any = false;
4025
+ for (let y = 0; y < h; y++) {
4026
+ for (let x = 0; x < w; x++) {
4027
+ const i = y * w + x;
4028
+ const v = m[i] >= 0.5;
4029
+ const diff = x > 0 && m[i - 1] >= 0.5 !== v || x + 1 < w && m[i + 1] >= 0.5 !== v || y > 0 && m[i - w] >= 0.5 !== v || y + 1 < h && m[i + w] >= 0.5 !== v;
4030
+ if (diff) {
4031
+ boundary[i] = 1;
4032
+ any = true;
4033
+ }
4034
+ }
4035
+ }
4036
+ if (any) {
4037
+ const dist = _chunkUYXL6ZWQcjs.distanceTransform.call(void 0, boundary, w, h);
4038
+ const r = gfRadius(p);
4039
+ const q = guidedFilterColor(guide, m, w, h, r);
4040
+ const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
4041
+ for (let i = 0; i < n; i++) {
4042
+ const reff = widths ? Math.min(Math.max(p.radius, 1.5), Math.max(1.5, widths[i])) : p.radius;
4043
+ const wgt = Math.min(1, Math.max(0, reff + 1 - dist[i]));
4044
+ if (wgt > 0) {
4045
+ const qi = Math.min(1, Math.max(0, q[i]));
4046
+ a[i] = m[i] + (qi - m[i]) * wgt;
4047
+ }
4048
+ }
4049
+ }
4050
+ }
4051
+ const ss = smoothSigma(p);
4052
+ if (ss >= 0.3) {
4053
+ a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, ss, "clamp");
4054
+ const gain = 1 + ss;
4055
+ for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
4056
+ }
4057
+ a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, featherSigma(p), "clamp");
4058
+ if (p.contrast > 0) {
4059
+ const gain = 1 / (1 - 0.99 * p.contrast / 100);
4060
+ for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
4061
+ }
4062
+ const amount = shiftAmount(p);
4063
+ if (Math.abs(amount) >= 1e-4) a = _chunkUYXL6ZWQcjs.shiftCoverage.call(void 0, a, w, h, amount);
4064
+ return a;
4065
+ }
4066
+ function guidePlanes(pixels, win) {
4067
+ const box = _nullishCoalesce(win, () => ( { x: 0, y: 0, width: pixels.width, height: pixels.height }));
4068
+ const n = box.width * box.height;
4069
+ const r = new Float32Array(n);
4070
+ const g = new Float32Array(n);
4071
+ const b = new Float32Array(n);
4072
+ const d = pixels.data;
4073
+ for (let y = 0; y < box.height; y++) {
4074
+ for (let x = 0; x < box.width; x++) {
4075
+ const i = y * box.width + x;
4076
+ const p = ((box.y + y) * pixels.width + box.x + x) * 4;
4077
+ r[i] = d[p] / 255;
4078
+ g[i] = d[p + 1] / 255;
4079
+ b[i] = d[p + 2] / 255;
4080
+ }
4081
+ }
4082
+ return [r, g, b];
4083
+ }
4084
+ function refineSelection(pixels, mask, params = {}) {
4085
+ const p = normalizeRefineEdgeParams(params);
4086
+ if (pixels && (pixels.width !== mask.width || pixels.height !== mask.height)) {
4087
+ throw new Error("Refine Edge needs pixels the size of the selection");
4088
+ }
4089
+ if (!mask.bounds) return mask;
4090
+ const halo = refineEdgeHalo(p);
4091
+ const x0 = Math.max(0, mask.bounds.x - halo);
4092
+ const y0 = Math.max(0, mask.bounds.y - halo);
4093
+ const x1 = Math.min(mask.width, mask.bounds.x + mask.bounds.width + halo);
4094
+ const y1 = Math.min(mask.height, mask.bounds.y + mask.bounds.height + halo);
4095
+ const ww = x1 - x0;
4096
+ const wh = y1 - y0;
4097
+ const m = new Float32Array(ww * wh);
4098
+ for (let y = 0; y < wh; y++) {
4099
+ const src = (y0 + y) * mask.width + x0;
4100
+ for (let x = 0; x < ww; x++) m[y * ww + x] = mask.data[src + x] / 255;
4101
+ }
4102
+ const guide = pixels && p.radius > 0 ? guidePlanes(pixels, { x: x0, y: y0, width: ww, height: wh }) : null;
4103
+ const refined = refineCoverage(guide, m, ww, wh, p);
4104
+ const out = new Uint8Array(mask.width * mask.height);
4105
+ for (let y = 0; y < wh; y++) {
4106
+ const dst = (y0 + y) * mask.width + x0;
4107
+ for (let x = 0; x < ww; x++) out[dst + x] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, refined[y * ww + x]);
4108
+ }
4109
+ return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
4110
+ }
4111
+
4112
+ // src/image-editor/selection/segment/guided.ts
4113
+ function workPlanes(work) {
4114
+ const n = work.width * work.height;
4115
+ const planes = [new Float32Array(n), new Float32Array(n), new Float32Array(n)];
4116
+ for (let i = 0; i < n; i++) for (let c = 0; c < 3; c++) planes[c][i] = work.rgb[i * 3 + c] / 255;
4117
+ return planes;
4118
+ }
4119
+ function workLuma(work) {
4120
+ const n = work.width * work.height;
4121
+ const out = new Float32Array(n);
4122
+ const { rgb } = work;
4123
+ for (let i = 0; i < n; i++) out[i] = (0.299 * rgb[i * 3] + 0.587 * rgb[i * 3 + 1] + 0.114 * rgb[i * 3 + 2]) / 255;
4124
+ return out;
4125
+ }
4126
+ function softMaskToSelection(work, mask) {
4127
+ const { sourceWidth: W, sourceHeight: H, width: w, height: h, scale } = work;
4128
+ const out = new Uint8Array(W * H);
4129
+ const col = new Int32Array(W);
4130
+ const fx = new Float32Array(W);
4131
+ for (let X = 0; X < W; X++) {
4132
+ const u = Math.min(w - 1, Math.max(0, (X + 0.5) * scale - 0.5));
4133
+ col[X] = Math.min(w - 2, Math.floor(u));
4134
+ fx[X] = u - col[X];
4135
+ if (w === 1) {
4136
+ col[X] = 0;
4137
+ fx[X] = 0;
4138
+ }
4139
+ }
4140
+ for (let Y = 0; Y < H; Y++) {
4141
+ const v = Math.min(h - 1, Math.max(0, (Y + 0.5) * scale - 0.5));
4142
+ const j = h === 1 ? 0 : Math.min(h - 2, Math.floor(v));
4143
+ const fy = h === 1 ? 0 : v - j;
4144
+ const r0 = j * w;
4145
+ const r1 = h === 1 ? r0 : r0 + w;
4146
+ for (let X = 0; X < W; X++) {
4147
+ const i = col[X];
4148
+ const i1 = w === 1 ? i : i + 1;
4149
+ const t = fx[X];
4150
+ const m = (mask[r0 + i] * (1 - t) + mask[r0 + i1] * t) * (1 - fy) + (mask[r1 + i] * (1 - t) + mask[r1 + i1] * t) * fy;
4151
+ out[Y * W + X] = Math.round(Math.min(1, Math.max(0, m)) * 255);
4152
+ }
4153
+ }
4154
+ return _chunkUYXL6ZWQcjs.selectionFromRegion.call(void 0, W, H, { x: 0, y: 0, width: W, height: H }, out);
4155
+ }
4156
+
4157
+ // src/image-editor/selection/segment/focus.ts
4158
+ var FOCUS_SIZE = 1024;
4159
+ function estimateNoise(luma2, w, h) {
4160
+ if (w < 3 || h < 3) return 0;
4161
+ let sum = 0;
4162
+ for (let y = 1; y < h - 1; y++) {
4163
+ for (let x = 1; x < w - 1; x++) {
4164
+ const i = y * w + x;
4165
+ const v = luma2[i - w - 1] - 2 * luma2[i - w] + luma2[i - w + 1] - 2 * luma2[i - 1] + 4 * luma2[i] - 2 * luma2[i + 1] + luma2[i + w - 1] - 2 * luma2[i + w] + luma2[i + w + 1];
4166
+ sum += Math.abs(v);
4167
+ }
4168
+ }
4169
+ return Math.sqrt(Math.PI / 2) * sum / (6 * (w - 2) * (h - 2));
4170
+ }
4171
+ function focusArea(pixels, options = {}) {
4172
+ const work = workImage(pixels, FOCUS_SIZE);
4173
+ const { width: w, height: h, scale } = work;
4174
+ const n = w * h;
4175
+ const luma2 = workLuma(work);
4176
+ const sigma = estimateNoise(luma2, w, h);
4177
+ const noise = Math.min(100, Math.max(0, _nullishCoalesce(options.noise, () => ( 0))));
4178
+ const floor = 2 * sigma * (1 + noise / 25);
4179
+ const detail = new Float32Array(n);
4180
+ for (let y = 1; y < h - 1; y++) {
4181
+ for (let x = 1; x < w - 1; x++) {
4182
+ const i = y * w + x;
4183
+ const lap = Math.abs(4 * luma2[i] - luma2[i - 1] - luma2[i + 1] - luma2[i - w] - luma2[i + w]);
4184
+ const d = Math.max(0, lap - floor);
4185
+ detail[i] = d * d;
4186
+ }
4187
+ }
4188
+ const r = Math.max(2, Math.round(0.012 * Math.max(w, h)));
4189
+ const energy = boxMean(detail, w, h, r);
4190
+ const sharp = new Float32Array(n);
4191
+ for (let i = 0; i < n; i++) sharp[i] = Math.log1p(Math.sqrt(energy[i]) * 400);
4192
+ const sorted = Float32Array.from(sharp).sort();
4193
+ const top = sorted[Math.floor(n * 0.995)] || 1;
4194
+ for (let i = 0; i < n; i++) sharp[i] = Math.min(1, sharp[i] / top);
4195
+ const ones = new Float32Array(n).fill(1);
4196
+ const otsu = otsuThreshold(sharp, ones);
4197
+ const range = Math.min(100, Math.max(0, _nullishCoalesce(options.range, () => ( 50))));
4198
+ const t = Math.min(0.98, otsu * Math.pow(2, (50 - range) / 25));
4199
+ let mask = new Float32Array(n);
4200
+ for (let i = 0; i < n; i++) mask[i] = sharp[i] >= t ? 1 : 0;
4201
+ const c = 2 * r;
4202
+ const grown = boxMean(mask, w, h, c);
4203
+ for (let i = 0; i < n; i++) grown[i] = grown[i] > 1e-3 ? 1 : 0;
4204
+ const shrunk = boxMean(grown, w, h, c);
4205
+ for (let i = 0; i < n; i++) mask[i] = shrunk[i] >= 0.999 ? 1 : 0;
4206
+ const pulled = boxMean(mask, w, h, Math.max(1, Math.round(r / 2)));
4207
+ for (let i = 0; i < n; i++) mask[i] = pulled[i] >= 0.999 ? 1 : 0;
4208
+ const softness = Math.max(0, _nullishCoalesce(options.softness, () => ( 4))) * scale;
4209
+ if (softness > 0) {
4210
+ const fitted = guidedFilterColor(workPlanes(work), mask, w, h, Math.max(1, Math.round(softness * 2)), 1e-3);
4211
+ for (let i = 0; i < n; i++) mask[i] = Math.min(1, Math.max(0, fitted[i]));
4212
+ }
4213
+ return { selection: softMaskToSelection(work, mask), noiseLevel: Math.round(sigma * 255 * 10) / 10 };
4214
+ }
4215
+
4216
+ // src/image-editor/selection/segment/sky.ts
4217
+ var SKY_SIZE = 768;
4218
+ function lab(r, g, b) {
4219
+ const lin = (v) => {
4220
+ v /= 255;
4221
+ return v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
4222
+ };
4223
+ const R = lin(r);
4224
+ const G = lin(g);
4225
+ const B = lin(b);
4226
+ const f = (t) => t > 8856e-6 ? Math.cbrt(t) : 7.787 * t + 16 / 116;
4227
+ const x = f((0.4124 * R + 0.3576 * G + 0.1805 * B) / 0.95047);
4228
+ const y = f(0.2126 * R + 0.7152 * G + 0.0722 * B);
4229
+ const z = f((0.0193 * R + 0.1192 * G + 0.9505 * B) / 1.08883);
4230
+ return [116 * y - 16, 500 * (x - y), 200 * (y - z)];
4231
+ }
4232
+ var sigmoid = (v) => 1 / (1 + Math.exp(-v));
4233
+ function findSky(pixels, options = {}) {
4234
+ const work = workImage(pixels, SKY_SIZE);
4235
+ const { width: w, height: h, rgb, scale } = work;
4236
+ const n = w * h;
4237
+ const L = new Float32Array(n);
4238
+ const A = new Float32Array(n);
4239
+ const B = new Float32Array(n);
4240
+ for (let i = 0; i < n; i++) {
4241
+ const [l, a, b] = lab(rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]);
4242
+ L[i] = l;
4243
+ A[i] = a;
4244
+ B[i] = b;
4245
+ }
4246
+ const luma2 = boxMean(workLuma(work), w, h, 1);
4247
+ const grad = new Float32Array(n);
4248
+ for (let y = 0; y < h; y++) {
4249
+ for (let x = 0; x < w; x++) {
4250
+ const i = y * w + x;
4251
+ const gx = x + 1 < w ? luma2[i + 1] - luma2[i] : 0;
4252
+ const gy = y + 1 < h ? luma2[i + w] - luma2[i] : 0;
4253
+ grad[i] = Math.hypot(gx, gy);
4254
+ }
4255
+ }
4256
+ const roughR = Math.max(1, Math.round(6e-3 * Math.max(w, h)));
4257
+ const rough = boxMean(grad, w, h, roughR);
4258
+ const score = new Float32Array(n);
4259
+ for (let i = 0; i < n; i++) {
4260
+ const chroma = Math.hypot(A[i], B[i]);
4261
+ const blue = sigmoid((-B[i] - 6) / 4) * sigmoid((L[i] - 35) / 6);
4262
+ const grey = sigmoid((L[i] - 68) / 5) * sigmoid((18 - chroma) / 4);
4263
+ const smooth = Math.exp(-rough[i] / 0.02);
4264
+ const y = Math.floor(i / w) / h;
4265
+ const high = 1 - 0.35 * y;
4266
+ score[i] = Math.max(blue, grey) * smooth * high;
4267
+ }
4268
+ const threshold = Math.min(100, Math.max(0, _nullishCoalesce(options.threshold, () => ( 50))));
4269
+ const t = 0.55 - (threshold - 50) * 6e-3;
4270
+ const sky = new Uint8Array(n);
4271
+ const stack = [];
4272
+ const seedRows = Math.max(1, Math.round(h * 0.04));
4273
+ for (let y = 0; y < seedRows; y++) {
4274
+ for (let x = 0; x < w; x++) {
4275
+ const i = y * w + x;
4276
+ if (score[i] >= t) {
4277
+ sky[i] = 1;
4278
+ stack.push(i);
4279
+ }
4280
+ }
4281
+ }
4282
+ if (!stack.length) return { selection: _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height), reason: "No sky was found along the top of the image." };
4283
+ const low = t * 0.7;
4284
+ while (stack.length) {
4285
+ const p = stack.pop();
4286
+ const x = p % w;
4287
+ for (const q of [x + 1 < w ? p + 1 : -1, x > 0 ? p - 1 : -1, p + w < n ? p + w : -1, p - w]) {
4288
+ if (q < 0 || sky[q] || score[q] < low) continue;
4289
+ if (Math.hypot(L[q] - L[p], A[q] - A[p], B[q] - B[p]) > 6) continue;
4290
+ sky[q] = 1;
4291
+ stack.push(q);
4292
+ }
4293
+ }
4294
+ let count = 0;
4295
+ const mean = [0, 0, 0];
4296
+ for (let i = 0; i < n; i++) {
4297
+ if (!sky[i]) continue;
4298
+ mean[0] += L[i];
4299
+ mean[1] += A[i];
4300
+ mean[2] += B[i];
4301
+ count++;
4302
+ }
4303
+ for (let k = 0; k < 3; k++) mean[k] /= count;
4304
+ let spread = 0;
4305
+ for (let i = 0; i < n; i++) if (sky[i]) spread += (L[i] - mean[0]) ** 2 + (A[i] - mean[1]) ** 2 + (B[i] - mean[2]) ** 2;
4306
+ const limit = Math.max(8, 2.5 * Math.sqrt(spread / count));
4307
+ for (let i = 0; i < n; i++) {
4308
+ if (sky[i] || score[i] < t) continue;
4309
+ if (Math.hypot(L[i] - mean[0], A[i] - mean[1], B[i] - mean[2]) <= limit) sky[i] = 1;
4310
+ }
4311
+ let front = [];
4312
+ for (let i = 0; i < n; i++) if (sky[i]) front.push(i);
4313
+ for (let step = 0; step <= roughR + 1 && front.length; step++) {
4314
+ const next = [];
4315
+ for (const p of front) {
4316
+ const x = p % w;
4317
+ for (const q of [x + 1 < w ? p + 1 : -1, x > 0 ? p - 1 : -1, p + w < n ? p + w : -1, p - w]) {
4318
+ if (q < 0 || sky[q]) continue;
4319
+ if (Math.hypot(L[q] - mean[0], A[q] - mean[1], B[q] - mean[2]) > limit) continue;
4320
+ sky[q] = 1;
4321
+ next.push(q);
4322
+ }
4323
+ }
4324
+ front = next;
4325
+ }
4326
+ if (count < n * 5e-3) return { selection: _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height), reason: "No sky was found along the top of the image." };
4327
+ let mask = Float32Array.from(sky);
4328
+ const softness = Math.max(0, _nullishCoalesce(options.softness, () => ( 4))) * scale;
4329
+ if (softness > 0) {
4330
+ const fitted = guidedFilterColor(workPlanes(work), mask, w, h, Math.max(1, Math.round(softness * 2)), 1e-3);
4331
+ mask = new Float32Array(n);
4332
+ for (let i = 0; i < n; i++) mask[i] = Math.min(1, Math.max(0, fitted[i]));
4333
+ }
4334
+ return { selection: softMaskToSelection(work, mask) };
4335
+ }
4336
+
3878
4337
  // src/image-editor/layers/shape-type-ui.ts
3879
4338
  var DEFAULT_SHAPE_TOOL_OPTIONS = {
3880
4339
  kind: "rect",
@@ -3987,11 +4446,11 @@ function applyShapeOptions(controller, layerId, change) {
3987
4446
  const style = {};
3988
4447
  if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
3989
4448
  if ("stroke" in change || "strokeWidth" in change) {
3990
- const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _67 => _67.stroke, 'optionalAccess', _68 => _68.paint, 'access', _69 => _69.type]) === "color" ? info.stroke.paint.color : null;
3991
- style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _70 => _70.stroke, 'optionalAccess', _71 => _71.width]))), () => ( 2)), paint: color } : null;
4449
+ const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _69 => _69.stroke, 'optionalAccess', _70 => _70.paint, 'access', _71 => _71.type]) === "color" ? info.stroke.paint.color : null;
4450
+ style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _72 => _72.stroke, 'optionalAccess', _73 => _73.width]))), () => ( 2)), paint: color } : null;
3992
4451
  }
3993
4452
  if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
3994
- const live = _optionalChain([info, 'access', _72 => _72.components, 'access', _73 => _73[0], 'optionalAccess', _74 => _74.live]);
4453
+ const live = _optionalChain([info, 'access', _74 => _74.components, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.live]);
3995
4454
  if (!live) return;
3996
4455
  const shape = {};
3997
4456
  if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
@@ -4017,7 +4476,7 @@ var TextEditSession = (_class8 = class {
4017
4476
  __init42() {this.listeners = /* @__PURE__ */ new Set()}
4018
4477
  __init43() {this.error = null}
4019
4478
  get layer() {
4020
- const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _75 => _75.layer]);
4479
+ const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _77 => _77.layer]);
4021
4480
  if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
4022
4481
  return l;
4023
4482
  }
@@ -4032,7 +4491,7 @@ var TextEditSession = (_class8 = class {
4032
4491
  }
4033
4492
  /** Whether the layer still exists (it can be deleted or undone away while editing). */
4034
4493
  get alive() {
4035
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _76 => _76.layer, 'access', _77 => _77.type]) === "type";
4494
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _78 => _78.layer, 'access', _79 => _79.type]) === "type";
4036
4495
  }
4037
4496
  subscribe(fn) {
4038
4497
  this.listeners.add(fn);
@@ -4320,7 +4779,7 @@ var TypeToolGesture = (_class9 = class {
4320
4779
  finish() {
4321
4780
  const s = this.session;
4322
4781
  this.session = null;
4323
- _optionalChain([s, 'optionalAccess', _78 => _78.close, 'call', _79 => _79()]);
4782
+ _optionalChain([s, 'optionalAccess', _80 => _80.close, 'call', _81 => _81()]);
4324
4783
  }
4325
4784
  }, _class9);
4326
4785
 
@@ -4633,51 +5092,14 @@ function toneRange(pixels, range, falloff = 20) {
4633
5092
  const d = pixels.data;
4634
5093
  for (let i = 0; i < n; i++) {
4635
5094
  const p = i * 4;
4636
- if (d[p + 3] <= 0) continue;
4637
- const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
4638
- const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
4639
- out[i] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, 1 - outside / ramp2);
4640
- }
4641
- return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
4642
- }
4643
- function hueRange(pixels, center) {
4644
- const n = checkPixels(pixels);
4645
- const out = new Uint8Array(n);
4646
- const d = pixels.data;
4647
- for (let i = 0; i < n; i++) {
4648
- const p = i * 4;
4649
- if (d[p + 3] <= 0) continue;
4650
- const r = d[p] / 255;
4651
- const g = d[p + 1] / 255;
4652
- const b = d[p + 2] / 255;
4653
- const mx = Math.max(r, g, b);
4654
- const mn = Math.min(r, g, b);
4655
- const chroma = mx - mn;
4656
- if (chroma <= 0) continue;
4657
- let hue;
4658
- if (mx === r) hue = ((g - b) / chroma % 6 + 6) % 6;
4659
- else if (mx === g) hue = (b - r) / chroma + 2;
4660
- else hue = (r - g) / chroma + 4;
4661
- hue *= 60;
4662
- let dh = ((hue - center) % 360 + 360) % 360;
4663
- dh = Math.min(dh, 360 - dh);
4664
- out[i] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
5095
+ if (d[p + 3] <= 0) continue;
5096
+ const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
5097
+ const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
5098
+ out[i] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, 1 - outside / ramp2);
4665
5099
  }
4666
5100
  return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
4667
5101
  }
4668
- var HUE_RANGE_PRESETS = { reds: 0, yellows: 60, greens: 120, cyans: 180, blues: 240, magentas: 300 };
4669
- var COLOR_RANGE_PRESETS = [
4670
- ...Object.keys(HUE_RANGE_PRESETS),
4671
- "highlights",
4672
- "midtones",
4673
- "shadows",
4674
- "skinTones"
4675
- ];
4676
- function isColorRangePreset(v) {
4677
- return typeof v === "string" && COLOR_RANGE_PRESETS.includes(v);
4678
- }
4679
- var ramp = (v, lo, hi, soft) => v < lo ? Math.max(0, 1 - (lo - v) / soft) : v > hi ? Math.max(0, 1 - (v - hi) / soft) : 1;
4680
- function skinToneRange(pixels) {
5102
+ function hueRange(pixels, center) {
4681
5103
  const n = checkPixels(pixels);
4682
5104
  const out = new Uint8Array(n);
4683
5105
  const d = pixels.data;
@@ -4690,346 +5112,151 @@ function skinToneRange(pixels) {
4690
5112
  const mx = Math.max(r, g, b);
4691
5113
  const mn = Math.min(r, g, b);
4692
5114
  const chroma = mx - mn;
4693
- if (chroma <= 0 || mx <= 0) continue;
5115
+ if (chroma <= 0) continue;
4694
5116
  let hue;
4695
5117
  if (mx === r) hue = ((g - b) / chroma % 6 + 6) % 6;
4696
- else if (mx === g) hue = (b - r) / chroma + 2;
4697
- else hue = (r - g) / chroma + 4;
4698
- hue *= 60;
4699
- if (hue > 180) hue -= 360;
4700
- const k = ramp(hue, 5, 40, 20) * ramp(chroma / mx, 0.12, 0.8, 0.1) * ramp(mx, 0.3, 1, 0.15);
4701
- out[i] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, k);
4702
- }
4703
- return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
4704
- }
4705
- function colorRangePreset(pixels, preset, options = {}) {
4706
- if (preset === "skinTones") return skinToneRange(pixels);
4707
- if (preset === "highlights" || preset === "midtones" || preset === "shadows") return toneRange(pixels, preset, _nullishCoalesce(options.falloff, () => ( 20)));
4708
- if (preset in HUE_RANGE_PRESETS) return hueRange(pixels, HUE_RANGE_PRESETS[preset]);
4709
- throw new Error(`Unknown Color Range preset "${String(preset)}". Use one of ${COLOR_RANGE_PRESETS.join(", ")}.`);
4710
- }
4711
- function selectedColorBins(pixels, sel, tolerance) {
4712
- const S = 64;
4713
- let bins = new Uint8Array(S * S * S);
4714
- const d = pixels.data;
4715
- const n = pixels.width * pixels.height;
4716
- for (let i = 0; i < n; i++) {
4717
- if (sel.data[i] < 128 || d[i * 4 + 3] === 0) continue;
4718
- bins[((d[i * 4] >> 2) * S + (d[i * 4 + 1] >> 2)) * S + (d[i * 4 + 2] >> 2)] = 1;
4719
- }
4720
- const r = Math.round(Math.max(0, tolerance) / 4);
4721
- if (r === 0) return bins;
4722
- for (const stride of [1, S, S * S]) {
4723
- const out = new Uint8Array(bins.length);
4724
- for (let i = 0; i < bins.length; i++) {
4725
- if (!bins[i]) continue;
4726
- const c = Math.floor(i / stride) % S;
4727
- const lo = Math.max(0, c - r);
4728
- const hi = Math.min(S - 1, c + r);
4729
- const base = i - c * stride;
4730
- for (let k = lo; k <= hi; k++) out[base + k * stride] = 1;
4731
- }
4732
- bins = out;
4733
- }
4734
- return bins;
4735
- }
4736
- function matcher(pixels, sel, options) {
4737
- if (sel.width !== pixels.width || sel.height !== pixels.height) throw new Error("The selection and the pixels differ in size");
4738
- const bins = selectedColorBins(pixels, sel, _nullishCoalesce(options.tolerance, () => ( 32)));
4739
- const d = pixels.data;
4740
- return (i) => d[i * 4 + 3] > 0 && bins[((d[i * 4] >> 2 << 6) + (d[i * 4 + 1] >> 2)) * 64 + (d[i * 4 + 2] >> 2)] === 1;
4741
- }
4742
- function growSelection(pixels, sel, options = {}) {
4743
- checkPixels(pixels);
4744
- const match = matcher(pixels, sel, options);
4745
- const { width: w, height: h } = pixels;
4746
- const out = new Uint8Array(sel.data);
4747
- const stack = [];
4748
- for (let i = 0; i < out.length; i++) if (out[i] >= 128) stack.push(i);
4749
- while (stack.length) {
4750
- const i = stack.pop();
4751
- const x = i % w;
4752
- const y = (i - x) / w;
4753
- const visit = (j) => {
4754
- if (out[j] < 255 && match(j)) {
4755
- out[j] = 255;
4756
- stack.push(j);
4757
- }
4758
- };
4759
- if (x > 0) visit(i - 1);
4760
- if (x < w - 1) visit(i + 1);
4761
- if (y > 0) visit(i - w);
4762
- if (y < h - 1) visit(i + w);
4763
- }
4764
- return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, w, h, out);
4765
- }
4766
- function selectSimilar(pixels, sel, options = {}) {
4767
- const n = checkPixels(pixels);
4768
- const match = matcher(pixels, sel, options);
4769
- const out = new Uint8Array(sel.data);
4770
- for (let i = 0; i < n; i++) if (match(i)) out[i] = 255;
4771
- return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
4772
- }
4773
-
4774
- // src/image-editor/selection/segmentation.ts
4775
- var isPoint = (p) => !!p && typeof p === "object" && Number.isFinite(p.x) && Number.isFinite(p.y);
4776
- function segmentationOutlines(result) {
4777
- const p = result.polygon;
4778
- if (!Array.isArray(p) || !p.length) return [];
4779
- const rings = Array.isArray(p[0]) ? p : [p];
4780
- return rings.map((ring) => Array.isArray(ring) ? ring.filter(isPoint) : []).filter((ring) => ring.length >= 3);
4781
- }
4782
- function segmentToSelection(width, height, result) {
4783
- let out = null;
4784
- for (const ring of segmentationOutlines(result)) {
4785
- out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, polygonSelection(width, height, ring), "add");
4786
- }
4787
- if (result.mask && result.mask.width > 0 && result.mask.height > 0) {
4788
- const raw = _chunkUYXL6ZWQcjs.selectionFromPixels.call(void 0, result.mask, { channel: "luminance" });
4789
- const sized = raw.width === width && raw.height === height ? raw : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, raw, width, height);
4790
- out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sized, "add");
4791
- }
4792
- return _optionalChain([out, 'optionalAccess', _80 => _80.bounds]) ? out : null;
4793
- }
4794
- function segmentsToSelection(width, height, results) {
4795
- let out = null;
4796
- for (const r of results) {
4797
- const sel = segmentToSelection(width, height, r);
4798
- if (sel) out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sel, "add");
4799
- }
4800
- return out;
4801
- }
4802
-
4803
- // src/image-editor/selection/refine.ts
4804
- var DEFAULT_REFINE_EDGE_PARAMS = {
4805
- radius: 0,
4806
- smartRadius: false,
4807
- smooth: 0,
4808
- feather: 0,
4809
- contrast: 0,
4810
- shiftEdge: 0
4811
- };
4812
- var GUIDED_FILTER_EPS = 1e-4;
4813
- var fin = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
4814
- function normalizeRefineEdgeParams(p = {}) {
4815
- return {
4816
- radius: Math.min(250, Math.max(0, fin(p.radius, 0))),
4817
- smartRadius: p.smartRadius === true,
4818
- smooth: Math.min(100, Math.max(0, fin(p.smooth, 0))),
4819
- feather: Math.min(1e3, Math.max(0, fin(p.feather, 0))),
4820
- contrast: Math.min(100, Math.max(0, fin(p.contrast, 0))),
4821
- shiftEdge: Math.min(100, Math.max(-100, fin(p.shiftEdge, 0)))
4822
- };
4823
- }
4824
- var gfRadius = (p) => Math.min(64, Math.max(1, Math.ceil(p.radius)));
4825
- var smoothSigma = (p) => p.smooth / 100 * 4;
4826
- var featherSigma = (p) => p.feather / 2;
4827
- function shiftAmount(p) {
4828
- const px2 = p.shiftEdge / 100 * Math.max(p.radius, 4);
4829
- return Number.isFinite(px2) ? Math.min(64, Math.max(-64, px2)) : 0;
4830
- }
4831
- function refineEdgeHalo(params = {}) {
4832
- const p = normalizeRefineEdgeParams(params);
4833
- const g = gfRadius(p);
4834
- const edge = p.radius > 0 ? Math.max(Math.ceil(p.radius), 2 * g + (p.smartRadius ? g + 1 : 0)) : 0;
4835
- return edge + Math.ceil(3 * smoothSigma(p)) + Math.ceil(3 * featherSigma(p)) + Math.ceil(Math.abs(shiftAmount(p))) + 2;
4836
- }
4837
- function boxMean(src, w, h, r) {
4838
- const tmp = new Float32Array(w * h);
4839
- const pre = new Float64Array(Math.max(w, h) + 1);
4840
- for (let y = 0; y < h; y++) {
4841
- const row = y * w;
4842
- for (let x = 0; x < w; x++) pre[x + 1] = pre[x] + src[row + x];
4843
- for (let x = 0; x < w; x++) {
4844
- const lo = Math.max(0, x - r);
4845
- const hi = Math.min(w, x + r + 1);
4846
- tmp[row + x] = (pre[hi] - pre[lo]) / (hi - lo);
4847
- }
4848
- }
4849
- const out = new Float32Array(w * h);
4850
- for (let x = 0; x < w; x++) {
4851
- for (let y = 0; y < h; y++) pre[y + 1] = pre[y] + tmp[y * w + x];
4852
- for (let y = 0; y < h; y++) {
4853
- const lo = Math.max(0, y - r);
4854
- const hi = Math.min(h, y + r + 1);
4855
- out[y * w + x] = (pre[hi] - pre[lo]) / (hi - lo);
4856
- }
4857
- }
4858
- return out;
4859
- }
4860
- function guidedFilterColor(guide, p, w, h, r, eps = GUIDED_FILTER_EPS) {
4861
- const n = w * h;
4862
- const [c0, c1, c2] = guide;
4863
- const prod = (a, b2) => {
4864
- const o = new Float32Array(n);
4865
- for (let i = 0; i < n; i++) o[i] = a[i] * b2[i];
4866
- return o;
4867
- };
4868
- const m0 = boxMean(c0, w, h, r);
4869
- const m1 = boxMean(c1, w, h, r);
4870
- const m2 = boxMean(c2, w, h, r);
4871
- const mp = boxMean(p, w, h, r);
4872
- const mip0 = boxMean(prod(c0, p), w, h, r);
4873
- const mip1 = boxMean(prod(c1, p), w, h, r);
4874
- const mip2 = boxMean(prod(c2, p), w, h, r);
4875
- const s00 = boxMean(prod(c0, c0), w, h, r);
4876
- const s01 = boxMean(prod(c0, c1), w, h, r);
4877
- const s02 = boxMean(prod(c0, c2), w, h, r);
4878
- const s11 = boxMean(prod(c1, c1), w, h, r);
4879
- const s12 = boxMean(prod(c1, c2), w, h, r);
4880
- const s22 = boxMean(prod(c2, c2), w, h, r);
4881
- const a0 = new Float32Array(n);
4882
- const a1 = new Float32Array(n);
4883
- const a2 = new Float32Array(n);
4884
- const b = new Float32Array(n);
4885
- for (let i = 0; i < n; i++) {
4886
- const u0 = m0[i], u1 = m1[i], u2 = m2[i], up = mp[i];
4887
- const rr = s00[i] - u0 * u0 + eps;
4888
- const rg = s01[i] - u0 * u1;
4889
- const rb = s02[i] - u0 * u2;
4890
- const gg = s11[i] - u1 * u1 + eps;
4891
- const gb = s12[i] - u1 * u2;
4892
- const bb = s22[i] - u2 * u2 + eps;
4893
- const v0 = mip0[i] - u0 * up;
4894
- const v1 = mip1[i] - u1 * up;
4895
- const v2 = mip2[i] - u2 * up;
4896
- const i00 = gg * bb - gb * gb;
4897
- const i01 = gb * rb - rg * bb;
4898
- const i02 = rg * gb - gg * rb;
4899
- const i11 = rr * bb - rb * rb;
4900
- const i12 = rb * rg - rr * gb;
4901
- const i22 = rr * gg - rg * rg;
4902
- const det = rr * i00 + rg * i01 + rb * i02;
4903
- let x0 = 0, x1 = 0, x2 = 0;
4904
- if (Math.abs(det) >= 1e-30) {
4905
- x0 = (i00 * v0 + i01 * v1 + i02 * v2) / det;
4906
- x1 = (i01 * v0 + i11 * v1 + i12 * v2) / det;
4907
- x2 = (i02 * v0 + i12 * v1 + i22 * v2) / det;
4908
- }
4909
- a0[i] = x0;
4910
- a1[i] = x1;
4911
- a2[i] = x2;
4912
- b[i] = up - x0 * u0 - x1 * u1 - x2 * u2;
4913
- }
4914
- const ma0 = boxMean(a0, w, h, r);
4915
- const ma1 = boxMean(a1, w, h, r);
4916
- const ma2 = boxMean(a2, w, h, r);
4917
- const mb = boxMean(b, w, h, r);
4918
- const out = new Float32Array(n);
4919
- for (let i = 0; i < n; i++) out[i] = ma0[i] * c0[i] + ma1[i] * c1[i] + ma2[i] * c2[i] + mb[i];
4920
- return out;
4921
- }
4922
- function edgeWidth(guide, w, h, r) {
4923
- const n = w * h;
4924
- const y = new Float32Array(n);
4925
- for (let i = 0; i < n; i++) y[i] = 0.299 * guide[0][i] + 0.587 * guide[1][i] + 0.114 * guide[2][i];
4926
- const g = new Float32Array(n);
4927
- for (let yy = 0; yy < h; yy++) {
4928
- for (let xx = 0; xx < w; xx++) {
4929
- const gx = (y[yy * w + Math.min(w - 1, xx + 1)] - y[yy * w + Math.max(0, xx - 1)]) / 2;
4930
- const gy = (y[Math.min(h - 1, yy + 1) * w + xx] - y[Math.max(0, yy - 1) * w + xx]) / 2;
4931
- g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
4932
- }
5118
+ else if (mx === g) hue = (b - r) / chroma + 2;
5119
+ else hue = (r - g) / chroma + 4;
5120
+ hue *= 60;
5121
+ let dh = ((hue - center) % 360 + 360) % 360;
5122
+ dh = Math.min(dh, 360 - dh);
5123
+ out[i] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
4933
5124
  }
4934
- const gm = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, g, w, h, r, true);
4935
- const hi = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, true);
4936
- const lo = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, false);
4937
- const out = new Float32Array(n);
4938
- for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
4939
- return out;
5125
+ return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
4940
5126
  }
4941
- function refineCoverage(guide, m, w, h, params = {}) {
4942
- const p = normalizeRefineEdgeParams(params);
4943
- let a = Float32Array.from(m);
4944
- if (p.radius > 0 && guide) {
4945
- const n = w * h;
4946
- const boundary = new Uint8Array(n);
4947
- let any = false;
4948
- for (let y = 0; y < h; y++) {
4949
- for (let x = 0; x < w; x++) {
4950
- const i = y * w + x;
4951
- const v = m[i] >= 0.5;
4952
- const diff = x > 0 && m[i - 1] >= 0.5 !== v || x + 1 < w && m[i + 1] >= 0.5 !== v || y > 0 && m[i - w] >= 0.5 !== v || y + 1 < h && m[i + w] >= 0.5 !== v;
4953
- if (diff) {
4954
- boundary[i] = 1;
4955
- any = true;
4956
- }
4957
- }
4958
- }
4959
- if (any) {
4960
- const dist = _chunkUYXL6ZWQcjs.distanceTransform.call(void 0, boundary, w, h);
4961
- const r = gfRadius(p);
4962
- const q = guidedFilterColor(guide, m, w, h, r);
4963
- const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
4964
- for (let i = 0; i < n; i++) {
4965
- const reff = widths ? Math.min(Math.max(p.radius, 1.5), Math.max(1.5, widths[i])) : p.radius;
4966
- const wgt = Math.min(1, Math.max(0, reff + 1 - dist[i]));
4967
- if (wgt > 0) {
4968
- const qi = Math.min(1, Math.max(0, q[i]));
4969
- a[i] = m[i] + (qi - m[i]) * wgt;
4970
- }
4971
- }
4972
- }
5127
+ var HUE_RANGE_PRESETS = { reds: 0, yellows: 60, greens: 120, cyans: 180, blues: 240, magentas: 300 };
5128
+ var COLOR_RANGE_PRESETS = [
5129
+ ...Object.keys(HUE_RANGE_PRESETS),
5130
+ "highlights",
5131
+ "midtones",
5132
+ "shadows",
5133
+ "skinTones"
5134
+ ];
5135
+ function isColorRangePreset(v) {
5136
+ return typeof v === "string" && COLOR_RANGE_PRESETS.includes(v);
5137
+ }
5138
+ var ramp = (v, lo, hi, soft) => v < lo ? Math.max(0, 1 - (lo - v) / soft) : v > hi ? Math.max(0, 1 - (v - hi) / soft) : 1;
5139
+ function skinToneRange(pixels) {
5140
+ const n = checkPixels(pixels);
5141
+ const out = new Uint8Array(n);
5142
+ const d = pixels.data;
5143
+ for (let i = 0; i < n; i++) {
5144
+ const p = i * 4;
5145
+ if (d[p + 3] <= 0) continue;
5146
+ const r = d[p] / 255;
5147
+ const g = d[p + 1] / 255;
5148
+ const b = d[p + 2] / 255;
5149
+ const mx = Math.max(r, g, b);
5150
+ const mn = Math.min(r, g, b);
5151
+ const chroma = mx - mn;
5152
+ if (chroma <= 0 || mx <= 0) continue;
5153
+ let hue;
5154
+ if (mx === r) hue = ((g - b) / chroma % 6 + 6) % 6;
5155
+ else if (mx === g) hue = (b - r) / chroma + 2;
5156
+ else hue = (r - g) / chroma + 4;
5157
+ hue *= 60;
5158
+ if (hue > 180) hue -= 360;
5159
+ const k = ramp(hue, 5, 40, 20) * ramp(chroma / mx, 0.12, 0.8, 0.1) * ramp(mx, 0.3, 1, 0.15);
5160
+ out[i] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, k);
4973
5161
  }
4974
- const ss = smoothSigma(p);
4975
- if (ss >= 0.3) {
4976
- a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, ss, "clamp");
4977
- const gain = 1 + ss;
4978
- for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
5162
+ return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
5163
+ }
5164
+ function colorRangePreset(pixels, preset, options = {}) {
5165
+ if (preset === "skinTones") return skinToneRange(pixels);
5166
+ if (preset === "highlights" || preset === "midtones" || preset === "shadows") return toneRange(pixels, preset, _nullishCoalesce(options.falloff, () => ( 20)));
5167
+ if (preset in HUE_RANGE_PRESETS) return hueRange(pixels, HUE_RANGE_PRESETS[preset]);
5168
+ throw new Error(`Unknown Color Range preset "${String(preset)}". Use one of ${COLOR_RANGE_PRESETS.join(", ")}.`);
5169
+ }
5170
+ function selectedColorBins(pixels, sel, tolerance) {
5171
+ const S = 64;
5172
+ let bins = new Uint8Array(S * S * S);
5173
+ const d = pixels.data;
5174
+ const n = pixels.width * pixels.height;
5175
+ for (let i = 0; i < n; i++) {
5176
+ if (sel.data[i] < 128 || d[i * 4 + 3] === 0) continue;
5177
+ bins[((d[i * 4] >> 2) * S + (d[i * 4 + 1] >> 2)) * S + (d[i * 4 + 2] >> 2)] = 1;
4979
5178
  }
4980
- a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, featherSigma(p), "clamp");
4981
- if (p.contrast > 0) {
4982
- const gain = 1 / (1 - 0.99 * p.contrast / 100);
4983
- for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
5179
+ const r = Math.round(Math.max(0, tolerance) / 4);
5180
+ if (r === 0) return bins;
5181
+ for (const stride of [1, S, S * S]) {
5182
+ const out = new Uint8Array(bins.length);
5183
+ for (let i = 0; i < bins.length; i++) {
5184
+ if (!bins[i]) continue;
5185
+ const c = Math.floor(i / stride) % S;
5186
+ const lo = Math.max(0, c - r);
5187
+ const hi = Math.min(S - 1, c + r);
5188
+ const base = i - c * stride;
5189
+ for (let k = lo; k <= hi; k++) out[base + k * stride] = 1;
5190
+ }
5191
+ bins = out;
4984
5192
  }
4985
- const amount = shiftAmount(p);
4986
- if (Math.abs(amount) >= 1e-4) a = _chunkUYXL6ZWQcjs.shiftCoverage.call(void 0, a, w, h, amount);
4987
- return a;
5193
+ return bins;
4988
5194
  }
4989
- function guidePlanes(pixels, win) {
4990
- const box = _nullishCoalesce(win, () => ( { x: 0, y: 0, width: pixels.width, height: pixels.height }));
4991
- const n = box.width * box.height;
4992
- const r = new Float32Array(n);
4993
- const g = new Float32Array(n);
4994
- const b = new Float32Array(n);
5195
+ function matcher(pixels, sel, options) {
5196
+ if (sel.width !== pixels.width || sel.height !== pixels.height) throw new Error("The selection and the pixels differ in size");
5197
+ const bins = selectedColorBins(pixels, sel, _nullishCoalesce(options.tolerance, () => ( 32)));
4995
5198
  const d = pixels.data;
4996
- for (let y = 0; y < box.height; y++) {
4997
- for (let x = 0; x < box.width; x++) {
4998
- const i = y * box.width + x;
4999
- const p = ((box.y + y) * pixels.width + box.x + x) * 4;
5000
- r[i] = d[p] / 255;
5001
- g[i] = d[p + 1] / 255;
5002
- b[i] = d[p + 2] / 255;
5003
- }
5199
+ return (i) => d[i * 4 + 3] > 0 && bins[((d[i * 4] >> 2 << 6) + (d[i * 4 + 1] >> 2)) * 64 + (d[i * 4 + 2] >> 2)] === 1;
5200
+ }
5201
+ function growSelection(pixels, sel, options = {}) {
5202
+ checkPixels(pixels);
5203
+ const match = matcher(pixels, sel, options);
5204
+ const { width: w, height: h } = pixels;
5205
+ const out = new Uint8Array(sel.data);
5206
+ const stack = [];
5207
+ for (let i = 0; i < out.length; i++) if (out[i] >= 128) stack.push(i);
5208
+ while (stack.length) {
5209
+ const i = stack.pop();
5210
+ const x = i % w;
5211
+ const y = (i - x) / w;
5212
+ const visit = (j) => {
5213
+ if (out[j] < 255 && match(j)) {
5214
+ out[j] = 255;
5215
+ stack.push(j);
5216
+ }
5217
+ };
5218
+ if (x > 0) visit(i - 1);
5219
+ if (x < w - 1) visit(i + 1);
5220
+ if (y > 0) visit(i - w);
5221
+ if (y < h - 1) visit(i + w);
5004
5222
  }
5005
- return [r, g, b];
5223
+ return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, w, h, out);
5006
5224
  }
5007
- function refineSelection(pixels, mask, params = {}) {
5008
- const p = normalizeRefineEdgeParams(params);
5009
- if (pixels && (pixels.width !== mask.width || pixels.height !== mask.height)) {
5010
- throw new Error("Refine Edge needs pixels the size of the selection");
5225
+ function selectSimilar(pixels, sel, options = {}) {
5226
+ const n = checkPixels(pixels);
5227
+ const match = matcher(pixels, sel, options);
5228
+ const out = new Uint8Array(sel.data);
5229
+ for (let i = 0; i < n; i++) if (match(i)) out[i] = 255;
5230
+ return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
5231
+ }
5232
+
5233
+ // src/image-editor/selection/segmentation.ts
5234
+ var isPoint = (p) => !!p && typeof p === "object" && Number.isFinite(p.x) && Number.isFinite(p.y);
5235
+ function segmentationOutlines(result) {
5236
+ const p = result.polygon;
5237
+ if (!Array.isArray(p) || !p.length) return [];
5238
+ const rings = Array.isArray(p[0]) ? p : [p];
5239
+ return rings.map((ring) => Array.isArray(ring) ? ring.filter(isPoint) : []).filter((ring) => ring.length >= 3);
5240
+ }
5241
+ function segmentToSelection(width, height, result) {
5242
+ let out = null;
5243
+ for (const ring of segmentationOutlines(result)) {
5244
+ out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, polygonSelection(width, height, ring), "add");
5011
5245
  }
5012
- if (!mask.bounds) return mask;
5013
- const halo = refineEdgeHalo(p);
5014
- const x0 = Math.max(0, mask.bounds.x - halo);
5015
- const y0 = Math.max(0, mask.bounds.y - halo);
5016
- const x1 = Math.min(mask.width, mask.bounds.x + mask.bounds.width + halo);
5017
- const y1 = Math.min(mask.height, mask.bounds.y + mask.bounds.height + halo);
5018
- const ww = x1 - x0;
5019
- const wh = y1 - y0;
5020
- const m = new Float32Array(ww * wh);
5021
- for (let y = 0; y < wh; y++) {
5022
- const src = (y0 + y) * mask.width + x0;
5023
- for (let x = 0; x < ww; x++) m[y * ww + x] = mask.data[src + x] / 255;
5246
+ if (result.mask && result.mask.width > 0 && result.mask.height > 0) {
5247
+ const raw = _chunkUYXL6ZWQcjs.selectionFromPixels.call(void 0, result.mask, { channel: "luminance" });
5248
+ const sized = raw.width === width && raw.height === height ? raw : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, raw, width, height);
5249
+ out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sized, "add");
5024
5250
  }
5025
- const guide = pixels && p.radius > 0 ? guidePlanes(pixels, { x: x0, y: y0, width: ww, height: wh }) : null;
5026
- const refined = refineCoverage(guide, m, ww, wh, p);
5027
- const out = new Uint8Array(mask.width * mask.height);
5028
- for (let y = 0; y < wh; y++) {
5029
- const dst = (y0 + y) * mask.width + x0;
5030
- for (let x = 0; x < ww; x++) out[dst + x] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, refined[y * ww + x]);
5251
+ return _optionalChain([out, 'optionalAccess', _82 => _82.bounds]) ? out : null;
5252
+ }
5253
+ function segmentsToSelection(width, height, results) {
5254
+ let out = null;
5255
+ for (const r of results) {
5256
+ const sel = segmentToSelection(width, height, r);
5257
+ if (sel) out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sel, "add");
5031
5258
  }
5032
- return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
5259
+ return out;
5033
5260
  }
5034
5261
 
5035
5262
  // src/image-editor/selection/stroke.ts
@@ -5070,7 +5297,7 @@ function deserializeChannels(value, size, problems = []) {
5070
5297
  visible: v.visible === true
5071
5298
  });
5072
5299
  } catch (err) {
5073
- problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _81 => _81.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
5300
+ problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _83 => _83.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
5074
5301
  }
5075
5302
  }
5076
5303
  return out;
@@ -5108,16 +5335,16 @@ function checkEffectTime(time) {
5108
5335
  return time;
5109
5336
  }
5110
5337
  function checkEffectAnimation(animate) {
5111
- const duration = _optionalChain([animate, 'optionalAccess', _82 => _82.duration]);
5338
+ const duration = _optionalChain([animate, 'optionalAccess', _84 => _84.duration]);
5112
5339
  if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS)) {
5113
5340
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
5114
5341
  }
5115
5342
  return { duration: Math.round(duration) };
5116
5343
  }
5117
5344
  function effectLayerTiming(g, d) {
5118
- if (!_optionalChain([d, 'optionalAccess', _83 => _83.duration])) return null;
5345
+ if (!_optionalChain([d, 'optionalAccess', _85 => _85.duration])) return null;
5119
5346
  const time = _nullishCoalesce(g.time, () => ( 0));
5120
- return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _84 => _84.animate, 'optionalAccess', _85 => _85.duration]), () => ( d.duration)), loops: d.loop };
5347
+ return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _86 => _86.animate, 'optionalAccess', _87 => _87.duration]), () => ( d.duration)), loops: d.loop };
5121
5348
  }
5122
5349
 
5123
5350
  // src/image-editor/effects.ts
@@ -5370,14 +5597,14 @@ var FreeTransformSession = (_class11 = class {
5370
5597
  if (init.interpolation !== void 0 && !_chunkHGTDMKNEcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
5371
5598
  this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
5372
5599
  const sel = host.selection();
5373
- const selected = Boolean(_optionalChain([sel, 'optionalAccess', _86 => _86.bounds]));
5600
+ const selected = Boolean(_optionalChain([sel, 'optionalAccess', _88 => _88.bounds]));
5374
5601
  let content = _nullishCoalesce(init.content, () => ( "auto"));
5375
5602
  if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
5376
5603
  fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
5377
5604
  }
5378
5605
  const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
5379
- const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _87 => _87.layer]) : void 0;
5380
- const smartTarget = (_optionalChain([target, 'optionalAccess', _88 => _88.type]) === "smart" || _optionalChain([target, 'optionalAccess', _89 => _89.type]) === "shape" || _optionalChain([target, 'optionalAccess', _90 => _90.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
5606
+ const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _89 => _89.layer]) : void 0;
5607
+ const smartTarget = (_optionalChain([target, 'optionalAccess', _90 => _90.type]) === "smart" || _optionalChain([target, 'optionalAccess', _91 => _91.type]) === "shape" || _optionalChain([target, 'optionalAccess', _92 => _92.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
5381
5608
  if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
5382
5609
  this.content = content;
5383
5610
  if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
@@ -5401,9 +5628,9 @@ var FreeTransformSession = (_class11 = class {
5401
5628
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
5402
5629
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
5403
5630
  if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
5404
- const linked = _optionalChain([mask, 'optionalAccess', _91 => _91.linked]) !== false;
5631
+ const linked = _optionalChain([mask, 'optionalAccess', _93 => _93.linked]) !== false;
5405
5632
  const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
5406
- if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _92 => _92.mask, 'optionalAccess', _93 => _93.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
5633
+ if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _94 => _94.mask, 'optionalAccess', _95 => _95.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
5407
5634
  if (!maskAlone && layer.type !== "pixel" && layer.type !== "smart" && layer.type !== "shape" && layer.type !== "type") fail(`Layer "${layer.name || id}" is a ${layer.type} layer; Free Transform works on pixel, shape, type and smart object layers, layer masks (channel mask) and selections.`);
5408
5635
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
5409
5636
  if (content !== "selection-copy") {
@@ -5506,7 +5733,7 @@ var FreeTransformSession = (_class11 = class {
5506
5733
  };
5507
5734
  this.copyId = copy.id;
5508
5735
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, layer.id);
5509
- this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _94 => _94.parent, 'optionalAccess', _95 => _95.id]), () => ( null)), loc.index + 1);
5736
+ this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _96 => _96.parent, 'optionalAccess', _97 => _97.id]), () => ( null)), loc.index + 1);
5510
5737
  this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
5511
5738
  moves.push("pixels");
5512
5739
  }
@@ -5615,7 +5842,7 @@ var FreeTransformSession = (_class11 = class {
5615
5842
  moveVectorMask(layers) {
5616
5843
  const g = this.geometryValue;
5617
5844
  if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkUYXL6ZWQcjs.isIdentityTransform.call(void 0, g)) return layers;
5618
- const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _96 => _96.layer, 'access', _97 => _97.vectorMask]);
5845
+ const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _98 => _98.layer, 'access', _99 => _99.vectorMask]);
5619
5846
  if (!vm || vm.linked === false) return layers;
5620
5847
  const warp = _chunkUYXL6ZWQcjs.hasWarp.call(void 0, g);
5621
5848
  const f = warp ? _chunkUYXL6ZWQcjs.transformMap.call(void 0, g) : null;
@@ -5786,11 +6013,11 @@ var FreeTransformSession = (_class11 = class {
5786
6013
  result(changed, layers, selection) {
5787
6014
  let bounds = null;
5788
6015
  const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
5789
- const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _98 => _98.layer]) : void 0;
5790
- if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _99 => _99.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5791
- else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _100 => _100.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
5792
- else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _103 => _103.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5793
- else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _104 => _104.bounds]) ? { ...selection.bounds } : null;
6016
+ const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _100 => _100.layer]) : void 0;
6017
+ if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
6018
+ else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _103 => _103.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _104 => _104.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
6019
+ else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _105 => _105.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
6020
+ else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _106 => _106.bounds]) ? { ...selection.bounds } : null;
5794
6021
  return {
5795
6022
  layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
5796
6023
  content: this.content,
@@ -5819,7 +6046,7 @@ function deserializeColorMode(raw, problems) {
5819
6046
  }
5820
6047
  function effectiveProof(proof, mode) {
5821
6048
  if (proof) return proof;
5822
- if (_optionalChain([mode, 'optionalAccess', _105 => _105.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
6049
+ if (_optionalChain([mode, 'optionalAccess', _107 => _107.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5823
6050
  return null;
5824
6051
  }
5825
6052
  function colorModePlanes(doc, mode) {
@@ -5836,10 +6063,10 @@ function colorModePlanes(doc, mode) {
5836
6063
  }
5837
6064
  const t = _chunkBROJYMWUcjs.Transform.create(src, _chunkBROJYMWUcjs.builtinProfile.call(void 0, "lab-d50"), { intent: "relative", bpc: false });
5838
6065
  return (rgba, n) => {
5839
- const lab = new Uint8Array(n * 4);
5840
- t.convert8(rgba, 4, lab, 4, false);
6066
+ const lab2 = new Uint8Array(n * 4);
6067
+ t.convert8(rgba, 4, lab2, 4, false);
5841
6068
  const planes = [0, 1, 2].map(() => new Uint8Array(n));
5842
- for (let i = 0; i < n; i++) for (let c = 0; c < 3; c++) planes[c][i] = lab[i * 4 + c];
6069
+ for (let i = 0; i < n; i++) for (let c = 0; c < 3; c++) planes[c][i] = lab2[i * 4 + c];
5843
6070
  return planes;
5844
6071
  };
5845
6072
  }
@@ -5874,7 +6101,7 @@ function resolveProfile(doc) {
5874
6101
  return p;
5875
6102
  }
5876
6103
  function profileBytes(doc) {
5877
- if (_optionalChain([doc, 'optionalAccess', _106 => _106.icc])) return doc.icc;
6104
+ if (_optionalChain([doc, 'optionalAccess', _108 => _108.icc])) return doc.icc;
5878
6105
  const p = resolveProfile(doc);
5879
6106
  return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
5880
6107
  }
@@ -6036,7 +6263,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
6036
6263
  else tiles.delete(key);
6037
6264
  continue;
6038
6265
  }
6039
- const src = _nullishCoalesce(_optionalChain([base, 'access', _107 => _107.tiles, 'access', _108 => _108.get, 'call', _109 => _109(key), 'optionalAccess', _110 => _110.data]), () => ( defaultTile(base)));
6266
+ const src = _nullishCoalesce(_optionalChain([base, 'access', _109 => _109.tiles, 'access', _110 => _110.get, 'call', _111 => _111(key), 'optionalAccess', _112 => _112.data]), () => ( defaultTile(base)));
6040
6267
  const data = _chunkEBDCRTZIcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
6041
6268
  const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
6042
6269
  if (tile) tiles.set(key, tile);
@@ -6149,7 +6376,7 @@ var PaintStrokeSession = (_class12 = class {
6149
6376
  writeTile: (tx, ty) => {
6150
6377
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
6151
6378
  if (!this.touched.has(key)) {
6152
- this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _111 => _111(key), 'optionalAccess', _112 => _112.slice, 'call', _113 => _113()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
6379
+ this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _113 => _113(key), 'optionalAccess', _114 => _114.slice, 'call', _115 => _115()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
6153
6380
  this.touched.add(key);
6154
6381
  }
6155
6382
  this.fresh.add(key);
@@ -6161,11 +6388,11 @@ var PaintStrokeSession = (_class12 = class {
6161
6388
  offset: a.offset,
6162
6389
  lockTransparency: a.lockTransparency,
6163
6390
  selection: a.selection,
6164
- readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _114 => _114.live, 'access', _115 => _115.get, 'call', _116 => _116(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _117 => _117.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
6391
+ readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _116 => _116.live, 'access', _117 => _117.get, 'call', _118 => _118(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _119 => _119.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
6165
6392
  writeTile: (tx, ty) => {
6166
6393
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
6167
6394
  if (!this.touched.has(key)) {
6168
- const src = _nullishCoalesce(_optionalChain([this, 'access', _118 => _118.base, 'access', _119 => _119.tiles, 'access', _120 => _120.get, 'call', _121 => _121(key), 'optionalAccess', _122 => _122.data]), () => ( defaultTile(this.base)));
6395
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.base, 'access', _121 => _121.tiles, 'access', _122 => _122.get, 'call', _123 => _123(key), 'optionalAccess', _124 => _124.data]), () => ( defaultTile(this.base)));
6169
6396
  this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
6170
6397
  this.touched.add(key);
6171
6398
  }
@@ -6182,11 +6409,11 @@ var PaintStrokeSession = (_class12 = class {
6182
6409
  if (this.closed || !points.length) return;
6183
6410
  if (!this.started) {
6184
6411
  this.started = true;
6185
- if (_optionalChain([this, 'access', _123 => _123.retouch, 'optionalAccess', _124 => _124.kind]) === "coverage") this.retouch.start(points[0]);
6412
+ if (_optionalChain([this, 'access', _125 => _125.retouch, 'optionalAccess', _126 => _126.kind]) === "coverage") this.retouch.start(points[0]);
6186
6413
  }
6187
6414
  this.last = points[points.length - 1];
6188
6415
  const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
6189
- _optionalChain([this, 'access', _125 => _125.flushView, 'optionalCall', _126 => _126()]);
6416
+ _optionalChain([this, 'access', _127 => _127.flushView, 'optionalCall', _128 => _128()]);
6190
6417
  this.update(rects);
6191
6418
  }
6192
6419
  update(rects) {
@@ -6216,7 +6443,7 @@ var PaintStrokeSession = (_class12 = class {
6216
6443
  for (const [key, { tx, ty, r }] of regions) {
6217
6444
  if (this.deep) {
6218
6445
  const rt = this.retouch;
6219
- const paint = _optionalChain([rt, 'optionalAccess', _127 => _127.kind]) === "coverage" ? rt.paint() : null;
6446
+ const paint = _optionalChain([rt, 'optionalAccess', _129 => _129.kind]) === "coverage" ? rt.paint() : null;
6220
6447
  if (paint && paint.kind !== "tone") {
6221
6448
  const prevWork = this.touched.has(key) ? this.work.get(key) : void 0;
6222
6449
  this.touched.add(key);
@@ -6227,13 +6454,13 @@ var PaintStrokeSession = (_class12 = class {
6227
6454
  const prev2 = this.touched.has(key) ? this.liveDeep.get(key) : void 0;
6228
6455
  this.touched.add(key);
6229
6456
  const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
6230
- const d = _optionalChain([rt, 'optionalAccess', _128 => _128.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _129 => _129.kind]) === "tone" ? _chunk7NW46N7Icjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkEBDCRTZIcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
6457
+ const d = _optionalChain([rt, 'optionalAccess', _130 => _130.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _131 => _131.kind]) === "tone" ? _chunk7NW46N7Icjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkEBDCRTZIcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
6231
6458
  this.liveDeep.set(key, d);
6232
6459
  this.live.set(key, { data: _chunkCWM3CUUXcjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
6233
6460
  continue;
6234
6461
  }
6235
- const src = _nullishCoalesce(_optionalChain([this, 'access', _130 => _130.base, 'access', _131 => _131.tiles, 'access', _132 => _132.get, 'call', _133 => _133(key), 'optionalAccess', _134 => _134.data]), () => ( defaultTile(this.base)));
6236
- const prev = this.touched.has(key) ? _optionalChain([this, 'access', _135 => _135.live, 'access', _136 => _136.get, 'call', _137 => _137(key), 'optionalAccess', _138 => _138.data]) : void 0;
6462
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _132 => _132.base, 'access', _133 => _133.tiles, 'access', _134 => _134.get, 'call', _135 => _135(key), 'optionalAccess', _136 => _136.data]), () => ( defaultTile(this.base)));
6463
+ const prev = this.touched.has(key) ? _optionalChain([this, 'access', _137 => _137.live, 'access', _138 => _138.get, 'call', _139 => _139(key), 'optionalAccess', _140 => _140.data]) : void 0;
6237
6464
  this.touched.add(key);
6238
6465
  const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
6239
6466
  this.live.set(key, { data, uniform: null });
@@ -6245,12 +6472,12 @@ var PaintStrokeSession = (_class12 = class {
6245
6472
  if (this.closed) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("This stroke has already ended.");
6246
6473
  const last = _nullishCoalesce(this.last, () => ( void 0));
6247
6474
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
6248
- _optionalChain([this, 'access', _139 => _139.flushView, 'optionalCall', _140 => _140()]);
6475
+ _optionalChain([this, 'access', _141 => _141.flushView, 'optionalCall', _142 => _142()]);
6249
6476
  this.update(rects);
6250
6477
  this.closed = true;
6251
6478
  const ch = this.base.channels;
6252
6479
  const r = this.retouch;
6253
- if (_optionalChain([r, 'optionalAccess', _141 => _141.kind]) === "coverage" && r.finalPaint) {
6480
+ if (_optionalChain([r, 'optionalAccess', _143 => _143.kind]) === "coverage" && r.finalPaint) {
6254
6481
  const final = r.finalPaint(this.stroke.coverage);
6255
6482
  if (final) {
6256
6483
  for (const key of this.touched) {
@@ -6259,7 +6486,7 @@ var PaintStrokeSession = (_class12 = class {
6259
6486
  this.retouchDeepTile(key, tx, ty, final, {});
6260
6487
  continue;
6261
6488
  }
6262
- const src = _nullishCoalesce(_optionalChain([this, 'access', _142 => _142.base, 'access', _143 => _143.tiles, 'access', _144 => _144.get, 'call', _145 => _145(key), 'optionalAccess', _146 => _146.data]), () => ( defaultTile(this.base)));
6489
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _144 => _144.base, 'access', _145 => _145.tiles, 'access', _146 => _146.get, 'call', _147 => _147(key), 'optionalAccess', _148 => _148.data]), () => ( defaultTile(this.base)));
6263
6490
  this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
6264
6491
  }
6265
6492
  }
@@ -6281,7 +6508,7 @@ var PaintStrokeSession = (_class12 = class {
6281
6508
  const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
6282
6509
  const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
6283
6510
  if (mixerLoad) result.mixerLoad = mixerLoad;
6284
- if (_optionalChain([r, 'optionalAccess', _147 => _147.result])) Object.assign(result, r.result());
6511
+ if (_optionalChain([r, 'optionalAccess', _149 => _149.result])) Object.assign(result, r.result());
6285
6512
  return result;
6286
6513
  }
6287
6514
  /** Abandons the stroke and restores the layer. */
@@ -6407,14 +6634,14 @@ function migrateSerializedImageEditorState(data) {
6407
6634
  const legacy = data;
6408
6635
  const adjustments = normalizeStoredAdjustments(legacy.adjustments);
6409
6636
  return {
6410
- version: _optionalChain([adjustments, 'access', _148 => _148.layers, 'optionalAccess', _149 => _149.length]) ? 2 : 1,
6637
+ version: _optionalChain([adjustments, 'access', _150 => _150.layers, 'optionalAccess', _151 => _151.length]) ? 2 : 1,
6411
6638
  crop: legacy.crop ? { ...legacy.crop } : null,
6412
6639
  transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
6413
6640
  adjustments: serializeAdjustments(adjustments),
6414
6641
  depthMask: {
6415
6642
  ...DEFAULT_DEPTH_MASK,
6416
6643
  ...legacy.depthMask,
6417
- depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _150 => _150.depthMask, 'optionalAccess', _151 => _151.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
6644
+ depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _152 => _152.depthMask, 'optionalAccess', _153 => _153.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
6418
6645
  },
6419
6646
  annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
6420
6647
  ...legacy.selection ? { selection: { ...legacy.selection } } : {}
@@ -6490,7 +6717,7 @@ var ImageEditorController = (_class13 = class {
6490
6717
  sourceIsOpaque: () => this.sourceIsOpaque(),
6491
6718
  version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
6492
6719
  globalLight: () => this.state.globalLight,
6493
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _152 => _152.state, 'access', _153 => _153.patterns, 'optionalAccess', _154 => _154.find, 'call', _155 => _155((p) => p.id === id)]), () => ( null))
6720
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _154 => _154.state, 'access', _155 => _155.patterns, 'optionalAccess', _156 => _156.find, 'call', _157 => _157((p) => p.id === id)]), () => ( null))
6494
6721
  };
6495
6722
  this.state = {
6496
6723
  sourceUrl: typeof options.image === "string" ? options.image : null,
@@ -6523,13 +6750,13 @@ var ImageEditorController = (_class13 = class {
6523
6750
  };
6524
6751
  }
6525
6752
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
6526
- if (_optionalChain([options, 'access', _156 => _156.initialState, 'optionalAccess', _157 => _157.selection])) {
6753
+ if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.selection])) {
6527
6754
  try {
6528
6755
  this.state.selection = normalizeSelection(_chunkUYXL6ZWQcjs.deserializeSelection.call(void 0, options.initialState.selection));
6529
6756
  } catch (e20) {
6530
6757
  }
6531
6758
  }
6532
- if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.channels])) {
6759
+ if (_optionalChain([options, 'access', _160 => _160.initialState, 'optionalAccess', _161 => _161.channels])) {
6533
6760
  const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
6534
6761
  if (channels.length) this.state.channels = channels;
6535
6762
  }
@@ -6613,7 +6840,7 @@ var ImageEditorController = (_class13 = class {
6613
6840
  this.syncViews();
6614
6841
  this.syncDisplay();
6615
6842
  const currentState = { ...this.state };
6616
- _optionalChain([this, 'access', _160 => _160.onStateChange, 'optionalCall', _161 => _161(currentState)]);
6843
+ _optionalChain([this, 'access', _162 => _162.onStateChange, 'optionalCall', _163 => _163(currentState)]);
6617
6844
  this.listeners.forEach((l) => l(currentState));
6618
6845
  if (this.effects.provider) this.queueEffectRefresh("incomplete");
6619
6846
  }
@@ -6642,7 +6869,7 @@ var ImageEditorController = (_class13 = class {
6642
6869
  if (l.type === "group") {
6643
6870
  const children = walk(l.children);
6644
6871
  if (children !== l.children) next2 = { ...l, children };
6645
- } else if (l.type === "smart" && _optionalChain([l, 'access', _162 => _162.smartFilters, 'optionalAccess', _163 => _163.filters, 'access', _164 => _164.some, 'call', _165 => _165((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6872
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _164 => _164.smartFilters, 'optionalAccess', _165 => _165.filters, 'access', _166 => _166.some, 'call', _167 => _167((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6646
6873
  try {
6647
6874
  const r = _chunkUYXL6ZWQcjs.rerender.call(void 0, l, canvas);
6648
6875
  if (all || !_chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
@@ -6738,8 +6965,8 @@ var ImageEditorController = (_class13 = class {
6738
6965
  */
6739
6966
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
6740
6967
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
6741
- const was = _optionalChain([layer, 'access', _166 => _166.smartFilters, 'optionalAccess', _167 => _167.filters, 'access', _168 => _168.find, 'call', _169 => _169((f) => f.id === filterId)]);
6742
- if (!was || was.kind !== "effect") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _170 => _170.smartFilters, 'optionalAccess', _171 => _171.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6968
+ const was = _optionalChain([layer, 'access', _168 => _168.smartFilters, 'optionalAccess', _169 => _169.filters, 'access', _170 => _170.find, 'call', _171 => _171((f) => f.id === filterId)]);
6969
+ if (!was || was.kind !== "effect") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _172 => _172.smartFilters, 'optionalAccess', _173 => _173.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6743
6970
  const update = {};
6744
6971
  if (changes.values) {
6745
6972
  const d = await this.describeEffect(was.effect);
@@ -6781,7 +7008,7 @@ var ImageEditorController = (_class13 = class {
6781
7008
  const layer = {
6782
7009
  type: "pixel",
6783
7010
  id,
6784
- name: _optionalChain([options, 'access', _172 => _172.name, 'optionalAccess', _173 => _173.trim, 'call', _174 => _174()]) || d.name,
7011
+ name: _optionalChain([options, 'access', _174 => _174.name, 'optionalAccess', _175 => _175.trim, 'call', _176 => _176()]) || d.name,
6785
7012
  visible: true,
6786
7013
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
6787
7014
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -6806,7 +7033,7 @@ var ImageEditorController = (_class13 = class {
6806
7033
  */
6807
7034
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
6808
7035
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
6809
- const layer = _optionalChain([found, 'optionalAccess', _175 => _175.layer]);
7036
+ const layer = _optionalChain([found, 'optionalAccess', _177 => _177.layer]);
6810
7037
  if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
6811
7038
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
6812
7039
  const g = layer.generator;
@@ -6835,7 +7062,7 @@ var ImageEditorController = (_class13 = class {
6835
7062
  * and how long it runs, the longest of theirs (ms). Null when none animates.
6836
7063
  */
6837
7064
  getAnimation() {
6838
- const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _176 => _176.generator, 'optionalAccess', _177 => _177.animate]));
7065
+ const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _178 => _178.generator, 'optionalAccess', _179 => _179.animate]));
6839
7066
  if (!layers.length) return null;
6840
7067
  return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
6841
7068
  }
@@ -6852,7 +7079,7 @@ var ImageEditorController = (_class13 = class {
6852
7079
  const { width, height } = this.naturalSize;
6853
7080
  const surfaces = /* @__PURE__ */ new Map();
6854
7081
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
6855
- if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _178 => _178.generator, 'optionalAccess', _179 => _179.animate])) continue;
7082
+ if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _180 => _180.generator, 'optionalAccess', _181 => _181.animate])) continue;
6856
7083
  const g = l.generator;
6857
7084
  const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
6858
7085
  surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
@@ -6913,7 +7140,7 @@ var ImageEditorController = (_class13 = class {
6913
7140
  transform: { ...s.transform },
6914
7141
  outputOpacity: s.outputOpacity,
6915
7142
  selection: _nullishCoalesce(s.selection, () => ( null)),
6916
- ..._optionalChain([s, 'access', _180 => _180.channels, 'optionalAccess', _181 => _181.length]) ? { channels: s.channels } : {},
7143
+ ..._optionalChain([s, 'access', _182 => _182.channels, 'optionalAccess', _183 => _183.length]) ? { channels: s.channels } : {},
6917
7144
  source: {
6918
7145
  sourceUrl: s.sourceUrl,
6919
7146
  element: this.imageElement,
@@ -6949,7 +7176,7 @@ var ImageEditorController = (_class13 = class {
6949
7176
  if (entry.colorMode) s.colorMode = entry.colorMode;
6950
7177
  else delete s.colorMode;
6951
7178
  s.selection = entry.selection;
6952
- if (_optionalChain([entry, 'access', _182 => _182.channels, 'optionalAccess', _183 => _183.length])) s.channels = entry.channels;
7179
+ if (_optionalChain([entry, 'access', _184 => _184.channels, 'optionalAccess', _185 => _185.length])) s.channels = entry.channels;
6953
7180
  else delete s.channels;
6954
7181
  if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
6955
7182
  this.imageElement = entry.source.element;
@@ -7156,7 +7383,7 @@ var ImageEditorController = (_class13 = class {
7156
7383
  return this.state.layers;
7157
7384
  }
7158
7385
  getLayer(id) {
7159
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _184 => _184.layer]);
7386
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _186 => _186.layer]);
7160
7387
  }
7161
7388
  /** The active layer, or `undefined`. */
7162
7389
  getActiveLayer() {
@@ -7169,7 +7396,7 @@ var ImageEditorController = (_class13 = class {
7169
7396
  setActiveLayer(id, target = "pixels") {
7170
7397
  if (id !== null && !this.getLayer(id)) return false;
7171
7398
  const layer = id ? this.getLayer(id) : void 0;
7172
- const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _185 => _185.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _186 => _186.type]) === "smart" && _optionalChain([layer, 'access', _187 => _187.smartFilters, 'optionalAccess', _188 => _188.mask]) ? "filter-mask" : "pixels";
7399
+ const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _187 => _187.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _188 => _188.type]) === "smart" && _optionalChain([layer, 'access', _189 => _189.smartFilters, 'optionalAccess', _190 => _190.mask]) ? "filter-mask" : "pixels";
7173
7400
  if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
7174
7401
  this.state.activeLayerId = id;
7175
7402
  this.state.activeTarget = t;
@@ -7331,7 +7558,7 @@ var ImageEditorController = (_class13 = class {
7331
7558
  surfaceOf: (l) => this.surfaceOf(l),
7332
7559
  version: `${this.sourceVersion()}:${this.patternsVersion()}`,
7333
7560
  globalLight: this.state.globalLight,
7334
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _189 => _189.state, 'access', _190 => _190.patterns, 'optionalAccess', _191 => _191.find, 'call', _192 => _192((p) => p.id === id)]), () => ( null))
7561
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _191 => _191.state, 'access', _192 => _192.patterns, 'optionalAccess', _193 => _193.find, 'call', _194 => _194((p) => p.id === id)]), () => ( null))
7335
7562
  };
7336
7563
  }
7337
7564
  __init95() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
@@ -7408,7 +7635,7 @@ var ImageEditorController = (_class13 = class {
7408
7635
  if (!ctx || typeof ctx.getImageData !== "function") return null;
7409
7636
  ctx.drawImage(el, 0, 0, width, height);
7410
7637
  const data = ctx.getImageData(0, 0, width, height);
7411
- if (!_optionalChain([data, 'optionalAccess', _193 => _193.data]) || data.data.length < width * height * 4) return null;
7638
+ if (!_optionalChain([data, 'optionalAccess', _195 => _195.data]) || data.data.length < width * height * 4) return null;
7412
7639
  return { width, height, data: data.data };
7413
7640
  } catch (e24) {
7414
7641
  return null;
@@ -7421,7 +7648,7 @@ var ImageEditorController = (_class13 = class {
7421
7648
  const prev = this.state.layers;
7422
7649
  const depth = this.bitDepth;
7423
7650
  this.state.layers = next;
7424
- _optionalChain([extra, 'optionalCall', _194 => _194()]);
7651
+ _optionalChain([extra, 'optionalCall', _196 => _196()]);
7425
7652
  if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
7426
7653
  if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
7427
7654
  this.state.activeLayerId = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
@@ -7459,7 +7686,7 @@ var ImageEditorController = (_class13 = class {
7459
7686
  const layer = {
7460
7687
  type: "pixel",
7461
7688
  id: init.id && !ids.has(init.id) ? init.id : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
7462
- name: _optionalChain([init, 'access', _195 => _195.name, 'optionalAccess', _196 => _196.trim, 'call', _197 => _197()]) || this.nextLayerName(),
7689
+ name: _optionalChain([init, 'access', _197 => _197.name, 'optionalAccess', _198 => _198.trim, 'call', _199 => _199()]) || this.nextLayerName(),
7463
7690
  visible: _nullishCoalesce(init.visible, () => ( true)),
7464
7691
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
7465
7692
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -7486,7 +7713,7 @@ var ImageEditorController = (_class13 = class {
7486
7713
  async decodeImage(image) {
7487
7714
  const trimmed = image.trim();
7488
7715
  let png = null;
7489
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _198 => _198.bytes]), () => ( null));
7716
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _200 => _200.bytes]), () => ( null));
7490
7717
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
7491
7718
  try {
7492
7719
  const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, trimmed);
@@ -7535,7 +7762,7 @@ var ImageEditorController = (_class13 = class {
7535
7762
  removeLayer(id) {
7536
7763
  const next = _chunkUYXL6ZWQcjs.removeLayer.call(void 0, this.state.layers, id);
7537
7764
  this.commitLayers(next, () => {
7538
- if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _199 => _199.id]) === this.state.selectedAnnotationId)) {
7765
+ if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _201 => _201.id]) === this.state.selectedAnnotationId)) {
7539
7766
  this.state.selectedAnnotationId = null;
7540
7767
  }
7541
7768
  });
@@ -7544,9 +7771,9 @@ var ImageEditorController = (_class13 = class {
7544
7771
  moveLayer(id, placement) {
7545
7772
  const next = _chunkUYXL6ZWQcjs.moveLayer.call(void 0, this.state.layers, id, placement);
7546
7773
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
7547
- if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _200 => _200.parent, 'optionalAccess', _201 => _201.id]), () => ( null)), index: loc.index };
7774
+ if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _202 => _202.parent, 'optionalAccess', _203 => _203.id]), () => ( null)), index: loc.index };
7548
7775
  this.commitLayers(next);
7549
- return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _202 => _202.parent, 'optionalAccess', _203 => _203.id]), () => ( null)), index: loc.index };
7776
+ return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _204 => _204.parent, 'optionalAccess', _205 => _205.id]), () => ( null)), index: loc.index };
7550
7777
  }
7551
7778
  /**
7552
7779
  * Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
@@ -7563,7 +7790,7 @@ var ImageEditorController = (_class13 = class {
7563
7790
  const group = {
7564
7791
  type: "group",
7565
7792
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "group"),
7566
- name: _optionalChain([init, 'access', _204 => _204.name, 'optionalAccess', _205 => _205.trim, 'call', _206 => _206()]) || "Group",
7793
+ name: _optionalChain([init, 'access', _206 => _206.name, 'optionalAccess', _207 => _207.trim, 'call', _208 => _208()]) || "Group",
7567
7794
  visible: true,
7568
7795
  opacity: 1,
7569
7796
  blend,
@@ -7656,7 +7883,7 @@ var ImageEditorController = (_class13 = class {
7656
7883
  sel = this.layerTransparency(id);
7657
7884
  } else {
7658
7885
  const current = this.state.selection;
7659
- if (!_optionalChain([current, 'optionalAccess', _207 => _207.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7886
+ if (!_optionalChain([current, 'optionalAccess', _209 => _209.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7660
7887
  sel = from === "hide-selection" ? _chunkUYXL6ZWQcjs.invertSelection.call(void 0, current) : current;
7661
7888
  }
7662
7889
  mask = this.maskFromSelection(sel, props);
@@ -7687,7 +7914,7 @@ var ImageEditorController = (_class13 = class {
7687
7914
  const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7688
7915
  const name = layer.name || id;
7689
7916
  if (layer.type === "shape") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is a shape layer, whose path already is its vector mask; change it with set_shape_component, or rasterize the layer first.`);
7690
- if (_optionalChain([layer, 'access', _208 => _208.mask, 'optionalAccess', _209 => _209.source])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
7917
+ if (_optionalChain([layer, 'access', _210 => _210.mask, 'optionalAccess', _211 => _211.source])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
7691
7918
  return layer;
7692
7919
  }
7693
7920
  requireVectorMask(id) {
@@ -7697,10 +7924,10 @@ var ImageEditorController = (_class13 = class {
7697
7924
  }
7698
7925
  /** Components from a path spec: `components`, or one `shape` / `subpaths`. */
7699
7926
  vectorMaskComponents(path) {
7700
- if (_optionalChain([path, 'access', _210 => _210.components, 'optionalAccess', _211 => _211.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7927
+ if (_optionalChain([path, 'access', _212 => _212.components, 'optionalAccess', _213 => _213.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7701
7928
  if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7702
- const specs = _optionalChain([path, 'access', _212 => _212.components, 'optionalAccess', _213 => _213.length]) ? path.components : [path];
7703
- return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _214 => _214.components, 'optionalAccess', _215 => _215.length]) ? `components[${i}].` : ""));
7929
+ const specs = _optionalChain([path, 'access', _214 => _214.components, 'optionalAccess', _215 => _215.length]) ? path.components : [path];
7930
+ return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _216 => _216.components, 'optionalAccess', _217 => _217.length]) ? `components[${i}].` : ""));
7704
7931
  }
7705
7932
  /**
7706
7933
  * Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
@@ -7717,7 +7944,7 @@ var ImageEditorController = (_class13 = class {
7717
7944
  vm = { components: this.vectorMaskComponents(path) };
7718
7945
  if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
7719
7946
  } else if (from === "reveal-all" || from === "hide-all") {
7720
- if (_optionalChain([path, 'access', _216 => _216.components, 'optionalAccess', _217 => _217.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
7947
+ if (_optionalChain([path, 'access', _218 => _218.components, 'optionalAccess', _219 => _219.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
7721
7948
  vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
7722
7949
  } else {
7723
7950
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
@@ -7728,7 +7955,7 @@ var ImageEditorController = (_class13 = class {
7728
7955
  /** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
7729
7956
  traceSelection(options) {
7730
7957
  const sel = this.state.selection;
7731
- if (!_optionalChain([sel, 'optionalAccess', _218 => _218.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7958
+ if (!_optionalChain([sel, 'optionalAccess', _220 => _220.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7732
7959
  if (options.tolerance !== void 0 && !(options.tolerance >= 0.1 && options.tolerance <= 10)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("tolerance must be from 0.1 to 10 px.");
7733
7960
  const subpaths = selectionToSubpaths(sel, options);
7734
7961
  if (!subpaths.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The selection is too small or too faint to trace (below minArea, or under half selected); lower minArea or threshold.");
@@ -7909,7 +8136,7 @@ var ImageEditorController = (_class13 = class {
7909
8136
  const layer = loc.layer;
7910
8137
  if (layer.type !== "pixel") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
7911
8138
  const sel = this.state.selection;
7912
- if (!_optionalChain([sel, 'optionalAccess', _219 => _219.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
8139
+ if (!_optionalChain([sel, 'optionalAccess', _221 => _221.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7913
8140
  if (options.cut) _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
7914
8141
  const surface = this.surfaceOf(layer);
7915
8142
  const sb = sel.bounds;
@@ -7927,14 +8154,14 @@ var ImageEditorController = (_class13 = class {
7927
8154
  const copy = {
7928
8155
  type: "pixel",
7929
8156
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
7930
- name: _optionalChain([options, 'access', _220 => _220.name, 'optionalAccess', _221 => _221.trim, 'call', _222 => _222()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
8157
+ name: _optionalChain([options, 'access', _222 => _222.name, 'optionalAccess', _223 => _223.trim, 'call', _224 => _224()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7931
8158
  visible: true,
7932
8159
  opacity: 1,
7933
8160
  blend: "normal",
7934
8161
  surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
7935
8162
  offset: { ...layer.offset }
7936
8163
  };
7937
- let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _223 => _223.parent, 'optionalAccess', _224 => _224.id]), () => ( null)), loc.index + 1);
8164
+ let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _225 => _225.parent, 'optionalAccess', _226 => _226.id]), () => ( null)), loc.index + 1);
7938
8165
  if (kept) {
7939
8166
  const cutLayer = { ...layer, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, kept) };
7940
8167
  delete cutLayer.source;
@@ -7958,7 +8185,7 @@ var ImageEditorController = (_class13 = class {
7958
8185
  layers: () => this.state.layers,
7959
8186
  activeLayerId: () => this.state.activeLayerId,
7960
8187
  activeTarget: () => this.state.activeTarget,
7961
- selection: () => _optionalChain([this, 'access', _225 => _225.state, 'access', _226 => _226.selection, 'optionalAccess', _227 => _227.bounds]) ? this.state.selection : null,
8188
+ selection: () => _optionalChain([this, 'access', _227 => _227.state, 'access', _228 => _228.selection, 'optionalAccess', _229 => _229.bounds]) ? this.state.selection : null,
7962
8189
  canvas: () => this.naturalSize,
7963
8190
  pixelsOf: (layer) => this.surfaceOf(layer),
7964
8191
  shapeEnv: () => this.shapeEnv(),
@@ -8106,7 +8333,7 @@ var ImageEditorController = (_class13 = class {
8106
8333
  * anything else nests as a layer document. Returns the smart object's id.
8107
8334
  */
8108
8335
  convertToSmartObject(ids, options = {}) {
8109
- const list = _optionalChain([ids, 'optionalAccess', _228 => _228.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
8336
+ const list = _optionalChain([ids, 'optionalAccess', _230 => _230.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
8110
8337
  if (!list.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
8111
8338
  const res = _chunkUYXL6ZWQcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
8112
8339
  this.commitLayers(res.layers, () => {
@@ -8139,8 +8366,8 @@ var ImageEditorController = (_class13 = class {
8139
8366
  width: c.width,
8140
8367
  height: c.height,
8141
8368
  decoded: _chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c),
8142
- fileType: _nullishCoalesce(_optionalChain([c, 'access', _229 => _229.file, 'optionalAccess', _230 => _230.type]), () => ( null)),
8143
- linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _231 => _231.linked, 'optionalAccess', _232 => _232.path]), () => ( null)),
8369
+ fileType: _nullishCoalesce(_optionalChain([c, 'access', _231 => _231.file, 'optionalAccess', _232 => _232.type]), () => ( null)),
8370
+ linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _233 => _233.linked, 'optionalAccess', _234 => _234.path]), () => ( null)),
8144
8371
  instances: _chunkUYXL6ZWQcjs.instancesOf.call(void 0, this.state.layers, c.id),
8145
8372
  layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
8146
8373
  },
@@ -8157,9 +8384,9 @@ var ImageEditorController = (_class13 = class {
8157
8384
  bounds: _chunkUYXL6ZWQcjs.transformedBox.call(void 0, g)
8158
8385
  },
8159
8386
  smartFilters: {
8160
- enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _233 => _233.enabled]), () => ( true)),
8161
- filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _234 => _234.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
8162
- mask: _optionalChain([stack, 'optionalAccess', _235 => _235.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunkCWM3CUUXcjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
8387
+ enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _235 => _235.enabled]), () => ( true)),
8388
+ filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _236 => _236.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
8389
+ mask: _optionalChain([stack, 'optionalAccess', _237 => _237.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunkCWM3CUUXcjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
8163
8390
  },
8164
8391
  bounds: this.getLayerBounds(id)
8165
8392
  };
@@ -8298,7 +8525,7 @@ var ImageEditorController = (_class13 = class {
8298
8525
  * it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
8299
8526
  */
8300
8527
  maskFiltersWithSelection(id, useSelection) {
8301
- if (!useSelection || !_optionalChain([this, 'access', _236 => _236.state, 'access', _237 => _237.selection, 'optionalAccess', _238 => _238.bounds])) return false;
8528
+ if (!useSelection || !_optionalChain([this, 'access', _238 => _238.state, 'access', _239 => _239.selection, 'optionalAccess', _240 => _240.bounds])) return false;
8302
8529
  this.setSmartFilterMask(id, "selection", {}, false);
8303
8530
  return true;
8304
8531
  }
@@ -8312,19 +8539,19 @@ var ImageEditorController = (_class13 = class {
8312
8539
  removeSmartFilter(id, filterId) {
8313
8540
  const res = _chunkUYXL6ZWQcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
8314
8541
  this.commitLayers(res.layers);
8315
- return _nullishCoalesce(_optionalChain([res, 'access', _239 => _239.layer, 'access', _240 => _240.smartFilters, 'optionalAccess', _241 => _241.filters]), () => ( []));
8542
+ return _nullishCoalesce(_optionalChain([res, 'access', _241 => _241.layer, 'access', _242 => _242.smartFilters, 'optionalAccess', _243 => _243.filters]), () => ( []));
8316
8543
  }
8317
8544
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
8318
8545
  moveSmartFilter(id, filterId, index) {
8319
8546
  const res = _chunkUYXL6ZWQcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
8320
8547
  this.commitLayers(res.layers);
8321
- return _nullishCoalesce(_optionalChain([res, 'access', _242 => _242.layer, 'access', _243 => _243.smartFilters, 'optionalAccess', _244 => _244.filters]), () => ( []));
8548
+ return _nullishCoalesce(_optionalChain([res, 'access', _244 => _244.layer, 'access', _245 => _245.smartFilters, 'optionalAccess', _246 => _246.filters]), () => ( []));
8322
8549
  }
8323
8550
  /** Turns a smart object's whole filter stack on or off (one undo step). */
8324
8551
  setSmartFiltersEnabled(id, enabled) {
8325
8552
  const res = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
8326
8553
  this.commitLayers(res.layers);
8327
- return _nullishCoalesce(_optionalChain([res, 'access', _245 => _245.layer, 'access', _246 => _246.smartFilters, 'optionalAccess', _247 => _247.enabled]), () => ( true));
8554
+ return _nullishCoalesce(_optionalChain([res, 'access', _247 => _247.layer, 'access', _248 => _248.smartFilters, 'optionalAccess', _249 => _249.enabled]), () => ( true));
8328
8555
  }
8329
8556
  /**
8330
8557
  * Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
@@ -8336,11 +8563,11 @@ var ImageEditorController = (_class13 = class {
8336
8563
  let mask;
8337
8564
  if (from === "none") mask = null;
8338
8565
  else if (from === "keep") {
8339
- if (!_optionalChain([layer, 'access', _248 => _248.smartFilters, 'optionalAccess', _249 => _249.mask])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
8566
+ if (!_optionalChain([layer, 'access', _250 => _250.smartFilters, 'optionalAccess', _251 => _251.mask])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
8340
8567
  mask = withMaskProps(layer.smartFilters.mask, props);
8341
8568
  } else if (from === "selection") {
8342
8569
  const sel = this.state.selection;
8343
- if (!_optionalChain([sel, 'optionalAccess', _250 => _250.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8570
+ if (!_optionalChain([sel, 'optionalAccess', _252 => _252.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8344
8571
  mask = this.maskFromSelection(sel, props);
8345
8572
  } else {
8346
8573
  const v = from === "reveal-all" ? 255 : 0;
@@ -8352,7 +8579,7 @@ var ImageEditorController = (_class13 = class {
8352
8579
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
8353
8580
  else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
8354
8581
  }, commitToHistory);
8355
- return _nullishCoalesce(_optionalChain([res, 'access', _251 => _251.layer, 'access', _252 => _252.smartFilters, 'optionalAccess', _253 => _253.mask]), () => ( null));
8582
+ return _nullishCoalesce(_optionalChain([res, 'access', _253 => _253.layer, 'access', _254 => _254.smartFilters, 'optionalAccess', _255 => _255.mask]), () => ( null));
8356
8583
  }
8357
8584
  /**
8358
8585
  * Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
@@ -8400,7 +8627,7 @@ var ImageEditorController = (_class13 = class {
8400
8627
  if (this.getFreeTransform()) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
8401
8628
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, id);
8402
8629
  const c = layer.contents;
8403
- if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _254 => _254.file, 'optionalAccess', _255 => _255.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8630
+ if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _256 => _256.file, 'optionalAccess', _257 => _257.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8404
8631
  const saved = {
8405
8632
  state: { ...this.state },
8406
8633
  undo: this.undoStack,
@@ -8431,9 +8658,9 @@ var ImageEditorController = (_class13 = class {
8431
8658
  editingContents: this.getEditingContents()
8432
8659
  };
8433
8660
  delete this.state.legacyOutputBlur;
8434
- if (_optionalChain([c, 'access', _256 => _256.document, 'optionalAccess', _257 => _257.globalLight])) this.state.globalLight = c.document.globalLight;
8661
+ if (_optionalChain([c, 'access', _258 => _258.document, 'optionalAccess', _259 => _259.globalLight])) this.state.globalLight = c.document.globalLight;
8435
8662
  else delete this.state.globalLight;
8436
- if (_optionalChain([c, 'access', _258 => _258.document, 'optionalAccess', _259 => _259.patterns, 'optionalAccess', _260 => _260.length])) this.state.patterns = c.document.patterns;
8663
+ if (_optionalChain([c, 'access', _260 => _260.document, 'optionalAccess', _261 => _261.patterns, 'optionalAccess', _262 => _262.length])) this.state.patterns = c.document.patterns;
8437
8664
  else delete this.state.patterns;
8438
8665
  this.imageElement = null;
8439
8666
  this.samplePixels = null;
@@ -8453,23 +8680,23 @@ var ImageEditorController = (_class13 = class {
8453
8680
  closeSmartObjectContents(save = true) {
8454
8681
  const top = this.contentsStack.pop();
8455
8682
  if (!top) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
8456
- if (_optionalChain([this, 'access', _261 => _261.openTransform, 'optionalAccess', _262 => _262.isOpen])) this.openTransform.cancel();
8683
+ if (_optionalChain([this, 'access', _263 => _263.openTransform, 'optionalAccess', _264 => _264.isOpen])) this.openTransform.cancel();
8457
8684
  this.openTransform = null;
8458
8685
  const edited = this.state;
8459
8686
  const changed = save && this.undoStack.length > 0;
8460
8687
  let next = null;
8461
8688
  if (changed) {
8462
- const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _263 => _263.layer]);
8463
- const old = _optionalChain([layer, 'optionalAccess', _264 => _264.contents]);
8689
+ const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _265 => _265.layer]);
8690
+ const old = _optionalChain([layer, 'optionalAccess', _266 => _266.contents]);
8464
8691
  const { width, height } = edited.imageDimensions;
8465
8692
  const only = edited.layers.length === 1 ? edited.layers[0] : null;
8466
- const plain3 = _optionalChain([only, 'optionalAccess', _265 => _265.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _266 => _266.filters, 'optionalAccess', _267 => _267.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8467
- if (_optionalChain([old, 'optionalAccess', _268 => _268.kind]) === "raster" && plain3) {
8693
+ const plain3 = _optionalChain([only, 'optionalAccess', _267 => _267.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _268 => _268.filters, 'optionalAccess', _269 => _269.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8694
+ if (_optionalChain([old, 'optionalAccess', _270 => _270.kind]) === "raster" && plain3) {
8468
8695
  const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
8469
8696
  next = _chunkUYXL6ZWQcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
8470
8697
  } else {
8471
8698
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
8472
- next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _269 => _269.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _270 => _270.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8699
+ next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _271 => _271.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _272 => _272.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8473
8700
  }
8474
8701
  }
8475
8702
  const saved = top.saved;
@@ -8494,7 +8721,7 @@ var ImageEditorController = (_class13 = class {
8494
8721
  }
8495
8722
  /** The document's own layers (not the contents open for editing). */
8496
8723
  rootLayers() {
8497
- return _nullishCoalesce(_optionalChain([this, 'access', _271 => _271.contentsStack, 'access', _272 => _272[0], 'optionalAccess', _273 => _273.saved, 'access', _274 => _274.state, 'access', _275 => _275.layers]), () => ( this.state.layers));
8724
+ return _nullishCoalesce(_optionalChain([this, 'access', _273 => _273.contentsStack, 'access', _274 => _274[0], 'optionalAccess', _275 => _275.saved, 'access', _276 => _276.state, 'access', _277 => _277.layers]), () => ( this.state.layers));
8498
8725
  }
8499
8726
  /** Drops every open contents edit (loading another document). */
8500
8727
  abandonContents() {
@@ -8715,7 +8942,7 @@ var ImageEditorController = (_class13 = class {
8715
8942
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
8716
8943
  const key = `${tw}x${th}:${ox},${oy}`;
8717
8944
  let byKey = this.thumbCache.get(surface);
8718
- const hit = _optionalChain([byKey, 'optionalAccess', _276 => _276.get, 'call', _277 => _277(key)]);
8945
+ const hit = _optionalChain([byKey, 'optionalAccess', _278 => _278.get, 'call', _279 => _279(key)]);
8719
8946
  if (hit) return hit;
8720
8947
  const out = new Uint8ClampedArray(tw * th * 4);
8721
8948
  for (let y = 0; y < th; y++) {
@@ -8856,7 +9083,7 @@ var ImageEditorController = (_class13 = class {
8856
9083
  if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
8857
9084
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "all", action);
8858
9085
  } else if (ch === "filter-mask") {
8859
- if (layer.type !== "smart" || !_optionalChain([layer, 'access', _278 => _278.smartFilters, 'optionalAccess', _279 => _279.mask])) {
9086
+ if (layer.type !== "smart" || !_optionalChain([layer, 'access', _280 => _280.smartFilters, 'optionalAccess', _281 => _281.mask])) {
8860
9087
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
8861
9088
  }
8862
9089
  if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
@@ -8871,7 +9098,7 @@ var ImageEditorController = (_class13 = class {
8871
9098
  if (!layer.visible) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
8872
9099
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
8873
9100
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
8874
- const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _280 => _280.locks, 'optionalAccess', _281 => _281.transparency]));
9101
+ const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _282 => _282.locks, 'optionalAccess', _283 => _283.transparency]));
8875
9102
  return { id, layer, channel: ch, offset, surface, lockTransparency };
8876
9103
  }
8877
9104
  /** The layer with its pixels (or mask) replaced by `surface`. */
@@ -8915,13 +9142,13 @@ var ImageEditorController = (_class13 = class {
8915
9142
  blend: target.channel !== "pixels" ? "normal" : brush.blend,
8916
9143
  lockTransparency: target.lockTransparency,
8917
9144
  // In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
8918
- selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _282 => _282.state, 'access', _283 => _283.selection, 'optionalAccess', _284 => _284.bounds]) ? this.state.selection : null,
9145
+ selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _284 => _284.state, 'access', _285 => _285.selection, 'optionalAccess', _286 => _286.bounds]) ? this.state.selection : null,
8919
9146
  offset: target.offset
8920
9147
  };
8921
9148
  const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
8922
9149
  if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
8923
9150
  if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
8924
- const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _285 => _285.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
9151
+ const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _287 => _287.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8925
9152
  return new PaintStrokeSession(this, target, new (0, _chunkEBDCRTZIcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
8926
9153
  }
8927
9154
  /** A retouching stroke's start: its settings, what it samples and how it composites. */
@@ -8968,9 +9195,9 @@ var ImageEditorController = (_class13 = class {
8968
9195
  const steps = settings.historySteps;
8969
9196
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
8970
9197
  if (!entry) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
8971
- const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _286 => _286.layer]);
9198
+ const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _288 => _288.layer]);
8972
9199
  if (!then) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
8973
- const surface = target.channel === "mask" ? _optionalChain([then, 'access', _287 => _287.mask, 'optionalAccess', _288 => _288.surface]) : then.type === "pixel" ? then.surface : void 0;
9200
+ const surface = target.channel === "mask" ? _optionalChain([then, 'access', _289 => _289.mask, 'optionalAccess', _290 => _290.surface]) : then.type === "pixel" ? then.surface : void 0;
8974
9201
  if (!surface) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
8975
9202
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
8976
9203
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
@@ -9044,7 +9271,7 @@ var ImageEditorController = (_class13 = class {
9044
9271
  }
9045
9272
  /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
9046
9273
  surfaceSource(surface, offset) {
9047
- return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _289 => _289.tiles, 'access', _290 => _290.get, 'call', _291 => _291(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _292 => _292.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
9274
+ return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _291 => _291.tiles, 'access', _292 => _292.get, 'call', _293 => _293(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _294 => _294.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
9048
9275
  }
9049
9276
  /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
9050
9277
  compositeSource(throughId, depth = null) {
@@ -9120,7 +9347,7 @@ var ImageEditorController = (_class13 = class {
9120
9347
  paintStroke(init) {
9121
9348
  if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("points must hold at least one { x, y } point.");
9122
9349
  for (const p of init.points) {
9123
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _293 => _293.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _294 => _294.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
9350
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _295 => _295.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _296 => _296.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
9124
9351
  }
9125
9352
  const session = this.beginStroke(init);
9126
9353
  session.push(init.points);
@@ -9149,7 +9376,7 @@ var ImageEditorController = (_class13 = class {
9149
9376
  */
9150
9377
  strokeSelection(options) {
9151
9378
  const sel = this.state.selection;
9152
- if (!_optionalChain([sel, 'optionalAccess', _295 => _295.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
9379
+ if (!_optionalChain([sel, 'optionalAccess', _297 => _297.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
9153
9380
  const width = options.width;
9154
9381
  if (!(width > 0 && width <= 250)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
9155
9382
  const location = _nullishCoalesce(options.location, () => ( "outside"));
@@ -9166,7 +9393,7 @@ var ImageEditorController = (_class13 = class {
9166
9393
  */
9167
9394
  cropToSelection() {
9168
9395
  const sel = this.state.selection;
9169
- if (!_optionalChain([sel, 'optionalAccess', _296 => _296.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
9396
+ if (!_optionalChain([sel, 'optionalAccess', _298 => _298.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
9170
9397
  const crop = { ...sel.bounds };
9171
9398
  this.setCrop(crop);
9172
9399
  return crop;
@@ -9180,7 +9407,7 @@ var ImageEditorController = (_class13 = class {
9180
9407
  */
9181
9408
  contentAwareFill(options = {}) {
9182
9409
  const sel = this.state.selection;
9183
- if (!_optionalChain([sel, 'optionalAccess', _297 => _297.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9410
+ if (!_optionalChain([sel, 'optionalAccess', _299 => _299.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9184
9411
  if (this.bitDepth !== 8) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Content-Aware Fill works on 8-bit documents for now; set_bit_depth 8 first, or use spot_heal.");
9185
9412
  const output = _nullishCoalesce(options.output, () => ( "current"));
9186
9413
  if (output !== "current" && output !== "new-layer") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown output "${String(output)}"; use current or new-layer.`);
@@ -9245,8 +9472,8 @@ var ImageEditorController = (_class13 = class {
9245
9472
  */
9246
9473
  copyPixels(options = {}) {
9247
9474
  const { width, height } = this.naturalSize;
9248
- const sel = _optionalChain([this, 'access', _298 => _298.state, 'access', _299 => _299.selection, 'optionalAccess', _300 => _300.bounds]) ? this.state.selection : null;
9249
- const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _301 => _301.bounds]), () => ( { x: 0, y: 0, width, height }));
9475
+ const sel = _optionalChain([this, 'access', _300 => _300.state, 'access', _301 => _301.selection, 'optionalAccess', _302 => _302.bounds]) ? this.state.selection : null;
9476
+ const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _303 => _303.bounds]), () => ( { x: 0, y: 0, width, height }));
9250
9477
  let data;
9251
9478
  if (options.merged) {
9252
9479
  data = new Uint8ClampedArray(this.compositePixels(rect).data);
@@ -9286,7 +9513,7 @@ var ImageEditorController = (_class13 = class {
9286
9513
  pastePixels(mode = "new-layer", image = this.clipboard) {
9287
9514
  if (!image) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
9288
9515
  if (!PASTE_MODES.includes(mode)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
9289
- const sel = _optionalChain([this, 'access', _302 => _302.state, 'access', _303 => _303.selection, 'optionalAccess', _304 => _304.bounds]) ? this.state.selection : null;
9516
+ const sel = _optionalChain([this, 'access', _304 => _304.state, 'access', _305 => _305.selection, 'optionalAccess', _306 => _306.bounds]) ? this.state.selection : null;
9290
9517
  if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
9291
9518
  const { width, height } = this.naturalSize;
9292
9519
  let x;
@@ -9295,7 +9522,7 @@ var ImageEditorController = (_class13 = class {
9295
9522
  x = image.x;
9296
9523
  y = image.y;
9297
9524
  } else {
9298
- const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _305 => _305.bounds]), () => ( { x: 0, y: 0, width, height }));
9525
+ const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _307 => _307.bounds]), () => ( { x: 0, y: 0, width, height }));
9299
9526
  x = Math.round(frame.x + (frame.width - image.width) / 2);
9300
9527
  y = Math.round(frame.y + (frame.height - image.height) / 2);
9301
9528
  }
@@ -9312,8 +9539,8 @@ var ImageEditorController = (_class13 = class {
9312
9539
  if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("opacity must be from 0 to 1.");
9313
9540
  const blend = _nullishCoalesce(_chunkUYXL6ZWQcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
9314
9541
  const quickMask = target.channel === "quick-mask";
9315
- const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _306 => _306.state, 'access', _307 => _307.selection, 'optionalAccess', _308 => _308.bounds]) ? this.state.selection : null)));
9316
- const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _309 => _309.bounds]), () => ( { x: 0, y: 0, width, height }));
9542
+ const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _308 => _308.state, 'access', _309 => _309.selection, 'optionalAccess', _310 => _310.bounds]) ? this.state.selection : null)));
9543
+ const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _311 => _311.bounds]), () => ( { x: 0, y: 0, width, height }));
9317
9544
  const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
9318
9545
  const ones = new Float32Array(region.width * region.height);
9319
9546
  if (sel) {
@@ -9438,7 +9665,7 @@ var ImageEditorController = (_class13 = class {
9438
9665
  placeLayer(layers, node, where) {
9439
9666
  if (where.aboveId) {
9440
9667
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.aboveId);
9441
- if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _310 => _310.parent, 'optionalAccess', _311 => _311.id]), () => ( null)), loc.index + 1);
9668
+ if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _312 => _312.parent, 'optionalAccess', _313 => _313.id]), () => ( null)), loc.index + 1);
9442
9669
  }
9443
9670
  if (where.parentId) {
9444
9671
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.parentId);
@@ -9449,11 +9676,11 @@ var ImageEditorController = (_class13 = class {
9449
9676
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
9450
9677
  if (at < nodes.length) {
9451
9678
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[at].id);
9452
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _312 => _312.parent, 'optionalAccess', _313 => _313.id]), () => ( null)), loc.index);
9679
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _314 => _314.parent, 'optionalAccess', _315 => _315.id]), () => ( null)), loc.index);
9453
9680
  }
9454
9681
  if (nodes.length) {
9455
9682
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
9456
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _314 => _314.parent, 'optionalAccess', _315 => _315.id]), () => ( null)), loc.index + 1);
9683
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _316 => _316.parent, 'optionalAccess', _317 => _317.id]), () => ( null)), loc.index + 1);
9457
9684
  }
9458
9685
  }
9459
9686
  return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
@@ -9492,7 +9719,7 @@ var ImageEditorController = (_class13 = class {
9492
9719
  enabled: spec.enabled,
9493
9720
  opacity: spec.opacity,
9494
9721
  blend: spec.blend,
9495
- mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _316 => _316.state, 'access', _317 => _317.selection, 'optionalAccess', _318 => _318.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9722
+ mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _318 => _318.state, 'access', _319 => _319.selection, 'optionalAccess', _320 => _320.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9496
9723
  });
9497
9724
  while (ids.has(layer.id)) layer.id = _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "adj");
9498
9725
  const { width, height } = this.naturalSize;
@@ -9569,7 +9796,7 @@ var ImageEditorController = (_class13 = class {
9569
9796
  const anchor = nodes[to];
9570
9797
  const without = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => null);
9571
9798
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, without, anchor.id);
9572
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _319 => _319.parent, 'optionalAccess', _320 => _320.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9799
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _321 => _321.parent, 'optionalAccess', _322 => _322.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9573
9800
  }
9574
9801
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
9575
9802
  moveAdjustmentLayer(id, toIndex) {
@@ -9610,7 +9837,7 @@ var ImageEditorController = (_class13 = class {
9610
9837
  return _nullishCoalesce(this.state.selection, () => ( null));
9611
9838
  }
9612
9839
  get hasSelection() {
9613
- return Boolean(_optionalChain([this, 'access', _321 => _321.state, 'access', _322 => _322.selection, 'optionalAccess', _323 => _323.bounds]));
9840
+ return Boolean(_optionalChain([this, 'access', _323 => _323.state, 'access', _324 => _324.selection, 'optionalAccess', _325 => _325.bounds]));
9614
9841
  }
9615
9842
  /** Returns the current canvas (composition) dimensions. */
9616
9843
  getCanvasSize() {
@@ -9702,7 +9929,7 @@ var ImageEditorController = (_class13 = class {
9702
9929
  const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
9703
9930
  if (prev === next || prev && next && sameSelection(prev, next)) return false;
9704
9931
  this.recordHistory();
9705
- if (!next && _optionalChain([prev, 'optionalAccess', _324 => _324.bounds])) this.lastSelection = prev;
9932
+ if (!next && _optionalChain([prev, 'optionalAccess', _326 => _326.bounds])) this.lastSelection = prev;
9706
9933
  this.state.selection = next;
9707
9934
  this.notify();
9708
9935
  return true;
@@ -9745,14 +9972,14 @@ var ImageEditorController = (_class13 = class {
9745
9972
  /** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
9746
9973
  async growSelection(options = {}) {
9747
9974
  const sel = this.state.selection;
9748
- if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) return false;
9975
+ if (!_optionalChain([sel, 'optionalAccess', _327 => _327.bounds])) return false;
9749
9976
  const pixels = await this.requirePixels(options);
9750
9977
  return this.setSelection(growSelection(pixels, sel, options));
9751
9978
  }
9752
9979
  /** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
9753
9980
  async selectSimilar(options = {}) {
9754
9981
  const sel = this.state.selection;
9755
- if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) return false;
9982
+ if (!_optionalChain([sel, 'optionalAccess', _328 => _328.bounds])) return false;
9756
9983
  const pixels = await this.requirePixels(options);
9757
9984
  return this.setSelection(selectSimilar(pixels, sel, options));
9758
9985
  }
@@ -9866,6 +10093,30 @@ var ImageEditorController = (_class13 = class {
9866
10093
  this.setSelection(region, _nullishCoalesce(options.mode, () => ( "replace")));
9867
10094
  return _nullishCoalesce(this.state.selection, () => ( null));
9868
10095
  }
10096
+ /**
10097
+ * Select › Focus Area: selects the parts of the image that are in focus (fine detail above the
10098
+ * image's noise), fitted to its edges, combined with the selection by `mode` as one undo step.
10099
+ * Resolves to the selection and the noise level measured (σ of luminance in levels).
10100
+ */
10101
+ async selectFocusArea(options = {}) {
10102
+ const pixels = await this.requirePixels({ sample: options.sampleAllLayers === false ? "active-layer" : "composite" });
10103
+ const { selection, noiseLevel } = focusArea(pixels, options);
10104
+ this.setSelection(selection, _nullishCoalesce(options.mode, () => ( "replace")));
10105
+ return { selection: _nullishCoalesce(this.state.selection, () => ( null)), noiseLevel };
10106
+ }
10107
+ /**
10108
+ * Select › Sky: selects the sky (blue, or bright and grey when overcast; smooth; grown down from
10109
+ * the top of the image, with patches seen through gaps), fitted to its edges, combined with the
10110
+ * selection by `mode` as one undo step. Resolves to the selection and, when no sky was found
10111
+ * (the selection is then unchanged), why.
10112
+ */
10113
+ async selectSky(options = {}) {
10114
+ const pixels = await this.requirePixels({ sample: options.sampleAllLayers === false ? "active-layer" : "composite" });
10115
+ const { selection, reason } = findSky(pixels, options);
10116
+ if (!selection.bounds) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), note: reason };
10117
+ this.setSelection(selection, _nullishCoalesce(options.mode, () => ( "replace")));
10118
+ return { selection: _nullishCoalesce(this.state.selection, () => ( null)) };
10119
+ }
9869
10120
  /**
9870
10121
  * Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
9871
10122
  * or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
@@ -9887,7 +10138,7 @@ var ImageEditorController = (_class13 = class {
9887
10138
  try {
9888
10139
  const canvas = await this.renderSource();
9889
10140
  const ctx = canvas.getContext("2d");
9890
- const data2 = _optionalChain([ctx, 'optionalAccess', _327 => _327.getImageData, 'optionalCall', _328 => _328(0, 0, width, height)]);
10141
+ const data2 = _optionalChain([ctx, 'optionalAccess', _329 => _329.getImageData, 'optionalCall', _330 => _330(0, 0, width, height)]);
9891
10142
  if (data2 && data2.data && data2.data.length >= width * height * 4) {
9892
10143
  base = { width, height, data: data2.data };
9893
10144
  this.samplePixels = base;
@@ -9962,7 +10213,7 @@ var ImageEditorController = (_class13 = class {
9962
10213
  /** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
9963
10214
  modifySelection(op, radius) {
9964
10215
  const sel = this.state.selection;
9965
- if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) return false;
10216
+ if (!_optionalChain([sel, 'optionalAccess', _331 => _331.bounds])) return false;
9966
10217
  return this.setSelection(_chunkUYXL6ZWQcjs.modifySelection.call(void 0, sel, op, radius));
9967
10218
  }
9968
10219
  /**
@@ -9971,7 +10222,7 @@ var ImageEditorController = (_class13 = class {
9971
10222
  */
9972
10223
  async refineSelection(params, options = {}) {
9973
10224
  const sel = this.state.selection;
9974
- if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) return false;
10225
+ if (!_optionalChain([sel, 'optionalAccess', _332 => _332.bounds])) return false;
9975
10226
  const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
9976
10227
  return this.setSelection(refineSelection(pixels, sel, params));
9977
10228
  }
@@ -10002,7 +10253,7 @@ var ImageEditorController = (_class13 = class {
10002
10253
  let mask;
10003
10254
  if (source === "selection") {
10004
10255
  const sel = this.state.selection;
10005
- if (!_optionalChain([sel, 'optionalAccess', _331 => _331.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10256
+ if (!_optionalChain([sel, 'optionalAccess', _333 => _333.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10006
10257
  mask = sel;
10007
10258
  } else if ("channelId" in source) {
10008
10259
  mask = this.requireChannel(source.channelId).mask;
@@ -10026,7 +10277,7 @@ var ImageEditorController = (_class13 = class {
10026
10277
  const canvas = this.renderer.createCanvas(w, h);
10027
10278
  const ctx = canvas.getContext("2d");
10028
10279
  if (ctx) ctx.drawImage(img, 0, 0, w, h);
10029
- const data = _optionalChain([ctx, 'optionalAccess', _332 => _332.getImageData, 'optionalCall', _333 => _333(0, 0, w, h)]);
10280
+ const data = _optionalChain([ctx, 'optionalAccess', _334 => _334.getImageData, 'optionalCall', _335 => _335(0, 0, w, h)]);
10030
10281
  if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
10031
10282
  return { width: w, height: h, data: data.data };
10032
10283
  }
@@ -10042,7 +10293,7 @@ var ImageEditorController = (_class13 = class {
10042
10293
  const provider = this.segmentation;
10043
10294
  if (!provider) {
10044
10295
  const pixels = await this.requirePixels({});
10045
- _optionalChain([options, 'access', _334 => _334.signal, 'optionalAccess', _335 => _335.throwIfAborted, 'call', _336 => _336()]);
10296
+ _optionalChain([options, 'access', _336 => _336.signal, 'optionalAccess', _337 => _337.throwIfAborted, 'call', _338 => _338()]);
10046
10297
  const { selection, reason } = findSubject(pixels, { enhanceEdge: options.enhanceEdge });
10047
10298
  if (selection.bounds) this.shapeCommand(selection, options);
10048
10299
  const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
@@ -10057,24 +10308,24 @@ var ImageEditorController = (_class13 = class {
10057
10308
  const { width, height } = this.naturalSize;
10058
10309
  const image = await this.toDataURL({ format: "image/png" });
10059
10310
  const results = await provider.segment({ image, width, height, target: description, maxSegments: options.maxSegments, signal: options.signal });
10060
- _optionalChain([options, 'access', _337 => _337.signal, 'optionalAccess', _338 => _338.throwIfAborted, 'call', _339 => _339()]);
10311
+ _optionalChain([options, 'access', _339 => _339.signal, 'optionalAccess', _340 => _340.throwIfAborted, 'call', _341 => _341()]);
10061
10312
  const decoded = [];
10062
10313
  for (const r of _nullishCoalesce(results, () => ( []))) {
10063
10314
  decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
10064
10315
  }
10065
10316
  const segments = decoded.map((r) => {
10066
10317
  const one = segmentsToSelection(width, height, [r]);
10067
- return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _340 => _340.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10318
+ return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _342 => _342.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10068
10319
  });
10069
10320
  const mask = segmentsToSelection(width, height, decoded);
10070
10321
  if (mask && options.beforeApply) {
10071
10322
  const outlines = decoded.flatMap((r, i) => {
10072
10323
  const rings = segmentationOutlines(r);
10073
- const b = _optionalChain([segments, 'access', _341 => _341[i], 'optionalAccess', _342 => _342.bounds]);
10324
+ const b = _optionalChain([segments, 'access', _343 => _343[i], 'optionalAccess', _344 => _344.bounds]);
10074
10325
  return rings.length ? rings : b ? [[{ x: b.x, y: b.y }, { x: b.x + b.width, y: b.y }, { x: b.x + b.width, y: b.y + b.height }, { x: b.x, y: b.y + b.height }]] : [];
10075
10326
  });
10076
10327
  await options.beforeApply(outlines);
10077
- _optionalChain([options, 'access', _343 => _343.signal, 'optionalAccess', _344 => _344.throwIfAborted, 'call', _345 => _345()]);
10328
+ _optionalChain([options, 'access', _345 => _345.signal, 'optionalAccess', _346 => _346.throwIfAborted, 'call', _347 => _347()]);
10078
10329
  }
10079
10330
  if (mask) this.shapeCommand(mask, options);
10080
10331
  return { segments: segments.filter((s) => s.bounds), method: "model" };
@@ -10107,7 +10358,7 @@ var ImageEditorController = (_class13 = class {
10107
10358
  const view = this.state.maskView;
10108
10359
  if (!view) return null;
10109
10360
  const layer = this.getLayer(view.layerId);
10110
- return _optionalChain([layer, 'optionalAccess', _346 => _346.mask]) && !layer.mask.source ? view : null;
10361
+ return _optionalChain([layer, 'optionalAccess', _348 => _348.mask]) && !layer.mask.source ? view : null;
10111
10362
  }
10112
10363
  /**
10113
10364
  * Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
@@ -10130,7 +10381,7 @@ var ImageEditorController = (_class13 = class {
10130
10381
  if (!layer.mask) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
10131
10382
  if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is computed, not painted, so it has no mask view.`);
10132
10383
  const cur = this.state.maskView;
10133
- if (_optionalChain([cur, 'optionalAccess', _347 => _347.layerId]) !== id || cur.mode !== mode) {
10384
+ if (_optionalChain([cur, 'optionalAccess', _349 => _349.layerId]) !== id || cur.mode !== mode) {
10134
10385
  this.state.maskView = { layerId: id, mode };
10135
10386
  this.notify();
10136
10387
  }
@@ -10142,7 +10393,7 @@ var ImageEditorController = (_class13 = class {
10142
10393
  return _nullishCoalesce(this.state.channels, () => ( []));
10143
10394
  }
10144
10395
  getChannel(id) {
10145
- return _nullishCoalesce(_optionalChain([this, 'access', _348 => _348.state, 'access', _349 => _349.channels, 'optionalAccess', _350 => _350.find, 'call', _351 => _351((c) => c.id === id)]), () => ( null));
10396
+ return _nullishCoalesce(_optionalChain([this, 'access', _350 => _350.state, 'access', _351 => _351.channels, 'optionalAccess', _352 => _352.find, 'call', _353 => _353((c) => c.id === id)]), () => ( null));
10146
10397
  }
10147
10398
  requireChannel(id) {
10148
10399
  const channel = this.getChannel(id);
@@ -10171,14 +10422,14 @@ var ImageEditorController = (_class13 = class {
10171
10422
  */
10172
10423
  saveSelection(options = {}) {
10173
10424
  const sel = this.state.selection;
10174
- if (!_optionalChain([sel, 'optionalAccess', _352 => _352.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10425
+ if (!_optionalChain([sel, 'optionalAccess', _354 => _354.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10175
10426
  const { width, height } = this.naturalSize;
10176
10427
  const sized = sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height);
10177
10428
  const channels = [...this.getChannels()];
10178
10429
  if (options.channelId !== void 0) {
10179
10430
  const existing = this.requireChannel(options.channelId);
10180
10431
  const mask = _nullishCoalesce(_chunkUYXL6ZWQcjs.combineSelections.call(void 0, existing.mask.bounds ? existing.mask : null, sized, _nullishCoalesce(options.mode, () => ( "replace"))), () => ( _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, width, height)));
10181
- const next = { ...existing, mask, ..._optionalChain([options, 'access', _353 => _353.name, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]) ? { name: options.name.trim() } : {} };
10432
+ const next = { ...existing, mask, ..._optionalChain([options, 'access', _355 => _355.name, 'optionalAccess', _356 => _356.trim, 'call', _357 => _357()]) ? { name: options.name.trim() } : {} };
10182
10433
  this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
10183
10434
  return next;
10184
10435
  }
@@ -10189,7 +10440,7 @@ var ImageEditorController = (_class13 = class {
10189
10440
  const channels = this.getChannels();
10190
10441
  const channel = {
10191
10442
  id: this.newChannelId(),
10192
- name: _optionalChain([name, 'optionalAccess', _356 => _356.trim, 'call', _357 => _357()]) || `Alpha ${channels.length + 1}`,
10443
+ name: _optionalChain([name, 'optionalAccess', _358 => _358.trim, 'call', _359 => _359()]) || `Alpha ${channels.length + 1}`,
10193
10444
  mask,
10194
10445
  color: DEFAULT_CHANNEL_COLOR,
10195
10446
  opacity: 0.5,
@@ -10234,7 +10485,7 @@ var ImageEditorController = (_class13 = class {
10234
10485
  /** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
10235
10486
  duplicateChannel(id, name) {
10236
10487
  const channel = this.requireChannel(id);
10237
- const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _358 => _358.trim, 'call', _359 => _359()]) || `${channel.name} copy` };
10488
+ const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _360 => _360.trim, 'call', _361 => _361()]) || `${channel.name} copy` };
10238
10489
  const channels = [...this.getChannels()];
10239
10490
  channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
10240
10491
  this.setChannels(channels);
@@ -10265,7 +10516,7 @@ var ImageEditorController = (_class13 = class {
10265
10516
  quickMaskSurface() {
10266
10517
  const { width, height } = this.naturalSize;
10267
10518
  const sel = this.state.selection;
10268
- if (!_optionalChain([sel, 'optionalAccess', _360 => _360.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
10519
+ if (!_optionalChain([sel, 'optionalAccess', _362 => _362.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
10269
10520
  return (sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height)).surface;
10270
10521
  }
10271
10522
  /** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
@@ -10286,7 +10537,7 @@ var ImageEditorController = (_class13 = class {
10286
10537
  */
10287
10538
  applySelectionAsLayerMask(layerId, props = {}) {
10288
10539
  const sel = this.state.selection;
10289
- if (!_optionalChain([sel, 'optionalAccess', _361 => _361.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10540
+ if (!_optionalChain([sel, 'optionalAccess', _363 => _363.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10290
10541
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
10291
10542
  }
10292
10543
  setLayerMask(layerId, mask, commitToHistory = true) {
@@ -10326,7 +10577,7 @@ var ImageEditorController = (_class13 = class {
10326
10577
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
10327
10578
  layerMaskCoverage(layerId) {
10328
10579
  const layer = this.getLayer(layerId);
10329
- if (!_optionalChain([layer, 'optionalAccess', _362 => _362.mask]) || layer.mask.source) return null;
10580
+ if (!_optionalChain([layer, 'optionalAccess', _364 => _364.mask]) || layer.mask.source) return null;
10330
10581
  const { width, height } = this.naturalSize;
10331
10582
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
10332
10583
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -10361,7 +10612,7 @@ var ImageEditorController = (_class13 = class {
10361
10612
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10362
10613
  const next = { ...l };
10363
10614
  if (_chunkUYXL6ZWQcjs.isDefaultDepthMask.call(void 0, merged)) {
10364
- if (_optionalChain([next, 'access', _363 => _363.mask, 'optionalAccess', _364 => _364.source])) delete next.mask;
10615
+ if (_optionalChain([next, 'access', _365 => _365.mask, 'optionalAccess', _366 => _366.source])) delete next.mask;
10365
10616
  } else next.mask = _chunkUYXL6ZWQcjs.depthRasterMask.call(void 0, merged);
10366
10617
  return next;
10367
10618
  });
@@ -10371,7 +10622,7 @@ var ImageEditorController = (_class13 = class {
10371
10622
  resetDepthMask() {
10372
10623
  this.recordHistory();
10373
10624
  const target = this.developLayer();
10374
- if (_optionalChain([target, 'optionalAccess', _365 => _365.mask, 'optionalAccess', _366 => _366.source])) {
10625
+ if (_optionalChain([target, 'optionalAccess', _367 => _367.mask, 'optionalAccess', _368 => _368.source])) {
10375
10626
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10376
10627
  const next = { ...l };
10377
10628
  delete next.mask;
@@ -10383,7 +10634,7 @@ var ImageEditorController = (_class13 = class {
10383
10634
  // --- Annotations & Layers ---
10384
10635
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
10385
10636
  annotationLayer(id) {
10386
- return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _367 => _367.id]) === id);
10637
+ return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _369 => _369.id]) === id);
10387
10638
  }
10388
10639
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
10389
10640
  annotationEnv() {
@@ -10401,7 +10652,7 @@ var ImageEditorController = (_class13 = class {
10401
10652
  const fullAnnotation = { ...annotation, id };
10402
10653
  const layer = _chunkUYXL6ZWQcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
10403
10654
  const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
10404
- this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _368 => _368.parent, 'optionalAccess', _369 => _369.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10655
+ this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _370 => _370.parent, 'optionalAccess', _371 => _371.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10405
10656
  this.state.selectedAnnotationId = id;
10406
10657
  this.notify();
10407
10658
  return id;
@@ -10524,7 +10775,7 @@ var ImageEditorController = (_class13 = class {
10524
10775
  await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
10525
10776
  ...options,
10526
10777
  // The clone source follows the brush cursor (both editors pass it).
10527
- cloneSourceMarker: _optionalChain([options, 'optionalAccess', _370 => _370.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _371 => _371.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10778
+ cloneSourceMarker: _optionalChain([options, 'optionalAccess', _372 => _372.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _373 => _373.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10528
10779
  dirty: dirty === "all" ? void 0 : dirty,
10529
10780
  checkpointLayerId: this.state.activeLayerId
10530
10781
  });
@@ -10537,7 +10788,7 @@ var ImageEditorController = (_class13 = class {
10537
10788
  return this.renderer.createCanvas(1, 1);
10538
10789
  }
10539
10790
  this.syncViews();
10540
- if (_optionalChain([options, 'optionalAccess', _372 => _372.layerIds])) {
10791
+ if (_optionalChain([options, 'optionalAccess', _374 => _374.layerIds])) {
10541
10792
  const keep = new Set(options.layerIds);
10542
10793
  const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
10543
10794
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
@@ -10691,7 +10942,7 @@ var ImageEditorController = (_class13 = class {
10691
10942
  let px2 = await this.decodeImage(newDataUrl);
10692
10943
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
10693
10944
  const data = new Uint8ClampedArray(px2.data);
10694
- const sel = _optionalChain([this, 'access', _373 => _373.state, 'access', _374 => _374.selection, 'optionalAccess', _375 => _375.bounds]) ? this.state.selection : null;
10945
+ const sel = _optionalChain([this, 'access', _375 => _375.state, 'access', _376 => _376.selection, 'optionalAccess', _377 => _377.bounds]) ? this.state.selection : null;
10695
10946
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
10696
10947
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
10697
10948
  }
@@ -10738,7 +10989,7 @@ var ImageEditorController = (_class13 = class {
10738
10989
  }
10739
10990
  /** Font families the shaper offers (generic families at least). */
10740
10991
  listFonts() {
10741
- return _nullishCoalesce(_optionalChain([this, 'access', _376 => _376.getTextShaper, 'call', _377 => _377(), 'optionalAccess', _378 => _378.families, 'optionalCall', _379 => _379()]), () => ( ["sans-serif", "serif", "monospace"]));
10992
+ return _nullishCoalesce(_optionalChain([this, 'access', _378 => _378.getTextShaper, 'call', _379 => _379(), 'optionalAccess', _380 => _380.families, 'optionalCall', _381 => _381()]), () => ( ["sans-serif", "serif", "monospace"]));
10742
10993
  }
10743
10994
  typeInfo(id) {
10744
10995
  const layer = _chunkUYXL6ZWQcjs.requireTypeLayer.call(void 0, this.state.layers, id);
@@ -10812,8 +11063,8 @@ var ImageEditorController = (_class13 = class {
10812
11063
  const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
10813
11064
  const { width, height } = this.naturalSize;
10814
11065
  const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
10815
- const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _380 => _380.x]), () => ( 0)));
10816
- const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _381 => _381.y]), () => ( 0)));
11066
+ const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _382 => _382.x]), () => ( 0)));
11067
+ const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _383 => _383.y]), () => ( 0)));
10817
11068
  const x1 = Math.min(width, b ? b.x + b.width : 0);
10818
11069
  const y1 = Math.min(height, b ? b.y + b.height : 0);
10819
11070
  let mask;
@@ -10990,7 +11241,7 @@ var ImageEditorController = (_class13 = class {
10990
11241
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
10991
11242
  const missing = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper).missingFonts;
10992
11243
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
10993
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _382 => _382.runs, 'access', _383 => _383.find, 'call', _384 => _384((r) => r.length > 0), 'optionalAccess', _385 => _385.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
11244
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _384 => _384.runs, 'access', _385 => _385.find, 'call', _386 => _386((r) => r.length > 0), 'optionalAccess', _387 => _387.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
10994
11245
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
10995
11246
  const shape = _chunkUYXL6ZWQcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
10996
11247
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
@@ -11023,7 +11274,7 @@ var ImageEditorController = (_class13 = class {
11023
11274
  // --- Shape layers ---
11024
11275
  /** What shape rendering needs: the canvas size and the document's patterns. */
11025
11276
  shapeEnv() {
11026
- return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _386 => _386.state, 'access', _387 => _387.patterns, 'optionalAccess', _388 => _388.find, 'call', _389 => _389((p) => p.id === id)]), () => ( null)) };
11277
+ return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _388 => _388.state, 'access', _389 => _389.patterns, 'optionalAccess', _390 => _390.find, 'call', _391 => _391((p) => p.id === id)]), () => ( null)) };
11027
11278
  }
11028
11279
  /** One component from tool or UI input (validated). */
11029
11280
  componentFrom(spec, path) {
@@ -11066,9 +11317,9 @@ var ImageEditorController = (_class13 = class {
11066
11317
  * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
11067
11318
  */
11068
11319
  addShapeLayer(init) {
11069
- const specs = _optionalChain([init, 'access', _390 => _390.components, 'optionalAccess', _391 => _391.length]) ? init.components : [init];
11070
- if (_optionalChain([init, 'access', _392 => _392.components, 'optionalAccess', _393 => _393.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11071
- const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _394 => _394.components, 'optionalAccess', _395 => _395.length]) ? `components[${i}].` : ""));
11320
+ const specs = _optionalChain([init, 'access', _392 => _392.components, 'optionalAccess', _393 => _393.length]) ? init.components : [init];
11321
+ if (_optionalChain([init, 'access', _394 => _394.components, 'optionalAccess', _395 => _395.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11322
+ const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _396 => _396.components, 'optionalAccess', _397 => _397.length]) ? `components[${i}].` : ""));
11072
11323
  const stroke = init.stroke ? _chunkUYXL6ZWQcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
11073
11324
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
11074
11325
  const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkUYXL6ZWQcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkUYXL6ZWQcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
@@ -11179,7 +11430,7 @@ var ImageEditorController = (_class13 = class {
11179
11430
  if (layer.locks) next.locks = layer.locks;
11180
11431
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
11181
11432
  } else if (layer.type === "pixel") {
11182
- if (!_optionalChain([layer, 'access', _396 => _396.filters, 'optionalAccess', _397 => _397.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11433
+ if (!_optionalChain([layer, 'access', _398 => _398.filters, 'optionalAccess', _399 => _399.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11183
11434
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
11184
11435
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
11185
11436
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
@@ -11198,7 +11449,7 @@ var ImageEditorController = (_class13 = class {
11198
11449
  return this.rasterizeSmartObject(id);
11199
11450
  } else if (layer.type === "shape" || layer.type === "type") {
11200
11451
  next = layer.type === "shape" ? _chunkUYXL6ZWQcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkUYXL6ZWQcjs.typeAsPixelLayer.call(void 0, layer);
11201
- if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _398 => _398.annotation, 'optionalAccess', _399 => _399.id])) this.state.selectedAnnotationId = null;
11452
+ if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _400 => _400.annotation, 'optionalAccess', _401 => _401.id])) this.state.selectedAnnotationId = null;
11202
11453
  } else {
11203
11454
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
11204
11455
  }
@@ -11212,8 +11463,8 @@ var ImageEditorController = (_class13 = class {
11212
11463
  const doc = this.state.colorProfile;
11213
11464
  const p = resolveProfile(doc);
11214
11465
  const m = this.state.colorMode;
11215
- const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _400 => _400.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _401 => _401.mode]), () => ( "rgb")) };
11216
- if (_optionalChain([m, 'optionalAccess', _402 => _402.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11466
+ const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _402 => _402.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _403 => _403.mode]), () => ( "rgb")) };
11467
+ if (_optionalChain([m, 'optionalAccess', _404 => _404.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11217
11468
  return out;
11218
11469
  }
11219
11470
  /**
@@ -11303,7 +11554,7 @@ var ImageEditorController = (_class13 = class {
11303
11554
  const textEnv = this.textEnv();
11304
11555
  const walk = (layers) => layers.map((l) => {
11305
11556
  let next2 = l;
11306
- if (_optionalChain([l, 'access', _403 => _403.effects, 'optionalAccess', _404 => _404.items, 'access', _405 => _405.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11557
+ if (_optionalChain([l, 'access', _405 => _405.effects, 'optionalAccess', _406 => _406.items, 'access', _407 => _407.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11307
11558
  if (l.type === "group") {
11308
11559
  if (next2 !== l) converted.push(l.id);
11309
11560
  return { ...next2, children: walk(l.children) };
@@ -11383,8 +11634,8 @@ var ImageEditorController = (_class13 = class {
11383
11634
  const values = Array.from(out.subarray(0, t.outputs), (v) => Math.round(Math.min(1, Math.max(0, v)) * 1e4) / 1e4);
11384
11635
  const l = new Float32Array(3);
11385
11636
  toLab2.eval(rgb, l);
11386
- const lab = [Math.round(l[0] * 1e4) / 100, Math.round((l[1] * 255 - 128) * 100) / 100, Math.round((l[2] * 255 - 128) * 100) / 100];
11387
- const res = { input, values, lab };
11637
+ const lab2 = [Math.round(l[0] * 1e4) / 100, Math.round((l[1] * 255 - 128) * 100) / 100, Math.round((l[2] * 255 - 128) * 100) / 100];
11638
+ const res = { input, values, lab: lab2 };
11388
11639
  if (dst.colorSpace === "rgb") res.hex = `#${values.map((v) => Math.round(v * 255).toString(16).padStart(2, "0")).join("")}`;
11389
11640
  return res;
11390
11641
  });
@@ -11487,8 +11738,8 @@ var ImageEditorController = (_class13 = class {
11487
11738
  else delete s.bitDepth;
11488
11739
  delete s.colorProfile;
11489
11740
  delete s.colorMode;
11490
- if (_optionalChain([result, 'access', _406 => _406.sourceMode, 'optionalAccess', _407 => _407.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11491
- else if (_optionalChain([result, 'access', _408 => _408.sourceMode, 'optionalAccess', _409 => _409.mode]) === "lab") s.colorMode = { mode: "lab" };
11741
+ if (_optionalChain([result, 'access', _408 => _408.sourceMode, 'optionalAccess', _409 => _409.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11742
+ else if (_optionalChain([result, 'access', _410 => _410.sourceMode, 'optionalAccess', _411 => _411.mode]) === "lab") s.colorMode = { mode: "lab" };
11492
11743
  else if (result.iccProfile) {
11493
11744
  try {
11494
11745
  const doc = documentProfile(result.iccProfile);
@@ -11552,7 +11803,7 @@ var ImageEditorController = (_class13 = class {
11552
11803
  const compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)();
11553
11804
  const bakeMask = (layer) => {
11554
11805
  const mask = layer.mask;
11555
- if (!_optionalChain([mask, 'optionalAccess', _410 => _410.source])) return mask;
11806
+ if (!_optionalChain([mask, 'optionalAccess', _412 => _412.source])) return mask;
11556
11807
  add2("Parametric (depth) masks were baked into pixel masks", layer.name);
11557
11808
  const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
11558
11809
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
@@ -11569,7 +11820,7 @@ var ImageEditorController = (_class13 = class {
11569
11820
  };
11570
11821
  const prepare = async (layer) => {
11571
11822
  const p = await prepareLayer(layer);
11572
- if (_optionalChain([p, 'optionalAccess', _411 => _411.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11823
+ if (_optionalChain([p, 'optionalAccess', _413 => _413.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11573
11824
  return p;
11574
11825
  };
11575
11826
  const prepareLayer = async (layer) => {
@@ -11612,7 +11863,7 @@ var ImageEditorController = (_class13 = class {
11612
11863
  return out2;
11613
11864
  }
11614
11865
  if (layer.type === "shape" || layer.type === "type") {
11615
- if (layer.type === "type" && _optionalChain([layer, 'access', _412 => _412.missingFonts, 'optionalAccess', _413 => _413.length])) add2(`Type layers drawn with a fallback for missing fonts (${layer.missingFonts.join(", ")}) keep the font names, so Photoshop may draw them differently`, layer.name);
11866
+ if (layer.type === "type" && _optionalChain([layer, 'access', _414 => _414.missingFonts, 'optionalAccess', _415 => _415.length])) add2(`Type layers drawn with a fallback for missing fonts (${layer.missingFonts.join(", ")}) keep the font names, so Photoshop may draw them differently`, layer.name);
11616
11867
  const out2 = { ...layer };
11617
11868
  const mask2 = bakeMask(layer);
11618
11869
  if (mask2) out2.mask = mask2;
@@ -11631,7 +11882,7 @@ var ImageEditorController = (_class13 = class {
11631
11882
  out.surface = this.surfaceOf(layer);
11632
11883
  delete out.source;
11633
11884
  }
11634
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _414 => _414.filters, 'optionalAccess', _415 => _415.filter, 'call', _416 => _416(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
11885
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _416 => _416.filters, 'optionalAccess', _417 => _417.filter, 'call', _418 => _418(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
11635
11886
  if (active.length) {
11636
11887
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
11637
11888
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -11642,7 +11893,7 @@ var ImageEditorController = (_class13 = class {
11642
11893
  const data = compositor.composite([content], canvas, sources);
11643
11894
  out = { ...out, surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
11644
11895
  }
11645
- if (_optionalChain([layer, 'access', _417 => _417.filters, 'optionalAccess', _418 => _418.some, 'call', _419 => _419((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11896
+ if (_optionalChain([layer, 'access', _419 => _419.filters, 'optionalAccess', _420 => _420.some, 'call', _421 => _421((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11646
11897
  delete out.filters;
11647
11898
  const mask = bakeMask(layer);
11648
11899
  if (mask) out.mask = mask;
@@ -11706,7 +11957,7 @@ var ImageEditorController = (_class13 = class {
11706
11957
  );
11707
11958
  }
11708
11959
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
11709
- const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _420 => _420.state, 'access', _421 => _421.patterns, 'optionalAccess', _422 => _422.find, 'call', _423 => _423((p) => p.id === pid)]), () => ( null)) };
11960
+ const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _422 => _422.state, 'access', _423 => _423.patterns, 'optionalAccess', _424 => _424.find, 'call', _425 => _425((p) => p.id === pid)]), () => ( null)) };
11710
11961
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
11711
11962
  if (l.type === "annotation") {
11712
11963
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
@@ -11715,7 +11966,7 @@ var ImageEditorController = (_class13 = class {
11715
11966
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
11716
11967
  const fromAnnotation = scaled ? _chunkUYXL6ZWQcjs.shapeFromAnnotation.call(void 0, scaled) : null;
11717
11968
  const m = [sx, 0, 0, sy, 0, 0];
11718
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _424 => _424.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11969
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _426 => _426.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11719
11970
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
11720
11971
  if (scaled && fromAnnotation) moved.annotation = scaled;
11721
11972
  else delete moved.annotation;
@@ -11733,7 +11984,7 @@ var ImageEditorController = (_class13 = class {
11733
11984
  this.notify();
11734
11985
  }
11735
11986
  toJSON(options) {
11736
- const root = _optionalChain([this, 'access', _425 => _425.contentsStack, 'access', _426 => _426[0], 'optionalAccess', _427 => _427.saved]);
11987
+ const root = _optionalChain([this, 'access', _427 => _427.contentsStack, 'access', _428 => _428[0], 'optionalAccess', _429 => _429.saved]);
11737
11988
  const current = this.state;
11738
11989
  const element = this.imageElement;
11739
11990
  if (root) {
@@ -11744,8 +11995,8 @@ var ImageEditorController = (_class13 = class {
11744
11995
  let out;
11745
11996
  try {
11746
11997
  out = this.serializeState();
11747
- if (_optionalChain([this, 'access', _428 => _428.state, 'access', _429 => _429.selection, 'optionalAccess', _430 => _430.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
11748
- if (_optionalChain([this, 'access', _431 => _431.state, 'access', _432 => _432.channels, 'optionalAccess', _433 => _433.length])) out.channels = serializeChannels(this.state.channels);
11998
+ if (_optionalChain([this, 'access', _430 => _430.state, 'access', _431 => _431.selection, 'optionalAccess', _432 => _432.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
11999
+ if (_optionalChain([this, 'access', _433 => _433.state, 'access', _434 => _434.channels, 'optionalAccess', _435 => _435.length])) out.channels = serializeChannels(this.state.channels);
11749
12000
  } finally {
11750
12001
  if (root) {
11751
12002
  this.state = current;
@@ -11859,10 +12110,10 @@ var ImageEditorController = (_class13 = class {
11859
12110
  serializeState() {
11860
12111
  const { width, height } = this.naturalSize;
11861
12112
  const view = _chunkUYXL6ZWQcjs.legacyView.call(void 0, this.stack(), width, height, null);
11862
- if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _434 => _434.state, 'access', _435 => _435.patterns, 'optionalAccess', _436 => _436.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
12113
+ if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _436 => _436.state, 'access', _437 => _437.patterns, 'optionalAccess', _438 => _438.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
11863
12114
  return {
11864
12115
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
11865
- version: _optionalChain([view, 'access', _437 => _437.adjustments, 'access', _438 => _438.layers, 'optionalAccess', _439 => _439.length]) ? 2 : 1,
12116
+ version: _optionalChain([view, 'access', _439 => _439.adjustments, 'access', _440 => _440.layers, 'optionalAccess', _441 => _441.length]) ? 2 : 1,
11866
12117
  crop: this.state.crop ? { ...this.state.crop } : null,
11867
12118
  transform: { ...this.state.transform },
11868
12119
  adjustments: serializeAdjustments(view.adjustments),
@@ -11887,7 +12138,7 @@ var ImageEditorController = (_class13 = class {
11887
12138
  };
11888
12139
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
11889
12140
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
11890
- if (_optionalChain([this, 'access', _440 => _440.state, 'access', _441 => _441.patterns, 'optionalAccess', _442 => _442.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
12141
+ if (_optionalChain([this, 'access', _442 => _442.state, 'access', _443 => _443.patterns, 'optionalAccess', _444 => _444.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
11891
12142
  if (smartContents) out.smartContents = smartContents;
11892
12143
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
11893
12144
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -11897,7 +12148,7 @@ var ImageEditorController = (_class13 = class {
11897
12148
  }, _class13);
11898
12149
  function serializeAdjustments(adjustments) {
11899
12150
  const out = { ...adjustments };
11900
- if (_optionalChain([out, 'access', _443 => _443.layers, 'optionalAccess', _444 => _444.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
12151
+ if (_optionalChain([out, 'access', _445 => _445.layers, 'optionalAccess', _446 => _446.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
11901
12152
  else delete out.layers;
11902
12153
  if (_chunkUYXL6ZWQcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION) {
11903
12154
  delete out.process;
@@ -11933,11 +12184,11 @@ function withDevelop(layer, partial) {
11933
12184
  return { ...layer, filters };
11934
12185
  }
11935
12186
  function withBlur(layer, radius) {
11936
- const existing = _optionalChain([layer, 'access', _445 => _445.filters, 'optionalAccess', _446 => _446.find, 'call', _447 => _447((f) => f.kind === "blur")]);
12187
+ const existing = _optionalChain([layer, 'access', _447 => _447.filters, 'optionalAccess', _448 => _448.find, 'call', _449 => _449((f) => f.kind === "blur")]);
11937
12188
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
11938
12189
  if (radius > 0) {
11939
12190
  filters.push({
11940
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _448 => _448.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
12191
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _450 => _450.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
11941
12192
  kind: "blur",
11942
12193
  enabled: true,
11943
12194
  radius
@@ -12033,7 +12284,7 @@ function collectStateTiles(layers, into) {
12033
12284
  if (l.type === "shape" || l.type === "type") _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
12034
12285
  if (l.type === "smart") {
12035
12286
  _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
12036
- if (_optionalChain([l, 'access', _449 => _449.smartFilters, 'optionalAccess', _450 => _450.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12287
+ if (_optionalChain([l, 'access', _451 => _451.smartFilters, 'optionalAccess', _452 => _452.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12037
12288
  if (l.contents.raster) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.contents.raster, into);
12038
12289
  if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
12039
12290
  }
@@ -12065,7 +12316,7 @@ function pixelsOnly(layers) {
12065
12316
  for (const l of layers) {
12066
12317
  if (l.type === "adjustment") continue;
12067
12318
  if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
12068
- else if (l.type === "pixel" && _optionalChain([l, 'access', _451 => _451.filters, 'optionalAccess', _452 => _452.length])) {
12319
+ else if (l.type === "pixel" && _optionalChain([l, 'access', _453 => _453.filters, 'optionalAccess', _454 => _454.length])) {
12069
12320
  const p = { ...l };
12070
12321
  delete p.filters;
12071
12322
  out.push(p);
@@ -12131,7 +12382,7 @@ function toHex(c) {
12131
12382
  return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
12132
12383
  }
12133
12384
  function normalizeSelection(mask) {
12134
- return _optionalChain([mask, 'optionalAccess', _453 => _453.bounds]) ? mask : null;
12385
+ return _optionalChain([mask, 'optionalAccess', _455 => _455.bounds]) ? mask : null;
12135
12386
  }
12136
12387
  function sameSelection(a, b) {
12137
12388
  if (a.width !== b.width || a.height !== b.height) return false;
@@ -12341,7 +12592,7 @@ function loadImageEditorDocument(input) {
12341
12592
  }
12342
12593
  const state = { version: 1, ...result.value };
12343
12594
  if (isV2) {
12344
- if (_optionalChain([state, 'access', _454 => _454.adjustments, 'access', _455 => _455.layers, 'optionalAccess', _456 => _456.length])) state.version = 2;
12595
+ if (_optionalChain([state, 'access', _456 => _456.adjustments, 'access', _457 => _457.layers, 'optionalAccess', _458 => _458.length])) state.version = 2;
12345
12596
  result.report.version = 2;
12346
12597
  }
12347
12598
  if (state.selection === void 0) delete state.selection;
@@ -12549,7 +12800,7 @@ function findAdjustmentControl(id) {
12549
12800
  }
12550
12801
  function findLayerControl(kind, id) {
12551
12802
  if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
12552
- return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _457 => _457[kind], 'optionalAccess', _458 => _458.find, 'call', _459 => _459((c) => c.id === id)]);
12803
+ return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _459 => _459[kind], 'optionalAccess', _460 => _460.find, 'call', _461 => _461((c) => c.id === id)]);
12553
12804
  }
12554
12805
  function clampControlValue(spec, v) {
12555
12806
  if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
@@ -12766,7 +13017,7 @@ var DEPTH_MASK_CONTROLS = [
12766
13017
  // src/image-editor/playback.ts
12767
13018
  var IMAGE_PLAYBACK_KIND = "layer";
12768
13019
  var PAINT = /^(paint_stroke|clone_stamp|heal_brush|spot_heal|dodge|burn|sponge|smudge|blur_stroke|sharpen_stroke|history_brush|set_clone_source|set_clone_transform|fill_pixels|clear_pixels|set_paint|set_retouch_options|load_mixer_brush|clean_mixer_brush)$/;
12769
- var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|quick_select|select_object|select_line|magic_wand|grow_selection|select_similar|reselect|select_layer_transparency|select_color_range|load_selection_from_image|load_selection_from_mask|set_selection_display|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy|stroke_selection|content_aware_fill|copy_pixels|cut_pixels|paste_pixels|save_selection|load_selection_from_channel|set_channel_properties|duplicate_channel|delete_channel|load_channel_from_image|set_quick_mask|path_to_selection|select_text_shape)$/;
13020
+ var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|quick_select|select_object|select_focus_area|select_sky|select_line|magic_wand|grow_selection|select_similar|reselect|select_layer_transparency|select_color_range|load_selection_from_image|load_selection_from_mask|set_selection_display|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy|stroke_selection|content_aware_fill|copy_pixels|cut_pixels|paste_pixels|save_selection|load_selection_from_channel|set_channel_properties|duplicate_channel|delete_channel|load_channel_from_image|set_quick_mask|path_to_selection|select_text_shape)$/;
12770
13021
  var ANNOTATE = /^(add_shape_layer|update_shape|add_shape_component|set_shape_component|remove_shape_component|merge_shape_components|add_text_layer|set_text|set_text_style|set_paragraph_style|set_text_frame|set_text_orientation|convert_text_to_shape)$/;
12771
13022
  var CROP = /^(set_crop|crop_to_selection|reset_crop|set_rotation|flip_image|transform_layer|warp_layer|flip_layer|offset_layer)$/;
12772
13023
  var ADJUST = /^(set_adjustments|add_adjustment_layer|update_adjustment_layer|remove_adjustment_layer|move_adjustment_layer)$/;
@@ -12932,6 +13183,9 @@ var DEFAULT_SELECTION_TOOL_OPTIONS = {
12932
13183
  quickEnhance: false,
12933
13184
  objectSampleAll: true,
12934
13185
  objectEnhance: false,
13186
+ focusRange: 50,
13187
+ focusNoise: 0,
13188
+ focusSoftness: 4,
12935
13189
  typeText: "Type",
12936
13190
  typeSize: 72,
12937
13191
  typeFamily: "sans-serif"
@@ -13004,7 +13258,7 @@ function summary(controller) {
13004
13258
  const area = _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel);
13005
13259
  return {
13006
13260
  empty: !sel,
13007
- bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _460 => _460.bounds]), () => ( null)),
13261
+ bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _462 => _462.bounds]), () => ( null)),
13008
13262
  /** Σ coverage in pixels. */
13009
13263
  area: Math.round(area),
13010
13264
  percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
@@ -13080,7 +13334,7 @@ function createImageSelectionTools(controller) {
13080
13334
  break;
13081
13335
  }
13082
13336
  case "polygon": {
13083
- const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _461 => _461.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _462 => _462.y]), NaN) })) : [];
13337
+ const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _463 => _463.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _464 => _464.y]), NaN) })) : [];
13084
13338
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13085
13339
  throw new Error("polygon needs points: at least 3 { x, y } vertices.");
13086
13340
  }
@@ -13317,7 +13571,7 @@ function createImageSelectionTools(controller) {
13317
13571
  },
13318
13572
  annotations: writeAnnotations("Select a polygon (lasso)", true),
13319
13573
  handler: async (args) => {
13320
- const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _463 => _463.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _464 => _464.y]), NaN) })) : [];
13574
+ const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _465 => _465.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _466 => _466.y]), NaN) })) : [];
13321
13575
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13322
13576
  throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
13323
13577
  }
@@ -13354,7 +13608,7 @@ function createImageSelectionTools(controller) {
13354
13608
  },
13355
13609
  annotations: writeAnnotations("Quick Selection"),
13356
13610
  handler: async (args) => {
13357
- const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _465 => _465.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _466 => _466.y]), NaN) })) : []) : [];
13611
+ const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _467 => _467.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _468 => _468.y]), NaN) })) : []) : [];
13358
13612
  if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
13359
13613
  throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
13360
13614
  }
@@ -13400,6 +13654,58 @@ function createImageSelectionTools(controller) {
13400
13654
  return summary(controller);
13401
13655
  }
13402
13656
  };
13657
+ const selectFocusAreaTool = {
13658
+ name: "select_focus_area",
13659
+ title: "Select the focus area",
13660
+ description: "Select \u203A Focus Area: selects the parts of the image that are in focus (sharp detail, above the image noise), with the edge fitted to the image, combined with the selection by mode. Use it to separate a sharp subject from a blurred background (shallow depth of field), e.g. before blurring or darkening the background. Raise range to take in less sharp areas, raise noise if grain in the background gets selected. One undoable step. Returns the selection and noiseLevel (\u03C3 of the image noise in levels of 255).",
13661
+ inputSchema: {
13662
+ type: "object",
13663
+ properties: {
13664
+ range: { type: "number", minimum: 0, maximum: 100, description: "In-Focus Range 0..100 (default 50): higher takes in less sharp areas too." },
13665
+ noise: { type: "number", minimum: 0, maximum: 100, description: "Image Noise Level 0..100 (default 0): raise it when grain is selected as detail." },
13666
+ softness: { type: "number", minimum: 0, maximum: 100, description: "Soften the edge over this many natural pixels (default 4; 0 for a hard edge)." },
13667
+ mode: modeSchema,
13668
+ sampleAllLayers: { type: "boolean", description: "Read every layer (default true); false reads only the active pixel layer." }
13669
+ },
13670
+ additionalProperties: false
13671
+ },
13672
+ annotations: writeAnnotations("Select the focus area", true),
13673
+ handler: async (args) => {
13674
+ const { noiseLevel } = await controller.selectFocusArea({
13675
+ range: args.range === void 0 ? void 0 : num2(args.range, 50),
13676
+ noise: args.noise === void 0 ? void 0 : num2(args.noise, 0),
13677
+ softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
13678
+ mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, args.mode),
13679
+ sampleAllLayers: args.sampleAllLayers
13680
+ });
13681
+ return { ...summary(controller), noiseLevel };
13682
+ }
13683
+ };
13684
+ const selectSkyTool = {
13685
+ name: "select_sky",
13686
+ title: "Select the sky",
13687
+ description: "Select \u203A Sky: selects the sky (blue, or bright and grey when overcast, smooth, reaching down from the top of the image, including patches seen through branches or gaps), with the edge fitted to the skyline, combined with the selection by mode. Use it to replace or recolour a sky or to adjust the land without it (invert_selection). Raise threshold to take in haze or a sunset glow, lower it if bright buildings come in. One undoable step. Returns the selection, and a note when no sky was found (the selection is then unchanged).",
13688
+ inputSchema: {
13689
+ type: "object",
13690
+ properties: {
13691
+ threshold: { type: "number", minimum: 0, maximum: 100, description: "How sky-like a pixel must be, 0..100 (default 50): higher takes in less sky-like pixels." },
13692
+ softness: { type: "number", minimum: 0, maximum: 100, description: "Soften the edge over this many natural pixels (default 4; 0 for a hard edge)." },
13693
+ mode: modeSchema,
13694
+ sampleAllLayers: { type: "boolean", description: "Read every layer (default true); false reads only the active pixel layer." }
13695
+ },
13696
+ additionalProperties: false
13697
+ },
13698
+ annotations: writeAnnotations("Select the sky", true),
13699
+ handler: async (args) => {
13700
+ const { note } = await controller.selectSky({
13701
+ threshold: args.threshold === void 0 ? void 0 : num2(args.threshold, 50),
13702
+ softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
13703
+ mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, args.mode),
13704
+ sampleAllLayers: args.sampleAllLayers
13705
+ });
13706
+ return { ...summary(controller), ...note ? { note } : {} };
13707
+ }
13708
+ };
13403
13709
  const magicWandTool = {
13404
13710
  name: "magic_wand",
13405
13711
  title: "Magic wand",
@@ -13493,7 +13799,7 @@ function createImageSelectionTools(controller) {
13493
13799
  await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
13494
13800
  } else {
13495
13801
  const samples = args.samples.map((s, i) => {
13496
- if (typeof _optionalChain([s, 'optionalAccess', _467 => _467.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
13802
+ if (typeof _optionalChain([s, 'optionalAccess', _469 => _469.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
13497
13803
  const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
13498
13804
  return at ? { color: s.color, at } : { color: s.color };
13499
13805
  });
@@ -13955,6 +14261,8 @@ function createImageSelectionTools(controller) {
13955
14261
  quickSelectTool,
13956
14262
  selectObjectTool,
13957
14263
  createImageSubjectSelectionTool(controller),
14264
+ selectFocusAreaTool,
14265
+ selectSkyTool,
13958
14266
  lineTool,
13959
14267
  magicWandTool,
13960
14268
  colorRangeTool,
@@ -14012,13 +14320,13 @@ function createImageSubjectSelectionTool(controller) {
14012
14320
  handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
14013
14321
  if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
14014
14322
  if (controller.segmentationProvider && !String(_nullishCoalesce(target, () => ( ""))).trim()) throw new Error("target must describe what to select (a model is set, and it selects by description).");
14015
- const perform = _optionalChain([context, 'optionalAccess', _468 => _468.perform]);
14323
+ const perform = _optionalChain([context, 'optionalAccess', _470 => _470.perform]);
14016
14324
  const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
14017
14325
  mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, mode),
14018
14326
  feather: num2(feather, 0),
14019
14327
  maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
14020
14328
  enhanceEdge: enhanceEdge === true,
14021
- signal: _optionalChain([context, 'optionalAccess', _469 => _469.signal]),
14329
+ signal: _optionalChain([context, 'optionalAccess', _471 => _471.signal]),
14022
14330
  // Under playback the cursor traces what the model found, as a lasso, before it is selected.
14023
14331
  beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
14024
14332
  });
@@ -14096,7 +14404,7 @@ async function renderImageRegion(controller, request) {
14096
14404
  const maskView = maskViewCanvas(controller, document);
14097
14405
  if (maskView) context.drawImage(maskView, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
14098
14406
  const selection = state.selection;
14099
- if (_optionalChain([selection, 'optionalAccess', _470 => _470.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14407
+ if (_optionalChain([selection, 'optionalAccess', _472 => _472.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14100
14408
  const shade = selectionShade(selection, document);
14101
14409
  if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
14102
14410
  }
@@ -14121,7 +14429,7 @@ function createImageCaptureSurface(controller) {
14121
14429
  return {
14122
14430
  units: "image pixels",
14123
14431
  content: whole,
14124
- selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _471 => _471.getState, 'call', _472 => _472(), 'access', _473 => _473.selection, 'optionalAccess', _474 => _474.bounds]), () => ( null)) }),
14432
+ selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _473 => _473.getState, 'call', _474 => _474(), 'access', _475 => _475.selection, 'optionalAccess', _476 => _476.bounds]), () => ( null)) }),
14125
14433
  overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
14126
14434
  maxScale: 8,
14127
14435
  render: (request) => renderImageRegion(controller, request)
@@ -14455,7 +14763,7 @@ function describeLayer(layer, activeId, boundsOf) {
14455
14763
  out.bounds = boundsOf(layer);
14456
14764
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14457
14765
  out.shape = {
14458
- components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _475 => _475.live, 'optionalAccess', _476 => _476.kind]), () => ( "path")) })),
14766
+ components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _477 => _477.live, 'optionalAccess', _478 => _478.kind]), () => ( "path")) })),
14459
14767
  fill: layer.fill ? layer.fill.type : null,
14460
14768
  stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
14461
14769
  };
@@ -14478,8 +14786,8 @@ function describeLayer(layer, activeId, boundsOf) {
14478
14786
  out.bounds = boundsOf(layer);
14479
14787
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14480
14788
  out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
14481
- out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _477 => _477.smartFilters, 'optionalAccess', _478 => _478.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
14482
- out.filterMask = maskSummary(_optionalChain([layer, 'access', _479 => _479.smartFilters, 'optionalAccess', _480 => _480.mask]));
14789
+ out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _479 => _479.smartFilters, 'optionalAccess', _480 => _480.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
14790
+ out.filterMask = maskSummary(_optionalChain([layer, 'access', _481 => _481.smartFilters, 'optionalAccess', _482 => _482.mask]));
14483
14791
  break;
14484
14792
  }
14485
14793
  return out;
@@ -14507,7 +14815,7 @@ function createImageLayerTools(controller) {
14507
14815
  if (!loc) return null;
14508
14816
  return {
14509
14817
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
14510
- parentId: _nullishCoalesce(_optionalChain([loc, 'access', _481 => _481.parent, 'optionalAccess', _482 => _482.id]), () => ( null)),
14818
+ parentId: _nullishCoalesce(_optionalChain([loc, 'access', _483 => _483.parent, 'optionalAccess', _484 => _484.id]), () => ( null)),
14511
14819
  index: loc.index
14512
14820
  };
14513
14821
  };
@@ -14830,7 +15138,7 @@ function createImageLayerTools(controller) {
14830
15138
  if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
14831
15139
  const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
14832
15140
  const shown = controller.setMaskView(view, id);
14833
- return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _483 => _483.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _484 => _484.layerId]), () => ( null)) };
15141
+ return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _485 => _485.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _486 => _486.layerId]), () => ( null)) };
14834
15142
  }
14835
15143
  };
14836
15144
  const maskProps = {
@@ -15692,7 +16000,7 @@ function handleSelectionShortcut(controller, e, onError) {
15692
16000
  try {
15693
16001
  fn();
15694
16002
  } catch (err) {
15695
- _optionalChain([onError, 'optionalCall', _485 => _485(err instanceof Error ? err.message : String(err))]);
16003
+ _optionalChain([onError, 'optionalCall', _487 => _487(err instanceof Error ? err.message : String(err))]);
15696
16004
  }
15697
16005
  return true;
15698
16006
  };
@@ -15707,9 +16015,9 @@ function handleMaskViewKey(controller, e) {
15707
16015
  if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
15708
16016
  const id = controller.getState().activeLayerId;
15709
16017
  const layer = id ? controller.getLayer(id) : null;
15710
- if (!_optionalChain([layer, 'optionalAccess', _486 => _486.mask]) || layer.mask.source) return false;
16018
+ if (!_optionalChain([layer, 'optionalAccess', _488 => _488.mask]) || layer.mask.source) return false;
15711
16019
  const view = controller.getMaskView();
15712
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _487 => _487.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
16020
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _489 => _489.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
15713
16021
  return true;
15714
16022
  }
15715
16023
  function handleQuickMaskKey(controller, e) {
@@ -15923,7 +16231,7 @@ var PaintGesture = (_class15 = class {
15923
16231
  const layer = this.controller.getActiveLayer();
15924
16232
  if (!layer) throw new Error("Select a layer to move in the Layers panel.");
15925
16233
  if (layer.type !== "pixel" && layer.type !== "shape" && layer.type !== "smart") throw new Error(`Only pixel, shape and smart object layers move; "${layer.name}" is a ${layer.type} layer.`);
15926
- if (_optionalChain([layer, 'access', _488 => _488.locks, 'optionalAccess', _489 => _489.all]) || _optionalChain([layer, 'access', _490 => _490.locks, 'optionalAccess', _491 => _491.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
16234
+ if (_optionalChain([layer, 'access', _490 => _490.locks, 'optionalAccess', _491 => _491.all]) || _optionalChain([layer, 'access', _492 => _492.locks, 'optionalAccess', _493 => _493.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
15927
16235
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
15928
16236
  const b = _chunkUYXL6ZWQcjs.shapeGeometryBounds.call(void 0, layer);
15929
16237
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
@@ -15980,7 +16288,7 @@ var PaintGesture = (_class15 = class {
15980
16288
  this.move = null;
15981
16289
  }
15982
16290
  cancel() {
15983
- _optionalChain([this, 'access', _492 => _492.stroke, 'optionalAccess', _493 => _493.cancel, 'call', _494 => _494()]);
16291
+ _optionalChain([this, 'access', _494 => _494.stroke, 'optionalAccess', _495 => _495.cancel, 'call', _496 => _496()]);
15984
16292
  this.stroke = null;
15985
16293
  this.move = null;
15986
16294
  }
@@ -17061,7 +17369,7 @@ function createImageSmartObjectTools(controller) {
17061
17369
  const layerSummary = (id) => {
17062
17370
  const s = controller.getState();
17063
17371
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17064
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _495 => _495.parent, 'optionalAccess', _496 => _496.id]), () => ( null)), index: loc.index } : null;
17372
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _497 => _497.parent, 'optionalAccess', _498 => _498.id]), () => ( null)), index: loc.index } : null;
17065
17373
  };
17066
17374
  const getSmart = {
17067
17375
  name: "get_smart_object",
@@ -17618,7 +17926,7 @@ function createImageShapeTools(controller) {
17618
17926
  const layerSummary = (id) => {
17619
17927
  const s = controller.getState();
17620
17928
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17621
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _497 => _497.parent, 'optionalAccess', _498 => _498.id]), () => ( null)), index: loc.index } : null;
17929
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _499 => _499.parent, 'optionalAccess', _500 => _500.id]), () => ( null)), index: loc.index } : null;
17622
17930
  };
17623
17931
  const get = {
17624
17932
  name: "get_shape_layer",
@@ -17835,7 +18143,7 @@ function createImageShapeTools(controller) {
17835
18143
  const mode = args.mode;
17836
18144
  controller.pathToSelection(pathSpec(args), { feather: args.feather, antiAlias: args.antiAlias, mode });
17837
18145
  const sel = controller.getSelection();
17838
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _499 => _499.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
18146
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _501 => _501.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17839
18147
  }
17840
18148
  };
17841
18149
  const getVectorMask = {
@@ -17866,7 +18174,7 @@ function createImageShapeTools(controller) {
17866
18174
  handler: (args) => {
17867
18175
  const id = layerArg(args.layerId);
17868
18176
  const spec = pathSpec(args);
17869
- const hasPath = _optionalChain([spec, 'access', _500 => _500.components, 'optionalAccess', _501 => _501.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
18177
+ const hasPath = _optionalChain([spec, 'access', _502 => _502.components, 'optionalAccess', _503 => _503.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
17870
18178
  const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
17871
18179
  if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
17872
18180
  controller.addVectorMask(id, from, spec, traceOptions(args));
@@ -17986,7 +18294,7 @@ function createImageTypeTools(controller) {
17986
18294
  const layerSummary = (id) => {
17987
18295
  const s = controller.getState();
17988
18296
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17989
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _502 => _502.parent, 'optionalAccess', _503 => _503.id]), () => ( null)), index: loc.index } : null;
18297
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _504 => _504.parent, 'optionalAccess', _505 => _505.id]), () => ( null)), index: loc.index } : null;
17990
18298
  };
17991
18299
  const range = (args) => ({ start: args.start, end: args.end });
17992
18300
  const listFonts = {
@@ -17995,7 +18303,7 @@ function createImageTypeTools(controller) {
17995
18303
  description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
17996
18304
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
17997
18305
  annotations: { title: "List fonts", ...READ11 },
17998
- handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _504 => _504.getTextShaper, 'call', _505 => _505(), 'optionalAccess', _506 => _506.id]), () => ( null)) })
18306
+ handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _506 => _506.getTextShaper, 'call', _507 => _507(), 'optionalAccess', _508 => _508.id]), () => ( null)) })
17999
18307
  };
18000
18308
  const get = {
18001
18309
  name: "get_text_layer",
@@ -18151,7 +18459,7 @@ function createImageTypeTools(controller) {
18151
18459
  const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
18152
18460
  controller.selectTextShape(init);
18153
18461
  const sel = controller.getSelection();
18154
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _507 => _507.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
18462
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _509 => _509.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
18155
18463
  }
18156
18464
  };
18157
18465
  return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
@@ -18330,7 +18638,7 @@ function createImageEditorToolProvider(controller, options = {}) {
18330
18638
  for (const ref of [aboveId, parentId]) {
18331
18639
  if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
18332
18640
  }
18333
- if (parentId !== void 0 && _optionalChain([controller, 'access', _508 => _508.getLayer, 'call', _509 => _509(parentId), 'optionalAccess', _510 => _510.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
18641
+ if (parentId !== void 0 && _optionalChain([controller, 'access', _510 => _510.getLayer, 'call', _511 => _511(parentId), 'optionalAccess', _512 => _512.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
18334
18642
  const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
18335
18643
  const layer = controller.getAdjustmentLayer(id);
18336
18644
  return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
@@ -18644,7 +18952,7 @@ function maskThumbnailClick(controller, layer, e) {
18644
18952
  } else if (e.altKey && !layer.mask.source) {
18645
18953
  const mode = e.shiftKey ? "overlay" : "gray";
18646
18954
  const view = controller.getMaskView();
18647
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _511 => _511.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
18955
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _513 => _513.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
18648
18956
  } else if (e.shiftKey) {
18649
18957
  controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
18650
18958
  } else {
@@ -18708,7 +19016,7 @@ function layerHasThumbnail(layer) {
18708
19016
  return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
18709
19017
  }
18710
19018
  function layerWarning(layer) {
18711
- if (layer.type === "type" && _optionalChain([layer, 'access', _512 => _512.missingFonts, 'optionalAccess', _513 => _513.length])) {
19019
+ if (layer.type === "type" && _optionalChain([layer, 'access', _514 => _514.missingFonts, 'optionalAccess', _515 => _515.length])) {
18712
19020
  return `Missing ${layer.missingFonts.length === 1 ? "font" : "fonts"}: ${layer.missingFonts.join(", ")}. ${layer.rendering === "stored" ? "Showing the saved pixels until the text is edited." : "Drawn with a fallback font."}`;
18713
19021
  }
18714
19022
  return null;
@@ -18731,16 +19039,16 @@ function layerMenu(controller) {
18731
19039
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
18732
19040
  const below = loc ? siblings[loc.index - 1] : void 0;
18733
19041
  const hasSel = controller.hasSelection;
18734
- const isPixel = _optionalChain([active, 'optionalAccess', _514 => _514.type]) === "pixel";
18735
- const hasOwnPixels = _optionalChain([active, 'optionalAccess', _515 => _515.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _516 => _516.type]) === "shape" || _optionalChain([active, 'optionalAccess', _517 => _517.type]) === "type" || _optionalChain([active, 'optionalAccess', _518 => _518.type]) === "smart";
19042
+ const isPixel = _optionalChain([active, 'optionalAccess', _516 => _516.type]) === "pixel";
19043
+ const hasOwnPixels = _optionalChain([active, 'optionalAccess', _517 => _517.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _518 => _518.type]) === "shape" || _optionalChain([active, 'optionalAccess', _519 => _519.type]) === "type" || _optionalChain([active, 'optionalAccess', _520 => _520.type]) === "smart";
18736
19044
  return [
18737
19045
  { action: "new-layer", label: "New Layer", enabled: true },
18738
19046
  { action: "new-group", label: "New Group", enabled: true },
18739
19047
  { action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
18740
19048
  { action: "delete", label: "Delete Layer", enabled: Boolean(active) },
18741
19049
  { action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
18742
- { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _519 => _519.type]) === "group" },
18743
- { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _520 => _520.visible]) && _optionalChain([below, 'optionalAccess', _521 => _521.type]) === "pixel") },
19050
+ { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _521 => _521.type]) === "group" },
19051
+ { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _522 => _522.visible]) && _optionalChain([below, 'optionalAccess', _523 => _523.type]) === "pixel") },
18744
19052
  { action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
18745
19053
  { action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
18746
19054
  { action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
@@ -18750,27 +19058,27 @@ function layerMenu(controller) {
18750
19058
  { action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
18751
19059
  { action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
18752
19060
  { action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
18753
- { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _522 => _522.mask])) },
18754
- { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _523 => _523.mask])) },
18755
- { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _524 => _524.mask, 'optionalAccess', _525 => _525.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _526 => _526.mask])) },
18756
- { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _527 => _527.mask, 'optionalAccess', _528 => _528.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _529 => _529.mask]) && !active.mask.source) },
18757
- { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _530 => _530.mask, 'optionalAccess', _531 => _531.source])) },
18758
- { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _532 => _532.mask, 'optionalAccess', _533 => _533.source])) },
18759
- { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _534 => _534.mask, 'optionalAccess', _535 => _535.source])) && hasSel },
18760
- { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _536 => _536.vectorMask])) },
18761
- { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _537 => _537.vectorMask, 'optionalAccess', _538 => _538.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _539 => _539.vectorMask])) },
18762
- { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _540 => _540.vectorMask])) },
18763
- { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _541 => _541.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _542 => _542.type]) === "smart" || _optionalChain([active, 'optionalAccess', _543 => _543.type]) === "shape" || _optionalChain([active, 'optionalAccess', _544 => _544.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _545 => _545.type]) === "pixel" && _optionalChain([active, 'access', _546 => _546.filters, 'optionalAccess', _547 => _547.length])) },
19061
+ { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _524 => _524.mask])) },
19062
+ { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _525 => _525.mask])) },
19063
+ { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _526 => _526.mask, 'optionalAccess', _527 => _527.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _528 => _528.mask])) },
19064
+ { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _529 => _529.mask, 'optionalAccess', _530 => _530.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _531 => _531.mask]) && !active.mask.source) },
19065
+ { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _532 => _532.mask, 'optionalAccess', _533 => _533.source])) },
19066
+ { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _534 => _534.mask, 'optionalAccess', _535 => _535.source])) },
19067
+ { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _536 => _536.mask, 'optionalAccess', _537 => _537.source])) && hasSel },
19068
+ { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _538 => _538.vectorMask])) },
19069
+ { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _539 => _539.vectorMask, 'optionalAccess', _540 => _540.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _541 => _541.vectorMask])) },
19070
+ { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _542 => _542.vectorMask])) },
19071
+ { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _543 => _543.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _544 => _544.type]) === "smart" || _optionalChain([active, 'optionalAccess', _545 => _545.type]) === "shape" || _optionalChain([active, 'optionalAccess', _546 => _546.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _547 => _547.type]) === "pixel" && _optionalChain([active, 'access', _548 => _548.filters, 'optionalAccess', _549 => _549.length])) },
18764
19072
  { action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
18765
- { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _548 => _548.type]) === "smart" },
18766
- { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _549 => _549.type]) === "smart" },
18767
- { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _550 => _550.type]) === "smart" && !_optionalChain([active, 'access', _551 => _551.smartFilters, 'optionalAccess', _552 => _552.mask]) },
18768
- { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _553 => _553.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
19073
+ { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _550 => _550.type]) === "smart" },
19074
+ { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _551 => _551.type]) === "smart" },
19075
+ { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _552 => _552.type]) === "smart" && !_optionalChain([active, 'access', _553 => _553.smartFilters, 'optionalAccess', _554 => _554.mask]) },
19076
+ { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _555 => _555.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
18769
19077
  ];
18770
19078
  }
18771
19079
  async function runLayerMenuAction(controller, action) {
18772
19080
  const active = controller.getActiveLayer();
18773
- const id = _optionalChain([active, 'optionalAccess', _554 => _554.id]);
19081
+ const id = _optionalChain([active, 'optionalAccess', _556 => _556.id]);
18774
19082
  try {
18775
19083
  switch (action) {
18776
19084
  case "new-layer":
@@ -18826,10 +19134,10 @@ async function runLayerMenuAction(controller, action) {
18826
19134
  if (id) controller.removeLayerMask(id);
18827
19135
  break;
18828
19136
  case "toggle-mask":
18829
- if (id && _optionalChain([active, 'optionalAccess', _555 => _555.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
19137
+ if (id && _optionalChain([active, 'optionalAccess', _557 => _557.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
18830
19138
  break;
18831
19139
  case "toggle-mask-link":
18832
- if (id && _optionalChain([active, 'optionalAccess', _556 => _556.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
19140
+ if (id && _optionalChain([active, 'optionalAccess', _558 => _558.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
18833
19141
  break;
18834
19142
  case "add-vector-mask":
18835
19143
  case "add-vector-mask-hide":
@@ -18842,7 +19150,7 @@ async function runLayerMenuAction(controller, action) {
18842
19150
  if (id) controller.removeVectorMask(id);
18843
19151
  break;
18844
19152
  case "toggle-vector-mask":
18845
- if (id && _optionalChain([active, 'optionalAccess', _557 => _557.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
19153
+ if (id && _optionalChain([active, 'optionalAccess', _559 => _559.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
18846
19154
  break;
18847
19155
  case "rasterize-vector-mask":
18848
19156
  if (id) controller.rasterizeVectorMask(id);
@@ -18863,7 +19171,7 @@ async function runLayerMenuAction(controller, action) {
18863
19171
  if (id) controller.setSmartFilterMask(id, "reveal-all");
18864
19172
  break;
18865
19173
  case "toggle-clip":
18866
- if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _558 => _558.clipped]) });
19174
+ if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _560 => _560.clipped]) });
18867
19175
  break;
18868
19176
  }
18869
19177
  return null;
@@ -18873,7 +19181,7 @@ async function runLayerMenuAction(controller, action) {
18873
19181
  }
18874
19182
  function smartFilterRows(layer) {
18875
19183
  if (layer.type !== "smart") return [];
18876
- const list = _nullishCoalesce(_optionalChain([layer, 'access', _559 => _559.smartFilters, 'optionalAccess', _560 => _560.filters]), () => ( []));
19184
+ const list = _nullishCoalesce(_optionalChain([layer, 'access', _561 => _561.smartFilters, 'optionalAccess', _562 => _562.filters]), () => ( []));
18877
19185
  const rows = list.map((f, index) => ({
18878
19186
  filter: f,
18879
19187
  index,
@@ -18899,8 +19207,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
18899
19207
  };
18900
19208
  collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
18901
19209
  const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
18902
- const imgW = _optionalChain([state, 'access', _561 => _561.imageDimensions, 'optionalAccess', _562 => _562.width]) || 1;
18903
- const imgH = _optionalChain([state, 'access', _563 => _563.imageDimensions, 'optionalAccess', _564 => _564.height]) || 1;
19210
+ const imgW = _optionalChain([state, 'access', _563 => _563.imageDimensions, 'optionalAccess', _564 => _564.width]) || 1;
19211
+ const imgH = _optionalChain([state, 'access', _565 => _565.imageDimensions, 'optionalAccess', _566 => _566.height]) || 1;
18904
19212
  return ctrlLayers.map((l) => {
18905
19213
  const bounds = controller.getLayerBounds(l.id) || {
18906
19214
  x: 0,
@@ -18909,8 +19217,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
18909
19217
  height: imgH
18910
19218
  };
18911
19219
  const sLayer = sLayerMap.get(l.id);
18912
- const assetKey = _optionalChain([sLayer, 'optionalAccess', _565 => _565.asset]);
18913
- const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _566 => _566.source]) === "document" ? fallbackImageUrl : "");
19220
+ const assetKey = _optionalChain([sLayer, 'optionalAccess', _567 => _567.asset]);
19221
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _568 => _568.source]) === "document" ? fallbackImageUrl : "");
18914
19222
  return {
18915
19223
  id: l.id,
18916
19224
  name: l.name || "Untitled Layer",
@@ -18964,9 +19272,9 @@ async function addLayerOfKind(controller, id, init) {
18964
19272
  const cx = Math.round(canvas.width / 2);
18965
19273
  const cy = Math.round(canvas.height / 2);
18966
19274
  return controller.addTextLayer({
18967
- text: _optionalChain([init, 'optionalAccess', _567 => _567.text]) || "New Text",
18968
- x: typeof _optionalChain([init, 'optionalAccess', _568 => _568.x]) === "number" ? init.x : cx - 100,
18969
- y: typeof _optionalChain([init, 'optionalAccess', _569 => _569.y]) === "number" ? init.y : cy,
19275
+ text: _optionalChain([init, 'optionalAccess', _569 => _569.text]) || "New Text",
19276
+ x: typeof _optionalChain([init, 'optionalAccess', _570 => _570.x]) === "number" ? init.x : cx - 100,
19277
+ y: typeof _optionalChain([init, 'optionalAccess', _571 => _571.y]) === "number" ? init.y : cy,
18970
19278
  ...init
18971
19279
  });
18972
19280
  }
@@ -18979,10 +19287,10 @@ async function addLayerOfKind(controller, id, init) {
18979
19287
  return controller.addShapeLayer({
18980
19288
  shape: {
18981
19289
  kind: "rect",
18982
- x: typeof _optionalChain([init, 'optionalAccess', _570 => _570.x]) === "number" ? init.x : cx - Math.round(w / 2),
18983
- y: typeof _optionalChain([init, 'optionalAccess', _571 => _571.y]) === "number" ? init.y : cy - Math.round(h / 2),
18984
- width: typeof _optionalChain([init, 'optionalAccess', _572 => _572.width]) === "number" ? init.width : w,
18985
- height: typeof _optionalChain([init, 'optionalAccess', _573 => _573.height]) === "number" ? init.height : h
19290
+ x: typeof _optionalChain([init, 'optionalAccess', _572 => _572.x]) === "number" ? init.x : cx - Math.round(w / 2),
19291
+ y: typeof _optionalChain([init, 'optionalAccess', _573 => _573.y]) === "number" ? init.y : cy - Math.round(h / 2),
19292
+ width: typeof _optionalChain([init, 'optionalAccess', _574 => _574.width]) === "number" ? init.width : w,
19293
+ height: typeof _optionalChain([init, 'optionalAccess', _575 => _575.height]) === "number" ? init.height : h
18986
19294
  },
18987
19295
  name: "Rectangle",
18988
19296
  ...init
@@ -18997,10 +19305,10 @@ async function addLayerOfKind(controller, id, init) {
18997
19305
  return controller.addShapeLayer({
18998
19306
  shape: {
18999
19307
  kind: "ellipse",
19000
- x: typeof _optionalChain([init, 'optionalAccess', _574 => _574.x]) === "number" ? init.x : cx - Math.round(w / 2),
19001
- y: typeof _optionalChain([init, 'optionalAccess', _575 => _575.y]) === "number" ? init.y : cy - Math.round(h / 2),
19002
- width: typeof _optionalChain([init, 'optionalAccess', _576 => _576.width]) === "number" ? init.width : w,
19003
- height: typeof _optionalChain([init, 'optionalAccess', _577 => _577.height]) === "number" ? init.height : h
19308
+ x: typeof _optionalChain([init, 'optionalAccess', _576 => _576.x]) === "number" ? init.x : cx - Math.round(w / 2),
19309
+ y: typeof _optionalChain([init, 'optionalAccess', _577 => _577.y]) === "number" ? init.y : cy - Math.round(h / 2),
19310
+ width: typeof _optionalChain([init, 'optionalAccess', _578 => _578.width]) === "number" ? init.width : w,
19311
+ height: typeof _optionalChain([init, 'optionalAccess', _579 => _579.height]) === "number" ? init.height : h
19004
19312
  },
19005
19313
  name: "Ellipse",
19006
19314
  ...init
@@ -19061,18 +19369,18 @@ function layerEffectsPanel(layer) {
19061
19369
  if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
19062
19370
  if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
19063
19371
  const fx = layer.effects;
19064
- const readOnly = Boolean(_optionalChain([layer, 'access', _578 => _578.locks, 'optionalAccess', _579 => _579.all]));
19372
+ const readOnly = Boolean(_optionalChain([layer, 'access', _580 => _580.locks, 'optionalAccess', _581 => _581.all]));
19065
19373
  return {
19066
19374
  available: true,
19067
19375
  readOnly,
19068
19376
  reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
19069
- enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _580 => _580.enabled]), () => ( true)),
19070
- scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _581 => _581.scale]), () => ( 1)),
19071
- rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _582 => _582.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
19377
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _582 => _582.enabled]), () => ( true)),
19378
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _583 => _583.scale]), () => ( 1)),
19379
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _584 => _584.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
19072
19380
  };
19073
19381
  }
19074
19382
  function layerEffectsBadge(layer) {
19075
- if (!_optionalChain([layer, 'access', _583 => _583.effects, 'optionalAccess', _584 => _584.items, 'access', _585 => _585.length])) return null;
19383
+ if (!_optionalChain([layer, 'access', _585 => _585.effects, 'optionalAccess', _586 => _586.items, 'access', _587 => _587.length])) return null;
19076
19384
  return _chunkHGTDMKNEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
19077
19385
  }
19078
19386
  var LAYER_EFFECT_MENU = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, kind) }));
@@ -19117,8 +19425,8 @@ function fillControls(f, allowPattern, patterns) {
19117
19425
  }
19118
19426
  function gradientControls(prefix, g) {
19119
19427
  return [
19120
- { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _586 => _586.stops, 'access', _587 => _587[0], 'optionalAccess', _588 => _588.color]), () => ( "#000000")) },
19121
- { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _589 => _589.stops, 'access', _590 => _590[g.stops.length - 1], 'optionalAccess', _591 => _591.color]), () => ( "#ffffff")) },
19428
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _588 => _588.stops, 'access', _589 => _589[0], 'optionalAccess', _590 => _590.color]), () => ( "#000000")) },
19429
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _591 => _591.stops, 'access', _592 => _592[g.stops.length - 1], 'optionalAccess', _593 => _593.color]), () => ( "#ffffff")) },
19122
19430
  { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
19123
19431
  { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
19124
19432
  { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
@@ -19210,19 +19518,19 @@ function layerEffectControls(e, patterns = []) {
19210
19518
  }
19211
19519
  function fillOfType(current, type, patterns) {
19212
19520
  if (type === "gradient") return { type: "gradient", gradient: _chunkHGTDMKNEcjs.defaultEffectGradient.call(void 0, ) };
19213
- if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _592 => _592[0], 'optionalAccess', _593 => _593.id]), () => ( "checker")), scale: 1 };
19521
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _594 => _594[0], 'optionalAccess', _595 => _595.id]), () => ( "checker")), scale: 1 };
19214
19522
  return { type: "color", color: current.type === "color" ? current.color : "#000000" };
19215
19523
  }
19216
19524
  function effectControlChange(effect, key, value, patterns = []) {
19217
19525
  const [top, ...rest] = key.split(".");
19218
19526
  if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
19219
19527
  if (top === "patternId" && !rest.length) {
19220
- const name = _optionalChain([patternOptions, 'call', _594 => _594(patterns), 'access', _595 => _595.find, 'call', _596 => _596((o) => o.value === value), 'optionalAccess', _597 => _597.label]);
19528
+ const name = _optionalChain([patternOptions, 'call', _596 => _596(patterns), 'access', _597 => _597.find, 'call', _598 => _598((o) => o.value === value), 'optionalAccess', _599 => _599.label]);
19221
19529
  return name ? { patternId: value, name } : { patternId: value };
19222
19530
  }
19223
19531
  if (!rest.length) return { [top]: value };
19224
19532
  if (top === "fill" && rest[0] === "patternId") {
19225
- const name = _optionalChain([patternOptions, 'call', _598 => _598(patterns), 'access', _599 => _599.find, 'call', _600 => _600((o) => o.value === value), 'optionalAccess', _601 => _601.label]);
19533
+ const name = _optionalChain([patternOptions, 'call', _600 => _600(patterns), 'access', _601 => _601.find, 'call', _602 => _602((o) => o.value === value), 'optionalAccess', _603 => _603.label]);
19226
19534
  return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
19227
19535
  }
19228
19536
  return { [top]: setPath(getPath(effect, top), rest, value) };
@@ -19249,7 +19557,7 @@ function colorPanelView(controller) {
19249
19557
  profileName: profile.name,
19250
19558
  workingSpace: profile.builtin,
19251
19559
  mode: profile.mode,
19252
- cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _602 => _602.cmykProfile, 'optionalAccess', _603 => _603.name]), () => ( null)),
19560
+ cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _604 => _604.cmykProfile, 'optionalAccess', _605 => _605.name]), () => ( null)),
19253
19561
  proof: proof ? { id: _nullishCoalesce(proof.profile.builtin, () => ( null)), name: proof.profile.name, intent: proof.intent, simulatePaper: proof.simulatePaper, gamutWarning: proof.gamutWarning, bpc: proof.bpc } : null
19254
19562
  };
19255
19563
  }
@@ -19457,7 +19765,7 @@ var FreeTransformTool = (_class16 = class {
19457
19765
  __init131() {this.error = null}
19458
19766
  __init132() {this.lastResult = null}
19459
19767
  get active() {
19460
- return Boolean(_optionalChain([this, 'access', _604 => _604.sessionRef, 'optionalAccess', _605 => _605.isOpen]));
19768
+ return Boolean(_optionalChain([this, 'access', _606 => _606.sessionRef, 'optionalAccess', _607 => _607.isOpen]));
19461
19769
  }
19462
19770
  get session() {
19463
19771
  return this.active ? this.sessionRef : null;
@@ -19466,7 +19774,7 @@ var FreeTransformTool = (_class16 = class {
19466
19774
  return this.modeValue;
19467
19775
  }
19468
19776
  get interpolation() {
19469
- return _nullishCoalesce(_optionalChain([this, 'access', _606 => _606.sessionRef, 'optionalAccess', _607 => _607.interpolation]), () => ( "bicubic"));
19777
+ return _nullishCoalesce(_optionalChain([this, 'access', _608 => _608.sessionRef, 'optionalAccess', _609 => _609.interpolation]), () => ( "bicubic"));
19470
19778
  }
19471
19779
  /** Whether the open transform has changed anything yet (a commit would add an undo step). */
19472
19780
  get modified() {
@@ -19485,7 +19793,7 @@ var FreeTransformTool = (_class16 = class {
19485
19793
  };
19486
19794
  }
19487
19795
  changed() {
19488
- _optionalChain([this, 'access', _608 => _608.options, 'access', _609 => _609.onChange, 'optionalCall', _610 => _610()]);
19796
+ _optionalChain([this, 'access', _610 => _610.options, 'access', _611 => _611.onChange, 'optionalCall', _612 => _612()]);
19489
19797
  for (const l of this.listeners) l();
19490
19798
  }
19491
19799
  /** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
@@ -19878,7 +20186,7 @@ var FreeTransformTool = (_class16 = class {
19878
20186
  }
19879
20187
  /** Abandons the transform and restores everything. */
19880
20188
  cancel() {
19881
- _optionalChain([this, 'access', _611 => _611.sessionRef, 'optionalAccess', _612 => _612.cancel, 'call', _613 => _613()]);
20189
+ _optionalChain([this, 'access', _613 => _613.sessionRef, 'optionalAccess', _614 => _614.cancel, 'call', _615 => _615()]);
19882
20190
  this.sessionRef = null;
19883
20191
  this.corners = null;
19884
20192
  this.mesh = null;
@@ -19934,7 +20242,7 @@ function imageLayerAppliedEffects(layer) {
19934
20242
  const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
19935
20243
  if (layer.type === "pixel" && layer.generator) out.push({ id: "generator", ...ref(layer.generator), role: "effect layer", enabled: true, values: layer.generator.values, ...layer.generator.time ? { time: layer.generator.time } : {}, ...layer.generator.animate ? { animate: layer.generator.animate } : {} });
19936
20244
  if (layer.type === "smart")
19937
- (_nullishCoalesce(_optionalChain([layer, 'access', _614 => _614.smartFilters, 'optionalAccess', _615 => _615.filters]), () => ( []))).forEach((f, index) => {
20245
+ (_nullishCoalesce(_optionalChain([layer, 'access', _616 => _616.smartFilters, 'optionalAccess', _617 => _617.filters]), () => ( []))).forEach((f, index) => {
19938
20246
  if (f.kind === "effect") out.push({ id: f.id, ...ref(f), role: "smart filter", enabled: f.enabled && layer.smartFilters.enabled, opacity: f.opacity, blend: f.blend, values: f.values, index });
19939
20247
  });
19940
20248
  return out;
@@ -20086,7 +20394,7 @@ var OTHER_TOOL_LABELS = {
20086
20394
  watermark: "Watermark"
20087
20395
  };
20088
20396
  function imageToolLabel(tool) {
20089
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _616 => _616.find, 'call', _617 => _617((t) => t.id === tool), 'optionalAccess', _618 => _618.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
20397
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _618 => _618.find, 'call', _619 => _619((t) => t.id === tool), 'optionalAccess', _620 => _620.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
20090
20398
  }
20091
20399
  var IMAGE_TOOL_SHORTCUTS = {
20092
20400
  ...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
@@ -21217,4 +21525,9 @@ function createImageEditorDocument(controller, options = {}) {
21217
21525
 
21218
21526
 
21219
21527
 
21220
- exports.ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUYXL6ZWQcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUYXL6ZWQcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUYXL6ZWQcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkUYXL6ZWQcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.ColorGmm = ColorGmm; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUYXL6ZWQcjs.D50; exports.D65 = _chunkUYXL6ZWQcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkBRKVNXDZcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkUYXL6ZWQcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkUYXL6ZWQcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkUYXL6ZWQcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkUYXL6ZWQcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = GAMMA; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.GridGraph = GridGraph; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkUYXL6ZWQcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUYXL6ZWQcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUYXL6ZWQcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUYXL6ZWQcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUYXL6ZWQcjs.LUMA_709; exports.LayerCompositor = _chunkUYXL6ZWQcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUYXL6ZWQcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUYXL6ZWQcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkUYXL6ZWQcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUYXL6ZWQcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkUYXL6ZWQcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATTERN_BLOCK_KEYS = _chunkUYXL6ZWQcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkUYXL6ZWQcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkUYXL6ZWQcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkUYXL6ZWQcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUYXL6ZWQcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkUYXL6ZWQcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUYXL6ZWQcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkUYXL6ZWQcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkUYXL6ZWQcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUYXL6ZWQcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUYXL6ZWQcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUYXL6ZWQcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUYXL6ZWQcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = UNITS; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkUYXL6ZWQcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkBRKVNXDZcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkBRKVNXDZcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_SIZE = WORK_SIZE; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkUYXL6ZWQcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUYXL6ZWQcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUYXL6ZWQcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUYXL6ZWQcjs.activeSmartFilters; exports.addLayerEffect = _chunkUYXL6ZWQcjs.addLayerEffect; exports.addLayerFilter = _chunkUYXL6ZWQcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUYXL6ZWQcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUYXL6ZWQcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUYXL6ZWQcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUYXL6ZWQcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUYXL6ZWQcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUYXL6ZWQcjs.anchorPoint; exports.annotationBlend = _chunkUYXL6ZWQcjs.annotationBlend; exports.annotationLayerFor = _chunkUYXL6ZWQcjs.annotationLayerFor; exports.annotationLayerName = _chunkUYXL6ZWQcjs.annotationLayerName; exports.annotationOfLayer = _chunkUYXL6ZWQcjs.annotationOfLayer; exports.annotationOfShape = _chunkUYXL6ZWQcjs.annotationOfShape; exports.annotationOfType = _chunkUYXL6ZWQcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUYXL6ZWQcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUYXL6ZWQcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUYXL6ZWQcjs.applyAdjustments; exports.applyBoxBlur = _chunkUYXL6ZWQcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUYXL6ZWQcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUYXL6ZWQcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUYXL6ZWQcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUYXL6ZWQcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUYXL6ZWQcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUYXL6ZWQcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUYXL6ZWQcjs.applyParams; exports.applyProcess2Adjustments = _chunkUYXL6ZWQcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUYXL6ZWQcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUYXL6ZWQcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUYXL6ZWQcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUYXL6ZWQcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkUYXL6ZWQcjs.blurFilter; exports.borderCoverage = _chunkUYXL6ZWQcjs.borderCoverage; exports.boxBlur = boxBlur; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUYXL6ZWQcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUYXL6ZWQcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkUYXL6ZWQcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUYXL6ZWQcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUYXL6ZWQcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUYXL6ZWQcjs.canvasToImagePoint; exports.caretAt = _chunkBRKVNXDZcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUYXL6ZWQcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUYXL6ZWQcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkUYXL6ZWQcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUYXL6ZWQcjs.compileAdjustmentLayer; exports.componentPath = _chunkUYXL6ZWQcjs.componentPath; exports.componentsCoverage = _chunkUYXL6ZWQcjs.componentsCoverage; exports.compositeDeep = _chunkUYXL6ZWQcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUYXL6ZWQcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUYXL6ZWQcjs.contentsBox; exports.contentsSurface = _chunkUYXL6ZWQcjs.contentsSurface; exports.contractCoverage = _chunkUYXL6ZWQcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUYXL6ZWQcjs.convertToSmartObject; exports.copySmartObject = _chunkUYXL6ZWQcjs.copySmartObject; exports.cornersFromMatrix = _chunkUYXL6ZWQcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUYXL6ZWQcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUYXL6ZWQcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkBRKVNXDZcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkBRKVNXDZcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkBRKVNXDZcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUYXL6ZWQcjs.createSelectionMask; exports.createShapeLayer = _chunkUYXL6ZWQcjs.createShapeLayer; exports.createTypeLayer = _chunkUYXL6ZWQcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkBRKVNXDZcjs.cssFont; exports.cssFontFamily = _chunkBRKVNXDZcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUYXL6ZWQcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUYXL6ZWQcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUYXL6ZWQcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUYXL6ZWQcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUYXL6ZWQcjs.decodeMergedImage; exports.decodePlanes = _chunkUYXL6ZWQcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUYXL6ZWQcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUYXL6ZWQcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUYXL6ZWQcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUYXL6ZWQcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUYXL6ZWQcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUYXL6ZWQcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUYXL6ZWQcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUYXL6ZWQcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUYXL6ZWQcjs.deserializeEffects; exports.deserializeLayer = _chunkUYXL6ZWQcjs.deserializeLayer; exports.deserializeLayers = _chunkUYXL6ZWQcjs.deserializeLayers; exports.deserializePatterns = _chunkUYXL6ZWQcjs.deserializePatterns; exports.deserializeSelection = _chunkUYXL6ZWQcjs.deserializeSelection; exports.developFilter = _chunkUYXL6ZWQcjs.developFilter; exports.developFromAdjustments = _chunkUYXL6ZWQcjs.developFromAdjustments; exports.developTarget = _chunkUYXL6ZWQcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUYXL6ZWQcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUYXL6ZWQcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkBRKVNXDZcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUYXL6ZWQcjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveLayerMask = _chunkUYXL6ZWQcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkUYXL6ZWQcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUYXL6ZWQcjs.encodeRle; exports.encodeSelectionRle = _chunkUYXL6ZWQcjs.encodeSelectionRle; exports.encodeSurface = _chunkUYXL6ZWQcjs.encodeSurface; exports.evalWarpMesh = _chunkBRKVNXDZcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUYXL6ZWQcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUYXL6ZWQcjs.expandCoverage; exports.exportPsd = _chunkUYXL6ZWQcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUYXL6ZWQcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUYXL6ZWQcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSubject = findSubject; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkBRKVNXDZcjs.fitParagraphRuns; exports.fitRuns = _chunkBRKVNXDZcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUYXL6ZWQcjs.flattenPath; exports.flipCorners = _chunkUYXL6ZWQcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.followLayerMove = _chunkUYXL6ZWQcjs.followLayerMove; exports.fontOf = _chunkBRKVNXDZcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUYXL6ZWQcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUYXL6ZWQcjs.geometryHomography; exports.getAnnotationBounds = _chunkUYXL6ZWQcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUYXL6ZWQcjs.getCropCursor; exports.getRotatedSize = _chunkUYXL6ZWQcjs.getRotatedSize; exports.getViewportMetrics = _chunkUYXL6ZWQcjs.getViewportMetrics; exports.getViewportProjection = _chunkUYXL6ZWQcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = grabCutLabels; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUYXL6ZWQcjs.greyMorphology; exports.groupLayers = _chunkUYXL6ZWQcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUYXL6ZWQcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUYXL6ZWQcjs.hasSurface; exports.hasWarp = _chunkUYXL6ZWQcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUYXL6ZWQcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUYXL6ZWQcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUYXL6ZWQcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUYXL6ZWQcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUYXL6ZWQcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUYXL6ZWQcjs.hueRangeTables; exports.hueRangeWeight = _chunkUYXL6ZWQcjs.hueRangeWeight; exports.hueSaturation = _chunkUYXL6ZWQcjs.hueSaturation; exports.identityCurve = _chunkUYXL6ZWQcjs.identityCurve; exports.identityLevels = _chunkUYXL6ZWQcjs.identityLevels; exports.identityTransform = _chunkUYXL6ZWQcjs.identityTransform; exports.identityWarpMesh = _chunkBRKVNXDZcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUYXL6ZWQcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkUYXL6ZWQcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUYXL6ZWQcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUYXL6ZWQcjs.invertMatrix3; exports.invertSelection = _chunkUYXL6ZWQcjs.invertSelection; exports.isActiveFilter = _chunkUYXL6ZWQcjs.isActiveFilter; exports.isActiveVectorMask = _chunkUYXL6ZWQcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkUYXL6ZWQcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkUYXL6ZWQcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUYXL6ZWQcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUYXL6ZWQcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUYXL6ZWQcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUYXL6ZWQcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUYXL6ZWQcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUYXL6ZWQcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUYXL6ZWQcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUYXL6ZWQcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUYXL6ZWQcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUYXL6ZWQcjs.isTransformAnchor; exports.isValidWarp = _chunkUYXL6ZWQcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.keepMainPieces = keepMainPieces; exports.kelvinToTemperature = _chunkUYXL6ZWQcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkUYXL6ZWQcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUYXL6ZWQcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUYXL6ZWQcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUYXL6ZWQcjs.layerMaskKey; exports.layerMaskSelection = _chunkUYXL6ZWQcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkUYXL6ZWQcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkUYXL6ZWQcjs.layerTree; exports.layerTypeLabel = _chunkUYXL6ZWQcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUYXL6ZWQcjs.layersFromLegacy; exports.layoutText = _chunkBRKVNXDZcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUYXL6ZWQcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUYXL6ZWQcjs.legacyMaskOf; exports.legacyView = _chunkUYXL6ZWQcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUYXL6ZWQcjs.levelsValue; exports.linearSrgbToXy = _chunkUYXL6ZWQcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUYXL6ZWQcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUYXL6ZWQcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUYXL6ZWQcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk3T5VCDIVcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkUYXL6ZWQcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUYXL6ZWQcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkUYXL6ZWQcjs.matrixFromCorners; exports.matrixFromParams = _chunkUYXL6ZWQcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUYXL6ZWQcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkUYXL6ZWQcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUYXL6ZWQcjs.moveLayer; exports.moveSmartFilter = _chunkUYXL6ZWQcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUYXL6ZWQcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUYXL6ZWQcjs.neutralHueRange; exports.newContentsId = _chunkUYXL6ZWQcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUYXL6ZWQcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUYXL6ZWQcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUYXL6ZWQcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUYXL6ZWQcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUYXL6ZWQcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUYXL6ZWQcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUYXL6ZWQcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUYXL6ZWQcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUYXL6ZWQcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUYXL6ZWQcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUYXL6ZWQcjs.normalizeSubpaths; exports.normalizeText = _chunkUYXL6ZWQcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUYXL6ZWQcjs.offsetLayer; exports.offsetShape = _chunkUYXL6ZWQcjs.offsetShape; exports.offsetSmartObject = _chunkUYXL6ZWQcjs.offsetSmartObject; exports.offsetVectorMask = _chunkUYXL6ZWQcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = otsuThreshold; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkBRKVNXDZcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUYXL6ZWQcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUYXL6ZWQcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUYXL6ZWQcjs.parseLfx2; exports.parseLrfx = _chunkUYXL6ZWQcjs.parseLrfx; exports.parseOpenTypeFont = _chunk3T5VCDIVcjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUYXL6ZWQcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUYXL6ZWQcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUYXL6ZWQcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUYXL6ZWQcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUYXL6ZWQcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUYXL6ZWQcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUYXL6ZWQcjs.pixelLayerBounds; exports.pixelLayers = _chunkUYXL6ZWQcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUYXL6ZWQcjs.placeContents; exports.placeLayer = _chunkUYXL6ZWQcjs.placeLayer; exports.placementAt = _chunkUYXL6ZWQcjs.placementAt; exports.placementBounds = _chunkUYXL6ZWQcjs.placementBounds; exports.placementGeometry = _chunkUYXL6ZWQcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonCoverageBox = polygonCoverageBox; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUYXL6ZWQcjs.posterizeValue; exports.presetWarp = _chunkUYXL6ZWQcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUYXL6ZWQcjs.projectImagePoint; exports.projectImageRect = _chunkUYXL6ZWQcjs.projectImageRect; exports.projectMaskCoverage = _chunkUYXL6ZWQcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUYXL6ZWQcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUYXL6ZWQcjs.psdToLayers; exports.pullWarpMesh = _chunkBRKVNXDZcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = quickSelectStroke; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUYXL6ZWQcjs.rangeLightness; exports.rasterContents = _chunkUYXL6ZWQcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUYXL6ZWQcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUYXL6ZWQcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUYXL6ZWQcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUYXL6ZWQcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUYXL6ZWQcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUYXL6ZWQcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUYXL6ZWQcjs.removeLayer; exports.removeLayerEffect = _chunkUYXL6ZWQcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUYXL6ZWQcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUYXL6ZWQcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUYXL6ZWQcjs.renderShape; exports.renderShapeRect = _chunkUYXL6ZWQcjs.renderShapeRect; exports.renderSmartObject = _chunkUYXL6ZWQcjs.renderSmartObject; exports.renderText = _chunkUYXL6ZWQcjs.renderText; exports.replaceContents = _chunkUYXL6ZWQcjs.replaceContents; exports.replaceTextRange = _chunkUYXL6ZWQcjs.replaceTextRange; exports.requireLayer = _chunkUYXL6ZWQcjs.requireLayer; exports.requireOperation = _chunkUYXL6ZWQcjs.requireOperation; exports.requireShapeLayer = _chunkUYXL6ZWQcjs.requireShapeLayer; exports.requireSmartObject = _chunkUYXL6ZWQcjs.requireSmartObject; exports.requireTypeLayer = _chunkUYXL6ZWQcjs.requireTypeLayer; exports.requireUnlocked = _chunkUYXL6ZWQcjs.requireUnlocked; exports.rerender = _chunkUYXL6ZWQcjs.rerender; exports.rerenderShape = _chunkUYXL6ZWQcjs.rerenderShape; exports.rerenderText = _chunkUYXL6ZWQcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUYXL6ZWQcjs.resizeSelection; exports.resizeWarpMesh = _chunkBRKVNXDZcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUYXL6ZWQcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkUYXL6ZWQcjs.resolveVectorMasks; exports.restyleRange = _chunkBRKVNXDZcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUYXL6ZWQcjs.rgbToGray; exports.rgbToHsl = _chunkUYXL6ZWQcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUYXL6ZWQcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUYXL6ZWQcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUYXL6ZWQcjs.sampleLut; exports.sampleToneLut = _chunkUYXL6ZWQcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkUYXL6ZWQcjs.selectionArea; exports.selectionFromCoverage = _chunkUYXL6ZWQcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUYXL6ZWQcjs.selectionFromPixels; exports.selectionFromRegion = _chunkUYXL6ZWQcjs.selectionFromRegion; exports.selectionFromTiles = _chunkUYXL6ZWQcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkUYXL6ZWQcjs.selectionToCoverage; exports.selectionToPixels = _chunkUYXL6ZWQcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionValueAt = _chunkUYXL6ZWQcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUYXL6ZWQcjs.serializeContents; exports.serializeEffects = _chunkUYXL6ZWQcjs.serializeEffects; exports.serializeLayer = _chunkUYXL6ZWQcjs.serializeLayer; exports.serializeLayers = _chunkUYXL6ZWQcjs.serializeLayers; exports.serializeLayersExternal = _chunkUYXL6ZWQcjs.serializeLayersExternal; exports.serializePatterns = _chunkUYXL6ZWQcjs.serializePatterns; exports.serializeSelection = _chunkUYXL6ZWQcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUYXL6ZWQcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUYXL6ZWQcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUYXL6ZWQcjs.setLayerMask; exports.setLayerProperties = _chunkUYXL6ZWQcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUYXL6ZWQcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUYXL6ZWQcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUYXL6ZWQcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUYXL6ZWQcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUYXL6ZWQcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUYXL6ZWQcjs.shapeLayers; exports.shapeOutline = _chunkUYXL6ZWQcjs.shapeOutline; exports.shapeRenderClip = _chunkUYXL6ZWQcjs.shapeRenderClip; exports.shiftCoverage = _chunkUYXL6ZWQcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smoothnessWeights = smoothnessWeights; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkBRKVNXDZcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkUYXL6ZWQcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkBRKVNXDZcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = superpixelSaliency; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUYXL6ZWQcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUYXL6ZWQcjs.temperatureToKelvin; exports.textIndexAt = _chunkBRKVNXDZcjs.textIndexAt; exports.textMatrix = _chunkUYXL6ZWQcjs.textMatrix; exports.textOrientation = _chunkUYXL6ZWQcjs.textOrientation; exports.textOutlines = _chunkUYXL6ZWQcjs.textOutlines; exports.textRange = _chunkUYXL6ZWQcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkUYXL6ZWQcjs.toTextSpace; exports.toneCurve = _chunkUYXL6ZWQcjs.toneCurve; exports.toneLuts = _chunkUYXL6ZWQcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUYXL6ZWQcjs.transformHomography; exports.transformMap = _chunkUYXL6ZWQcjs.transformMap; exports.transformShapeComponents = _chunkUYXL6ZWQcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUYXL6ZWQcjs.transformTypeLayer; exports.transformVectorMask = _chunkUYXL6ZWQcjs.transformVectorMask; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUYXL6ZWQcjs.transformedBox; exports.transformedPoint = _chunkUYXL6ZWQcjs.transformedPoint; exports.translateLayer = _chunkUYXL6ZWQcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUYXL6ZWQcjs.typeAsPixelLayer; exports.typeFrame = _chunkUYXL6ZWQcjs.typeFrame; exports.typeFromAnnotation = _chunkUYXL6ZWQcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUYXL6ZWQcjs.typeLayerName; exports.ungroupLayer = _chunkUYXL6ZWQcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUYXL6ZWQcjs.unionRect; exports.unprojectCanvasPoint = _chunkUYXL6ZWQcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUYXL6ZWQcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUYXL6ZWQcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUYXL6ZWQcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUYXL6ZWQcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUYXL6ZWQcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUYXL6ZWQcjs.updateTypeLayer; exports.upscaleRegion = upscaleRegion; exports.userErrorMessage = _chunkUYXL6ZWQcjs.userErrorMessage; exports.uvToXy = _chunkUYXL6ZWQcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkUYXL6ZWQcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkUYXL6ZWQcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkUYXL6ZWQcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkUYXL6ZWQcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUYXL6ZWQcjs.vibranceLinear; exports.vibrancePixel = _chunkUYXL6ZWQcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkBRKVNXDZcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkBRKVNXDZcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkBRKVNXDZcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkBRKVNXDZcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUYXL6ZWQcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUYXL6ZWQcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUYXL6ZWQcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUYXL6ZWQcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUYXL6ZWQcjs.withNewIds; exports.workImage = workImage; exports.writeAdjustmentBlock = _chunkUYXL6ZWQcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUYXL6ZWQcjs.writeLfx2; exports.writePatternBlock = _chunkUYXL6ZWQcjs.writePatternBlock; exports.writePsd = _chunkUYXL6ZWQcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUYXL6ZWQcjs.xyToTempTint; exports.xyToUv = _chunkUYXL6ZWQcjs.xyToUv;
21528
+
21529
+
21530
+
21531
+
21532
+
21533
+ exports.ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUYXL6ZWQcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUYXL6ZWQcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUYXL6ZWQcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkUYXL6ZWQcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.ColorGmm = ColorGmm; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUYXL6ZWQcjs.D50; exports.D65 = _chunkUYXL6ZWQcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkBRKVNXDZcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkUYXL6ZWQcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkUYXL6ZWQcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkUYXL6ZWQcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkUYXL6ZWQcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = GAMMA; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.GridGraph = GridGraph; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkUYXL6ZWQcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUYXL6ZWQcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUYXL6ZWQcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUYXL6ZWQcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUYXL6ZWQcjs.LUMA_709; exports.LayerCompositor = _chunkUYXL6ZWQcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUYXL6ZWQcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUYXL6ZWQcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkUYXL6ZWQcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUYXL6ZWQcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkUYXL6ZWQcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATTERN_BLOCK_KEYS = _chunkUYXL6ZWQcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkUYXL6ZWQcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkUYXL6ZWQcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkUYXL6ZWQcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUYXL6ZWQcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkUYXL6ZWQcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUYXL6ZWQcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkUYXL6ZWQcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkUYXL6ZWQcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUYXL6ZWQcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUYXL6ZWQcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUYXL6ZWQcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUYXL6ZWQcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = UNITS; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkUYXL6ZWQcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkBRKVNXDZcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkBRKVNXDZcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_SIZE = WORK_SIZE; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkUYXL6ZWQcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUYXL6ZWQcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUYXL6ZWQcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUYXL6ZWQcjs.activeSmartFilters; exports.addLayerEffect = _chunkUYXL6ZWQcjs.addLayerEffect; exports.addLayerFilter = _chunkUYXL6ZWQcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUYXL6ZWQcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUYXL6ZWQcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUYXL6ZWQcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUYXL6ZWQcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUYXL6ZWQcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUYXL6ZWQcjs.anchorPoint; exports.annotationBlend = _chunkUYXL6ZWQcjs.annotationBlend; exports.annotationLayerFor = _chunkUYXL6ZWQcjs.annotationLayerFor; exports.annotationLayerName = _chunkUYXL6ZWQcjs.annotationLayerName; exports.annotationOfLayer = _chunkUYXL6ZWQcjs.annotationOfLayer; exports.annotationOfShape = _chunkUYXL6ZWQcjs.annotationOfShape; exports.annotationOfType = _chunkUYXL6ZWQcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUYXL6ZWQcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUYXL6ZWQcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUYXL6ZWQcjs.applyAdjustments; exports.applyBoxBlur = _chunkUYXL6ZWQcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUYXL6ZWQcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUYXL6ZWQcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUYXL6ZWQcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUYXL6ZWQcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUYXL6ZWQcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUYXL6ZWQcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUYXL6ZWQcjs.applyParams; exports.applyProcess2Adjustments = _chunkUYXL6ZWQcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUYXL6ZWQcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUYXL6ZWQcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUYXL6ZWQcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUYXL6ZWQcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkUYXL6ZWQcjs.blurFilter; exports.borderCoverage = _chunkUYXL6ZWQcjs.borderCoverage; exports.boxBlur = boxBlur; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUYXL6ZWQcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUYXL6ZWQcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkUYXL6ZWQcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUYXL6ZWQcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUYXL6ZWQcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUYXL6ZWQcjs.canvasToImagePoint; exports.caretAt = _chunkBRKVNXDZcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUYXL6ZWQcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUYXL6ZWQcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkUYXL6ZWQcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUYXL6ZWQcjs.compileAdjustmentLayer; exports.componentPath = _chunkUYXL6ZWQcjs.componentPath; exports.componentsCoverage = _chunkUYXL6ZWQcjs.componentsCoverage; exports.compositeDeep = _chunkUYXL6ZWQcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUYXL6ZWQcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUYXL6ZWQcjs.contentsBox; exports.contentsSurface = _chunkUYXL6ZWQcjs.contentsSurface; exports.contractCoverage = _chunkUYXL6ZWQcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUYXL6ZWQcjs.convertToSmartObject; exports.copySmartObject = _chunkUYXL6ZWQcjs.copySmartObject; exports.cornersFromMatrix = _chunkUYXL6ZWQcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUYXL6ZWQcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUYXL6ZWQcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkBRKVNXDZcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkBRKVNXDZcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkBRKVNXDZcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUYXL6ZWQcjs.createSelectionMask; exports.createShapeLayer = _chunkUYXL6ZWQcjs.createShapeLayer; exports.createTypeLayer = _chunkUYXL6ZWQcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkBRKVNXDZcjs.cssFont; exports.cssFontFamily = _chunkBRKVNXDZcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUYXL6ZWQcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUYXL6ZWQcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUYXL6ZWQcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUYXL6ZWQcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUYXL6ZWQcjs.decodeMergedImage; exports.decodePlanes = _chunkUYXL6ZWQcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUYXL6ZWQcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUYXL6ZWQcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUYXL6ZWQcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUYXL6ZWQcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUYXL6ZWQcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUYXL6ZWQcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUYXL6ZWQcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUYXL6ZWQcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUYXL6ZWQcjs.deserializeEffects; exports.deserializeLayer = _chunkUYXL6ZWQcjs.deserializeLayer; exports.deserializeLayers = _chunkUYXL6ZWQcjs.deserializeLayers; exports.deserializePatterns = _chunkUYXL6ZWQcjs.deserializePatterns; exports.deserializeSelection = _chunkUYXL6ZWQcjs.deserializeSelection; exports.developFilter = _chunkUYXL6ZWQcjs.developFilter; exports.developFromAdjustments = _chunkUYXL6ZWQcjs.developFromAdjustments; exports.developTarget = _chunkUYXL6ZWQcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUYXL6ZWQcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUYXL6ZWQcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkBRKVNXDZcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUYXL6ZWQcjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveLayerMask = _chunkUYXL6ZWQcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkUYXL6ZWQcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUYXL6ZWQcjs.encodeRle; exports.encodeSelectionRle = _chunkUYXL6ZWQcjs.encodeSelectionRle; exports.encodeSurface = _chunkUYXL6ZWQcjs.encodeSurface; exports.evalWarpMesh = _chunkBRKVNXDZcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUYXL6ZWQcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUYXL6ZWQcjs.expandCoverage; exports.exportPsd = _chunkUYXL6ZWQcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUYXL6ZWQcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUYXL6ZWQcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = findSky; exports.findSubject = findSubject; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkBRKVNXDZcjs.fitParagraphRuns; exports.fitRuns = _chunkBRKVNXDZcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUYXL6ZWQcjs.flattenPath; exports.flipCorners = _chunkUYXL6ZWQcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.focusArea = focusArea; exports.followLayerMove = _chunkUYXL6ZWQcjs.followLayerMove; exports.fontOf = _chunkBRKVNXDZcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUYXL6ZWQcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUYXL6ZWQcjs.geometryHomography; exports.getAnnotationBounds = _chunkUYXL6ZWQcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUYXL6ZWQcjs.getCropCursor; exports.getRotatedSize = _chunkUYXL6ZWQcjs.getRotatedSize; exports.getViewportMetrics = _chunkUYXL6ZWQcjs.getViewportMetrics; exports.getViewportProjection = _chunkUYXL6ZWQcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = grabCutLabels; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUYXL6ZWQcjs.greyMorphology; exports.groupLayers = _chunkUYXL6ZWQcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUYXL6ZWQcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUYXL6ZWQcjs.hasSurface; exports.hasWarp = _chunkUYXL6ZWQcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUYXL6ZWQcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUYXL6ZWQcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUYXL6ZWQcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUYXL6ZWQcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUYXL6ZWQcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUYXL6ZWQcjs.hueRangeTables; exports.hueRangeWeight = _chunkUYXL6ZWQcjs.hueRangeWeight; exports.hueSaturation = _chunkUYXL6ZWQcjs.hueSaturation; exports.identityCurve = _chunkUYXL6ZWQcjs.identityCurve; exports.identityLevels = _chunkUYXL6ZWQcjs.identityLevels; exports.identityTransform = _chunkUYXL6ZWQcjs.identityTransform; exports.identityWarpMesh = _chunkBRKVNXDZcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUYXL6ZWQcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkUYXL6ZWQcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUYXL6ZWQcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUYXL6ZWQcjs.invertMatrix3; exports.invertSelection = _chunkUYXL6ZWQcjs.invertSelection; exports.isActiveFilter = _chunkUYXL6ZWQcjs.isActiveFilter; exports.isActiveVectorMask = _chunkUYXL6ZWQcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkUYXL6ZWQcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkUYXL6ZWQcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUYXL6ZWQcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUYXL6ZWQcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUYXL6ZWQcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUYXL6ZWQcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUYXL6ZWQcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUYXL6ZWQcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUYXL6ZWQcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUYXL6ZWQcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUYXL6ZWQcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUYXL6ZWQcjs.isTransformAnchor; exports.isValidWarp = _chunkUYXL6ZWQcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.keepMainPieces = keepMainPieces; exports.kelvinToTemperature = _chunkUYXL6ZWQcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkUYXL6ZWQcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUYXL6ZWQcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUYXL6ZWQcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUYXL6ZWQcjs.layerMaskKey; exports.layerMaskSelection = _chunkUYXL6ZWQcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkUYXL6ZWQcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkUYXL6ZWQcjs.layerTree; exports.layerTypeLabel = _chunkUYXL6ZWQcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUYXL6ZWQcjs.layersFromLegacy; exports.layoutText = _chunkBRKVNXDZcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUYXL6ZWQcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUYXL6ZWQcjs.legacyMaskOf; exports.legacyView = _chunkUYXL6ZWQcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUYXL6ZWQcjs.levelsValue; exports.linearSrgbToXy = _chunkUYXL6ZWQcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUYXL6ZWQcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUYXL6ZWQcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUYXL6ZWQcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk3T5VCDIVcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkUYXL6ZWQcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUYXL6ZWQcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkUYXL6ZWQcjs.matrixFromCorners; exports.matrixFromParams = _chunkUYXL6ZWQcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUYXL6ZWQcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkUYXL6ZWQcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUYXL6ZWQcjs.moveLayer; exports.moveSmartFilter = _chunkUYXL6ZWQcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUYXL6ZWQcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUYXL6ZWQcjs.neutralHueRange; exports.newContentsId = _chunkUYXL6ZWQcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUYXL6ZWQcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUYXL6ZWQcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUYXL6ZWQcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUYXL6ZWQcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUYXL6ZWQcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUYXL6ZWQcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUYXL6ZWQcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUYXL6ZWQcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUYXL6ZWQcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUYXL6ZWQcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUYXL6ZWQcjs.normalizeSubpaths; exports.normalizeText = _chunkUYXL6ZWQcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUYXL6ZWQcjs.offsetLayer; exports.offsetShape = _chunkUYXL6ZWQcjs.offsetShape; exports.offsetSmartObject = _chunkUYXL6ZWQcjs.offsetSmartObject; exports.offsetVectorMask = _chunkUYXL6ZWQcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = otsuThreshold; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkBRKVNXDZcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUYXL6ZWQcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUYXL6ZWQcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUYXL6ZWQcjs.parseLfx2; exports.parseLrfx = _chunkUYXL6ZWQcjs.parseLrfx; exports.parseOpenTypeFont = _chunk3T5VCDIVcjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUYXL6ZWQcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUYXL6ZWQcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUYXL6ZWQcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUYXL6ZWQcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUYXL6ZWQcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUYXL6ZWQcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUYXL6ZWQcjs.pixelLayerBounds; exports.pixelLayers = _chunkUYXL6ZWQcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUYXL6ZWQcjs.placeContents; exports.placeLayer = _chunkUYXL6ZWQcjs.placeLayer; exports.placementAt = _chunkUYXL6ZWQcjs.placementAt; exports.placementBounds = _chunkUYXL6ZWQcjs.placementBounds; exports.placementGeometry = _chunkUYXL6ZWQcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonCoverageBox = polygonCoverageBox; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUYXL6ZWQcjs.posterizeValue; exports.presetWarp = _chunkUYXL6ZWQcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUYXL6ZWQcjs.projectImagePoint; exports.projectImageRect = _chunkUYXL6ZWQcjs.projectImageRect; exports.projectMaskCoverage = _chunkUYXL6ZWQcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUYXL6ZWQcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUYXL6ZWQcjs.psdToLayers; exports.pullWarpMesh = _chunkBRKVNXDZcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = quickSelectStroke; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUYXL6ZWQcjs.rangeLightness; exports.rasterContents = _chunkUYXL6ZWQcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUYXL6ZWQcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUYXL6ZWQcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUYXL6ZWQcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUYXL6ZWQcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUYXL6ZWQcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUYXL6ZWQcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUYXL6ZWQcjs.removeLayer; exports.removeLayerEffect = _chunkUYXL6ZWQcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUYXL6ZWQcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUYXL6ZWQcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUYXL6ZWQcjs.renderShape; exports.renderShapeRect = _chunkUYXL6ZWQcjs.renderShapeRect; exports.renderSmartObject = _chunkUYXL6ZWQcjs.renderSmartObject; exports.renderText = _chunkUYXL6ZWQcjs.renderText; exports.replaceContents = _chunkUYXL6ZWQcjs.replaceContents; exports.replaceTextRange = _chunkUYXL6ZWQcjs.replaceTextRange; exports.requireLayer = _chunkUYXL6ZWQcjs.requireLayer; exports.requireOperation = _chunkUYXL6ZWQcjs.requireOperation; exports.requireShapeLayer = _chunkUYXL6ZWQcjs.requireShapeLayer; exports.requireSmartObject = _chunkUYXL6ZWQcjs.requireSmartObject; exports.requireTypeLayer = _chunkUYXL6ZWQcjs.requireTypeLayer; exports.requireUnlocked = _chunkUYXL6ZWQcjs.requireUnlocked; exports.rerender = _chunkUYXL6ZWQcjs.rerender; exports.rerenderShape = _chunkUYXL6ZWQcjs.rerenderShape; exports.rerenderText = _chunkUYXL6ZWQcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUYXL6ZWQcjs.resizeSelection; exports.resizeWarpMesh = _chunkBRKVNXDZcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUYXL6ZWQcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkUYXL6ZWQcjs.resolveVectorMasks; exports.restyleRange = _chunkBRKVNXDZcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUYXL6ZWQcjs.rgbToGray; exports.rgbToHsl = _chunkUYXL6ZWQcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUYXL6ZWQcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUYXL6ZWQcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUYXL6ZWQcjs.sampleLut; exports.sampleToneLut = _chunkUYXL6ZWQcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkUYXL6ZWQcjs.selectionArea; exports.selectionFromCoverage = _chunkUYXL6ZWQcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUYXL6ZWQcjs.selectionFromPixels; exports.selectionFromRegion = _chunkUYXL6ZWQcjs.selectionFromRegion; exports.selectionFromTiles = _chunkUYXL6ZWQcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkUYXL6ZWQcjs.selectionToCoverage; exports.selectionToPixels = _chunkUYXL6ZWQcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionValueAt = _chunkUYXL6ZWQcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUYXL6ZWQcjs.serializeContents; exports.serializeEffects = _chunkUYXL6ZWQcjs.serializeEffects; exports.serializeLayer = _chunkUYXL6ZWQcjs.serializeLayer; exports.serializeLayers = _chunkUYXL6ZWQcjs.serializeLayers; exports.serializeLayersExternal = _chunkUYXL6ZWQcjs.serializeLayersExternal; exports.serializePatterns = _chunkUYXL6ZWQcjs.serializePatterns; exports.serializeSelection = _chunkUYXL6ZWQcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUYXL6ZWQcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUYXL6ZWQcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUYXL6ZWQcjs.setLayerMask; exports.setLayerProperties = _chunkUYXL6ZWQcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUYXL6ZWQcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUYXL6ZWQcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUYXL6ZWQcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUYXL6ZWQcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUYXL6ZWQcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUYXL6ZWQcjs.shapeLayers; exports.shapeOutline = _chunkUYXL6ZWQcjs.shapeOutline; exports.shapeRenderClip = _chunkUYXL6ZWQcjs.shapeRenderClip; exports.shiftCoverage = _chunkUYXL6ZWQcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smoothnessWeights = smoothnessWeights; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = softMaskToSelection; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkBRKVNXDZcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkUYXL6ZWQcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkBRKVNXDZcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = superpixelSaliency; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUYXL6ZWQcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUYXL6ZWQcjs.temperatureToKelvin; exports.textIndexAt = _chunkBRKVNXDZcjs.textIndexAt; exports.textMatrix = _chunkUYXL6ZWQcjs.textMatrix; exports.textOrientation = _chunkUYXL6ZWQcjs.textOrientation; exports.textOutlines = _chunkUYXL6ZWQcjs.textOutlines; exports.textRange = _chunkUYXL6ZWQcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkUYXL6ZWQcjs.toTextSpace; exports.toneCurve = _chunkUYXL6ZWQcjs.toneCurve; exports.toneLuts = _chunkUYXL6ZWQcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUYXL6ZWQcjs.transformHomography; exports.transformMap = _chunkUYXL6ZWQcjs.transformMap; exports.transformShapeComponents = _chunkUYXL6ZWQcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUYXL6ZWQcjs.transformTypeLayer; exports.transformVectorMask = _chunkUYXL6ZWQcjs.transformVectorMask; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUYXL6ZWQcjs.transformedBox; exports.transformedPoint = _chunkUYXL6ZWQcjs.transformedPoint; exports.translateLayer = _chunkUYXL6ZWQcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUYXL6ZWQcjs.typeAsPixelLayer; exports.typeFrame = _chunkUYXL6ZWQcjs.typeFrame; exports.typeFromAnnotation = _chunkUYXL6ZWQcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUYXL6ZWQcjs.typeLayerName; exports.ungroupLayer = _chunkUYXL6ZWQcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUYXL6ZWQcjs.unionRect; exports.unprojectCanvasPoint = _chunkUYXL6ZWQcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUYXL6ZWQcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUYXL6ZWQcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUYXL6ZWQcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUYXL6ZWQcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUYXL6ZWQcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUYXL6ZWQcjs.updateTypeLayer; exports.upscaleRegion = upscaleRegion; exports.userErrorMessage = _chunkUYXL6ZWQcjs.userErrorMessage; exports.uvToXy = _chunkUYXL6ZWQcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkUYXL6ZWQcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkUYXL6ZWQcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkUYXL6ZWQcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkUYXL6ZWQcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUYXL6ZWQcjs.vibranceLinear; exports.vibrancePixel = _chunkUYXL6ZWQcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkBRKVNXDZcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkBRKVNXDZcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkBRKVNXDZcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkBRKVNXDZcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUYXL6ZWQcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUYXL6ZWQcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUYXL6ZWQcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUYXL6ZWQcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUYXL6ZWQcjs.withNewIds; exports.workImage = workImage; exports.workLuma = workLuma; exports.workPlanes = workPlanes; exports.writeAdjustmentBlock = _chunkUYXL6ZWQcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUYXL6ZWQcjs.writeLfx2; exports.writePatternBlock = _chunkUYXL6ZWQcjs.writePatternBlock; exports.writePsd = _chunkUYXL6ZWQcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUYXL6ZWQcjs.xyToTempTint; exports.xyToUv = _chunkUYXL6ZWQcjs.xyToUv;