@blazediff/cli 2.1.2 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -33,14 +33,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  mod
34
34
  ));
35
35
 
36
- // src/commands/bin.ts
37
- var bin_exports = {};
38
- __export(bin_exports, {
36
+ // src/commands/core-native.ts
37
+ var core_native_exports = {};
38
+ __export(core_native_exports, {
39
39
  default: () => main
40
40
  });
41
41
  function printUsage() {
42
42
  console.log(`
43
- Usage: blazediff-cli bin <image1> <image2> <output> [options]
43
+ Usage: blazediff-cli core-native <image1> <image2> <output> [options]
44
44
 
45
45
  Arguments:
46
46
  image1 Path to the first image
@@ -55,9 +55,9 @@ Options:
55
55
  -h, --help Show this help message
56
56
 
57
57
  Examples:
58
- blazediff-cli bin image1.png image2.png diff.png
59
- blazediff-cli bin image1.png image2.png diff.png -t 0.05 -a
60
- blazediff-cli bin image1.png image2.png diff.png --threshold 0.2 --antialiasing
58
+ blazediff-cli core-native image1.png image2.png diff.png
59
+ blazediff-cli core-native image1.png image2.png diff.png -t 0.05 -a
60
+ blazediff-cli core-native image1.png image2.png diff.png --threshold 0.2 --antialiasing
61
61
  `);
62
62
  }
63
63
  async function main() {
@@ -120,7 +120,7 @@ async function main() {
120
120
  }
121
121
  }
122
122
  const startTime = performance.now();
123
- const result = await (0, import_bin.compare)(image1, image2, output, options);
123
+ const result = await (0, import_core_native.compare)(image1, image2, output, options);
124
124
  const duration = performance.now() - startTime;
125
125
  console.log(`completed in: ${duration.toFixed(2)}ms`);
126
126
  if (result.match) {
@@ -149,11 +149,11 @@ async function main() {
149
149
  process.exit(1);
150
150
  }
151
151
  }
152
- var import_bin;
153
- var init_bin = __esm({
154
- "src/commands/bin.ts"() {
152
+ var import_core_native;
153
+ var init_core_native = __esm({
154
+ "src/commands/core-native.ts"() {
155
155
  "use strict";
156
- import_bin = require("@blazediff/bin");
156
+ import_core_native = require("@blazediff/core-native");
157
157
  if (typeof require !== "undefined" && require.main === module) {
158
158
  main();
159
159
  }
@@ -2365,7 +2365,7 @@ var require_png = __commonJS({
2365
2365
  }
2366
2366
  });
2367
2367
 
2368
- // ../pngjs-transformer/dist/index.mjs
2368
+ // ../codec-pngjs/dist/index.mjs
2369
2369
  var dist_exports = {};
2370
2370
  __export(dist_exports, {
2371
2371
  default: () => m,
@@ -2393,7 +2393,7 @@ async function s(r, n2) {
2393
2393
  }
2394
2394
  var import_fs, import_pngjs, c, m;
2395
2395
  var init_dist2 = __esm({
2396
- "../pngjs-transformer/dist/index.mjs"() {
2396
+ "../codec-pngjs/dist/index.mjs"() {
2397
2397
  "use strict";
2398
2398
  import_fs = require("fs");
2399
2399
  import_pngjs = __toESM(require_png(), 1);
@@ -2402,29 +2402,17 @@ var init_dist2 = __esm({
2402
2402
  }
2403
2403
  });
2404
2404
 
2405
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/is.js
2405
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/is.js
2406
2406
  var require_is = __commonJS({
2407
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/is.js"(exports2, module2) {
2407
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/is.js"(exports2, module2) {
2408
2408
  "use strict";
2409
- var defined = function(val) {
2410
- return typeof val !== "undefined" && val !== null;
2411
- };
2412
- var object = function(val) {
2413
- return typeof val === "object";
2414
- };
2415
- var plainObject = function(val) {
2416
- return Object.prototype.toString.call(val) === "[object Object]";
2417
- };
2418
- var fn = function(val) {
2419
- return typeof val === "function";
2420
- };
2421
- var bool = function(val) {
2422
- return typeof val === "boolean";
2423
- };
2424
- var buffer = function(val) {
2425
- return val instanceof Buffer;
2426
- };
2427
- var typedArray = function(val) {
2409
+ var defined = (val) => typeof val !== "undefined" && val !== null;
2410
+ var object = (val) => typeof val === "object";
2411
+ var plainObject = (val) => Object.prototype.toString.call(val) === "[object Object]";
2412
+ var fn = (val) => typeof val === "function";
2413
+ var bool = (val) => typeof val === "boolean";
2414
+ var buffer = (val) => val instanceof Buffer;
2415
+ var typedArray = (val) => {
2428
2416
  if (defined(val)) {
2429
2417
  switch (val.constructor) {
2430
2418
  case Uint8Array:
@@ -2441,30 +2429,16 @@ var require_is = __commonJS({
2441
2429
  }
2442
2430
  return false;
2443
2431
  };
2444
- var arrayBuffer = function(val) {
2445
- return val instanceof ArrayBuffer;
2446
- };
2447
- var string = function(val) {
2448
- return typeof val === "string" && val.length > 0;
2449
- };
2450
- var number = function(val) {
2451
- return typeof val === "number" && !Number.isNaN(val);
2452
- };
2453
- var integer = function(val) {
2454
- return Number.isInteger(val);
2455
- };
2456
- var inRange = function(val, min, max) {
2457
- return val >= min && val <= max;
2458
- };
2459
- var inArray = function(val, list) {
2460
- return list.includes(val);
2461
- };
2462
- var invalidParameterError = function(name, expected, actual) {
2463
- return new Error(
2464
- `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
2465
- );
2466
- };
2467
- var nativeError = function(native, context) {
2432
+ var arrayBuffer = (val) => val instanceof ArrayBuffer;
2433
+ var string = (val) => typeof val === "string" && val.length > 0;
2434
+ var number = (val) => typeof val === "number" && !Number.isNaN(val);
2435
+ var integer = (val) => Number.isInteger(val);
2436
+ var inRange = (val, min, max) => val >= min && val <= max;
2437
+ var inArray = (val, list) => list.includes(val);
2438
+ var invalidParameterError = (name, expected, actual) => new Error(
2439
+ `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
2440
+ );
2441
+ var nativeError = (native, context) => {
2468
2442
  context.message = native.message;
2469
2443
  return context;
2470
2444
  };
@@ -2488,9 +2462,9 @@ var require_is = __commonJS({
2488
2462
  }
2489
2463
  });
2490
2464
 
2491
- // ../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/process.js
2465
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js
2492
2466
  var require_process = __commonJS({
2493
- "../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/process.js"(exports2, module2) {
2467
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js"(exports2, module2) {
2494
2468
  "use strict";
2495
2469
  var isLinux = () => process.platform === "linux";
2496
2470
  var report = null;
@@ -2511,37 +2485,91 @@ var require_process = __commonJS({
2511
2485
  }
2512
2486
  });
2513
2487
 
2514
- // ../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/filesystem.js
2488
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js
2515
2489
  var require_filesystem = __commonJS({
2516
- "../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/filesystem.js"(exports2, module2) {
2490
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js"(exports2, module2) {
2517
2491
  "use strict";
2518
2492
  var fs = require("fs");
2519
2493
  var LDD_PATH = "/usr/bin/ldd";
2520
- var readFileSync2 = (path) => fs.readFileSync(path, "utf-8");
2494
+ var SELF_PATH = "/proc/self/exe";
2495
+ var MAX_LENGTH = 2048;
2496
+ var readFileSync2 = (path) => {
2497
+ const fd = fs.openSync(path, "r");
2498
+ const buffer = Buffer.alloc(MAX_LENGTH);
2499
+ const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
2500
+ fs.close(fd, () => {
2501
+ });
2502
+ return buffer.subarray(0, bytesRead);
2503
+ };
2521
2504
  var readFile = (path) => new Promise((resolve, reject) => {
2522
- fs.readFile(path, "utf-8", (err, data) => {
2505
+ fs.open(path, "r", (err, fd) => {
2523
2506
  if (err) {
2524
2507
  reject(err);
2525
2508
  } else {
2526
- resolve(data);
2509
+ const buffer = Buffer.alloc(MAX_LENGTH);
2510
+ fs.read(fd, buffer, 0, MAX_LENGTH, 0, (_2, bytesRead) => {
2511
+ resolve(buffer.subarray(0, bytesRead));
2512
+ fs.close(fd, () => {
2513
+ });
2514
+ });
2527
2515
  }
2528
2516
  });
2529
2517
  });
2530
2518
  module2.exports = {
2531
2519
  LDD_PATH,
2520
+ SELF_PATH,
2532
2521
  readFileSync: readFileSync2,
2533
2522
  readFile
2534
2523
  };
2535
2524
  }
2536
2525
  });
2537
2526
 
2538
- // ../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/detect-libc.js
2527
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js
2528
+ var require_elf = __commonJS({
2529
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js"(exports2, module2) {
2530
+ "use strict";
2531
+ var interpreterPath = (elf) => {
2532
+ if (elf.length < 64) {
2533
+ return null;
2534
+ }
2535
+ if (elf.readUInt32BE(0) !== 2135247942) {
2536
+ return null;
2537
+ }
2538
+ if (elf.readUInt8(4) !== 2) {
2539
+ return null;
2540
+ }
2541
+ if (elf.readUInt8(5) !== 1) {
2542
+ return null;
2543
+ }
2544
+ const offset = elf.readUInt32LE(32);
2545
+ const size = elf.readUInt16LE(54);
2546
+ const count = elf.readUInt16LE(56);
2547
+ for (let i2 = 0; i2 < count; i2++) {
2548
+ const headerOffset = offset + i2 * size;
2549
+ const type = elf.readUInt32LE(headerOffset);
2550
+ if (type === 3) {
2551
+ const fileOffset = elf.readUInt32LE(headerOffset + 8);
2552
+ const fileSize = elf.readUInt32LE(headerOffset + 32);
2553
+ return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, "");
2554
+ }
2555
+ }
2556
+ return null;
2557
+ };
2558
+ module2.exports = {
2559
+ interpreterPath
2560
+ };
2561
+ }
2562
+ });
2563
+
2564
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js
2539
2565
  var require_detect_libc = __commonJS({
2540
- "../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/detect-libc.js"(exports2, module2) {
2566
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js"(exports2, module2) {
2541
2567
  "use strict";
2542
2568
  var childProcess = require("child_process");
2543
2569
  var { isLinux, getReport } = require_process();
2544
- var { LDD_PATH, readFile, readFileSync: readFileSync2 } = require_filesystem();
2570
+ var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync2 } = require_filesystem();
2571
+ var { interpreterPath } = require_elf();
2572
+ var cachedFamilyInterpreter;
2545
2573
  var cachedFamilyFilesystem;
2546
2574
  var cachedVersionFilesystem;
2547
2575
  var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
@@ -2593,7 +2621,18 @@ var require_detect_libc = __commonJS({
2593
2621
  }
2594
2622
  return null;
2595
2623
  };
2624
+ var familyFromInterpreterPath = (path) => {
2625
+ if (path) {
2626
+ if (path.includes("/ld-musl-")) {
2627
+ return MUSL;
2628
+ } else if (path.includes("/ld-linux-")) {
2629
+ return GLIBC;
2630
+ }
2631
+ }
2632
+ return null;
2633
+ };
2596
2634
  var getFamilyFromLddContent = (content) => {
2635
+ content = content.toString();
2597
2636
  if (content.includes("musl")) {
2598
2637
  return MUSL;
2599
2638
  }
@@ -2626,16 +2665,45 @@ var require_detect_libc = __commonJS({
2626
2665
  }
2627
2666
  return cachedFamilyFilesystem;
2628
2667
  };
2668
+ var familyFromInterpreter = async () => {
2669
+ if (cachedFamilyInterpreter !== void 0) {
2670
+ return cachedFamilyInterpreter;
2671
+ }
2672
+ cachedFamilyInterpreter = null;
2673
+ try {
2674
+ const selfContent = await readFile(SELF_PATH);
2675
+ const path = interpreterPath(selfContent);
2676
+ cachedFamilyInterpreter = familyFromInterpreterPath(path);
2677
+ } catch (e) {
2678
+ }
2679
+ return cachedFamilyInterpreter;
2680
+ };
2681
+ var familyFromInterpreterSync = () => {
2682
+ if (cachedFamilyInterpreter !== void 0) {
2683
+ return cachedFamilyInterpreter;
2684
+ }
2685
+ cachedFamilyInterpreter = null;
2686
+ try {
2687
+ const selfContent = readFileSync2(SELF_PATH);
2688
+ const path = interpreterPath(selfContent);
2689
+ cachedFamilyInterpreter = familyFromInterpreterPath(path);
2690
+ } catch (e) {
2691
+ }
2692
+ return cachedFamilyInterpreter;
2693
+ };
2629
2694
  var family = async () => {
2630
2695
  let family2 = null;
2631
2696
  if (isLinux()) {
2632
- family2 = await familyFromFilesystem();
2697
+ family2 = await familyFromInterpreter();
2633
2698
  if (!family2) {
2634
- family2 = familyFromReport();
2635
- }
2636
- if (!family2) {
2637
- const out = await safeCommand();
2638
- family2 = familyFromCommand(out);
2699
+ family2 = await familyFromFilesystem();
2700
+ if (!family2) {
2701
+ family2 = familyFromReport();
2702
+ }
2703
+ if (!family2) {
2704
+ const out = await safeCommand();
2705
+ family2 = familyFromCommand(out);
2706
+ }
2639
2707
  }
2640
2708
  }
2641
2709
  return family2;
@@ -2643,13 +2711,16 @@ var require_detect_libc = __commonJS({
2643
2711
  var familySync = () => {
2644
2712
  let family2 = null;
2645
2713
  if (isLinux()) {
2646
- family2 = familyFromFilesystemSync();
2647
- if (!family2) {
2648
- family2 = familyFromReport();
2649
- }
2714
+ family2 = familyFromInterpreterSync();
2650
2715
  if (!family2) {
2651
- const out = safeCommandSync();
2652
- family2 = familyFromCommand(out);
2716
+ family2 = familyFromFilesystemSync();
2717
+ if (!family2) {
2718
+ family2 = familyFromReport();
2719
+ }
2720
+ if (!family2) {
2721
+ const out = safeCommandSync();
2722
+ family2 = familyFromCommand(out);
2723
+ }
2653
2724
  }
2654
2725
  }
2655
2726
  return family2;
@@ -2745,9 +2816,9 @@ var require_detect_libc = __commonJS({
2745
2816
  }
2746
2817
  });
2747
2818
 
2748
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
2819
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
2749
2820
  var require_debug = __commonJS({
2750
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js"(exports2, module2) {
2821
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports2, module2) {
2751
2822
  "use strict";
2752
2823
  var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
2753
2824
  };
@@ -2755,9 +2826,9 @@ var require_debug = __commonJS({
2755
2826
  }
2756
2827
  });
2757
2828
 
2758
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
2829
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
2759
2830
  var require_constants2 = __commonJS({
2760
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js"(exports2, module2) {
2831
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
2761
2832
  "use strict";
2762
2833
  var SEMVER_SPEC_VERSION = "2.0.0";
2763
2834
  var MAX_LENGTH = 256;
@@ -2787,9 +2858,9 @@ var require_constants2 = __commonJS({
2787
2858
  }
2788
2859
  });
2789
2860
 
2790
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
2861
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
2791
2862
  var require_re = __commonJS({
2792
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js"(exports2, module2) {
2863
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports2, module2) {
2793
2864
  "use strict";
2794
2865
  var {
2795
2866
  MAX_SAFE_COMPONENT_LENGTH,
@@ -2875,9 +2946,9 @@ var require_re = __commonJS({
2875
2946
  }
2876
2947
  });
2877
2948
 
2878
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
2949
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
2879
2950
  var require_parse_options = __commonJS({
2880
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js"(exports2, module2) {
2951
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports2, module2) {
2881
2952
  "use strict";
2882
2953
  var looseOption = Object.freeze({ loose: true });
2883
2954
  var emptyOpts = Object.freeze({});
@@ -2894,12 +2965,15 @@ var require_parse_options = __commonJS({
2894
2965
  }
2895
2966
  });
2896
2967
 
2897
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
2968
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
2898
2969
  var require_identifiers = __commonJS({
2899
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js"(exports2, module2) {
2970
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports2, module2) {
2900
2971
  "use strict";
2901
2972
  var numeric = /^[0-9]+$/;
2902
2973
  var compareIdentifiers = (a2, b) => {
2974
+ if (typeof a2 === "number" && typeof b === "number") {
2975
+ return a2 === b ? 0 : a2 < b ? -1 : 1;
2976
+ }
2903
2977
  const anum = numeric.test(a2);
2904
2978
  const bnum = numeric.test(b);
2905
2979
  if (anum && bnum) {
@@ -2916,9 +2990,9 @@ var require_identifiers = __commonJS({
2916
2990
  }
2917
2991
  });
2918
2992
 
2919
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
2993
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
2920
2994
  var require_semver = __commonJS({
2921
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js"(exports2, module2) {
2995
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports2, module2) {
2922
2996
  "use strict";
2923
2997
  var debug = require_debug();
2924
2998
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants2();
@@ -3006,7 +3080,25 @@ var require_semver = __commonJS({
3006
3080
  if (!(other instanceof _SemVer)) {
3007
3081
  other = new _SemVer(other, this.options);
3008
3082
  }
3009
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
3083
+ if (this.major < other.major) {
3084
+ return -1;
3085
+ }
3086
+ if (this.major > other.major) {
3087
+ return 1;
3088
+ }
3089
+ if (this.minor < other.minor) {
3090
+ return -1;
3091
+ }
3092
+ if (this.minor > other.minor) {
3093
+ return 1;
3094
+ }
3095
+ if (this.patch < other.patch) {
3096
+ return -1;
3097
+ }
3098
+ if (this.patch > other.patch) {
3099
+ return 1;
3100
+ }
3101
+ return 0;
3010
3102
  }
3011
3103
  comparePre(other) {
3012
3104
  if (!(other instanceof _SemVer)) {
@@ -3177,9 +3269,9 @@ var require_semver = __commonJS({
3177
3269
  }
3178
3270
  });
3179
3271
 
3180
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
3272
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
3181
3273
  var require_parse = __commonJS({
3182
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js"(exports2, module2) {
3274
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
3183
3275
  "use strict";
3184
3276
  var SemVer = require_semver();
3185
3277
  var parse = (version, options, throwErrors = false) => {
@@ -3199,9 +3291,9 @@ var require_parse = __commonJS({
3199
3291
  }
3200
3292
  });
3201
3293
 
3202
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
3294
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
3203
3295
  var require_coerce = __commonJS({
3204
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js"(exports2, module2) {
3296
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports2, module2) {
3205
3297
  "use strict";
3206
3298
  var SemVer = require_semver();
3207
3299
  var parse = require_parse();
@@ -3245,9 +3337,9 @@ var require_coerce = __commonJS({
3245
3337
  }
3246
3338
  });
3247
3339
 
3248
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
3340
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
3249
3341
  var require_compare = __commonJS({
3250
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js"(exports2, module2) {
3342
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports2, module2) {
3251
3343
  "use strict";
3252
3344
  var SemVer = require_semver();
3253
3345
  var compare2 = (a2, b, loose) => new SemVer(a2, loose).compare(new SemVer(b, loose));
@@ -3255,9 +3347,9 @@ var require_compare = __commonJS({
3255
3347
  }
3256
3348
  });
3257
3349
 
3258
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
3350
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
3259
3351
  var require_gte = __commonJS({
3260
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js"(exports2, module2) {
3352
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports2, module2) {
3261
3353
  "use strict";
3262
3354
  var compare2 = require_compare();
3263
3355
  var gte = (a2, b, loose) => compare2(a2, b, loose) >= 0;
@@ -3265,9 +3357,9 @@ var require_gte = __commonJS({
3265
3357
  }
3266
3358
  });
3267
3359
 
3268
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
3360
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
3269
3361
  var require_lrucache = __commonJS({
3270
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js"(exports2, module2) {
3362
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports2, module2) {
3271
3363
  "use strict";
3272
3364
  var LRUCache = class {
3273
3365
  constructor() {
@@ -3303,9 +3395,9 @@ var require_lrucache = __commonJS({
3303
3395
  }
3304
3396
  });
3305
3397
 
3306
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
3398
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
3307
3399
  var require_eq = __commonJS({
3308
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js"(exports2, module2) {
3400
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports2, module2) {
3309
3401
  "use strict";
3310
3402
  var compare2 = require_compare();
3311
3403
  var eq = (a2, b, loose) => compare2(a2, b, loose) === 0;
@@ -3313,9 +3405,9 @@ var require_eq = __commonJS({
3313
3405
  }
3314
3406
  });
3315
3407
 
3316
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
3408
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
3317
3409
  var require_neq = __commonJS({
3318
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js"(exports2, module2) {
3410
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports2, module2) {
3319
3411
  "use strict";
3320
3412
  var compare2 = require_compare();
3321
3413
  var neq = (a2, b, loose) => compare2(a2, b, loose) !== 0;
@@ -3323,9 +3415,9 @@ var require_neq = __commonJS({
3323
3415
  }
3324
3416
  });
3325
3417
 
3326
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
3418
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
3327
3419
  var require_gt = __commonJS({
3328
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js"(exports2, module2) {
3420
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports2, module2) {
3329
3421
  "use strict";
3330
3422
  var compare2 = require_compare();
3331
3423
  var gt = (a2, b, loose) => compare2(a2, b, loose) > 0;
@@ -3333,9 +3425,9 @@ var require_gt = __commonJS({
3333
3425
  }
3334
3426
  });
3335
3427
 
3336
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
3428
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
3337
3429
  var require_lt = __commonJS({
3338
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js"(exports2, module2) {
3430
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports2, module2) {
3339
3431
  "use strict";
3340
3432
  var compare2 = require_compare();
3341
3433
  var lt = (a2, b, loose) => compare2(a2, b, loose) < 0;
@@ -3343,9 +3435,9 @@ var require_lt = __commonJS({
3343
3435
  }
3344
3436
  });
3345
3437
 
3346
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
3438
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
3347
3439
  var require_lte = __commonJS({
3348
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js"(exports2, module2) {
3440
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports2, module2) {
3349
3441
  "use strict";
3350
3442
  var compare2 = require_compare();
3351
3443
  var lte = (a2, b, loose) => compare2(a2, b, loose) <= 0;
@@ -3353,9 +3445,9 @@ var require_lte = __commonJS({
3353
3445
  }
3354
3446
  });
3355
3447
 
3356
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
3448
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
3357
3449
  var require_cmp = __commonJS({
3358
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js"(exports2, module2) {
3450
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports2, module2) {
3359
3451
  "use strict";
3360
3452
  var eq = require_eq();
3361
3453
  var neq = require_neq();
@@ -3403,9 +3495,9 @@ var require_cmp = __commonJS({
3403
3495
  }
3404
3496
  });
3405
3497
 
3406
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
3498
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
3407
3499
  var require_comparator = __commonJS({
3408
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js"(exports2, module2) {
3500
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports2, module2) {
3409
3501
  "use strict";
3410
3502
  var ANY = Symbol("SemVer ANY");
3411
3503
  var Comparator = class _Comparator {
@@ -3516,9 +3608,9 @@ var require_comparator = __commonJS({
3516
3608
  }
3517
3609
  });
3518
3610
 
3519
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
3611
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
3520
3612
  var require_range = __commonJS({
3521
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js"(exports2, module2) {
3613
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports2, module2) {
3522
3614
  "use strict";
3523
3615
  var SPACE_CHARACTERS = /\s+/g;
3524
3616
  var Range = class _Range {
@@ -3689,6 +3781,7 @@ var require_range = __commonJS({
3689
3781
  return result;
3690
3782
  };
3691
3783
  var parseComparator = (comp, options) => {
3784
+ comp = comp.replace(re[t.BUILD], "");
3692
3785
  debug("comp", comp, options);
3693
3786
  comp = replaceCarets(comp, options);
3694
3787
  debug("caret", comp);
@@ -3892,9 +3985,9 @@ var require_range = __commonJS({
3892
3985
  }
3893
3986
  });
3894
3987
 
3895
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
3988
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
3896
3989
  var require_satisfies = __commonJS({
3897
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js"(exports2, module2) {
3990
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports2, module2) {
3898
3991
  "use strict";
3899
3992
  var Range = require_range();
3900
3993
  var satisfies = (version, range, options) => {
@@ -3909,13 +4002,13 @@ var require_satisfies = __commonJS({
3909
4002
  }
3910
4003
  });
3911
4004
 
3912
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/package.json
4005
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/package.json
3913
4006
  var require_package = __commonJS({
3914
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/package.json"(exports2, module2) {
4007
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/package.json"(exports2, module2) {
3915
4008
  module2.exports = {
3916
4009
  name: "sharp",
3917
4010
  description: "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
3918
- version: "0.34.3",
4011
+ version: "0.34.5",
3919
4012
  author: "Lovell Fuller <npm@lovell.info>",
3920
4013
  homepage: "https://sharp.pixelplumbing.com",
3921
4014
  contributors: [
@@ -4006,15 +4099,18 @@ var require_package = __commonJS({
4006
4099
  "Don Denton <don@happycollision.com>"
4007
4100
  ],
4008
4101
  scripts: {
4009
- install: "node install/check.js",
4102
+ build: "node install/build.js",
4103
+ install: "node install/check.js || npm run build",
4010
4104
  clean: "rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",
4011
- test: "npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types",
4012
- "test-lint": "semistandard && cpplint",
4013
- "test-unit": "nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha",
4014
- "test-licensing": 'license-checker --production --summary --onlyAllow="Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT"',
4105
+ test: "npm run lint && npm run test-unit",
4106
+ lint: "npm run lint-cpp && npm run lint-js && npm run lint-types",
4107
+ "lint-cpp": "cpplint --quiet src/*.h src/*.cc",
4108
+ "lint-js": "biome lint",
4109
+ "lint-types": "tsd --files ./test/types/sharp.test-d.ts",
4015
4110
  "test-leak": "./test/leak/leak.sh",
4016
- "test-types": "tsd",
4111
+ "test-unit": "node --experimental-test-coverage test/unit.mjs",
4017
4112
  "package-from-local-build": "node npm/from-local-build.js",
4113
+ "package-release-notes": "node npm/release-notes.js",
4018
4114
  "docs-build": "node docs/build.mjs",
4019
4115
  "docs-serve": "cd docs && npm start",
4020
4116
  "docs-publish": "cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"
@@ -4050,93 +4146,73 @@ var require_package = __commonJS({
4050
4146
  "vips"
4051
4147
  ],
4052
4148
  dependencies: {
4053
- color: "^4.2.3",
4054
- "detect-libc": "^2.0.4",
4055
- semver: "^7.7.2"
4149
+ "@img/colour": "^1.0.0",
4150
+ "detect-libc": "^2.1.2",
4151
+ semver: "^7.7.3"
4056
4152
  },
4057
4153
  optionalDependencies: {
4058
- "@img/sharp-darwin-arm64": "0.34.3",
4059
- "@img/sharp-darwin-x64": "0.34.3",
4060
- "@img/sharp-libvips-darwin-arm64": "1.2.0",
4061
- "@img/sharp-libvips-darwin-x64": "1.2.0",
4062
- "@img/sharp-libvips-linux-arm": "1.2.0",
4063
- "@img/sharp-libvips-linux-arm64": "1.2.0",
4064
- "@img/sharp-libvips-linux-ppc64": "1.2.0",
4065
- "@img/sharp-libvips-linux-s390x": "1.2.0",
4066
- "@img/sharp-libvips-linux-x64": "1.2.0",
4067
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.0",
4068
- "@img/sharp-libvips-linuxmusl-x64": "1.2.0",
4069
- "@img/sharp-linux-arm": "0.34.3",
4070
- "@img/sharp-linux-arm64": "0.34.3",
4071
- "@img/sharp-linux-ppc64": "0.34.3",
4072
- "@img/sharp-linux-s390x": "0.34.3",
4073
- "@img/sharp-linux-x64": "0.34.3",
4074
- "@img/sharp-linuxmusl-arm64": "0.34.3",
4075
- "@img/sharp-linuxmusl-x64": "0.34.3",
4076
- "@img/sharp-wasm32": "0.34.3",
4077
- "@img/sharp-win32-arm64": "0.34.3",
4078
- "@img/sharp-win32-ia32": "0.34.3",
4079
- "@img/sharp-win32-x64": "0.34.3"
4154
+ "@img/sharp-darwin-arm64": "0.34.5",
4155
+ "@img/sharp-darwin-x64": "0.34.5",
4156
+ "@img/sharp-libvips-darwin-arm64": "1.2.4",
4157
+ "@img/sharp-libvips-darwin-x64": "1.2.4",
4158
+ "@img/sharp-libvips-linux-arm": "1.2.4",
4159
+ "@img/sharp-libvips-linux-arm64": "1.2.4",
4160
+ "@img/sharp-libvips-linux-ppc64": "1.2.4",
4161
+ "@img/sharp-libvips-linux-riscv64": "1.2.4",
4162
+ "@img/sharp-libvips-linux-s390x": "1.2.4",
4163
+ "@img/sharp-libvips-linux-x64": "1.2.4",
4164
+ "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
4165
+ "@img/sharp-libvips-linuxmusl-x64": "1.2.4",
4166
+ "@img/sharp-linux-arm": "0.34.5",
4167
+ "@img/sharp-linux-arm64": "0.34.5",
4168
+ "@img/sharp-linux-ppc64": "0.34.5",
4169
+ "@img/sharp-linux-riscv64": "0.34.5",
4170
+ "@img/sharp-linux-s390x": "0.34.5",
4171
+ "@img/sharp-linux-x64": "0.34.5",
4172
+ "@img/sharp-linuxmusl-arm64": "0.34.5",
4173
+ "@img/sharp-linuxmusl-x64": "0.34.5",
4174
+ "@img/sharp-wasm32": "0.34.5",
4175
+ "@img/sharp-win32-arm64": "0.34.5",
4176
+ "@img/sharp-win32-ia32": "0.34.5",
4177
+ "@img/sharp-win32-x64": "0.34.5"
4080
4178
  },
4081
4179
  devDependencies: {
4082
- "@emnapi/runtime": "^1.4.4",
4083
- "@img/sharp-libvips-dev": "1.2.0",
4084
- "@img/sharp-libvips-dev-wasm32": "1.2.0",
4085
- "@img/sharp-libvips-win32-arm64": "1.2.0",
4086
- "@img/sharp-libvips-win32-ia32": "1.2.0",
4087
- "@img/sharp-libvips-win32-x64": "1.2.0",
4180
+ "@biomejs/biome": "^2.3.4",
4181
+ "@cpplint/cli": "^0.1.0",
4182
+ "@emnapi/runtime": "^1.7.0",
4183
+ "@img/sharp-libvips-dev": "1.2.4",
4184
+ "@img/sharp-libvips-dev-wasm32": "1.2.4",
4185
+ "@img/sharp-libvips-win32-arm64": "1.2.4",
4186
+ "@img/sharp-libvips-win32-ia32": "1.2.4",
4187
+ "@img/sharp-libvips-win32-x64": "1.2.4",
4088
4188
  "@types/node": "*",
4089
- cc: "^3.0.1",
4090
- emnapi: "^1.4.4",
4189
+ emnapi: "^1.7.0",
4091
4190
  "exif-reader": "^2.0.2",
4092
4191
  "extract-zip": "^2.0.1",
4093
4192
  icc: "^3.0.0",
4094
- "jsdoc-to-markdown": "^9.1.1",
4095
- "license-checker": "^25.0.1",
4096
- mocha: "^11.7.1",
4097
- "node-addon-api": "^8.4.0",
4098
- "node-gyp": "^11.2.0",
4099
- nyc: "^17.1.0",
4100
- semistandard: "^17.0.0",
4101
- "tar-fs": "^3.1.0",
4102
- tsd: "^0.32.0"
4193
+ "jsdoc-to-markdown": "^9.1.3",
4194
+ "node-addon-api": "^8.5.0",
4195
+ "node-gyp": "^11.5.0",
4196
+ "tar-fs": "^3.1.1",
4197
+ tsd: "^0.33.0"
4103
4198
  },
4104
4199
  license: "Apache-2.0",
4105
4200
  engines: {
4106
4201
  node: "^18.17.0 || ^20.3.0 || >=21.0.0"
4107
4202
  },
4108
4203
  config: {
4109
- libvips: ">=8.17.1"
4204
+ libvips: ">=8.17.3"
4110
4205
  },
4111
4206
  funding: {
4112
4207
  url: "https://opencollective.com/libvips"
4113
- },
4114
- semistandard: {
4115
- env: [
4116
- "mocha"
4117
- ]
4118
- },
4119
- cc: {
4120
- linelength: "120",
4121
- filter: [
4122
- "build/include"
4123
- ]
4124
- },
4125
- nyc: {
4126
- include: [
4127
- "lib"
4128
- ]
4129
- },
4130
- tsd: {
4131
- directory: "test/types/"
4132
4208
  }
4133
4209
  };
4134
4210
  }
4135
4211
  });
4136
4212
 
4137
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/libvips.js
4213
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/libvips.js
4138
4214
  var require_libvips = __commonJS({
4139
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/libvips.js"(exports2, module2) {
4215
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/libvips.js"(exports2, module2) {
4140
4216
  "use strict";
4141
4217
  var { spawnSync } = require("child_process");
4142
4218
  var { createHash } = require("crypto");
@@ -4145,8 +4221,7 @@ var require_libvips = __commonJS({
4145
4221
  var semverSatisfies = require_satisfies();
4146
4222
  var detectLibc = require_detect_libc();
4147
4223
  var { config, engines, optionalDependencies } = require_package();
4148
- var minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || /* istanbul ignore next */
4149
- config.libvips;
4224
+ var minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || config.libvips;
4150
4225
  var minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version;
4151
4226
  var prebuiltPlatforms = [
4152
4227
  "darwin-arm64",
@@ -4154,6 +4229,7 @@ var require_libvips = __commonJS({
4154
4229
  "linux-arm",
4155
4230
  "linux-arm64",
4156
4231
  "linux-ppc64",
4232
+ "linux-riscv64",
4157
4233
  "linux-s390x",
4158
4234
  "linux-x64",
4159
4235
  "linuxmusl-arm64",
@@ -4221,7 +4297,7 @@ var require_libvips = __commonJS({
4221
4297
  };
4222
4298
  var isEmscripten = () => {
4223
4299
  const { CC } = process.env;
4224
- return Boolean(CC && CC.endsWith("/emcc"));
4300
+ return Boolean(CC?.endsWith("/emcc"));
4225
4301
  };
4226
4302
  var isRosetta = () => {
4227
4303
  if (process.platform === "darwin" && process.arch === "x64") {
@@ -4295,8 +4371,7 @@ var require_libvips = __commonJS({
4295
4371
  return skipSearch(false, "Rosetta", logger);
4296
4372
  }
4297
4373
  const globalVipsVersion = globalLibvipsVersion();
4298
- return !!globalVipsVersion && /* istanbul ignore next */
4299
- semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
4374
+ return !!globalVipsVersion && semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
4300
4375
  };
4301
4376
  module2.exports = {
4302
4377
  minimumLibvipsVersion,
@@ -4317,9 +4392,9 @@ var require_libvips = __commonJS({
4317
4392
  }
4318
4393
  });
4319
4394
 
4320
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/sharp.js
4395
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/sharp.js
4321
4396
  var require_sharp = __commonJS({
4322
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/sharp.js"(exports2, module2) {
4397
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/sharp.js"(exports2, module2) {
4323
4398
  "use strict";
4324
4399
  var { familySync, versionSync } = require_detect_libc();
4325
4400
  var { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = require_libvips();
@@ -4395,7 +4470,7 @@ var require_sharp = __commonJS({
4395
4470
  ` Found ${libcFound}`,
4396
4471
  ` Requires ${libcRequires}`
4397
4472
  );
4398
- } catch (errEngines) {
4473
+ } catch (_errEngines) {
4399
4474
  }
4400
4475
  }
4401
4476
  if (isLinux && /\/snap\/core[0-9]{2}/.test(messages)) {
@@ -4430,15 +4505,18 @@ var require_sharp = __commonJS({
4430
4505
  }
4431
4506
  });
4432
4507
 
4433
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/constructor.js
4508
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/constructor.js
4434
4509
  var require_constructor = __commonJS({
4435
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/constructor.js"(exports2, module2) {
4510
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/constructor.js"(exports2, module2) {
4436
4511
  "use strict";
4437
4512
  var util = require("util");
4438
4513
  var stream = require("stream");
4439
4514
  var is = require_is();
4440
4515
  require_sharp();
4441
4516
  var debuglog = util.debuglog("sharp");
4517
+ var queueListener = (queueLength) => {
4518
+ Sharp.queue.emit("change", queueLength);
4519
+ };
4442
4520
  var Sharp = function(input, options) {
4443
4521
  if (arguments.length === 1 && !is.defined(input)) {
4444
4522
  throw new Error("Invalid input");
@@ -4465,7 +4543,8 @@ var require_constructor = __commonJS({
4465
4543
  angle: 0,
4466
4544
  rotationAngle: 0,
4467
4545
  rotationBackground: [0, 0, 0, 255],
4468
- rotateBeforePreExtract: false,
4546
+ rotateBefore: false,
4547
+ orientBefore: false,
4469
4548
  flip: false,
4470
4549
  flop: false,
4471
4550
  extendTop: 0,
@@ -4587,6 +4666,7 @@ var require_constructor = __commonJS({
4587
4666
  gifProgressive: false,
4588
4667
  tiffQuality: 80,
4589
4668
  tiffCompression: "jpeg",
4669
+ tiffBigtiff: false,
4590
4670
  tiffPredictor: "horizontal",
4591
4671
  tiffPyramid: false,
4592
4672
  tiffMiniswhite: false,
@@ -4630,9 +4710,7 @@ var require_constructor = __commonJS({
4630
4710
  debuglog(warning);
4631
4711
  },
4632
4712
  // Function to notify of queue length changes
4633
- queueListener: function(queueLength) {
4634
- Sharp.queue.emit("change", queueLength);
4635
- }
4713
+ queueListener
4636
4714
  };
4637
4715
  this.options.input = this._createInputDescriptor(input, options, { allowStream: true });
4638
4716
  return this;
@@ -4641,10 +4719,10 @@ var require_constructor = __commonJS({
4641
4719
  Object.setPrototypeOf(Sharp, stream.Duplex);
4642
4720
  function clone() {
4643
4721
  const clone2 = this.constructor.call();
4644
- const { debuglog: debuglog2, queueListener, ...options } = this.options;
4722
+ const { debuglog: debuglog2, queueListener: queueListener2, ...options } = this.options;
4645
4723
  clone2.options = structuredClone(options);
4646
4724
  clone2.options.debuglog = debuglog2;
4647
- clone2.options.queueListener = queueListener;
4725
+ clone2.options.queueListener = queueListener2;
4648
4726
  if (this._isStreamInput()) {
4649
4727
  this.on("finish", () => {
4650
4728
  this._flattenBufferIn();
@@ -4659,9 +4737,9 @@ var require_constructor = __commonJS({
4659
4737
  }
4660
4738
  });
4661
4739
 
4662
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/input.js
4740
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/input.js
4663
4741
  var require_input = __commonJS({
4664
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/input.js"(exports2, module2) {
4742
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/input.js"(exports2, module2) {
4665
4743
  "use strict";
4666
4744
  var is = require_is();
4667
4745
  var sharp = require_sharp();
@@ -4709,7 +4787,7 @@ var require_input = __commonJS({
4709
4787
  const inputDescriptor = {
4710
4788
  autoOrient: false,
4711
4789
  failOn: "warning",
4712
- limitInputPixels: Math.pow(16383, 2),
4790
+ limitInputPixels: 16383 ** 2,
4713
4791
  ignoreIcc: false,
4714
4792
  unlimited: false,
4715
4793
  sequentialRead: true
@@ -4790,7 +4868,7 @@ var require_input = __commonJS({
4790
4868
  }
4791
4869
  if (is.defined(inputOptions.limitInputPixels)) {
4792
4870
  if (is.bool(inputOptions.limitInputPixels)) {
4793
- inputDescriptor.limitInputPixels = inputOptions.limitInputPixels ? Math.pow(16383, 2) : 0;
4871
+ inputDescriptor.limitInputPixels = inputOptions.limitInputPixels ? 16383 ** 2 : 0;
4794
4872
  } else if (is.integer(inputOptions.limitInputPixels) && is.inRange(inputOptions.limitInputPixels, 0, Number.MAX_SAFE_INTEGER)) {
4795
4873
  inputDescriptor.limitInputPixels = inputOptions.limitInputPixels;
4796
4874
  } else {
@@ -5126,11 +5204,11 @@ var require_input = __commonJS({
5126
5204
  }
5127
5205
  }
5128
5206
  } else if (is.defined(inputOptions)) {
5129
- throw new Error("Invalid input options " + inputOptions);
5207
+ throw new Error(`Invalid input options ${inputOptions}`);
5130
5208
  }
5131
5209
  return inputDescriptor;
5132
5210
  }
5133
- function _write(chunk, encoding, callback) {
5211
+ function _write(chunk, _encoding, callback) {
5134
5212
  if (Array.isArray(this.options.input.buffer)) {
5135
5213
  if (is.buffer(chunk)) {
5136
5214
  if (this.options.input.buffer.length === 0) {
@@ -5262,7 +5340,7 @@ var require_input = __commonJS({
5262
5340
  }
5263
5341
  }
5264
5342
  }
5265
- module2.exports = function(Sharp) {
5343
+ module2.exports = (Sharp) => {
5266
5344
  Object.assign(Sharp.prototype, {
5267
5345
  // Private
5268
5346
  _inputOptionsFromObject,
@@ -5279,9 +5357,9 @@ var require_input = __commonJS({
5279
5357
  }
5280
5358
  });
5281
5359
 
5282
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/resize.js
5360
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/resize.js
5283
5361
  var require_resize = __commonJS({
5284
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/resize.js"(exports2, module2) {
5362
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/resize.js"(exports2, module2) {
5285
5363
  "use strict";
5286
5364
  var is = require_is();
5287
5365
  var gravity = {
@@ -5341,7 +5419,7 @@ var require_resize = __commonJS({
5341
5419
  outside: "min"
5342
5420
  };
5343
5421
  function isRotationExpected(options) {
5344
- return options.angle % 360 !== 0 || options.input.autoOrient === true || options.rotationAngle !== 0;
5422
+ return options.angle % 360 !== 0 || options.rotationAngle !== 0;
5345
5423
  }
5346
5424
  function isResizeExpected(options) {
5347
5425
  return options.width !== -1 || options.height !== -1;
@@ -5423,7 +5501,7 @@ var require_resize = __commonJS({
5423
5501
  }
5424
5502
  }
5425
5503
  if (isRotationExpected(this.options) && isResizeExpected(this.options)) {
5426
- this.options.rotateBeforePreExtract = true;
5504
+ this.options.rotateBefore = true;
5427
5505
  }
5428
5506
  return this;
5429
5507
  }
@@ -5490,9 +5568,12 @@ var require_resize = __commonJS({
5490
5568
  }, this);
5491
5569
  if (isRotationExpected(this.options) && !isResizeExpected(this.options)) {
5492
5570
  if (this.options.widthPre === -1 || this.options.widthPost === -1) {
5493
- this.options.rotateBeforePreExtract = true;
5571
+ this.options.rotateBefore = true;
5494
5572
  }
5495
5573
  }
5574
+ if (this.options.input.autoOrient) {
5575
+ this.options.orientBefore = true;
5576
+ }
5496
5577
  return this;
5497
5578
  }
5498
5579
  function trim(options) {
@@ -5517,11 +5598,11 @@ var require_resize = __commonJS({
5517
5598
  }
5518
5599
  }
5519
5600
  if (isRotationExpected(this.options)) {
5520
- this.options.rotateBeforePreExtract = true;
5601
+ this.options.rotateBefore = true;
5521
5602
  }
5522
5603
  return this;
5523
5604
  }
5524
- module2.exports = function(Sharp) {
5605
+ module2.exports = (Sharp) => {
5525
5606
  Object.assign(Sharp.prototype, {
5526
5607
  resize,
5527
5608
  extend,
@@ -5537,9 +5618,9 @@ var require_resize = __commonJS({
5537
5618
  }
5538
5619
  });
5539
5620
 
5540
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/composite.js
5621
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/composite.js
5541
5622
  var require_composite = __commonJS({
5542
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/composite.js"(exports2, module2) {
5623
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/composite.js"(exports2, module2) {
5543
5624
  "use strict";
5544
5625
  var is = require_is();
5545
5626
  var blend = {
@@ -5643,16 +5724,16 @@ var require_composite = __commonJS({
5643
5724
  });
5644
5725
  return this;
5645
5726
  }
5646
- module2.exports = function(Sharp) {
5727
+ module2.exports = (Sharp) => {
5647
5728
  Sharp.prototype.composite = composite;
5648
5729
  Sharp.blend = blend;
5649
5730
  };
5650
5731
  }
5651
5732
  });
5652
5733
 
5653
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/operation.js
5734
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/operation.js
5654
5735
  var require_operation = __commonJS({
5655
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/operation.js"(exports2, module2) {
5736
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/operation.js"(exports2, module2) {
5656
5737
  "use strict";
5657
5738
  var is = require_is();
5658
5739
  var vipsPrecision = {
@@ -5974,9 +6055,7 @@ var require_operation = __commonJS({
5974
6055
  throw new Error("Invalid convolution kernel");
5975
6056
  }
5976
6057
  if (!is.integer(kernel.scale)) {
5977
- kernel.scale = kernel.kernel.reduce(function(a2, b) {
5978
- return a2 + b;
5979
- }, 0);
6058
+ kernel.scale = kernel.kernel.reduce((a2, b) => a2 + b, 0);
5980
6059
  }
5981
6060
  if (kernel.scale < 1) {
5982
6061
  kernel.scale = 1;
@@ -6090,7 +6169,7 @@ var require_operation = __commonJS({
6090
6169
  }
6091
6170
  return this;
6092
6171
  }
6093
- module2.exports = function(Sharp) {
6172
+ module2.exports = (Sharp) => {
6094
6173
  Object.assign(Sharp.prototype, {
6095
6174
  autoOrient,
6096
6175
  rotate,
@@ -6120,306 +6199,272 @@ var require_operation = __commonJS({
6120
6199
  }
6121
6200
  });
6122
6201
 
6123
- // ../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
6124
- var require_color_name = __commonJS({
6125
- "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) {
6126
- "use strict";
6127
- module2.exports = {
6128
- "aliceblue": [240, 248, 255],
6129
- "antiquewhite": [250, 235, 215],
6130
- "aqua": [0, 255, 255],
6131
- "aquamarine": [127, 255, 212],
6132
- "azure": [240, 255, 255],
6133
- "beige": [245, 245, 220],
6134
- "bisque": [255, 228, 196],
6135
- "black": [0, 0, 0],
6136
- "blanchedalmond": [255, 235, 205],
6137
- "blue": [0, 0, 255],
6138
- "blueviolet": [138, 43, 226],
6139
- "brown": [165, 42, 42],
6140
- "burlywood": [222, 184, 135],
6141
- "cadetblue": [95, 158, 160],
6142
- "chartreuse": [127, 255, 0],
6143
- "chocolate": [210, 105, 30],
6144
- "coral": [255, 127, 80],
6145
- "cornflowerblue": [100, 149, 237],
6146
- "cornsilk": [255, 248, 220],
6147
- "crimson": [220, 20, 60],
6148
- "cyan": [0, 255, 255],
6149
- "darkblue": [0, 0, 139],
6150
- "darkcyan": [0, 139, 139],
6151
- "darkgoldenrod": [184, 134, 11],
6152
- "darkgray": [169, 169, 169],
6153
- "darkgreen": [0, 100, 0],
6154
- "darkgrey": [169, 169, 169],
6155
- "darkkhaki": [189, 183, 107],
6156
- "darkmagenta": [139, 0, 139],
6157
- "darkolivegreen": [85, 107, 47],
6158
- "darkorange": [255, 140, 0],
6159
- "darkorchid": [153, 50, 204],
6160
- "darkred": [139, 0, 0],
6161
- "darksalmon": [233, 150, 122],
6162
- "darkseagreen": [143, 188, 143],
6163
- "darkslateblue": [72, 61, 139],
6164
- "darkslategray": [47, 79, 79],
6165
- "darkslategrey": [47, 79, 79],
6166
- "darkturquoise": [0, 206, 209],
6167
- "darkviolet": [148, 0, 211],
6168
- "deeppink": [255, 20, 147],
6169
- "deepskyblue": [0, 191, 255],
6170
- "dimgray": [105, 105, 105],
6171
- "dimgrey": [105, 105, 105],
6172
- "dodgerblue": [30, 144, 255],
6173
- "firebrick": [178, 34, 34],
6174
- "floralwhite": [255, 250, 240],
6175
- "forestgreen": [34, 139, 34],
6176
- "fuchsia": [255, 0, 255],
6177
- "gainsboro": [220, 220, 220],
6178
- "ghostwhite": [248, 248, 255],
6179
- "gold": [255, 215, 0],
6180
- "goldenrod": [218, 165, 32],
6181
- "gray": [128, 128, 128],
6182
- "green": [0, 128, 0],
6183
- "greenyellow": [173, 255, 47],
6184
- "grey": [128, 128, 128],
6185
- "honeydew": [240, 255, 240],
6186
- "hotpink": [255, 105, 180],
6187
- "indianred": [205, 92, 92],
6188
- "indigo": [75, 0, 130],
6189
- "ivory": [255, 255, 240],
6190
- "khaki": [240, 230, 140],
6191
- "lavender": [230, 230, 250],
6192
- "lavenderblush": [255, 240, 245],
6193
- "lawngreen": [124, 252, 0],
6194
- "lemonchiffon": [255, 250, 205],
6195
- "lightblue": [173, 216, 230],
6196
- "lightcoral": [240, 128, 128],
6197
- "lightcyan": [224, 255, 255],
6198
- "lightgoldenrodyellow": [250, 250, 210],
6199
- "lightgray": [211, 211, 211],
6200
- "lightgreen": [144, 238, 144],
6201
- "lightgrey": [211, 211, 211],
6202
- "lightpink": [255, 182, 193],
6203
- "lightsalmon": [255, 160, 122],
6204
- "lightseagreen": [32, 178, 170],
6205
- "lightskyblue": [135, 206, 250],
6206
- "lightslategray": [119, 136, 153],
6207
- "lightslategrey": [119, 136, 153],
6208
- "lightsteelblue": [176, 196, 222],
6209
- "lightyellow": [255, 255, 224],
6210
- "lime": [0, 255, 0],
6211
- "limegreen": [50, 205, 50],
6212
- "linen": [250, 240, 230],
6213
- "magenta": [255, 0, 255],
6214
- "maroon": [128, 0, 0],
6215
- "mediumaquamarine": [102, 205, 170],
6216
- "mediumblue": [0, 0, 205],
6217
- "mediumorchid": [186, 85, 211],
6218
- "mediumpurple": [147, 112, 219],
6219
- "mediumseagreen": [60, 179, 113],
6220
- "mediumslateblue": [123, 104, 238],
6221
- "mediumspringgreen": [0, 250, 154],
6222
- "mediumturquoise": [72, 209, 204],
6223
- "mediumvioletred": [199, 21, 133],
6224
- "midnightblue": [25, 25, 112],
6225
- "mintcream": [245, 255, 250],
6226
- "mistyrose": [255, 228, 225],
6227
- "moccasin": [255, 228, 181],
6228
- "navajowhite": [255, 222, 173],
6229
- "navy": [0, 0, 128],
6230
- "oldlace": [253, 245, 230],
6231
- "olive": [128, 128, 0],
6232
- "olivedrab": [107, 142, 35],
6233
- "orange": [255, 165, 0],
6234
- "orangered": [255, 69, 0],
6235
- "orchid": [218, 112, 214],
6236
- "palegoldenrod": [238, 232, 170],
6237
- "palegreen": [152, 251, 152],
6238
- "paleturquoise": [175, 238, 238],
6239
- "palevioletred": [219, 112, 147],
6240
- "papayawhip": [255, 239, 213],
6241
- "peachpuff": [255, 218, 185],
6242
- "peru": [205, 133, 63],
6243
- "pink": [255, 192, 203],
6244
- "plum": [221, 160, 221],
6245
- "powderblue": [176, 224, 230],
6246
- "purple": [128, 0, 128],
6247
- "rebeccapurple": [102, 51, 153],
6248
- "red": [255, 0, 0],
6249
- "rosybrown": [188, 143, 143],
6250
- "royalblue": [65, 105, 225],
6251
- "saddlebrown": [139, 69, 19],
6252
- "salmon": [250, 128, 114],
6253
- "sandybrown": [244, 164, 96],
6254
- "seagreen": [46, 139, 87],
6255
- "seashell": [255, 245, 238],
6256
- "sienna": [160, 82, 45],
6257
- "silver": [192, 192, 192],
6258
- "skyblue": [135, 206, 235],
6259
- "slateblue": [106, 90, 205],
6260
- "slategray": [112, 128, 144],
6261
- "slategrey": [112, 128, 144],
6262
- "snow": [255, 250, 250],
6263
- "springgreen": [0, 255, 127],
6264
- "steelblue": [70, 130, 180],
6265
- "tan": [210, 180, 140],
6266
- "teal": [0, 128, 128],
6267
- "thistle": [216, 191, 216],
6268
- "tomato": [255, 99, 71],
6269
- "turquoise": [64, 224, 208],
6270
- "violet": [238, 130, 238],
6271
- "wheat": [245, 222, 179],
6272
- "white": [255, 255, 255],
6273
- "whitesmoke": [245, 245, 245],
6274
- "yellow": [255, 255, 0],
6275
- "yellowgreen": [154, 205, 50]
6276
- };
6277
- }
6278
- });
6279
-
6280
- // ../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js
6281
- var require_is_arrayish = __commonJS({
6282
- "../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js"(exports2, module2) {
6283
- "use strict";
6284
- module2.exports = function isArrayish(obj) {
6285
- if (!obj || typeof obj === "string") {
6286
- return false;
6287
- }
6288
- return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String");
6289
- };
6290
- }
6291
- });
6292
-
6293
- // ../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js
6294
- var require_simple_swizzle = __commonJS({
6295
- "../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js"(exports2, module2) {
6202
+ // ../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/color.cjs
6203
+ var require_color = __commonJS({
6204
+ "../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/color.cjs"(exports2, module2) {
6296
6205
  "use strict";
6297
- var isArrayish = require_is_arrayish();
6298
- var concat = Array.prototype.concat;
6299
- var slice = Array.prototype.slice;
6300
- var swizzle = module2.exports = function swizzle2(args) {
6301
- var results = [];
6302
- for (var i2 = 0, len = args.length; i2 < len; i2++) {
6303
- var arg = args[i2];
6304
- if (isArrayish(arg)) {
6305
- results = concat.call(results, slice.call(arg));
6306
- } else {
6307
- results.push(arg);
6308
- }
6309
- }
6310
- return results;
6311
- };
6312
- swizzle.wrap = function(fn) {
6313
- return function() {
6314
- return fn(swizzle(arguments));
6315
- };
6206
+ var __defProp2 = Object.defineProperty;
6207
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
6208
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
6209
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6210
+ var __export2 = (target, all) => {
6211
+ for (var name in all)
6212
+ __defProp2(target, name, { get: all[name], enumerable: true });
6213
+ };
6214
+ var __copyProps2 = (to, from, except, desc) => {
6215
+ if (from && typeof from === "object" || typeof from === "function") {
6216
+ for (let key of __getOwnPropNames2(from))
6217
+ if (!__hasOwnProp2.call(to, key) && key !== except)
6218
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
6219
+ }
6220
+ return to;
6221
+ };
6222
+ var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6223
+ var index_exports = {};
6224
+ __export2(index_exports, {
6225
+ default: () => index_default
6226
+ });
6227
+ module2.exports = __toCommonJS(index_exports);
6228
+ var color_name_default = {
6229
+ aliceblue: [240, 248, 255],
6230
+ antiquewhite: [250, 235, 215],
6231
+ aqua: [0, 255, 255],
6232
+ aquamarine: [127, 255, 212],
6233
+ azure: [240, 255, 255],
6234
+ beige: [245, 245, 220],
6235
+ bisque: [255, 228, 196],
6236
+ black: [0, 0, 0],
6237
+ blanchedalmond: [255, 235, 205],
6238
+ blue: [0, 0, 255],
6239
+ blueviolet: [138, 43, 226],
6240
+ brown: [165, 42, 42],
6241
+ burlywood: [222, 184, 135],
6242
+ cadetblue: [95, 158, 160],
6243
+ chartreuse: [127, 255, 0],
6244
+ chocolate: [210, 105, 30],
6245
+ coral: [255, 127, 80],
6246
+ cornflowerblue: [100, 149, 237],
6247
+ cornsilk: [255, 248, 220],
6248
+ crimson: [220, 20, 60],
6249
+ cyan: [0, 255, 255],
6250
+ darkblue: [0, 0, 139],
6251
+ darkcyan: [0, 139, 139],
6252
+ darkgoldenrod: [184, 134, 11],
6253
+ darkgray: [169, 169, 169],
6254
+ darkgreen: [0, 100, 0],
6255
+ darkgrey: [169, 169, 169],
6256
+ darkkhaki: [189, 183, 107],
6257
+ darkmagenta: [139, 0, 139],
6258
+ darkolivegreen: [85, 107, 47],
6259
+ darkorange: [255, 140, 0],
6260
+ darkorchid: [153, 50, 204],
6261
+ darkred: [139, 0, 0],
6262
+ darksalmon: [233, 150, 122],
6263
+ darkseagreen: [143, 188, 143],
6264
+ darkslateblue: [72, 61, 139],
6265
+ darkslategray: [47, 79, 79],
6266
+ darkslategrey: [47, 79, 79],
6267
+ darkturquoise: [0, 206, 209],
6268
+ darkviolet: [148, 0, 211],
6269
+ deeppink: [255, 20, 147],
6270
+ deepskyblue: [0, 191, 255],
6271
+ dimgray: [105, 105, 105],
6272
+ dimgrey: [105, 105, 105],
6273
+ dodgerblue: [30, 144, 255],
6274
+ firebrick: [178, 34, 34],
6275
+ floralwhite: [255, 250, 240],
6276
+ forestgreen: [34, 139, 34],
6277
+ fuchsia: [255, 0, 255],
6278
+ gainsboro: [220, 220, 220],
6279
+ ghostwhite: [248, 248, 255],
6280
+ gold: [255, 215, 0],
6281
+ goldenrod: [218, 165, 32],
6282
+ gray: [128, 128, 128],
6283
+ green: [0, 128, 0],
6284
+ greenyellow: [173, 255, 47],
6285
+ grey: [128, 128, 128],
6286
+ honeydew: [240, 255, 240],
6287
+ hotpink: [255, 105, 180],
6288
+ indianred: [205, 92, 92],
6289
+ indigo: [75, 0, 130],
6290
+ ivory: [255, 255, 240],
6291
+ khaki: [240, 230, 140],
6292
+ lavender: [230, 230, 250],
6293
+ lavenderblush: [255, 240, 245],
6294
+ lawngreen: [124, 252, 0],
6295
+ lemonchiffon: [255, 250, 205],
6296
+ lightblue: [173, 216, 230],
6297
+ lightcoral: [240, 128, 128],
6298
+ lightcyan: [224, 255, 255],
6299
+ lightgoldenrodyellow: [250, 250, 210],
6300
+ lightgray: [211, 211, 211],
6301
+ lightgreen: [144, 238, 144],
6302
+ lightgrey: [211, 211, 211],
6303
+ lightpink: [255, 182, 193],
6304
+ lightsalmon: [255, 160, 122],
6305
+ lightseagreen: [32, 178, 170],
6306
+ lightskyblue: [135, 206, 250],
6307
+ lightslategray: [119, 136, 153],
6308
+ lightslategrey: [119, 136, 153],
6309
+ lightsteelblue: [176, 196, 222],
6310
+ lightyellow: [255, 255, 224],
6311
+ lime: [0, 255, 0],
6312
+ limegreen: [50, 205, 50],
6313
+ linen: [250, 240, 230],
6314
+ magenta: [255, 0, 255],
6315
+ maroon: [128, 0, 0],
6316
+ mediumaquamarine: [102, 205, 170],
6317
+ mediumblue: [0, 0, 205],
6318
+ mediumorchid: [186, 85, 211],
6319
+ mediumpurple: [147, 112, 219],
6320
+ mediumseagreen: [60, 179, 113],
6321
+ mediumslateblue: [123, 104, 238],
6322
+ mediumspringgreen: [0, 250, 154],
6323
+ mediumturquoise: [72, 209, 204],
6324
+ mediumvioletred: [199, 21, 133],
6325
+ midnightblue: [25, 25, 112],
6326
+ mintcream: [245, 255, 250],
6327
+ mistyrose: [255, 228, 225],
6328
+ moccasin: [255, 228, 181],
6329
+ navajowhite: [255, 222, 173],
6330
+ navy: [0, 0, 128],
6331
+ oldlace: [253, 245, 230],
6332
+ olive: [128, 128, 0],
6333
+ olivedrab: [107, 142, 35],
6334
+ orange: [255, 165, 0],
6335
+ orangered: [255, 69, 0],
6336
+ orchid: [218, 112, 214],
6337
+ palegoldenrod: [238, 232, 170],
6338
+ palegreen: [152, 251, 152],
6339
+ paleturquoise: [175, 238, 238],
6340
+ palevioletred: [219, 112, 147],
6341
+ papayawhip: [255, 239, 213],
6342
+ peachpuff: [255, 218, 185],
6343
+ peru: [205, 133, 63],
6344
+ pink: [255, 192, 203],
6345
+ plum: [221, 160, 221],
6346
+ powderblue: [176, 224, 230],
6347
+ purple: [128, 0, 128],
6348
+ rebeccapurple: [102, 51, 153],
6349
+ red: [255, 0, 0],
6350
+ rosybrown: [188, 143, 143],
6351
+ royalblue: [65, 105, 225],
6352
+ saddlebrown: [139, 69, 19],
6353
+ salmon: [250, 128, 114],
6354
+ sandybrown: [244, 164, 96],
6355
+ seagreen: [46, 139, 87],
6356
+ seashell: [255, 245, 238],
6357
+ sienna: [160, 82, 45],
6358
+ silver: [192, 192, 192],
6359
+ skyblue: [135, 206, 235],
6360
+ slateblue: [106, 90, 205],
6361
+ slategray: [112, 128, 144],
6362
+ slategrey: [112, 128, 144],
6363
+ snow: [255, 250, 250],
6364
+ springgreen: [0, 255, 127],
6365
+ steelblue: [70, 130, 180],
6366
+ tan: [210, 180, 140],
6367
+ teal: [0, 128, 128],
6368
+ thistle: [216, 191, 216],
6369
+ tomato: [255, 99, 71],
6370
+ turquoise: [64, 224, 208],
6371
+ violet: [238, 130, 238],
6372
+ wheat: [245, 222, 179],
6373
+ white: [255, 255, 255],
6374
+ whitesmoke: [245, 245, 245],
6375
+ yellow: [255, 255, 0],
6376
+ yellowgreen: [154, 205, 50]
6316
6377
  };
6317
- }
6318
- });
6319
-
6320
- // ../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js
6321
- var require_color_string = __commonJS({
6322
- "../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"(exports2, module2) {
6323
- "use strict";
6324
- var colorNames = require_color_name();
6325
- var swizzle = require_simple_swizzle();
6326
- var hasOwnProperty = Object.hasOwnProperty;
6327
6378
  var reverseNames = /* @__PURE__ */ Object.create(null);
6328
- for (name in colorNames) {
6329
- if (hasOwnProperty.call(colorNames, name)) {
6330
- reverseNames[colorNames[name]] = name;
6379
+ for (const name in color_name_default) {
6380
+ if (Object.hasOwn(color_name_default, name)) {
6381
+ reverseNames[color_name_default[name]] = name;
6331
6382
  }
6332
6383
  }
6333
- var name;
6334
- var cs = module2.exports = {
6384
+ var cs = {
6335
6385
  to: {},
6336
6386
  get: {}
6337
6387
  };
6338
6388
  cs.get = function(string) {
6339
- var prefix = string.substring(0, 3).toLowerCase();
6340
- var val;
6341
- var model;
6389
+ const prefix = string.slice(0, 3).toLowerCase();
6390
+ let value;
6391
+ let model;
6342
6392
  switch (prefix) {
6343
- case "hsl":
6344
- val = cs.get.hsl(string);
6393
+ case "hsl": {
6394
+ value = cs.get.hsl(string);
6345
6395
  model = "hsl";
6346
6396
  break;
6347
- case "hwb":
6348
- val = cs.get.hwb(string);
6397
+ }
6398
+ case "hwb": {
6399
+ value = cs.get.hwb(string);
6349
6400
  model = "hwb";
6350
6401
  break;
6351
- default:
6352
- val = cs.get.rgb(string);
6402
+ }
6403
+ default: {
6404
+ value = cs.get.rgb(string);
6353
6405
  model = "rgb";
6354
6406
  break;
6407
+ }
6355
6408
  }
6356
- if (!val) {
6409
+ if (!value) {
6357
6410
  return null;
6358
6411
  }
6359
- return { model, value: val };
6412
+ return { model, value };
6360
6413
  };
6361
6414
  cs.get.rgb = function(string) {
6362
6415
  if (!string) {
6363
6416
  return null;
6364
6417
  }
6365
- var abbr = /^#([a-f0-9]{3,4})$/i;
6366
- var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
6367
- var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
6368
- var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
6369
- var keyword = /^(\w+)$/;
6370
- var rgb = [0, 0, 0, 1];
6371
- var match;
6372
- var i2;
6373
- var hexAlpha;
6418
+ const abbr = /^#([a-f\d]{3,4})$/i;
6419
+ const hex = /^#([a-f\d]{6})([a-f\d]{2})?$/i;
6420
+ const rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
6421
+ const per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
6422
+ const keyword = /^(\w+)$/;
6423
+ let rgb = [0, 0, 0, 1];
6424
+ let match;
6425
+ let i2;
6426
+ let hexAlpha;
6374
6427
  if (match = string.match(hex)) {
6375
6428
  hexAlpha = match[2];
6376
6429
  match = match[1];
6377
6430
  for (i2 = 0; i2 < 3; i2++) {
6378
- var i22 = i2 * 2;
6379
- rgb[i2] = parseInt(match.slice(i22, i22 + 2), 16);
6431
+ const i22 = i2 * 2;
6432
+ rgb[i2] = Number.parseInt(match.slice(i22, i22 + 2), 16);
6380
6433
  }
6381
6434
  if (hexAlpha) {
6382
- rgb[3] = parseInt(hexAlpha, 16) / 255;
6435
+ rgb[3] = Number.parseInt(hexAlpha, 16) / 255;
6383
6436
  }
6384
6437
  } else if (match = string.match(abbr)) {
6385
6438
  match = match[1];
6386
6439
  hexAlpha = match[3];
6387
6440
  for (i2 = 0; i2 < 3; i2++) {
6388
- rgb[i2] = parseInt(match[i2] + match[i2], 16);
6441
+ rgb[i2] = Number.parseInt(match[i2] + match[i2], 16);
6389
6442
  }
6390
6443
  if (hexAlpha) {
6391
- rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
6444
+ rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
6392
6445
  }
6393
6446
  } else if (match = string.match(rgba)) {
6394
6447
  for (i2 = 0; i2 < 3; i2++) {
6395
- rgb[i2] = parseInt(match[i2 + 1], 0);
6448
+ rgb[i2] = Number.parseInt(match[i2 + 1], 10);
6396
6449
  }
6397
6450
  if (match[4]) {
6398
- if (match[5]) {
6399
- rgb[3] = parseFloat(match[4]) * 0.01;
6400
- } else {
6401
- rgb[3] = parseFloat(match[4]);
6402
- }
6451
+ rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
6403
6452
  }
6404
6453
  } else if (match = string.match(per)) {
6405
6454
  for (i2 = 0; i2 < 3; i2++) {
6406
- rgb[i2] = Math.round(parseFloat(match[i2 + 1]) * 2.55);
6455
+ rgb[i2] = Math.round(Number.parseFloat(match[i2 + 1]) * 2.55);
6407
6456
  }
6408
6457
  if (match[4]) {
6409
- if (match[5]) {
6410
- rgb[3] = parseFloat(match[4]) * 0.01;
6411
- } else {
6412
- rgb[3] = parseFloat(match[4]);
6413
- }
6458
+ rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
6414
6459
  }
6415
6460
  } else if (match = string.match(keyword)) {
6416
6461
  if (match[1] === "transparent") {
6417
6462
  return [0, 0, 0, 0];
6418
6463
  }
6419
- if (!hasOwnProperty.call(colorNames, match[1])) {
6464
+ if (!Object.hasOwn(color_name_default, match[1])) {
6420
6465
  return null;
6421
6466
  }
6422
- rgb = colorNames[match[1]];
6467
+ rgb = color_name_default[match[1]];
6423
6468
  rgb[3] = 1;
6424
6469
  return rgb;
6425
6470
  } else {
@@ -6435,14 +6480,14 @@ var require_color_string = __commonJS({
6435
6480
  if (!string) {
6436
6481
  return null;
6437
6482
  }
6438
- var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
6439
- var match = string.match(hsl);
6483
+ const hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
6484
+ const match = string.match(hsl);
6440
6485
  if (match) {
6441
- var alpha = parseFloat(match[4]);
6442
- var h2 = (parseFloat(match[1]) % 360 + 360) % 360;
6443
- var s2 = clamp(parseFloat(match[2]), 0, 100);
6444
- var l = clamp(parseFloat(match[3]), 0, 100);
6445
- var a2 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
6486
+ const alpha = Number.parseFloat(match[4]);
6487
+ const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6488
+ const s2 = clamp(Number.parseFloat(match[2]), 0, 100);
6489
+ const l = clamp(Number.parseFloat(match[3]), 0, 100);
6490
+ const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
6446
6491
  return [h2, s2, l, a2];
6447
6492
  }
6448
6493
  return null;
@@ -6451,66 +6496,54 @@ var require_color_string = __commonJS({
6451
6496
  if (!string) {
6452
6497
  return null;
6453
6498
  }
6454
- var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
6455
- var match = string.match(hwb);
6499
+ const hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
6500
+ const match = string.match(hwb);
6456
6501
  if (match) {
6457
- var alpha = parseFloat(match[4]);
6458
- var h2 = (parseFloat(match[1]) % 360 + 360) % 360;
6459
- var w = clamp(parseFloat(match[2]), 0, 100);
6460
- var b = clamp(parseFloat(match[3]), 0, 100);
6461
- var a2 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
6502
+ const alpha = Number.parseFloat(match[4]);
6503
+ const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6504
+ const w = clamp(Number.parseFloat(match[2]), 0, 100);
6505
+ const b = clamp(Number.parseFloat(match[3]), 0, 100);
6506
+ const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
6462
6507
  return [h2, w, b, a2];
6463
6508
  }
6464
6509
  return null;
6465
6510
  };
6466
- cs.to.hex = function() {
6467
- var rgba = swizzle(arguments);
6511
+ cs.to.hex = function(...rgba) {
6468
6512
  return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
6469
6513
  };
6470
- cs.to.rgb = function() {
6471
- var rgba = swizzle(arguments);
6514
+ cs.to.rgb = function(...rgba) {
6472
6515
  return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")";
6473
6516
  };
6474
- cs.to.rgb.percent = function() {
6475
- var rgba = swizzle(arguments);
6476
- var r = Math.round(rgba[0] / 255 * 100);
6477
- var g2 = Math.round(rgba[1] / 255 * 100);
6478
- var b = Math.round(rgba[2] / 255 * 100);
6517
+ cs.to.rgb.percent = function(...rgba) {
6518
+ const r = Math.round(rgba[0] / 255 * 100);
6519
+ const g2 = Math.round(rgba[1] / 255 * 100);
6520
+ const b = Math.round(rgba[2] / 255 * 100);
6479
6521
  return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g2 + "%, " + b + "%)" : "rgba(" + r + "%, " + g2 + "%, " + b + "%, " + rgba[3] + ")";
6480
6522
  };
6481
- cs.to.hsl = function() {
6482
- var hsla = swizzle(arguments);
6523
+ cs.to.hsl = function(...hsla) {
6483
6524
  return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
6484
6525
  };
6485
- cs.to.hwb = function() {
6486
- var hwba = swizzle(arguments);
6487
- var a2 = "";
6526
+ cs.to.hwb = function(...hwba) {
6527
+ let a2 = "";
6488
6528
  if (hwba.length >= 4 && hwba[3] !== 1) {
6489
6529
  a2 = ", " + hwba[3];
6490
6530
  }
6491
6531
  return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a2 + ")";
6492
6532
  };
6493
- cs.to.keyword = function(rgb) {
6533
+ cs.to.keyword = function(...rgb) {
6494
6534
  return reverseNames[rgb.slice(0, 3)];
6495
6535
  };
6496
- function clamp(num, min, max) {
6497
- return Math.min(Math.max(min, num), max);
6536
+ function clamp(number_, min, max) {
6537
+ return Math.min(Math.max(min, number_), max);
6498
6538
  }
6499
- function hexDouble(num) {
6500
- var str = Math.round(num).toString(16).toUpperCase();
6501
- return str.length < 2 ? "0" + str : str;
6539
+ function hexDouble(number_) {
6540
+ const string_ = Math.round(number_).toString(16).toUpperCase();
6541
+ return string_.length < 2 ? "0" + string_ : string_;
6502
6542
  }
6503
- }
6504
- });
6505
-
6506
- // ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
6507
- var require_conversions = __commonJS({
6508
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) {
6509
- "use strict";
6510
- var cssKeywords = require_color_name();
6543
+ var color_string_default = cs;
6511
6544
  var reverseKeywords = {};
6512
- for (const key of Object.keys(cssKeywords)) {
6513
- reverseKeywords[cssKeywords[key]] = key;
6545
+ for (const key of Object.keys(color_name_default)) {
6546
+ reverseKeywords[color_name_default[key]] = key;
6514
6547
  }
6515
6548
  var convert = {
6516
6549
  rgb: { channels: 3, labels: "rgb" },
@@ -6520,7 +6553,9 @@ var require_conversions = __commonJS({
6520
6553
  cmyk: { channels: 4, labels: "cmyk" },
6521
6554
  xyz: { channels: 3, labels: "xyz" },
6522
6555
  lab: { channels: 3, labels: "lab" },
6556
+ oklab: { channels: 3, labels: ["okl", "oka", "okb"] },
6523
6557
  lch: { channels: 3, labels: "lch" },
6558
+ oklch: { channels: 3, labels: ["okl", "okc", "okh"] },
6524
6559
  hex: { channels: 1, labels: ["hex"] },
6525
6560
  keyword: { channels: 1, labels: ["keyword"] },
6526
6561
  ansi16: { channels: 1, labels: ["ansi16"] },
@@ -6529,7 +6564,15 @@ var require_conversions = __commonJS({
6529
6564
  apple: { channels: 3, labels: ["r16", "g16", "b16"] },
6530
6565
  gray: { channels: 1, labels: ["gray"] }
6531
6566
  };
6532
- module2.exports = convert;
6567
+ var conversions_default = convert;
6568
+ var LAB_FT = (6 / 29) ** 3;
6569
+ function srgbNonlinearTransform(c2) {
6570
+ const cc = c2 > 31308e-7 ? 1.055 * c2 ** (1 / 2.4) - 0.055 : c2 * 12.92;
6571
+ return Math.min(Math.max(0, cc), 1);
6572
+ }
6573
+ function srgbNonlinearTransformInv(c2) {
6574
+ return c2 > 0.04045 ? ((c2 + 0.055) / 1.055) ** 2.4 : c2 / 12.92;
6575
+ }
6533
6576
  for (const model of Object.keys(convert)) {
6534
6577
  if (!("channels" in convert[model])) {
6535
6578
  throw new Error("missing channels property: " + model);
@@ -6555,14 +6598,23 @@ var require_conversions = __commonJS({
6555
6598
  const delta = max - min;
6556
6599
  let h2;
6557
6600
  let s2;
6558
- if (max === min) {
6559
- h2 = 0;
6560
- } else if (r === max) {
6561
- h2 = (g2 - b) / delta;
6562
- } else if (g2 === max) {
6563
- h2 = 2 + (b - r) / delta;
6564
- } else if (b === max) {
6565
- h2 = 4 + (r - g2) / delta;
6601
+ switch (max) {
6602
+ case min: {
6603
+ h2 = 0;
6604
+ break;
6605
+ }
6606
+ case r: {
6607
+ h2 = (g2 - b) / delta;
6608
+ break;
6609
+ }
6610
+ case g2: {
6611
+ h2 = 2 + (b - r) / delta;
6612
+ break;
6613
+ }
6614
+ case b: {
6615
+ h2 = 4 + (r - g2) / delta;
6616
+ break;
6617
+ }
6566
6618
  }
6567
6619
  h2 = Math.min(h2 * 60, 360);
6568
6620
  if (h2 < 0) {
@@ -6600,12 +6652,19 @@ var require_conversions = __commonJS({
6600
6652
  rdif = diffc(r);
6601
6653
  gdif = diffc(g2);
6602
6654
  bdif = diffc(b);
6603
- if (r === v) {
6604
- h2 = bdif - gdif;
6605
- } else if (g2 === v) {
6606
- h2 = 1 / 3 + rdif - bdif;
6607
- } else if (b === v) {
6608
- h2 = 2 / 3 + gdif - rdif;
6655
+ switch (v) {
6656
+ case r: {
6657
+ h2 = bdif - gdif;
6658
+ break;
6659
+ }
6660
+ case g2: {
6661
+ h2 = 1 / 3 + rdif - bdif;
6662
+ break;
6663
+ }
6664
+ case b: {
6665
+ h2 = 2 / 3 + gdif - rdif;
6666
+ break;
6667
+ }
6609
6668
  }
6610
6669
  if (h2 < 0) {
6611
6670
  h2 += 1;
@@ -6628,6 +6687,18 @@ var require_conversions = __commonJS({
6628
6687
  b = 1 - 1 / 255 * Math.max(r, Math.max(g2, b));
6629
6688
  return [h2, w * 100, b * 100];
6630
6689
  };
6690
+ convert.rgb.oklab = function(rgb) {
6691
+ const r = srgbNonlinearTransformInv(rgb[0] / 255);
6692
+ const g2 = srgbNonlinearTransformInv(rgb[1] / 255);
6693
+ const b = srgbNonlinearTransformInv(rgb[2] / 255);
6694
+ const lp = Math.cbrt(0.4122214708 * r + 0.5363325363 * g2 + 0.0514459929 * b);
6695
+ const mp = Math.cbrt(0.2119034982 * r + 0.6806995451 * g2 + 0.1073969566 * b);
6696
+ const sp = Math.cbrt(0.0883024619 * r + 0.2817188376 * g2 + 0.6299787005 * b);
6697
+ const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6698
+ const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
6699
+ const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
6700
+ return [l * 100, aa * 100, bb * 100];
6701
+ };
6631
6702
  convert.rgb.cmyk = function(rgb) {
6632
6703
  const r = rgb[0] / 255;
6633
6704
  const g2 = rgb[1] / 255;
@@ -6646,10 +6717,10 @@ var require_conversions = __commonJS({
6646
6717
  if (reversed) {
6647
6718
  return reversed;
6648
6719
  }
6649
- let currentClosestDistance = Infinity;
6720
+ let currentClosestDistance = Number.POSITIVE_INFINITY;
6650
6721
  let currentClosestKeyword;
6651
- for (const keyword of Object.keys(cssKeywords)) {
6652
- const value = cssKeywords[keyword];
6722
+ for (const keyword of Object.keys(color_name_default)) {
6723
+ const value = color_name_default[keyword];
6653
6724
  const distance = comparativeDistance(rgb, value);
6654
6725
  if (distance < currentClosestDistance) {
6655
6726
  currentClosestDistance = distance;
@@ -6659,18 +6730,15 @@ var require_conversions = __commonJS({
6659
6730
  return currentClosestKeyword;
6660
6731
  };
6661
6732
  convert.keyword.rgb = function(keyword) {
6662
- return cssKeywords[keyword];
6733
+ return color_name_default[keyword];
6663
6734
  };
6664
6735
  convert.rgb.xyz = function(rgb) {
6665
- let r = rgb[0] / 255;
6666
- let g2 = rgb[1] / 255;
6667
- let b = rgb[2] / 255;
6668
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
6669
- g2 = g2 > 0.04045 ? ((g2 + 0.055) / 1.055) ** 2.4 : g2 / 12.92;
6670
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
6671
- const x = r * 0.4124 + g2 * 0.3576 + b * 0.1805;
6672
- const y = r * 0.2126 + g2 * 0.7152 + b * 0.0722;
6673
- const z2 = r * 0.0193 + g2 * 0.1192 + b * 0.9505;
6736
+ const r = srgbNonlinearTransformInv(rgb[0] / 255);
6737
+ const g2 = srgbNonlinearTransformInv(rgb[1] / 255);
6738
+ const b = srgbNonlinearTransformInv(rgb[2] / 255);
6739
+ const x = r * 0.4124564 + g2 * 0.3575761 + b * 0.1804375;
6740
+ const y = r * 0.2126729 + g2 * 0.7151522 + b * 0.072175;
6741
+ const z2 = r * 0.0193339 + g2 * 0.119192 + b * 0.9503041;
6674
6742
  return [x * 100, y * 100, z2 * 100];
6675
6743
  };
6676
6744
  convert.rgb.lab = function(rgb) {
@@ -6681,9 +6749,9 @@ var require_conversions = __commonJS({
6681
6749
  x /= 95.047;
6682
6750
  y /= 100;
6683
6751
  z2 /= 108.883;
6684
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6685
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6686
- z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116;
6752
+ x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6753
+ y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6754
+ z2 = z2 > LAB_FT ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116;
6687
6755
  const l = 116 * y - 16;
6688
6756
  const a2 = 500 * (x - y);
6689
6757
  const b = 200 * (y - z2);
@@ -6693,18 +6761,13 @@ var require_conversions = __commonJS({
6693
6761
  const h2 = hsl[0] / 360;
6694
6762
  const s2 = hsl[1] / 100;
6695
6763
  const l = hsl[2] / 100;
6696
- let t2;
6697
6764
  let t3;
6698
- let val;
6765
+ let value;
6699
6766
  if (s2 === 0) {
6700
- val = l * 255;
6701
- return [val, val, val];
6702
- }
6703
- if (l < 0.5) {
6704
- t2 = l * (1 + s2);
6705
- } else {
6706
- t2 = l + s2 - l * s2;
6767
+ value = l * 255;
6768
+ return [value, value, value];
6707
6769
  }
6770
+ const t2 = l < 0.5 ? l * (1 + s2) : l + s2 - l * s2;
6708
6771
  const t1 = 2 * l - t2;
6709
6772
  const rgb = [0, 0, 0];
6710
6773
  for (let i2 = 0; i2 < 3; i2++) {
@@ -6716,15 +6779,15 @@ var require_conversions = __commonJS({
6716
6779
  t3--;
6717
6780
  }
6718
6781
  if (6 * t3 < 1) {
6719
- val = t1 + (t2 - t1) * 6 * t3;
6782
+ value = t1 + (t2 - t1) * 6 * t3;
6720
6783
  } else if (2 * t3 < 1) {
6721
- val = t2;
6784
+ value = t2;
6722
6785
  } else if (3 * t3 < 2) {
6723
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
6786
+ value = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
6724
6787
  } else {
6725
- val = t1;
6788
+ value = t1;
6726
6789
  }
6727
- rgb[i2] = val * 255;
6790
+ rgb[i2] = value * 255;
6728
6791
  }
6729
6792
  return rgb;
6730
6793
  };
@@ -6752,18 +6815,24 @@ var require_conversions = __commonJS({
6752
6815
  const t = 255 * v * (1 - s2 * (1 - f2));
6753
6816
  v *= 255;
6754
6817
  switch (hi) {
6755
- case 0:
6818
+ case 0: {
6756
6819
  return [v, t, p2];
6757
- case 1:
6820
+ }
6821
+ case 1: {
6758
6822
  return [q4, v, p2];
6759
- case 2:
6823
+ }
6824
+ case 2: {
6760
6825
  return [p2, v, t];
6761
- case 3:
6826
+ }
6827
+ case 3: {
6762
6828
  return [p2, q4, v];
6763
- case 4:
6829
+ }
6830
+ case 4: {
6764
6831
  return [t, p2, v];
6765
- case 5:
6832
+ }
6833
+ case 5: {
6766
6834
  return [v, p2, q4];
6835
+ }
6767
6836
  }
6768
6837
  };
6769
6838
  convert.hsv.hsl = function(hsv) {
@@ -6804,36 +6873,42 @@ var require_conversions = __commonJS({
6804
6873
  switch (i2) {
6805
6874
  default:
6806
6875
  case 6:
6807
- case 0:
6876
+ case 0: {
6808
6877
  r = v;
6809
6878
  g2 = n2;
6810
6879
  b = wh;
6811
6880
  break;
6812
- case 1:
6881
+ }
6882
+ case 1: {
6813
6883
  r = n2;
6814
6884
  g2 = v;
6815
6885
  b = wh;
6816
6886
  break;
6817
- case 2:
6887
+ }
6888
+ case 2: {
6818
6889
  r = wh;
6819
6890
  g2 = v;
6820
6891
  b = n2;
6821
6892
  break;
6822
- case 3:
6893
+ }
6894
+ case 3: {
6823
6895
  r = wh;
6824
6896
  g2 = n2;
6825
6897
  b = v;
6826
6898
  break;
6827
- case 4:
6899
+ }
6900
+ case 4: {
6828
6901
  r = n2;
6829
6902
  g2 = wh;
6830
6903
  b = v;
6831
6904
  break;
6832
- case 5:
6905
+ }
6906
+ case 5: {
6833
6907
  r = v;
6834
6908
  g2 = wh;
6835
6909
  b = n2;
6836
6910
  break;
6911
+ }
6837
6912
  }
6838
6913
  return [r * 255, g2 * 255, b * 255];
6839
6914
  };
@@ -6854,15 +6929,12 @@ var require_conversions = __commonJS({
6854
6929
  let r;
6855
6930
  let g2;
6856
6931
  let b;
6857
- r = x * 3.2406 + y * -1.5372 + z2 * -0.4986;
6858
- g2 = x * -0.9689 + y * 1.8758 + z2 * 0.0415;
6859
- b = x * 0.0557 + y * -0.204 + z2 * 1.057;
6860
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
6861
- g2 = g2 > 31308e-7 ? 1.055 * g2 ** (1 / 2.4) - 0.055 : g2 * 12.92;
6862
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
6863
- r = Math.min(Math.max(0, r), 1);
6864
- g2 = Math.min(Math.max(0, g2), 1);
6865
- b = Math.min(Math.max(0, b), 1);
6932
+ r = x * 3.2404542 + y * -1.5371385 + z2 * -0.4985314;
6933
+ g2 = x * -0.969266 + y * 1.8760108 + z2 * 0.041556;
6934
+ b = x * 0.0556434 + y * -0.2040259 + z2 * 1.0572252;
6935
+ r = srgbNonlinearTransform(r);
6936
+ g2 = srgbNonlinearTransform(g2);
6937
+ b = srgbNonlinearTransform(b);
6866
6938
  return [r * 255, g2 * 255, b * 255];
6867
6939
  };
6868
6940
  convert.xyz.lab = function(xyz) {
@@ -6872,14 +6944,56 @@ var require_conversions = __commonJS({
6872
6944
  x /= 95.047;
6873
6945
  y /= 100;
6874
6946
  z2 /= 108.883;
6875
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6876
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6877
- z2 = z2 > 8856e-6 ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116;
6947
+ x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6948
+ y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6949
+ z2 = z2 > LAB_FT ? z2 ** (1 / 3) : 7.787 * z2 + 16 / 116;
6878
6950
  const l = 116 * y - 16;
6879
6951
  const a2 = 500 * (x - y);
6880
6952
  const b = 200 * (y - z2);
6881
6953
  return [l, a2, b];
6882
6954
  };
6955
+ convert.xyz.oklab = function(xyz) {
6956
+ const x = xyz[0] / 100;
6957
+ const y = xyz[1] / 100;
6958
+ const z2 = xyz[2] / 100;
6959
+ const lp = Math.cbrt(0.8189330101 * x + 0.3618667424 * y - 0.1288597137 * z2);
6960
+ const mp = Math.cbrt(0.0329845436 * x + 0.9293118715 * y + 0.0361456387 * z2);
6961
+ const sp = Math.cbrt(0.0482003018 * x + 0.2643662691 * y + 0.633851707 * z2);
6962
+ const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6963
+ const a2 = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
6964
+ const b = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
6965
+ return [l * 100, a2 * 100, b * 100];
6966
+ };
6967
+ convert.oklab.oklch = function(oklab) {
6968
+ return convert.lab.lch(oklab);
6969
+ };
6970
+ convert.oklab.xyz = function(oklab) {
6971
+ const ll = oklab[0] / 100;
6972
+ const a2 = oklab[1] / 100;
6973
+ const b = oklab[2] / 100;
6974
+ const l = (0.999999998 * ll + 0.396337792 * a2 + 0.215803758 * b) ** 3;
6975
+ const m2 = (1.000000008 * ll - 0.105561342 * a2 - 0.063854175 * b) ** 3;
6976
+ const s2 = (1.000000055 * ll - 0.089484182 * a2 - 1.291485538 * b) ** 3;
6977
+ const x = 1.227013851 * l - 0.55779998 * m2 + 0.281256149 * s2;
6978
+ const y = -0.040580178 * l + 1.11225687 * m2 - 0.071676679 * s2;
6979
+ const z2 = -0.076381285 * l - 0.421481978 * m2 + 1.58616322 * s2;
6980
+ return [x * 100, y * 100, z2 * 100];
6981
+ };
6982
+ convert.oklab.rgb = function(oklab) {
6983
+ const ll = oklab[0] / 100;
6984
+ const aa = oklab[1] / 100;
6985
+ const bb = oklab[2] / 100;
6986
+ const l = (ll + 0.3963377774 * aa + 0.2158037573 * bb) ** 3;
6987
+ const m2 = (ll - 0.1055613458 * aa - 0.0638541728 * bb) ** 3;
6988
+ const s2 = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
6989
+ const r = srgbNonlinearTransform(4.0767416621 * l - 3.3077115913 * m2 + 0.2309699292 * s2);
6990
+ const g2 = srgbNonlinearTransform(-1.2684380046 * l + 2.6097574011 * m2 - 0.3413193965 * s2);
6991
+ const b = srgbNonlinearTransform(-0.0041960863 * l - 0.7034186147 * m2 + 1.707614701 * s2);
6992
+ return [r * 255, g2 * 255, b * 255];
6993
+ };
6994
+ convert.oklch.oklab = function(oklch) {
6995
+ return convert.lch.lab(oklch);
6996
+ };
6883
6997
  convert.lab.xyz = function(lab) {
6884
6998
  const l = lab[0];
6885
6999
  const a2 = lab[1];
@@ -6893,9 +7007,9 @@ var require_conversions = __commonJS({
6893
7007
  const y2 = y ** 3;
6894
7008
  const x2 = x ** 3;
6895
7009
  const z22 = z2 ** 3;
6896
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
6897
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
6898
- z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787;
7010
+ y = y2 > LAB_FT ? y2 : (y - 16 / 116) / 7.787;
7011
+ x = x2 > LAB_FT ? x2 : (x - 16 / 116) / 7.787;
7012
+ z2 = z22 > LAB_FT ? z22 : (z2 - 16 / 116) / 7.787;
6899
7013
  x *= 95.047;
6900
7014
  y *= 100;
6901
7015
  z2 *= 108.883;
@@ -6943,7 +7057,7 @@ var require_conversions = __commonJS({
6943
7057
  const r = args[0];
6944
7058
  const g2 = args[1];
6945
7059
  const b = args[2];
6946
- if (r === g2 && g2 === b) {
7060
+ if (r >> 4 === g2 >> 4 && g2 >> 4 === b >> 4) {
6947
7061
  if (r < 8) {
6948
7062
  return 16;
6949
7063
  }
@@ -6956,6 +7070,7 @@ var require_conversions = __commonJS({
6956
7070
  return ansi;
6957
7071
  };
6958
7072
  convert.ansi16.rgb = function(args) {
7073
+ args = args[0];
6959
7074
  let color = args % 10;
6960
7075
  if (color === 0 || color === 7) {
6961
7076
  if (args > 50) {
@@ -6964,13 +7079,14 @@ var require_conversions = __commonJS({
6964
7079
  color = color / 10.5 * 255;
6965
7080
  return [color, color, color];
6966
7081
  }
6967
- const mult = (~~(args > 50) + 1) * 0.5;
7082
+ const mult = (Math.trunc(args > 50) + 1) * 0.5;
6968
7083
  const r = (color & 1) * mult * 255;
6969
7084
  const g2 = (color >> 1 & 1) * mult * 255;
6970
7085
  const b = (color >> 2 & 1) * mult * 255;
6971
7086
  return [r, g2, b];
6972
7087
  };
6973
7088
  convert.ansi256.rgb = function(args) {
7089
+ args = args[0];
6974
7090
  if (args >= 232) {
6975
7091
  const c2 = (args - 232) * 10 + 8;
6976
7092
  return [c2, c2, c2];
@@ -6985,20 +7101,18 @@ var require_conversions = __commonJS({
6985
7101
  convert.rgb.hex = function(args) {
6986
7102
  const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
6987
7103
  const string = integer.toString(16).toUpperCase();
6988
- return "000000".substring(string.length) + string;
7104
+ return "000000".slice(string.length) + string;
6989
7105
  };
6990
7106
  convert.hex.rgb = function(args) {
6991
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
7107
+ const match = args.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);
6992
7108
  if (!match) {
6993
7109
  return [0, 0, 0];
6994
7110
  }
6995
7111
  let colorString = match[0];
6996
7112
  if (match[0].length === 3) {
6997
- colorString = colorString.split("").map((char) => {
6998
- return char + char;
6999
- }).join("");
7113
+ colorString = [...colorString].map((char) => char + char).join("");
7000
7114
  }
7001
- const integer = parseInt(colorString, 16);
7115
+ const integer = Number.parseInt(colorString, 16);
7002
7116
  const r = integer >> 16 & 255;
7003
7117
  const g2 = integer >> 8 & 255;
7004
7118
  const b = integer & 255;
@@ -7011,13 +7125,8 @@ var require_conversions = __commonJS({
7011
7125
  const max = Math.max(Math.max(r, g2), b);
7012
7126
  const min = Math.min(Math.min(r, g2), b);
7013
7127
  const chroma = max - min;
7014
- let grayscale;
7015
7128
  let hue;
7016
- if (chroma < 1) {
7017
- grayscale = min / (1 - chroma);
7018
- } else {
7019
- grayscale = 0;
7020
- }
7129
+ const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
7021
7130
  if (chroma <= 0) {
7022
7131
  hue = 0;
7023
7132
  } else if (max === r) {
@@ -7064,35 +7173,41 @@ var require_conversions = __commonJS({
7064
7173
  const w = 1 - v;
7065
7174
  let mg = 0;
7066
7175
  switch (Math.floor(hi)) {
7067
- case 0:
7176
+ case 0: {
7068
7177
  pure[0] = 1;
7069
7178
  pure[1] = v;
7070
7179
  pure[2] = 0;
7071
7180
  break;
7072
- case 1:
7181
+ }
7182
+ case 1: {
7073
7183
  pure[0] = w;
7074
7184
  pure[1] = 1;
7075
7185
  pure[2] = 0;
7076
7186
  break;
7077
- case 2:
7187
+ }
7188
+ case 2: {
7078
7189
  pure[0] = 0;
7079
7190
  pure[1] = 1;
7080
7191
  pure[2] = v;
7081
7192
  break;
7082
- case 3:
7193
+ }
7194
+ case 3: {
7083
7195
  pure[0] = 0;
7084
7196
  pure[1] = w;
7085
7197
  pure[2] = 1;
7086
7198
  break;
7087
- case 4:
7199
+ }
7200
+ case 4: {
7088
7201
  pure[0] = v;
7089
7202
  pure[1] = 0;
7090
7203
  pure[2] = 1;
7091
7204
  break;
7092
- default:
7205
+ }
7206
+ default: {
7093
7207
  pure[0] = 1;
7094
7208
  pure[1] = 0;
7095
7209
  pure[2] = w;
7210
+ }
7096
7211
  }
7097
7212
  mg = (1 - c2) * g2;
7098
7213
  return [
@@ -7163,28 +7278,20 @@ var require_conversions = __commonJS({
7163
7278
  return [gray[0], 0, 0];
7164
7279
  };
7165
7280
  convert.gray.hex = function(gray) {
7166
- const val = Math.round(gray[0] / 100 * 255) & 255;
7167
- const integer = (val << 16) + (val << 8) + val;
7281
+ const value = Math.round(gray[0] / 100 * 255) & 255;
7282
+ const integer = (value << 16) + (value << 8) + value;
7168
7283
  const string = integer.toString(16).toUpperCase();
7169
- return "000000".substring(string.length) + string;
7284
+ return "000000".slice(string.length) + string;
7170
7285
  };
7171
7286
  convert.rgb.gray = function(rgb) {
7172
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
7173
- return [val / 255 * 100];
7287
+ const value = (rgb[0] + rgb[1] + rgb[2]) / 3;
7288
+ return [value / 255 * 100];
7174
7289
  };
7175
- }
7176
- });
7177
-
7178
- // ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
7179
- var require_route = __commonJS({
7180
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) {
7181
- "use strict";
7182
- var conversions = require_conversions();
7183
7290
  function buildGraph() {
7184
7291
  const graph = {};
7185
- const models = Object.keys(conversions);
7186
- for (let len = models.length, i2 = 0; i2 < len; i2++) {
7187
- graph[models[i2]] = {
7292
+ const models2 = Object.keys(conversions_default);
7293
+ for (let { length } = models2, i2 = 0; i2 < length; i2++) {
7294
+ graph[models2[i2]] = {
7188
7295
  // http://jsperf.com/1-vs-infinity
7189
7296
  // micro-opt, but this is simple.
7190
7297
  distance: -1,
@@ -7197,10 +7304,10 @@ var require_route = __commonJS({
7197
7304
  const graph = buildGraph();
7198
7305
  const queue = [fromModel];
7199
7306
  graph[fromModel].distance = 0;
7200
- while (queue.length) {
7307
+ while (queue.length > 0) {
7201
7308
  const current = queue.pop();
7202
- const adjacents = Object.keys(conversions[current]);
7203
- for (let len = adjacents.length, i2 = 0; i2 < len; i2++) {
7309
+ const adjacents = Object.keys(conversions_default[current]);
7310
+ for (let { length } = adjacents, i2 = 0; i2 < length; i2++) {
7204
7311
  const adjacent = adjacents[i2];
7205
7312
  const node = graph[adjacent];
7206
7313
  if (node.distance === -1) {
@@ -7219,22 +7326,22 @@ var require_route = __commonJS({
7219
7326
  }
7220
7327
  function wrapConversion(toModel, graph) {
7221
7328
  const path = [graph[toModel].parent, toModel];
7222
- let fn = conversions[graph[toModel].parent][toModel];
7329
+ let fn = conversions_default[graph[toModel].parent][toModel];
7223
7330
  let cur = graph[toModel].parent;
7224
7331
  while (graph[cur].parent) {
7225
7332
  path.unshift(graph[cur].parent);
7226
- fn = link(conversions[graph[cur].parent][cur], fn);
7333
+ fn = link(conversions_default[graph[cur].parent][cur], fn);
7227
7334
  cur = graph[cur].parent;
7228
7335
  }
7229
7336
  fn.conversion = path;
7230
7337
  return fn;
7231
7338
  }
7232
- module2.exports = function(fromModel) {
7339
+ function route(fromModel) {
7233
7340
  const graph = deriveBFS(fromModel);
7234
7341
  const conversion = {};
7235
- const models = Object.keys(graph);
7236
- for (let len = models.length, i2 = 0; i2 < len; i2++) {
7237
- const toModel = models[i2];
7342
+ const models2 = Object.keys(graph);
7343
+ for (let { length } = models2, i2 = 0; i2 < length; i2++) {
7344
+ const toModel = models2[i2];
7238
7345
  const node = graph[toModel];
7239
7346
  if (node.parent === null) {
7240
7347
  continue;
@@ -7242,18 +7349,10 @@ var require_route = __commonJS({
7242
7349
  conversion[toModel] = wrapConversion(toModel, graph);
7243
7350
  }
7244
7351
  return conversion;
7245
- };
7246
- }
7247
- });
7248
-
7249
- // ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
7250
- var require_color_convert = __commonJS({
7251
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) {
7252
- "use strict";
7253
- var conversions = require_conversions();
7254
- var route = require_route();
7255
- var convert = {};
7256
- var models = Object.keys(conversions);
7352
+ }
7353
+ var route_default = route;
7354
+ var convert2 = {};
7355
+ var models = Object.keys(conversions_default);
7257
7356
  function wrapRaw(fn) {
7258
7357
  const wrappedFn = function(...args) {
7259
7358
  const arg0 = args[0];
@@ -7281,7 +7380,7 @@ var require_color_convert = __commonJS({
7281
7380
  }
7282
7381
  const result = fn(args);
7283
7382
  if (typeof result === "object") {
7284
- for (let len = result.length, i2 = 0; i2 < len; i2++) {
7383
+ for (let { length } = result, i2 = 0; i2 < length; i2++) {
7285
7384
  result[i2] = Math.round(result[i2]);
7286
7385
  }
7287
7386
  }
@@ -7292,28 +7391,19 @@ var require_color_convert = __commonJS({
7292
7391
  }
7293
7392
  return wrappedFn;
7294
7393
  }
7295
- models.forEach((fromModel) => {
7296
- convert[fromModel] = {};
7297
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
7298
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
7299
- const routes = route(fromModel);
7394
+ for (const fromModel of models) {
7395
+ convert2[fromModel] = {};
7396
+ Object.defineProperty(convert2[fromModel], "channels", { value: conversions_default[fromModel].channels });
7397
+ Object.defineProperty(convert2[fromModel], "labels", { value: conversions_default[fromModel].labels });
7398
+ const routes = route_default(fromModel);
7300
7399
  const routeModels = Object.keys(routes);
7301
- routeModels.forEach((toModel) => {
7400
+ for (const toModel of routeModels) {
7302
7401
  const fn = routes[toModel];
7303
- convert[fromModel][toModel] = wrapRounded(fn);
7304
- convert[fromModel][toModel].raw = wrapRaw(fn);
7305
- });
7306
- });
7307
- module2.exports = convert;
7308
- }
7309
- });
7310
-
7311
- // ../../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js
7312
- var require_color = __commonJS({
7313
- "../../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js"(exports2, module2) {
7314
- "use strict";
7315
- var colorString = require_color_string();
7316
- var convert = require_color_convert();
7402
+ convert2[fromModel][toModel] = wrapRounded(fn);
7403
+ convert2[fromModel][toModel].raw = wrapRaw(fn);
7404
+ }
7405
+ }
7406
+ var color_convert_default = convert2;
7317
7407
  var skippedModels = [
7318
7408
  // To be honest, I don't really feel like keyword belongs in color convert, but eh.
7319
7409
  "keyword",
@@ -7323,8 +7413,8 @@ var require_color = __commonJS({
7323
7413
  "hex"
7324
7414
  ];
7325
7415
  var hashedModelKeys = {};
7326
- for (const model of Object.keys(convert)) {
7327
- hashedModelKeys[[...convert[model].labels].sort().join("")] = model;
7416
+ for (const model of Object.keys(color_convert_default)) {
7417
+ hashedModelKeys[[...color_convert_default[model].labels].sort().join("")] = model;
7328
7418
  }
7329
7419
  var limiters = {};
7330
7420
  function Color(object, model) {
@@ -7334,7 +7424,7 @@ var require_color = __commonJS({
7334
7424
  if (model && model in skippedModels) {
7335
7425
  model = null;
7336
7426
  }
7337
- if (model && !(model in convert)) {
7427
+ if (model && !(model in color_convert_default)) {
7338
7428
  throw new Error("Unknown model: " + model);
7339
7429
  }
7340
7430
  let i2;
@@ -7348,17 +7438,17 @@ var require_color = __commonJS({
7348
7438
  this.color = [...object.color];
7349
7439
  this.valpha = object.valpha;
7350
7440
  } else if (typeof object === "string") {
7351
- const result = colorString.get(object);
7441
+ const result = color_string_default.get(object);
7352
7442
  if (result === null) {
7353
7443
  throw new Error("Unable to parse color from string: " + object);
7354
7444
  }
7355
7445
  this.model = result.model;
7356
- channels = convert[this.model].channels;
7446
+ channels = color_convert_default[this.model].channels;
7357
7447
  this.color = result.value.slice(0, channels);
7358
7448
  this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
7359
7449
  } else if (object.length > 0) {
7360
7450
  this.model = model || "rgb";
7361
- channels = convert[this.model].channels;
7451
+ channels = color_convert_default[this.model].channels;
7362
7452
  const newArray = Array.prototype.slice.call(object, 0, channels);
7363
7453
  this.color = zeroArray(newArray, channels);
7364
7454
  this.valpha = typeof object[channels] === "number" ? object[channels] : 1;
@@ -7382,7 +7472,7 @@ var require_color = __commonJS({
7382
7472
  throw new Error("Unable to parse color from object: " + JSON.stringify(object));
7383
7473
  }
7384
7474
  this.model = hashedModelKeys[hashedKeys];
7385
- const { labels } = convert[this.model];
7475
+ const { labels } = color_convert_default[this.model];
7386
7476
  const color = [];
7387
7477
  for (i2 = 0; i2 < labels.length; i2++) {
7388
7478
  color.push(object[labels[i2]]);
@@ -7390,7 +7480,7 @@ var require_color = __commonJS({
7390
7480
  this.color = zeroArray(color);
7391
7481
  }
7392
7482
  if (limiters[this.model]) {
7393
- channels = convert[this.model].channels;
7483
+ channels = color_convert_default[this.model].channels;
7394
7484
  for (i2 = 0; i2 < channels; i2++) {
7395
7485
  const limit = limiters[this.model][i2];
7396
7486
  if (limit) {
@@ -7411,23 +7501,23 @@ var require_color = __commonJS({
7411
7501
  return this[this.model]();
7412
7502
  },
7413
7503
  string(places) {
7414
- let self = this.model in colorString.to ? this : this.rgb();
7504
+ let self = this.model in color_string_default.to ? this : this.rgb();
7415
7505
  self = self.round(typeof places === "number" ? places : 1);
7416
- const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7417
- return colorString.to[self.model](args);
7506
+ const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7507
+ return color_string_default.to[self.model](...arguments_);
7418
7508
  },
7419
7509
  percentString(places) {
7420
7510
  const self = this.rgb().round(typeof places === "number" ? places : 1);
7421
- const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7422
- return colorString.to.rgb.percent(args);
7511
+ const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7512
+ return color_string_default.to.rgb.percent(...arguments_);
7423
7513
  },
7424
7514
  array() {
7425
7515
  return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
7426
7516
  },
7427
7517
  object() {
7428
7518
  const result = {};
7429
- const { channels } = convert[this.model];
7430
- const { labels } = convert[this.model];
7519
+ const { channels } = color_convert_default[this.model];
7520
+ const { labels } = color_convert_default[this.model];
7431
7521
  for (let i2 = 0; i2 < channels; i2++) {
7432
7522
  result[labels[i2]] = this.color[i2];
7433
7523
  }
@@ -7493,13 +7583,13 @@ var require_color = __commonJS({
7493
7583
  if (value !== void 0) {
7494
7584
  return new Color(value);
7495
7585
  }
7496
- return convert[this.model].keyword(this.color);
7586
+ return color_convert_default[this.model].keyword(this.color);
7497
7587
  },
7498
7588
  hex(value) {
7499
7589
  if (value !== void 0) {
7500
7590
  return new Color(value);
7501
7591
  }
7502
- return colorString.to.hex(this.rgb().round().color);
7592
+ return color_string_default.to.hex(...this.rgb().round().color);
7503
7593
  },
7504
7594
  hexa(value) {
7505
7595
  if (value !== void 0) {
@@ -7510,7 +7600,7 @@ var require_color = __commonJS({
7510
7600
  if (alphaHex.length === 1) {
7511
7601
  alphaHex = "0" + alphaHex;
7512
7602
  }
7513
- return colorString.to.hex(rgbArray) + alphaHex;
7603
+ return color_string_default.to.hex(...rgbArray) + alphaHex;
7514
7604
  },
7515
7605
  rgbNumber() {
7516
7606
  const rgb = this.rgb().color;
@@ -7623,24 +7713,24 @@ var require_color = __commonJS({
7623
7713
  );
7624
7714
  }
7625
7715
  };
7626
- for (const model of Object.keys(convert)) {
7716
+ for (const model of Object.keys(color_convert_default)) {
7627
7717
  if (skippedModels.includes(model)) {
7628
7718
  continue;
7629
7719
  }
7630
- const { channels } = convert[model];
7631
- Color.prototype[model] = function(...args) {
7720
+ const { channels } = color_convert_default[model];
7721
+ Color.prototype[model] = function(...arguments_) {
7632
7722
  if (this.model === model) {
7633
7723
  return new Color(this);
7634
7724
  }
7635
- if (args.length > 0) {
7636
- return new Color(args, model);
7725
+ if (arguments_.length > 0) {
7726
+ return new Color(arguments_, model);
7637
7727
  }
7638
- return new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);
7728
+ return new Color([...assertArray(color_convert_default[this.model][model].raw(this.color)), this.valpha], model);
7639
7729
  };
7640
- Color[model] = function(...args) {
7641
- let color = args[0];
7730
+ Color[model] = function(...arguments_) {
7731
+ let color = arguments_[0];
7642
7732
  if (typeof color === "number") {
7643
- color = zeroArray(args, channels);
7733
+ color = zeroArray(arguments_, channels);
7644
7734
  }
7645
7735
  return new Color(color, model);
7646
7736
  };
@@ -7692,15 +7782,23 @@ var require_color = __commonJS({
7692
7782
  }
7693
7783
  return array;
7694
7784
  }
7695
- module2.exports = Color;
7785
+ var index_default = Color;
7696
7786
  }
7697
7787
  });
7698
7788
 
7699
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/colour.js
7789
+ // ../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/index.cjs
7700
7790
  var require_colour = __commonJS({
7701
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/colour.js"(exports2, module2) {
7791
+ "../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/index.cjs"(exports2, module2) {
7702
7792
  "use strict";
7703
- var color = require_color();
7793
+ module2.exports = require_color().default;
7794
+ }
7795
+ });
7796
+
7797
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/colour.js
7798
+ var require_colour2 = __commonJS({
7799
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/colour.js"(exports2, module2) {
7800
+ "use strict";
7801
+ var color = require_colour();
7704
7802
  var is = require_is();
7705
7803
  var colourspace = {
7706
7804
  multiband: "multiband",
@@ -7741,7 +7839,7 @@ var require_colour = __commonJS({
7741
7839
  return this.toColourspace(colorspace);
7742
7840
  }
7743
7841
  function _getBackgroundColourOption(value) {
7744
- if (is.object(value) || is.string(value)) {
7842
+ if (is.object(value) || is.string(value) && value.length >= 3 && value.length <= 200) {
7745
7843
  const colour = color(value);
7746
7844
  return [
7747
7845
  colour.red(),
@@ -7758,7 +7856,7 @@ var require_colour = __commonJS({
7758
7856
  this.options[key] = _getBackgroundColourOption(value);
7759
7857
  }
7760
7858
  }
7761
- module2.exports = function(Sharp) {
7859
+ module2.exports = (Sharp) => {
7762
7860
  Object.assign(Sharp.prototype, {
7763
7861
  // Public
7764
7862
  tint,
@@ -7778,9 +7876,9 @@ var require_colour = __commonJS({
7778
7876
  }
7779
7877
  });
7780
7878
 
7781
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/channel.js
7879
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/channel.js
7782
7880
  var require_channel = __commonJS({
7783
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/channel.js"(exports2, module2) {
7881
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/channel.js"(exports2, module2) {
7784
7882
  "use strict";
7785
7883
  var is = require_is();
7786
7884
  var bool = {
@@ -7834,7 +7932,7 @@ var require_channel = __commonJS({
7834
7932
  }
7835
7933
  return this;
7836
7934
  }
7837
- module2.exports = function(Sharp) {
7935
+ module2.exports = (Sharp) => {
7838
7936
  Object.assign(Sharp.prototype, {
7839
7937
  // Public instance functions
7840
7938
  removeAlpha,
@@ -7848,9 +7946,9 @@ var require_channel = __commonJS({
7848
7946
  }
7849
7947
  });
7850
7948
 
7851
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/output.js
7949
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/output.js
7852
7950
  var require_output = __commonJS({
7853
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/output.js"(exports2, module2) {
7951
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/output.js"(exports2, module2) {
7854
7952
  "use strict";
7855
7953
  var path = require("path");
7856
7954
  var is = require_is();
@@ -8359,6 +8457,9 @@ var require_output = __commonJS({
8359
8457
  throw is.invalidParameterError("compression", "one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k", options.compression);
8360
8458
  }
8361
8459
  }
8460
+ if (is.defined(options.bigtiff)) {
8461
+ this._setBooleanOption("tiffBigtiff", options.bigtiff);
8462
+ }
8362
8463
  if (is.defined(options.predictor)) {
8363
8464
  if (is.string(options.predictor) && is.inArray(options.predictor, ["none", "horizontal", "float"])) {
8364
8465
  this.options.tiffPredictor = options.predictor;
@@ -8687,7 +8788,7 @@ var require_output = __commonJS({
8687
8788
  }
8688
8789
  }
8689
8790
  }
8690
- module2.exports = function(Sharp) {
8791
+ module2.exports = (Sharp) => {
8691
8792
  Object.assign(Sharp.prototype, {
8692
8793
  // Public
8693
8794
  toFile,
@@ -8724,9 +8825,9 @@ var require_output = __commonJS({
8724
8825
  }
8725
8826
  });
8726
8827
 
8727
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/utility.js
8828
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/utility.js
8728
8829
  var require_utility = __commonJS({
8729
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/utility.js"(exports2, module2) {
8830
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/utility.js"(exports2, module2) {
8730
8831
  "use strict";
8731
8832
  var events = require("events");
8732
8833
  var detectLibc = require_detect_libc();
@@ -8830,7 +8931,7 @@ var require_utility = __commonJS({
8830
8931
  throw is.invalidParameterError("options", "object", options);
8831
8932
  }
8832
8933
  }
8833
- module2.exports = function(Sharp) {
8934
+ module2.exports = (Sharp) => {
8834
8935
  Sharp.cache = cache;
8835
8936
  Sharp.concurrency = concurrency;
8836
8937
  Sharp.counters = counters;
@@ -8845,16 +8946,16 @@ var require_utility = __commonJS({
8845
8946
  }
8846
8947
  });
8847
8948
 
8848
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/index.js
8949
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/index.js
8849
8950
  var require_lib = __commonJS({
8850
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/index.js"(exports2, module2) {
8951
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/index.js"(exports2, module2) {
8851
8952
  "use strict";
8852
8953
  var Sharp = require_constructor();
8853
8954
  require_input()(Sharp);
8854
8955
  require_resize()(Sharp);
8855
8956
  require_composite()(Sharp);
8856
8957
  require_operation()(Sharp);
8857
- require_colour()(Sharp);
8958
+ require_colour2()(Sharp);
8858
8959
  require_channel()(Sharp);
8859
8960
  require_output()(Sharp);
8860
8961
  require_utility()(Sharp);
@@ -8862,7 +8963,7 @@ var require_lib = __commonJS({
8862
8963
  }
8863
8964
  });
8864
8965
 
8865
- // ../sharp-transformer/dist/index.mjs
8966
+ // ../codec-sharp/dist/index.mjs
8866
8967
  var dist_exports2 = {};
8867
8968
  __export(dist_exports2, {
8868
8969
  default: () => f,
@@ -8887,7 +8988,7 @@ async function n(e, r) {
8887
8988
  }
8888
8989
  var import_sharp, o, f;
8889
8990
  var init_dist3 = __esm({
8890
- "../sharp-transformer/dist/index.mjs"() {
8991
+ "../codec-sharp/dist/index.mjs"() {
8891
8992
  "use strict";
8892
8993
  import_sharp = __toESM(require_lib(), 1);
8893
8994
  o = { read: a, write: n };
@@ -10198,7 +10299,7 @@ function printUsage7() {
10198
10299
  Usage: blazediff-cli<command> <image1> <image2> [options]
10199
10300
 
10200
10301
  Commands:
10201
- bin Pixel-by-pixel comparison (Rust + SIMD) (default)
10302
+ core-native Pixel-by-pixel comparison (Rust + SIMD) (default)
10202
10303
  core Pixel-by-pixel comparison (JavaScript)
10203
10304
  gmsd Gradient Magnitude Similarity Deviation metric
10204
10305
  ssim Structural Similarity Index (Gaussian-based)
@@ -10230,7 +10331,7 @@ async function main7() {
10230
10331
  }
10231
10332
  const command = args[0];
10232
10333
  const validCommands = [
10233
- "bin",
10334
+ "core-native",
10234
10335
  "core",
10235
10336
  "gmsd",
10236
10337
  "ssim",
@@ -10245,8 +10346,8 @@ async function main7() {
10245
10346
  if (isCommand) {
10246
10347
  process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
10247
10348
  switch (command) {
10248
- case "bin":
10249
- await Promise.resolve().then(() => (init_bin(), bin_exports));
10349
+ case "core-native":
10350
+ await Promise.resolve().then(() => (init_core_native(), core_native_exports));
10250
10351
  break;
10251
10352
  case "core":
10252
10353
  await Promise.resolve().then(() => (init_core(), core_exports));
@@ -10265,9 +10366,29 @@ async function main7() {
10265
10366
  break;
10266
10367
  }
10267
10368
  } else {
10268
- await Promise.resolve().then(() => (init_bin(), bin_exports));
10369
+ await Promise.resolve().then(() => (init_core_native(), core_native_exports));
10269
10370
  }
10270
10371
  }
10271
10372
  if (typeof require !== "undefined" && require.main === module) {
10272
10373
  main7();
10273
10374
  }
10375
+ /*! Bundled license information:
10376
+
10377
+ sharp/lib/is.js:
10378
+ sharp/lib/libvips.js:
10379
+ sharp/lib/sharp.js:
10380
+ sharp/lib/constructor.js:
10381
+ sharp/lib/input.js:
10382
+ sharp/lib/resize.js:
10383
+ sharp/lib/composite.js:
10384
+ sharp/lib/operation.js:
10385
+ sharp/lib/colour.js:
10386
+ sharp/lib/channel.js:
10387
+ sharp/lib/output.js:
10388
+ sharp/lib/utility.js:
10389
+ sharp/lib/index.js:
10390
+ (*!
10391
+ Copyright 2013 Lovell Fuller and others.
10392
+ SPDX-License-Identifier: Apache-2.0
10393
+ *)
10394
+ */