@pixerate/editor 0.178.0 → 0.180.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.
- package/dist/image-editor/controller.d.cts +25 -0
- package/dist/image-editor/controller.d.ts +25 -0
- package/dist/image-editor/index.cjs +516 -324
- package/dist/image-editor/index.js +238 -46
- package/dist/image-editor/layers/panel.d.cts +2 -1
- package/dist/image-editor/layers/panel.d.ts +2 -1
- package/dist/image-editor/layers/transform-ui.d.cts +15 -7
- package/dist/image-editor/layers/transform-ui.d.ts +15 -7
- package/dist/image-editor/renderer.d.cts +6 -1
- package/dist/image-editor/renderer.d.ts +6 -1
- package/dist/image-editor/selection/index.d.cts +1 -0
- package/dist/image-editor/selection/index.d.ts +1 -0
- package/dist/image-editor/selection/overlay.d.cts +8 -0
- package/dist/image-editor/selection/overlay.d.ts +8 -0
- package/dist/image-editor/selection/segmentation.d.cts +49 -0
- package/dist/image-editor/selection/segmentation.d.ts +49 -0
- package/dist/image-editor/selection-tools.d.cts +18 -1
- package/dist/image-editor/selection-tools.d.ts +18 -1
- package/dist/image-editor/types.d.cts +7 -0
- package/dist/image-editor/types.d.ts +7 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +5 -3
|
@@ -948,6 +948,24 @@ function quickMaskPixels(mask, style = {}) {
|
|
|
948
948
|
}
|
|
949
949
|
return out;
|
|
950
950
|
}
|
|
951
|
+
var MARCHING_ANTS_STEP_MS = 100;
|
|
952
|
+
function prefersReducedMotion() {
|
|
953
|
+
try {
|
|
954
|
+
return typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
955
|
+
} catch (e2) {
|
|
956
|
+
return false;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
function startMarchingAnts(tick, stepMs = MARCHING_ANTS_STEP_MS) {
|
|
960
|
+
if (prefersReducedMotion()) return () => {
|
|
961
|
+
};
|
|
962
|
+
let offset = 0;
|
|
963
|
+
const id = setInterval(() => {
|
|
964
|
+
offset = (offset + 1) % 8;
|
|
965
|
+
tick(offset);
|
|
966
|
+
}, stepMs);
|
|
967
|
+
return () => clearInterval(id);
|
|
968
|
+
}
|
|
951
969
|
|
|
952
970
|
// src/image-editor/layers/render.ts
|
|
953
971
|
function isQuarterTurn(rotate) {
|
|
@@ -1148,7 +1166,7 @@ var ImageCache = (_class = class {constructor() { _class.prototype.__init.call(t
|
|
|
1148
1166
|
Object.defineProperty(img, "naturalWidth", { value: 800, configurable: true });
|
|
1149
1167
|
Object.defineProperty(img, "naturalHeight", { value: 600, configurable: true });
|
|
1150
1168
|
Object.defineProperty(img, "complete", { value: true, configurable: true });
|
|
1151
|
-
} catch (
|
|
1169
|
+
} catch (e3) {
|
|
1152
1170
|
}
|
|
1153
1171
|
this.cache.set(src, img);
|
|
1154
1172
|
resolve(img);
|
|
@@ -1353,9 +1371,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1353
1371
|
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1354
1372
|
ctx.clip();
|
|
1355
1373
|
if (_optionalChain([state, 'access', _19 => _19.selection, 'optionalAccess', _20 => _20.bounds]) && display === "quickMask") this.drawQuickMask(ctx, state.selection);
|
|
1356
|
-
else if (_optionalChain([state, 'access', _21 => _21.selection, 'optionalAccess', _22 => _22.bounds]) && display === "ants") this.drawAnts(ctx, state.selection, projection.scale, _nullishCoalesce(options.antsOffset, () => ( 0)));
|
|
1357
|
-
if (_optionalChain([options, 'access', _23 => _23.draftSelectionPath, 'optionalAccess', _24 => _24.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale);
|
|
1358
|
-
} catch (
|
|
1374
|
+
else if (_optionalChain([state, 'access', _21 => _21.selection, 'optionalAccess', _22 => _22.bounds]) && display === "ants") this.drawAnts(ctx, state.selection, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
|
|
1375
|
+
if (_optionalChain([options, 'access', _23 => _23.draftSelectionPath, 'optionalAccess', _24 => _24.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
|
|
1376
|
+
} catch (e4) {
|
|
1359
1377
|
}
|
|
1360
1378
|
ctx.restore();
|
|
1361
1379
|
}
|
|
@@ -1373,7 +1391,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1373
1391
|
ctx.lineWidth = px2;
|
|
1374
1392
|
ctx.strokeStyle = "#ffffff";
|
|
1375
1393
|
ctx.stroke();
|
|
1376
|
-
} catch (
|
|
1394
|
+
} catch (e5) {
|
|
1377
1395
|
}
|
|
1378
1396
|
ctx.restore();
|
|
1379
1397
|
}
|
|
@@ -1394,7 +1412,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1394
1412
|
ctx.lineWidth = u;
|
|
1395
1413
|
ctx.strokeStyle = "#ffffff";
|
|
1396
1414
|
ctx.stroke();
|
|
1397
|
-
} catch (
|
|
1415
|
+
} catch (e6) {
|
|
1398
1416
|
}
|
|
1399
1417
|
ctx.restore();
|
|
1400
1418
|
}
|
|
@@ -1433,7 +1451,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1433
1451
|
ctx.strokeStyle = "#111827";
|
|
1434
1452
|
ctx.stroke();
|
|
1435
1453
|
}
|
|
1436
|
-
} catch (
|
|
1454
|
+
} catch (e7) {
|
|
1437
1455
|
}
|
|
1438
1456
|
ctx.restore();
|
|
1439
1457
|
}
|
|
@@ -1460,6 +1478,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1460
1478
|
outline.forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
|
|
1461
1479
|
ctx.closePath();
|
|
1462
1480
|
}
|
|
1481
|
+
const rotate = t.rotate && t.outline.length >= 2 ? scr(t.rotate) : null;
|
|
1482
|
+
if (rotate) {
|
|
1483
|
+
const n = scr({ x: (t.outline[0].x + t.outline[1].x) / 2, y: (t.outline[0].y + t.outline[1].y) / 2 });
|
|
1484
|
+
ctx.moveTo(n.x, n.y);
|
|
1485
|
+
ctx.lineTo(rotate.x, rotate.y);
|
|
1486
|
+
}
|
|
1463
1487
|
ctx.lineWidth = 3 * u;
|
|
1464
1488
|
ctx.strokeStyle = "rgba(0,0,0,0.25)";
|
|
1465
1489
|
ctx.stroke();
|
|
@@ -1467,6 +1491,15 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1467
1491
|
ctx.strokeStyle = "#ffffff";
|
|
1468
1492
|
ctx.stroke();
|
|
1469
1493
|
drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _25 => _25.warp, 'optionalAccess', _26 => _26.anchors]), () => ( []))].map(scr), u);
|
|
1494
|
+
if (rotate) {
|
|
1495
|
+
ctx.beginPath();
|
|
1496
|
+
ctx.arc(rotate.x, rotate.y, 5 * u, 0, Math.PI * 2);
|
|
1497
|
+
ctx.fillStyle = "#ffffff";
|
|
1498
|
+
ctx.fill();
|
|
1499
|
+
ctx.lineWidth = 1.5 * u;
|
|
1500
|
+
ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
|
|
1501
|
+
ctx.stroke();
|
|
1502
|
+
}
|
|
1470
1503
|
for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _27 => _27.warp, 'optionalAccess', _28 => _28.handles]), () => ( []))).map((w) => scr(w.point))) {
|
|
1471
1504
|
ctx.beginPath();
|
|
1472
1505
|
ctx.arc(h.x, h.y, 3.5 * u, 0, Math.PI * 2);
|
|
@@ -1484,7 +1517,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1484
1517
|
ctx.lineWidth = 1.5 * u;
|
|
1485
1518
|
ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
|
|
1486
1519
|
ctx.stroke();
|
|
1487
|
-
} catch (
|
|
1520
|
+
} catch (e8) {
|
|
1488
1521
|
}
|
|
1489
1522
|
ctx.restore();
|
|
1490
1523
|
}
|
|
@@ -1552,7 +1585,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1552
1585
|
_chunkUHMSMUHKcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
|
|
1553
1586
|
}
|
|
1554
1587
|
}
|
|
1555
|
-
} catch (
|
|
1588
|
+
} catch (e9) {
|
|
1556
1589
|
}
|
|
1557
1590
|
}
|
|
1558
1591
|
_optionalChain([onPixels, 'optionalCall', _29 => _29(imageData)]);
|
|
@@ -1614,14 +1647,14 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1614
1647
|
this.depthMaps.set(key, { width, height, data: data.data });
|
|
1615
1648
|
this.assetVersion++;
|
|
1616
1649
|
}
|
|
1617
|
-
} catch (
|
|
1650
|
+
} catch (e10) {
|
|
1618
1651
|
}
|
|
1619
1652
|
}
|
|
1620
1653
|
if (l.type === "annotation" && l.annotation.type === "image" && !this.imageCache.peek(l.annotation.src)) {
|
|
1621
1654
|
try {
|
|
1622
1655
|
await this.imageCache.get(l.annotation.src);
|
|
1623
1656
|
this.assetVersion++;
|
|
1624
|
-
} catch (
|
|
1657
|
+
} catch (e11) {
|
|
1625
1658
|
}
|
|
1626
1659
|
}
|
|
1627
1660
|
}
|
|
@@ -1649,7 +1682,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1649
1682
|
this.drawAnnotationShape(ctx, annotation, img);
|
|
1650
1683
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
1651
1684
|
return new Uint8ClampedArray(ctx.getImageData(0, 0, rect.width, rect.height).data);
|
|
1652
|
-
} catch (
|
|
1685
|
+
} catch (e12) {
|
|
1653
1686
|
return null;
|
|
1654
1687
|
}
|
|
1655
1688
|
}
|
|
@@ -1757,7 +1790,10 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1757
1790
|
}
|
|
1758
1791
|
ctx.drawImage(canvas, 0, 0, selection.width, selection.height);
|
|
1759
1792
|
}
|
|
1760
|
-
/**
|
|
1793
|
+
/**
|
|
1794
|
+
* Marching ants: a white line under a black dashed one, one screen pixel wide. `scale` is
|
|
1795
|
+
* screen pixels per natural pixel (the projection scale times the host's CSS scale).
|
|
1796
|
+
*/
|
|
1761
1797
|
drawAnts(ctx, selection, scale, offset) {
|
|
1762
1798
|
let segs = this.outlineCache.get(selection);
|
|
1763
1799
|
if (!segs) {
|
|
@@ -1849,7 +1885,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1849
1885
|
_chunkCWM3CUUXcjs.blendImageData.call(void 0, backdrop, source, _chunkCWM3CUUXcjs.normalizeBlendMode.call(void 0, ann.blend));
|
|
1850
1886
|
lctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
1851
1887
|
lctx.putImageData(backdrop, 0, 0);
|
|
1852
|
-
} catch (
|
|
1888
|
+
} catch (e13) {
|
|
1853
1889
|
return false;
|
|
1854
1890
|
}
|
|
1855
1891
|
ctx.save();
|
|
@@ -1865,7 +1901,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1865
1901
|
if (ann.type === "image") {
|
|
1866
1902
|
try {
|
|
1867
1903
|
img = await this.imageCache.get(ann.src);
|
|
1868
|
-
} catch (
|
|
1904
|
+
} catch (e14) {
|
|
1869
1905
|
}
|
|
1870
1906
|
}
|
|
1871
1907
|
this.drawAnnotationShape(ctx, ann, img);
|
|
@@ -2644,14 +2680,14 @@ var TextEditSession = (_class5 = class {
|
|
|
2644
2680
|
if (!this.text.trim().length) {
|
|
2645
2681
|
try {
|
|
2646
2682
|
this.controller.removeLayer(this.layerId);
|
|
2647
|
-
} catch (
|
|
2683
|
+
} catch (e15) {
|
|
2648
2684
|
}
|
|
2649
2685
|
return false;
|
|
2650
2686
|
}
|
|
2651
2687
|
if (this.layer.name === "Text" && this.changed) {
|
|
2652
2688
|
try {
|
|
2653
2689
|
this.controller.setLayerProperties(this.layerId, { name: _chunkUHMSMUHKcjs.typeLayerName.call(void 0, this.text) }, false);
|
|
2654
|
-
} catch (
|
|
2690
|
+
} catch (e16) {
|
|
2655
2691
|
}
|
|
2656
2692
|
}
|
|
2657
2693
|
return true;
|
|
@@ -3067,6 +3103,35 @@ function hueRange(pixels, center) {
|
|
|
3067
3103
|
return _chunkUHMSMUHKcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
|
|
3068
3104
|
}
|
|
3069
3105
|
|
|
3106
|
+
// src/image-editor/selection/segmentation.ts
|
|
3107
|
+
var isPoint = (p) => !!p && typeof p === "object" && Number.isFinite(p.x) && Number.isFinite(p.y);
|
|
3108
|
+
function polygonsOf(result) {
|
|
3109
|
+
const p = result.polygon;
|
|
3110
|
+
if (!Array.isArray(p) || !p.length) return [];
|
|
3111
|
+
const rings = Array.isArray(p[0]) ? p : [p];
|
|
3112
|
+
return rings.map((ring) => Array.isArray(ring) ? ring.filter(isPoint) : []).filter((ring) => ring.length >= 3);
|
|
3113
|
+
}
|
|
3114
|
+
function segmentToSelection(width, height, result) {
|
|
3115
|
+
let out = null;
|
|
3116
|
+
for (const ring of polygonsOf(result)) {
|
|
3117
|
+
out = _chunkUHMSMUHKcjs.combineSelections.call(void 0, out, polygonSelection(width, height, ring), "add");
|
|
3118
|
+
}
|
|
3119
|
+
if (result.mask && result.mask.width > 0 && result.mask.height > 0) {
|
|
3120
|
+
const raw = _chunkUHMSMUHKcjs.selectionFromPixels.call(void 0, result.mask, { channel: "luminance" });
|
|
3121
|
+
const sized = raw.width === width && raw.height === height ? raw : _chunkUHMSMUHKcjs.resizeSelection.call(void 0, raw, width, height);
|
|
3122
|
+
out = _chunkUHMSMUHKcjs.combineSelections.call(void 0, out, sized, "add");
|
|
3123
|
+
}
|
|
3124
|
+
return _optionalChain([out, 'optionalAccess', _71 => _71.bounds]) ? out : null;
|
|
3125
|
+
}
|
|
3126
|
+
function segmentsToSelection(width, height, results) {
|
|
3127
|
+
let out = null;
|
|
3128
|
+
for (const r of results) {
|
|
3129
|
+
const sel = segmentToSelection(width, height, r);
|
|
3130
|
+
if (sel) out = _chunkUHMSMUHKcjs.combineSelections.call(void 0, out, sel, "add");
|
|
3131
|
+
}
|
|
3132
|
+
return out;
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3070
3135
|
// src/image-editor/selection/refine.ts
|
|
3071
3136
|
var DEFAULT_REFINE_EDGE_PARAMS = {
|
|
3072
3137
|
radius: 0,
|
|
@@ -3316,16 +3381,16 @@ function checkEffectTime(time) {
|
|
|
3316
3381
|
return time;
|
|
3317
3382
|
}
|
|
3318
3383
|
function checkEffectAnimation(animate) {
|
|
3319
|
-
const duration = _optionalChain([animate, 'optionalAccess',
|
|
3384
|
+
const duration = _optionalChain([animate, 'optionalAccess', _72 => _72.duration]);
|
|
3320
3385
|
if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkUHMSMUHKcjs.MAX_EFFECT_ANIMATION_MS)) {
|
|
3321
3386
|
throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkUHMSMUHKcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
|
|
3322
3387
|
}
|
|
3323
3388
|
return { duration: Math.round(duration) };
|
|
3324
3389
|
}
|
|
3325
3390
|
function effectLayerTiming(g, d) {
|
|
3326
|
-
if (!_optionalChain([d, 'optionalAccess',
|
|
3391
|
+
if (!_optionalChain([d, 'optionalAccess', _73 => _73.duration])) return null;
|
|
3327
3392
|
const time = _nullishCoalesce(g.time, () => ( 0));
|
|
3328
|
-
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access',
|
|
3393
|
+
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _74 => _74.animate, 'optionalAccess', _75 => _75.duration]), () => ( d.duration)), loops: d.loop };
|
|
3329
3394
|
}
|
|
3330
3395
|
|
|
3331
3396
|
// src/image-editor/effects.ts
|
|
@@ -3578,14 +3643,14 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3578
3643
|
if (init.interpolation !== void 0 && !_chunkHGTDMKNEcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
3579
3644
|
this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
|
|
3580
3645
|
const sel = host.selection();
|
|
3581
|
-
const selected = Boolean(_optionalChain([sel, 'optionalAccess',
|
|
3646
|
+
const selected = Boolean(_optionalChain([sel, 'optionalAccess', _76 => _76.bounds]));
|
|
3582
3647
|
let content = _nullishCoalesce(init.content, () => ( "auto"));
|
|
3583
3648
|
if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
|
|
3584
3649
|
fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
|
|
3585
3650
|
}
|
|
3586
3651
|
const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
|
|
3587
|
-
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess',
|
|
3588
|
-
const smartTarget = (_optionalChain([target, 'optionalAccess',
|
|
3652
|
+
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _77 => _77.layer]) : void 0;
|
|
3653
|
+
const smartTarget = (_optionalChain([target, 'optionalAccess', _78 => _78.type]) === "smart" || _optionalChain([target, 'optionalAccess', _79 => _79.type]) === "shape" || _optionalChain([target, 'optionalAccess', _80 => _80.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
|
|
3589
3654
|
if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
|
|
3590
3655
|
this.content = content;
|
|
3591
3656
|
if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
|
|
@@ -3609,9 +3674,9 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3609
3674
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
3610
3675
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
3611
3676
|
if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
|
|
3612
|
-
const linked = _optionalChain([mask, 'optionalAccess',
|
|
3677
|
+
const linked = _optionalChain([mask, 'optionalAccess', _81 => _81.linked]) !== false;
|
|
3613
3678
|
const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
|
|
3614
|
-
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access',
|
|
3679
|
+
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _82 => _82.mask, 'optionalAccess', _83 => _83.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.`);
|
|
3615
3680
|
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.`);
|
|
3616
3681
|
if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
3617
3682
|
if (content !== "selection-copy") {
|
|
@@ -3714,7 +3779,7 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3714
3779
|
};
|
|
3715
3780
|
this.copyId = copy.id;
|
|
3716
3781
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, layer.id);
|
|
3717
|
-
this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
3782
|
+
this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _84 => _84.parent, 'optionalAccess', _85 => _85.id]), () => ( null)), loc.index + 1);
|
|
3718
3783
|
this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
|
|
3719
3784
|
moves.push("pixels");
|
|
3720
3785
|
}
|
|
@@ -3977,11 +4042,11 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3977
4042
|
result(changed, layers, selection) {
|
|
3978
4043
|
let bounds = null;
|
|
3979
4044
|
const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
|
|
3980
|
-
const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess',
|
|
3981
|
-
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess',
|
|
3982
|
-
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess',
|
|
3983
|
-
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess',
|
|
3984
|
-
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess',
|
|
4045
|
+
const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _86 => _86.layer]) : void 0;
|
|
4046
|
+
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _87 => _87.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
|
|
4047
|
+
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _88 => _88.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _89 => _89.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _90 => _90.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
|
|
4048
|
+
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _91 => _91.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
|
|
4049
|
+
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _92 => _92.bounds]) ? { ...selection.bounds } : null;
|
|
3985
4050
|
return {
|
|
3986
4051
|
layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
|
|
3987
4052
|
content: this.content,
|
|
@@ -4010,7 +4075,7 @@ function deserializeColorMode(raw, problems) {
|
|
|
4010
4075
|
}
|
|
4011
4076
|
function effectiveProof(proof, mode) {
|
|
4012
4077
|
if (proof) return proof;
|
|
4013
|
-
if (_optionalChain([mode, 'optionalAccess',
|
|
4078
|
+
if (_optionalChain([mode, 'optionalAccess', _93 => _93.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
|
|
4014
4079
|
return null;
|
|
4015
4080
|
}
|
|
4016
4081
|
function colorModePlanes(doc, mode) {
|
|
@@ -4065,7 +4130,7 @@ function resolveProfile(doc) {
|
|
|
4065
4130
|
return p;
|
|
4066
4131
|
}
|
|
4067
4132
|
function profileBytes(doc) {
|
|
4068
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
4133
|
+
if (_optionalChain([doc, 'optionalAccess', _94 => _94.icc])) return doc.icc;
|
|
4069
4134
|
const p = resolveProfile(doc);
|
|
4070
4135
|
return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
|
|
4071
4136
|
}
|
|
@@ -4082,7 +4147,7 @@ function isSrgb(doc) {
|
|
|
4082
4147
|
if (!doc || doc.builtin === "srgb") return true;
|
|
4083
4148
|
try {
|
|
4084
4149
|
return _chunkBROJYMWUcjs.sameColors.call(void 0, resolveProfile(doc), _chunkBROJYMWUcjs.srgbProfile.call(void 0, ), _chunkBROJYMWUcjs.builtinProfile.call(void 0, "lab-d50"));
|
|
4085
|
-
} catch (
|
|
4150
|
+
} catch (e17) {
|
|
4086
4151
|
return false;
|
|
4087
4152
|
}
|
|
4088
4153
|
}
|
|
@@ -4225,7 +4290,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
|
|
|
4225
4290
|
else tiles.delete(key);
|
|
4226
4291
|
continue;
|
|
4227
4292
|
}
|
|
4228
|
-
const src = _nullishCoalesce(_optionalChain([base, 'access',
|
|
4293
|
+
const src = _nullishCoalesce(_optionalChain([base, 'access', _95 => _95.tiles, 'access', _96 => _96.get, 'call', _97 => _97(key), 'optionalAccess', _98 => _98.data]), () => ( defaultTile(base)));
|
|
4229
4294
|
const data = _chunkEBDCRTZIcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
|
|
4230
4295
|
const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
|
|
4231
4296
|
if (tile) tiles.set(key, tile);
|
|
@@ -4338,7 +4403,7 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4338
4403
|
writeTile: (tx, ty) => {
|
|
4339
4404
|
const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
|
|
4340
4405
|
if (!this.touched.has(key)) {
|
|
4341
|
-
this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call',
|
|
4406
|
+
this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _99 => _99(key), 'optionalAccess', _100 => _100.slice, 'call', _101 => _101()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
|
|
4342
4407
|
this.touched.add(key);
|
|
4343
4408
|
}
|
|
4344
4409
|
this.fresh.add(key);
|
|
@@ -4350,11 +4415,11 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4350
4415
|
offset: a.offset,
|
|
4351
4416
|
lockTransparency: a.lockTransparency,
|
|
4352
4417
|
selection: a.selection,
|
|
4353
|
-
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
4418
|
+
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _102 => _102.live, 'access', _103 => _103.get, 'call', _104 => _104(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _105 => _105.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
|
|
4354
4419
|
writeTile: (tx, ty) => {
|
|
4355
4420
|
const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
|
|
4356
4421
|
if (!this.touched.has(key)) {
|
|
4357
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
4422
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _106 => _106.base, 'access', _107 => _107.tiles, 'access', _108 => _108.get, 'call', _109 => _109(key), 'optionalAccess', _110 => _110.data]), () => ( defaultTile(this.base)));
|
|
4358
4423
|
this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
|
|
4359
4424
|
this.touched.add(key);
|
|
4360
4425
|
}
|
|
@@ -4371,11 +4436,11 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4371
4436
|
if (this.closed || !points.length) return;
|
|
4372
4437
|
if (!this.started) {
|
|
4373
4438
|
this.started = true;
|
|
4374
|
-
if (_optionalChain([this, 'access',
|
|
4439
|
+
if (_optionalChain([this, 'access', _111 => _111.retouch, 'optionalAccess', _112 => _112.kind]) === "coverage") this.retouch.start(points[0]);
|
|
4375
4440
|
}
|
|
4376
4441
|
this.last = points[points.length - 1];
|
|
4377
4442
|
const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
|
|
4378
|
-
_optionalChain([this, 'access',
|
|
4443
|
+
_optionalChain([this, 'access', _113 => _113.flushView, 'optionalCall', _114 => _114()]);
|
|
4379
4444
|
this.update(rects);
|
|
4380
4445
|
}
|
|
4381
4446
|
update(rects) {
|
|
@@ -4405,7 +4470,7 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4405
4470
|
for (const [key, { tx, ty, r }] of regions) {
|
|
4406
4471
|
if (this.deep) {
|
|
4407
4472
|
const rt = this.retouch;
|
|
4408
|
-
const paint = _optionalChain([rt, 'optionalAccess',
|
|
4473
|
+
const paint = _optionalChain([rt, 'optionalAccess', _115 => _115.kind]) === "coverage" ? rt.paint() : null;
|
|
4409
4474
|
if (paint && paint.kind !== "tone") {
|
|
4410
4475
|
const prevWork = this.touched.has(key) ? this.work.get(key) : void 0;
|
|
4411
4476
|
this.touched.add(key);
|
|
@@ -4416,13 +4481,13 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4416
4481
|
const prev2 = this.touched.has(key) ? this.liveDeep.get(key) : void 0;
|
|
4417
4482
|
this.touched.add(key);
|
|
4418
4483
|
const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
|
|
4419
|
-
const d = _optionalChain([rt, 'optionalAccess',
|
|
4484
|
+
const d = _optionalChain([rt, 'optionalAccess', _116 => _116.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _117 => _117.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);
|
|
4420
4485
|
this.liveDeep.set(key, d);
|
|
4421
4486
|
this.live.set(key, { data: _chunkCWM3CUUXcjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
|
|
4422
4487
|
continue;
|
|
4423
4488
|
}
|
|
4424
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
4425
|
-
const prev = this.touched.has(key) ? _optionalChain([this, 'access',
|
|
4489
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _118 => _118.base, 'access', _119 => _119.tiles, 'access', _120 => _120.get, 'call', _121 => _121(key), 'optionalAccess', _122 => _122.data]), () => ( defaultTile(this.base)));
|
|
4490
|
+
const prev = this.touched.has(key) ? _optionalChain([this, 'access', _123 => _123.live, 'access', _124 => _124.get, 'call', _125 => _125(key), 'optionalAccess', _126 => _126.data]) : void 0;
|
|
4426
4491
|
this.touched.add(key);
|
|
4427
4492
|
const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
|
|
4428
4493
|
this.live.set(key, { data, uniform: null });
|
|
@@ -4434,12 +4499,12 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4434
4499
|
if (this.closed) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("This stroke has already ended.");
|
|
4435
4500
|
const last = _nullishCoalesce(this.last, () => ( void 0));
|
|
4436
4501
|
const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
|
|
4437
|
-
_optionalChain([this, 'access',
|
|
4502
|
+
_optionalChain([this, 'access', _127 => _127.flushView, 'optionalCall', _128 => _128()]);
|
|
4438
4503
|
this.update(rects);
|
|
4439
4504
|
this.closed = true;
|
|
4440
4505
|
const ch = this.base.channels;
|
|
4441
4506
|
const r = this.retouch;
|
|
4442
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
4507
|
+
if (_optionalChain([r, 'optionalAccess', _129 => _129.kind]) === "coverage" && r.finalPaint) {
|
|
4443
4508
|
const final = r.finalPaint(this.stroke.coverage);
|
|
4444
4509
|
if (final) {
|
|
4445
4510
|
for (const key of this.touched) {
|
|
@@ -4448,7 +4513,7 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4448
4513
|
this.retouchDeepTile(key, tx, ty, final, {});
|
|
4449
4514
|
continue;
|
|
4450
4515
|
}
|
|
4451
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
4516
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _130 => _130.base, 'access', _131 => _131.tiles, 'access', _132 => _132.get, 'call', _133 => _133(key), 'optionalAccess', _134 => _134.data]), () => ( defaultTile(this.base)));
|
|
4452
4517
|
this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
|
|
4453
4518
|
}
|
|
4454
4519
|
}
|
|
@@ -4470,7 +4535,7 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4470
4535
|
const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
|
|
4471
4536
|
const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
|
|
4472
4537
|
if (mixerLoad) result.mixerLoad = mixerLoad;
|
|
4473
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
4538
|
+
if (_optionalChain([r, 'optionalAccess', _135 => _135.result])) Object.assign(result, r.result());
|
|
4474
4539
|
return result;
|
|
4475
4540
|
}
|
|
4476
4541
|
/** Abandons the stroke and restores the layer. */
|
|
@@ -4596,14 +4661,14 @@ function migrateSerializedImageEditorState(data) {
|
|
|
4596
4661
|
const legacy = data;
|
|
4597
4662
|
const adjustments = normalizeStoredAdjustments(legacy.adjustments);
|
|
4598
4663
|
return {
|
|
4599
|
-
version: _optionalChain([adjustments, 'access',
|
|
4664
|
+
version: _optionalChain([adjustments, 'access', _136 => _136.layers, 'optionalAccess', _137 => _137.length]) ? 2 : 1,
|
|
4600
4665
|
crop: legacy.crop ? { ...legacy.crop } : null,
|
|
4601
4666
|
transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
|
|
4602
4667
|
adjustments: serializeAdjustments(adjustments),
|
|
4603
4668
|
depthMask: {
|
|
4604
4669
|
...DEFAULT_DEPTH_MASK,
|
|
4605
4670
|
...legacy.depthMask,
|
|
4606
|
-
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access',
|
|
4671
|
+
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _138 => _138.depthMask, 'optionalAccess', _139 => _139.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
|
|
4607
4672
|
},
|
|
4608
4673
|
annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
|
|
4609
4674
|
...legacy.selection ? { selection: { ...legacy.selection } } : {}
|
|
@@ -4654,15 +4719,18 @@ var ImageEditorController = (_class10 = class {
|
|
|
4654
4719
|
__init72() {this.viewKey = []}
|
|
4655
4720
|
/** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
|
|
4656
4721
|
__init73() {this.compositor = new (0, _chunkUHMSMUHKcjs.LayerCompositor)()}
|
|
4722
|
+
/** The segmentation provider behind `selectSubject` (see `setSegmentationProvider`). */
|
|
4723
|
+
__init74() {this.segmentation = null}
|
|
4657
4724
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
4658
|
-
|
|
4725
|
+
__init75() {this.effects = new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()}
|
|
4659
4726
|
/** Renders provider effects: effect smart filter results and effect layers. */
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
constructor(options = {}) {;_class10.prototype.__init63.call(this);_class10.prototype.__init64.call(this);_class10.prototype.__init65.call(this);_class10.prototype.__init66.call(this);_class10.prototype.__init67.call(this);_class10.prototype.__init68.call(this);_class10.prototype.__init69.call(this);_class10.prototype.__init70.call(this);_class10.prototype.__init71.call(this);_class10.prototype.__init72.call(this);_class10.prototype.__init73.call(this);_class10.prototype.__init74.call(this);_class10.prototype.__init75.call(this);_class10.prototype.__init76.call(this);_class10.prototype.__init77.call(this);_class10.prototype.__init78.call(this);_class10.prototype.__init79.call(this);_class10.prototype.__init80.call(this);_class10.prototype.__init81.call(this);_class10.prototype.__init82.call(this);_class10.prototype.__init83.call(this);_class10.prototype.__init84.call(this);_class10.prototype.__init85.call(this);_class10.prototype.__init86.call(this);_class10.prototype.__init87.call(this);_class10.prototype.__init88.call(this);_class10.prototype.__init89.call(this);
|
|
4727
|
+
__init76() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
|
|
4728
|
+
__init77() {this.effectRefresh = "none"}
|
|
4729
|
+
constructor(options = {}) {;_class10.prototype.__init63.call(this);_class10.prototype.__init64.call(this);_class10.prototype.__init65.call(this);_class10.prototype.__init66.call(this);_class10.prototype.__init67.call(this);_class10.prototype.__init68.call(this);_class10.prototype.__init69.call(this);_class10.prototype.__init70.call(this);_class10.prototype.__init71.call(this);_class10.prototype.__init72.call(this);_class10.prototype.__init73.call(this);_class10.prototype.__init74.call(this);_class10.prototype.__init75.call(this);_class10.prototype.__init76.call(this);_class10.prototype.__init77.call(this);_class10.prototype.__init78.call(this);_class10.prototype.__init79.call(this);_class10.prototype.__init80.call(this);_class10.prototype.__init81.call(this);_class10.prototype.__init82.call(this);_class10.prototype.__init83.call(this);_class10.prototype.__init84.call(this);_class10.prototype.__init85.call(this);_class10.prototype.__init86.call(this);_class10.prototype.__init87.call(this);_class10.prototype.__init88.call(this);_class10.prototype.__init89.call(this);_class10.prototype.__init90.call(this);
|
|
4663
4730
|
this.effects.subscribe(() => this.queueEffectRefresh("all"));
|
|
4664
4731
|
this.effectsEngine.subscribe(() => this.queueEffectRefresh("incomplete"));
|
|
4665
4732
|
if (options.effects) this.effects.set(options.effects);
|
|
4733
|
+
if (options.segmentation) this.segmentation = options.segmentation;
|
|
4666
4734
|
this.maxHistoryDepth = _nullishCoalesce(options.maxHistoryDepth, () => ( 50));
|
|
4667
4735
|
if (options.textShaper !== void 0) this.textShaperValue = options.textShaper;
|
|
4668
4736
|
this.maxHistoryBytes = _nullishCoalesce(options.maxHistoryBytes, () => ( 512 * 1024 * 1024));
|
|
@@ -4676,7 +4744,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4676
4744
|
sourceIsOpaque: () => this.sourceIsOpaque(),
|
|
4677
4745
|
version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
4678
4746
|
globalLight: () => this.state.globalLight,
|
|
4679
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
4747
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _140 => _140.state, 'access', _141 => _141.patterns, 'optionalAccess', _142 => _142.find, 'call', _143 => _143((p) => p.id === id)]), () => ( null))
|
|
4680
4748
|
};
|
|
4681
4749
|
this.state = {
|
|
4682
4750
|
sourceUrl: typeof options.image === "string" ? options.image : null,
|
|
@@ -4709,10 +4777,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
4709
4777
|
};
|
|
4710
4778
|
}
|
|
4711
4779
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
4712
|
-
if (_optionalChain([options, 'access',
|
|
4780
|
+
if (_optionalChain([options, 'access', _144 => _144.initialState, 'optionalAccess', _145 => _145.selection])) {
|
|
4713
4781
|
try {
|
|
4714
4782
|
this.state.selection = normalizeSelection(_chunkUHMSMUHKcjs.deserializeSelection.call(void 0, options.initialState.selection));
|
|
4715
|
-
} catch (
|
|
4783
|
+
} catch (e18) {
|
|
4716
4784
|
}
|
|
4717
4785
|
}
|
|
4718
4786
|
this.initialSnapshot = this.captureHistoryEntry();
|
|
@@ -4754,7 +4822,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4754
4822
|
height: img.naturalHeight || img.height || 600
|
|
4755
4823
|
}
|
|
4756
4824
|
};
|
|
4757
|
-
} catch (
|
|
4825
|
+
} catch (e19) {
|
|
4758
4826
|
return { sourceUrl: src, element: null, dimensions: { ...this.state.imageDimensions } };
|
|
4759
4827
|
}
|
|
4760
4828
|
}
|
|
@@ -4787,7 +4855,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4787
4855
|
* Where layer pixels changed since the last viewport render, when only strokes changed them
|
|
4788
4856
|
* (the renderer then recomposites just those rectangles); `'all'` after any other change.
|
|
4789
4857
|
*/
|
|
4790
|
-
|
|
4858
|
+
__init78() {this.pendingDirty = "all"}
|
|
4791
4859
|
notify(strokeRects) {
|
|
4792
4860
|
if (strokeRects) this.docRevision++;
|
|
4793
4861
|
if (strokeRects && this.pendingDirty !== "all") this.pendingDirty.push(...strokeRects);
|
|
@@ -4795,7 +4863,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4795
4863
|
this.syncViews();
|
|
4796
4864
|
this.syncDisplay();
|
|
4797
4865
|
const currentState = { ...this.state };
|
|
4798
|
-
_optionalChain([this, 'access',
|
|
4866
|
+
_optionalChain([this, 'access', _146 => _146.onStateChange, 'optionalCall', _147 => _147(currentState)]);
|
|
4799
4867
|
this.listeners.forEach((l) => l(currentState));
|
|
4800
4868
|
if (this.effects.provider) this.queueEffectRefresh("incomplete");
|
|
4801
4869
|
}
|
|
@@ -4824,11 +4892,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
4824
4892
|
if (l.type === "group") {
|
|
4825
4893
|
const children = walk(l.children);
|
|
4826
4894
|
if (children !== l.children) next2 = { ...l, children };
|
|
4827
|
-
} else if (l.type === "smart" && _optionalChain([l, 'access',
|
|
4895
|
+
} else if (l.type === "smart" && _optionalChain([l, 'access', _148 => _148.smartFilters, 'optionalAccess', _149 => _149.filters, 'access', _150 => _150.some, 'call', _151 => _151((f) => f.kind === "effect")]) && (all || _chunkUHMSMUHKcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
|
|
4828
4896
|
try {
|
|
4829
4897
|
const r = _chunkUHMSMUHKcjs.rerender.call(void 0, l, canvas);
|
|
4830
4898
|
if (all || !_chunkUHMSMUHKcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
|
|
4831
|
-
} catch (
|
|
4899
|
+
} catch (e20) {
|
|
4832
4900
|
}
|
|
4833
4901
|
}
|
|
4834
4902
|
if (next2 !== l) {
|
|
@@ -4844,6 +4912,16 @@ var ImageEditorController = (_class10 = class {
|
|
|
4844
4912
|
this.state.layers = next;
|
|
4845
4913
|
this.notify();
|
|
4846
4914
|
}
|
|
4915
|
+
/** The registered segmentation provider, or `null` (then `selectSubject` is unavailable). */
|
|
4916
|
+
get segmentationProvider() {
|
|
4917
|
+
return this.segmentation;
|
|
4918
|
+
}
|
|
4919
|
+
/** Registers (or with `null` removes) the segmentation provider. Not an edit: no undo step. */
|
|
4920
|
+
setSegmentationProvider(provider) {
|
|
4921
|
+
if (this.segmentation === provider) return;
|
|
4922
|
+
this.segmentation = provider;
|
|
4923
|
+
this.notify();
|
|
4924
|
+
}
|
|
4847
4925
|
/** The registered effects provider, or `null`. */
|
|
4848
4926
|
get effectsProvider() {
|
|
4849
4927
|
return this.effects.provider;
|
|
@@ -4907,8 +4985,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
4907
4985
|
*/
|
|
4908
4986
|
async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
|
|
4909
4987
|
const layer = _chunkUHMSMUHKcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
|
|
4910
|
-
const was = _optionalChain([layer, 'access',
|
|
4911
|
-
if (!was || was.kind !== "effect") throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
4988
|
+
const was = _optionalChain([layer, 'access', _152 => _152.smartFilters, 'optionalAccess', _153 => _153.filters, 'access', _154 => _154.find, 'call', _155 => _155((f) => f.id === filterId)]);
|
|
4989
|
+
if (!was || was.kind !== "effect") throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _156 => _156.smartFilters, 'optionalAccess', _157 => _157.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
|
|
4912
4990
|
const update = {};
|
|
4913
4991
|
if (changes.values) {
|
|
4914
4992
|
const d = await this.describeEffect(was.effect);
|
|
@@ -4950,7 +5028,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4950
5028
|
const layer = {
|
|
4951
5029
|
type: "pixel",
|
|
4952
5030
|
id,
|
|
4953
|
-
name: _optionalChain([options, 'access',
|
|
5031
|
+
name: _optionalChain([options, 'access', _158 => _158.name, 'optionalAccess', _159 => _159.trim, 'call', _160 => _160()]) || d.name,
|
|
4954
5032
|
visible: true,
|
|
4955
5033
|
opacity: _nullishCoalesce(options.opacity, () => ( 1)),
|
|
4956
5034
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -4975,7 +5053,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4975
5053
|
*/
|
|
4976
5054
|
async updateEffectLayer(layerId, changes, commitToHistory = true) {
|
|
4977
5055
|
const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
4978
|
-
const layer = _optionalChain([found, 'optionalAccess',
|
|
5056
|
+
const layer = _optionalChain([found, 'optionalAccess', _161 => _161.layer]);
|
|
4979
5057
|
if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
|
|
4980
5058
|
_chunkUHMSMUHKcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
|
|
4981
5059
|
const g = layer.generator;
|
|
@@ -5004,7 +5082,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5004
5082
|
* and how long it runs, the longest of theirs (ms). Null when none animates.
|
|
5005
5083
|
*/
|
|
5006
5084
|
getAnimation() {
|
|
5007
|
-
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access',
|
|
5085
|
+
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _162 => _162.generator, 'optionalAccess', _163 => _163.animate]));
|
|
5008
5086
|
if (!layers.length) return null;
|
|
5009
5087
|
return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
|
|
5010
5088
|
}
|
|
@@ -5021,7 +5099,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5021
5099
|
const { width, height } = this.naturalSize;
|
|
5022
5100
|
const surfaces = /* @__PURE__ */ new Map();
|
|
5023
5101
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
|
|
5024
|
-
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access',
|
|
5102
|
+
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _164 => _164.generator, 'optionalAccess', _165 => _165.animate])) continue;
|
|
5025
5103
|
const g = l.generator;
|
|
5026
5104
|
const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
|
|
5027
5105
|
surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
|
|
@@ -5041,7 +5119,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5041
5119
|
})
|
|
5042
5120
|
);
|
|
5043
5121
|
}
|
|
5044
|
-
|
|
5122
|
+
__init79() {this.displayFor = null}
|
|
5045
5123
|
/** Keeps the renderer's display transform in step with the document profile, mode and Proof Setup. */
|
|
5046
5124
|
syncDisplay() {
|
|
5047
5125
|
const s = this.state;
|
|
@@ -5050,7 +5128,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5050
5128
|
this.displayFor = [s.colorProfile, s.proofSetup, s.colorMode];
|
|
5051
5129
|
try {
|
|
5052
5130
|
this.renderer.setDisplayTransform(displayTransform(s.colorProfile, effectiveProof(s.proofSetup, s.colorMode)));
|
|
5053
|
-
} catch (
|
|
5131
|
+
} catch (e21) {
|
|
5054
5132
|
this.renderer.setDisplayTransform(null);
|
|
5055
5133
|
}
|
|
5056
5134
|
}
|
|
@@ -5156,7 +5234,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5156
5234
|
get canUndo() {
|
|
5157
5235
|
return this.undoStack.length > 0;
|
|
5158
5236
|
}
|
|
5159
|
-
|
|
5237
|
+
__init80() {this.docRevision = 0}
|
|
5160
5238
|
/**
|
|
5161
5239
|
* Bumped on every change to the document (an undoable edit, a stroke, undo, redo), not on view
|
|
5162
5240
|
* or tool changes, nor on `loadImage` (the source image is the host's, not part of the document). `createImageEditorDocument` uses it to tell document changes apart.
|
|
@@ -5288,7 +5366,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5288
5366
|
return this.state.layers;
|
|
5289
5367
|
}
|
|
5290
5368
|
getLayer(id) {
|
|
5291
|
-
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess',
|
|
5369
|
+
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _166 => _166.layer]);
|
|
5292
5370
|
}
|
|
5293
5371
|
/** The active layer, or `undefined`. */
|
|
5294
5372
|
getActiveLayer() {
|
|
@@ -5301,7 +5379,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5301
5379
|
setActiveLayer(id, target = "pixels") {
|
|
5302
5380
|
if (id !== null && !this.getLayer(id)) return false;
|
|
5303
5381
|
const layer = id ? this.getLayer(id) : void 0;
|
|
5304
|
-
const t = target === "mask" && _optionalChain([layer, 'optionalAccess',
|
|
5382
|
+
const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _167 => _167.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _168 => _168.type]) === "smart" && _optionalChain([layer, 'access', _169 => _169.smartFilters, 'optionalAccess', _170 => _170.mask]) ? "filter-mask" : "pixels";
|
|
5305
5383
|
if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
|
|
5306
5384
|
this.state.activeLayerId = id;
|
|
5307
5385
|
this.state.activeTarget = t;
|
|
@@ -5320,7 +5398,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5320
5398
|
if (!b) return null;
|
|
5321
5399
|
return { x: b.x + layer.offset.x, y: b.y + layer.offset.y, width: b.width, height: b.height, data: _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, b) };
|
|
5322
5400
|
}
|
|
5323
|
-
|
|
5401
|
+
__init81() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
|
|
5324
5402
|
/**
|
|
5325
5403
|
* Document bounds of a layer's non-transparent pixels (pixel layers; the Background's source
|
|
5326
5404
|
* included), or `null` for an empty or non-pixel layer.
|
|
@@ -5463,11 +5541,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
5463
5541
|
surfaceOf: (l) => this.surfaceOf(l),
|
|
5464
5542
|
version: `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
5465
5543
|
globalLight: this.state.globalLight,
|
|
5466
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5544
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _171 => _171.state, 'access', _172 => _172.patterns, 'optionalAccess', _173 => _173.find, 'call', _174 => _174((p) => p.id === id)]), () => ( null))
|
|
5467
5545
|
};
|
|
5468
5546
|
}
|
|
5469
|
-
|
|
5470
|
-
|
|
5547
|
+
__init82() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
|
|
5548
|
+
__init83() {this.nextSourceId = 1}
|
|
5471
5549
|
/** Changes whenever the Background's source pixels can have changed. */
|
|
5472
5550
|
sourceVersion() {
|
|
5473
5551
|
const key = this.samplePixelsOverride ? this.samplePixels : _nullishCoalesce(this.imageElement, () => ( this.samplePixels));
|
|
@@ -5516,7 +5594,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5516
5594
|
}
|
|
5517
5595
|
return fits ? fromPixels(px2) : null;
|
|
5518
5596
|
}
|
|
5519
|
-
|
|
5597
|
+
__init84() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
|
|
5520
5598
|
/** Whether every source pixel is opaque (some legacy renders depend on it). */
|
|
5521
5599
|
sourceIsOpaque() {
|
|
5522
5600
|
const s = this.sourceSurface();
|
|
@@ -5540,9 +5618,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
5540
5618
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
5541
5619
|
ctx.drawImage(el, 0, 0, width, height);
|
|
5542
5620
|
const data = ctx.getImageData(0, 0, width, height);
|
|
5543
|
-
if (!_optionalChain([data, 'optionalAccess',
|
|
5621
|
+
if (!_optionalChain([data, 'optionalAccess', _175 => _175.data]) || data.data.length < width * height * 4) return null;
|
|
5544
5622
|
return { width, height, data: data.data };
|
|
5545
|
-
} catch (
|
|
5623
|
+
} catch (e22) {
|
|
5546
5624
|
return null;
|
|
5547
5625
|
}
|
|
5548
5626
|
}
|
|
@@ -5553,7 +5631,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5553
5631
|
const prev = this.state.layers;
|
|
5554
5632
|
const depth = this.bitDepth;
|
|
5555
5633
|
this.state.layers = next;
|
|
5556
|
-
_optionalChain([extra, 'optionalCall',
|
|
5634
|
+
_optionalChain([extra, 'optionalCall', _176 => _176()]);
|
|
5557
5635
|
if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
|
|
5558
5636
|
if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
|
|
5559
5637
|
this.state.activeLayerId = _chunkUHMSMUHKcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
|
|
@@ -5591,7 +5669,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5591
5669
|
const layer = {
|
|
5592
5670
|
type: "pixel",
|
|
5593
5671
|
id: init.id && !ids.has(init.id) ? init.id : _chunkUHMSMUHKcjs.newLayerId.call(void 0, ),
|
|
5594
|
-
name: _optionalChain([init, 'access',
|
|
5672
|
+
name: _optionalChain([init, 'access', _177 => _177.name, 'optionalAccess', _178 => _178.trim, 'call', _179 => _179()]) || this.nextLayerName(),
|
|
5595
5673
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
5596
5674
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
5597
5675
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -5618,12 +5696,12 @@ var ImageEditorController = (_class10 = class {
|
|
|
5618
5696
|
async decodeImage(image) {
|
|
5619
5697
|
const trimmed = image.trim();
|
|
5620
5698
|
let png = null;
|
|
5621
|
-
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess',
|
|
5699
|
+
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _180 => _180.bytes]), () => ( null));
|
|
5622
5700
|
else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
|
|
5623
5701
|
try {
|
|
5624
5702
|
const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, trimmed);
|
|
5625
5703
|
if (_chunkCWM3CUUXcjs.isPng.call(void 0, bytes)) png = bytes;
|
|
5626
|
-
} catch (
|
|
5704
|
+
} catch (e23) {
|
|
5627
5705
|
png = null;
|
|
5628
5706
|
}
|
|
5629
5707
|
}
|
|
@@ -5631,14 +5709,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
5631
5709
|
try {
|
|
5632
5710
|
const d = _chunkCWM3CUUXcjs.decodePng.call(void 0, png);
|
|
5633
5711
|
return { width: d.width, height: d.height, data: d.data };
|
|
5634
|
-
} catch (
|
|
5712
|
+
} catch (e24) {
|
|
5635
5713
|
}
|
|
5636
5714
|
}
|
|
5637
5715
|
const src = png ? `data:image/png;base64,${_chunkCWM3CUUXcjs.bytesToBase64.call(void 0, png)}` : trimmed;
|
|
5638
5716
|
let img;
|
|
5639
5717
|
try {
|
|
5640
5718
|
img = await this.renderer.imageCache.get(src);
|
|
5641
|
-
} catch (
|
|
5719
|
+
} catch (e25) {
|
|
5642
5720
|
throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
|
|
5643
5721
|
}
|
|
5644
5722
|
const w = img.naturalWidth || img.width;
|
|
@@ -5667,7 +5745,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5667
5745
|
removeLayer(id) {
|
|
5668
5746
|
const next = _chunkUHMSMUHKcjs.removeLayer.call(void 0, this.state.layers, id);
|
|
5669
5747
|
this.commitLayers(next, () => {
|
|
5670
|
-
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUHMSMUHKcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
5748
|
+
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUHMSMUHKcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _181 => _181.id]) === this.state.selectedAnnotationId)) {
|
|
5671
5749
|
this.state.selectedAnnotationId = null;
|
|
5672
5750
|
}
|
|
5673
5751
|
});
|
|
@@ -5676,9 +5754,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
5676
5754
|
moveLayer(id, placement) {
|
|
5677
5755
|
const next = _chunkUHMSMUHKcjs.moveLayer.call(void 0, this.state.layers, id, placement);
|
|
5678
5756
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
|
|
5679
|
-
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5757
|
+
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _182 => _182.parent, 'optionalAccess', _183 => _183.id]), () => ( null)), index: loc.index };
|
|
5680
5758
|
this.commitLayers(next);
|
|
5681
|
-
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5759
|
+
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _184 => _184.parent, 'optionalAccess', _185 => _185.id]), () => ( null)), index: loc.index };
|
|
5682
5760
|
}
|
|
5683
5761
|
/**
|
|
5684
5762
|
* Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
|
|
@@ -5695,7 +5773,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5695
5773
|
const group = {
|
|
5696
5774
|
type: "group",
|
|
5697
5775
|
id: _chunkUHMSMUHKcjs.newLayerId.call(void 0, "group"),
|
|
5698
|
-
name: _optionalChain([init, 'access',
|
|
5776
|
+
name: _optionalChain([init, 'access', _186 => _186.name, 'optionalAccess', _187 => _187.trim, 'call', _188 => _188()]) || "Group",
|
|
5699
5777
|
visible: true,
|
|
5700
5778
|
opacity: 1,
|
|
5701
5779
|
blend,
|
|
@@ -5782,7 +5860,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5782
5860
|
let mask;
|
|
5783
5861
|
if (from === "selection") {
|
|
5784
5862
|
const sel = this.state.selection;
|
|
5785
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
5863
|
+
if (!_optionalChain([sel, 'optionalAccess', _189 => _189.bounds])) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
5786
5864
|
mask = this.maskFromSelection(sel, props);
|
|
5787
5865
|
if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
|
|
5788
5866
|
mask = { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
|
|
@@ -5860,7 +5938,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5860
5938
|
const layer = loc.layer;
|
|
5861
5939
|
if (layer.type !== "pixel") throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
5862
5940
|
const sel = this.state.selection;
|
|
5863
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
5941
|
+
if (!_optionalChain([sel, 'optionalAccess', _190 => _190.bounds])) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
|
|
5864
5942
|
if (options.cut) _chunkUHMSMUHKcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
|
|
5865
5943
|
const surface = this.surfaceOf(layer);
|
|
5866
5944
|
const sb = sel.bounds;
|
|
@@ -5878,14 +5956,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
5878
5956
|
const copy = {
|
|
5879
5957
|
type: "pixel",
|
|
5880
5958
|
id: _chunkUHMSMUHKcjs.newLayerId.call(void 0, ),
|
|
5881
|
-
name: _optionalChain([options, 'access',
|
|
5959
|
+
name: _optionalChain([options, 'access', _191 => _191.name, 'optionalAccess', _192 => _192.trim, 'call', _193 => _193()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
5882
5960
|
visible: true,
|
|
5883
5961
|
opacity: 1,
|
|
5884
5962
|
blend: "normal",
|
|
5885
5963
|
surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
|
|
5886
5964
|
offset: { ...layer.offset }
|
|
5887
5965
|
};
|
|
5888
|
-
let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5966
|
+
let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _194 => _194.parent, 'optionalAccess', _195 => _195.id]), () => ( null)), loc.index + 1);
|
|
5889
5967
|
if (kept) {
|
|
5890
5968
|
const cutLayer = { ...layer, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, kept) };
|
|
5891
5969
|
delete cutLayer.source;
|
|
@@ -5898,7 +5976,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5898
5976
|
return copy.id;
|
|
5899
5977
|
}
|
|
5900
5978
|
// --- Free Transform ---
|
|
5901
|
-
|
|
5979
|
+
__init85() {this.openTransform = null}
|
|
5902
5980
|
/** The Free Transform in progress (see `beginFreeTransform`), or `null`. */
|
|
5903
5981
|
getFreeTransform() {
|
|
5904
5982
|
if (this.openTransform && !this.openTransform.isOpen) this.openTransform = null;
|
|
@@ -5909,7 +5987,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5909
5987
|
layers: () => this.state.layers,
|
|
5910
5988
|
activeLayerId: () => this.state.activeLayerId,
|
|
5911
5989
|
activeTarget: () => this.state.activeTarget,
|
|
5912
|
-
selection: () => _optionalChain([this, 'access',
|
|
5990
|
+
selection: () => _optionalChain([this, 'access', _196 => _196.state, 'access', _197 => _197.selection, 'optionalAccess', _198 => _198.bounds]) ? this.state.selection : null,
|
|
5913
5991
|
canvas: () => this.naturalSize,
|
|
5914
5992
|
pixelsOf: (layer) => this.surfaceOf(layer),
|
|
5915
5993
|
shapeEnv: () => this.shapeEnv(),
|
|
@@ -6057,7 +6135,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6057
6135
|
* anything else nests as a layer document. Returns the smart object's id.
|
|
6058
6136
|
*/
|
|
6059
6137
|
convertToSmartObject(ids, options = {}) {
|
|
6060
|
-
const list = _optionalChain([ids, 'optionalAccess',
|
|
6138
|
+
const list = _optionalChain([ids, 'optionalAccess', _199 => _199.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
|
|
6061
6139
|
if (!list.length) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
|
|
6062
6140
|
const res = _chunkUHMSMUHKcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
|
|
6063
6141
|
this.commitLayers(res.layers, () => {
|
|
@@ -6090,8 +6168,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
6090
6168
|
width: c.width,
|
|
6091
6169
|
height: c.height,
|
|
6092
6170
|
decoded: _chunkUHMSMUHKcjs.isContentsDecoded.call(void 0, c),
|
|
6093
|
-
fileType: _nullishCoalesce(_optionalChain([c, 'access',
|
|
6094
|
-
linkedPath: _nullishCoalesce(_optionalChain([c, 'access',
|
|
6171
|
+
fileType: _nullishCoalesce(_optionalChain([c, 'access', _200 => _200.file, 'optionalAccess', _201 => _201.type]), () => ( null)),
|
|
6172
|
+
linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _202 => _202.linked, 'optionalAccess', _203 => _203.path]), () => ( null)),
|
|
6095
6173
|
instances: _chunkUHMSMUHKcjs.instancesOf.call(void 0, this.state.layers, c.id),
|
|
6096
6174
|
layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
|
|
6097
6175
|
},
|
|
@@ -6108,9 +6186,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
6108
6186
|
bounds: _chunkUHMSMUHKcjs.transformedBox.call(void 0, g)
|
|
6109
6187
|
},
|
|
6110
6188
|
smartFilters: {
|
|
6111
|
-
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
6112
|
-
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
6113
|
-
mask: _optionalChain([stack, 'optionalAccess',
|
|
6189
|
+
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _204 => _204.enabled]), () => ( true)),
|
|
6190
|
+
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _205 => _205.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
|
|
6191
|
+
mask: _optionalChain([stack, 'optionalAccess', _206 => _206.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
|
|
6114
6192
|
},
|
|
6115
6193
|
bounds: this.getLayerBounds(id)
|
|
6116
6194
|
};
|
|
@@ -6251,19 +6329,19 @@ var ImageEditorController = (_class10 = class {
|
|
|
6251
6329
|
removeSmartFilter(id, filterId) {
|
|
6252
6330
|
const res = _chunkUHMSMUHKcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
|
|
6253
6331
|
this.commitLayers(res.layers);
|
|
6254
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
6332
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _207 => _207.layer, 'access', _208 => _208.smartFilters, 'optionalAccess', _209 => _209.filters]), () => ( []));
|
|
6255
6333
|
}
|
|
6256
6334
|
/** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
|
|
6257
6335
|
moveSmartFilter(id, filterId, index) {
|
|
6258
6336
|
const res = _chunkUHMSMUHKcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
|
|
6259
6337
|
this.commitLayers(res.layers);
|
|
6260
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
6338
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _210 => _210.layer, 'access', _211 => _211.smartFilters, 'optionalAccess', _212 => _212.filters]), () => ( []));
|
|
6261
6339
|
}
|
|
6262
6340
|
/** Turns a smart object's whole filter stack on or off (one undo step). */
|
|
6263
6341
|
setSmartFiltersEnabled(id, enabled) {
|
|
6264
6342
|
const res = _chunkUHMSMUHKcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
|
|
6265
6343
|
this.commitLayers(res.layers);
|
|
6266
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
6344
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _213 => _213.layer, 'access', _214 => _214.smartFilters, 'optionalAccess', _215 => _215.enabled]), () => ( true));
|
|
6267
6345
|
}
|
|
6268
6346
|
/**
|
|
6269
6347
|
* Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
|
|
@@ -6275,11 +6353,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
6275
6353
|
let mask;
|
|
6276
6354
|
if (from === "none") mask = null;
|
|
6277
6355
|
else if (from === "keep") {
|
|
6278
|
-
if (!_optionalChain([layer, 'access',
|
|
6356
|
+
if (!_optionalChain([layer, 'access', _216 => _216.smartFilters, 'optionalAccess', _217 => _217.mask])) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
|
|
6279
6357
|
mask = withMaskProps(layer.smartFilters.mask, props);
|
|
6280
6358
|
} else if (from === "selection") {
|
|
6281
6359
|
const sel = this.state.selection;
|
|
6282
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
6360
|
+
if (!_optionalChain([sel, 'optionalAccess', _218 => _218.bounds])) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
6283
6361
|
mask = this.maskFromSelection(sel, props);
|
|
6284
6362
|
} else {
|
|
6285
6363
|
const v = from === "reveal-all" ? 255 : 0;
|
|
@@ -6291,7 +6369,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6291
6369
|
if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
|
|
6292
6370
|
else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
|
|
6293
6371
|
}, commitToHistory);
|
|
6294
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
6372
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _219 => _219.layer, 'access', _220 => _220.smartFilters, 'optionalAccess', _221 => _221.mask]), () => ( null));
|
|
6295
6373
|
}
|
|
6296
6374
|
/**
|
|
6297
6375
|
* Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
|
|
@@ -6316,7 +6394,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6316
6394
|
};
|
|
6317
6395
|
this.state.layers = swap(this.state.layers);
|
|
6318
6396
|
for (const e of [...this.undoStack, ...this.redoStack]) e.layers = swap(e.layers);
|
|
6319
|
-
} catch (
|
|
6397
|
+
} catch (e26) {
|
|
6320
6398
|
left.push(cid);
|
|
6321
6399
|
}
|
|
6322
6400
|
}
|
|
@@ -6324,7 +6402,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6324
6402
|
return left;
|
|
6325
6403
|
}
|
|
6326
6404
|
// --- Smart object contents (Edit Contents) ---
|
|
6327
|
-
|
|
6405
|
+
__init86() {this.contentsStack = []}
|
|
6328
6406
|
/** The smart objects whose contents are open (outermost first); empty when the document itself is shown. */
|
|
6329
6407
|
getEditingContents() {
|
|
6330
6408
|
return this.contentsStack.map((e) => ({ layerId: e.layerId, name: e.name }));
|
|
@@ -6339,7 +6417,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6339
6417
|
if (this.getFreeTransform()) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
|
|
6340
6418
|
const layer = _chunkUHMSMUHKcjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
6341
6419
|
const c = layer.contents;
|
|
6342
|
-
if (!_chunkUHMSMUHKcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access',
|
|
6420
|
+
if (!_chunkUHMSMUHKcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _222 => _222.file, 'optionalAccess', _223 => _223.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
|
|
6343
6421
|
const saved = {
|
|
6344
6422
|
state: { ...this.state },
|
|
6345
6423
|
undo: this.undoStack,
|
|
@@ -6370,9 +6448,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
6370
6448
|
editingContents: this.getEditingContents()
|
|
6371
6449
|
};
|
|
6372
6450
|
delete this.state.legacyOutputBlur;
|
|
6373
|
-
if (_optionalChain([c, 'access',
|
|
6451
|
+
if (_optionalChain([c, 'access', _224 => _224.document, 'optionalAccess', _225 => _225.globalLight])) this.state.globalLight = c.document.globalLight;
|
|
6374
6452
|
else delete this.state.globalLight;
|
|
6375
|
-
if (_optionalChain([c, 'access',
|
|
6453
|
+
if (_optionalChain([c, 'access', _226 => _226.document, 'optionalAccess', _227 => _227.patterns, 'optionalAccess', _228 => _228.length])) this.state.patterns = c.document.patterns;
|
|
6376
6454
|
else delete this.state.patterns;
|
|
6377
6455
|
this.imageElement = null;
|
|
6378
6456
|
this.samplePixels = null;
|
|
@@ -6392,23 +6470,23 @@ var ImageEditorController = (_class10 = class {
|
|
|
6392
6470
|
closeSmartObjectContents(save = true) {
|
|
6393
6471
|
const top = this.contentsStack.pop();
|
|
6394
6472
|
if (!top) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
|
|
6395
|
-
if (_optionalChain([this, 'access',
|
|
6473
|
+
if (_optionalChain([this, 'access', _229 => _229.openTransform, 'optionalAccess', _230 => _230.isOpen])) this.openTransform.cancel();
|
|
6396
6474
|
this.openTransform = null;
|
|
6397
6475
|
const edited = this.state;
|
|
6398
6476
|
const changed = save && this.undoStack.length > 0;
|
|
6399
6477
|
let next = null;
|
|
6400
6478
|
if (changed) {
|
|
6401
|
-
const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess',
|
|
6402
|
-
const old = _optionalChain([layer, 'optionalAccess',
|
|
6479
|
+
const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _231 => _231.layer]);
|
|
6480
|
+
const old = _optionalChain([layer, 'optionalAccess', _232 => _232.contents]);
|
|
6403
6481
|
const { width, height } = edited.imageDimensions;
|
|
6404
6482
|
const only = edited.layers.length === 1 ? edited.layers[0] : null;
|
|
6405
|
-
const plain3 = _optionalChain([only, 'optionalAccess',
|
|
6406
|
-
if (_optionalChain([old, 'optionalAccess',
|
|
6483
|
+
const plain3 = _optionalChain([only, 'optionalAccess', _233 => _233.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _234 => _234.filters, 'optionalAccess', _235 => _235.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
|
|
6484
|
+
if (_optionalChain([old, 'optionalAccess', _236 => _236.kind]) === "raster" && plain3) {
|
|
6407
6485
|
const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
|
|
6408
6486
|
next = _chunkUHMSMUHKcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
|
|
6409
6487
|
} else {
|
|
6410
6488
|
const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
|
|
6411
|
-
next = _chunkUHMSMUHKcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess',
|
|
6489
|
+
next = _chunkUHMSMUHKcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _237 => _237.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _238 => _238.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
|
|
6412
6490
|
}
|
|
6413
6491
|
}
|
|
6414
6492
|
const saved = top.saved;
|
|
@@ -6433,7 +6511,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6433
6511
|
}
|
|
6434
6512
|
/** The document's own layers (not the contents open for editing). */
|
|
6435
6513
|
rootLayers() {
|
|
6436
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
6514
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _239 => _239.contentsStack, 'access', _240 => _240[0], 'optionalAccess', _241 => _241.saved, 'access', _242 => _242.state, 'access', _243 => _243.layers]), () => ( this.state.layers));
|
|
6437
6515
|
}
|
|
6438
6516
|
/** Drops every open contents edit (loading another document). */
|
|
6439
6517
|
abandonContents() {
|
|
@@ -6473,7 +6551,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6473
6551
|
this.commitLayers(_chunkUHMSMUHKcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
|
|
6474
6552
|
return this.getLayerEffects(id);
|
|
6475
6553
|
}
|
|
6476
|
-
|
|
6554
|
+
__init87() {this.patternIds = /* @__PURE__ */ new WeakMap()}
|
|
6477
6555
|
/** Changes whenever the document's pattern list is replaced (the compositor then drops its caches). */
|
|
6478
6556
|
patternsVersion() {
|
|
6479
6557
|
const list = this.state.patterns;
|
|
@@ -6635,7 +6713,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6635
6713
|
});
|
|
6636
6714
|
return bg.id;
|
|
6637
6715
|
}
|
|
6638
|
-
|
|
6716
|
+
__init88() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
|
|
6639
6717
|
/**
|
|
6640
6718
|
* A small RGBA preview of a pixel layer over the canvas (or of its mask with `mask: true`),
|
|
6641
6719
|
* longest side `maxSide` px, point-sampled; `null` for layers without pixels.
|
|
@@ -6654,7 +6732,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6654
6732
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
6655
6733
|
const key = `${tw}x${th}:${ox},${oy}`;
|
|
6656
6734
|
let byKey = this.thumbCache.get(surface);
|
|
6657
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
6735
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _244 => _244.get, 'call', _245 => _245(key)]);
|
|
6658
6736
|
if (hit) return hit;
|
|
6659
6737
|
const out = new Uint8ClampedArray(tw * th * 4);
|
|
6660
6738
|
for (let y = 0; y < th; y++) {
|
|
@@ -6789,7 +6867,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6789
6867
|
if (layer.mask.source) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
|
|
6790
6868
|
_chunkUHMSMUHKcjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
6791
6869
|
} else if (ch === "filter-mask") {
|
|
6792
|
-
if (layer.type !== "smart" || !_optionalChain([layer, 'access',
|
|
6870
|
+
if (layer.type !== "smart" || !_optionalChain([layer, 'access', _246 => _246.smartFilters, 'optionalAccess', _247 => _247.mask])) {
|
|
6793
6871
|
throw new (0, _chunkUHMSMUHKcjs.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}.`);
|
|
6794
6872
|
}
|
|
6795
6873
|
if (!_chunkUHMSMUHKcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkUHMSMUHKcjs.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.`);
|
|
@@ -6804,7 +6882,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6804
6882
|
if (!layer.visible) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
|
|
6805
6883
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
6806
6884
|
const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
|
|
6807
|
-
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access',
|
|
6885
|
+
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _248 => _248.locks, 'optionalAccess', _249 => _249.transparency]));
|
|
6808
6886
|
return { id, layer, channel: ch, offset, surface, lockTransparency };
|
|
6809
6887
|
}
|
|
6810
6888
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
@@ -6847,13 +6925,13 @@ var ImageEditorController = (_class10 = class {
|
|
|
6847
6925
|
opacity: brush.opacity,
|
|
6848
6926
|
blend: target.channel !== "pixels" ? "normal" : brush.blend,
|
|
6849
6927
|
lockTransparency: target.lockTransparency,
|
|
6850
|
-
selection: _optionalChain([this, 'access',
|
|
6928
|
+
selection: _optionalChain([this, 'access', _250 => _250.state, 'access', _251 => _251.selection, 'optionalAccess', _252 => _252.bounds]) ? this.state.selection : null,
|
|
6851
6929
|
offset: target.offset
|
|
6852
6930
|
};
|
|
6853
6931
|
const depth = target.channel !== "filter-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
6854
6932
|
if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
|
|
6855
6933
|
if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
|
|
6856
|
-
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess',
|
|
6934
|
+
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _253 => _253.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
|
|
6857
6935
|
return new PaintStrokeSession(this, target, new (0, _chunkEBDCRTZIcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
|
|
6858
6936
|
}
|
|
6859
6937
|
/** A retouching stroke's start: its settings, what it samples and how it composites. */
|
|
@@ -6900,9 +6978,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
6900
6978
|
const steps = settings.historySteps;
|
|
6901
6979
|
const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
|
|
6902
6980
|
if (!entry) throw new (0, _chunkUHMSMUHKcjs.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.");
|
|
6903
|
-
const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess',
|
|
6981
|
+
const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _254 => _254.layer]);
|
|
6904
6982
|
if (!then) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
|
|
6905
|
-
const surface = target.channel === "mask" ? _optionalChain([then, 'access',
|
|
6983
|
+
const surface = target.channel === "mask" ? _optionalChain([then, 'access', _255 => _255.mask, 'optionalAccess', _256 => _256.surface]) : then.type === "pixel" ? then.surface : void 0;
|
|
6906
6984
|
if (!surface) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
|
|
6907
6985
|
const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
|
|
6908
6986
|
const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
@@ -6976,7 +7054,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6976
7054
|
}
|
|
6977
7055
|
/** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
|
|
6978
7056
|
surfaceSource(surface, offset) {
|
|
6979
|
-
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access',
|
|
7057
|
+
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _257 => _257.tiles, 'access', _258 => _258.get, 'call', _259 => _259(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _260 => _260.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
|
|
6980
7058
|
}
|
|
6981
7059
|
/** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
|
|
6982
7060
|
compositeSource(throughId, depth = null) {
|
|
@@ -7045,7 +7123,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7045
7123
|
paintStroke(init) {
|
|
7046
7124
|
if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("points must hold at least one { x, y } point.");
|
|
7047
7125
|
for (const p of init.points) {
|
|
7048
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess',
|
|
7126
|
+
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _261 => _261.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _262 => _262.y]))) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
|
|
7049
7127
|
}
|
|
7050
7128
|
const session = this.beginStroke(init);
|
|
7051
7129
|
session.push(init.points);
|
|
@@ -7073,8 +7151,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
7073
7151
|
const opacity = _nullishCoalesce(options.opacity, () => ( 1));
|
|
7074
7152
|
if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
7075
7153
|
const blend = _nullishCoalesce(_chunkUHMSMUHKcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
|
|
7076
|
-
const sel = options.useSelection !== false && _optionalChain([this, 'access',
|
|
7077
|
-
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
7154
|
+
const sel = options.useSelection !== false && _optionalChain([this, 'access', _263 => _263.state, 'access', _264 => _264.selection, 'optionalAccess', _265 => _265.bounds]) ? this.state.selection : null;
|
|
7155
|
+
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _266 => _266.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
7078
7156
|
const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
|
|
7079
7157
|
const ones = new Float32Array(region.width * region.height);
|
|
7080
7158
|
if (sel) {
|
|
@@ -7193,7 +7271,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7193
7271
|
placeLayer(layers, node, where) {
|
|
7194
7272
|
if (where.aboveId) {
|
|
7195
7273
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.aboveId);
|
|
7196
|
-
if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7274
|
+
if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _267 => _267.parent, 'optionalAccess', _268 => _268.id]), () => ( null)), loc.index + 1);
|
|
7197
7275
|
}
|
|
7198
7276
|
if (where.parentId) {
|
|
7199
7277
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.parentId);
|
|
@@ -7204,11 +7282,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
7204
7282
|
const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
|
|
7205
7283
|
if (at < nodes.length) {
|
|
7206
7284
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[at].id);
|
|
7207
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7285
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _269 => _269.parent, 'optionalAccess', _270 => _270.id]), () => ( null)), loc.index);
|
|
7208
7286
|
}
|
|
7209
7287
|
if (nodes.length) {
|
|
7210
7288
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
|
|
7211
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7289
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _271 => _271.parent, 'optionalAccess', _272 => _272.id]), () => ( null)), loc.index + 1);
|
|
7212
7290
|
}
|
|
7213
7291
|
}
|
|
7214
7292
|
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
|
|
@@ -7324,7 +7402,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7324
7402
|
const anchor = nodes[to];
|
|
7325
7403
|
const without = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
7326
7404
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, without, anchor.id);
|
|
7327
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7405
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _273 => _273.parent, 'optionalAccess', _274 => _274.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
|
|
7328
7406
|
}
|
|
7329
7407
|
/** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
7330
7408
|
moveAdjustmentLayer(id, toIndex) {
|
|
@@ -7365,7 +7443,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7365
7443
|
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
7366
7444
|
}
|
|
7367
7445
|
get hasSelection() {
|
|
7368
|
-
return Boolean(_optionalChain([this, 'access',
|
|
7446
|
+
return Boolean(_optionalChain([this, 'access', _275 => _275.state, 'access', _276 => _276.selection, 'optionalAccess', _277 => _277.bounds]));
|
|
7369
7447
|
}
|
|
7370
7448
|
/** Returns the current canvas (composition) dimensions. */
|
|
7371
7449
|
getCanvasSize() {
|
|
@@ -7516,13 +7594,13 @@ var ImageEditorController = (_class10 = class {
|
|
|
7516
7594
|
try {
|
|
7517
7595
|
const canvas = await this.renderSource();
|
|
7518
7596
|
const ctx = canvas.getContext("2d");
|
|
7519
|
-
const data2 = _optionalChain([ctx, 'optionalAccess',
|
|
7597
|
+
const data2 = _optionalChain([ctx, 'optionalAccess', _278 => _278.getImageData, 'optionalCall', _279 => _279(0, 0, width, height)]);
|
|
7520
7598
|
if (data2 && data2.data && data2.data.length >= width * height * 4) {
|
|
7521
7599
|
base = { width, height, data: data2.data };
|
|
7522
7600
|
this.samplePixels = base;
|
|
7523
7601
|
this.samplePixelsOverride = false;
|
|
7524
7602
|
}
|
|
7525
|
-
} catch (
|
|
7603
|
+
} catch (e27) {
|
|
7526
7604
|
base = null;
|
|
7527
7605
|
}
|
|
7528
7606
|
}
|
|
@@ -7582,7 +7660,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7582
7660
|
/** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
|
|
7583
7661
|
modifySelection(op, radius) {
|
|
7584
7662
|
const sel = this.state.selection;
|
|
7585
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7663
|
+
if (!_optionalChain([sel, 'optionalAccess', _280 => _280.bounds])) return false;
|
|
7586
7664
|
return this.setSelection(_chunkUHMSMUHKcjs.modifySelection.call(void 0, sel, op, radius));
|
|
7587
7665
|
}
|
|
7588
7666
|
/**
|
|
@@ -7591,7 +7669,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7591
7669
|
*/
|
|
7592
7670
|
async refineSelection(params, options = {}) {
|
|
7593
7671
|
const sel = this.state.selection;
|
|
7594
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7672
|
+
if (!_optionalChain([sel, 'optionalAccess', _281 => _281.bounds])) return false;
|
|
7595
7673
|
const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
|
|
7596
7674
|
return this.setSelection(refineSelection(pixels, sel, params));
|
|
7597
7675
|
}
|
|
@@ -7600,23 +7678,50 @@ var ImageEditorController = (_class10 = class {
|
|
|
7600
7678
|
* RGBA pixels, by luminance (white = selected) or a channel. Any size; it is resampled.
|
|
7601
7679
|
*/
|
|
7602
7680
|
async loadSelectionFromImage(source, options = {}) {
|
|
7603
|
-
|
|
7604
|
-
if (typeof source === "string") {
|
|
7605
|
-
const img = await this.renderer.imageCache.get(source);
|
|
7606
|
-
const w = img.naturalWidth || img.width;
|
|
7607
|
-
const h = img.naturalHeight || img.height;
|
|
7608
|
-
const canvas = this.renderer.createCanvas(w, h);
|
|
7609
|
-
const ctx = canvas.getContext("2d");
|
|
7610
|
-
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
7611
|
-
const data = _optionalChain([ctx, 'optionalAccess', _281 => _281.getImageData, 'optionalCall', _282 => _282(0, 0, w, h)]);
|
|
7612
|
-
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
7613
|
-
pixels = { width: w, height: h, data: data.data };
|
|
7614
|
-
} else {
|
|
7615
|
-
pixels = source;
|
|
7616
|
-
}
|
|
7681
|
+
const pixels = await this.decodeMaskImage(source);
|
|
7617
7682
|
this.setSelection(_chunkUHMSMUHKcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
|
|
7618
7683
|
return this.getSelection();
|
|
7619
7684
|
}
|
|
7685
|
+
/** A mask image (data URL / URL, or pixels as they are) as RGBA pixels. */
|
|
7686
|
+
async decodeMaskImage(source) {
|
|
7687
|
+
if (typeof source !== "string") return source;
|
|
7688
|
+
const img = await this.renderer.imageCache.get(source);
|
|
7689
|
+
const w = img.naturalWidth || img.width;
|
|
7690
|
+
const h = img.naturalHeight || img.height;
|
|
7691
|
+
const canvas = this.renderer.createCanvas(w, h);
|
|
7692
|
+
const ctx = canvas.getContext("2d");
|
|
7693
|
+
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
7694
|
+
const data = _optionalChain([ctx, 'optionalAccess', _282 => _282.getImageData, 'optionalCall', _283 => _283(0, 0, w, h)]);
|
|
7695
|
+
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
7696
|
+
return { width: w, height: h, data: data.data };
|
|
7697
|
+
}
|
|
7698
|
+
/**
|
|
7699
|
+
* Select › Subject: asks the segmentation provider for the objects matching `target` ("the
|
|
7700
|
+
* dog", "the sky") in the flattened image and selects their shapes, combined with the
|
|
7701
|
+
* selection by `mode`, as one undo step. Returns what was found (labels and bounds in natural
|
|
7702
|
+
* pixels); an empty list leaves the selection as it was. Throws without a provider.
|
|
7703
|
+
*/
|
|
7704
|
+
async selectSubject(target, options = {}) {
|
|
7705
|
+
const provider = this.segmentation;
|
|
7706
|
+
if (!provider) throw new Error("Select Subject needs a segmentation provider (setSegmentationProvider).");
|
|
7707
|
+
const description = target.trim();
|
|
7708
|
+
if (!description) throw new Error("Describe the subject to select.");
|
|
7709
|
+
const { width, height } = this.naturalSize;
|
|
7710
|
+
const image = await this.toDataURL({ format: "image/png" });
|
|
7711
|
+
const results = await provider.segment({ image, width, height, target: description, maxSegments: options.maxSegments, signal: options.signal });
|
|
7712
|
+
_optionalChain([options, 'access', _284 => _284.signal, 'optionalAccess', _285 => _285.throwIfAborted, 'call', _286 => _286()]);
|
|
7713
|
+
const decoded = [];
|
|
7714
|
+
for (const r of _nullishCoalesce(results, () => ( []))) {
|
|
7715
|
+
decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
|
|
7716
|
+
}
|
|
7717
|
+
const segments = decoded.map((r) => {
|
|
7718
|
+
const one = segmentsToSelection(width, height, [r]);
|
|
7719
|
+
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _287 => _287.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
|
|
7720
|
+
});
|
|
7721
|
+
const mask = segmentsToSelection(width, height, decoded);
|
|
7722
|
+
if (mask) this.shapeCommand(mask, options);
|
|
7723
|
+
return { segments: segments.filter((s) => s.bounds) };
|
|
7724
|
+
}
|
|
7620
7725
|
/** Quick Mask view (tints the unselected area). View state: no undo step. */
|
|
7621
7726
|
setQuickMask(on) {
|
|
7622
7727
|
if (Boolean(this.state.quickMask) === on) return;
|
|
@@ -7636,7 +7741,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7636
7741
|
*/
|
|
7637
7742
|
applySelectionAsLayerMask(layerId, props = {}) {
|
|
7638
7743
|
const sel = this.state.selection;
|
|
7639
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7744
|
+
if (!_optionalChain([sel, 'optionalAccess', _288 => _288.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
|
|
7640
7745
|
return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
|
|
7641
7746
|
}
|
|
7642
7747
|
setLayerMask(layerId, mask, commitToHistory = true) {
|
|
@@ -7667,7 +7772,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7667
7772
|
/** Load Selection from a layer mask (its pixels; density and feather are not applied). */
|
|
7668
7773
|
selectionFromLayerMask(layerId, mode = "replace") {
|
|
7669
7774
|
const layer = this.getLayer(layerId);
|
|
7670
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
7775
|
+
if (!_optionalChain([layer, 'optionalAccess', _289 => _289.mask]) || layer.mask.source) return false;
|
|
7671
7776
|
const { width, height } = this.naturalSize;
|
|
7672
7777
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
7673
7778
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -7703,7 +7808,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7703
7808
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
7704
7809
|
const next = { ...l };
|
|
7705
7810
|
if (_chunkUHMSMUHKcjs.isDefaultDepthMask.call(void 0, merged)) {
|
|
7706
|
-
if (_optionalChain([next, 'access',
|
|
7811
|
+
if (_optionalChain([next, 'access', _290 => _290.mask, 'optionalAccess', _291 => _291.source])) delete next.mask;
|
|
7707
7812
|
} else next.mask = _chunkUHMSMUHKcjs.depthRasterMask.call(void 0, merged);
|
|
7708
7813
|
return next;
|
|
7709
7814
|
});
|
|
@@ -7713,7 +7818,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7713
7818
|
resetDepthMask() {
|
|
7714
7819
|
this.recordHistory();
|
|
7715
7820
|
const target = this.developLayer();
|
|
7716
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
7821
|
+
if (_optionalChain([target, 'optionalAccess', _292 => _292.mask, 'optionalAccess', _293 => _293.source])) {
|
|
7717
7822
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
7718
7823
|
const next = { ...l };
|
|
7719
7824
|
delete next.mask;
|
|
@@ -7725,7 +7830,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7725
7830
|
// --- Annotations & Layers ---
|
|
7726
7831
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
7727
7832
|
annotationLayer(id) {
|
|
7728
|
-
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUHMSMUHKcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
7833
|
+
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUHMSMUHKcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _294 => _294.id]) === id);
|
|
7729
7834
|
}
|
|
7730
7835
|
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
7731
7836
|
annotationEnv() {
|
|
@@ -7743,7 +7848,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7743
7848
|
const fullAnnotation = { ...annotation, id };
|
|
7744
7849
|
const layer = _chunkUHMSMUHKcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
|
|
7745
7850
|
const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
|
|
7746
|
-
this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7851
|
+
this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _295 => _295.parent, 'optionalAccess', _296 => _296.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
|
|
7747
7852
|
this.state.selectedAnnotationId = id;
|
|
7748
7853
|
this.notify();
|
|
7749
7854
|
return id;
|
|
@@ -7823,7 +7928,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7823
7928
|
this.notify();
|
|
7824
7929
|
}
|
|
7825
7930
|
// --- Rendering & Export ---
|
|
7826
|
-
|
|
7931
|
+
__init89() {this.blankSource = null}
|
|
7827
7932
|
/**
|
|
7828
7933
|
* What the renderer draws from: the source image, or, for a document without one (an opened
|
|
7829
7934
|
* PSD, a v3 document loaded on its own), a transparent canvas of the document size, since every
|
|
@@ -7866,11 +7971,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
7866
7971
|
await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
|
|
7867
7972
|
...options,
|
|
7868
7973
|
// The clone source follows the brush cursor (both editors pass it).
|
|
7869
|
-
cloneSourceMarker: _optionalChain([options, 'optionalAccess',
|
|
7974
|
+
cloneSourceMarker: _optionalChain([options, 'optionalAccess', _297 => _297.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _298 => _298.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
|
|
7870
7975
|
dirty: dirty === "all" ? void 0 : dirty,
|
|
7871
7976
|
checkpointLayerId: this.state.activeLayerId
|
|
7872
7977
|
});
|
|
7873
|
-
} catch (
|
|
7978
|
+
} catch (e28) {
|
|
7874
7979
|
}
|
|
7875
7980
|
}
|
|
7876
7981
|
async renderExport(options) {
|
|
@@ -7879,7 +7984,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7879
7984
|
return this.renderer.createCanvas(1, 1);
|
|
7880
7985
|
}
|
|
7881
7986
|
this.syncViews();
|
|
7882
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7987
|
+
if (_optionalChain([options, 'optionalAccess', _299 => _299.layerIds])) {
|
|
7883
7988
|
const keep = new Set(options.layerIds);
|
|
7884
7989
|
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
|
|
7885
7990
|
return this.renderer.renderExport(source, { ...this.state, layers }, options);
|
|
@@ -7925,7 +8030,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7925
8030
|
try {
|
|
7926
8031
|
if (mime === "image/png") return _chunkBROJYMWUcjs.writePngIcc.call(void 0, bytes, icc, this.getColorProfile().name);
|
|
7927
8032
|
if (mime === "image/jpeg") return _chunkBROJYMWUcjs.writeJpegIcc.call(void 0, bytes, icc);
|
|
7928
|
-
} catch (
|
|
8033
|
+
} catch (e29) {
|
|
7929
8034
|
}
|
|
7930
8035
|
return bytes;
|
|
7931
8036
|
}
|
|
@@ -8033,7 +8138,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8033
8138
|
let px2 = await this.decodeImage(newDataUrl);
|
|
8034
8139
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
8035
8140
|
const data = new Uint8ClampedArray(px2.data);
|
|
8036
|
-
const sel = _optionalChain([this, 'access',
|
|
8141
|
+
const sel = _optionalChain([this, 'access', _300 => _300.state, 'access', _301 => _301.selection, 'optionalAccess', _302 => _302.bounds]) ? this.state.selection : null;
|
|
8037
8142
|
if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
|
|
8038
8143
|
return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
|
|
8039
8144
|
}
|
|
@@ -8080,7 +8185,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8080
8185
|
}
|
|
8081
8186
|
/** Font families the shaper offers (generic families at least). */
|
|
8082
8187
|
listFonts() {
|
|
8083
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
8188
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _303 => _303.getTextShaper, 'call', _304 => _304(), 'optionalAccess', _305 => _305.families, 'optionalCall', _306 => _306()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
8084
8189
|
}
|
|
8085
8190
|
typeInfo(id) {
|
|
8086
8191
|
const layer = _chunkUHMSMUHKcjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
@@ -8259,7 +8364,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8259
8364
|
if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
|
|
8260
8365
|
const missing = _chunkEGZM52EOcjs.layoutText.call(void 0, layer, shaper).missingFonts;
|
|
8261
8366
|
if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
|
|
8262
|
-
const first = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
8367
|
+
const first = _nullishCoalesce(_optionalChain([layer, 'access', _307 => _307.runs, 'access', _308 => _308.find, 'call', _309 => _309((r) => r.length > 0), 'optionalAccess', _310 => _310.style]), () => ( _chunkEGZM52EOcjs.DEFAULT_TEXT_STYLE));
|
|
8263
8368
|
const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
|
|
8264
8369
|
const shape = _chunkUHMSMUHKcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
|
|
8265
8370
|
const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
|
|
@@ -8292,7 +8397,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8292
8397
|
// --- Shape layers ---
|
|
8293
8398
|
/** What shape rendering needs: the canvas size and the document's patterns. */
|
|
8294
8399
|
shapeEnv() {
|
|
8295
|
-
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
8400
|
+
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _311 => _311.state, 'access', _312 => _312.patterns, 'optionalAccess', _313 => _313.find, 'call', _314 => _314((p) => p.id === id)]), () => ( null)) };
|
|
8296
8401
|
}
|
|
8297
8402
|
/** One component from tool or UI input (validated). */
|
|
8298
8403
|
componentFrom(spec, path) {
|
|
@@ -8335,9 +8440,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
8335
8440
|
* open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
|
|
8336
8441
|
*/
|
|
8337
8442
|
addShapeLayer(init) {
|
|
8338
|
-
const specs = _optionalChain([init, 'access',
|
|
8339
|
-
if (_optionalChain([init, 'access',
|
|
8340
|
-
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access',
|
|
8443
|
+
const specs = _optionalChain([init, 'access', _315 => _315.components, 'optionalAccess', _316 => _316.length]) ? init.components : [init];
|
|
8444
|
+
if (_optionalChain([init, 'access', _317 => _317.components, 'optionalAccess', _318 => _318.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
8445
|
+
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _319 => _319.components, 'optionalAccess', _320 => _320.length]) ? `components[${i}].` : ""));
|
|
8341
8446
|
const stroke = init.stroke ? _chunkUHMSMUHKcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
|
|
8342
8447
|
const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
|
|
8343
8448
|
const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkUHMSMUHKcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkUHMSMUHKcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
|
|
@@ -8448,7 +8553,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8448
8553
|
if (layer.locks) next.locks = layer.locks;
|
|
8449
8554
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
8450
8555
|
} else if (layer.type === "pixel") {
|
|
8451
|
-
if (!_optionalChain([layer, 'access',
|
|
8556
|
+
if (!_optionalChain([layer, 'access', _321 => _321.filters, 'optionalAccess', _322 => _322.length])) throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
|
|
8452
8557
|
_chunkUHMSMUHKcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
|
|
8453
8558
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
8454
8559
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -8467,7 +8572,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8467
8572
|
return this.rasterizeSmartObject(id);
|
|
8468
8573
|
} else if (layer.type === "shape" || layer.type === "type") {
|
|
8469
8574
|
next = layer.type === "shape" ? _chunkUHMSMUHKcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkUHMSMUHKcjs.typeAsPixelLayer.call(void 0, layer);
|
|
8470
|
-
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access',
|
|
8575
|
+
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _323 => _323.annotation, 'optionalAccess', _324 => _324.id])) this.state.selectedAnnotationId = null;
|
|
8471
8576
|
} else {
|
|
8472
8577
|
throw new (0, _chunkUHMSMUHKcjs.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.`);
|
|
8473
8578
|
}
|
|
@@ -8481,8 +8586,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
8481
8586
|
const doc = this.state.colorProfile;
|
|
8482
8587
|
const p = resolveProfile(doc);
|
|
8483
8588
|
const m = this.state.colorMode;
|
|
8484
|
-
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
8485
|
-
if (_optionalChain([m, 'optionalAccess',
|
|
8589
|
+
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _325 => _325.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _326 => _326.mode]), () => ( "rgb")) };
|
|
8590
|
+
if (_optionalChain([m, 'optionalAccess', _327 => _327.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
|
|
8486
8591
|
return out;
|
|
8487
8592
|
}
|
|
8488
8593
|
/**
|
|
@@ -8572,7 +8677,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8572
8677
|
const textEnv = this.textEnv();
|
|
8573
8678
|
const walk = (layers) => layers.map((l) => {
|
|
8574
8679
|
let next2 = l;
|
|
8575
|
-
if (_optionalChain([l, 'access',
|
|
8680
|
+
if (_optionalChain([l, 'access', _328 => _328.effects, 'optionalAccess', _329 => _329.items, 'access', _330 => _330.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
|
|
8576
8681
|
if (l.type === "group") {
|
|
8577
8682
|
if (next2 !== l) converted.push(l.id);
|
|
8578
8683
|
return { ...next2, children: walk(l.children) };
|
|
@@ -8586,7 +8691,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8586
8691
|
const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
|
|
8587
8692
|
try {
|
|
8588
8693
|
next2 = _chunkUHMSMUHKcjs.rerenderText.call(void 0, recoloured, textEnv);
|
|
8589
|
-
} catch (
|
|
8694
|
+
} catch (e30) {
|
|
8590
8695
|
next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
|
|
8591
8696
|
}
|
|
8592
8697
|
} else if (l.type === "annotation") next2 = { ...next2, annotation: convertColorFields(l.annotation, hex) };
|
|
@@ -8745,8 +8850,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
8745
8850
|
else delete s.bitDepth;
|
|
8746
8851
|
delete s.colorProfile;
|
|
8747
8852
|
delete s.colorMode;
|
|
8748
|
-
if (_optionalChain([result, 'access',
|
|
8749
|
-
else if (_optionalChain([result, 'access',
|
|
8853
|
+
if (_optionalChain([result, 'access', _331 => _331.sourceMode, 'optionalAccess', _332 => _332.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
|
|
8854
|
+
else if (_optionalChain([result, 'access', _333 => _333.sourceMode, 'optionalAccess', _334 => _334.mode]) === "lab") s.colorMode = { mode: "lab" };
|
|
8750
8855
|
else if (result.iccProfile) {
|
|
8751
8856
|
try {
|
|
8752
8857
|
const doc = documentProfile(result.iccProfile);
|
|
@@ -8810,7 +8915,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8810
8915
|
const compositor = new (0, _chunkUHMSMUHKcjs.LayerCompositor)();
|
|
8811
8916
|
const bakeMask = (layer) => {
|
|
8812
8917
|
const mask = layer.mask;
|
|
8813
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
8918
|
+
if (!_optionalChain([mask, 'optionalAccess', _335 => _335.source])) return mask;
|
|
8814
8919
|
add2("Parametric (depth) masks were baked into pixel masks", layer.name);
|
|
8815
8920
|
const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
|
|
8816
8921
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
@@ -8827,7 +8932,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8827
8932
|
};
|
|
8828
8933
|
const prepare = async (layer) => {
|
|
8829
8934
|
const p = await prepareLayer(layer);
|
|
8830
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
8935
|
+
if (_optionalChain([p, 'optionalAccess', _336 => _336.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
|
|
8831
8936
|
return p;
|
|
8832
8937
|
};
|
|
8833
8938
|
const prepareLayer = async (layer) => {
|
|
@@ -8870,7 +8975,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8870
8975
|
return out2;
|
|
8871
8976
|
}
|
|
8872
8977
|
if (layer.type === "shape" || layer.type === "type") {
|
|
8873
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
8978
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _337 => _337.missingFonts, 'optionalAccess', _338 => _338.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);
|
|
8874
8979
|
const out2 = { ...layer };
|
|
8875
8980
|
const mask2 = bakeMask(layer);
|
|
8876
8981
|
if (mask2) out2.mask = mask2;
|
|
@@ -8889,7 +8994,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8889
8994
|
out.surface = this.surfaceOf(layer);
|
|
8890
8995
|
delete out.source;
|
|
8891
8996
|
}
|
|
8892
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
8997
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _339 => _339.filters, 'optionalAccess', _340 => _340.filter, 'call', _341 => _341(_chunkUHMSMUHKcjs.isActiveFilter)]), () => ( []));
|
|
8893
8998
|
if (active.length) {
|
|
8894
8999
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
8895
9000
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -8900,7 +9005,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8900
9005
|
const data = compositor.composite([content], canvas, sources);
|
|
8901
9006
|
out = { ...out, surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
|
|
8902
9007
|
}
|
|
8903
|
-
if (_optionalChain([layer, 'access',
|
|
9008
|
+
if (_optionalChain([layer, 'access', _342 => _342.filters, 'optionalAccess', _343 => _343.some, 'call', _344 => _344((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
|
|
8904
9009
|
delete out.filters;
|
|
8905
9010
|
const mask = bakeMask(layer);
|
|
8906
9011
|
if (mask) out.mask = mask;
|
|
@@ -8957,7 +9062,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8957
9062
|
);
|
|
8958
9063
|
}
|
|
8959
9064
|
layers = resizeLegacyMasks(layers, prev, next.dimensions);
|
|
8960
|
-
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
9065
|
+
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _345 => _345.state, 'access', _346 => _346.patterns, 'optionalAccess', _347 => _347.find, 'call', _348 => _348((p) => p.id === pid)]), () => ( null)) };
|
|
8961
9066
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
|
|
8962
9067
|
if (l.type === "annotation") {
|
|
8963
9068
|
layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
|
|
@@ -8966,7 +9071,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8966
9071
|
const scaled = a ? scaleAnnotation(a, sx, sy) : null;
|
|
8967
9072
|
const fromAnnotation = scaled ? _chunkUHMSMUHKcjs.shapeFromAnnotation.call(void 0, scaled) : null;
|
|
8968
9073
|
const m = [sx, 0, 0, sy, 0, 0];
|
|
8969
|
-
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess',
|
|
9074
|
+
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _349 => _349.components]), () => ( _chunkUHMSMUHKcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
|
|
8970
9075
|
const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
|
|
8971
9076
|
if (scaled && fromAnnotation) moved.annotation = scaled;
|
|
8972
9077
|
else delete moved.annotation;
|
|
@@ -8984,7 +9089,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8984
9089
|
this.notify();
|
|
8985
9090
|
}
|
|
8986
9091
|
toJSON(options) {
|
|
8987
|
-
const root = _optionalChain([this, 'access',
|
|
9092
|
+
const root = _optionalChain([this, 'access', _350 => _350.contentsStack, 'access', _351 => _351[0], 'optionalAccess', _352 => _352.saved]);
|
|
8988
9093
|
const current = this.state;
|
|
8989
9094
|
const element = this.imageElement;
|
|
8990
9095
|
if (root) {
|
|
@@ -8995,7 +9100,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8995
9100
|
let out;
|
|
8996
9101
|
try {
|
|
8997
9102
|
out = this.serializeState();
|
|
8998
|
-
if (_optionalChain([this, 'access',
|
|
9103
|
+
if (_optionalChain([this, 'access', _353 => _353.state, 'access', _354 => _354.selection, 'optionalAccess', _355 => _355.bounds])) out.selection = _chunkUHMSMUHKcjs.serializeSelection.call(void 0, this.state.selection);
|
|
8999
9104
|
} finally {
|
|
9000
9105
|
if (root) {
|
|
9001
9106
|
this.state = current;
|
|
@@ -9030,7 +9135,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
9030
9135
|
if (data.selection) {
|
|
9031
9136
|
try {
|
|
9032
9137
|
selection = normalizeSelection(_chunkUHMSMUHKcjs.deserializeSelection.call(void 0, data.selection));
|
|
9033
|
-
} catch (
|
|
9138
|
+
} catch (e31) {
|
|
9034
9139
|
selection = null;
|
|
9035
9140
|
}
|
|
9036
9141
|
}
|
|
@@ -9039,7 +9144,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
9039
9144
|
this.notify();
|
|
9040
9145
|
}
|
|
9041
9146
|
/** Problems found by the last `loadJSON` / `initialState` of a v3 document (unreadable layers or assets). */
|
|
9042
|
-
|
|
9147
|
+
__init90() {this.lastLoadProblems = []}
|
|
9043
9148
|
applyStored(raw) {
|
|
9044
9149
|
const s = this.state;
|
|
9045
9150
|
const data = migrateSerializedImageEditorState(raw);
|
|
@@ -9104,10 +9209,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
9104
9209
|
serializeState() {
|
|
9105
9210
|
const { width, height } = this.naturalSize;
|
|
9106
9211
|
const view = _chunkUHMSMUHKcjs.legacyView.call(void 0, this.stack(), width, height, null);
|
|
9107
|
-
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access',
|
|
9212
|
+
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _356 => _356.state, 'access', _357 => _357.patterns, 'optionalAccess', _358 => _358.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
|
|
9108
9213
|
return {
|
|
9109
9214
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
9110
|
-
version: _optionalChain([view, 'access',
|
|
9215
|
+
version: _optionalChain([view, 'access', _359 => _359.adjustments, 'access', _360 => _360.layers, 'optionalAccess', _361 => _361.length]) ? 2 : 1,
|
|
9111
9216
|
crop: this.state.crop ? { ...this.state.crop } : null,
|
|
9112
9217
|
transform: { ...this.state.transform },
|
|
9113
9218
|
adjustments: serializeAdjustments(view.adjustments),
|
|
@@ -9132,7 +9237,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
9132
9237
|
};
|
|
9133
9238
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
9134
9239
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
9135
|
-
if (_optionalChain([this, 'access',
|
|
9240
|
+
if (_optionalChain([this, 'access', _362 => _362.state, 'access', _363 => _363.patterns, 'optionalAccess', _364 => _364.length])) out.patterns = _chunkUHMSMUHKcjs.serializePatterns.call(void 0, this.state.patterns);
|
|
9136
9241
|
if (smartContents) out.smartContents = smartContents;
|
|
9137
9242
|
if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
|
|
9138
9243
|
if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
|
|
@@ -9142,7 +9247,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
9142
9247
|
}, _class10);
|
|
9143
9248
|
function serializeAdjustments(adjustments) {
|
|
9144
9249
|
const out = { ...adjustments };
|
|
9145
|
-
if (_optionalChain([out, 'access',
|
|
9250
|
+
if (_optionalChain([out, 'access', _365 => _365.layers, 'optionalAccess', _366 => _366.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
9146
9251
|
else delete out.layers;
|
|
9147
9252
|
if (_chunkUHMSMUHKcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkUHMSMUHKcjs.LEGACY_PROCESS_VERSION) {
|
|
9148
9253
|
delete out.process;
|
|
@@ -9178,11 +9283,11 @@ function withDevelop(layer, partial) {
|
|
|
9178
9283
|
return { ...layer, filters };
|
|
9179
9284
|
}
|
|
9180
9285
|
function withBlur(layer, radius) {
|
|
9181
|
-
const existing = _optionalChain([layer, 'access',
|
|
9286
|
+
const existing = _optionalChain([layer, 'access', _367 => _367.filters, 'optionalAccess', _368 => _368.find, 'call', _369 => _369((f) => f.kind === "blur")]);
|
|
9182
9287
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
9183
9288
|
if (radius > 0) {
|
|
9184
9289
|
filters.push({
|
|
9185
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
9290
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _370 => _370.id]), () => ( (layer.source === "document" ? _chunkUHMSMUHKcjs.BLUR_FILTER_ID : _chunkUHMSMUHKcjs.newLayerId.call(void 0, "flt")))),
|
|
9186
9291
|
kind: "blur",
|
|
9187
9292
|
enabled: true,
|
|
9188
9293
|
radius
|
|
@@ -9274,7 +9379,7 @@ function collectStateTiles(layers, into) {
|
|
|
9274
9379
|
if (l.type === "shape" || l.type === "type") _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
|
|
9275
9380
|
if (l.type === "smart") {
|
|
9276
9381
|
_chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
|
|
9277
|
-
if (_optionalChain([l, 'access',
|
|
9382
|
+
if (_optionalChain([l, 'access', _371 => _371.smartFilters, 'optionalAccess', _372 => _372.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
|
|
9278
9383
|
if (l.contents.raster) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.contents.raster, into);
|
|
9279
9384
|
if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
|
|
9280
9385
|
}
|
|
@@ -9306,7 +9411,7 @@ function pixelsOnly(layers) {
|
|
|
9306
9411
|
for (const l of layers) {
|
|
9307
9412
|
if (l.type === "adjustment") continue;
|
|
9308
9413
|
if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
|
|
9309
|
-
else if (l.type === "pixel" && _optionalChain([l, 'access',
|
|
9414
|
+
else if (l.type === "pixel" && _optionalChain([l, 'access', _373 => _373.filters, 'optionalAccess', _374 => _374.length])) {
|
|
9310
9415
|
const p = { ...l };
|
|
9311
9416
|
delete p.filters;
|
|
9312
9417
|
out.push(p);
|
|
@@ -9372,7 +9477,7 @@ function toHex(c) {
|
|
|
9372
9477
|
return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
|
|
9373
9478
|
}
|
|
9374
9479
|
function normalizeSelection(mask) {
|
|
9375
|
-
return _optionalChain([mask, 'optionalAccess',
|
|
9480
|
+
return _optionalChain([mask, 'optionalAccess', _375 => _375.bounds]) ? mask : null;
|
|
9376
9481
|
}
|
|
9377
9482
|
function sameSelection(a, b) {
|
|
9378
9483
|
if (a.width !== b.width || a.height !== b.height) return false;
|
|
@@ -9526,7 +9631,7 @@ function loadImageEditorDocument(input) {
|
|
|
9526
9631
|
if (typeof input === "string") {
|
|
9527
9632
|
try {
|
|
9528
9633
|
parsed = JSON.parse(input);
|
|
9529
|
-
} catch (
|
|
9634
|
+
} catch (e32) {
|
|
9530
9635
|
parsed = input;
|
|
9531
9636
|
}
|
|
9532
9637
|
}
|
|
@@ -9582,7 +9687,7 @@ function loadImageEditorDocument(input) {
|
|
|
9582
9687
|
}
|
|
9583
9688
|
const state = { version: 1, ...result.value };
|
|
9584
9689
|
if (isV2) {
|
|
9585
|
-
if (_optionalChain([state, 'access',
|
|
9690
|
+
if (_optionalChain([state, 'access', _376 => _376.adjustments, 'access', _377 => _377.layers, 'optionalAccess', _378 => _378.length])) state.version = 2;
|
|
9586
9691
|
result.report.version = 2;
|
|
9587
9692
|
}
|
|
9588
9693
|
if (state.selection === void 0) delete state.selection;
|
|
@@ -9790,7 +9895,7 @@ function findAdjustmentControl(id) {
|
|
|
9790
9895
|
}
|
|
9791
9896
|
function findLayerControl(kind, id) {
|
|
9792
9897
|
if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
|
|
9793
|
-
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access',
|
|
9898
|
+
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _379 => _379[kind], 'optionalAccess', _380 => _380.find, 'call', _381 => _381((c) => c.id === id)]);
|
|
9794
9899
|
}
|
|
9795
9900
|
function clampControlValue(spec, v) {
|
|
9796
9901
|
if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
|
|
@@ -10007,7 +10112,7 @@ var DEPTH_MASK_CONTROLS = [
|
|
|
10007
10112
|
// src/image-editor/playback.ts
|
|
10008
10113
|
var IMAGE_PLAYBACK_KIND = "layer";
|
|
10009
10114
|
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)$/;
|
|
10010
|
-
var SELECT = /^(select_region|select_by_color|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy)$/;
|
|
10115
|
+
var SELECT = /^(select_region|select_subject|select_by_color|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy)$/;
|
|
10011
10116
|
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|convert_text_to_shape)$/;
|
|
10012
10117
|
var CROP = /^(set_crop|reset_crop|set_rotation|flip_image|transform_layer|warp_layer|flip_layer|offset_layer)$/;
|
|
10013
10118
|
var ADJUST = /^(set_adjustments|add_adjustment_layer|update_adjustment_layer|remove_adjustment_layer|move_adjustment_layer)$/;
|
|
@@ -10028,7 +10133,7 @@ function createImagePlaybackLocator(controller) {
|
|
|
10028
10133
|
};
|
|
10029
10134
|
}
|
|
10030
10135
|
var num = (v) => typeof v === "number" && Number.isFinite(v);
|
|
10031
|
-
var
|
|
10136
|
+
var isPoint2 = (p) => !!p && typeof p === "object" && num(p.x) && num(p.y);
|
|
10032
10137
|
function trace(points, max = 32) {
|
|
10033
10138
|
const list = points.length <= max ? points : Array.from({ length: max }, (_, i) => points[Math.round(i * (points.length - 1) / (max - 1))]);
|
|
10034
10139
|
if (!list.length) return [];
|
|
@@ -10064,7 +10169,7 @@ function planImageToolPlayback(tool, args) {
|
|
|
10064
10169
|
const steps = [];
|
|
10065
10170
|
const panel = imagePlaybackPanel(tool);
|
|
10066
10171
|
if (panel) steps.push({ type: "open", ref: { kind: "panel", id: panel } });
|
|
10067
|
-
const points = Array.isArray(args.points) ? args.points.filter(
|
|
10172
|
+
const points = Array.isArray(args.points) ? args.points.filter(isPoint2) : [];
|
|
10068
10173
|
const box = boxOf(args);
|
|
10069
10174
|
if (points.length) steps.push(...trace(points));
|
|
10070
10175
|
else if (box) steps.push({ type: "move", to: box.from }, { type: "press" }, { type: "drag", to: box.to }, { type: "release" });
|
|
@@ -10171,7 +10276,7 @@ function summary(controller) {
|
|
|
10171
10276
|
const area = _chunkUHMSMUHKcjs.selectionArea.call(void 0, sel);
|
|
10172
10277
|
return {
|
|
10173
10278
|
empty: !sel,
|
|
10174
|
-
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
10279
|
+
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _382 => _382.bounds]), () => ( null)),
|
|
10175
10280
|
/** Σ coverage in pixels. */
|
|
10176
10281
|
area: Math.round(area),
|
|
10177
10282
|
percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
|
|
@@ -10197,15 +10302,26 @@ function createImageSelectionTools(controller) {
|
|
|
10197
10302
|
const selectRegion = {
|
|
10198
10303
|
name: "select_region",
|
|
10199
10304
|
title: "Select a region",
|
|
10200
|
-
description: 'Selects a rectangle or ellipse (x, y, width, height in natural image pixels), everything ("all"), nothing ("none") or the inverse of the current selection ("invert"). One undoable step.',
|
|
10305
|
+
description: 'Selects a rectangle or ellipse (x, y, width, height in natural image pixels), a polygon (the lasso: points along an outline, closed automatically), everything ("all"), nothing ("none") or the inverse of the current selection ("invert"). To cut out a subject, trace its contour with polygon (then refine_selection for soft edges such as fur or foliage) rather than selecting its bounding box. One undoable step.',
|
|
10201
10306
|
inputSchema: {
|
|
10202
10307
|
type: "object",
|
|
10203
10308
|
properties: {
|
|
10204
|
-
shape: { type: "string", enum: ["rect", "ellipse", "all", "none", "invert"], description: "What to select." },
|
|
10309
|
+
shape: { type: "string", enum: ["rect", "ellipse", "polygon", "all", "none", "invert"], description: "What to select." },
|
|
10205
10310
|
x: { type: "number", description: "rect / ellipse: left edge in natural image pixels." },
|
|
10206
10311
|
y: { type: "number", description: "rect / ellipse: top edge in natural image pixels." },
|
|
10207
10312
|
width: { type: "number", description: "rect / ellipse: width in natural image pixels." },
|
|
10208
10313
|
height: { type: "number", description: "rect / ellipse: height in natural image pixels." },
|
|
10314
|
+
points: {
|
|
10315
|
+
type: "array",
|
|
10316
|
+
minItems: 3,
|
|
10317
|
+
items: {
|
|
10318
|
+
type: "object",
|
|
10319
|
+
properties: { x: { type: "number" }, y: { type: "number" } },
|
|
10320
|
+
required: ["x", "y"],
|
|
10321
|
+
additionalProperties: false
|
|
10322
|
+
},
|
|
10323
|
+
description: "polygon: at least 3 vertices along the outline, in order, in natural image pixels. Follow the edge closely; more points give a tighter contour."
|
|
10324
|
+
},
|
|
10209
10325
|
mode: modeSchema,
|
|
10210
10326
|
feather: { type: "number", minimum: 0, description: "Feather radius in pixels (default 0)." }
|
|
10211
10327
|
},
|
|
@@ -10213,7 +10329,7 @@ function createImageSelectionTools(controller) {
|
|
|
10213
10329
|
additionalProperties: false
|
|
10214
10330
|
},
|
|
10215
10331
|
annotations: writeAnnotations("Select a region", true),
|
|
10216
|
-
handler: ({ shape, x, y, width, height, mode, feather }) => {
|
|
10332
|
+
handler: ({ shape, x, y, width, height, points, mode, feather }) => {
|
|
10217
10333
|
const opts = { mode: _chunkUHMSMUHKcjs.parseSelectionMode.call(void 0, mode), feather: num2(feather, 0) };
|
|
10218
10334
|
switch (shape) {
|
|
10219
10335
|
case "all":
|
|
@@ -10235,8 +10351,16 @@ function createImageSelectionTools(controller) {
|
|
|
10235
10351
|
else controller.selectEllipse(rect, opts);
|
|
10236
10352
|
break;
|
|
10237
10353
|
}
|
|
10354
|
+
case "polygon": {
|
|
10355
|
+
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _383 => _383.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _384 => _384.y]), NaN) })) : [];
|
|
10356
|
+
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
10357
|
+
throw new Error("polygon needs points: at least 3 { x, y } vertices.");
|
|
10358
|
+
}
|
|
10359
|
+
controller.selectPolygon(list, opts);
|
|
10360
|
+
break;
|
|
10361
|
+
}
|
|
10238
10362
|
default:
|
|
10239
|
-
throw new Error(`Unknown shape "${String(shape)}". Use rect, ellipse, all, none or invert.`);
|
|
10363
|
+
throw new Error(`Unknown shape "${String(shape)}". Use rect, ellipse, polygon, all, none or invert.`);
|
|
10240
10364
|
}
|
|
10241
10365
|
return summary(controller);
|
|
10242
10366
|
}
|
|
@@ -10376,6 +10500,53 @@ function createImageSelectionTools(controller) {
|
|
|
10376
10500
|
};
|
|
10377
10501
|
return [getSelection, selectRegion, selectByColor, modify, refine, applyMask];
|
|
10378
10502
|
}
|
|
10503
|
+
function createImageSubjectSelectionTool(controller) {
|
|
10504
|
+
return {
|
|
10505
|
+
name: "select_subject",
|
|
10506
|
+
title: "Select a subject",
|
|
10507
|
+
description: 'Select \u203A Subject: an AI segmentation model finds the objects matching target (a description such as "the dog", "the house", "the sky") in the flattened image and selects their outlines, combined with the selection by mode. Use it to cut a subject out by its contour (then layer_via_copy for a layer of just that subject); describe one object precisely to get only that one. One undoable step. Returns the selection and the objects found (label, bounds); none found leaves the selection unchanged.',
|
|
10508
|
+
inputSchema: {
|
|
10509
|
+
type: "object",
|
|
10510
|
+
properties: {
|
|
10511
|
+
target: { type: "string", minLength: 1, description: "What to select, in words." },
|
|
10512
|
+
maxSegments: {
|
|
10513
|
+
type: "integer",
|
|
10514
|
+
minimum: 1,
|
|
10515
|
+
maximum: 32,
|
|
10516
|
+
description: "Select at most this many matching objects (default the model\u2019s; 1 for a single subject)."
|
|
10517
|
+
},
|
|
10518
|
+
mode: modeSchema,
|
|
10519
|
+
feather: { type: "number", minimum: 0, description: "Feather radius in pixels (default 0)." }
|
|
10520
|
+
},
|
|
10521
|
+
required: ["target"],
|
|
10522
|
+
additionalProperties: false
|
|
10523
|
+
},
|
|
10524
|
+
annotations: { ...writeAnnotations("Select a subject"), openWorldHint: true },
|
|
10525
|
+
handler: async ({ target, maxSegments, mode, feather }) => {
|
|
10526
|
+
if (typeof target !== "string" || !target.trim()) throw new Error("target must describe what to select.");
|
|
10527
|
+
const { segments } = await controller.selectSubject(target, {
|
|
10528
|
+
mode: _chunkUHMSMUHKcjs.parseSelectionMode.call(void 0, mode),
|
|
10529
|
+
feather: num2(feather, 0),
|
|
10530
|
+
maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0
|
|
10531
|
+
});
|
|
10532
|
+
return { ...summary(controller), found: segments };
|
|
10533
|
+
}
|
|
10534
|
+
};
|
|
10535
|
+
}
|
|
10536
|
+
function createImageSegmentationToolProvider(controller, options = {}) {
|
|
10537
|
+
const tool = createImageSubjectSelectionTool(controller);
|
|
10538
|
+
return withImagePlayback(
|
|
10539
|
+
{
|
|
10540
|
+
id: _nullishCoalesce(options.id, () => ( "image-segmentation")),
|
|
10541
|
+
namespace: options.namespace,
|
|
10542
|
+
title: "Image segmentation",
|
|
10543
|
+
description: "Select \u203A Subject: select objects in the image by description through an AI segmentation model.",
|
|
10544
|
+
skill: "pixerate-image-editor",
|
|
10545
|
+
tools: () => controller.segmentationProvider ? [tool] : []
|
|
10546
|
+
},
|
|
10547
|
+
options.playbackSurface
|
|
10548
|
+
);
|
|
10549
|
+
}
|
|
10379
10550
|
|
|
10380
10551
|
// src/image-editor/capture.ts
|
|
10381
10552
|
var NO_CANVAS = "Rendering is not available in this environment.";
|
|
@@ -10415,7 +10586,7 @@ async function renderImageRegion(controller, request) {
|
|
|
10415
10586
|
if (request.includeOverlays) {
|
|
10416
10587
|
const s = request.scale;
|
|
10417
10588
|
const selection = state.selection;
|
|
10418
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
10589
|
+
if (_optionalChain([selection, 'optionalAccess', _385 => _385.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
|
|
10419
10590
|
const shade = selectionShade(selection, document);
|
|
10420
10591
|
if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
|
|
10421
10592
|
}
|
|
@@ -10440,7 +10611,7 @@ function createImageCaptureSurface(controller) {
|
|
|
10440
10611
|
return {
|
|
10441
10612
|
units: "image pixels",
|
|
10442
10613
|
content: whole,
|
|
10443
|
-
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
10614
|
+
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _386 => _386.getState, 'call', _387 => _387(), 'access', _388 => _388.selection, 'optionalAccess', _389 => _389.bounds]), () => ( null)) }),
|
|
10444
10615
|
overlays: "a shade over unselected pixels and the crop box outline",
|
|
10445
10616
|
maxScale: 8,
|
|
10446
10617
|
render: (request) => renderImageRegion(controller, request)
|
|
@@ -10773,7 +10944,7 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
10773
10944
|
out.bounds = boundsOf(layer);
|
|
10774
10945
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
10775
10946
|
out.shape = {
|
|
10776
|
-
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access',
|
|
10947
|
+
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _390 => _390.live, 'optionalAccess', _391 => _391.kind]), () => ( "path")) })),
|
|
10777
10948
|
fill: layer.fill ? layer.fill.type : null,
|
|
10778
10949
|
stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
|
|
10779
10950
|
};
|
|
@@ -10795,8 +10966,8 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
10795
10966
|
out.bounds = boundsOf(layer);
|
|
10796
10967
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
10797
10968
|
out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
|
|
10798
|
-
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access',
|
|
10799
|
-
out.filterMask = maskSummary(_optionalChain([layer, 'access',
|
|
10969
|
+
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _392 => _392.smartFilters, 'optionalAccess', _393 => _393.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
|
|
10970
|
+
out.filterMask = maskSummary(_optionalChain([layer, 'access', _394 => _394.smartFilters, 'optionalAccess', _395 => _395.mask]));
|
|
10800
10971
|
break;
|
|
10801
10972
|
}
|
|
10802
10973
|
return out;
|
|
@@ -10824,7 +10995,7 @@ function createImageLayerTools(controller) {
|
|
|
10824
10995
|
if (!loc) return null;
|
|
10825
10996
|
return {
|
|
10826
10997
|
...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
|
|
10827
|
-
parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10998
|
+
parentId: _nullishCoalesce(_optionalChain([loc, 'access', _396 => _396.parent, 'optionalAccess', _397 => _397.id]), () => ( null)),
|
|
10828
10999
|
index: loc.index
|
|
10829
11000
|
};
|
|
10830
11001
|
};
|
|
@@ -11161,7 +11332,7 @@ function createImageLayerTools(controller) {
|
|
|
11161
11332
|
const viaCopy = {
|
|
11162
11333
|
name: "layer_via_copy",
|
|
11163
11334
|
title: "New layer from the selection",
|
|
11164
|
-
description: "Layer via Copy: copies the selected pixels of a pixel layer (layerId, default the active layer) to a new layer directly above it and makes it active. cut: true also removes them from the source (Layer via Cut). Needs a selection. One undo step. Returns the new layer.",
|
|
11335
|
+
description: "Layer via Copy: copies the selected pixels of a pixel layer (layerId, default the active layer) to a new layer directly above it and makes it active. cut: true also removes them from the source (Layer via Cut). Needs a selection; the new layer takes the selection\u2019s shape, so select the subject\u2019s outline (select_region polygon, select_by_color) to isolate it, not its bounding box. One undo step. Returns the new layer.",
|
|
11165
11336
|
inputSchema: {
|
|
11166
11337
|
type: "object",
|
|
11167
11338
|
properties: {
|
|
@@ -11791,14 +11962,14 @@ function handlePaintShortcut(controller, e) {
|
|
|
11791
11962
|
return false;
|
|
11792
11963
|
}
|
|
11793
11964
|
var PaintGesture = (_class11 = class {
|
|
11794
|
-
constructor(controller) {;_class11.prototype.
|
|
11965
|
+
constructor(controller) {;_class11.prototype.__init91.call(this);_class11.prototype.__init92.call(this);_class11.prototype.__init93.call(this);
|
|
11795
11966
|
this.controller = controller;
|
|
11796
11967
|
}
|
|
11797
11968
|
|
|
11798
|
-
|
|
11799
|
-
|
|
11969
|
+
__init91() {this.stroke = null}
|
|
11970
|
+
__init92() {this.move = null}
|
|
11800
11971
|
/** The last refusal (e.g. "layer is locked"), for the editor to show. */
|
|
11801
|
-
|
|
11972
|
+
__init93() {this.error = null}
|
|
11802
11973
|
get active() {
|
|
11803
11974
|
return Boolean(this.stroke || this.move);
|
|
11804
11975
|
}
|
|
@@ -11810,7 +11981,7 @@ var PaintGesture = (_class11 = class {
|
|
|
11810
11981
|
const layer = this.controller.getActiveLayer();
|
|
11811
11982
|
if (!layer) throw new Error("Select a layer to move in the Layers panel.");
|
|
11812
11983
|
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.`);
|
|
11813
|
-
if (_optionalChain([layer, 'access',
|
|
11984
|
+
if (_optionalChain([layer, 'access', _398 => _398.locks, 'optionalAccess', _399 => _399.all]) || _optionalChain([layer, 'access', _400 => _400.locks, 'optionalAccess', _401 => _401.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
|
|
11814
11985
|
const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
|
|
11815
11986
|
const b = _chunkUHMSMUHKcjs.shapeGeometryBounds.call(void 0, layer);
|
|
11816
11987
|
return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
|
|
@@ -11867,7 +12038,7 @@ var PaintGesture = (_class11 = class {
|
|
|
11867
12038
|
this.move = null;
|
|
11868
12039
|
}
|
|
11869
12040
|
cancel() {
|
|
11870
|
-
_optionalChain([this, 'access',
|
|
12041
|
+
_optionalChain([this, 'access', _402 => _402.stroke, 'optionalAccess', _403 => _403.cancel, 'call', _404 => _404()]);
|
|
11871
12042
|
this.stroke = null;
|
|
11872
12043
|
this.move = null;
|
|
11873
12044
|
}
|
|
@@ -12102,7 +12273,7 @@ function profileArg(v) {
|
|
|
12102
12273
|
if (s.startsWith("icc:")) {
|
|
12103
12274
|
try {
|
|
12104
12275
|
return _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, s.slice(4));
|
|
12105
|
-
} catch (
|
|
12276
|
+
} catch (e33) {
|
|
12106
12277
|
throw new (0, _chunkUHMSMUHKcjs.LayerOperationError)("The icc: value is not valid base64.");
|
|
12107
12278
|
}
|
|
12108
12279
|
}
|
|
@@ -12948,7 +13119,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
12948
13119
|
const layerSummary = (id) => {
|
|
12949
13120
|
const s = controller.getState();
|
|
12950
13121
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
12951
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
13122
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _405 => _405.parent, 'optionalAccess', _406 => _406.id]), () => ( null)), index: loc.index } : null;
|
|
12952
13123
|
};
|
|
12953
13124
|
const getSmart = {
|
|
12954
13125
|
name: "get_smart_object",
|
|
@@ -13503,7 +13674,7 @@ function createImageShapeTools(controller) {
|
|
|
13503
13674
|
const layerSummary = (id) => {
|
|
13504
13675
|
const s = controller.getState();
|
|
13505
13676
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
13506
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
13677
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _407 => _407.parent, 'optionalAccess', _408 => _408.id]), () => ( null)), index: loc.index } : null;
|
|
13507
13678
|
};
|
|
13508
13679
|
const get = {
|
|
13509
13680
|
name: "get_shape_layer",
|
|
@@ -13702,7 +13873,7 @@ function createImageTypeTools(controller) {
|
|
|
13702
13873
|
const layerSummary = (id) => {
|
|
13703
13874
|
const s = controller.getState();
|
|
13704
13875
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
13705
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
13876
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _409 => _409.parent, 'optionalAccess', _410 => _410.id]), () => ( null)), index: loc.index } : null;
|
|
13706
13877
|
};
|
|
13707
13878
|
const range = (args) => ({ start: args.start, end: args.end });
|
|
13708
13879
|
const listFonts = {
|
|
@@ -13711,7 +13882,7 @@ function createImageTypeTools(controller) {
|
|
|
13711
13882
|
description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
|
|
13712
13883
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
13713
13884
|
annotations: { title: "List fonts", ...READ11 },
|
|
13714
|
-
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
13885
|
+
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _411 => _411.getTextShaper, 'call', _412 => _412(), 'optionalAccess', _413 => _413.id]), () => ( null)) })
|
|
13715
13886
|
};
|
|
13716
13887
|
const get = {
|
|
13717
13888
|
name: "get_text_layer",
|
|
@@ -14000,7 +14171,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
14000
14171
|
for (const ref of [aboveId, parentId]) {
|
|
14001
14172
|
if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
|
|
14002
14173
|
}
|
|
14003
|
-
if (parentId !== void 0 && _optionalChain([controller, 'access',
|
|
14174
|
+
if (parentId !== void 0 && _optionalChain([controller, 'access', _414 => _414.getLayer, 'call', _415 => _415(parentId), 'optionalAccess', _416 => _416.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
|
|
14004
14175
|
const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId });
|
|
14005
14176
|
const layer = controller.getAdjustmentLayer(id);
|
|
14006
14177
|
return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id) };
|
|
@@ -14138,18 +14309,18 @@ var round22 = (v) => Math.round(v * 100) / 100;
|
|
|
14138
14309
|
|
|
14139
14310
|
// src/image-editor/selection/gesture.ts
|
|
14140
14311
|
var SelectionGesture = (_class12 = class {
|
|
14141
|
-
constructor(controller, getOptions) {;_class12.prototype.
|
|
14312
|
+
constructor(controller, getOptions) {;_class12.prototype.__init94.call(this);_class12.prototype.__init95.call(this);_class12.prototype.__init96.call(this);_class12.prototype.__init97.call(this);_class12.prototype.__init98.call(this);
|
|
14142
14313
|
this.controller = controller;
|
|
14143
14314
|
this.getOptions = getOptions;
|
|
14144
14315
|
}
|
|
14145
14316
|
|
|
14146
14317
|
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14318
|
+
__init94() {this.start = null}
|
|
14319
|
+
__init95() {this.points = []}
|
|
14320
|
+
__init96() {this.current = null}
|
|
14321
|
+
__init97() {this.modifiers = {}}
|
|
14151
14322
|
/** The last error (e.g. pixels unavailable for the wand), for the UI to show. */
|
|
14152
|
-
|
|
14323
|
+
__init98() {this.error = null}
|
|
14153
14324
|
get active() {
|
|
14154
14325
|
return this.start !== null;
|
|
14155
14326
|
}
|
|
@@ -14424,7 +14595,7 @@ function layerHasThumbnail(layer) {
|
|
|
14424
14595
|
return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
|
|
14425
14596
|
}
|
|
14426
14597
|
function layerWarning(layer) {
|
|
14427
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
14598
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _417 => _417.missingFonts, 'optionalAccess', _418 => _418.length])) {
|
|
14428
14599
|
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."}`;
|
|
14429
14600
|
}
|
|
14430
14601
|
return null;
|
|
@@ -14447,36 +14618,36 @@ function layerMenu(controller) {
|
|
|
14447
14618
|
const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
|
|
14448
14619
|
const below = loc ? siblings[loc.index - 1] : void 0;
|
|
14449
14620
|
const hasSel = controller.hasSelection;
|
|
14450
|
-
const isPixel = _optionalChain([active, 'optionalAccess',
|
|
14621
|
+
const isPixel = _optionalChain([active, 'optionalAccess', _419 => _419.type]) === "pixel";
|
|
14451
14622
|
return [
|
|
14452
14623
|
{ action: "new-layer", label: "New Layer", enabled: true },
|
|
14453
14624
|
{ action: "new-group", label: "New Group", enabled: true },
|
|
14454
14625
|
{ action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
|
|
14455
14626
|
{ action: "delete", label: "Delete Layer", enabled: Boolean(active) },
|
|
14456
14627
|
{ action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
|
|
14457
|
-
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess',
|
|
14458
|
-
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
14628
|
+
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _420 => _420.type]) === "group" },
|
|
14629
|
+
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _421 => _421.visible]) && _optionalChain([below, 'optionalAccess', _422 => _422.type]) === "pixel") },
|
|
14459
14630
|
{ action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
|
|
14460
14631
|
{ action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
|
|
14461
14632
|
{ action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
|
|
14462
14633
|
{ action: "via-cut", label: "Layer via Cut", enabled: isPixel && hasSel },
|
|
14463
14634
|
{ action: "add-mask", label: "Add Layer Mask", enabled: Boolean(active) },
|
|
14464
14635
|
{ action: "add-mask-selection", label: "Add Mask from Selection", enabled: Boolean(active) && hasSel },
|
|
14465
|
-
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess',
|
|
14466
|
-
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
14467
|
-
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess',
|
|
14468
|
-
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess',
|
|
14469
|
-
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess',
|
|
14636
|
+
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _423 => _423.mask])) },
|
|
14637
|
+
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _424 => _424.mask])) },
|
|
14638
|
+
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _425 => _425.mask, 'optionalAccess', _426 => _426.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _427 => _427.mask])) },
|
|
14639
|
+
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _428 => _428.mask, 'optionalAccess', _429 => _429.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _430 => _430.mask]) && !active.mask.source) },
|
|
14640
|
+
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _431 => _431.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _432 => _432.type]) === "smart" || _optionalChain([active, 'optionalAccess', _433 => _433.type]) === "shape" || _optionalChain([active, 'optionalAccess', _434 => _434.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _435 => _435.type]) === "pixel" && _optionalChain([active, 'access', _436 => _436.filters, 'optionalAccess', _437 => _437.length])) },
|
|
14470
14641
|
{ action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
|
|
14471
|
-
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess',
|
|
14472
|
-
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess',
|
|
14473
|
-
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess',
|
|
14474
|
-
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess',
|
|
14642
|
+
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _438 => _438.type]) === "smart" },
|
|
14643
|
+
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _439 => _439.type]) === "smart" },
|
|
14644
|
+
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _440 => _440.type]) === "smart" && !_optionalChain([active, 'access', _441 => _441.smartFilters, 'optionalAccess', _442 => _442.mask]) },
|
|
14645
|
+
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _443 => _443.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
|
|
14475
14646
|
];
|
|
14476
14647
|
}
|
|
14477
14648
|
async function runLayerMenuAction(controller, action) {
|
|
14478
14649
|
const active = controller.getActiveLayer();
|
|
14479
|
-
const id = _optionalChain([active, 'optionalAccess',
|
|
14650
|
+
const id = _optionalChain([active, 'optionalAccess', _444 => _444.id]);
|
|
14480
14651
|
try {
|
|
14481
14652
|
switch (action) {
|
|
14482
14653
|
case "new-layer":
|
|
@@ -14523,10 +14694,10 @@ async function runLayerMenuAction(controller, action) {
|
|
|
14523
14694
|
if (id) controller.removeLayerMask(id);
|
|
14524
14695
|
break;
|
|
14525
14696
|
case "toggle-mask":
|
|
14526
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
14697
|
+
if (id && _optionalChain([active, 'optionalAccess', _445 => _445.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
|
|
14527
14698
|
break;
|
|
14528
14699
|
case "toggle-mask-link":
|
|
14529
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
14700
|
+
if (id && _optionalChain([active, 'optionalAccess', _446 => _446.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
|
|
14530
14701
|
break;
|
|
14531
14702
|
case "rasterize":
|
|
14532
14703
|
if (id) await controller.rasterizeLayer(id);
|
|
@@ -14544,7 +14715,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
14544
14715
|
if (id) controller.setSmartFilterMask(id, "reveal-all");
|
|
14545
14716
|
break;
|
|
14546
14717
|
case "toggle-clip":
|
|
14547
|
-
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess',
|
|
14718
|
+
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _447 => _447.clipped]) });
|
|
14548
14719
|
break;
|
|
14549
14720
|
}
|
|
14550
14721
|
return null;
|
|
@@ -14554,7 +14725,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
14554
14725
|
}
|
|
14555
14726
|
function smartFilterRows(layer) {
|
|
14556
14727
|
if (layer.type !== "smart") return [];
|
|
14557
|
-
const list = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
14728
|
+
const list = _nullishCoalesce(_optionalChain([layer, 'access', _448 => _448.smartFilters, 'optionalAccess', _449 => _449.filters]), () => ( []));
|
|
14558
14729
|
const rows = list.map((f, index) => ({
|
|
14559
14730
|
filter: f,
|
|
14560
14731
|
index,
|
|
@@ -14580,8 +14751,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
14580
14751
|
};
|
|
14581
14752
|
collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
|
|
14582
14753
|
const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
|
|
14583
|
-
const imgW = _optionalChain([state, 'access',
|
|
14584
|
-
const imgH = _optionalChain([state, 'access',
|
|
14754
|
+
const imgW = _optionalChain([state, 'access', _450 => _450.imageDimensions, 'optionalAccess', _451 => _451.width]) || 1;
|
|
14755
|
+
const imgH = _optionalChain([state, 'access', _452 => _452.imageDimensions, 'optionalAccess', _453 => _453.height]) || 1;
|
|
14585
14756
|
return ctrlLayers.map((l) => {
|
|
14586
14757
|
const bounds = controller.getLayerBounds(l.id) || {
|
|
14587
14758
|
x: 0,
|
|
@@ -14590,8 +14761,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
14590
14761
|
height: imgH
|
|
14591
14762
|
};
|
|
14592
14763
|
const sLayer = sLayerMap.get(l.id);
|
|
14593
|
-
const assetKey = _optionalChain([sLayer, 'optionalAccess',
|
|
14594
|
-
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess',
|
|
14764
|
+
const assetKey = _optionalChain([sLayer, 'optionalAccess', _454 => _454.asset]);
|
|
14765
|
+
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _455 => _455.source]) === "document" ? fallbackImageUrl : "");
|
|
14595
14766
|
return {
|
|
14596
14767
|
id: l.id,
|
|
14597
14768
|
name: l.name || "Untitled Layer",
|
|
@@ -14645,9 +14816,9 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
14645
14816
|
const cx = Math.round(canvas.width / 2);
|
|
14646
14817
|
const cy = Math.round(canvas.height / 2);
|
|
14647
14818
|
return controller.addTextLayer({
|
|
14648
|
-
text: _optionalChain([init, 'optionalAccess',
|
|
14649
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
14650
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
14819
|
+
text: _optionalChain([init, 'optionalAccess', _456 => _456.text]) || "New Text",
|
|
14820
|
+
x: typeof _optionalChain([init, 'optionalAccess', _457 => _457.x]) === "number" ? init.x : cx - 100,
|
|
14821
|
+
y: typeof _optionalChain([init, 'optionalAccess', _458 => _458.y]) === "number" ? init.y : cy,
|
|
14651
14822
|
...init
|
|
14652
14823
|
});
|
|
14653
14824
|
}
|
|
@@ -14660,10 +14831,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
14660
14831
|
return controller.addShapeLayer({
|
|
14661
14832
|
shape: {
|
|
14662
14833
|
kind: "rect",
|
|
14663
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
14664
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
14665
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
14666
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
14834
|
+
x: typeof _optionalChain([init, 'optionalAccess', _459 => _459.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
14835
|
+
y: typeof _optionalChain([init, 'optionalAccess', _460 => _460.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
14836
|
+
width: typeof _optionalChain([init, 'optionalAccess', _461 => _461.width]) === "number" ? init.width : w,
|
|
14837
|
+
height: typeof _optionalChain([init, 'optionalAccess', _462 => _462.height]) === "number" ? init.height : h
|
|
14667
14838
|
},
|
|
14668
14839
|
name: "Rectangle",
|
|
14669
14840
|
...init
|
|
@@ -14678,10 +14849,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
14678
14849
|
return controller.addShapeLayer({
|
|
14679
14850
|
shape: {
|
|
14680
14851
|
kind: "ellipse",
|
|
14681
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
14682
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
14683
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
14684
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
14852
|
+
x: typeof _optionalChain([init, 'optionalAccess', _463 => _463.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
14853
|
+
y: typeof _optionalChain([init, 'optionalAccess', _464 => _464.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
14854
|
+
width: typeof _optionalChain([init, 'optionalAccess', _465 => _465.width]) === "number" ? init.width : w,
|
|
14855
|
+
height: typeof _optionalChain([init, 'optionalAccess', _466 => _466.height]) === "number" ? init.height : h
|
|
14685
14856
|
},
|
|
14686
14857
|
name: "Ellipse",
|
|
14687
14858
|
...init
|
|
@@ -14731,6 +14902,7 @@ function layerPanels(layer, options = {}) {
|
|
|
14731
14902
|
if (layer.mask) {
|
|
14732
14903
|
panels.push({ id: "mask", title: "Mask Options" });
|
|
14733
14904
|
}
|
|
14905
|
+
panels.push({ id: "selection", title: "Selection" });
|
|
14734
14906
|
return panels;
|
|
14735
14907
|
}
|
|
14736
14908
|
|
|
@@ -14740,18 +14912,18 @@ function layerEffectsPanel(layer) {
|
|
|
14740
14912
|
if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
|
|
14741
14913
|
if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
|
|
14742
14914
|
const fx = layer.effects;
|
|
14743
|
-
const readOnly = Boolean(_optionalChain([layer, 'access',
|
|
14915
|
+
const readOnly = Boolean(_optionalChain([layer, 'access', _467 => _467.locks, 'optionalAccess', _468 => _468.all]));
|
|
14744
14916
|
return {
|
|
14745
14917
|
available: true,
|
|
14746
14918
|
readOnly,
|
|
14747
14919
|
reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
|
|
14748
|
-
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
14749
|
-
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
14750
|
-
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
14920
|
+
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _469 => _469.enabled]), () => ( true)),
|
|
14921
|
+
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _470 => _470.scale]), () => ( 1)),
|
|
14922
|
+
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _471 => _471.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
|
|
14751
14923
|
};
|
|
14752
14924
|
}
|
|
14753
14925
|
function layerEffectsBadge(layer) {
|
|
14754
|
-
if (!_optionalChain([layer, 'access',
|
|
14926
|
+
if (!_optionalChain([layer, 'access', _472 => _472.effects, 'optionalAccess', _473 => _473.items, 'access', _474 => _474.length])) return null;
|
|
14755
14927
|
return _chunkHGTDMKNEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
|
|
14756
14928
|
}
|
|
14757
14929
|
var LAYER_EFFECT_MENU = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, kind) }));
|
|
@@ -14796,8 +14968,8 @@ function fillControls(f, allowPattern, patterns) {
|
|
|
14796
14968
|
}
|
|
14797
14969
|
function gradientControls(prefix, g) {
|
|
14798
14970
|
return [
|
|
14799
|
-
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
14800
|
-
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
14971
|
+
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _475 => _475.stops, 'access', _476 => _476[0], 'optionalAccess', _477 => _477.color]), () => ( "#000000")) },
|
|
14972
|
+
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _478 => _478.stops, 'access', _479 => _479[g.stops.length - 1], 'optionalAccess', _480 => _480.color]), () => ( "#ffffff")) },
|
|
14801
14973
|
{ key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
|
|
14802
14974
|
{ key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
|
|
14803
14975
|
{ key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
|
|
@@ -14889,19 +15061,19 @@ function layerEffectControls(e, patterns = []) {
|
|
|
14889
15061
|
}
|
|
14890
15062
|
function fillOfType(current, type, patterns) {
|
|
14891
15063
|
if (type === "gradient") return { type: "gradient", gradient: _chunkHGTDMKNEcjs.defaultEffectGradient.call(void 0, ) };
|
|
14892
|
-
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access',
|
|
15064
|
+
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _481 => _481[0], 'optionalAccess', _482 => _482.id]), () => ( "checker")), scale: 1 };
|
|
14893
15065
|
return { type: "color", color: current.type === "color" ? current.color : "#000000" };
|
|
14894
15066
|
}
|
|
14895
15067
|
function effectControlChange(effect, key, value, patterns = []) {
|
|
14896
15068
|
const [top, ...rest] = key.split(".");
|
|
14897
15069
|
if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
|
|
14898
15070
|
if (top === "patternId" && !rest.length) {
|
|
14899
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
15071
|
+
const name = _optionalChain([patternOptions, 'call', _483 => _483(patterns), 'access', _484 => _484.find, 'call', _485 => _485((o) => o.value === value), 'optionalAccess', _486 => _486.label]);
|
|
14900
15072
|
return name ? { patternId: value, name } : { patternId: value };
|
|
14901
15073
|
}
|
|
14902
15074
|
if (!rest.length) return { [top]: value };
|
|
14903
15075
|
if (top === "fill" && rest[0] === "patternId") {
|
|
14904
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
15076
|
+
const name = _optionalChain([patternOptions, 'call', _487 => _487(patterns), 'access', _488 => _488.find, 'call', _489 => _489((o) => o.value === value), 'optionalAccess', _490 => _490.label]);
|
|
14905
15077
|
return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
|
|
14906
15078
|
}
|
|
14907
15079
|
return { [top]: setPath(getPath(effect, top), rest, value) };
|
|
@@ -14928,7 +15100,7 @@ function colorPanelView(controller) {
|
|
|
14928
15100
|
profileName: profile.name,
|
|
14929
15101
|
workingSpace: profile.builtin,
|
|
14930
15102
|
mode: profile.mode,
|
|
14931
|
-
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access',
|
|
15103
|
+
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _491 => _491.cmykProfile, 'optionalAccess', _492 => _492.name]), () => ( null)),
|
|
14932
15104
|
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
|
|
14933
15105
|
};
|
|
14934
15106
|
}
|
|
@@ -14967,6 +15139,7 @@ async function downloadPsd(controller, name = "image") {
|
|
|
14967
15139
|
}
|
|
14968
15140
|
|
|
14969
15141
|
// src/image-editor/layers/transform-ui.ts
|
|
15142
|
+
var TRANSFORM_ROTATE_HANDLE_OFFSET = 24;
|
|
14970
15143
|
var CORNERS = ["nw", "ne", "se", "sw"];
|
|
14971
15144
|
var SIDES = ["n", "e", "s", "w"];
|
|
14972
15145
|
var CORNER_INDEX = { nw: 0, ne: 1, se: 2, sw: 3 };
|
|
@@ -15019,9 +15192,18 @@ var CURSOR = {
|
|
|
15019
15192
|
e: "ew-resize",
|
|
15020
15193
|
w: "ew-resize",
|
|
15021
15194
|
reference: "move",
|
|
15195
|
+
rotate: "grab",
|
|
15022
15196
|
inside: "move",
|
|
15023
15197
|
outside: "alias"
|
|
15024
15198
|
};
|
|
15199
|
+
function rotateHandleAt(nw, ne, centre, offset) {
|
|
15200
|
+
const len = Math.hypot(ne.x - nw.x, ne.y - nw.y);
|
|
15201
|
+
if (!(offset > 0) || !len) return void 0;
|
|
15202
|
+
const n = { x: (nw.x + ne.x) / 2, y: (nw.y + ne.y) / 2 };
|
|
15203
|
+
let dir = { x: (ne.y - nw.y) / len, y: -(ne.x - nw.x) / len };
|
|
15204
|
+
if (dir.x * (centre.x - n.x) + dir.y * (centre.y - n.y) > 0) dir = { x: -dir.x, y: -dir.y };
|
|
15205
|
+
return { x: n.x + dir.x * offset, y: n.y + dir.y * offset };
|
|
15206
|
+
}
|
|
15025
15207
|
var meshIndex = (h) => h && h.startsWith("mesh:") ? Number(h.slice(5)) : -1;
|
|
15026
15208
|
var mod = (m) => Boolean(m.ctrlKey || m.metaKey);
|
|
15027
15209
|
var add = (a, b) => ({ x: a.x + b.x, y: a.y + b.y });
|
|
@@ -15054,30 +15236,38 @@ function insidePolygon(poly, p) {
|
|
|
15054
15236
|
}
|
|
15055
15237
|
return inside;
|
|
15056
15238
|
}
|
|
15057
|
-
function quadFrameOverlay(corners, handles = true) {
|
|
15239
|
+
function quadFrameOverlay(corners, handles = true, rotateOffset = 0) {
|
|
15058
15240
|
const [nw, ne, se, sw] = corners;
|
|
15059
15241
|
const mid = (a, b) => ({ x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 });
|
|
15060
15242
|
const at = { nw, ne, se, sw, n: mid(nw, ne), e: mid(ne, se), s: mid(se, sw), w: mid(sw, nw) };
|
|
15243
|
+
const reference = mid(nw, se);
|
|
15244
|
+
const rotate = handles ? rotateHandleAt(nw, ne, reference, rotateOffset) : void 0;
|
|
15061
15245
|
return {
|
|
15062
15246
|
outline: CORNERS.map((id) => ({ ...at[id] })),
|
|
15063
15247
|
handles: handles ? [...CORNERS, ...SIDES].map((id) => ({ id, x: at[id].x, y: at[id].y })) : [],
|
|
15064
|
-
reference
|
|
15248
|
+
reference,
|
|
15249
|
+
...rotate ? { rotate } : {}
|
|
15065
15250
|
};
|
|
15066
15251
|
}
|
|
15252
|
+
function nearestHandle(overlay, p, tolerance) {
|
|
15253
|
+
let handle = null;
|
|
15254
|
+
let distance = tolerance;
|
|
15255
|
+
const points = overlay.rotate ? [...overlay.handles, { id: "rotate", ...overlay.rotate }] : overlay.handles;
|
|
15256
|
+
for (const h of points) {
|
|
15257
|
+
const d = Math.hypot(h.x - p.x, h.y - p.y);
|
|
15258
|
+
if (d <= distance) {
|
|
15259
|
+
handle = h.id;
|
|
15260
|
+
distance = d;
|
|
15261
|
+
}
|
|
15262
|
+
}
|
|
15263
|
+
return { handle, distance };
|
|
15264
|
+
}
|
|
15067
15265
|
function boxFrameOverlay(box, handles = true) {
|
|
15068
15266
|
const { x, y, width: w, height: h } = box;
|
|
15069
15267
|
return quadFrameOverlay([{ x, y }, { x: x + w, y }, { x: x + w, y: y + h }, { x, y: y + h }], handles);
|
|
15070
15268
|
}
|
|
15071
15269
|
function boxFrameHit(overlay, p, tolerance, band) {
|
|
15072
|
-
|
|
15073
|
-
let bestD = tolerance;
|
|
15074
|
-
for (const h of overlay.handles) {
|
|
15075
|
-
const d = Math.hypot(h.x - p.x, h.y - p.y);
|
|
15076
|
-
if (d <= bestD) {
|
|
15077
|
-
best = h.id;
|
|
15078
|
-
bestD = d;
|
|
15079
|
-
}
|
|
15080
|
-
}
|
|
15270
|
+
const best = nearestHandle(overlay, p, tolerance).handle;
|
|
15081
15271
|
if (best) return best;
|
|
15082
15272
|
if (insideQuad(overlay.outline, p)) return "inside";
|
|
15083
15273
|
const o = overlay.outline;
|
|
@@ -15093,32 +15283,32 @@ function boxFrameHit(overlay, p, tolerance, band) {
|
|
|
15093
15283
|
return null;
|
|
15094
15284
|
}
|
|
15095
15285
|
var FreeTransformTool = (_class13 = class {
|
|
15096
|
-
constructor(controller, options = {}) {;_class13.prototype.
|
|
15286
|
+
constructor(controller, options = {}) {;_class13.prototype.__init99.call(this);_class13.prototype.__init100.call(this);_class13.prototype.__init101.call(this);_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);
|
|
15097
15287
|
this.controller = controller;
|
|
15098
15288
|
this.options = options;
|
|
15099
15289
|
}
|
|
15100
15290
|
|
|
15101
15291
|
|
|
15102
|
-
|
|
15103
|
-
|
|
15292
|
+
__init99() {this.sessionRef = null}
|
|
15293
|
+
__init100() {this.modeValue = "scale"}
|
|
15104
15294
|
/** The reference point in the untransformed frame's space (follows the transform). */
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
|
|
15295
|
+
__init101() {this.refBox = { x: 0, y: 0 }}
|
|
15296
|
+
__init102() {this.corners = null}
|
|
15297
|
+
__init103() {this.drag = null}
|
|
15108
15298
|
/** The warp mesh in the frame's own space (null: no warp). */
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
|
|
15112
|
-
|
|
15299
|
+
__init104() {this.mesh = null}
|
|
15300
|
+
__init105() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
|
|
15301
|
+
__init106() {this.pending = false}
|
|
15302
|
+
__init107() {this.viewScale = 1}
|
|
15113
15303
|
|
|
15114
15304
|
/** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
|
|
15115
|
-
|
|
15305
|
+
__init108() {this.typed = {}}
|
|
15116
15306
|
/** Width and height scale together when typed (the chain icon). */
|
|
15117
|
-
|
|
15118
|
-
|
|
15119
|
-
|
|
15307
|
+
__init109() {this.proportional = true}
|
|
15308
|
+
__init110() {this.error = null}
|
|
15309
|
+
__init111() {this.lastResult = null}
|
|
15120
15310
|
get active() {
|
|
15121
|
-
return Boolean(_optionalChain([this, 'access',
|
|
15311
|
+
return Boolean(_optionalChain([this, 'access', _493 => _493.sessionRef, 'optionalAccess', _494 => _494.isOpen]));
|
|
15122
15312
|
}
|
|
15123
15313
|
get session() {
|
|
15124
15314
|
return this.active ? this.sessionRef : null;
|
|
@@ -15127,7 +15317,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15127
15317
|
return this.modeValue;
|
|
15128
15318
|
}
|
|
15129
15319
|
get interpolation() {
|
|
15130
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
15320
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _495 => _495.sessionRef, 'optionalAccess', _496 => _496.interpolation]), () => ( "bicubic"));
|
|
15131
15321
|
}
|
|
15132
15322
|
/** Whether the open transform has changed anything yet (a commit would add an undo step). */
|
|
15133
15323
|
get modified() {
|
|
@@ -15137,7 +15327,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15137
15327
|
const start = s.startGeometry.corners;
|
|
15138
15328
|
return this.corners.some((p, i) => p.x !== start[i].x || p.y !== start[i].y);
|
|
15139
15329
|
}
|
|
15140
|
-
|
|
15330
|
+
__init112() {this.listeners = /* @__PURE__ */ new Set()}
|
|
15141
15331
|
/** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
|
|
15142
15332
|
subscribe(listener) {
|
|
15143
15333
|
this.listeners.add(listener);
|
|
@@ -15146,7 +15336,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15146
15336
|
};
|
|
15147
15337
|
}
|
|
15148
15338
|
changed() {
|
|
15149
|
-
_optionalChain([this, 'access',
|
|
15339
|
+
_optionalChain([this, 'access', _497 => _497.options, 'access', _498 => _498.onChange, 'optionalCall', _499 => _499()]);
|
|
15150
15340
|
for (const l of this.listeners) l();
|
|
15151
15341
|
}
|
|
15152
15342
|
/** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
|
|
@@ -15246,12 +15436,15 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15246
15436
|
return { id, x: p.x, y: p.y };
|
|
15247
15437
|
});
|
|
15248
15438
|
const out = { outline: this.corners.map((p) => ({ x: p.x, y: p.y })), handles, reference: _nullishCoalesce(this.referencePoint(), () => ( { x: 0, y: 0 })) };
|
|
15439
|
+
const rotate = rotateHandleAt(handles[0], handles[1], _nullishCoalesce(_chunkQT26RHKKcjs.applyHomography.call(void 0, h, { x: s.box.x + s.box.width / 2, y: s.box.y + s.box.height / 2 }), () => ( out.reference)), TRANSFORM_ROTATE_HANDLE_OFFSET / this.viewScale);
|
|
15440
|
+
if (rotate) out.rotate = rotate;
|
|
15249
15441
|
if (this.modeValue === "warp" && this.mesh) {
|
|
15250
15442
|
const m = this.mesh;
|
|
15251
15443
|
const at = (p) => _nullishCoalesce(_chunkQT26RHKKcjs.applyHomography.call(void 0, h, p), () => ( p));
|
|
15252
15444
|
const pts = m.points.map(at);
|
|
15253
15445
|
const edit = _chunkEGZM52EOcjs.warpMeshEditPoints.call(void 0, m);
|
|
15254
15446
|
out.handles = [];
|
|
15447
|
+
delete out.rotate;
|
|
15255
15448
|
out.outline = _chunkEGZM52EOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
|
|
15256
15449
|
out.warp = {
|
|
15257
15450
|
curves: _chunkEGZM52EOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
|
|
@@ -15293,15 +15486,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15293
15486
|
if (best2 >= 0) return `mesh:${best2}`;
|
|
15294
15487
|
return insidePolygon(o.outline, p) ? "inside" : "outside";
|
|
15295
15488
|
}
|
|
15296
|
-
let best =
|
|
15297
|
-
let bestD = tolerance;
|
|
15298
|
-
for (const h of o.handles) {
|
|
15299
|
-
const d = Math.hypot(h.x - p.x, h.y - p.y);
|
|
15300
|
-
if (d <= bestD) {
|
|
15301
|
-
best = h.id;
|
|
15302
|
-
bestD = d;
|
|
15303
|
-
}
|
|
15304
|
-
}
|
|
15489
|
+
let { handle: best, distance: bestD } = nearestHandle(o, p, tolerance);
|
|
15305
15490
|
if (Math.hypot(o.reference.x - p.x, o.reference.y - p.y) < bestD) best = "reference";
|
|
15306
15491
|
if (best) return best;
|
|
15307
15492
|
return insideQuad(o.outline, p) ? "inside" : "outside";
|
|
@@ -15383,7 +15568,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15383
15568
|
const handle = d.handle;
|
|
15384
15569
|
const isCorner = handle in CORNER_INDEX;
|
|
15385
15570
|
const isSide = handle in SIDE_CORNERS;
|
|
15386
|
-
const rotating = handle === "outside" || this.modeValue === "rotate" && (isCorner || isSide);
|
|
15571
|
+
const rotating = handle === "outside" || handle === "rotate" || this.modeValue === "rotate" && (isCorner || isSide);
|
|
15387
15572
|
if (handle === "inside") {
|
|
15388
15573
|
if (m.shiftKey) delta = Math.abs(delta.x) >= Math.abs(delta.y) ? { x: delta.x, y: 0 } : { x: 0, y: delta.y };
|
|
15389
15574
|
return map((q2) => add(q2, delta));
|
|
@@ -15544,7 +15729,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15544
15729
|
}
|
|
15545
15730
|
/** Abandons the transform and restores everything. */
|
|
15546
15731
|
cancel() {
|
|
15547
|
-
_optionalChain([this, 'access',
|
|
15732
|
+
_optionalChain([this, 'access', _500 => _500.sessionRef, 'optionalAccess', _501 => _501.cancel, 'call', _502 => _502()]);
|
|
15548
15733
|
this.sessionRef = null;
|
|
15549
15734
|
this.corners = null;
|
|
15550
15735
|
this.mesh = null;
|
|
@@ -15600,7 +15785,7 @@ function imageLayerAppliedEffects(layer) {
|
|
|
15600
15785
|
const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
|
|
15601
15786
|
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 } : {} });
|
|
15602
15787
|
if (layer.type === "smart")
|
|
15603
|
-
(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
15788
|
+
(_nullishCoalesce(_optionalChain([layer, 'access', _503 => _503.smartFilters, 'optionalAccess', _504 => _504.filters]), () => ( []))).forEach((f, index) => {
|
|
15604
15789
|
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 });
|
|
15605
15790
|
});
|
|
15606
15791
|
return out;
|
|
@@ -16726,4 +16911,11 @@ function createImageEditorDocument(controller, options = {}) {
|
|
|
16726
16911
|
|
|
16727
16912
|
|
|
16728
16913
|
|
|
16729
|
-
exports.ADJUSTMENT_KEYS = _chunkUHMSMUHKcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUHMSMUHKcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUHMSMUHKcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUHMSMUHKcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUHMSMUHKcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUHMSMUHKcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.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.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUHMSMUHKcjs.D50; exports.D65 = _chunkUHMSMUHKcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkEGZM52EOcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; 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 = _chunkUHMSMUHKcjs.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 = _chunkEGZM52EOcjs.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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; 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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUHMSMUHKcjs.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.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 = _chunkUHMSMUHKcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUHMSMUHKcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUHMSMUHKcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUHMSMUHKcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUHMSMUHKcjs.LUMA_709; exports.LayerCompositor = _chunkUHMSMUHKcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUHMSMUHKcjs.LayerOperationError; 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 = _chunkUHMSMUHKcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.PsdError; 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 = _chunkUHMSMUHKcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUHMSMUHKcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkUHMSMUHKcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUHMSMUHKcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUHMSMUHKcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUHMSMUHKcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUHMSMUHKcjs.TRANSFORM_ANCHORS; 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 = _chunkUHMSMUHKcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkEGZM52EOcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkEGZM52EOcjs.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 = _chunkUHMSMUHKcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUHMSMUHKcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUHMSMUHKcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUHMSMUHKcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUHMSMUHKcjs.activeSmartFilters; exports.addLayerEffect = _chunkUHMSMUHKcjs.addLayerEffect; exports.addLayerFilter = _chunkUHMSMUHKcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUHMSMUHKcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUHMSMUHKcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUHMSMUHKcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUHMSMUHKcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUHMSMUHKcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUHMSMUHKcjs.anchorPoint; exports.annotationBlend = _chunkUHMSMUHKcjs.annotationBlend; exports.annotationLayerFor = _chunkUHMSMUHKcjs.annotationLayerFor; exports.annotationLayerName = _chunkUHMSMUHKcjs.annotationLayerName; exports.annotationOfLayer = _chunkUHMSMUHKcjs.annotationOfLayer; exports.annotationOfShape = _chunkUHMSMUHKcjs.annotationOfShape; exports.annotationOfType = _chunkUHMSMUHKcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUHMSMUHKcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUHMSMUHKcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUHMSMUHKcjs.applyAdjustments; exports.applyBoxBlur = _chunkUHMSMUHKcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUHMSMUHKcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUHMSMUHKcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUHMSMUHKcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUHMSMUHKcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUHMSMUHKcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUHMSMUHKcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUHMSMUHKcjs.applyParams; exports.applyProcess2Adjustments = _chunkUHMSMUHKcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUHMSMUHKcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUHMSMUHKcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUHMSMUHKcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.blurFilter; exports.borderCoverage = _chunkUHMSMUHKcjs.borderCoverage; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUHMSMUHKcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUHMSMUHKcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUHMSMUHKcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUHMSMUHKcjs.canvasToImagePoint; exports.caretAt = _chunkEGZM52EOcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUHMSMUHKcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUHMSMUHKcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkUHMSMUHKcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUHMSMUHKcjs.compileAdjustmentLayer; exports.componentPath = _chunkUHMSMUHKcjs.componentPath; exports.compositeDeep = _chunkUHMSMUHKcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUHMSMUHKcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUHMSMUHKcjs.contentsBox; exports.contentsSurface = _chunkUHMSMUHKcjs.contentsSurface; exports.contractCoverage = _chunkUHMSMUHKcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUHMSMUHKcjs.convertToSmartObject; exports.copySmartObject = _chunkUHMSMUHKcjs.copySmartObject; exports.cornersFromMatrix = _chunkUHMSMUHKcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUHMSMUHKcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUHMSMUHKcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkEGZM52EOcjs.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.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkEGZM52EOcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkEGZM52EOcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUHMSMUHKcjs.createSelectionMask; exports.createShapeLayer = _chunkUHMSMUHKcjs.createShapeLayer; exports.createTypeLayer = _chunkUHMSMUHKcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkEGZM52EOcjs.cssFont; exports.cssFontFamily = _chunkEGZM52EOcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUHMSMUHKcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUHMSMUHKcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUHMSMUHKcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUHMSMUHKcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUHMSMUHKcjs.decodeMergedImage; exports.decodePlanes = _chunkUHMSMUHKcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUHMSMUHKcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUHMSMUHKcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUHMSMUHKcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUHMSMUHKcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUHMSMUHKcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUHMSMUHKcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUHMSMUHKcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUHMSMUHKcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUHMSMUHKcjs.deserializeEffects; exports.deserializeLayer = _chunkUHMSMUHKcjs.deserializeLayer; exports.deserializeLayers = _chunkUHMSMUHKcjs.deserializeLayers; exports.deserializePatterns = _chunkUHMSMUHKcjs.deserializePatterns; exports.deserializeSelection = _chunkUHMSMUHKcjs.deserializeSelection; exports.developFilter = _chunkUHMSMUHKcjs.developFilter; exports.developFromAdjustments = _chunkUHMSMUHKcjs.developFromAdjustments; exports.developTarget = _chunkUHMSMUHKcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUHMSMUHKcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUHMSMUHKcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkEGZM52EOcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUHMSMUHKcjs.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.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 = _chunkUHMSMUHKcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUHMSMUHKcjs.encodeRle; exports.encodeSelectionRle = _chunkUHMSMUHKcjs.encodeSelectionRle; exports.encodeSurface = _chunkUHMSMUHKcjs.encodeSurface; exports.evalWarpMesh = _chunkEGZM52EOcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUHMSMUHKcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUHMSMUHKcjs.expandCoverage; exports.exportPsd = _chunkUHMSMUHKcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUHMSMUHKcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUHMSMUHKcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkEGZM52EOcjs.fitParagraphRuns; exports.fitRuns = _chunkEGZM52EOcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUHMSMUHKcjs.flattenPath; exports.flipCorners = _chunkUHMSMUHKcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.fontOf = _chunkEGZM52EOcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUHMSMUHKcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUHMSMUHKcjs.geometryHomography; exports.getAnnotationBounds = _chunkUHMSMUHKcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUHMSMUHKcjs.getCropCursor; exports.getRotatedSize = _chunkUHMSMUHKcjs.getRotatedSize; exports.getViewportMetrics = _chunkUHMSMUHKcjs.getViewportMetrics; exports.getViewportProjection = _chunkUHMSMUHKcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUHMSMUHKcjs.greyMorphology; exports.groupLayers = _chunkUHMSMUHKcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUHMSMUHKcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUHMSMUHKcjs.hasSurface; exports.hasWarp = _chunkUHMSMUHKcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUHMSMUHKcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUHMSMUHKcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUHMSMUHKcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUHMSMUHKcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUHMSMUHKcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUHMSMUHKcjs.hueRangeTables; exports.hueRangeWeight = _chunkUHMSMUHKcjs.hueRangeWeight; exports.hueSaturation = _chunkUHMSMUHKcjs.hueSaturation; exports.identityCurve = _chunkUHMSMUHKcjs.identityCurve; exports.identityLevels = _chunkUHMSMUHKcjs.identityLevels; exports.identityTransform = _chunkUHMSMUHKcjs.identityTransform; exports.identityWarpMesh = _chunkEGZM52EOcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUHMSMUHKcjs.imageToCanvasPoint; exports.importPsd = _chunkUHMSMUHKcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUHMSMUHKcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUHMSMUHKcjs.invertMatrix3; exports.invertSelection = _chunkUHMSMUHKcjs.invertSelection; exports.isActiveFilter = _chunkUHMSMUHKcjs.isActiveFilter; exports.isAdjustmentKind = _chunkUHMSMUHKcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkUHMSMUHKcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUHMSMUHKcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUHMSMUHKcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUHMSMUHKcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUHMSMUHKcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUHMSMUHKcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUHMSMUHKcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUHMSMUHKcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUHMSMUHKcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUHMSMUHKcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUHMSMUHKcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUHMSMUHKcjs.isTransformAnchor; exports.isValidWarp = _chunkUHMSMUHKcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUHMSMUHKcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUHMSMUHKcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUHMSMUHKcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkUHMSMUHKcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerTree = _chunkUHMSMUHKcjs.layerTree; exports.layerTypeLabel = _chunkUHMSMUHKcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUHMSMUHKcjs.layersFromLegacy; exports.layoutText = _chunkEGZM52EOcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUHMSMUHKcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUHMSMUHKcjs.legacyMaskOf; exports.legacyView = _chunkUHMSMUHKcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUHMSMUHKcjs.levelsValue; exports.linearSrgbToXy = _chunkUHMSMUHKcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUHMSMUHKcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUHMSMUHKcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUHMSMUHKcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkUHMSMUHKcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUHMSMUHKcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkUHMSMUHKcjs.matrixFromCorners; exports.matrixFromParams = _chunkUHMSMUHKcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUHMSMUHKcjs.moveLayer; exports.moveSmartFilter = _chunkUHMSMUHKcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUHMSMUHKcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUHMSMUHKcjs.neutralHueRange; exports.newContentsId = _chunkUHMSMUHKcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUHMSMUHKcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUHMSMUHKcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUHMSMUHKcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUHMSMUHKcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUHMSMUHKcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUHMSMUHKcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUHMSMUHKcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUHMSMUHKcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUHMSMUHKcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUHMSMUHKcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUHMSMUHKcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUHMSMUHKcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUHMSMUHKcjs.normalizeSubpaths; exports.normalizeText = _chunkUHMSMUHKcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUHMSMUHKcjs.offsetLayer; exports.offsetShape = _chunkUHMSMUHKcjs.offsetShape; exports.offsetSmartObject = _chunkUHMSMUHKcjs.offsetSmartObject; 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 = _chunkEGZM52EOcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUHMSMUHKcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUHMSMUHKcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUHMSMUHKcjs.parseLfx2; exports.parseLrfx = _chunkUHMSMUHKcjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUHMSMUHKcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUHMSMUHKcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUHMSMUHKcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUHMSMUHKcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUHMSMUHKcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUHMSMUHKcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUHMSMUHKcjs.pixelLayerBounds; exports.pixelLayers = _chunkUHMSMUHKcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUHMSMUHKcjs.placeContents; exports.placeLayer = _chunkUHMSMUHKcjs.placeLayer; exports.placementAt = _chunkUHMSMUHKcjs.placementAt; exports.placementBounds = _chunkUHMSMUHKcjs.placementBounds; exports.placementGeometry = _chunkUHMSMUHKcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUHMSMUHKcjs.posterizeValue; exports.presetWarp = _chunkUHMSMUHKcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUHMSMUHKcjs.projectImagePoint; exports.projectImageRect = _chunkUHMSMUHKcjs.projectImageRect; exports.projectMaskCoverage = _chunkUHMSMUHKcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUHMSMUHKcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUHMSMUHKcjs.psdToLayers; exports.pullWarpMesh = _chunkEGZM52EOcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUHMSMUHKcjs.rangeLightness; exports.rasterContents = _chunkUHMSMUHKcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUHMSMUHKcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUHMSMUHKcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUHMSMUHKcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUHMSMUHKcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUHMSMUHKcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUHMSMUHKcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUHMSMUHKcjs.removeLayer; exports.removeLayerEffect = _chunkUHMSMUHKcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUHMSMUHKcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUHMSMUHKcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUHMSMUHKcjs.renderShape; exports.renderShapeRect = _chunkUHMSMUHKcjs.renderShapeRect; exports.renderSmartObject = _chunkUHMSMUHKcjs.renderSmartObject; exports.renderText = _chunkUHMSMUHKcjs.renderText; exports.replaceContents = _chunkUHMSMUHKcjs.replaceContents; exports.replaceTextRange = _chunkUHMSMUHKcjs.replaceTextRange; exports.requireLayer = _chunkUHMSMUHKcjs.requireLayer; exports.requireOperation = _chunkUHMSMUHKcjs.requireOperation; exports.requireShapeLayer = _chunkUHMSMUHKcjs.requireShapeLayer; exports.requireSmartObject = _chunkUHMSMUHKcjs.requireSmartObject; exports.requireTypeLayer = _chunkUHMSMUHKcjs.requireTypeLayer; exports.requireUnlocked = _chunkUHMSMUHKcjs.requireUnlocked; exports.rerender = _chunkUHMSMUHKcjs.rerender; exports.rerenderShape = _chunkUHMSMUHKcjs.rerenderShape; exports.rerenderText = _chunkUHMSMUHKcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUHMSMUHKcjs.resizeSelection; exports.resizeWarpMesh = _chunkEGZM52EOcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUHMSMUHKcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkEGZM52EOcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUHMSMUHKcjs.rgbToGray; exports.rgbToHsl = _chunkUHMSMUHKcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUHMSMUHKcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUHMSMUHKcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUHMSMUHKcjs.sampleLut; exports.sampleToneLut = _chunkUHMSMUHKcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.selectionArea = _chunkUHMSMUHKcjs.selectionArea; exports.selectionFromCoverage = _chunkUHMSMUHKcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUHMSMUHKcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkUHMSMUHKcjs.selectionToCoverage; exports.selectionToPixels = _chunkUHMSMUHKcjs.selectionToPixels; exports.selectionValueAt = _chunkUHMSMUHKcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUHMSMUHKcjs.serializeContents; exports.serializeEffects = _chunkUHMSMUHKcjs.serializeEffects; exports.serializeLayer = _chunkUHMSMUHKcjs.serializeLayer; exports.serializeLayers = _chunkUHMSMUHKcjs.serializeLayers; exports.serializeLayersExternal = _chunkUHMSMUHKcjs.serializeLayersExternal; exports.serializePatterns = _chunkUHMSMUHKcjs.serializePatterns; exports.serializeSelection = _chunkUHMSMUHKcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUHMSMUHKcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUHMSMUHKcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUHMSMUHKcjs.setLayerMask; exports.setLayerProperties = _chunkUHMSMUHKcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUHMSMUHKcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUHMSMUHKcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUHMSMUHKcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUHMSMUHKcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUHMSMUHKcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUHMSMUHKcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUHMSMUHKcjs.shapeLayers; exports.shapeOutline = _chunkUHMSMUHKcjs.shapeOutline; exports.shapeRenderClip = _chunkUHMSMUHKcjs.shapeRenderClip; exports.shiftCoverage = _chunkUHMSMUHKcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUHMSMUHKcjs.smartObjectLayers; exports.smoothCoverage = _chunkUHMSMUHKcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkEGZM52EOcjs.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 = _chunkUHMSMUHKcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkEGZM52EOcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUHMSMUHKcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUHMSMUHKcjs.temperatureToKelvin; exports.textIndexAt = _chunkEGZM52EOcjs.textIndexAt; exports.textMatrix = _chunkUHMSMUHKcjs.textMatrix; exports.textOutlines = _chunkUHMSMUHKcjs.textOutlines; exports.textRange = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.toTextSpace; exports.toneCurve = _chunkUHMSMUHKcjs.toneCurve; exports.toneLuts = _chunkUHMSMUHKcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUHMSMUHKcjs.transformHomography; exports.transformMap = _chunkUHMSMUHKcjs.transformMap; exports.transformShapeComponents = _chunkUHMSMUHKcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUHMSMUHKcjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUHMSMUHKcjs.transformedBox; exports.transformedPoint = _chunkUHMSMUHKcjs.transformedPoint; exports.translateLayer = _chunkUHMSMUHKcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUHMSMUHKcjs.typeAsPixelLayer; exports.typeFrame = _chunkUHMSMUHKcjs.typeFrame; exports.typeFromAnnotation = _chunkUHMSMUHKcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUHMSMUHKcjs.typeLayerName; exports.ungroupLayer = _chunkUHMSMUHKcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUHMSMUHKcjs.unionRect; exports.unprojectCanvasPoint = _chunkUHMSMUHKcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUHMSMUHKcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUHMSMUHKcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUHMSMUHKcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUHMSMUHKcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUHMSMUHKcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUHMSMUHKcjs.updateTypeLayer; exports.userErrorMessage = _chunkUHMSMUHKcjs.userErrorMessage; exports.uvToXy = _chunkUHMSMUHKcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkUHMSMUHKcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUHMSMUHKcjs.vibranceLinear; exports.vibrancePixel = _chunkUHMSMUHKcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkEGZM52EOcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkEGZM52EOcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkEGZM52EOcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkEGZM52EOcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUHMSMUHKcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUHMSMUHKcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUHMSMUHKcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUHMSMUHKcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUHMSMUHKcjs.withNewIds; exports.writeAdjustmentBlock = _chunkUHMSMUHKcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUHMSMUHKcjs.writeLfx2; exports.writePatternBlock = _chunkUHMSMUHKcjs.writePatternBlock; exports.writePsd = _chunkUHMSMUHKcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUHMSMUHKcjs.xyToTempTint; exports.xyToUv = _chunkUHMSMUHKcjs.xyToUv;
|
|
16914
|
+
|
|
16915
|
+
|
|
16916
|
+
|
|
16917
|
+
|
|
16918
|
+
|
|
16919
|
+
|
|
16920
|
+
|
|
16921
|
+
exports.ADJUSTMENT_KEYS = _chunkUHMSMUHKcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUHMSMUHKcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUHMSMUHKcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUHMSMUHKcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUHMSMUHKcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUHMSMUHKcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.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.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUHMSMUHKcjs.D50; exports.D65 = _chunkUHMSMUHKcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkEGZM52EOcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; 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 = _chunkUHMSMUHKcjs.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 = _chunkEGZM52EOcjs.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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; 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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUHMSMUHKcjs.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.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 = _chunkUHMSMUHKcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUHMSMUHKcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUHMSMUHKcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUHMSMUHKcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUHMSMUHKcjs.LUMA_709; exports.LayerCompositor = _chunkUHMSMUHKcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUHMSMUHKcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; 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 = _chunkUHMSMUHKcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.PsdError; 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 = _chunkUHMSMUHKcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUHMSMUHKcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkUHMSMUHKcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUHMSMUHKcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUHMSMUHKcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUHMSMUHKcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkEGZM52EOcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkEGZM52EOcjs.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 = _chunkUHMSMUHKcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUHMSMUHKcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUHMSMUHKcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUHMSMUHKcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUHMSMUHKcjs.activeSmartFilters; exports.addLayerEffect = _chunkUHMSMUHKcjs.addLayerEffect; exports.addLayerFilter = _chunkUHMSMUHKcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUHMSMUHKcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUHMSMUHKcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUHMSMUHKcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUHMSMUHKcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUHMSMUHKcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUHMSMUHKcjs.anchorPoint; exports.annotationBlend = _chunkUHMSMUHKcjs.annotationBlend; exports.annotationLayerFor = _chunkUHMSMUHKcjs.annotationLayerFor; exports.annotationLayerName = _chunkUHMSMUHKcjs.annotationLayerName; exports.annotationOfLayer = _chunkUHMSMUHKcjs.annotationOfLayer; exports.annotationOfShape = _chunkUHMSMUHKcjs.annotationOfShape; exports.annotationOfType = _chunkUHMSMUHKcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUHMSMUHKcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUHMSMUHKcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUHMSMUHKcjs.applyAdjustments; exports.applyBoxBlur = _chunkUHMSMUHKcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUHMSMUHKcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUHMSMUHKcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUHMSMUHKcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUHMSMUHKcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUHMSMUHKcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUHMSMUHKcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUHMSMUHKcjs.applyParams; exports.applyProcess2Adjustments = _chunkUHMSMUHKcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUHMSMUHKcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUHMSMUHKcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUHMSMUHKcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.blurFilter; exports.borderCoverage = _chunkUHMSMUHKcjs.borderCoverage; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUHMSMUHKcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUHMSMUHKcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUHMSMUHKcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUHMSMUHKcjs.canvasToImagePoint; exports.caretAt = _chunkEGZM52EOcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUHMSMUHKcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUHMSMUHKcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkUHMSMUHKcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUHMSMUHKcjs.compileAdjustmentLayer; exports.componentPath = _chunkUHMSMUHKcjs.componentPath; exports.compositeDeep = _chunkUHMSMUHKcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUHMSMUHKcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUHMSMUHKcjs.contentsBox; exports.contentsSurface = _chunkUHMSMUHKcjs.contentsSurface; exports.contractCoverage = _chunkUHMSMUHKcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUHMSMUHKcjs.convertToSmartObject; exports.copySmartObject = _chunkUHMSMUHKcjs.copySmartObject; exports.cornersFromMatrix = _chunkUHMSMUHKcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUHMSMUHKcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUHMSMUHKcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkEGZM52EOcjs.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 = _chunkEGZM52EOcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkEGZM52EOcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUHMSMUHKcjs.createSelectionMask; exports.createShapeLayer = _chunkUHMSMUHKcjs.createShapeLayer; exports.createTypeLayer = _chunkUHMSMUHKcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkEGZM52EOcjs.cssFont; exports.cssFontFamily = _chunkEGZM52EOcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUHMSMUHKcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUHMSMUHKcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUHMSMUHKcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUHMSMUHKcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUHMSMUHKcjs.decodeMergedImage; exports.decodePlanes = _chunkUHMSMUHKcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUHMSMUHKcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUHMSMUHKcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUHMSMUHKcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUHMSMUHKcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUHMSMUHKcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUHMSMUHKcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUHMSMUHKcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUHMSMUHKcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUHMSMUHKcjs.deserializeEffects; exports.deserializeLayer = _chunkUHMSMUHKcjs.deserializeLayer; exports.deserializeLayers = _chunkUHMSMUHKcjs.deserializeLayers; exports.deserializePatterns = _chunkUHMSMUHKcjs.deserializePatterns; exports.deserializeSelection = _chunkUHMSMUHKcjs.deserializeSelection; exports.developFilter = _chunkUHMSMUHKcjs.developFilter; exports.developFromAdjustments = _chunkUHMSMUHKcjs.developFromAdjustments; exports.developTarget = _chunkUHMSMUHKcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUHMSMUHKcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUHMSMUHKcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkEGZM52EOcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUHMSMUHKcjs.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.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 = _chunkUHMSMUHKcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUHMSMUHKcjs.encodeRle; exports.encodeSelectionRle = _chunkUHMSMUHKcjs.encodeSelectionRle; exports.encodeSurface = _chunkUHMSMUHKcjs.encodeSurface; exports.evalWarpMesh = _chunkEGZM52EOcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUHMSMUHKcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUHMSMUHKcjs.expandCoverage; exports.exportPsd = _chunkUHMSMUHKcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUHMSMUHKcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUHMSMUHKcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkEGZM52EOcjs.fitParagraphRuns; exports.fitRuns = _chunkEGZM52EOcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUHMSMUHKcjs.flattenPath; exports.flipCorners = _chunkUHMSMUHKcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.fontOf = _chunkEGZM52EOcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUHMSMUHKcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUHMSMUHKcjs.geometryHomography; exports.getAnnotationBounds = _chunkUHMSMUHKcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUHMSMUHKcjs.getCropCursor; exports.getRotatedSize = _chunkUHMSMUHKcjs.getRotatedSize; exports.getViewportMetrics = _chunkUHMSMUHKcjs.getViewportMetrics; exports.getViewportProjection = _chunkUHMSMUHKcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUHMSMUHKcjs.greyMorphology; exports.groupLayers = _chunkUHMSMUHKcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUHMSMUHKcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUHMSMUHKcjs.hasSurface; exports.hasWarp = _chunkUHMSMUHKcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUHMSMUHKcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUHMSMUHKcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUHMSMUHKcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUHMSMUHKcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUHMSMUHKcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUHMSMUHKcjs.hueRangeTables; exports.hueRangeWeight = _chunkUHMSMUHKcjs.hueRangeWeight; exports.hueSaturation = _chunkUHMSMUHKcjs.hueSaturation; exports.identityCurve = _chunkUHMSMUHKcjs.identityCurve; exports.identityLevels = _chunkUHMSMUHKcjs.identityLevels; exports.identityTransform = _chunkUHMSMUHKcjs.identityTransform; exports.identityWarpMesh = _chunkEGZM52EOcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUHMSMUHKcjs.imageToCanvasPoint; exports.importPsd = _chunkUHMSMUHKcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUHMSMUHKcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUHMSMUHKcjs.invertMatrix3; exports.invertSelection = _chunkUHMSMUHKcjs.invertSelection; exports.isActiveFilter = _chunkUHMSMUHKcjs.isActiveFilter; exports.isAdjustmentKind = _chunkUHMSMUHKcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkUHMSMUHKcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUHMSMUHKcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUHMSMUHKcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUHMSMUHKcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUHMSMUHKcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUHMSMUHKcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUHMSMUHKcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUHMSMUHKcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUHMSMUHKcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUHMSMUHKcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUHMSMUHKcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUHMSMUHKcjs.isTransformAnchor; exports.isValidWarp = _chunkUHMSMUHKcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUHMSMUHKcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUHMSMUHKcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUHMSMUHKcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkUHMSMUHKcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerTree = _chunkUHMSMUHKcjs.layerTree; exports.layerTypeLabel = _chunkUHMSMUHKcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUHMSMUHKcjs.layersFromLegacy; exports.layoutText = _chunkEGZM52EOcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUHMSMUHKcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUHMSMUHKcjs.legacyMaskOf; exports.legacyView = _chunkUHMSMUHKcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUHMSMUHKcjs.levelsValue; exports.linearSrgbToXy = _chunkUHMSMUHKcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUHMSMUHKcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUHMSMUHKcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUHMSMUHKcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkUHMSMUHKcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUHMSMUHKcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkUHMSMUHKcjs.matrixFromCorners; exports.matrixFromParams = _chunkUHMSMUHKcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUHMSMUHKcjs.moveLayer; exports.moveSmartFilter = _chunkUHMSMUHKcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUHMSMUHKcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUHMSMUHKcjs.neutralHueRange; exports.newContentsId = _chunkUHMSMUHKcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUHMSMUHKcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUHMSMUHKcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUHMSMUHKcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUHMSMUHKcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUHMSMUHKcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUHMSMUHKcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUHMSMUHKcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUHMSMUHKcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUHMSMUHKcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUHMSMUHKcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUHMSMUHKcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUHMSMUHKcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUHMSMUHKcjs.normalizeSubpaths; exports.normalizeText = _chunkUHMSMUHKcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUHMSMUHKcjs.offsetLayer; exports.offsetShape = _chunkUHMSMUHKcjs.offsetShape; exports.offsetSmartObject = _chunkUHMSMUHKcjs.offsetSmartObject; 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 = _chunkEGZM52EOcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUHMSMUHKcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUHMSMUHKcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUHMSMUHKcjs.parseLfx2; exports.parseLrfx = _chunkUHMSMUHKcjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUHMSMUHKcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUHMSMUHKcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUHMSMUHKcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUHMSMUHKcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUHMSMUHKcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUHMSMUHKcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUHMSMUHKcjs.pixelLayerBounds; exports.pixelLayers = _chunkUHMSMUHKcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUHMSMUHKcjs.placeContents; exports.placeLayer = _chunkUHMSMUHKcjs.placeLayer; exports.placementAt = _chunkUHMSMUHKcjs.placementAt; exports.placementBounds = _chunkUHMSMUHKcjs.placementBounds; exports.placementGeometry = _chunkUHMSMUHKcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUHMSMUHKcjs.posterizeValue; exports.presetWarp = _chunkUHMSMUHKcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUHMSMUHKcjs.projectImagePoint; exports.projectImageRect = _chunkUHMSMUHKcjs.projectImageRect; exports.projectMaskCoverage = _chunkUHMSMUHKcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUHMSMUHKcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUHMSMUHKcjs.psdToLayers; exports.pullWarpMesh = _chunkEGZM52EOcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUHMSMUHKcjs.rangeLightness; exports.rasterContents = _chunkUHMSMUHKcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUHMSMUHKcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUHMSMUHKcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUHMSMUHKcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUHMSMUHKcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUHMSMUHKcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUHMSMUHKcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUHMSMUHKcjs.removeLayer; exports.removeLayerEffect = _chunkUHMSMUHKcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUHMSMUHKcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUHMSMUHKcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUHMSMUHKcjs.renderShape; exports.renderShapeRect = _chunkUHMSMUHKcjs.renderShapeRect; exports.renderSmartObject = _chunkUHMSMUHKcjs.renderSmartObject; exports.renderText = _chunkUHMSMUHKcjs.renderText; exports.replaceContents = _chunkUHMSMUHKcjs.replaceContents; exports.replaceTextRange = _chunkUHMSMUHKcjs.replaceTextRange; exports.requireLayer = _chunkUHMSMUHKcjs.requireLayer; exports.requireOperation = _chunkUHMSMUHKcjs.requireOperation; exports.requireShapeLayer = _chunkUHMSMUHKcjs.requireShapeLayer; exports.requireSmartObject = _chunkUHMSMUHKcjs.requireSmartObject; exports.requireTypeLayer = _chunkUHMSMUHKcjs.requireTypeLayer; exports.requireUnlocked = _chunkUHMSMUHKcjs.requireUnlocked; exports.rerender = _chunkUHMSMUHKcjs.rerender; exports.rerenderShape = _chunkUHMSMUHKcjs.rerenderShape; exports.rerenderText = _chunkUHMSMUHKcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUHMSMUHKcjs.resizeSelection; exports.resizeWarpMesh = _chunkEGZM52EOcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUHMSMUHKcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkEGZM52EOcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUHMSMUHKcjs.rgbToGray; exports.rgbToHsl = _chunkUHMSMUHKcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUHMSMUHKcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUHMSMUHKcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUHMSMUHKcjs.sampleLut; exports.sampleToneLut = _chunkUHMSMUHKcjs.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.segmentsToSelection = segmentsToSelection; exports.selectionArea = _chunkUHMSMUHKcjs.selectionArea; exports.selectionFromCoverage = _chunkUHMSMUHKcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUHMSMUHKcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkUHMSMUHKcjs.selectionToCoverage; exports.selectionToPixels = _chunkUHMSMUHKcjs.selectionToPixels; exports.selectionValueAt = _chunkUHMSMUHKcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUHMSMUHKcjs.serializeContents; exports.serializeEffects = _chunkUHMSMUHKcjs.serializeEffects; exports.serializeLayer = _chunkUHMSMUHKcjs.serializeLayer; exports.serializeLayers = _chunkUHMSMUHKcjs.serializeLayers; exports.serializeLayersExternal = _chunkUHMSMUHKcjs.serializeLayersExternal; exports.serializePatterns = _chunkUHMSMUHKcjs.serializePatterns; exports.serializeSelection = _chunkUHMSMUHKcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUHMSMUHKcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUHMSMUHKcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUHMSMUHKcjs.setLayerMask; exports.setLayerProperties = _chunkUHMSMUHKcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUHMSMUHKcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUHMSMUHKcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUHMSMUHKcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUHMSMUHKcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUHMSMUHKcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUHMSMUHKcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUHMSMUHKcjs.shapeLayers; exports.shapeOutline = _chunkUHMSMUHKcjs.shapeOutline; exports.shapeRenderClip = _chunkUHMSMUHKcjs.shapeRenderClip; exports.shiftCoverage = _chunkUHMSMUHKcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUHMSMUHKcjs.smartObjectLayers; exports.smoothCoverage = _chunkUHMSMUHKcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkEGZM52EOcjs.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 = _chunkUHMSMUHKcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkEGZM52EOcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUHMSMUHKcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUHMSMUHKcjs.temperatureToKelvin; exports.textIndexAt = _chunkEGZM52EOcjs.textIndexAt; exports.textMatrix = _chunkUHMSMUHKcjs.textMatrix; exports.textOutlines = _chunkUHMSMUHKcjs.textOutlines; exports.textRange = _chunkUHMSMUHKcjs.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 = _chunkUHMSMUHKcjs.toTextSpace; exports.toneCurve = _chunkUHMSMUHKcjs.toneCurve; exports.toneLuts = _chunkUHMSMUHKcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUHMSMUHKcjs.transformHomography; exports.transformMap = _chunkUHMSMUHKcjs.transformMap; exports.transformShapeComponents = _chunkUHMSMUHKcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUHMSMUHKcjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUHMSMUHKcjs.transformedBox; exports.transformedPoint = _chunkUHMSMUHKcjs.transformedPoint; exports.translateLayer = _chunkUHMSMUHKcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUHMSMUHKcjs.typeAsPixelLayer; exports.typeFrame = _chunkUHMSMUHKcjs.typeFrame; exports.typeFromAnnotation = _chunkUHMSMUHKcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUHMSMUHKcjs.typeLayerName; exports.ungroupLayer = _chunkUHMSMUHKcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUHMSMUHKcjs.unionRect; exports.unprojectCanvasPoint = _chunkUHMSMUHKcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUHMSMUHKcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUHMSMUHKcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUHMSMUHKcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUHMSMUHKcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUHMSMUHKcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUHMSMUHKcjs.updateTypeLayer; exports.userErrorMessage = _chunkUHMSMUHKcjs.userErrorMessage; exports.uvToXy = _chunkUHMSMUHKcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkUHMSMUHKcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUHMSMUHKcjs.vibranceLinear; exports.vibrancePixel = _chunkUHMSMUHKcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkEGZM52EOcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkEGZM52EOcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkEGZM52EOcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkEGZM52EOcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUHMSMUHKcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUHMSMUHKcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUHMSMUHKcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUHMSMUHKcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUHMSMUHKcjs.withNewIds; exports.writeAdjustmentBlock = _chunkUHMSMUHKcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUHMSMUHKcjs.writeLfx2; exports.writePatternBlock = _chunkUHMSMUHKcjs.writePatternBlock; exports.writePsd = _chunkUHMSMUHKcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUHMSMUHKcjs.xyToTempTint; exports.xyToUv = _chunkUHMSMUHKcjs.xyToUv;
|