@pixerate/editor 0.196.0 → 0.197.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.
@@ -2803,6 +2803,589 @@ function magneticAnchorSpacing(frequency = 57) {
2803
2803
  return 8 + (100 - f);
2804
2804
  }
2805
2805
 
2806
+ // src/image-editor/selection/segment/maxflow.ts
2807
+ var TERMINAL = -2;
2808
+ var NONE = -1;
2809
+ var FREE = 0;
2810
+ var SOURCE = 1;
2811
+ var SINK = 2;
2812
+ var GridGraph = class {
2813
+
2814
+
2815
+ /** Residual capacity of the edge leaving node `p` in direction `d`, at `p * 4 + d`. */
2816
+
2817
+ /** Net terminal capacity: above 0 to the source, below 0 to the sink. */
2818
+
2819
+
2820
+ constructor(width, height) {
2821
+ this.width = width;
2822
+ this.height = height;
2823
+ const n = width * height;
2824
+ this.cap = new Float64Array(n * 4);
2825
+ this.tr = new Float64Array(n);
2826
+ this.tree = new Uint8Array(n);
2827
+ }
2828
+ /** Sets the capacity of the edge between `p` and its neighbour in direction `d`, both ways. */
2829
+ setEdge(p, d, capacity) {
2830
+ const q = d === 0 ? p + 1 : p + this.width;
2831
+ this.cap[p * 4 + d] = capacity;
2832
+ this.cap[q * 4 + (d ^ 2)] = capacity;
2833
+ }
2834
+ /** Adds `source` (cost of putting `p` on the sink side) and `sink` (the other way) to `p`. */
2835
+ addTerminal(p, source, sink) {
2836
+ this.tr[p] += source - sink;
2837
+ }
2838
+ /** Whether `p` is on the source side of the minimum cut (after {@link maxflow}). */
2839
+ inSource(p) {
2840
+ return this.tree[p] === SOURCE;
2841
+ }
2842
+ /** Runs max-flow and returns the flow (the cut's cost, less the constant terminal parts). */
2843
+ maxflow() {
2844
+ const { width: w, height: h, cap, tr, tree } = this;
2845
+ const n = w * h;
2846
+ const nb = (p, d) => {
2847
+ const x = p % w;
2848
+ if (d === 0) return x < w - 1 ? p + 1 : -1;
2849
+ if (d === 1) return p + w < n ? p + w : -1;
2850
+ if (d === 2) return x > 0 ? p - 1 : -1;
2851
+ return p - w >= 0 ? p - w : -1;
2852
+ };
2853
+ const parent = new Int8Array(n).fill(NONE);
2854
+ const ts = new Int32Array(n);
2855
+ const dist = new Int32Array(n);
2856
+ const queue = new Int32Array(n + 1);
2857
+ const queued = new Uint8Array(n);
2858
+ let qHead = 0;
2859
+ let qTail = 0;
2860
+ const activate = (p) => {
2861
+ if (queued[p]) return;
2862
+ queued[p] = 1;
2863
+ queue[qTail] = p;
2864
+ qTail = qTail === n ? 0 : qTail + 1;
2865
+ };
2866
+ const nextActive = () => {
2867
+ while (qHead !== qTail) {
2868
+ const p = queue[qHead];
2869
+ qHead = qHead === n ? 0 : qHead + 1;
2870
+ queued[p] = 0;
2871
+ if (tree[p] !== FREE) return p;
2872
+ }
2873
+ return -1;
2874
+ };
2875
+ let orphans = new Int32Array(64);
2876
+ let orphanCount = 0;
2877
+ const orphan = (p) => {
2878
+ parent[p] = NONE;
2879
+ if (orphanCount === orphans.length) {
2880
+ const grown = new Int32Array(orphans.length * 2);
2881
+ grown.set(orphans);
2882
+ orphans = grown;
2883
+ }
2884
+ orphans[orphanCount++] = p;
2885
+ };
2886
+ tree.fill(FREE);
2887
+ for (let p = 0; p < n; p++) {
2888
+ if (tr[p] > 0) tree[p] = SOURCE;
2889
+ else if (tr[p] < 0) tree[p] = SINK;
2890
+ else continue;
2891
+ parent[p] = TERMINAL;
2892
+ dist[p] = 1;
2893
+ activate(p);
2894
+ }
2895
+ let flow = 0;
2896
+ let time = 0;
2897
+ let current = -1;
2898
+ for (; ; ) {
2899
+ if (current < 0 || tree[current] === FREE) {
2900
+ current = nextActive();
2901
+ if (current < 0) break;
2902
+ }
2903
+ const p = current;
2904
+ const side = tree[p];
2905
+ let s = -1;
2906
+ let t = -1;
2907
+ let dir = 0;
2908
+ for (let d = 0; d < 4; d++) {
2909
+ const q = nb(p, d);
2910
+ if (q < 0) continue;
2911
+ if (side === SOURCE ? cap[p * 4 + d] <= 0 : cap[q * 4 + (d ^ 2)] <= 0) continue;
2912
+ if (tree[q] === FREE) {
2913
+ tree[q] = side;
2914
+ parent[q] = d ^ 2;
2915
+ ts[q] = ts[p];
2916
+ dist[q] = dist[p] + 1;
2917
+ activate(q);
2918
+ } else if (tree[q] !== side) {
2919
+ if (side === SOURCE) {
2920
+ s = p;
2921
+ t = q;
2922
+ dir = d;
2923
+ } else {
2924
+ s = q;
2925
+ t = p;
2926
+ dir = d ^ 2;
2927
+ }
2928
+ break;
2929
+ } else if (ts[q] <= ts[p] && dist[q] > dist[p]) {
2930
+ parent[q] = d ^ 2;
2931
+ ts[q] = ts[p];
2932
+ dist[q] = dist[p] + 1;
2933
+ }
2934
+ }
2935
+ if (s < 0) {
2936
+ current = -1;
2937
+ continue;
2938
+ }
2939
+ time++;
2940
+ let f = cap[s * 4 + dir];
2941
+ for (let x = s; ; ) {
2942
+ const a = parent[x];
2943
+ if (a === TERMINAL) {
2944
+ f = Math.min(f, tr[x]);
2945
+ break;
2946
+ }
2947
+ const up = nb(x, a);
2948
+ f = Math.min(f, cap[up * 4 + (a ^ 2)]);
2949
+ x = up;
2950
+ }
2951
+ for (let x = t; ; ) {
2952
+ const a = parent[x];
2953
+ if (a === TERMINAL) {
2954
+ f = Math.min(f, -tr[x]);
2955
+ break;
2956
+ }
2957
+ f = Math.min(f, cap[x * 4 + a]);
2958
+ x = nb(x, a);
2959
+ }
2960
+ cap[s * 4 + dir] -= f;
2961
+ cap[t * 4 + (dir ^ 2)] += f;
2962
+ for (let x = s; ; ) {
2963
+ const a = parent[x];
2964
+ if (a === TERMINAL) {
2965
+ tr[x] -= f;
2966
+ if (tr[x] <= 0) orphan(x);
2967
+ break;
2968
+ }
2969
+ const up = nb(x, a);
2970
+ cap[up * 4 + (a ^ 2)] -= f;
2971
+ cap[x * 4 + a] += f;
2972
+ if (cap[up * 4 + (a ^ 2)] <= 0) orphan(x);
2973
+ x = up;
2974
+ }
2975
+ for (let x = t; ; ) {
2976
+ const a = parent[x];
2977
+ if (a === TERMINAL) {
2978
+ tr[x] += f;
2979
+ if (tr[x] >= 0) orphan(x);
2980
+ break;
2981
+ }
2982
+ const up = nb(x, a);
2983
+ cap[x * 4 + a] -= f;
2984
+ cap[up * 4 + (a ^ 2)] += f;
2985
+ if (cap[x * 4 + a] <= 0) orphan(x);
2986
+ x = up;
2987
+ }
2988
+ flow += f;
2989
+ while (orphanCount) {
2990
+ const o = orphans[--orphanCount];
2991
+ const oSide = tree[o];
2992
+ let best = NONE;
2993
+ let bestDist = Infinity;
2994
+ for (let d = 0; d < 4; d++) {
2995
+ const q = nb(o, d);
2996
+ if (q < 0 || tree[q] !== oSide) continue;
2997
+ if (oSide === SOURCE ? cap[q * 4 + (d ^ 2)] <= 0 : cap[o * 4 + d] <= 0) continue;
2998
+ let k = 0;
2999
+ let x = q;
3000
+ for (; ; ) {
3001
+ if (ts[x] === time) {
3002
+ k += dist[x];
3003
+ break;
3004
+ }
3005
+ const a = parent[x];
3006
+ k++;
3007
+ if (a === TERMINAL) {
3008
+ ts[x] = time;
3009
+ dist[x] = 1;
3010
+ break;
3011
+ }
3012
+ if (a === NONE) {
3013
+ k = Infinity;
3014
+ break;
3015
+ }
3016
+ x = nb(x, a);
3017
+ }
3018
+ if (k === Infinity) continue;
3019
+ if (k < bestDist) {
3020
+ bestDist = k;
3021
+ best = d;
3022
+ }
3023
+ for (let y = q, dd = k; ts[y] !== time; y = nb(y, parent[y]), dd--) {
3024
+ ts[y] = time;
3025
+ dist[y] = dd;
3026
+ }
3027
+ }
3028
+ if (best !== NONE) {
3029
+ parent[o] = best;
3030
+ ts[o] = time;
3031
+ dist[o] = bestDist + 1;
3032
+ continue;
3033
+ }
3034
+ for (let d = 0; d < 4; d++) {
3035
+ const q = nb(o, d);
3036
+ if (q < 0 || tree[q] !== oSide) continue;
3037
+ if (oSide === SOURCE ? cap[q * 4 + (d ^ 2)] > 0 : cap[o * 4 + d] > 0) activate(q);
3038
+ const a = parent[q];
3039
+ if (a !== TERMINAL && a !== NONE && nb(q, a) === o) orphan(q);
3040
+ }
3041
+ tree[o] = FREE;
3042
+ }
3043
+ }
3044
+ return flow;
3045
+ }
3046
+ };
3047
+
3048
+ // src/image-editor/selection/segment/quick.ts
3049
+ var WORK_SIZE = 512;
3050
+ var workCache = /* @__PURE__ */ new WeakMap();
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;
3054
+ const { width: W, height: H, data } = pixels;
3055
+ const scale = Math.min(1, maxSide / Math.max(W, H));
3056
+ const w = Math.max(1, Math.round(W * scale));
3057
+ const h = Math.max(1, Math.round(H * scale));
3058
+ const sum = new Float64Array(w * h * 3);
3059
+ const count = new Float64Array(w * h);
3060
+ const xs = new Int32Array(W);
3061
+ for (let x = 0; x < W; x++) xs[x] = Math.min(w - 1, Math.floor(x * w / W));
3062
+ for (let y = 0; y < H; y++) {
3063
+ const row = Math.min(h - 1, Math.floor(y * h / H)) * w;
3064
+ for (let x = 0, p = y * W * 4; x < W; x++, p += 4) {
3065
+ const o = row + xs[x];
3066
+ const a = data[p + 3] / 255;
3067
+ const k = o * 3;
3068
+ sum[k] += data[p] * a + 255 * (1 - a);
3069
+ sum[k + 1] += data[p + 1] * a + 255 * (1 - a);
3070
+ sum[k + 2] += data[p + 2] * a + 255 * (1 - a);
3071
+ count[o]++;
3072
+ }
3073
+ }
3074
+ const rgb = new Float32Array(w * h * 3);
3075
+ for (let i = 0; i < w * h; i++) {
3076
+ const c = count[i] || 1;
3077
+ rgb[i * 3] = sum[i * 3] / c;
3078
+ rgb[i * 3 + 1] = sum[i * 3 + 1] / c;
3079
+ rgb[i * 3 + 2] = sum[i * 3 + 2] / c;
3080
+ }
3081
+ const work = { sourceWidth: W, sourceHeight: H, width: w, height: h, scale: w / W, rgb };
3082
+ workCache.set(pixels.data, { maxSide, work });
3083
+ return work;
3084
+ }
3085
+ var BINS = 16;
3086
+ var binOf = (rgb, i) => (Math.min(BINS - 1, rgb[i * 3] >> 4) * BINS + Math.min(BINS - 1, rgb[i * 3 + 1] >> 4)) * BINS + Math.min(BINS - 1, rgb[i * 3 + 2] >> 4);
3087
+ function costTable(hist, total) {
3088
+ let a = hist;
3089
+ for (const stride of [1, BINS, BINS * BINS]) {
3090
+ const b = new Float64Array(a.length);
3091
+ for (let i = 0; i < a.length; i++) {
3092
+ const pos = Math.floor(i / stride) % BINS;
3093
+ const lo = pos > 0 ? a[i - stride] : a[i];
3094
+ const hi = pos < BINS - 1 ? a[i + stride] : a[i];
3095
+ b[i] = (lo + 2 * a[i] + hi) / 4;
3096
+ }
3097
+ a = b;
3098
+ }
3099
+ const out = new Float64Array(a.length);
3100
+ const floor = 1e-4;
3101
+ const denom = Math.max(1, total) * (1 + floor * a.length);
3102
+ for (let i = 0; i < a.length; i++) out[i] = -Math.log((a[i] + floor * Math.max(1, total)) / denom);
3103
+ return out;
3104
+ }
3105
+ var GAMMA = 50;
3106
+ var UNITS = 64;
3107
+ function strokePixels(points, r, w, h) {
3108
+ const mask = new Uint8Array(w * h);
3109
+ const list = [];
3110
+ const add2 = (g) => {
3111
+ if (!mask[g]) {
3112
+ mask[g] = 1;
3113
+ list.push(g);
3114
+ }
3115
+ };
3116
+ const segs = points.length === 1 ? [[points[0], points[0]]] : points.slice(1).map((p, i) => [points[i], p]);
3117
+ for (const [a, b] of segs) {
3118
+ const x0 = Math.max(0, Math.floor(Math.min(a.x, b.x) - r));
3119
+ const x1 = Math.min(w - 1, Math.ceil(Math.max(a.x, b.x) + r));
3120
+ const y0 = Math.max(0, Math.floor(Math.min(a.y, b.y) - r));
3121
+ const y1 = Math.min(h - 1, Math.ceil(Math.max(a.y, b.y) + r));
3122
+ const dx = b.x - a.x;
3123
+ const dy = b.y - a.y;
3124
+ const len2 = dx * dx + dy * dy;
3125
+ for (let y = y0; y <= y1; y++) {
3126
+ for (let x = x0; x <= x1; x++) {
3127
+ const px2 = x + 0.5 - a.x;
3128
+ const py = y + 0.5 - a.y;
3129
+ const t = len2 > 0 ? Math.min(1, Math.max(0, (px2 * dx + py * dy) / len2)) : 0;
3130
+ if ((px2 - t * dx) ** 2 + (py - t * dy) ** 2 <= r * r) add2(y * w + x);
3131
+ }
3132
+ }
3133
+ }
3134
+ if (!list.length) {
3135
+ for (const p of points) add2(Math.min(h - 1, Math.max(0, Math.floor(p.y))) * w + Math.min(w - 1, Math.max(0, Math.floor(p.x))));
3136
+ }
3137
+ return { mask, list };
3138
+ }
3139
+ function segmentStroke(work, stroke, grown, start) {
3140
+ const { width: w, height: h, rgb } = work;
3141
+ let roi = start;
3142
+ for (; ; ) {
3143
+ const { x: rx, y: ry, width: rw, height: rh } = roi;
3144
+ const n = rw * rh;
3145
+ const fgHist = new Float64Array(BINS ** 3);
3146
+ const bgHist = new Float64Array(BINS ** 3);
3147
+ let fgN = 0;
3148
+ let bgN = 0;
3149
+ const atImageEdge = { l: rx === 0, t: ry === 0, r: rx + rw === w, b: ry + rh === h };
3150
+ for (let y = 0; y < rh; y++) {
3151
+ for (let x = 0; x < rw; x++) {
3152
+ const g = (ry + y) * w + (rx + x);
3153
+ const bin = binOf(rgb, g);
3154
+ bgHist[bin]++;
3155
+ bgN++;
3156
+ if (stroke.mask[g] || _optionalChain([grown, 'optionalAccess', _64 => _64[g]])) {
3157
+ fgHist[bin]++;
3158
+ fgN++;
3159
+ }
3160
+ }
3161
+ }
3162
+ const fgCost = costTable(fgHist, fgN);
3163
+ const bgCost = costTable(bgHist, bgN);
3164
+ let sumSq = 0;
3165
+ let pairs = 0;
3166
+ for (let y = 0; y < rh; y++) {
3167
+ for (let x = 0; x < rw; x++) {
3168
+ const g = ((ry + y) * w + rx + x) * 3;
3169
+ if (x + 1 < rw) {
3170
+ sumSq += (rgb[g] - rgb[g + 3]) ** 2 + (rgb[g + 1] - rgb[g + 4]) ** 2 + (rgb[g + 2] - rgb[g + 5]) ** 2;
3171
+ pairs++;
3172
+ }
3173
+ if (y + 1 < rh) {
3174
+ const k = g + w * 3;
3175
+ sumSq += (rgb[g] - rgb[k]) ** 2 + (rgb[g + 1] - rgb[k + 1]) ** 2 + (rgb[g + 2] - rgb[k + 2]) ** 2;
3176
+ pairs++;
3177
+ }
3178
+ }
3179
+ }
3180
+ const beta = 1 / (2 * Math.max(1e-6, sumSq / Math.max(1, pairs)));
3181
+ const graph = new GridGraph(rw, rh);
3182
+ const HARD = 1e9;
3183
+ for (let y = 0; y < rh; y++) {
3184
+ for (let x = 0; x < rw; x++) {
3185
+ const p = y * rw + x;
3186
+ const g = (ry + y) * w + rx + x;
3187
+ if (stroke.mask[g]) graph.addTerminal(p, HARD, 0);
3188
+ else {
3189
+ const bin = binOf(rgb, g);
3190
+ graph.addTerminal(p, Math.round(bgCost[bin] * UNITS), Math.round(fgCost[bin] * UNITS));
3191
+ }
3192
+ const c = g * 3;
3193
+ if (x + 1 < rw) {
3194
+ const d = (rgb[c] - rgb[c + 3]) ** 2 + (rgb[c + 1] - rgb[c + 4]) ** 2 + (rgb[c + 2] - rgb[c + 5]) ** 2;
3195
+ graph.setEdge(p, 0, Math.round(GAMMA * UNITS * Math.exp(-beta * d)));
3196
+ }
3197
+ if (y + 1 < rh) {
3198
+ const k = c + w * 3;
3199
+ const d = (rgb[c] - rgb[k]) ** 2 + (rgb[c + 1] - rgb[k + 1]) ** 2 + (rgb[c + 2] - rgb[k + 2]) ** 2;
3200
+ graph.setEdge(p, 1, Math.round(GAMMA * UNITS * Math.exp(-beta * d)));
3201
+ }
3202
+ }
3203
+ }
3204
+ graph.maxflow();
3205
+ const label = new Uint8Array(n);
3206
+ const stack = [];
3207
+ for (const g of stroke.list) {
3208
+ const x = g % w - rx;
3209
+ const y = Math.floor(g / w) - ry;
3210
+ if (x < 0 || y < 0 || x >= rw || y >= rh) continue;
3211
+ const p = y * rw + x;
3212
+ if (!label[p]) {
3213
+ label[p] = 1;
3214
+ stack.push(p);
3215
+ }
3216
+ }
3217
+ while (stack.length) {
3218
+ const p = stack.pop();
3219
+ const x = p % rw;
3220
+ for (const q of [x + 1 < rw ? p + 1 : -1, x > 0 ? p - 1 : -1, p + rw < n ? p + rw : -1, p - rw]) {
3221
+ if (q >= 0 && !label[q] && graph.inSource(q)) {
3222
+ label[q] = 1;
3223
+ stack.push(q);
3224
+ }
3225
+ }
3226
+ }
3227
+ let touches = false;
3228
+ for (let y = 0; y < rh; y++) {
3229
+ for (let x = 0; x < rw; x++) {
3230
+ const p = y * rw + x;
3231
+ if (!label[p]) continue;
3232
+ if (!atImageEdge.l && x === 0 || !atImageEdge.t && y === 0 || !atImageEdge.r && x === rw - 1 || !atImageEdge.b && y === rh - 1) touches = true;
3233
+ }
3234
+ }
3235
+ if (!touches || atImageEdge.l && atImageEdge.t && atImageEdge.r && atImageEdge.b) return { roi, label };
3236
+ const nx = Math.max(0, rx - Math.ceil(rw / 2));
3237
+ const ny = Math.max(0, ry - Math.ceil(rh / 2));
3238
+ roi = { x: nx, y: ny, width: Math.min(w, rx + rw + Math.ceil(rw / 2)) - nx, height: Math.min(h, ry + rh + Math.ceil(rh / 2)) - ny };
3239
+ if (roi.width * roi.height * 2.5 > w * h) roi = { x: 0, y: 0, width: w, height: h };
3240
+ }
3241
+ }
3242
+ function boxBlur(src, w, h, passes) {
3243
+ let a = src;
3244
+ for (let k = 0; k < passes; k++) {
3245
+ const b = new Float32Array(a.length);
3246
+ for (let y = 0; y < h; y++) {
3247
+ for (let x = 0; x < w; x++) {
3248
+ let s = 0;
3249
+ let c = 0;
3250
+ for (let j = Math.max(0, y - 1); j <= Math.min(h - 1, y + 1); j++) {
3251
+ for (let i = Math.max(0, x - 1); i <= Math.min(w - 1, x + 1); i++) {
3252
+ s += a[j * w + i];
3253
+ c++;
3254
+ }
3255
+ }
3256
+ b[y * w + x] = s / c;
3257
+ }
3258
+ }
3259
+ a = b;
3260
+ }
3261
+ return a;
3262
+ }
3263
+ function upscaleRegion(work, pixels, roi, label, enhance) {
3264
+ const { sourceWidth: W, sourceHeight: H, scale, rgb, width: ww } = work;
3265
+ const { x: rx, y: ry, width: rw, height: rh } = roi;
3266
+ let soft = Float32Array.from(label);
3267
+ if (enhance) {
3268
+ soft = boxBlur(soft, rw, rh, 2);
3269
+ for (let i = 0; i < soft.length; i++) soft[i] = Math.min(1, Math.max(0, (soft[i] - 0.5) * 3 + 0.5));
3270
+ }
3271
+ const X0 = Math.max(0, Math.floor(rx / scale));
3272
+ const Y0 = Math.max(0, Math.floor(ry / scale));
3273
+ const X1 = Math.min(W, Math.ceil((rx + rw) / scale));
3274
+ const Y1 = Math.min(H, Math.ceil((ry + rh) / scale));
3275
+ const RW = X1 - X0;
3276
+ const RH = Y1 - Y0;
3277
+ const out = new Uint8Array(RW * RH);
3278
+ const at = (x, y) => soft[Math.min(rh - 1, Math.max(0, y)) * rw + Math.min(rw - 1, Math.max(0, x))];
3279
+ const data = pixels.data;
3280
+ const colOf = new Int32Array(RW);
3281
+ const fxOf = new Float32Array(RW);
3282
+ for (let X = 0; X < RW; X++) {
3283
+ const u = (X0 + X + 0.5) * scale - 0.5 - rx;
3284
+ colOf[X] = Math.floor(u);
3285
+ fxOf[X] = u - colOf[X];
3286
+ }
3287
+ const cellState = (i, j) => {
3288
+ const a = at(i, j), b = at(i + 1, j), c = at(i, j + 1), d = at(i + 1, j + 1);
3289
+ if (a === 1 && b === 1 && c === 1 && d === 1) return 1;
3290
+ if (a === 0 && b === 0 && c === 0 && d === 0) return 0;
3291
+ return 2;
3292
+ };
3293
+ for (let Y = 0; Y < RH; Y++) {
3294
+ const v = (Y0 + Y + 0.5) * scale - 0.5 - ry;
3295
+ const j = Math.floor(v);
3296
+ const fy = v - j;
3297
+ for (let X = 0; X < RW; X++) {
3298
+ const i = colOf[X];
3299
+ const state = cellState(i, j);
3300
+ if (state !== 2) {
3301
+ let end = X + 1;
3302
+ while (end < RW && colOf[end] === i) end++;
3303
+ if (state === 1) out.fill(255, Y * RW + X, Y * RW + end);
3304
+ X = end - 1;
3305
+ continue;
3306
+ }
3307
+ const fx = fxOf[X];
3308
+ const m = (at(i, j) * (1 - fx) + at(i + 1, j) * fx) * (1 - fy) + (at(i, j + 1) * (1 - fx) + at(i + 1, j + 1) * fx) * fy;
3309
+ if (m <= 1e-3 || m >= 0.999) {
3310
+ out[Y * RW + X] = m >= 0.999 ? 255 : 0;
3311
+ continue;
3312
+ }
3313
+ let fr = 0, fg = 0, fb = 0, fn = 0, br = 0, bg = 0, bb = 0, bn = 0;
3314
+ for (let jj = j - 1; jj <= j + 2; jj++) {
3315
+ for (let ii = i - 1; ii <= i + 2; ii++) {
3316
+ if (ii < 0 || jj < 0 || ii >= rw || jj >= rh) continue;
3317
+ const k = ((ry + jj) * ww + rx + ii) * 3;
3318
+ if (soft[jj * rw + ii] >= 0.5) {
3319
+ fr += rgb[k];
3320
+ fg += rgb[k + 1];
3321
+ fb += rgb[k + 2];
3322
+ fn++;
3323
+ } else {
3324
+ br += rgb[k];
3325
+ bg += rgb[k + 1];
3326
+ bb += rgb[k + 2];
3327
+ bn++;
3328
+ }
3329
+ }
3330
+ }
3331
+ let alpha = m;
3332
+ if (fn && bn) {
3333
+ fr /= fn;
3334
+ fg /= fn;
3335
+ fb /= fn;
3336
+ br /= bn;
3337
+ bg /= bn;
3338
+ bb /= bn;
3339
+ const dr = fr - br, dg = fg - bg, db = fb - bb;
3340
+ const len2 = dr * dr + dg * dg + db * db;
3341
+ if (len2 > 400) {
3342
+ const p = ((Y0 + Y) * W + X0 + X) * 4;
3343
+ const a = data[p + 3] / 255;
3344
+ const cr = data[p] * a + 255 * (1 - a) - br;
3345
+ const cg = data[p + 1] * a + 255 * (1 - a) - bg;
3346
+ const cb = data[p + 2] * a + 255 * (1 - a) - bb;
3347
+ const proj = Math.min(1, Math.max(0, (cr * dr + cg * dg + cb * db) / len2));
3348
+ alpha = Math.min(1, Math.max(0, proj * 0.75 + m * 0.25));
3349
+ } else alpha = Math.min(1, Math.max(0, (m - 0.5) * 2 + 0.5));
3350
+ }
3351
+ out[Y * RW + X] = Math.round(alpha * 255);
3352
+ }
3353
+ }
3354
+ return _chunkUYXL6ZWQcjs.selectionFromRegion.call(void 0, W, H, { x: X0, y: Y0, width: RW, height: RH }, out);
3355
+ }
3356
+ function quickSelectStroke(pixels, stroke, options = {}) {
3357
+ if (!stroke.length) throw new Error("A stroke needs at least one point.");
3358
+ const work = workImage(pixels);
3359
+ const { width: w, height: h, scale } = work;
3360
+ const r = Math.max(0.5, (_nullishCoalesce(options.size, () => ( 30))) / 2 * scale);
3361
+ const pts = stroke.map((p) => ({ x: p.x * scale, y: p.y * scale }));
3362
+ const seeds = strokePixels(pts, r, w, h);
3363
+ let x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity;
3364
+ for (const p of pts) {
3365
+ x0 = Math.min(x0, p.x);
3366
+ y0 = Math.min(y0, p.y);
3367
+ x1 = Math.max(x1, p.x);
3368
+ y1 = Math.max(y1, p.y);
3369
+ }
3370
+ const margin = Math.max(24, 4 * r);
3371
+ const rx = Math.max(0, Math.floor(x0 - margin));
3372
+ const ry = Math.max(0, Math.floor(y0 - margin));
3373
+ const roi = { x: rx, y: ry, width: Math.min(w, Math.ceil(x1 + margin)) - rx, height: Math.min(h, Math.ceil(y1 + margin)) - ry };
3374
+ let grown = null;
3375
+ const sel = options.grow ? options.selection : null;
3376
+ if (_optionalChain([sel, 'optionalAccess', _65 => _65.bounds])) {
3377
+ grown = new Uint8Array(w * h);
3378
+ const b = sel.bounds;
3379
+ for (let y = Math.max(0, Math.floor(b.y * scale)); y < Math.min(h, Math.ceil((b.y + b.height) * scale)); y++) {
3380
+ for (let x = Math.max(0, Math.floor(b.x * scale)); x < Math.min(w, Math.ceil((b.x + b.width) * scale)); x++) {
3381
+ if (_chunkUYXL6ZWQcjs.selectionValueAt.call(void 0, sel, Math.min(sel.width - 1, Math.floor((x + 0.5) / scale)), Math.min(sel.height - 1, Math.floor((y + 0.5) / scale))) >= 0.5) grown[y * w + x] = 1;
3382
+ }
3383
+ }
3384
+ }
3385
+ const { roi: done, label } = segmentStroke(work, seeds, grown, roi);
3386
+ return upscaleRegion(work, pixels, done, label, _nullishCoalesce(options.enhanceEdge, () => ( false)));
3387
+ }
3388
+
2806
3389
  // src/image-editor/layers/shape-type-ui.ts
2807
3390
  var DEFAULT_SHAPE_TOOL_OPTIONS = {
2808
3391
  kind: "rect",
@@ -2915,11 +3498,11 @@ function applyShapeOptions(controller, layerId, change) {
2915
3498
  const style = {};
2916
3499
  if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
2917
3500
  if ("stroke" in change || "strokeWidth" in change) {
2918
- const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _64 => _64.stroke, 'optionalAccess', _65 => _65.paint, 'access', _66 => _66.type]) === "color" ? info.stroke.paint.color : null;
2919
- style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _67 => _67.stroke, 'optionalAccess', _68 => _68.width]))), () => ( 2)), paint: color } : null;
3501
+ const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _66 => _66.stroke, 'optionalAccess', _67 => _67.paint, 'access', _68 => _68.type]) === "color" ? info.stroke.paint.color : null;
3502
+ style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _69 => _69.stroke, 'optionalAccess', _70 => _70.width]))), () => ( 2)), paint: color } : null;
2920
3503
  }
2921
3504
  if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
2922
- const live = _optionalChain([info, 'access', _69 => _69.components, 'access', _70 => _70[0], 'optionalAccess', _71 => _71.live]);
3505
+ const live = _optionalChain([info, 'access', _71 => _71.components, 'access', _72 => _72[0], 'optionalAccess', _73 => _73.live]);
2923
3506
  if (!live) return;
2924
3507
  const shape = {};
2925
3508
  if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
@@ -2945,7 +3528,7 @@ var TextEditSession = (_class7 = class {
2945
3528
  __init38() {this.listeners = /* @__PURE__ */ new Set()}
2946
3529
  __init39() {this.error = null}
2947
3530
  get layer() {
2948
- const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _72 => _72.layer]);
3531
+ const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _74 => _74.layer]);
2949
3532
  if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
2950
3533
  return l;
2951
3534
  }
@@ -2960,7 +3543,7 @@ var TextEditSession = (_class7 = class {
2960
3543
  }
2961
3544
  /** Whether the layer still exists (it can be deleted or undone away while editing). */
2962
3545
  get alive() {
2963
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _73 => _73.layer, 'access', _74 => _74.type]) === "type";
3546
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _75 => _75.layer, 'access', _76 => _76.type]) === "type";
2964
3547
  }
2965
3548
  subscribe(fn) {
2966
3549
  this.listeners.add(fn);
@@ -3248,7 +3831,7 @@ var TypeToolGesture = (_class8 = class {
3248
3831
  finish() {
3249
3832
  const s = this.session;
3250
3833
  this.session = null;
3251
- _optionalChain([s, 'optionalAccess', _75 => _75.close, 'call', _76 => _76()]);
3834
+ _optionalChain([s, 'optionalAccess', _77 => _77.close, 'call', _78 => _78()]);
3252
3835
  }
3253
3836
  }, _class8);
3254
3837
 
@@ -3717,7 +4300,7 @@ function segmentToSelection(width, height, result) {
3717
4300
  const sized = raw.width === width && raw.height === height ? raw : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, raw, width, height);
3718
4301
  out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sized, "add");
3719
4302
  }
3720
- return _optionalChain([out, 'optionalAccess', _77 => _77.bounds]) ? out : null;
4303
+ return _optionalChain([out, 'optionalAccess', _79 => _79.bounds]) ? out : null;
3721
4304
  }
3722
4305
  function segmentsToSelection(width, height, results) {
3723
4306
  let out = null;
@@ -3998,7 +4581,7 @@ function deserializeChannels(value, size, problems = []) {
3998
4581
  visible: v.visible === true
3999
4582
  });
4000
4583
  } catch (err) {
4001
- problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _78 => _78.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4584
+ problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _80 => _80.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4002
4585
  }
4003
4586
  }
4004
4587
  return out;
@@ -4036,16 +4619,16 @@ function checkEffectTime(time) {
4036
4619
  return time;
4037
4620
  }
4038
4621
  function checkEffectAnimation(animate) {
4039
- const duration = _optionalChain([animate, 'optionalAccess', _79 => _79.duration]);
4622
+ const duration = _optionalChain([animate, 'optionalAccess', _81 => _81.duration]);
4040
4623
  if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS)) {
4041
4624
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
4042
4625
  }
4043
4626
  return { duration: Math.round(duration) };
4044
4627
  }
4045
4628
  function effectLayerTiming(g, d) {
4046
- if (!_optionalChain([d, 'optionalAccess', _80 => _80.duration])) return null;
4629
+ if (!_optionalChain([d, 'optionalAccess', _82 => _82.duration])) return null;
4047
4630
  const time = _nullishCoalesce(g.time, () => ( 0));
4048
- return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _81 => _81.animate, 'optionalAccess', _82 => _82.duration]), () => ( d.duration)), loops: d.loop };
4631
+ return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _83 => _83.animate, 'optionalAccess', _84 => _84.duration]), () => ( d.duration)), loops: d.loop };
4049
4632
  }
4050
4633
 
4051
4634
  // src/image-editor/effects.ts
@@ -4298,14 +4881,14 @@ var FreeTransformSession = (_class10 = class {
4298
4881
  if (init.interpolation !== void 0 && !_chunkHGTDMKNEcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
4299
4882
  this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
4300
4883
  const sel = host.selection();
4301
- const selected = Boolean(_optionalChain([sel, 'optionalAccess', _83 => _83.bounds]));
4884
+ const selected = Boolean(_optionalChain([sel, 'optionalAccess', _85 => _85.bounds]));
4302
4885
  let content = _nullishCoalesce(init.content, () => ( "auto"));
4303
4886
  if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
4304
4887
  fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
4305
4888
  }
4306
4889
  const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
4307
- const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _84 => _84.layer]) : void 0;
4308
- const smartTarget = (_optionalChain([target, 'optionalAccess', _85 => _85.type]) === "smart" || _optionalChain([target, 'optionalAccess', _86 => _86.type]) === "shape" || _optionalChain([target, 'optionalAccess', _87 => _87.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
4890
+ const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _86 => _86.layer]) : void 0;
4891
+ const smartTarget = (_optionalChain([target, 'optionalAccess', _87 => _87.type]) === "smart" || _optionalChain([target, 'optionalAccess', _88 => _88.type]) === "shape" || _optionalChain([target, 'optionalAccess', _89 => _89.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
4309
4892
  if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
4310
4893
  this.content = content;
4311
4894
  if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
@@ -4329,9 +4912,9 @@ var FreeTransformSession = (_class10 = class {
4329
4912
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
4330
4913
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
4331
4914
  if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
4332
- const linked = _optionalChain([mask, 'optionalAccess', _88 => _88.linked]) !== false;
4915
+ const linked = _optionalChain([mask, 'optionalAccess', _90 => _90.linked]) !== false;
4333
4916
  const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
4334
- if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _89 => _89.mask, 'optionalAccess', _90 => _90.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.`);
4917
+ if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _91 => _91.mask, 'optionalAccess', _92 => _92.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.`);
4335
4918
  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.`);
4336
4919
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
4337
4920
  if (content !== "selection-copy") {
@@ -4434,7 +5017,7 @@ var FreeTransformSession = (_class10 = class {
4434
5017
  };
4435
5018
  this.copyId = copy.id;
4436
5019
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, layer.id);
4437
- this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _91 => _91.parent, 'optionalAccess', _92 => _92.id]), () => ( null)), loc.index + 1);
5020
+ this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _93 => _93.parent, 'optionalAccess', _94 => _94.id]), () => ( null)), loc.index + 1);
4438
5021
  this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
4439
5022
  moves.push("pixels");
4440
5023
  }
@@ -4543,7 +5126,7 @@ var FreeTransformSession = (_class10 = class {
4543
5126
  moveVectorMask(layers) {
4544
5127
  const g = this.geometryValue;
4545
5128
  if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkUYXL6ZWQcjs.isIdentityTransform.call(void 0, g)) return layers;
4546
- const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _93 => _93.layer, 'access', _94 => _94.vectorMask]);
5129
+ const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _95 => _95.layer, 'access', _96 => _96.vectorMask]);
4547
5130
  if (!vm || vm.linked === false) return layers;
4548
5131
  const warp = _chunkUYXL6ZWQcjs.hasWarp.call(void 0, g);
4549
5132
  const f = warp ? _chunkUYXL6ZWQcjs.transformMap.call(void 0, g) : null;
@@ -4714,11 +5297,11 @@ var FreeTransformSession = (_class10 = class {
4714
5297
  result(changed, layers, selection) {
4715
5298
  let bounds = null;
4716
5299
  const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
4717
- const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _95 => _95.layer]) : void 0;
4718
- if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _96 => _96.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
4719
- else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _97 => _97.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _98 => _98.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _99 => _99.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
4720
- else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _100 => _100.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
4721
- else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _101 => _101.bounds]) ? { ...selection.bounds } : null;
5300
+ const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _97 => _97.layer]) : void 0;
5301
+ if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _98 => _98.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5302
+ else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _99 => _99.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _100 => _100.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
5303
+ else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _102 => _102.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5304
+ else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _103 => _103.bounds]) ? { ...selection.bounds } : null;
4722
5305
  return {
4723
5306
  layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
4724
5307
  content: this.content,
@@ -4747,7 +5330,7 @@ function deserializeColorMode(raw, problems) {
4747
5330
  }
4748
5331
  function effectiveProof(proof, mode) {
4749
5332
  if (proof) return proof;
4750
- if (_optionalChain([mode, 'optionalAccess', _102 => _102.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5333
+ if (_optionalChain([mode, 'optionalAccess', _104 => _104.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
4751
5334
  return null;
4752
5335
  }
4753
5336
  function colorModePlanes(doc, mode) {
@@ -4802,7 +5385,7 @@ function resolveProfile(doc) {
4802
5385
  return p;
4803
5386
  }
4804
5387
  function profileBytes(doc) {
4805
- if (_optionalChain([doc, 'optionalAccess', _103 => _103.icc])) return doc.icc;
5388
+ if (_optionalChain([doc, 'optionalAccess', _105 => _105.icc])) return doc.icc;
4806
5389
  const p = resolveProfile(doc);
4807
5390
  return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
4808
5391
  }
@@ -4964,7 +5547,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
4964
5547
  else tiles.delete(key);
4965
5548
  continue;
4966
5549
  }
4967
- const src = _nullishCoalesce(_optionalChain([base, 'access', _104 => _104.tiles, 'access', _105 => _105.get, 'call', _106 => _106(key), 'optionalAccess', _107 => _107.data]), () => ( defaultTile(base)));
5550
+ const src = _nullishCoalesce(_optionalChain([base, 'access', _106 => _106.tiles, 'access', _107 => _107.get, 'call', _108 => _108(key), 'optionalAccess', _109 => _109.data]), () => ( defaultTile(base)));
4968
5551
  const data = _chunkEBDCRTZIcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
4969
5552
  const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
4970
5553
  if (tile) tiles.set(key, tile);
@@ -5077,7 +5660,7 @@ var PaintStrokeSession = (_class11 = class {
5077
5660
  writeTile: (tx, ty) => {
5078
5661
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
5079
5662
  if (!this.touched.has(key)) {
5080
- this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _108 => _108(key), 'optionalAccess', _109 => _109.slice, 'call', _110 => _110()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
5663
+ this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _110 => _110(key), 'optionalAccess', _111 => _111.slice, 'call', _112 => _112()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
5081
5664
  this.touched.add(key);
5082
5665
  }
5083
5666
  this.fresh.add(key);
@@ -5089,11 +5672,11 @@ var PaintStrokeSession = (_class11 = class {
5089
5672
  offset: a.offset,
5090
5673
  lockTransparency: a.lockTransparency,
5091
5674
  selection: a.selection,
5092
- readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _111 => _111.live, 'access', _112 => _112.get, 'call', _113 => _113(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _114 => _114.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
5675
+ readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _113 => _113.live, 'access', _114 => _114.get, 'call', _115 => _115(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _116 => _116.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
5093
5676
  writeTile: (tx, ty) => {
5094
5677
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
5095
5678
  if (!this.touched.has(key)) {
5096
- const src = _nullishCoalesce(_optionalChain([this, 'access', _115 => _115.base, 'access', _116 => _116.tiles, 'access', _117 => _117.get, 'call', _118 => _118(key), 'optionalAccess', _119 => _119.data]), () => ( defaultTile(this.base)));
5679
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _117 => _117.base, 'access', _118 => _118.tiles, 'access', _119 => _119.get, 'call', _120 => _120(key), 'optionalAccess', _121 => _121.data]), () => ( defaultTile(this.base)));
5097
5680
  this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
5098
5681
  this.touched.add(key);
5099
5682
  }
@@ -5110,11 +5693,11 @@ var PaintStrokeSession = (_class11 = class {
5110
5693
  if (this.closed || !points.length) return;
5111
5694
  if (!this.started) {
5112
5695
  this.started = true;
5113
- if (_optionalChain([this, 'access', _120 => _120.retouch, 'optionalAccess', _121 => _121.kind]) === "coverage") this.retouch.start(points[0]);
5696
+ if (_optionalChain([this, 'access', _122 => _122.retouch, 'optionalAccess', _123 => _123.kind]) === "coverage") this.retouch.start(points[0]);
5114
5697
  }
5115
5698
  this.last = points[points.length - 1];
5116
5699
  const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
5117
- _optionalChain([this, 'access', _122 => _122.flushView, 'optionalCall', _123 => _123()]);
5700
+ _optionalChain([this, 'access', _124 => _124.flushView, 'optionalCall', _125 => _125()]);
5118
5701
  this.update(rects);
5119
5702
  }
5120
5703
  update(rects) {
@@ -5144,7 +5727,7 @@ var PaintStrokeSession = (_class11 = class {
5144
5727
  for (const [key, { tx, ty, r }] of regions) {
5145
5728
  if (this.deep) {
5146
5729
  const rt = this.retouch;
5147
- const paint = _optionalChain([rt, 'optionalAccess', _124 => _124.kind]) === "coverage" ? rt.paint() : null;
5730
+ const paint = _optionalChain([rt, 'optionalAccess', _126 => _126.kind]) === "coverage" ? rt.paint() : null;
5148
5731
  if (paint && paint.kind !== "tone") {
5149
5732
  const prevWork = this.touched.has(key) ? this.work.get(key) : void 0;
5150
5733
  this.touched.add(key);
@@ -5155,13 +5738,13 @@ var PaintStrokeSession = (_class11 = class {
5155
5738
  const prev2 = this.touched.has(key) ? this.liveDeep.get(key) : void 0;
5156
5739
  this.touched.add(key);
5157
5740
  const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
5158
- const d = _optionalChain([rt, 'optionalAccess', _125 => _125.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _126 => _126.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);
5741
+ const d = _optionalChain([rt, 'optionalAccess', _127 => _127.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _128 => _128.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);
5159
5742
  this.liveDeep.set(key, d);
5160
5743
  this.live.set(key, { data: _chunkCWM3CUUXcjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
5161
5744
  continue;
5162
5745
  }
5163
- const src = _nullishCoalesce(_optionalChain([this, 'access', _127 => _127.base, 'access', _128 => _128.tiles, 'access', _129 => _129.get, 'call', _130 => _130(key), 'optionalAccess', _131 => _131.data]), () => ( defaultTile(this.base)));
5164
- const prev = this.touched.has(key) ? _optionalChain([this, 'access', _132 => _132.live, 'access', _133 => _133.get, 'call', _134 => _134(key), 'optionalAccess', _135 => _135.data]) : void 0;
5746
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _129 => _129.base, 'access', _130 => _130.tiles, 'access', _131 => _131.get, 'call', _132 => _132(key), 'optionalAccess', _133 => _133.data]), () => ( defaultTile(this.base)));
5747
+ const prev = this.touched.has(key) ? _optionalChain([this, 'access', _134 => _134.live, 'access', _135 => _135.get, 'call', _136 => _136(key), 'optionalAccess', _137 => _137.data]) : void 0;
5165
5748
  this.touched.add(key);
5166
5749
  const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
5167
5750
  this.live.set(key, { data, uniform: null });
@@ -5173,12 +5756,12 @@ var PaintStrokeSession = (_class11 = class {
5173
5756
  if (this.closed) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("This stroke has already ended.");
5174
5757
  const last = _nullishCoalesce(this.last, () => ( void 0));
5175
5758
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
5176
- _optionalChain([this, 'access', _136 => _136.flushView, 'optionalCall', _137 => _137()]);
5759
+ _optionalChain([this, 'access', _138 => _138.flushView, 'optionalCall', _139 => _139()]);
5177
5760
  this.update(rects);
5178
5761
  this.closed = true;
5179
5762
  const ch = this.base.channels;
5180
5763
  const r = this.retouch;
5181
- if (_optionalChain([r, 'optionalAccess', _138 => _138.kind]) === "coverage" && r.finalPaint) {
5764
+ if (_optionalChain([r, 'optionalAccess', _140 => _140.kind]) === "coverage" && r.finalPaint) {
5182
5765
  const final = r.finalPaint(this.stroke.coverage);
5183
5766
  if (final) {
5184
5767
  for (const key of this.touched) {
@@ -5187,7 +5770,7 @@ var PaintStrokeSession = (_class11 = class {
5187
5770
  this.retouchDeepTile(key, tx, ty, final, {});
5188
5771
  continue;
5189
5772
  }
5190
- const src = _nullishCoalesce(_optionalChain([this, 'access', _139 => _139.base, 'access', _140 => _140.tiles, 'access', _141 => _141.get, 'call', _142 => _142(key), 'optionalAccess', _143 => _143.data]), () => ( defaultTile(this.base)));
5773
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _141 => _141.base, 'access', _142 => _142.tiles, 'access', _143 => _143.get, 'call', _144 => _144(key), 'optionalAccess', _145 => _145.data]), () => ( defaultTile(this.base)));
5191
5774
  this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
5192
5775
  }
5193
5776
  }
@@ -5209,7 +5792,7 @@ var PaintStrokeSession = (_class11 = class {
5209
5792
  const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
5210
5793
  const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
5211
5794
  if (mixerLoad) result.mixerLoad = mixerLoad;
5212
- if (_optionalChain([r, 'optionalAccess', _144 => _144.result])) Object.assign(result, r.result());
5795
+ if (_optionalChain([r, 'optionalAccess', _146 => _146.result])) Object.assign(result, r.result());
5213
5796
  return result;
5214
5797
  }
5215
5798
  /** Abandons the stroke and restores the layer. */
@@ -5335,14 +5918,14 @@ function migrateSerializedImageEditorState(data) {
5335
5918
  const legacy = data;
5336
5919
  const adjustments = normalizeStoredAdjustments(legacy.adjustments);
5337
5920
  return {
5338
- version: _optionalChain([adjustments, 'access', _145 => _145.layers, 'optionalAccess', _146 => _146.length]) ? 2 : 1,
5921
+ version: _optionalChain([adjustments, 'access', _147 => _147.layers, 'optionalAccess', _148 => _148.length]) ? 2 : 1,
5339
5922
  crop: legacy.crop ? { ...legacy.crop } : null,
5340
5923
  transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
5341
5924
  adjustments: serializeAdjustments(adjustments),
5342
5925
  depthMask: {
5343
5926
  ...DEFAULT_DEPTH_MASK,
5344
5927
  ...legacy.depthMask,
5345
- depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _147 => _147.depthMask, 'optionalAccess', _148 => _148.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
5928
+ depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _149 => _149.depthMask, 'optionalAccess', _150 => _150.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
5346
5929
  },
5347
5930
  annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
5348
5931
  ...legacy.selection ? { selection: { ...legacy.selection } } : {}
@@ -5418,7 +6001,7 @@ var ImageEditorController = (_class12 = class {
5418
6001
  sourceIsOpaque: () => this.sourceIsOpaque(),
5419
6002
  version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
5420
6003
  globalLight: () => this.state.globalLight,
5421
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _149 => _149.state, 'access', _150 => _150.patterns, 'optionalAccess', _151 => _151.find, 'call', _152 => _152((p) => p.id === id)]), () => ( null))
6004
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _151 => _151.state, 'access', _152 => _152.patterns, 'optionalAccess', _153 => _153.find, 'call', _154 => _154((p) => p.id === id)]), () => ( null))
5422
6005
  };
5423
6006
  this.state = {
5424
6007
  sourceUrl: typeof options.image === "string" ? options.image : null,
@@ -5451,13 +6034,13 @@ var ImageEditorController = (_class12 = class {
5451
6034
  };
5452
6035
  }
5453
6036
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
5454
- if (_optionalChain([options, 'access', _153 => _153.initialState, 'optionalAccess', _154 => _154.selection])) {
6037
+ if (_optionalChain([options, 'access', _155 => _155.initialState, 'optionalAccess', _156 => _156.selection])) {
5455
6038
  try {
5456
6039
  this.state.selection = normalizeSelection(_chunkUYXL6ZWQcjs.deserializeSelection.call(void 0, options.initialState.selection));
5457
6040
  } catch (e20) {
5458
6041
  }
5459
6042
  }
5460
- if (_optionalChain([options, 'access', _155 => _155.initialState, 'optionalAccess', _156 => _156.channels])) {
6043
+ if (_optionalChain([options, 'access', _157 => _157.initialState, 'optionalAccess', _158 => _158.channels])) {
5461
6044
  const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
5462
6045
  if (channels.length) this.state.channels = channels;
5463
6046
  }
@@ -5541,7 +6124,7 @@ var ImageEditorController = (_class12 = class {
5541
6124
  this.syncViews();
5542
6125
  this.syncDisplay();
5543
6126
  const currentState = { ...this.state };
5544
- _optionalChain([this, 'access', _157 => _157.onStateChange, 'optionalCall', _158 => _158(currentState)]);
6127
+ _optionalChain([this, 'access', _159 => _159.onStateChange, 'optionalCall', _160 => _160(currentState)]);
5545
6128
  this.listeners.forEach((l) => l(currentState));
5546
6129
  if (this.effects.provider) this.queueEffectRefresh("incomplete");
5547
6130
  }
@@ -5570,7 +6153,7 @@ var ImageEditorController = (_class12 = class {
5570
6153
  if (l.type === "group") {
5571
6154
  const children = walk(l.children);
5572
6155
  if (children !== l.children) next2 = { ...l, children };
5573
- } else if (l.type === "smart" && _optionalChain([l, 'access', _159 => _159.smartFilters, 'optionalAccess', _160 => _160.filters, 'access', _161 => _161.some, 'call', _162 => _162((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6156
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _161 => _161.smartFilters, 'optionalAccess', _162 => _162.filters, 'access', _163 => _163.some, 'call', _164 => _164((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
5574
6157
  try {
5575
6158
  const r = _chunkUYXL6ZWQcjs.rerender.call(void 0, l, canvas);
5576
6159
  if (all || !_chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
@@ -5666,8 +6249,8 @@ var ImageEditorController = (_class12 = class {
5666
6249
  */
5667
6250
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
5668
6251
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
5669
- const was = _optionalChain([layer, 'access', _163 => _163.smartFilters, 'optionalAccess', _164 => _164.filters, 'access', _165 => _165.find, 'call', _166 => _166((f) => f.id === filterId)]);
5670
- 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', _167 => _167.smartFilters, 'optionalAccess', _168 => _168.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6252
+ const was = _optionalChain([layer, 'access', _165 => _165.smartFilters, 'optionalAccess', _166 => _166.filters, 'access', _167 => _167.find, 'call', _168 => _168((f) => f.id === filterId)]);
6253
+ 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', _169 => _169.smartFilters, 'optionalAccess', _170 => _170.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
5671
6254
  const update = {};
5672
6255
  if (changes.values) {
5673
6256
  const d = await this.describeEffect(was.effect);
@@ -5709,7 +6292,7 @@ var ImageEditorController = (_class12 = class {
5709
6292
  const layer = {
5710
6293
  type: "pixel",
5711
6294
  id,
5712
- name: _optionalChain([options, 'access', _169 => _169.name, 'optionalAccess', _170 => _170.trim, 'call', _171 => _171()]) || d.name,
6295
+ name: _optionalChain([options, 'access', _171 => _171.name, 'optionalAccess', _172 => _172.trim, 'call', _173 => _173()]) || d.name,
5713
6296
  visible: true,
5714
6297
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
5715
6298
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -5734,7 +6317,7 @@ var ImageEditorController = (_class12 = class {
5734
6317
  */
5735
6318
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
5736
6319
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
5737
- const layer = _optionalChain([found, 'optionalAccess', _172 => _172.layer]);
6320
+ const layer = _optionalChain([found, 'optionalAccess', _174 => _174.layer]);
5738
6321
  if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
5739
6322
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
5740
6323
  const g = layer.generator;
@@ -5763,7 +6346,7 @@ var ImageEditorController = (_class12 = class {
5763
6346
  * and how long it runs, the longest of theirs (ms). Null when none animates.
5764
6347
  */
5765
6348
  getAnimation() {
5766
- const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _173 => _173.generator, 'optionalAccess', _174 => _174.animate]));
6349
+ const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _175 => _175.generator, 'optionalAccess', _176 => _176.animate]));
5767
6350
  if (!layers.length) return null;
5768
6351
  return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
5769
6352
  }
@@ -5780,7 +6363,7 @@ var ImageEditorController = (_class12 = class {
5780
6363
  const { width, height } = this.naturalSize;
5781
6364
  const surfaces = /* @__PURE__ */ new Map();
5782
6365
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
5783
- if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _175 => _175.generator, 'optionalAccess', _176 => _176.animate])) continue;
6366
+ if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _177 => _177.generator, 'optionalAccess', _178 => _178.animate])) continue;
5784
6367
  const g = l.generator;
5785
6368
  const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
5786
6369
  surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
@@ -5841,7 +6424,7 @@ var ImageEditorController = (_class12 = class {
5841
6424
  transform: { ...s.transform },
5842
6425
  outputOpacity: s.outputOpacity,
5843
6426
  selection: _nullishCoalesce(s.selection, () => ( null)),
5844
- ..._optionalChain([s, 'access', _177 => _177.channels, 'optionalAccess', _178 => _178.length]) ? { channels: s.channels } : {},
6427
+ ..._optionalChain([s, 'access', _179 => _179.channels, 'optionalAccess', _180 => _180.length]) ? { channels: s.channels } : {},
5845
6428
  source: {
5846
6429
  sourceUrl: s.sourceUrl,
5847
6430
  element: this.imageElement,
@@ -5877,7 +6460,7 @@ var ImageEditorController = (_class12 = class {
5877
6460
  if (entry.colorMode) s.colorMode = entry.colorMode;
5878
6461
  else delete s.colorMode;
5879
6462
  s.selection = entry.selection;
5880
- if (_optionalChain([entry, 'access', _179 => _179.channels, 'optionalAccess', _180 => _180.length])) s.channels = entry.channels;
6463
+ if (_optionalChain([entry, 'access', _181 => _181.channels, 'optionalAccess', _182 => _182.length])) s.channels = entry.channels;
5881
6464
  else delete s.channels;
5882
6465
  if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
5883
6466
  this.imageElement = entry.source.element;
@@ -6084,7 +6667,7 @@ var ImageEditorController = (_class12 = class {
6084
6667
  return this.state.layers;
6085
6668
  }
6086
6669
  getLayer(id) {
6087
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _181 => _181.layer]);
6670
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _183 => _183.layer]);
6088
6671
  }
6089
6672
  /** The active layer, or `undefined`. */
6090
6673
  getActiveLayer() {
@@ -6097,7 +6680,7 @@ var ImageEditorController = (_class12 = class {
6097
6680
  setActiveLayer(id, target = "pixels") {
6098
6681
  if (id !== null && !this.getLayer(id)) return false;
6099
6682
  const layer = id ? this.getLayer(id) : void 0;
6100
- const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _182 => _182.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _183 => _183.type]) === "smart" && _optionalChain([layer, 'access', _184 => _184.smartFilters, 'optionalAccess', _185 => _185.mask]) ? "filter-mask" : "pixels";
6683
+ const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _184 => _184.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _185 => _185.type]) === "smart" && _optionalChain([layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.mask]) ? "filter-mask" : "pixels";
6101
6684
  if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
6102
6685
  this.state.activeLayerId = id;
6103
6686
  this.state.activeTarget = t;
@@ -6259,7 +6842,7 @@ var ImageEditorController = (_class12 = class {
6259
6842
  surfaceOf: (l) => this.surfaceOf(l),
6260
6843
  version: `${this.sourceVersion()}:${this.patternsVersion()}`,
6261
6844
  globalLight: this.state.globalLight,
6262
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _186 => _186.state, 'access', _187 => _187.patterns, 'optionalAccess', _188 => _188.find, 'call', _189 => _189((p) => p.id === id)]), () => ( null))
6845
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _188 => _188.state, 'access', _189 => _189.patterns, 'optionalAccess', _190 => _190.find, 'call', _191 => _191((p) => p.id === id)]), () => ( null))
6263
6846
  };
6264
6847
  }
6265
6848
  __init91() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
@@ -6336,7 +6919,7 @@ var ImageEditorController = (_class12 = class {
6336
6919
  if (!ctx || typeof ctx.getImageData !== "function") return null;
6337
6920
  ctx.drawImage(el, 0, 0, width, height);
6338
6921
  const data = ctx.getImageData(0, 0, width, height);
6339
- if (!_optionalChain([data, 'optionalAccess', _190 => _190.data]) || data.data.length < width * height * 4) return null;
6922
+ if (!_optionalChain([data, 'optionalAccess', _192 => _192.data]) || data.data.length < width * height * 4) return null;
6340
6923
  return { width, height, data: data.data };
6341
6924
  } catch (e24) {
6342
6925
  return null;
@@ -6349,7 +6932,7 @@ var ImageEditorController = (_class12 = class {
6349
6932
  const prev = this.state.layers;
6350
6933
  const depth = this.bitDepth;
6351
6934
  this.state.layers = next;
6352
- _optionalChain([extra, 'optionalCall', _191 => _191()]);
6935
+ _optionalChain([extra, 'optionalCall', _193 => _193()]);
6353
6936
  if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
6354
6937
  if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
6355
6938
  this.state.activeLayerId = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
@@ -6387,7 +6970,7 @@ var ImageEditorController = (_class12 = class {
6387
6970
  const layer = {
6388
6971
  type: "pixel",
6389
6972
  id: init.id && !ids.has(init.id) ? init.id : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
6390
- name: _optionalChain([init, 'access', _192 => _192.name, 'optionalAccess', _193 => _193.trim, 'call', _194 => _194()]) || this.nextLayerName(),
6973
+ name: _optionalChain([init, 'access', _194 => _194.name, 'optionalAccess', _195 => _195.trim, 'call', _196 => _196()]) || this.nextLayerName(),
6391
6974
  visible: _nullishCoalesce(init.visible, () => ( true)),
6392
6975
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
6393
6976
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -6414,7 +6997,7 @@ var ImageEditorController = (_class12 = class {
6414
6997
  async decodeImage(image) {
6415
6998
  const trimmed = image.trim();
6416
6999
  let png = null;
6417
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _195 => _195.bytes]), () => ( null));
7000
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _197 => _197.bytes]), () => ( null));
6418
7001
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
6419
7002
  try {
6420
7003
  const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, trimmed);
@@ -6463,7 +7046,7 @@ var ImageEditorController = (_class12 = class {
6463
7046
  removeLayer(id) {
6464
7047
  const next = _chunkUYXL6ZWQcjs.removeLayer.call(void 0, this.state.layers, id);
6465
7048
  this.commitLayers(next, () => {
6466
- if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _196 => _196.id]) === this.state.selectedAnnotationId)) {
7049
+ if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _198 => _198.id]) === this.state.selectedAnnotationId)) {
6467
7050
  this.state.selectedAnnotationId = null;
6468
7051
  }
6469
7052
  });
@@ -6472,9 +7055,9 @@ var ImageEditorController = (_class12 = class {
6472
7055
  moveLayer(id, placement) {
6473
7056
  const next = _chunkUYXL6ZWQcjs.moveLayer.call(void 0, this.state.layers, id, placement);
6474
7057
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
6475
- if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _197 => _197.parent, 'optionalAccess', _198 => _198.id]), () => ( null)), index: loc.index };
7058
+ if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _199 => _199.parent, 'optionalAccess', _200 => _200.id]), () => ( null)), index: loc.index };
6476
7059
  this.commitLayers(next);
6477
- return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _199 => _199.parent, 'optionalAccess', _200 => _200.id]), () => ( null)), index: loc.index };
7060
+ return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _201 => _201.parent, 'optionalAccess', _202 => _202.id]), () => ( null)), index: loc.index };
6478
7061
  }
6479
7062
  /**
6480
7063
  * Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
@@ -6491,7 +7074,7 @@ var ImageEditorController = (_class12 = class {
6491
7074
  const group = {
6492
7075
  type: "group",
6493
7076
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "group"),
6494
- name: _optionalChain([init, 'access', _201 => _201.name, 'optionalAccess', _202 => _202.trim, 'call', _203 => _203()]) || "Group",
7077
+ name: _optionalChain([init, 'access', _203 => _203.name, 'optionalAccess', _204 => _204.trim, 'call', _205 => _205()]) || "Group",
6495
7078
  visible: true,
6496
7079
  opacity: 1,
6497
7080
  blend,
@@ -6584,7 +7167,7 @@ var ImageEditorController = (_class12 = class {
6584
7167
  sel = this.layerTransparency(id);
6585
7168
  } else {
6586
7169
  const current = this.state.selection;
6587
- if (!_optionalChain([current, 'optionalAccess', _204 => _204.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7170
+ if (!_optionalChain([current, 'optionalAccess', _206 => _206.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
6588
7171
  sel = from === "hide-selection" ? _chunkUYXL6ZWQcjs.invertSelection.call(void 0, current) : current;
6589
7172
  }
6590
7173
  mask = this.maskFromSelection(sel, props);
@@ -6615,7 +7198,7 @@ var ImageEditorController = (_class12 = class {
6615
7198
  const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6616
7199
  const name = layer.name || id;
6617
7200
  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.`);
6618
- if (_optionalChain([layer, 'access', _205 => _205.mask, 'optionalAccess', _206 => _206.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.`);
7201
+ if (_optionalChain([layer, 'access', _207 => _207.mask, 'optionalAccess', _208 => _208.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.`);
6619
7202
  return layer;
6620
7203
  }
6621
7204
  requireVectorMask(id) {
@@ -6625,10 +7208,10 @@ var ImageEditorController = (_class12 = class {
6625
7208
  }
6626
7209
  /** Components from a path spec: `components`, or one `shape` / `subpaths`. */
6627
7210
  vectorMaskComponents(path) {
6628
- if (_optionalChain([path, 'access', _207 => _207.components, 'optionalAccess', _208 => _208.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7211
+ if (_optionalChain([path, 'access', _209 => _209.components, 'optionalAccess', _210 => _210.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
6629
7212
  if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
6630
- const specs = _optionalChain([path, 'access', _209 => _209.components, 'optionalAccess', _210 => _210.length]) ? path.components : [path];
6631
- return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _211 => _211.components, 'optionalAccess', _212 => _212.length]) ? `components[${i}].` : ""));
7213
+ const specs = _optionalChain([path, 'access', _211 => _211.components, 'optionalAccess', _212 => _212.length]) ? path.components : [path];
7214
+ return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _213 => _213.components, 'optionalAccess', _214 => _214.length]) ? `components[${i}].` : ""));
6632
7215
  }
6633
7216
  /**
6634
7217
  * Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
@@ -6645,7 +7228,7 @@ var ImageEditorController = (_class12 = class {
6645
7228
  vm = { components: this.vectorMaskComponents(path) };
6646
7229
  if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
6647
7230
  } else if (from === "reveal-all" || from === "hide-all") {
6648
- if (_optionalChain([path, 'access', _213 => _213.components, 'optionalAccess', _214 => _214.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.`);
7231
+ if (_optionalChain([path, 'access', _215 => _215.components, 'optionalAccess', _216 => _216.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.`);
6649
7232
  vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
6650
7233
  } else {
6651
7234
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
@@ -6656,7 +7239,7 @@ var ImageEditorController = (_class12 = class {
6656
7239
  /** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
6657
7240
  traceSelection(options) {
6658
7241
  const sel = this.state.selection;
6659
- if (!_optionalChain([sel, 'optionalAccess', _215 => _215.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7242
+ if (!_optionalChain([sel, 'optionalAccess', _217 => _217.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
6660
7243
  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.");
6661
7244
  const subpaths = selectionToSubpaths(sel, options);
6662
7245
  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.");
@@ -6837,7 +7420,7 @@ var ImageEditorController = (_class12 = class {
6837
7420
  const layer = loc.layer;
6838
7421
  if (layer.type !== "pixel") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
6839
7422
  const sel = this.state.selection;
6840
- if (!_optionalChain([sel, 'optionalAccess', _216 => _216.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7423
+ if (!_optionalChain([sel, 'optionalAccess', _218 => _218.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
6841
7424
  if (options.cut) _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
6842
7425
  const surface = this.surfaceOf(layer);
6843
7426
  const sb = sel.bounds;
@@ -6855,14 +7438,14 @@ var ImageEditorController = (_class12 = class {
6855
7438
  const copy = {
6856
7439
  type: "pixel",
6857
7440
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
6858
- name: _optionalChain([options, 'access', _217 => _217.name, 'optionalAccess', _218 => _218.trim, 'call', _219 => _219()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7441
+ name: _optionalChain([options, 'access', _219 => _219.name, 'optionalAccess', _220 => _220.trim, 'call', _221 => _221()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
6859
7442
  visible: true,
6860
7443
  opacity: 1,
6861
7444
  blend: "normal",
6862
7445
  surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
6863
7446
  offset: { ...layer.offset }
6864
7447
  };
6865
- let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _220 => _220.parent, 'optionalAccess', _221 => _221.id]), () => ( null)), loc.index + 1);
7448
+ let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _222 => _222.parent, 'optionalAccess', _223 => _223.id]), () => ( null)), loc.index + 1);
6866
7449
  if (kept) {
6867
7450
  const cutLayer = { ...layer, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, kept) };
6868
7451
  delete cutLayer.source;
@@ -6886,7 +7469,7 @@ var ImageEditorController = (_class12 = class {
6886
7469
  layers: () => this.state.layers,
6887
7470
  activeLayerId: () => this.state.activeLayerId,
6888
7471
  activeTarget: () => this.state.activeTarget,
6889
- selection: () => _optionalChain([this, 'access', _222 => _222.state, 'access', _223 => _223.selection, 'optionalAccess', _224 => _224.bounds]) ? this.state.selection : null,
7472
+ selection: () => _optionalChain([this, 'access', _224 => _224.state, 'access', _225 => _225.selection, 'optionalAccess', _226 => _226.bounds]) ? this.state.selection : null,
6890
7473
  canvas: () => this.naturalSize,
6891
7474
  pixelsOf: (layer) => this.surfaceOf(layer),
6892
7475
  shapeEnv: () => this.shapeEnv(),
@@ -7034,7 +7617,7 @@ var ImageEditorController = (_class12 = class {
7034
7617
  * anything else nests as a layer document. Returns the smart object's id.
7035
7618
  */
7036
7619
  convertToSmartObject(ids, options = {}) {
7037
- const list = _optionalChain([ids, 'optionalAccess', _225 => _225.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7620
+ const list = _optionalChain([ids, 'optionalAccess', _227 => _227.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7038
7621
  if (!list.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
7039
7622
  const res = _chunkUYXL6ZWQcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
7040
7623
  this.commitLayers(res.layers, () => {
@@ -7067,8 +7650,8 @@ var ImageEditorController = (_class12 = class {
7067
7650
  width: c.width,
7068
7651
  height: c.height,
7069
7652
  decoded: _chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c),
7070
- fileType: _nullishCoalesce(_optionalChain([c, 'access', _226 => _226.file, 'optionalAccess', _227 => _227.type]), () => ( null)),
7071
- linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _228 => _228.linked, 'optionalAccess', _229 => _229.path]), () => ( null)),
7653
+ fileType: _nullishCoalesce(_optionalChain([c, 'access', _228 => _228.file, 'optionalAccess', _229 => _229.type]), () => ( null)),
7654
+ linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _230 => _230.linked, 'optionalAccess', _231 => _231.path]), () => ( null)),
7072
7655
  instances: _chunkUYXL6ZWQcjs.instancesOf.call(void 0, this.state.layers, c.id),
7073
7656
  layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
7074
7657
  },
@@ -7085,9 +7668,9 @@ var ImageEditorController = (_class12 = class {
7085
7668
  bounds: _chunkUYXL6ZWQcjs.transformedBox.call(void 0, g)
7086
7669
  },
7087
7670
  smartFilters: {
7088
- enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _230 => _230.enabled]), () => ( true)),
7089
- filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _231 => _231.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
7090
- mask: _optionalChain([stack, 'optionalAccess', _232 => _232.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
7671
+ enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _232 => _232.enabled]), () => ( true)),
7672
+ filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _233 => _233.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
7673
+ mask: _optionalChain([stack, 'optionalAccess', _234 => _234.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
7091
7674
  },
7092
7675
  bounds: this.getLayerBounds(id)
7093
7676
  };
@@ -7226,7 +7809,7 @@ var ImageEditorController = (_class12 = class {
7226
7809
  * it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
7227
7810
  */
7228
7811
  maskFiltersWithSelection(id, useSelection) {
7229
- if (!useSelection || !_optionalChain([this, 'access', _233 => _233.state, 'access', _234 => _234.selection, 'optionalAccess', _235 => _235.bounds])) return false;
7812
+ if (!useSelection || !_optionalChain([this, 'access', _235 => _235.state, 'access', _236 => _236.selection, 'optionalAccess', _237 => _237.bounds])) return false;
7230
7813
  this.setSmartFilterMask(id, "selection", {}, false);
7231
7814
  return true;
7232
7815
  }
@@ -7240,19 +7823,19 @@ var ImageEditorController = (_class12 = class {
7240
7823
  removeSmartFilter(id, filterId) {
7241
7824
  const res = _chunkUYXL6ZWQcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
7242
7825
  this.commitLayers(res.layers);
7243
- return _nullishCoalesce(_optionalChain([res, 'access', _236 => _236.layer, 'access', _237 => _237.smartFilters, 'optionalAccess', _238 => _238.filters]), () => ( []));
7826
+ return _nullishCoalesce(_optionalChain([res, 'access', _238 => _238.layer, 'access', _239 => _239.smartFilters, 'optionalAccess', _240 => _240.filters]), () => ( []));
7244
7827
  }
7245
7828
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
7246
7829
  moveSmartFilter(id, filterId, index) {
7247
7830
  const res = _chunkUYXL6ZWQcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
7248
7831
  this.commitLayers(res.layers);
7249
- return _nullishCoalesce(_optionalChain([res, 'access', _239 => _239.layer, 'access', _240 => _240.smartFilters, 'optionalAccess', _241 => _241.filters]), () => ( []));
7832
+ return _nullishCoalesce(_optionalChain([res, 'access', _241 => _241.layer, 'access', _242 => _242.smartFilters, 'optionalAccess', _243 => _243.filters]), () => ( []));
7250
7833
  }
7251
7834
  /** Turns a smart object's whole filter stack on or off (one undo step). */
7252
7835
  setSmartFiltersEnabled(id, enabled) {
7253
7836
  const res = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
7254
7837
  this.commitLayers(res.layers);
7255
- return _nullishCoalesce(_optionalChain([res, 'access', _242 => _242.layer, 'access', _243 => _243.smartFilters, 'optionalAccess', _244 => _244.enabled]), () => ( true));
7838
+ return _nullishCoalesce(_optionalChain([res, 'access', _244 => _244.layer, 'access', _245 => _245.smartFilters, 'optionalAccess', _246 => _246.enabled]), () => ( true));
7256
7839
  }
7257
7840
  /**
7258
7841
  * Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
@@ -7264,11 +7847,11 @@ var ImageEditorController = (_class12 = class {
7264
7847
  let mask;
7265
7848
  if (from === "none") mask = null;
7266
7849
  else if (from === "keep") {
7267
- if (!_optionalChain([layer, 'access', _245 => _245.smartFilters, 'optionalAccess', _246 => _246.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.`);
7850
+ if (!_optionalChain([layer, 'access', _247 => _247.smartFilters, 'optionalAccess', _248 => _248.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.`);
7268
7851
  mask = withMaskProps(layer.smartFilters.mask, props);
7269
7852
  } else if (from === "selection") {
7270
7853
  const sel = this.state.selection;
7271
- if (!_optionalChain([sel, 'optionalAccess', _247 => _247.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
7854
+ if (!_optionalChain([sel, 'optionalAccess', _249 => _249.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
7272
7855
  mask = this.maskFromSelection(sel, props);
7273
7856
  } else {
7274
7857
  const v = from === "reveal-all" ? 255 : 0;
@@ -7280,7 +7863,7 @@ var ImageEditorController = (_class12 = class {
7280
7863
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
7281
7864
  else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
7282
7865
  }, commitToHistory);
7283
- return _nullishCoalesce(_optionalChain([res, 'access', _248 => _248.layer, 'access', _249 => _249.smartFilters, 'optionalAccess', _250 => _250.mask]), () => ( null));
7866
+ return _nullishCoalesce(_optionalChain([res, 'access', _250 => _250.layer, 'access', _251 => _251.smartFilters, 'optionalAccess', _252 => _252.mask]), () => ( null));
7284
7867
  }
7285
7868
  /**
7286
7869
  * Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
@@ -7328,7 +7911,7 @@ var ImageEditorController = (_class12 = class {
7328
7911
  if (this.getFreeTransform()) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
7329
7912
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, id);
7330
7913
  const c = layer.contents;
7331
- if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _251 => _251.file, 'optionalAccess', _252 => _252.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
7914
+ if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _253 => _253.file, 'optionalAccess', _254 => _254.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
7332
7915
  const saved = {
7333
7916
  state: { ...this.state },
7334
7917
  undo: this.undoStack,
@@ -7359,9 +7942,9 @@ var ImageEditorController = (_class12 = class {
7359
7942
  editingContents: this.getEditingContents()
7360
7943
  };
7361
7944
  delete this.state.legacyOutputBlur;
7362
- if (_optionalChain([c, 'access', _253 => _253.document, 'optionalAccess', _254 => _254.globalLight])) this.state.globalLight = c.document.globalLight;
7945
+ if (_optionalChain([c, 'access', _255 => _255.document, 'optionalAccess', _256 => _256.globalLight])) this.state.globalLight = c.document.globalLight;
7363
7946
  else delete this.state.globalLight;
7364
- if (_optionalChain([c, 'access', _255 => _255.document, 'optionalAccess', _256 => _256.patterns, 'optionalAccess', _257 => _257.length])) this.state.patterns = c.document.patterns;
7947
+ if (_optionalChain([c, 'access', _257 => _257.document, 'optionalAccess', _258 => _258.patterns, 'optionalAccess', _259 => _259.length])) this.state.patterns = c.document.patterns;
7365
7948
  else delete this.state.patterns;
7366
7949
  this.imageElement = null;
7367
7950
  this.samplePixels = null;
@@ -7381,23 +7964,23 @@ var ImageEditorController = (_class12 = class {
7381
7964
  closeSmartObjectContents(save = true) {
7382
7965
  const top = this.contentsStack.pop();
7383
7966
  if (!top) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
7384
- if (_optionalChain([this, 'access', _258 => _258.openTransform, 'optionalAccess', _259 => _259.isOpen])) this.openTransform.cancel();
7967
+ if (_optionalChain([this, 'access', _260 => _260.openTransform, 'optionalAccess', _261 => _261.isOpen])) this.openTransform.cancel();
7385
7968
  this.openTransform = null;
7386
7969
  const edited = this.state;
7387
7970
  const changed = save && this.undoStack.length > 0;
7388
7971
  let next = null;
7389
7972
  if (changed) {
7390
- const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _260 => _260.layer]);
7391
- const old = _optionalChain([layer, 'optionalAccess', _261 => _261.contents]);
7973
+ const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _262 => _262.layer]);
7974
+ const old = _optionalChain([layer, 'optionalAccess', _263 => _263.contents]);
7392
7975
  const { width, height } = edited.imageDimensions;
7393
7976
  const only = edited.layers.length === 1 ? edited.layers[0] : null;
7394
- const plain3 = _optionalChain([only, 'optionalAccess', _262 => _262.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _263 => _263.filters, 'optionalAccess', _264 => _264.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
7395
- if (_optionalChain([old, 'optionalAccess', _265 => _265.kind]) === "raster" && plain3) {
7977
+ const plain3 = _optionalChain([only, 'optionalAccess', _264 => _264.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _265 => _265.filters, 'optionalAccess', _266 => _266.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
7978
+ if (_optionalChain([old, 'optionalAccess', _267 => _267.kind]) === "raster" && plain3) {
7396
7979
  const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
7397
7980
  next = _chunkUYXL6ZWQcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
7398
7981
  } else {
7399
7982
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
7400
- next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _266 => _266.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _267 => _267.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
7983
+ next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _268 => _268.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _269 => _269.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
7401
7984
  }
7402
7985
  }
7403
7986
  const saved = top.saved;
@@ -7422,7 +8005,7 @@ var ImageEditorController = (_class12 = class {
7422
8005
  }
7423
8006
  /** The document's own layers (not the contents open for editing). */
7424
8007
  rootLayers() {
7425
- return _nullishCoalesce(_optionalChain([this, 'access', _268 => _268.contentsStack, 'access', _269 => _269[0], 'optionalAccess', _270 => _270.saved, 'access', _271 => _271.state, 'access', _272 => _272.layers]), () => ( this.state.layers));
8008
+ return _nullishCoalesce(_optionalChain([this, 'access', _270 => _270.contentsStack, 'access', _271 => _271[0], 'optionalAccess', _272 => _272.saved, 'access', _273 => _273.state, 'access', _274 => _274.layers]), () => ( this.state.layers));
7426
8009
  }
7427
8010
  /** Drops every open contents edit (loading another document). */
7428
8011
  abandonContents() {
@@ -7643,7 +8226,7 @@ var ImageEditorController = (_class12 = class {
7643
8226
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
7644
8227
  const key = `${tw}x${th}:${ox},${oy}`;
7645
8228
  let byKey = this.thumbCache.get(surface);
7646
- const hit = _optionalChain([byKey, 'optionalAccess', _273 => _273.get, 'call', _274 => _274(key)]);
8229
+ const hit = _optionalChain([byKey, 'optionalAccess', _275 => _275.get, 'call', _276 => _276(key)]);
7647
8230
  if (hit) return hit;
7648
8231
  const out = new Uint8ClampedArray(tw * th * 4);
7649
8232
  for (let y = 0; y < th; y++) {
@@ -7784,7 +8367,7 @@ var ImageEditorController = (_class12 = class {
7784
8367
  if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
7785
8368
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "all", action);
7786
8369
  } else if (ch === "filter-mask") {
7787
- if (layer.type !== "smart" || !_optionalChain([layer, 'access', _275 => _275.smartFilters, 'optionalAccess', _276 => _276.mask])) {
8370
+ if (layer.type !== "smart" || !_optionalChain([layer, 'access', _277 => _277.smartFilters, 'optionalAccess', _278 => _278.mask])) {
7788
8371
  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}.`);
7789
8372
  }
7790
8373
  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.`);
@@ -7799,7 +8382,7 @@ var ImageEditorController = (_class12 = class {
7799
8382
  if (!layer.visible) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
7800
8383
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
7801
8384
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
7802
- const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _277 => _277.locks, 'optionalAccess', _278 => _278.transparency]));
8385
+ const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _279 => _279.locks, 'optionalAccess', _280 => _280.transparency]));
7803
8386
  return { id, layer, channel: ch, offset, surface, lockTransparency };
7804
8387
  }
7805
8388
  /** The layer with its pixels (or mask) replaced by `surface`. */
@@ -7843,13 +8426,13 @@ var ImageEditorController = (_class12 = class {
7843
8426
  blend: target.channel !== "pixels" ? "normal" : brush.blend,
7844
8427
  lockTransparency: target.lockTransparency,
7845
8428
  // In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
7846
- selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _279 => _279.state, 'access', _280 => _280.selection, 'optionalAccess', _281 => _281.bounds]) ? this.state.selection : null,
8429
+ selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _281 => _281.state, 'access', _282 => _282.selection, 'optionalAccess', _283 => _283.bounds]) ? this.state.selection : null,
7847
8430
  offset: target.offset
7848
8431
  };
7849
8432
  const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
7850
8433
  if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
7851
8434
  if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
7852
- const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _282 => _282.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8435
+ const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _284 => _284.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
7853
8436
  return new PaintStrokeSession(this, target, new (0, _chunkEBDCRTZIcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
7854
8437
  }
7855
8438
  /** A retouching stroke's start: its settings, what it samples and how it composites. */
@@ -7896,9 +8479,9 @@ var ImageEditorController = (_class12 = class {
7896
8479
  const steps = settings.historySteps;
7897
8480
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
7898
8481
  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.");
7899
- const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _283 => _283.layer]);
8482
+ const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _285 => _285.layer]);
7900
8483
  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).`);
7901
- const surface = target.channel === "mask" ? _optionalChain([then, 'access', _284 => _284.mask, 'optionalAccess', _285 => _285.surface]) : then.type === "pixel" ? then.surface : void 0;
8484
+ const surface = target.channel === "mask" ? _optionalChain([then, 'access', _286 => _286.mask, 'optionalAccess', _287 => _287.surface]) : then.type === "pixel" ? then.surface : void 0;
7902
8485
  if (!surface) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
7903
8486
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
7904
8487
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
@@ -7972,7 +8555,7 @@ var ImageEditorController = (_class12 = class {
7972
8555
  }
7973
8556
  /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
7974
8557
  surfaceSource(surface, offset) {
7975
- return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _286 => _286.tiles, 'access', _287 => _287.get, 'call', _288 => _288(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _289 => _289.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
8558
+ return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _288 => _288.tiles, 'access', _289 => _289.get, 'call', _290 => _290(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _291 => _291.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
7976
8559
  }
7977
8560
  /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
7978
8561
  compositeSource(throughId, depth = null) {
@@ -8048,7 +8631,7 @@ var ImageEditorController = (_class12 = class {
8048
8631
  paintStroke(init) {
8049
8632
  if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("points must hold at least one { x, y } point.");
8050
8633
  for (const p of init.points) {
8051
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _290 => _290.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _291 => _291.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
8634
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _292 => _292.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _293 => _293.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
8052
8635
  }
8053
8636
  const session = this.beginStroke(init);
8054
8637
  session.push(init.points);
@@ -8077,7 +8660,7 @@ var ImageEditorController = (_class12 = class {
8077
8660
  */
8078
8661
  strokeSelection(options) {
8079
8662
  const sel = this.state.selection;
8080
- if (!_optionalChain([sel, 'optionalAccess', _292 => _292.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
8663
+ if (!_optionalChain([sel, 'optionalAccess', _294 => _294.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
8081
8664
  const width = options.width;
8082
8665
  if (!(width > 0 && width <= 250)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
8083
8666
  const location = _nullishCoalesce(options.location, () => ( "outside"));
@@ -8094,7 +8677,7 @@ var ImageEditorController = (_class12 = class {
8094
8677
  */
8095
8678
  cropToSelection() {
8096
8679
  const sel = this.state.selection;
8097
- if (!_optionalChain([sel, 'optionalAccess', _293 => _293.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
8680
+ if (!_optionalChain([sel, 'optionalAccess', _295 => _295.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
8098
8681
  const crop = { ...sel.bounds };
8099
8682
  this.setCrop(crop);
8100
8683
  return crop;
@@ -8108,7 +8691,7 @@ var ImageEditorController = (_class12 = class {
8108
8691
  */
8109
8692
  contentAwareFill(options = {}) {
8110
8693
  const sel = this.state.selection;
8111
- if (!_optionalChain([sel, 'optionalAccess', _294 => _294.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
8694
+ if (!_optionalChain([sel, 'optionalAccess', _296 => _296.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
8112
8695
  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.");
8113
8696
  const output = _nullishCoalesce(options.output, () => ( "current"));
8114
8697
  if (output !== "current" && output !== "new-layer") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown output "${String(output)}"; use current or new-layer.`);
@@ -8173,8 +8756,8 @@ var ImageEditorController = (_class12 = class {
8173
8756
  */
8174
8757
  copyPixels(options = {}) {
8175
8758
  const { width, height } = this.naturalSize;
8176
- const sel = _optionalChain([this, 'access', _295 => _295.state, 'access', _296 => _296.selection, 'optionalAccess', _297 => _297.bounds]) ? this.state.selection : null;
8177
- const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _298 => _298.bounds]), () => ( { x: 0, y: 0, width, height }));
8759
+ const sel = _optionalChain([this, 'access', _297 => _297.state, 'access', _298 => _298.selection, 'optionalAccess', _299 => _299.bounds]) ? this.state.selection : null;
8760
+ const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _300 => _300.bounds]), () => ( { x: 0, y: 0, width, height }));
8178
8761
  let data;
8179
8762
  if (options.merged) {
8180
8763
  data = new Uint8ClampedArray(this.compositePixels(rect).data);
@@ -8214,7 +8797,7 @@ var ImageEditorController = (_class12 = class {
8214
8797
  pastePixels(mode = "new-layer", image = this.clipboard) {
8215
8798
  if (!image) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
8216
8799
  if (!PASTE_MODES.includes(mode)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
8217
- const sel = _optionalChain([this, 'access', _299 => _299.state, 'access', _300 => _300.selection, 'optionalAccess', _301 => _301.bounds]) ? this.state.selection : null;
8800
+ const sel = _optionalChain([this, 'access', _301 => _301.state, 'access', _302 => _302.selection, 'optionalAccess', _303 => _303.bounds]) ? this.state.selection : null;
8218
8801
  if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
8219
8802
  const { width, height } = this.naturalSize;
8220
8803
  let x;
@@ -8223,7 +8806,7 @@ var ImageEditorController = (_class12 = class {
8223
8806
  x = image.x;
8224
8807
  y = image.y;
8225
8808
  } else {
8226
- const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _302 => _302.bounds]), () => ( { x: 0, y: 0, width, height }));
8809
+ const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _304 => _304.bounds]), () => ( { x: 0, y: 0, width, height }));
8227
8810
  x = Math.round(frame.x + (frame.width - image.width) / 2);
8228
8811
  y = Math.round(frame.y + (frame.height - image.height) / 2);
8229
8812
  }
@@ -8240,8 +8823,8 @@ var ImageEditorController = (_class12 = class {
8240
8823
  if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("opacity must be from 0 to 1.");
8241
8824
  const blend = _nullishCoalesce(_chunkUYXL6ZWQcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
8242
8825
  const quickMask = target.channel === "quick-mask";
8243
- const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _303 => _303.state, 'access', _304 => _304.selection, 'optionalAccess', _305 => _305.bounds]) ? this.state.selection : null)));
8244
- const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _306 => _306.bounds]), () => ( { x: 0, y: 0, width, height }));
8826
+ const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _305 => _305.state, 'access', _306 => _306.selection, 'optionalAccess', _307 => _307.bounds]) ? this.state.selection : null)));
8827
+ const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _308 => _308.bounds]), () => ( { x: 0, y: 0, width, height }));
8245
8828
  const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
8246
8829
  const ones = new Float32Array(region.width * region.height);
8247
8830
  if (sel) {
@@ -8366,7 +8949,7 @@ var ImageEditorController = (_class12 = class {
8366
8949
  placeLayer(layers, node, where) {
8367
8950
  if (where.aboveId) {
8368
8951
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.aboveId);
8369
- if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _307 => _307.parent, 'optionalAccess', _308 => _308.id]), () => ( null)), loc.index + 1);
8952
+ if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _309 => _309.parent, 'optionalAccess', _310 => _310.id]), () => ( null)), loc.index + 1);
8370
8953
  }
8371
8954
  if (where.parentId) {
8372
8955
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.parentId);
@@ -8377,11 +8960,11 @@ var ImageEditorController = (_class12 = class {
8377
8960
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
8378
8961
  if (at < nodes.length) {
8379
8962
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[at].id);
8380
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _309 => _309.parent, 'optionalAccess', _310 => _310.id]), () => ( null)), loc.index);
8963
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _311 => _311.parent, 'optionalAccess', _312 => _312.id]), () => ( null)), loc.index);
8381
8964
  }
8382
8965
  if (nodes.length) {
8383
8966
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
8384
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _311 => _311.parent, 'optionalAccess', _312 => _312.id]), () => ( null)), loc.index + 1);
8967
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _313 => _313.parent, 'optionalAccess', _314 => _314.id]), () => ( null)), loc.index + 1);
8385
8968
  }
8386
8969
  }
8387
8970
  return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
@@ -8420,7 +9003,7 @@ var ImageEditorController = (_class12 = class {
8420
9003
  enabled: spec.enabled,
8421
9004
  opacity: spec.opacity,
8422
9005
  blend: spec.blend,
8423
- mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _313 => _313.state, 'access', _314 => _314.selection, 'optionalAccess', _315 => _315.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9006
+ mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _315 => _315.state, 'access', _316 => _316.selection, 'optionalAccess', _317 => _317.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
8424
9007
  });
8425
9008
  while (ids.has(layer.id)) layer.id = _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "adj");
8426
9009
  const { width, height } = this.naturalSize;
@@ -8497,7 +9080,7 @@ var ImageEditorController = (_class12 = class {
8497
9080
  const anchor = nodes[to];
8498
9081
  const without = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => null);
8499
9082
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, without, anchor.id);
8500
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _316 => _316.parent, 'optionalAccess', _317 => _317.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9083
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _318 => _318.parent, 'optionalAccess', _319 => _319.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
8501
9084
  }
8502
9085
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
8503
9086
  moveAdjustmentLayer(id, toIndex) {
@@ -8538,7 +9121,7 @@ var ImageEditorController = (_class12 = class {
8538
9121
  return _nullishCoalesce(this.state.selection, () => ( null));
8539
9122
  }
8540
9123
  get hasSelection() {
8541
- return Boolean(_optionalChain([this, 'access', _318 => _318.state, 'access', _319 => _319.selection, 'optionalAccess', _320 => _320.bounds]));
9124
+ return Boolean(_optionalChain([this, 'access', _320 => _320.state, 'access', _321 => _321.selection, 'optionalAccess', _322 => _322.bounds]));
8542
9125
  }
8543
9126
  /** Returns the current canvas (composition) dimensions. */
8544
9127
  getCanvasSize() {
@@ -8630,7 +9213,7 @@ var ImageEditorController = (_class12 = class {
8630
9213
  const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
8631
9214
  if (prev === next || prev && next && sameSelection(prev, next)) return false;
8632
9215
  this.recordHistory();
8633
- if (!next && _optionalChain([prev, 'optionalAccess', _321 => _321.bounds])) this.lastSelection = prev;
9216
+ if (!next && _optionalChain([prev, 'optionalAccess', _323 => _323.bounds])) this.lastSelection = prev;
8634
9217
  this.state.selection = next;
8635
9218
  this.notify();
8636
9219
  return true;
@@ -8673,14 +9256,14 @@ var ImageEditorController = (_class12 = class {
8673
9256
  /** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
8674
9257
  async growSelection(options = {}) {
8675
9258
  const sel = this.state.selection;
8676
- if (!_optionalChain([sel, 'optionalAccess', _322 => _322.bounds])) return false;
9259
+ if (!_optionalChain([sel, 'optionalAccess', _324 => _324.bounds])) return false;
8677
9260
  const pixels = await this.requirePixels(options);
8678
9261
  return this.setSelection(growSelection(pixels, sel, options));
8679
9262
  }
8680
9263
  /** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
8681
9264
  async selectSimilar(options = {}) {
8682
9265
  const sel = this.state.selection;
8683
- if (!_optionalChain([sel, 'optionalAccess', _323 => _323.bounds])) return false;
9266
+ if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) return false;
8684
9267
  const pixels = await this.requirePixels(options);
8685
9268
  return this.setSelection(selectSimilar(pixels, sel, options));
8686
9269
  }
@@ -8747,6 +9330,31 @@ var ImageEditorController = (_class12 = class {
8747
9330
  const pixels = await this.requirePixels(options);
8748
9331
  return snapPolygonToEdges(pixels, points, options);
8749
9332
  }
9333
+ /**
9334
+ * Quick Selection: each stroke (the brush's path in natural pixels) grows into the region it is
9335
+ * painted on, out to that region's edges, and is combined with the selection by `mode`; with
9336
+ * `replace`, the first stroke replaces it and the rest add, as the brush does. All strokes are
9337
+ * one undo step. Resolves to the resulting selection.
9338
+ */
9339
+ async quickSelect(strokes, options = {}) {
9340
+ if (!strokes.length || strokes.some((s) => !s.length)) throw new Error("Pass at least one stroke, each with at least one point.");
9341
+ const { width, height } = this.naturalSize;
9342
+ for (const s of strokes) {
9343
+ if (!s.some((p) => p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
9344
+ throw new Error(`A stroke lies entirely outside the image (0..${width - 1}, 0..${height - 1}); paint over the area to select.`);
9345
+ }
9346
+ }
9347
+ const pixels = await this.requirePixels({ sample: options.sampleAllLayers === false ? "active-layer" : "composite" });
9348
+ const mode = _nullishCoalesce(options.mode, () => ( "replace"));
9349
+ let sel = _nullishCoalesce(this.state.selection, () => ( null));
9350
+ strokes.forEach((stroke, i) => {
9351
+ const m = mode === "replace" && i > 0 ? "add" : mode;
9352
+ const region = quickSelectStroke(pixels, stroke, { size: options.size, selection: sel, grow: m === "add", enhanceEdge: options.enhanceEdge });
9353
+ sel = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, sel, region, m);
9354
+ });
9355
+ this.setSelection(sel, "replace");
9356
+ return _nullishCoalesce(this.state.selection, () => ( null));
9357
+ }
8750
9358
  /**
8751
9359
  * Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
8752
9360
  * or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
@@ -8768,7 +9376,7 @@ var ImageEditorController = (_class12 = class {
8768
9376
  try {
8769
9377
  const canvas = await this.renderSource();
8770
9378
  const ctx = canvas.getContext("2d");
8771
- const data2 = _optionalChain([ctx, 'optionalAccess', _324 => _324.getImageData, 'optionalCall', _325 => _325(0, 0, width, height)]);
9379
+ const data2 = _optionalChain([ctx, 'optionalAccess', _326 => _326.getImageData, 'optionalCall', _327 => _327(0, 0, width, height)]);
8772
9380
  if (data2 && data2.data && data2.data.length >= width * height * 4) {
8773
9381
  base = { width, height, data: data2.data };
8774
9382
  this.samplePixels = base;
@@ -8843,7 +9451,7 @@ var ImageEditorController = (_class12 = class {
8843
9451
  /** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
8844
9452
  modifySelection(op, radius) {
8845
9453
  const sel = this.state.selection;
8846
- if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) return false;
9454
+ if (!_optionalChain([sel, 'optionalAccess', _328 => _328.bounds])) return false;
8847
9455
  return this.setSelection(_chunkUYXL6ZWQcjs.modifySelection.call(void 0, sel, op, radius));
8848
9456
  }
8849
9457
  /**
@@ -8852,7 +9460,7 @@ var ImageEditorController = (_class12 = class {
8852
9460
  */
8853
9461
  async refineSelection(params, options = {}) {
8854
9462
  const sel = this.state.selection;
8855
- if (!_optionalChain([sel, 'optionalAccess', _327 => _327.bounds])) return false;
9463
+ if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) return false;
8856
9464
  const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
8857
9465
  return this.setSelection(refineSelection(pixels, sel, params));
8858
9466
  }
@@ -8883,7 +9491,7 @@ var ImageEditorController = (_class12 = class {
8883
9491
  let mask;
8884
9492
  if (source === "selection") {
8885
9493
  const sel = this.state.selection;
8886
- if (!_optionalChain([sel, 'optionalAccess', _328 => _328.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
9494
+ if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
8887
9495
  mask = sel;
8888
9496
  } else if ("channelId" in source) {
8889
9497
  mask = this.requireChannel(source.channelId).mask;
@@ -8907,7 +9515,7 @@ var ImageEditorController = (_class12 = class {
8907
9515
  const canvas = this.renderer.createCanvas(w, h);
8908
9516
  const ctx = canvas.getContext("2d");
8909
9517
  if (ctx) ctx.drawImage(img, 0, 0, w, h);
8910
- const data = _optionalChain([ctx, 'optionalAccess', _329 => _329.getImageData, 'optionalCall', _330 => _330(0, 0, w, h)]);
9518
+ const data = _optionalChain([ctx, 'optionalAccess', _331 => _331.getImageData, 'optionalCall', _332 => _332(0, 0, w, h)]);
8911
9519
  if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
8912
9520
  return { width: w, height: h, data: data.data };
8913
9521
  }
@@ -8925,24 +9533,24 @@ var ImageEditorController = (_class12 = class {
8925
9533
  const { width, height } = this.naturalSize;
8926
9534
  const image = await this.toDataURL({ format: "image/png" });
8927
9535
  const results = await provider.segment({ image, width, height, target: description, maxSegments: options.maxSegments, signal: options.signal });
8928
- _optionalChain([options, 'access', _331 => _331.signal, 'optionalAccess', _332 => _332.throwIfAborted, 'call', _333 => _333()]);
9536
+ _optionalChain([options, 'access', _333 => _333.signal, 'optionalAccess', _334 => _334.throwIfAborted, 'call', _335 => _335()]);
8929
9537
  const decoded = [];
8930
9538
  for (const r of _nullishCoalesce(results, () => ( []))) {
8931
9539
  decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
8932
9540
  }
8933
9541
  const segments = decoded.map((r) => {
8934
9542
  const one = segmentsToSelection(width, height, [r]);
8935
- return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _334 => _334.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
9543
+ return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _336 => _336.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
8936
9544
  });
8937
9545
  const mask = segmentsToSelection(width, height, decoded);
8938
9546
  if (mask && options.beforeApply) {
8939
9547
  const outlines = decoded.flatMap((r, i) => {
8940
9548
  const rings = segmentationOutlines(r);
8941
- const b = _optionalChain([segments, 'access', _335 => _335[i], 'optionalAccess', _336 => _336.bounds]);
9549
+ const b = _optionalChain([segments, 'access', _337 => _337[i], 'optionalAccess', _338 => _338.bounds]);
8942
9550
  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 }]] : [];
8943
9551
  });
8944
9552
  await options.beforeApply(outlines);
8945
- _optionalChain([options, 'access', _337 => _337.signal, 'optionalAccess', _338 => _338.throwIfAborted, 'call', _339 => _339()]);
9553
+ _optionalChain([options, 'access', _339 => _339.signal, 'optionalAccess', _340 => _340.throwIfAborted, 'call', _341 => _341()]);
8946
9554
  }
8947
9555
  if (mask) this.shapeCommand(mask, options);
8948
9556
  return { segments: segments.filter((s) => s.bounds) };
@@ -8975,7 +9583,7 @@ var ImageEditorController = (_class12 = class {
8975
9583
  const view = this.state.maskView;
8976
9584
  if (!view) return null;
8977
9585
  const layer = this.getLayer(view.layerId);
8978
- return _optionalChain([layer, 'optionalAccess', _340 => _340.mask]) && !layer.mask.source ? view : null;
9586
+ return _optionalChain([layer, 'optionalAccess', _342 => _342.mask]) && !layer.mask.source ? view : null;
8979
9587
  }
8980
9588
  /**
8981
9589
  * Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
@@ -8998,7 +9606,7 @@ var ImageEditorController = (_class12 = class {
8998
9606
  if (!layer.mask) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
8999
9607
  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.`);
9000
9608
  const cur = this.state.maskView;
9001
- if (_optionalChain([cur, 'optionalAccess', _341 => _341.layerId]) !== id || cur.mode !== mode) {
9609
+ if (_optionalChain([cur, 'optionalAccess', _343 => _343.layerId]) !== id || cur.mode !== mode) {
9002
9610
  this.state.maskView = { layerId: id, mode };
9003
9611
  this.notify();
9004
9612
  }
@@ -9010,7 +9618,7 @@ var ImageEditorController = (_class12 = class {
9010
9618
  return _nullishCoalesce(this.state.channels, () => ( []));
9011
9619
  }
9012
9620
  getChannel(id) {
9013
- return _nullishCoalesce(_optionalChain([this, 'access', _342 => _342.state, 'access', _343 => _343.channels, 'optionalAccess', _344 => _344.find, 'call', _345 => _345((c) => c.id === id)]), () => ( null));
9621
+ return _nullishCoalesce(_optionalChain([this, 'access', _344 => _344.state, 'access', _345 => _345.channels, 'optionalAccess', _346 => _346.find, 'call', _347 => _347((c) => c.id === id)]), () => ( null));
9014
9622
  }
9015
9623
  requireChannel(id) {
9016
9624
  const channel = this.getChannel(id);
@@ -9039,14 +9647,14 @@ var ImageEditorController = (_class12 = class {
9039
9647
  */
9040
9648
  saveSelection(options = {}) {
9041
9649
  const sel = this.state.selection;
9042
- if (!_optionalChain([sel, 'optionalAccess', _346 => _346.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
9650
+ if (!_optionalChain([sel, 'optionalAccess', _348 => _348.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
9043
9651
  const { width, height } = this.naturalSize;
9044
9652
  const sized = sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height);
9045
9653
  const channels = [...this.getChannels()];
9046
9654
  if (options.channelId !== void 0) {
9047
9655
  const existing = this.requireChannel(options.channelId);
9048
9656
  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)));
9049
- const next = { ...existing, mask, ..._optionalChain([options, 'access', _347 => _347.name, 'optionalAccess', _348 => _348.trim, 'call', _349 => _349()]) ? { name: options.name.trim() } : {} };
9657
+ const next = { ...existing, mask, ..._optionalChain([options, 'access', _349 => _349.name, 'optionalAccess', _350 => _350.trim, 'call', _351 => _351()]) ? { name: options.name.trim() } : {} };
9050
9658
  this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
9051
9659
  return next;
9052
9660
  }
@@ -9057,7 +9665,7 @@ var ImageEditorController = (_class12 = class {
9057
9665
  const channels = this.getChannels();
9058
9666
  const channel = {
9059
9667
  id: this.newChannelId(),
9060
- name: _optionalChain([name, 'optionalAccess', _350 => _350.trim, 'call', _351 => _351()]) || `Alpha ${channels.length + 1}`,
9668
+ name: _optionalChain([name, 'optionalAccess', _352 => _352.trim, 'call', _353 => _353()]) || `Alpha ${channels.length + 1}`,
9061
9669
  mask,
9062
9670
  color: DEFAULT_CHANNEL_COLOR,
9063
9671
  opacity: 0.5,
@@ -9102,7 +9710,7 @@ var ImageEditorController = (_class12 = class {
9102
9710
  /** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
9103
9711
  duplicateChannel(id, name) {
9104
9712
  const channel = this.requireChannel(id);
9105
- const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _352 => _352.trim, 'call', _353 => _353()]) || `${channel.name} copy` };
9713
+ const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]) || `${channel.name} copy` };
9106
9714
  const channels = [...this.getChannels()];
9107
9715
  channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
9108
9716
  this.setChannels(channels);
@@ -9133,7 +9741,7 @@ var ImageEditorController = (_class12 = class {
9133
9741
  quickMaskSurface() {
9134
9742
  const { width, height } = this.naturalSize;
9135
9743
  const sel = this.state.selection;
9136
- if (!_optionalChain([sel, 'optionalAccess', _354 => _354.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
9744
+ if (!_optionalChain([sel, 'optionalAccess', _356 => _356.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
9137
9745
  return (sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height)).surface;
9138
9746
  }
9139
9747
  /** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
@@ -9154,7 +9762,7 @@ var ImageEditorController = (_class12 = class {
9154
9762
  */
9155
9763
  applySelectionAsLayerMask(layerId, props = {}) {
9156
9764
  const sel = this.state.selection;
9157
- if (!_optionalChain([sel, 'optionalAccess', _355 => _355.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
9765
+ if (!_optionalChain([sel, 'optionalAccess', _357 => _357.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
9158
9766
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
9159
9767
  }
9160
9768
  setLayerMask(layerId, mask, commitToHistory = true) {
@@ -9194,7 +9802,7 @@ var ImageEditorController = (_class12 = class {
9194
9802
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
9195
9803
  layerMaskCoverage(layerId) {
9196
9804
  const layer = this.getLayer(layerId);
9197
- if (!_optionalChain([layer, 'optionalAccess', _356 => _356.mask]) || layer.mask.source) return null;
9805
+ if (!_optionalChain([layer, 'optionalAccess', _358 => _358.mask]) || layer.mask.source) return null;
9198
9806
  const { width, height } = this.naturalSize;
9199
9807
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
9200
9808
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -9229,7 +9837,7 @@ var ImageEditorController = (_class12 = class {
9229
9837
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
9230
9838
  const next = { ...l };
9231
9839
  if (_chunkUYXL6ZWQcjs.isDefaultDepthMask.call(void 0, merged)) {
9232
- if (_optionalChain([next, 'access', _357 => _357.mask, 'optionalAccess', _358 => _358.source])) delete next.mask;
9840
+ if (_optionalChain([next, 'access', _359 => _359.mask, 'optionalAccess', _360 => _360.source])) delete next.mask;
9233
9841
  } else next.mask = _chunkUYXL6ZWQcjs.depthRasterMask.call(void 0, merged);
9234
9842
  return next;
9235
9843
  });
@@ -9239,7 +9847,7 @@ var ImageEditorController = (_class12 = class {
9239
9847
  resetDepthMask() {
9240
9848
  this.recordHistory();
9241
9849
  const target = this.developLayer();
9242
- if (_optionalChain([target, 'optionalAccess', _359 => _359.mask, 'optionalAccess', _360 => _360.source])) {
9850
+ if (_optionalChain([target, 'optionalAccess', _361 => _361.mask, 'optionalAccess', _362 => _362.source])) {
9243
9851
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
9244
9852
  const next = { ...l };
9245
9853
  delete next.mask;
@@ -9251,7 +9859,7 @@ var ImageEditorController = (_class12 = class {
9251
9859
  // --- Annotations & Layers ---
9252
9860
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
9253
9861
  annotationLayer(id) {
9254
- 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', _361 => _361.id]) === id);
9862
+ 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', _363 => _363.id]) === id);
9255
9863
  }
9256
9864
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
9257
9865
  annotationEnv() {
@@ -9269,7 +9877,7 @@ var ImageEditorController = (_class12 = class {
9269
9877
  const fullAnnotation = { ...annotation, id };
9270
9878
  const layer = _chunkUYXL6ZWQcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
9271
9879
  const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
9272
- this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _362 => _362.parent, 'optionalAccess', _363 => _363.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
9880
+ this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _364 => _364.parent, 'optionalAccess', _365 => _365.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
9273
9881
  this.state.selectedAnnotationId = id;
9274
9882
  this.notify();
9275
9883
  return id;
@@ -9392,7 +10000,7 @@ var ImageEditorController = (_class12 = class {
9392
10000
  await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
9393
10001
  ...options,
9394
10002
  // The clone source follows the brush cursor (both editors pass it).
9395
- cloneSourceMarker: _optionalChain([options, 'optionalAccess', _364 => _364.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _365 => _365.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10003
+ cloneSourceMarker: _optionalChain([options, 'optionalAccess', _366 => _366.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _367 => _367.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
9396
10004
  dirty: dirty === "all" ? void 0 : dirty,
9397
10005
  checkpointLayerId: this.state.activeLayerId
9398
10006
  });
@@ -9405,7 +10013,7 @@ var ImageEditorController = (_class12 = class {
9405
10013
  return this.renderer.createCanvas(1, 1);
9406
10014
  }
9407
10015
  this.syncViews();
9408
- if (_optionalChain([options, 'optionalAccess', _366 => _366.layerIds])) {
10016
+ if (_optionalChain([options, 'optionalAccess', _368 => _368.layerIds])) {
9409
10017
  const keep = new Set(options.layerIds);
9410
10018
  const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
9411
10019
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
@@ -9559,7 +10167,7 @@ var ImageEditorController = (_class12 = class {
9559
10167
  let px2 = await this.decodeImage(newDataUrl);
9560
10168
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
9561
10169
  const data = new Uint8ClampedArray(px2.data);
9562
- const sel = _optionalChain([this, 'access', _367 => _367.state, 'access', _368 => _368.selection, 'optionalAccess', _369 => _369.bounds]) ? this.state.selection : null;
10170
+ const sel = _optionalChain([this, 'access', _369 => _369.state, 'access', _370 => _370.selection, 'optionalAccess', _371 => _371.bounds]) ? this.state.selection : null;
9563
10171
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
9564
10172
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
9565
10173
  }
@@ -9606,7 +10214,7 @@ var ImageEditorController = (_class12 = class {
9606
10214
  }
9607
10215
  /** Font families the shaper offers (generic families at least). */
9608
10216
  listFonts() {
9609
- return _nullishCoalesce(_optionalChain([this, 'access', _370 => _370.getTextShaper, 'call', _371 => _371(), 'optionalAccess', _372 => _372.families, 'optionalCall', _373 => _373()]), () => ( ["sans-serif", "serif", "monospace"]));
10217
+ return _nullishCoalesce(_optionalChain([this, 'access', _372 => _372.getTextShaper, 'call', _373 => _373(), 'optionalAccess', _374 => _374.families, 'optionalCall', _375 => _375()]), () => ( ["sans-serif", "serif", "monospace"]));
9610
10218
  }
9611
10219
  typeInfo(id) {
9612
10220
  const layer = _chunkUYXL6ZWQcjs.requireTypeLayer.call(void 0, this.state.layers, id);
@@ -9680,8 +10288,8 @@ var ImageEditorController = (_class12 = class {
9680
10288
  const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
9681
10289
  const { width, height } = this.naturalSize;
9682
10290
  const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
9683
- const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _374 => _374.x]), () => ( 0)));
9684
- const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _375 => _375.y]), () => ( 0)));
10291
+ const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _376 => _376.x]), () => ( 0)));
10292
+ const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _377 => _377.y]), () => ( 0)));
9685
10293
  const x1 = Math.min(width, b ? b.x + b.width : 0);
9686
10294
  const y1 = Math.min(height, b ? b.y + b.height : 0);
9687
10295
  let mask;
@@ -9858,7 +10466,7 @@ var ImageEditorController = (_class12 = class {
9858
10466
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
9859
10467
  const missing = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper).missingFonts;
9860
10468
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
9861
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _376 => _376.runs, 'access', _377 => _377.find, 'call', _378 => _378((r) => r.length > 0), 'optionalAccess', _379 => _379.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
10469
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _378 => _378.runs, 'access', _379 => _379.find, 'call', _380 => _380((r) => r.length > 0), 'optionalAccess', _381 => _381.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
9862
10470
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
9863
10471
  const shape = _chunkUYXL6ZWQcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
9864
10472
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
@@ -9891,7 +10499,7 @@ var ImageEditorController = (_class12 = class {
9891
10499
  // --- Shape layers ---
9892
10500
  /** What shape rendering needs: the canvas size and the document's patterns. */
9893
10501
  shapeEnv() {
9894
- return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _380 => _380.state, 'access', _381 => _381.patterns, 'optionalAccess', _382 => _382.find, 'call', _383 => _383((p) => p.id === id)]), () => ( null)) };
10502
+ return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _382 => _382.state, 'access', _383 => _383.patterns, 'optionalAccess', _384 => _384.find, 'call', _385 => _385((p) => p.id === id)]), () => ( null)) };
9895
10503
  }
9896
10504
  /** One component from tool or UI input (validated). */
9897
10505
  componentFrom(spec, path) {
@@ -9934,9 +10542,9 @@ var ImageEditorController = (_class12 = class {
9934
10542
  * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
9935
10543
  */
9936
10544
  addShapeLayer(init) {
9937
- const specs = _optionalChain([init, 'access', _384 => _384.components, 'optionalAccess', _385 => _385.length]) ? init.components : [init];
9938
- if (_optionalChain([init, 'access', _386 => _386.components, 'optionalAccess', _387 => _387.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
9939
- const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _388 => _388.components, 'optionalAccess', _389 => _389.length]) ? `components[${i}].` : ""));
10545
+ const specs = _optionalChain([init, 'access', _386 => _386.components, 'optionalAccess', _387 => _387.length]) ? init.components : [init];
10546
+ if (_optionalChain([init, 'access', _388 => _388.components, 'optionalAccess', _389 => _389.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
10547
+ const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _390 => _390.components, 'optionalAccess', _391 => _391.length]) ? `components[${i}].` : ""));
9940
10548
  const stroke = init.stroke ? _chunkUYXL6ZWQcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
9941
10549
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
9942
10550
  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");
@@ -10047,7 +10655,7 @@ var ImageEditorController = (_class12 = class {
10047
10655
  if (layer.locks) next.locks = layer.locks;
10048
10656
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
10049
10657
  } else if (layer.type === "pixel") {
10050
- if (!_optionalChain([layer, 'access', _390 => _390.filters, 'optionalAccess', _391 => _391.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
10658
+ if (!_optionalChain([layer, 'access', _392 => _392.filters, 'optionalAccess', _393 => _393.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
10051
10659
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
10052
10660
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
10053
10661
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
@@ -10066,7 +10674,7 @@ var ImageEditorController = (_class12 = class {
10066
10674
  return this.rasterizeSmartObject(id);
10067
10675
  } else if (layer.type === "shape" || layer.type === "type") {
10068
10676
  next = layer.type === "shape" ? _chunkUYXL6ZWQcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkUYXL6ZWQcjs.typeAsPixelLayer.call(void 0, layer);
10069
- if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _392 => _392.annotation, 'optionalAccess', _393 => _393.id])) this.state.selectedAnnotationId = null;
10677
+ if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _394 => _394.annotation, 'optionalAccess', _395 => _395.id])) this.state.selectedAnnotationId = null;
10070
10678
  } else {
10071
10679
  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.`);
10072
10680
  }
@@ -10080,8 +10688,8 @@ var ImageEditorController = (_class12 = class {
10080
10688
  const doc = this.state.colorProfile;
10081
10689
  const p = resolveProfile(doc);
10082
10690
  const m = this.state.colorMode;
10083
- const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _394 => _394.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _395 => _395.mode]), () => ( "rgb")) };
10084
- if (_optionalChain([m, 'optionalAccess', _396 => _396.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
10691
+ const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _396 => _396.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _397 => _397.mode]), () => ( "rgb")) };
10692
+ if (_optionalChain([m, 'optionalAccess', _398 => _398.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
10085
10693
  return out;
10086
10694
  }
10087
10695
  /**
@@ -10171,7 +10779,7 @@ var ImageEditorController = (_class12 = class {
10171
10779
  const textEnv = this.textEnv();
10172
10780
  const walk = (layers) => layers.map((l) => {
10173
10781
  let next2 = l;
10174
- if (_optionalChain([l, 'access', _397 => _397.effects, 'optionalAccess', _398 => _398.items, 'access', _399 => _399.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
10782
+ if (_optionalChain([l, 'access', _399 => _399.effects, 'optionalAccess', _400 => _400.items, 'access', _401 => _401.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
10175
10783
  if (l.type === "group") {
10176
10784
  if (next2 !== l) converted.push(l.id);
10177
10785
  return { ...next2, children: walk(l.children) };
@@ -10355,8 +10963,8 @@ var ImageEditorController = (_class12 = class {
10355
10963
  else delete s.bitDepth;
10356
10964
  delete s.colorProfile;
10357
10965
  delete s.colorMode;
10358
- if (_optionalChain([result, 'access', _400 => _400.sourceMode, 'optionalAccess', _401 => _401.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
10359
- else if (_optionalChain([result, 'access', _402 => _402.sourceMode, 'optionalAccess', _403 => _403.mode]) === "lab") s.colorMode = { mode: "lab" };
10966
+ if (_optionalChain([result, 'access', _402 => _402.sourceMode, 'optionalAccess', _403 => _403.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
10967
+ else if (_optionalChain([result, 'access', _404 => _404.sourceMode, 'optionalAccess', _405 => _405.mode]) === "lab") s.colorMode = { mode: "lab" };
10360
10968
  else if (result.iccProfile) {
10361
10969
  try {
10362
10970
  const doc = documentProfile(result.iccProfile);
@@ -10420,7 +11028,7 @@ var ImageEditorController = (_class12 = class {
10420
11028
  const compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)();
10421
11029
  const bakeMask = (layer) => {
10422
11030
  const mask = layer.mask;
10423
- if (!_optionalChain([mask, 'optionalAccess', _404 => _404.source])) return mask;
11031
+ if (!_optionalChain([mask, 'optionalAccess', _406 => _406.source])) return mask;
10424
11032
  add2("Parametric (depth) masks were baked into pixel masks", layer.name);
10425
11033
  const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
10426
11034
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
@@ -10437,7 +11045,7 @@ var ImageEditorController = (_class12 = class {
10437
11045
  };
10438
11046
  const prepare = async (layer) => {
10439
11047
  const p = await prepareLayer(layer);
10440
- if (_optionalChain([p, 'optionalAccess', _405 => _405.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11048
+ if (_optionalChain([p, 'optionalAccess', _407 => _407.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
10441
11049
  return p;
10442
11050
  };
10443
11051
  const prepareLayer = async (layer) => {
@@ -10480,7 +11088,7 @@ var ImageEditorController = (_class12 = class {
10480
11088
  return out2;
10481
11089
  }
10482
11090
  if (layer.type === "shape" || layer.type === "type") {
10483
- if (layer.type === "type" && _optionalChain([layer, 'access', _406 => _406.missingFonts, 'optionalAccess', _407 => _407.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);
11091
+ if (layer.type === "type" && _optionalChain([layer, 'access', _408 => _408.missingFonts, 'optionalAccess', _409 => _409.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);
10484
11092
  const out2 = { ...layer };
10485
11093
  const mask2 = bakeMask(layer);
10486
11094
  if (mask2) out2.mask = mask2;
@@ -10499,7 +11107,7 @@ var ImageEditorController = (_class12 = class {
10499
11107
  out.surface = this.surfaceOf(layer);
10500
11108
  delete out.source;
10501
11109
  }
10502
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _408 => _408.filters, 'optionalAccess', _409 => _409.filter, 'call', _410 => _410(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
11110
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _410 => _410.filters, 'optionalAccess', _411 => _411.filter, 'call', _412 => _412(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
10503
11111
  if (active.length) {
10504
11112
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
10505
11113
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -10510,7 +11118,7 @@ var ImageEditorController = (_class12 = class {
10510
11118
  const data = compositor.composite([content], canvas, sources);
10511
11119
  out = { ...out, surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
10512
11120
  }
10513
- if (_optionalChain([layer, 'access', _411 => _411.filters, 'optionalAccess', _412 => _412.some, 'call', _413 => _413((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11121
+ if (_optionalChain([layer, 'access', _413 => _413.filters, 'optionalAccess', _414 => _414.some, 'call', _415 => _415((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
10514
11122
  delete out.filters;
10515
11123
  const mask = bakeMask(layer);
10516
11124
  if (mask) out.mask = mask;
@@ -10574,7 +11182,7 @@ var ImageEditorController = (_class12 = class {
10574
11182
  );
10575
11183
  }
10576
11184
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
10577
- const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _414 => _414.state, 'access', _415 => _415.patterns, 'optionalAccess', _416 => _416.find, 'call', _417 => _417((p) => p.id === pid)]), () => ( null)) };
11185
+ const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _416 => _416.state, 'access', _417 => _417.patterns, 'optionalAccess', _418 => _418.find, 'call', _419 => _419((p) => p.id === pid)]), () => ( null)) };
10578
11186
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
10579
11187
  if (l.type === "annotation") {
10580
11188
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
@@ -10583,7 +11191,7 @@ var ImageEditorController = (_class12 = class {
10583
11191
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
10584
11192
  const fromAnnotation = scaled ? _chunkUYXL6ZWQcjs.shapeFromAnnotation.call(void 0, scaled) : null;
10585
11193
  const m = [sx, 0, 0, sy, 0, 0];
10586
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _418 => _418.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11194
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _420 => _420.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
10587
11195
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
10588
11196
  if (scaled && fromAnnotation) moved.annotation = scaled;
10589
11197
  else delete moved.annotation;
@@ -10601,7 +11209,7 @@ var ImageEditorController = (_class12 = class {
10601
11209
  this.notify();
10602
11210
  }
10603
11211
  toJSON(options) {
10604
- const root = _optionalChain([this, 'access', _419 => _419.contentsStack, 'access', _420 => _420[0], 'optionalAccess', _421 => _421.saved]);
11212
+ const root = _optionalChain([this, 'access', _421 => _421.contentsStack, 'access', _422 => _422[0], 'optionalAccess', _423 => _423.saved]);
10605
11213
  const current = this.state;
10606
11214
  const element = this.imageElement;
10607
11215
  if (root) {
@@ -10612,8 +11220,8 @@ var ImageEditorController = (_class12 = class {
10612
11220
  let out;
10613
11221
  try {
10614
11222
  out = this.serializeState();
10615
- if (_optionalChain([this, 'access', _422 => _422.state, 'access', _423 => _423.selection, 'optionalAccess', _424 => _424.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
10616
- if (_optionalChain([this, 'access', _425 => _425.state, 'access', _426 => _426.channels, 'optionalAccess', _427 => _427.length])) out.channels = serializeChannels(this.state.channels);
11223
+ if (_optionalChain([this, 'access', _424 => _424.state, 'access', _425 => _425.selection, 'optionalAccess', _426 => _426.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
11224
+ if (_optionalChain([this, 'access', _427 => _427.state, 'access', _428 => _428.channels, 'optionalAccess', _429 => _429.length])) out.channels = serializeChannels(this.state.channels);
10617
11225
  } finally {
10618
11226
  if (root) {
10619
11227
  this.state = current;
@@ -10727,10 +11335,10 @@ var ImageEditorController = (_class12 = class {
10727
11335
  serializeState() {
10728
11336
  const { width, height } = this.naturalSize;
10729
11337
  const view = _chunkUYXL6ZWQcjs.legacyView.call(void 0, this.stack(), width, height, null);
10730
- if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _428 => _428.state, 'access', _429 => _429.patterns, 'optionalAccess', _430 => _430.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
11338
+ if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _430 => _430.state, 'access', _431 => _431.patterns, 'optionalAccess', _432 => _432.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
10731
11339
  return {
10732
11340
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
10733
- version: _optionalChain([view, 'access', _431 => _431.adjustments, 'access', _432 => _432.layers, 'optionalAccess', _433 => _433.length]) ? 2 : 1,
11341
+ version: _optionalChain([view, 'access', _433 => _433.adjustments, 'access', _434 => _434.layers, 'optionalAccess', _435 => _435.length]) ? 2 : 1,
10734
11342
  crop: this.state.crop ? { ...this.state.crop } : null,
10735
11343
  transform: { ...this.state.transform },
10736
11344
  adjustments: serializeAdjustments(view.adjustments),
@@ -10755,7 +11363,7 @@ var ImageEditorController = (_class12 = class {
10755
11363
  };
10756
11364
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
10757
11365
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
10758
- if (_optionalChain([this, 'access', _434 => _434.state, 'access', _435 => _435.patterns, 'optionalAccess', _436 => _436.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
11366
+ if (_optionalChain([this, 'access', _436 => _436.state, 'access', _437 => _437.patterns, 'optionalAccess', _438 => _438.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
10759
11367
  if (smartContents) out.smartContents = smartContents;
10760
11368
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
10761
11369
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -10765,7 +11373,7 @@ var ImageEditorController = (_class12 = class {
10765
11373
  }, _class12);
10766
11374
  function serializeAdjustments(adjustments) {
10767
11375
  const out = { ...adjustments };
10768
- if (_optionalChain([out, 'access', _437 => _437.layers, 'optionalAccess', _438 => _438.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
11376
+ if (_optionalChain([out, 'access', _439 => _439.layers, 'optionalAccess', _440 => _440.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
10769
11377
  else delete out.layers;
10770
11378
  if (_chunkUYXL6ZWQcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION) {
10771
11379
  delete out.process;
@@ -10801,11 +11409,11 @@ function withDevelop(layer, partial) {
10801
11409
  return { ...layer, filters };
10802
11410
  }
10803
11411
  function withBlur(layer, radius) {
10804
- const existing = _optionalChain([layer, 'access', _439 => _439.filters, 'optionalAccess', _440 => _440.find, 'call', _441 => _441((f) => f.kind === "blur")]);
11412
+ const existing = _optionalChain([layer, 'access', _441 => _441.filters, 'optionalAccess', _442 => _442.find, 'call', _443 => _443((f) => f.kind === "blur")]);
10805
11413
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
10806
11414
  if (radius > 0) {
10807
11415
  filters.push({
10808
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _442 => _442.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
11416
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _444 => _444.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
10809
11417
  kind: "blur",
10810
11418
  enabled: true,
10811
11419
  radius
@@ -10901,7 +11509,7 @@ function collectStateTiles(layers, into) {
10901
11509
  if (l.type === "shape" || l.type === "type") _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
10902
11510
  if (l.type === "smart") {
10903
11511
  _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
10904
- if (_optionalChain([l, 'access', _443 => _443.smartFilters, 'optionalAccess', _444 => _444.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
11512
+ if (_optionalChain([l, 'access', _445 => _445.smartFilters, 'optionalAccess', _446 => _446.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
10905
11513
  if (l.contents.raster) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.contents.raster, into);
10906
11514
  if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
10907
11515
  }
@@ -10933,7 +11541,7 @@ function pixelsOnly(layers) {
10933
11541
  for (const l of layers) {
10934
11542
  if (l.type === "adjustment") continue;
10935
11543
  if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
10936
- else if (l.type === "pixel" && _optionalChain([l, 'access', _445 => _445.filters, 'optionalAccess', _446 => _446.length])) {
11544
+ else if (l.type === "pixel" && _optionalChain([l, 'access', _447 => _447.filters, 'optionalAccess', _448 => _448.length])) {
10937
11545
  const p = { ...l };
10938
11546
  delete p.filters;
10939
11547
  out.push(p);
@@ -10999,7 +11607,7 @@ function toHex(c) {
10999
11607
  return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
11000
11608
  }
11001
11609
  function normalizeSelection(mask) {
11002
- return _optionalChain([mask, 'optionalAccess', _447 => _447.bounds]) ? mask : null;
11610
+ return _optionalChain([mask, 'optionalAccess', _449 => _449.bounds]) ? mask : null;
11003
11611
  }
11004
11612
  function sameSelection(a, b) {
11005
11613
  if (a.width !== b.width || a.height !== b.height) return false;
@@ -11209,7 +11817,7 @@ function loadImageEditorDocument(input) {
11209
11817
  }
11210
11818
  const state = { version: 1, ...result.value };
11211
11819
  if (isV2) {
11212
- if (_optionalChain([state, 'access', _448 => _448.adjustments, 'access', _449 => _449.layers, 'optionalAccess', _450 => _450.length])) state.version = 2;
11820
+ if (_optionalChain([state, 'access', _450 => _450.adjustments, 'access', _451 => _451.layers, 'optionalAccess', _452 => _452.length])) state.version = 2;
11213
11821
  result.report.version = 2;
11214
11822
  }
11215
11823
  if (state.selection === void 0) delete state.selection;
@@ -11417,7 +12025,7 @@ function findAdjustmentControl(id) {
11417
12025
  }
11418
12026
  function findLayerControl(kind, id) {
11419
12027
  if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
11420
- return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _451 => _451[kind], 'optionalAccess', _452 => _452.find, 'call', _453 => _453((c) => c.id === id)]);
12028
+ return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _453 => _453[kind], 'optionalAccess', _454 => _454.find, 'call', _455 => _455((c) => c.id === id)]);
11421
12029
  }
11422
12030
  function clampControlValue(spec, v) {
11423
12031
  if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
@@ -11634,7 +12242,7 @@ var DEPTH_MASK_CONTROLS = [
11634
12242
  // src/image-editor/playback.ts
11635
12243
  var IMAGE_PLAYBACK_KIND = "layer";
11636
12244
  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)$/;
11637
- var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|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)$/;
12245
+ var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|quick_select|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)$/;
11638
12246
  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)$/;
11639
12247
  var CROP = /^(set_crop|crop_to_selection|reset_crop|set_rotation|flip_image|transform_layer|warp_layer|flip_layer|offset_layer)$/;
11640
12248
  var ADJUST = /^(set_adjustments|add_adjustment_layer|update_adjustment_layer|remove_adjustment_layer|move_adjustment_layer)$/;
@@ -11756,6 +12364,7 @@ var SELECTION_TOOLS = [
11756
12364
  { id: "lasso", label: "Lasso" },
11757
12365
  { id: "polygon", label: "Polygonal Lasso" },
11758
12366
  { id: "magnetic", label: "Magnetic Lasso" },
12367
+ { id: "quick", label: "Quick Selection" },
11759
12368
  { id: "range", label: "Color Range" },
11760
12369
  { id: "type", label: "Type Mask" },
11761
12370
  { id: "type-vertical", label: "Vertical Type Mask" }
@@ -11793,6 +12402,9 @@ var DEFAULT_SELECTION_TOOL_OPTIONS = {
11793
12402
  magneticWidth: 10,
11794
12403
  magneticContrast: 10,
11795
12404
  magneticFrequency: 57,
12405
+ quickSize: 30,
12406
+ quickSampleAll: true,
12407
+ quickEnhance: false,
11796
12408
  typeText: "Type",
11797
12409
  typeSize: 72,
11798
12410
  typeFamily: "sans-serif"
@@ -11865,7 +12477,7 @@ function summary(controller) {
11865
12477
  const area = _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel);
11866
12478
  return {
11867
12479
  empty: !sel,
11868
- bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _454 => _454.bounds]), () => ( null)),
12480
+ bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _456 => _456.bounds]), () => ( null)),
11869
12481
  /** Σ coverage in pixels. */
11870
12482
  area: Math.round(area),
11871
12483
  percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
@@ -11941,7 +12553,7 @@ function createImageSelectionTools(controller) {
11941
12553
  break;
11942
12554
  }
11943
12555
  case "polygon": {
11944
- const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _455 => _455.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _456 => _456.y]), NaN) })) : [];
12556
+ const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _457 => _457.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _458 => _458.y]), NaN) })) : [];
11945
12557
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
11946
12558
  throw new Error("polygon needs points: at least 3 { x, y } vertices.");
11947
12559
  }
@@ -12178,7 +12790,7 @@ function createImageSelectionTools(controller) {
12178
12790
  },
12179
12791
  annotations: writeAnnotations("Select a polygon (lasso)", true),
12180
12792
  handler: async (args) => {
12181
- const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _457 => _457.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _458 => _458.y]), NaN) })) : [];
12793
+ const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _459 => _459.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _460 => _460.y]), NaN) })) : [];
12182
12794
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
12183
12795
  throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
12184
12796
  }
@@ -12192,6 +12804,42 @@ function createImageSelectionTools(controller) {
12192
12804
  return { ...summary(controller), outlinePoints: outline.length };
12193
12805
  }
12194
12806
  };
12807
+ const quickSelectTool = {
12808
+ name: "quick_select",
12809
+ title: "Quick Selection",
12810
+ description: "Quick Selection: paints brush strokes (paths in natural image pixels) that each grow into the region they are painted on, out to its edges (a graph cut on colour and edges), combined with the selection by mode. With replace (default) the first stroke replaces the selection and later ones add, as the brush does; use mode subtract to take an area back out. Best for a subject or area that differs from its surroundings: paint inside it, away from the edge, then check with get_selection and capture_view and add or subtract strokes where it leaked or fell short. All strokes are one undoable step. Returns the selection.",
12811
+ inputSchema: {
12812
+ type: "object",
12813
+ properties: {
12814
+ strokes: {
12815
+ type: "array",
12816
+ minItems: 1,
12817
+ items: { type: "array", minItems: 1, items: pointSchema, description: "One stroke: the brush path, in order (one point is a dab)." },
12818
+ description: "Brush strokes in natural image pixels, applied in order."
12819
+ },
12820
+ size: { type: "number", minimum: 1, maximum: 2500, description: "Brush diameter in natural image pixels (default 30). Smaller for a narrow area, larger for a broad one." },
12821
+ mode: modeSchema,
12822
+ sampleAllLayers: { type: "boolean", description: "Read every layer (default true); false reads only the active pixel layer." },
12823
+ enhanceEdge: { type: "boolean", description: "Smoother, less blocky edges (Auto-Enhance; default false). Use it before masking a smooth-edged subject." }
12824
+ },
12825
+ required: ["strokes"],
12826
+ additionalProperties: false
12827
+ },
12828
+ annotations: writeAnnotations("Quick Selection"),
12829
+ handler: async (args) => {
12830
+ const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _461 => _461.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _462 => _462.y]), NaN) })) : []) : [];
12831
+ if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
12832
+ throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
12833
+ }
12834
+ await controller.quickSelect(strokes, {
12835
+ size: args.size === void 0 ? void 0 : num2(args.size, 30),
12836
+ mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, args.mode),
12837
+ sampleAllLayers: args.sampleAllLayers,
12838
+ enhanceEdge: args.enhanceEdge
12839
+ });
12840
+ return summary(controller);
12841
+ }
12842
+ };
12195
12843
  const magicWandTool = {
12196
12844
  name: "magic_wand",
12197
12845
  title: "Magic wand",
@@ -12285,7 +12933,7 @@ function createImageSelectionTools(controller) {
12285
12933
  await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
12286
12934
  } else {
12287
12935
  const samples = args.samples.map((s, i) => {
12288
- if (typeof _optionalChain([s, 'optionalAccess', _459 => _459.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
12936
+ if (typeof _optionalChain([s, 'optionalAccess', _463 => _463.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
12289
12937
  const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
12290
12938
  return at ? { color: s.color, at } : { color: s.color };
12291
12939
  });
@@ -12744,6 +13392,7 @@ function createImageSelectionTools(controller) {
12744
13392
  selectRect,
12745
13393
  selectEllipse,
12746
13394
  selectPolygonTool,
13395
+ quickSelectTool,
12747
13396
  lineTool,
12748
13397
  magicWandTool,
12749
13398
  colorRangeTool,
@@ -12800,12 +13449,12 @@ function createImageSubjectSelectionTool(controller) {
12800
13449
  annotations: { ...writeAnnotations("Select a subject"), openWorldHint: true },
12801
13450
  handler: async ({ target, maxSegments, mode, feather }, context) => {
12802
13451
  if (typeof target !== "string" || !target.trim()) throw new Error("target must describe what to select.");
12803
- const perform = _optionalChain([context, 'optionalAccess', _460 => _460.perform]);
13452
+ const perform = _optionalChain([context, 'optionalAccess', _464 => _464.perform]);
12804
13453
  const { segments } = await controller.selectSubject(target, {
12805
13454
  mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, mode),
12806
13455
  feather: num2(feather, 0),
12807
13456
  maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
12808
- signal: _optionalChain([context, 'optionalAccess', _461 => _461.signal]),
13457
+ signal: _optionalChain([context, 'optionalAccess', _465 => _465.signal]),
12809
13458
  // Under playback the cursor traces what the model found, as a lasso, before it is selected.
12810
13459
  beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
12811
13460
  });
@@ -12884,7 +13533,7 @@ async function renderImageRegion(controller, request) {
12884
13533
  const maskView = maskViewCanvas(controller, document);
12885
13534
  if (maskView) context.drawImage(maskView, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
12886
13535
  const selection = state.selection;
12887
- if (_optionalChain([selection, 'optionalAccess', _462 => _462.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
13536
+ if (_optionalChain([selection, 'optionalAccess', _466 => _466.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
12888
13537
  const shade = selectionShade(selection, document);
12889
13538
  if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
12890
13539
  }
@@ -12909,7 +13558,7 @@ function createImageCaptureSurface(controller) {
12909
13558
  return {
12910
13559
  units: "image pixels",
12911
13560
  content: whole,
12912
- selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _463 => _463.getState, 'call', _464 => _464(), 'access', _465 => _465.selection, 'optionalAccess', _466 => _466.bounds]), () => ( null)) }),
13561
+ selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _467 => _467.getState, 'call', _468 => _468(), 'access', _469 => _469.selection, 'optionalAccess', _470 => _470.bounds]), () => ( null)) }),
12913
13562
  overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
12914
13563
  maxScale: 8,
12915
13564
  render: (request) => renderImageRegion(controller, request)
@@ -13243,7 +13892,7 @@ function describeLayer(layer, activeId, boundsOf) {
13243
13892
  out.bounds = boundsOf(layer);
13244
13893
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
13245
13894
  out.shape = {
13246
- components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _467 => _467.live, 'optionalAccess', _468 => _468.kind]), () => ( "path")) })),
13895
+ components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _471 => _471.live, 'optionalAccess', _472 => _472.kind]), () => ( "path")) })),
13247
13896
  fill: layer.fill ? layer.fill.type : null,
13248
13897
  stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
13249
13898
  };
@@ -13266,8 +13915,8 @@ function describeLayer(layer, activeId, boundsOf) {
13266
13915
  out.bounds = boundsOf(layer);
13267
13916
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
13268
13917
  out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
13269
- out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _469 => _469.smartFilters, 'optionalAccess', _470 => _470.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
13270
- out.filterMask = maskSummary(_optionalChain([layer, 'access', _471 => _471.smartFilters, 'optionalAccess', _472 => _472.mask]));
13918
+ out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _473 => _473.smartFilters, 'optionalAccess', _474 => _474.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
13919
+ out.filterMask = maskSummary(_optionalChain([layer, 'access', _475 => _475.smartFilters, 'optionalAccess', _476 => _476.mask]));
13271
13920
  break;
13272
13921
  }
13273
13922
  return out;
@@ -13295,7 +13944,7 @@ function createImageLayerTools(controller) {
13295
13944
  if (!loc) return null;
13296
13945
  return {
13297
13946
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
13298
- parentId: _nullishCoalesce(_optionalChain([loc, 'access', _473 => _473.parent, 'optionalAccess', _474 => _474.id]), () => ( null)),
13947
+ parentId: _nullishCoalesce(_optionalChain([loc, 'access', _477 => _477.parent, 'optionalAccess', _478 => _478.id]), () => ( null)),
13299
13948
  index: loc.index
13300
13949
  };
13301
13950
  };
@@ -13618,7 +14267,7 @@ function createImageLayerTools(controller) {
13618
14267
  if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
13619
14268
  const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
13620
14269
  const shown = controller.setMaskView(view, id);
13621
- return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _475 => _475.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _476 => _476.layerId]), () => ( null)) };
14270
+ return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _479 => _479.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _480 => _480.layerId]), () => ( null)) };
13622
14271
  }
13623
14272
  };
13624
14273
  const maskProps = {
@@ -14112,7 +14761,7 @@ function snapTo45(from, point) {
14112
14761
  return { x: from.x + Math.cos(a) * len, y: from.y + Math.sin(a) * len };
14113
14762
  }
14114
14763
  var SelectionGesture = (_class13 = class {
14115
- constructor(controller, getOptions) {;_class13.prototype.__init102.call(this);_class13.prototype.__init103.call(this);_class13.prototype.__init104.call(this);_class13.prototype.__init105.call(this);_class13.prototype.__init106.call(this);_class13.prototype.__init107.call(this);_class13.prototype.__init108.call(this);_class13.prototype.__init109.call(this);_class13.prototype.__init110.call(this);_class13.prototype.__init111.call(this);
14764
+ constructor(controller, getOptions) {;_class13.prototype.__init102.call(this);_class13.prototype.__init103.call(this);_class13.prototype.__init104.call(this);_class13.prototype.__init105.call(this);_class13.prototype.__init106.call(this);_class13.prototype.__init107.call(this);_class13.prototype.__init108.call(this);_class13.prototype.__init109.call(this);_class13.prototype.__init110.call(this);_class13.prototype.__init111.call(this);_class13.prototype.__init112.call(this);
14116
14765
  this.controller = controller;
14117
14766
  this.getOptions = getOptions;
14118
14767
  }
@@ -14131,9 +14780,14 @@ var SelectionGesture = (_class13 = class {
14131
14780
  __init110() {this.closeRadius = 8}
14132
14781
  /** The last error (e.g. pixels unavailable for the wand), for the UI to show. */
14133
14782
  __init111() {this.error = null}
14783
+ __init112() {this.pending = Promise.resolve()}
14134
14784
  get active() {
14135
14785
  return this.start !== null || this.polygon !== null || this.magnetic !== null;
14136
14786
  }
14787
+ /** Resolves once a Quick Selection stroke has been applied. */
14788
+ get settled() {
14789
+ return this.pending;
14790
+ }
14137
14791
  /** The anchors of a Magnetic Lasso being drawn (empty otherwise). */
14138
14792
  get magneticAnchors() {
14139
14793
  const m = this.magnetic;
@@ -14145,7 +14799,7 @@ var SelectionGesture = (_class13 = class {
14145
14799
  if (this.polygon) return this.current ? [...this.polygon, this.current] : this.polygon.slice();
14146
14800
  if (!this.start || !this.current) return null;
14147
14801
  const { tool } = this.getOptions();
14148
- if (tool === "lasso") return this.points.length > 1 ? this.points.slice() : null;
14802
+ if (tool === "lasso" || tool === "quick") return this.points.length > 1 ? this.points.slice() : null;
14149
14803
  const rect = normalizeRect({
14150
14804
  x: this.start.x,
14151
14805
  y: this.start.y,
@@ -14279,7 +14933,8 @@ var SelectionGesture = (_class13 = class {
14279
14933
  }
14280
14934
  if (!this.start) return false;
14281
14935
  this.current = point;
14282
- if (this.getOptions().tool === "lasso") {
14936
+ const drawn = this.getOptions().tool;
14937
+ if (drawn === "lasso" || drawn === "quick") {
14283
14938
  const last = this.points[this.points.length - 1];
14284
14939
  if (Math.hypot(point.x - last.x, point.y - last.y) < 0.5) return false;
14285
14940
  this.points.push(point);
@@ -14299,6 +14954,25 @@ var SelectionGesture = (_class13 = class {
14299
14954
  if (point) this.move(point);
14300
14955
  const options = this.getOptions();
14301
14956
  const mode = selectionModeFromModifiers(_nullishCoalesce(modifiers, () => ( this.modifiers)), options.mode);
14957
+ if (options.tool === "quick") {
14958
+ const stroke = this.points;
14959
+ this.start = null;
14960
+ this.current = null;
14961
+ this.points = [];
14962
+ const strokeMode = mode === "replace" && this.controller.getSelection() ? "add" : mode;
14963
+ this.pending = this.controller.quickSelect([stroke], {
14964
+ size: _nullishCoalesce(options.quickSize, () => ( 30)),
14965
+ mode: strokeMode,
14966
+ sampleAllLayers: _nullishCoalesce(options.quickSampleAll, () => ( true)),
14967
+ enhanceEdge: _nullishCoalesce(options.quickEnhance, () => ( false))
14968
+ }).then(
14969
+ () => void 0,
14970
+ (err) => {
14971
+ this.error = err instanceof Error ? err.message : String(err);
14972
+ }
14973
+ );
14974
+ return false;
14975
+ }
14302
14976
  const path = this.draftPath;
14303
14977
  const rect = normalizeRect({
14304
14978
  x: this.start.x,
@@ -14441,7 +15115,7 @@ function handleSelectionShortcut(controller, e, onError) {
14441
15115
  try {
14442
15116
  fn();
14443
15117
  } catch (err) {
14444
- _optionalChain([onError, 'optionalCall', _477 => _477(err instanceof Error ? err.message : String(err))]);
15118
+ _optionalChain([onError, 'optionalCall', _481 => _481(err instanceof Error ? err.message : String(err))]);
14445
15119
  }
14446
15120
  return true;
14447
15121
  };
@@ -14456,9 +15130,9 @@ function handleMaskViewKey(controller, e) {
14456
15130
  if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
14457
15131
  const id = controller.getState().activeLayerId;
14458
15132
  const layer = id ? controller.getLayer(id) : null;
14459
- if (!_optionalChain([layer, 'optionalAccess', _478 => _478.mask]) || layer.mask.source) return false;
15133
+ if (!_optionalChain([layer, 'optionalAccess', _482 => _482.mask]) || layer.mask.source) return false;
14460
15134
  const view = controller.getMaskView();
14461
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _479 => _479.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
15135
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _483 => _483.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
14462
15136
  return true;
14463
15137
  }
14464
15138
  function handleQuickMaskKey(controller, e) {
@@ -14653,14 +15327,14 @@ function handlePaintShortcut(controller, e) {
14653
15327
  return false;
14654
15328
  }
14655
15329
  var PaintGesture = (_class14 = class {
14656
- constructor(controller) {;_class14.prototype.__init112.call(this);_class14.prototype.__init113.call(this);_class14.prototype.__init114.call(this);
15330
+ constructor(controller) {;_class14.prototype.__init113.call(this);_class14.prototype.__init114.call(this);_class14.prototype.__init115.call(this);
14657
15331
  this.controller = controller;
14658
15332
  }
14659
15333
 
14660
- __init112() {this.stroke = null}
14661
- __init113() {this.move = null}
15334
+ __init113() {this.stroke = null}
15335
+ __init114() {this.move = null}
14662
15336
  /** The last refusal (e.g. "layer is locked"), for the editor to show. */
14663
- __init114() {this.error = null}
15337
+ __init115() {this.error = null}
14664
15338
  get active() {
14665
15339
  return Boolean(this.stroke || this.move);
14666
15340
  }
@@ -14672,7 +15346,7 @@ var PaintGesture = (_class14 = class {
14672
15346
  const layer = this.controller.getActiveLayer();
14673
15347
  if (!layer) throw new Error("Select a layer to move in the Layers panel.");
14674
15348
  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.`);
14675
- if (_optionalChain([layer, 'access', _480 => _480.locks, 'optionalAccess', _481 => _481.all]) || _optionalChain([layer, 'access', _482 => _482.locks, 'optionalAccess', _483 => _483.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
15349
+ if (_optionalChain([layer, 'access', _484 => _484.locks, 'optionalAccess', _485 => _485.all]) || _optionalChain([layer, 'access', _486 => _486.locks, 'optionalAccess', _487 => _487.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
14676
15350
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
14677
15351
  const b = _chunkUYXL6ZWQcjs.shapeGeometryBounds.call(void 0, layer);
14678
15352
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
@@ -14729,7 +15403,7 @@ var PaintGesture = (_class14 = class {
14729
15403
  this.move = null;
14730
15404
  }
14731
15405
  cancel() {
14732
- _optionalChain([this, 'access', _484 => _484.stroke, 'optionalAccess', _485 => _485.cancel, 'call', _486 => _486()]);
15406
+ _optionalChain([this, 'access', _488 => _488.stroke, 'optionalAccess', _489 => _489.cancel, 'call', _490 => _490()]);
14733
15407
  this.stroke = null;
14734
15408
  this.move = null;
14735
15409
  }
@@ -15154,7 +15828,7 @@ function checkSource(controller, source) {
15154
15828
  }
15155
15829
  return p;
15156
15830
  }
15157
- var SOURCE = {
15831
+ var SOURCE2 = {
15158
15832
  type: "object",
15159
15833
  description: "Source point in document pixels (an Alt-click). Given, it replaces the clone source and the offset starts afresh at this stroke; missing, the current clone source is used (set_clone_source).",
15160
15834
  properties: { x: { type: "number", description: "Source x in px." }, y: { type: "number", description: "Source y in px." } },
@@ -15178,7 +15852,7 @@ function createImageRetouchTools(controller) {
15178
15852
  type: "object",
15179
15853
  properties: {
15180
15854
  points: POINTS,
15181
- source: SOURCE,
15855
+ source: SOURCE2,
15182
15856
  aligned: { type: "boolean", description: "Keep the offset for the next strokes (default the current option, true)." },
15183
15857
  sample: SAMPLE,
15184
15858
  brush: BRUSH2,
@@ -15198,7 +15872,7 @@ function createImageRetouchTools(controller) {
15198
15872
  type: "object",
15199
15873
  properties: {
15200
15874
  points: POINTS,
15201
- source: SOURCE,
15875
+ source: SOURCE2,
15202
15876
  aligned: { type: "boolean", description: "Keep the offset for the next strokes (default the current option, true)." },
15203
15877
  sample: SAMPLE,
15204
15878
  brush: BRUSH2,
@@ -15810,7 +16484,7 @@ function createImageSmartObjectTools(controller) {
15810
16484
  const layerSummary = (id) => {
15811
16485
  const s = controller.getState();
15812
16486
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
15813
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _487 => _487.parent, 'optionalAccess', _488 => _488.id]), () => ( null)), index: loc.index } : null;
16487
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _491 => _491.parent, 'optionalAccess', _492 => _492.id]), () => ( null)), index: loc.index } : null;
15814
16488
  };
15815
16489
  const getSmart = {
15816
16490
  name: "get_smart_object",
@@ -16367,7 +17041,7 @@ function createImageShapeTools(controller) {
16367
17041
  const layerSummary = (id) => {
16368
17042
  const s = controller.getState();
16369
17043
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
16370
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _489 => _489.parent, 'optionalAccess', _490 => _490.id]), () => ( null)), index: loc.index } : null;
17044
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _493 => _493.parent, 'optionalAccess', _494 => _494.id]), () => ( null)), index: loc.index } : null;
16371
17045
  };
16372
17046
  const get = {
16373
17047
  name: "get_shape_layer",
@@ -16584,7 +17258,7 @@ function createImageShapeTools(controller) {
16584
17258
  const mode = args.mode;
16585
17259
  controller.pathToSelection(pathSpec(args), { feather: args.feather, antiAlias: args.antiAlias, mode });
16586
17260
  const sel = controller.getSelection();
16587
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _491 => _491.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17261
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _495 => _495.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
16588
17262
  }
16589
17263
  };
16590
17264
  const getVectorMask = {
@@ -16615,7 +17289,7 @@ function createImageShapeTools(controller) {
16615
17289
  handler: (args) => {
16616
17290
  const id = layerArg(args.layerId);
16617
17291
  const spec = pathSpec(args);
16618
- const hasPath = _optionalChain([spec, 'access', _492 => _492.components, 'optionalAccess', _493 => _493.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
17292
+ const hasPath = _optionalChain([spec, 'access', _496 => _496.components, 'optionalAccess', _497 => _497.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
16619
17293
  const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
16620
17294
  if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
16621
17295
  controller.addVectorMask(id, from, spec, traceOptions(args));
@@ -16735,7 +17409,7 @@ function createImageTypeTools(controller) {
16735
17409
  const layerSummary = (id) => {
16736
17410
  const s = controller.getState();
16737
17411
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
16738
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _494 => _494.parent, 'optionalAccess', _495 => _495.id]), () => ( null)), index: loc.index } : null;
17412
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _498 => _498.parent, 'optionalAccess', _499 => _499.id]), () => ( null)), index: loc.index } : null;
16739
17413
  };
16740
17414
  const range = (args) => ({ start: args.start, end: args.end });
16741
17415
  const listFonts = {
@@ -16744,7 +17418,7 @@ function createImageTypeTools(controller) {
16744
17418
  description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
16745
17419
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
16746
17420
  annotations: { title: "List fonts", ...READ11 },
16747
- handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _496 => _496.getTextShaper, 'call', _497 => _497(), 'optionalAccess', _498 => _498.id]), () => ( null)) })
17421
+ handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _500 => _500.getTextShaper, 'call', _501 => _501(), 'optionalAccess', _502 => _502.id]), () => ( null)) })
16748
17422
  };
16749
17423
  const get = {
16750
17424
  name: "get_text_layer",
@@ -16900,7 +17574,7 @@ function createImageTypeTools(controller) {
16900
17574
  const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
16901
17575
  controller.selectTextShape(init);
16902
17576
  const sel = controller.getSelection();
16903
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _499 => _499.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17577
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _503 => _503.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
16904
17578
  }
16905
17579
  };
16906
17580
  return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
@@ -17079,7 +17753,7 @@ function createImageEditorToolProvider(controller, options = {}) {
17079
17753
  for (const ref of [aboveId, parentId]) {
17080
17754
  if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
17081
17755
  }
17082
- if (parentId !== void 0 && _optionalChain([controller, 'access', _500 => _500.getLayer, 'call', _501 => _501(parentId), 'optionalAccess', _502 => _502.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
17756
+ if (parentId !== void 0 && _optionalChain([controller, 'access', _504 => _504.getLayer, 'call', _505 => _505(parentId), 'optionalAccess', _506 => _506.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
17083
17757
  const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
17084
17758
  const layer = controller.getAdjustmentLayer(id);
17085
17759
  return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
@@ -17393,7 +18067,7 @@ function maskThumbnailClick(controller, layer, e) {
17393
18067
  } else if (e.altKey && !layer.mask.source) {
17394
18068
  const mode = e.shiftKey ? "overlay" : "gray";
17395
18069
  const view = controller.getMaskView();
17396
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _503 => _503.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
18070
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _507 => _507.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
17397
18071
  } else if (e.shiftKey) {
17398
18072
  controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
17399
18073
  } else {
@@ -17457,7 +18131,7 @@ function layerHasThumbnail(layer) {
17457
18131
  return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
17458
18132
  }
17459
18133
  function layerWarning(layer) {
17460
- if (layer.type === "type" && _optionalChain([layer, 'access', _504 => _504.missingFonts, 'optionalAccess', _505 => _505.length])) {
18134
+ if (layer.type === "type" && _optionalChain([layer, 'access', _508 => _508.missingFonts, 'optionalAccess', _509 => _509.length])) {
17461
18135
  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."}`;
17462
18136
  }
17463
18137
  return null;
@@ -17480,16 +18154,16 @@ function layerMenu(controller) {
17480
18154
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
17481
18155
  const below = loc ? siblings[loc.index - 1] : void 0;
17482
18156
  const hasSel = controller.hasSelection;
17483
- const isPixel = _optionalChain([active, 'optionalAccess', _506 => _506.type]) === "pixel";
17484
- const hasOwnPixels = _optionalChain([active, 'optionalAccess', _507 => _507.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _508 => _508.type]) === "shape" || _optionalChain([active, 'optionalAccess', _509 => _509.type]) === "type" || _optionalChain([active, 'optionalAccess', _510 => _510.type]) === "smart";
18157
+ const isPixel = _optionalChain([active, 'optionalAccess', _510 => _510.type]) === "pixel";
18158
+ const hasOwnPixels = _optionalChain([active, 'optionalAccess', _511 => _511.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _512 => _512.type]) === "shape" || _optionalChain([active, 'optionalAccess', _513 => _513.type]) === "type" || _optionalChain([active, 'optionalAccess', _514 => _514.type]) === "smart";
17485
18159
  return [
17486
18160
  { action: "new-layer", label: "New Layer", enabled: true },
17487
18161
  { action: "new-group", label: "New Group", enabled: true },
17488
18162
  { action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
17489
18163
  { action: "delete", label: "Delete Layer", enabled: Boolean(active) },
17490
18164
  { action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
17491
- { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _511 => _511.type]) === "group" },
17492
- { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _512 => _512.visible]) && _optionalChain([below, 'optionalAccess', _513 => _513.type]) === "pixel") },
18165
+ { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _515 => _515.type]) === "group" },
18166
+ { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _516 => _516.visible]) && _optionalChain([below, 'optionalAccess', _517 => _517.type]) === "pixel") },
17493
18167
  { action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
17494
18168
  { action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
17495
18169
  { action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
@@ -17499,27 +18173,27 @@ function layerMenu(controller) {
17499
18173
  { action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
17500
18174
  { action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
17501
18175
  { action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
17502
- { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _514 => _514.mask])) },
17503
- { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _515 => _515.mask])) },
17504
- { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _516 => _516.mask, 'optionalAccess', _517 => _517.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _518 => _518.mask])) },
17505
- { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _519 => _519.mask, 'optionalAccess', _520 => _520.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _521 => _521.mask]) && !active.mask.source) },
17506
- { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _522 => _522.mask, 'optionalAccess', _523 => _523.source])) },
17507
- { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _524 => _524.mask, 'optionalAccess', _525 => _525.source])) },
17508
- { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _526 => _526.mask, 'optionalAccess', _527 => _527.source])) && hasSel },
17509
- { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _528 => _528.vectorMask])) },
17510
- { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _529 => _529.vectorMask, 'optionalAccess', _530 => _530.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _531 => _531.vectorMask])) },
17511
- { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _532 => _532.vectorMask])) },
17512
- { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _533 => _533.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _534 => _534.type]) === "smart" || _optionalChain([active, 'optionalAccess', _535 => _535.type]) === "shape" || _optionalChain([active, 'optionalAccess', _536 => _536.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _537 => _537.type]) === "pixel" && _optionalChain([active, 'access', _538 => _538.filters, 'optionalAccess', _539 => _539.length])) },
18176
+ { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _518 => _518.mask])) },
18177
+ { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _519 => _519.mask])) },
18178
+ { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _520 => _520.mask, 'optionalAccess', _521 => _521.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _522 => _522.mask])) },
18179
+ { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _523 => _523.mask, 'optionalAccess', _524 => _524.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _525 => _525.mask]) && !active.mask.source) },
18180
+ { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _526 => _526.mask, 'optionalAccess', _527 => _527.source])) },
18181
+ { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _528 => _528.mask, 'optionalAccess', _529 => _529.source])) },
18182
+ { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _530 => _530.mask, 'optionalAccess', _531 => _531.source])) && hasSel },
18183
+ { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _532 => _532.vectorMask])) },
18184
+ { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _533 => _533.vectorMask, 'optionalAccess', _534 => _534.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _535 => _535.vectorMask])) },
18185
+ { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _536 => _536.vectorMask])) },
18186
+ { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _537 => _537.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _538 => _538.type]) === "smart" || _optionalChain([active, 'optionalAccess', _539 => _539.type]) === "shape" || _optionalChain([active, 'optionalAccess', _540 => _540.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _541 => _541.type]) === "pixel" && _optionalChain([active, 'access', _542 => _542.filters, 'optionalAccess', _543 => _543.length])) },
17513
18187
  { action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
17514
- { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _540 => _540.type]) === "smart" },
17515
- { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _541 => _541.type]) === "smart" },
17516
- { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _542 => _542.type]) === "smart" && !_optionalChain([active, 'access', _543 => _543.smartFilters, 'optionalAccess', _544 => _544.mask]) },
17517
- { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _545 => _545.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
18188
+ { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _544 => _544.type]) === "smart" },
18189
+ { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _545 => _545.type]) === "smart" },
18190
+ { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _546 => _546.type]) === "smart" && !_optionalChain([active, 'access', _547 => _547.smartFilters, 'optionalAccess', _548 => _548.mask]) },
18191
+ { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _549 => _549.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
17518
18192
  ];
17519
18193
  }
17520
18194
  async function runLayerMenuAction(controller, action) {
17521
18195
  const active = controller.getActiveLayer();
17522
- const id = _optionalChain([active, 'optionalAccess', _546 => _546.id]);
18196
+ const id = _optionalChain([active, 'optionalAccess', _550 => _550.id]);
17523
18197
  try {
17524
18198
  switch (action) {
17525
18199
  case "new-layer":
@@ -17575,10 +18249,10 @@ async function runLayerMenuAction(controller, action) {
17575
18249
  if (id) controller.removeLayerMask(id);
17576
18250
  break;
17577
18251
  case "toggle-mask":
17578
- if (id && _optionalChain([active, 'optionalAccess', _547 => _547.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
18252
+ if (id && _optionalChain([active, 'optionalAccess', _551 => _551.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
17579
18253
  break;
17580
18254
  case "toggle-mask-link":
17581
- if (id && _optionalChain([active, 'optionalAccess', _548 => _548.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
18255
+ if (id && _optionalChain([active, 'optionalAccess', _552 => _552.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
17582
18256
  break;
17583
18257
  case "add-vector-mask":
17584
18258
  case "add-vector-mask-hide":
@@ -17591,7 +18265,7 @@ async function runLayerMenuAction(controller, action) {
17591
18265
  if (id) controller.removeVectorMask(id);
17592
18266
  break;
17593
18267
  case "toggle-vector-mask":
17594
- if (id && _optionalChain([active, 'optionalAccess', _549 => _549.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
18268
+ if (id && _optionalChain([active, 'optionalAccess', _553 => _553.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
17595
18269
  break;
17596
18270
  case "rasterize-vector-mask":
17597
18271
  if (id) controller.rasterizeVectorMask(id);
@@ -17612,7 +18286,7 @@ async function runLayerMenuAction(controller, action) {
17612
18286
  if (id) controller.setSmartFilterMask(id, "reveal-all");
17613
18287
  break;
17614
18288
  case "toggle-clip":
17615
- if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _550 => _550.clipped]) });
18289
+ if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _554 => _554.clipped]) });
17616
18290
  break;
17617
18291
  }
17618
18292
  return null;
@@ -17622,7 +18296,7 @@ async function runLayerMenuAction(controller, action) {
17622
18296
  }
17623
18297
  function smartFilterRows(layer) {
17624
18298
  if (layer.type !== "smart") return [];
17625
- const list = _nullishCoalesce(_optionalChain([layer, 'access', _551 => _551.smartFilters, 'optionalAccess', _552 => _552.filters]), () => ( []));
18299
+ const list = _nullishCoalesce(_optionalChain([layer, 'access', _555 => _555.smartFilters, 'optionalAccess', _556 => _556.filters]), () => ( []));
17626
18300
  const rows = list.map((f, index) => ({
17627
18301
  filter: f,
17628
18302
  index,
@@ -17648,8 +18322,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
17648
18322
  };
17649
18323
  collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
17650
18324
  const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
17651
- const imgW = _optionalChain([state, 'access', _553 => _553.imageDimensions, 'optionalAccess', _554 => _554.width]) || 1;
17652
- const imgH = _optionalChain([state, 'access', _555 => _555.imageDimensions, 'optionalAccess', _556 => _556.height]) || 1;
18325
+ const imgW = _optionalChain([state, 'access', _557 => _557.imageDimensions, 'optionalAccess', _558 => _558.width]) || 1;
18326
+ const imgH = _optionalChain([state, 'access', _559 => _559.imageDimensions, 'optionalAccess', _560 => _560.height]) || 1;
17653
18327
  return ctrlLayers.map((l) => {
17654
18328
  const bounds = controller.getLayerBounds(l.id) || {
17655
18329
  x: 0,
@@ -17658,8 +18332,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
17658
18332
  height: imgH
17659
18333
  };
17660
18334
  const sLayer = sLayerMap.get(l.id);
17661
- const assetKey = _optionalChain([sLayer, 'optionalAccess', _557 => _557.asset]);
17662
- const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _558 => _558.source]) === "document" ? fallbackImageUrl : "");
18335
+ const assetKey = _optionalChain([sLayer, 'optionalAccess', _561 => _561.asset]);
18336
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _562 => _562.source]) === "document" ? fallbackImageUrl : "");
17663
18337
  return {
17664
18338
  id: l.id,
17665
18339
  name: l.name || "Untitled Layer",
@@ -17713,9 +18387,9 @@ async function addLayerOfKind(controller, id, init) {
17713
18387
  const cx = Math.round(canvas.width / 2);
17714
18388
  const cy = Math.round(canvas.height / 2);
17715
18389
  return controller.addTextLayer({
17716
- text: _optionalChain([init, 'optionalAccess', _559 => _559.text]) || "New Text",
17717
- x: typeof _optionalChain([init, 'optionalAccess', _560 => _560.x]) === "number" ? init.x : cx - 100,
17718
- y: typeof _optionalChain([init, 'optionalAccess', _561 => _561.y]) === "number" ? init.y : cy,
18390
+ text: _optionalChain([init, 'optionalAccess', _563 => _563.text]) || "New Text",
18391
+ x: typeof _optionalChain([init, 'optionalAccess', _564 => _564.x]) === "number" ? init.x : cx - 100,
18392
+ y: typeof _optionalChain([init, 'optionalAccess', _565 => _565.y]) === "number" ? init.y : cy,
17719
18393
  ...init
17720
18394
  });
17721
18395
  }
@@ -17728,10 +18402,10 @@ async function addLayerOfKind(controller, id, init) {
17728
18402
  return controller.addShapeLayer({
17729
18403
  shape: {
17730
18404
  kind: "rect",
17731
- x: typeof _optionalChain([init, 'optionalAccess', _562 => _562.x]) === "number" ? init.x : cx - Math.round(w / 2),
17732
- y: typeof _optionalChain([init, 'optionalAccess', _563 => _563.y]) === "number" ? init.y : cy - Math.round(h / 2),
17733
- width: typeof _optionalChain([init, 'optionalAccess', _564 => _564.width]) === "number" ? init.width : w,
17734
- height: typeof _optionalChain([init, 'optionalAccess', _565 => _565.height]) === "number" ? init.height : h
18405
+ x: typeof _optionalChain([init, 'optionalAccess', _566 => _566.x]) === "number" ? init.x : cx - Math.round(w / 2),
18406
+ y: typeof _optionalChain([init, 'optionalAccess', _567 => _567.y]) === "number" ? init.y : cy - Math.round(h / 2),
18407
+ width: typeof _optionalChain([init, 'optionalAccess', _568 => _568.width]) === "number" ? init.width : w,
18408
+ height: typeof _optionalChain([init, 'optionalAccess', _569 => _569.height]) === "number" ? init.height : h
17735
18409
  },
17736
18410
  name: "Rectangle",
17737
18411
  ...init
@@ -17746,10 +18420,10 @@ async function addLayerOfKind(controller, id, init) {
17746
18420
  return controller.addShapeLayer({
17747
18421
  shape: {
17748
18422
  kind: "ellipse",
17749
- x: typeof _optionalChain([init, 'optionalAccess', _566 => _566.x]) === "number" ? init.x : cx - Math.round(w / 2),
17750
- y: typeof _optionalChain([init, 'optionalAccess', _567 => _567.y]) === "number" ? init.y : cy - Math.round(h / 2),
17751
- width: typeof _optionalChain([init, 'optionalAccess', _568 => _568.width]) === "number" ? init.width : w,
17752
- height: typeof _optionalChain([init, 'optionalAccess', _569 => _569.height]) === "number" ? init.height : h
18423
+ x: typeof _optionalChain([init, 'optionalAccess', _570 => _570.x]) === "number" ? init.x : cx - Math.round(w / 2),
18424
+ y: typeof _optionalChain([init, 'optionalAccess', _571 => _571.y]) === "number" ? init.y : cy - Math.round(h / 2),
18425
+ width: typeof _optionalChain([init, 'optionalAccess', _572 => _572.width]) === "number" ? init.width : w,
18426
+ height: typeof _optionalChain([init, 'optionalAccess', _573 => _573.height]) === "number" ? init.height : h
17753
18427
  },
17754
18428
  name: "Ellipse",
17755
18429
  ...init
@@ -17810,18 +18484,18 @@ function layerEffectsPanel(layer) {
17810
18484
  if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
17811
18485
  if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
17812
18486
  const fx = layer.effects;
17813
- const readOnly = Boolean(_optionalChain([layer, 'access', _570 => _570.locks, 'optionalAccess', _571 => _571.all]));
18487
+ const readOnly = Boolean(_optionalChain([layer, 'access', _574 => _574.locks, 'optionalAccess', _575 => _575.all]));
17814
18488
  return {
17815
18489
  available: true,
17816
18490
  readOnly,
17817
18491
  reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
17818
- enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _572 => _572.enabled]), () => ( true)),
17819
- scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _573 => _573.scale]), () => ( 1)),
17820
- rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _574 => _574.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
18492
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _576 => _576.enabled]), () => ( true)),
18493
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _577 => _577.scale]), () => ( 1)),
18494
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _578 => _578.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
17821
18495
  };
17822
18496
  }
17823
18497
  function layerEffectsBadge(layer) {
17824
- if (!_optionalChain([layer, 'access', _575 => _575.effects, 'optionalAccess', _576 => _576.items, 'access', _577 => _577.length])) return null;
18498
+ if (!_optionalChain([layer, 'access', _579 => _579.effects, 'optionalAccess', _580 => _580.items, 'access', _581 => _581.length])) return null;
17825
18499
  return _chunkHGTDMKNEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
17826
18500
  }
17827
18501
  var LAYER_EFFECT_MENU = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, kind) }));
@@ -17866,8 +18540,8 @@ function fillControls(f, allowPattern, patterns) {
17866
18540
  }
17867
18541
  function gradientControls(prefix, g) {
17868
18542
  return [
17869
- { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _578 => _578.stops, 'access', _579 => _579[0], 'optionalAccess', _580 => _580.color]), () => ( "#000000")) },
17870
- { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _581 => _581.stops, 'access', _582 => _582[g.stops.length - 1], 'optionalAccess', _583 => _583.color]), () => ( "#ffffff")) },
18543
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _582 => _582.stops, 'access', _583 => _583[0], 'optionalAccess', _584 => _584.color]), () => ( "#000000")) },
18544
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _585 => _585.stops, 'access', _586 => _586[g.stops.length - 1], 'optionalAccess', _587 => _587.color]), () => ( "#ffffff")) },
17871
18545
  { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
17872
18546
  { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
17873
18547
  { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
@@ -17959,19 +18633,19 @@ function layerEffectControls(e, patterns = []) {
17959
18633
  }
17960
18634
  function fillOfType(current, type, patterns) {
17961
18635
  if (type === "gradient") return { type: "gradient", gradient: _chunkHGTDMKNEcjs.defaultEffectGradient.call(void 0, ) };
17962
- if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _584 => _584[0], 'optionalAccess', _585 => _585.id]), () => ( "checker")), scale: 1 };
18636
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _588 => _588[0], 'optionalAccess', _589 => _589.id]), () => ( "checker")), scale: 1 };
17963
18637
  return { type: "color", color: current.type === "color" ? current.color : "#000000" };
17964
18638
  }
17965
18639
  function effectControlChange(effect, key, value, patterns = []) {
17966
18640
  const [top, ...rest] = key.split(".");
17967
18641
  if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
17968
18642
  if (top === "patternId" && !rest.length) {
17969
- const name = _optionalChain([patternOptions, 'call', _586 => _586(patterns), 'access', _587 => _587.find, 'call', _588 => _588((o) => o.value === value), 'optionalAccess', _589 => _589.label]);
18643
+ const name = _optionalChain([patternOptions, 'call', _590 => _590(patterns), 'access', _591 => _591.find, 'call', _592 => _592((o) => o.value === value), 'optionalAccess', _593 => _593.label]);
17970
18644
  return name ? { patternId: value, name } : { patternId: value };
17971
18645
  }
17972
18646
  if (!rest.length) return { [top]: value };
17973
18647
  if (top === "fill" && rest[0] === "patternId") {
17974
- const name = _optionalChain([patternOptions, 'call', _590 => _590(patterns), 'access', _591 => _591.find, 'call', _592 => _592((o) => o.value === value), 'optionalAccess', _593 => _593.label]);
18648
+ const name = _optionalChain([patternOptions, 'call', _594 => _594(patterns), 'access', _595 => _595.find, 'call', _596 => _596((o) => o.value === value), 'optionalAccess', _597 => _597.label]);
17975
18649
  return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
17976
18650
  }
17977
18651
  return { [top]: setPath(getPath(effect, top), rest, value) };
@@ -17998,7 +18672,7 @@ function colorPanelView(controller) {
17998
18672
  profileName: profile.name,
17999
18673
  workingSpace: profile.builtin,
18000
18674
  mode: profile.mode,
18001
- cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _594 => _594.cmykProfile, 'optionalAccess', _595 => _595.name]), () => ( null)),
18675
+ cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _598 => _598.cmykProfile, 'optionalAccess', _599 => _599.name]), () => ( null)),
18002
18676
  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
18003
18677
  };
18004
18678
  }
@@ -18181,32 +18855,32 @@ function boxFrameHit(overlay, p, tolerance, band) {
18181
18855
  return null;
18182
18856
  }
18183
18857
  var FreeTransformTool = (_class15 = class {
18184
- constructor(controller, options = {}) {;_class15.prototype.__init115.call(this);_class15.prototype.__init116.call(this);_class15.prototype.__init117.call(this);_class15.prototype.__init118.call(this);_class15.prototype.__init119.call(this);_class15.prototype.__init120.call(this);_class15.prototype.__init121.call(this);_class15.prototype.__init122.call(this);_class15.prototype.__init123.call(this);_class15.prototype.__init124.call(this);_class15.prototype.__init125.call(this);_class15.prototype.__init126.call(this);_class15.prototype.__init127.call(this);_class15.prototype.__init128.call(this);
18858
+ constructor(controller, options = {}) {;_class15.prototype.__init116.call(this);_class15.prototype.__init117.call(this);_class15.prototype.__init118.call(this);_class15.prototype.__init119.call(this);_class15.prototype.__init120.call(this);_class15.prototype.__init121.call(this);_class15.prototype.__init122.call(this);_class15.prototype.__init123.call(this);_class15.prototype.__init124.call(this);_class15.prototype.__init125.call(this);_class15.prototype.__init126.call(this);_class15.prototype.__init127.call(this);_class15.prototype.__init128.call(this);_class15.prototype.__init129.call(this);
18185
18859
  this.controller = controller;
18186
18860
  this.options = options;
18187
18861
  }
18188
18862
 
18189
18863
 
18190
- __init115() {this.sessionRef = null}
18191
- __init116() {this.modeValue = "scale"}
18864
+ __init116() {this.sessionRef = null}
18865
+ __init117() {this.modeValue = "scale"}
18192
18866
  /** The reference point in the untransformed frame's space (follows the transform). */
18193
- __init117() {this.refBox = { x: 0, y: 0 }}
18194
- __init118() {this.corners = null}
18195
- __init119() {this.drag = null}
18867
+ __init118() {this.refBox = { x: 0, y: 0 }}
18868
+ __init119() {this.corners = null}
18869
+ __init120() {this.drag = null}
18196
18870
  /** The warp mesh in the frame's own space (null: no warp). */
18197
- __init120() {this.mesh = null}
18198
- __init121() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
18199
- __init122() {this.pending = false}
18200
- __init123() {this.viewScale = 1}
18871
+ __init121() {this.mesh = null}
18872
+ __init122() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
18873
+ __init123() {this.pending = false}
18874
+ __init124() {this.viewScale = 1}
18201
18875
 
18202
18876
  /** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
18203
- __init124() {this.typed = {}}
18877
+ __init125() {this.typed = {}}
18204
18878
  /** Width and height scale together when typed (the chain icon). */
18205
- __init125() {this.proportional = true}
18206
- __init126() {this.error = null}
18207
- __init127() {this.lastResult = null}
18879
+ __init126() {this.proportional = true}
18880
+ __init127() {this.error = null}
18881
+ __init128() {this.lastResult = null}
18208
18882
  get active() {
18209
- return Boolean(_optionalChain([this, 'access', _596 => _596.sessionRef, 'optionalAccess', _597 => _597.isOpen]));
18883
+ return Boolean(_optionalChain([this, 'access', _600 => _600.sessionRef, 'optionalAccess', _601 => _601.isOpen]));
18210
18884
  }
18211
18885
  get session() {
18212
18886
  return this.active ? this.sessionRef : null;
@@ -18215,7 +18889,7 @@ var FreeTransformTool = (_class15 = class {
18215
18889
  return this.modeValue;
18216
18890
  }
18217
18891
  get interpolation() {
18218
- return _nullishCoalesce(_optionalChain([this, 'access', _598 => _598.sessionRef, 'optionalAccess', _599 => _599.interpolation]), () => ( "bicubic"));
18892
+ return _nullishCoalesce(_optionalChain([this, 'access', _602 => _602.sessionRef, 'optionalAccess', _603 => _603.interpolation]), () => ( "bicubic"));
18219
18893
  }
18220
18894
  /** Whether the open transform has changed anything yet (a commit would add an undo step). */
18221
18895
  get modified() {
@@ -18225,7 +18899,7 @@ var FreeTransformTool = (_class15 = class {
18225
18899
  const start = s.startGeometry.corners;
18226
18900
  return this.corners.some((p, i) => p.x !== start[i].x || p.y !== start[i].y);
18227
18901
  }
18228
- __init128() {this.listeners = /* @__PURE__ */ new Set()}
18902
+ __init129() {this.listeners = /* @__PURE__ */ new Set()}
18229
18903
  /** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
18230
18904
  subscribe(listener) {
18231
18905
  this.listeners.add(listener);
@@ -18234,7 +18908,7 @@ var FreeTransformTool = (_class15 = class {
18234
18908
  };
18235
18909
  }
18236
18910
  changed() {
18237
- _optionalChain([this, 'access', _600 => _600.options, 'access', _601 => _601.onChange, 'optionalCall', _602 => _602()]);
18911
+ _optionalChain([this, 'access', _604 => _604.options, 'access', _605 => _605.onChange, 'optionalCall', _606 => _606()]);
18238
18912
  for (const l of this.listeners) l();
18239
18913
  }
18240
18914
  /** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
@@ -18627,7 +19301,7 @@ var FreeTransformTool = (_class15 = class {
18627
19301
  }
18628
19302
  /** Abandons the transform and restores everything. */
18629
19303
  cancel() {
18630
- _optionalChain([this, 'access', _603 => _603.sessionRef, 'optionalAccess', _604 => _604.cancel, 'call', _605 => _605()]);
19304
+ _optionalChain([this, 'access', _607 => _607.sessionRef, 'optionalAccess', _608 => _608.cancel, 'call', _609 => _609()]);
18631
19305
  this.sessionRef = null;
18632
19306
  this.corners = null;
18633
19307
  this.mesh = null;
@@ -18683,7 +19357,7 @@ function imageLayerAppliedEffects(layer) {
18683
19357
  const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
18684
19358
  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 } : {} });
18685
19359
  if (layer.type === "smart")
18686
- (_nullishCoalesce(_optionalChain([layer, 'access', _606 => _606.smartFilters, 'optionalAccess', _607 => _607.filters]), () => ( []))).forEach((f, index) => {
19360
+ (_nullishCoalesce(_optionalChain([layer, 'access', _610 => _610.smartFilters, 'optionalAccess', _611 => _611.filters]), () => ( []))).forEach((f, index) => {
18687
19361
  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 });
18688
19362
  });
18689
19363
  return out;
@@ -18835,7 +19509,7 @@ var OTHER_TOOL_LABELS = {
18835
19509
  watermark: "Watermark"
18836
19510
  };
18837
19511
  function imageToolLabel(tool) {
18838
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _608 => _608.find, 'call', _609 => _609((t) => t.id === tool), 'optionalAccess', _610 => _610.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
19512
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _612 => _612.find, 'call', _613 => _613((t) => t.id === tool), 'optionalAccess', _614 => _614.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
18839
19513
  }
18840
19514
  var IMAGE_TOOL_SHORTCUTS = {
18841
19515
  ...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
@@ -19949,4 +20623,8 @@ function createImageEditorDocument(controller, options = {}) {
19949
20623
 
19950
20624
 
19951
20625
 
19952
- 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.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.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; 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.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.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.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.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.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.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.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.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.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.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; 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.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.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.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;
20626
+
20627
+
20628
+
20629
+
20630
+ 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.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.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.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.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.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.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.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.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.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.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; 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.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.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;