@blazediff/cli 2.1.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -219,8 +219,8 @@ var require_interlace = __commonJS({
219
219
  let yLeftOver = height % 8;
220
220
  let xRepeats = (width - xLeftOver) / 8;
221
221
  let yRepeats = (height - yLeftOver) / 8;
222
- for (let i2 = 0; i2 < imagePasses.length; i2++) {
223
- let pass = imagePasses[i2];
222
+ for (let i3 = 0; i3 < imagePasses.length; i3++) {
223
+ let pass = imagePasses[i3];
224
224
  let passWidth = xRepeats * pass.x.length;
225
225
  let passHeight = yRepeats * pass.y.length;
226
226
  for (let j = 0; j < pass.x.length; j++) {
@@ -238,7 +238,7 @@ var require_interlace = __commonJS({
238
238
  }
239
239
  }
240
240
  if (passWidth > 0 && passHeight > 0) {
241
- images.push({ width: passWidth, height: passHeight, index: i2 });
241
+ images.push({ width: passWidth, height: passHeight, index: i3 });
242
242
  }
243
243
  }
244
244
  return images;
@@ -301,10 +301,10 @@ var require_filter_parse = __commonJS({
301
301
  this._images = [];
302
302
  if (interlace) {
303
303
  let passes = interlaceUtils.getImagePasses(width, height);
304
- for (let i2 = 0; i2 < passes.length; i2++) {
304
+ for (let i3 = 0; i3 < passes.length; i3++) {
305
305
  this._images.push({
306
- byteWidth: getByteWidth(passes[i2].width, bpp, depth),
307
- height: passes[i2].height,
306
+ byteWidth: getByteWidth(passes[i3].width, bpp, depth),
307
+ height: passes[i3].height,
308
308
  lineIndex: 0
309
309
  });
310
310
  }
@@ -483,8 +483,8 @@ var require_crc = __commonJS({
483
483
  "use strict";
484
484
  var crcTable = [];
485
485
  (function() {
486
- for (let i2 = 0; i2 < 256; i2++) {
487
- let currentCrc = i2;
486
+ for (let i3 = 0; i3 < 256; i3++) {
487
+ let currentCrc = i3;
488
488
  for (let j = 0; j < 8; j++) {
489
489
  if (currentCrc & 1) {
490
490
  currentCrc = 3988292384 ^ currentCrc >>> 1;
@@ -492,15 +492,15 @@ var require_crc = __commonJS({
492
492
  currentCrc = currentCrc >>> 1;
493
493
  }
494
494
  }
495
- crcTable[i2] = currentCrc;
495
+ crcTable[i3] = currentCrc;
496
496
  }
497
497
  })();
498
498
  var CrcCalculator = module2.exports = function() {
499
499
  this._crc = -1;
500
500
  };
501
501
  CrcCalculator.prototype.write = function(data) {
502
- for (let i2 = 0; i2 < data.length; i2++) {
503
- this._crc = crcTable[(this._crc ^ data[i2]) & 255] ^ this._crc >>> 8;
502
+ for (let i3 = 0; i3 < data.length; i3++) {
503
+ this._crc = crcTable[(this._crc ^ data[i3]) & 255] ^ this._crc >>> 8;
504
504
  }
505
505
  return true;
506
506
  };
@@ -509,8 +509,8 @@ var require_crc = __commonJS({
509
509
  };
510
510
  CrcCalculator.crc32 = function(buf) {
511
511
  let crc = -1;
512
- for (let i2 = 0; i2 < buf.length; i2++) {
513
- crc = crcTable[(crc ^ buf[i2]) & 255] ^ crc >>> 8;
512
+ for (let i3 = 0; i3 < buf.length; i3++) {
513
+ crc = crcTable[(crc ^ buf[i3]) & 255] ^ crc >>> 8;
514
514
  }
515
515
  return crc ^ -1;
516
516
  };
@@ -556,8 +556,8 @@ var require_parser = __commonJS({
556
556
  };
557
557
  Parser.prototype._parseSignature = function(data) {
558
558
  let signature = constants.PNG_SIGNATURE;
559
- for (let i2 = 0; i2 < signature.length; i2++) {
560
- if (data[i2] !== signature[i2]) {
559
+ for (let i3 = 0; i3 < signature.length; i3++) {
560
+ if (data[i3] !== signature[i3]) {
561
561
  this.error(new Error("Invalid file signature"));
562
562
  return;
563
563
  }
@@ -568,8 +568,8 @@ var require_parser = __commonJS({
568
568
  let length = data.readUInt32BE(0);
569
569
  let type = data.readUInt32BE(4);
570
570
  let name = "";
571
- for (let i2 = 4; i2 < 8; i2++) {
572
- name += String.fromCharCode(data[i2]);
571
+ for (let i3 = 4; i3 < 8; i3++) {
572
+ name += String.fromCharCode(data[i3]);
573
573
  }
574
574
  let ancillary = Boolean(data[4] & 32);
575
575
  if (!this._hasIHDR && type !== constants.TYPE_IHDR) {
@@ -658,8 +658,8 @@ var require_parser = __commonJS({
658
658
  Parser.prototype._parsePLTE = function(data) {
659
659
  this._crc.write(data);
660
660
  let entries = Math.floor(data.length / 3);
661
- for (let i2 = 0; i2 < entries; i2++) {
662
- this._palette.push([data[i2 * 3], data[i2 * 3 + 1], data[i2 * 3 + 2], 255]);
661
+ for (let i3 = 0; i3 < entries; i3++) {
662
+ this._palette.push([data[i3 * 3], data[i3 * 3 + 1], data[i3 * 3 + 2], 255]);
663
663
  }
664
664
  this.palette(this._palette);
665
665
  this._handleChunkEnd();
@@ -679,8 +679,8 @@ var require_parser = __commonJS({
679
679
  this.error(new Error("More transparent colors than palette size"));
680
680
  return;
681
681
  }
682
- for (let i2 = 0; i2 < data.length; i2++) {
683
- this._palette[i2][3] = data[i2];
682
+ for (let i3 = 0; i3 < data.length; i3++) {
683
+ this._palette[i3][3] = data[i3];
684
684
  }
685
685
  this.palette(this._palette);
686
686
  }
@@ -835,20 +835,20 @@ var require_bitmapper = __commonJS({
835
835
  ];
836
836
  function bitRetriever(data, depth) {
837
837
  let leftOver = [];
838
- let i2 = 0;
838
+ let i3 = 0;
839
839
  function split() {
840
- if (i2 === data.length) {
840
+ if (i3 === data.length) {
841
841
  throw new Error("Ran out of data");
842
842
  }
843
- let byte = data[i2];
844
- i2++;
843
+ let byte = data[i3];
844
+ i3++;
845
845
  let byte8, byte7, byte6, byte5, byte4, byte3, byte2, byte1;
846
846
  switch (depth) {
847
847
  default:
848
848
  throw new Error("unrecognised depth");
849
849
  case 16:
850
- byte2 = data[i2];
851
- i2++;
850
+ byte2 = data[i3];
851
+ i3++;
852
852
  leftOver.push((byte << 8) + byte2);
853
853
  break;
854
854
  case 4:
@@ -889,7 +889,7 @@ var require_bitmapper = __commonJS({
889
889
  leftOver.length = 0;
890
890
  },
891
891
  end: function() {
892
- if (i2 !== data.length) {
892
+ if (i3 !== data.length) {
893
893
  throw new Error("extra data found");
894
894
  }
895
895
  }
@@ -998,8 +998,8 @@ var require_format_normaliser = __commonJS({
998
998
  if (!color) {
999
999
  throw new Error("index " + indata[pxPos] + " not in palette");
1000
1000
  }
1001
- for (let i2 = 0; i2 < 4; i2++) {
1002
- outdata[pxPos + i2] = color[i2];
1001
+ for (let i3 = 0; i3 < 4; i3++) {
1002
+ outdata[pxPos + i3] = color[i3];
1003
1003
  }
1004
1004
  pxPos += 4;
1005
1005
  }
@@ -1018,8 +1018,8 @@ var require_format_normaliser = __commonJS({
1018
1018
  makeTrans = true;
1019
1019
  }
1020
1020
  if (makeTrans) {
1021
- for (let i2 = 0; i2 < 4; i2++) {
1022
- outdata[pxPos + i2] = 0;
1021
+ for (let i3 = 0; i3 < 4; i3++) {
1022
+ outdata[pxPos + i3] = 0;
1023
1023
  }
1024
1024
  }
1025
1025
  pxPos += 4;
@@ -1032,9 +1032,9 @@ var require_format_normaliser = __commonJS({
1032
1032
  let pxPos = 0;
1033
1033
  for (let y = 0; y < height; y++) {
1034
1034
  for (let x = 0; x < width; x++) {
1035
- for (let i2 = 0; i2 < 4; i2++) {
1036
- outdata[pxPos + i2] = Math.floor(
1037
- indata[pxPos + i2] * maxOutSample / maxInSample + 0.5
1035
+ for (let i3 = 0; i3 < 4; i3++) {
1036
+ outdata[pxPos + i3] = Math.floor(
1037
+ indata[pxPos + i3] * maxOutSample / maxInSample + 0.5
1038
1038
  );
1039
1039
  }
1040
1040
  pxPos += 4;
@@ -1360,8 +1360,8 @@ var require_filter_pack = __commonJS({
1360
1360
  function filterSumNone(pxData, pxPos, byteWidth) {
1361
1361
  let sum = 0;
1362
1362
  let length = pxPos + byteWidth;
1363
- for (let i2 = pxPos; i2 < length; i2++) {
1364
- sum += Math.abs(pxData[i2]);
1363
+ for (let i3 = pxPos; i3 < length; i3++) {
1364
+ sum += Math.abs(pxData[i3]);
1365
1365
  }
1366
1366
  return sum;
1367
1367
  }
@@ -1470,10 +1470,10 @@ var require_filter_pack = __commonJS({
1470
1470
  for (let y = 0; y < height; y++) {
1471
1471
  if (filterTypes.length > 1) {
1472
1472
  let min = Infinity;
1473
- for (let i2 = 0; i2 < filterTypes.length; i2++) {
1474
- let sum = filterSums[filterTypes[i2]](pxData, pxPos, byteWidth, bpp);
1473
+ for (let i3 = 0; i3 < filterTypes.length; i3++) {
1474
+ let sum = filterSums[filterTypes[i3]](pxData, pxPos, byteWidth, bpp);
1475
1475
  if (sum < min) {
1476
- sel = filterTypes[i2];
1476
+ sel = filterTypes[i3];
1477
1477
  min = sum;
1478
1478
  }
1479
1479
  }
@@ -1670,7 +1670,7 @@ var require_sync_inflate = __commonJS({
1670
1670
  if (typeof asyncCb === "function") {
1671
1671
  return zlib.Inflate._processChunk.call(this, chunk, flushFlag, asyncCb);
1672
1672
  }
1673
- let self = this;
1673
+ let self2 = this;
1674
1674
  let availInBefore = chunk && chunk.length;
1675
1675
  let availOutBefore = this._chunkSize - this._offset;
1676
1676
  let leftToInflate = this._maxLength;
@@ -1682,14 +1682,14 @@ var require_sync_inflate = __commonJS({
1682
1682
  error = err;
1683
1683
  });
1684
1684
  function handleChunk(availInAfter, availOutAfter) {
1685
- if (self._hadError) {
1685
+ if (self2._hadError) {
1686
1686
  return;
1687
1687
  }
1688
1688
  let have = availOutBefore - availOutAfter;
1689
1689
  assert(have >= 0, "have should not go down");
1690
1690
  if (have > 0) {
1691
- let out = self._buffer.slice(self._offset, self._offset + have);
1692
- self._offset += have;
1691
+ let out = self2._buffer.slice(self2._offset, self2._offset + have);
1692
+ self2._offset += have;
1693
1693
  if (out.length > leftToInflate) {
1694
1694
  out = out.slice(0, leftToInflate);
1695
1695
  }
@@ -1700,10 +1700,10 @@ var require_sync_inflate = __commonJS({
1700
1700
  return false;
1701
1701
  }
1702
1702
  }
1703
- if (availOutAfter === 0 || self._offset >= self._chunkSize) {
1704
- availOutBefore = self._chunkSize;
1705
- self._offset = 0;
1706
- self._buffer = Buffer.allocUnsafe(self._chunkSize);
1703
+ if (availOutAfter === 0 || self2._offset >= self2._chunkSize) {
1704
+ availOutBefore = self2._chunkSize;
1705
+ self2._offset = 0;
1706
+ self2._buffer = Buffer.allocUnsafe(self2._chunkSize);
1707
1707
  }
1708
1708
  if (availOutAfter === 0) {
1709
1709
  inOff += availInBefore - availInAfter;
@@ -2106,10 +2106,10 @@ var require_png = __commonJS({
2106
2106
  for (let y = 0; y < src.height; y++) {
2107
2107
  for (let x = 0; x < src.width; x++) {
2108
2108
  let idx = src.width * y + x << 2;
2109
- for (let i2 = 0; i2 < 3; i2++) {
2110
- let sample = src.data[idx + i2] / 255;
2109
+ for (let i3 = 0; i3 < 3; i3++) {
2110
+ let sample = src.data[idx + i3] / 255;
2111
2111
  sample = Math.pow(sample, 1 / 2.2 / src.gamma);
2112
- src.data[idx + i2] = Math.round(sample * 255);
2112
+ src.data[idx + i3] = Math.round(sample * 255);
2113
2113
  }
2114
2114
  }
2115
2115
  }
@@ -2122,66 +2122,54 @@ var require_png = __commonJS({
2122
2122
  }
2123
2123
  });
2124
2124
 
2125
- // ../pngjs-transformer/dist/index.mjs
2125
+ // ../codec-pngjs/dist/index.mjs
2126
2126
  var dist_exports = {};
2127
2127
  __export(dist_exports, {
2128
- default: () => m,
2129
- pngjsTransformer: () => c
2128
+ codecPngjs: () => h2,
2129
+ default: () => m
2130
2130
  });
2131
2131
  async function d(r) {
2132
- return new Promise((n2, a2) => {
2132
+ return new Promise((i3, n3) => {
2133
2133
  try {
2134
2134
  let t = typeof r == "string" ? (0, import_fs.readFileSync)(r) : r, e = import_pngjs.PNG.sync.read(t);
2135
- n2({ data: e.data, width: e.width, height: e.height });
2135
+ i3({ data: e.data, width: e.width, height: e.height });
2136
2136
  } catch (t) {
2137
- a2(new Error(`Failed to read PNG file ${r}: ${t}`));
2137
+ n3(new Error(`Failed to read PNG file ${r}: ${t}`));
2138
2138
  }
2139
2139
  });
2140
2140
  }
2141
- async function s(r, n2) {
2142
- return new Promise((a2, t) => {
2141
+ async function c(r, i3) {
2142
+ return new Promise((n3, t) => {
2143
2143
  try {
2144
2144
  let e = new import_pngjs.PNG({ width: r.width, height: r.height });
2145
- e.data = Buffer.isBuffer(r.data) ? r.data : Buffer.from(r.data.buffer), (0, import_fs.writeFileSync)(n2, import_pngjs.PNG.sync.write(e)), a2();
2145
+ e.data = Buffer.isBuffer(r.data) ? r.data : Buffer.from(r.data.buffer), (0, import_fs.writeFileSync)(i3, import_pngjs.PNG.sync.write(e)), n3();
2146
2146
  } catch (e) {
2147
- t(new Error(`Failed to write PNG file ${n2}: ${e}`));
2147
+ t(new Error(`Failed to write PNG file ${i3}: ${e}`));
2148
2148
  }
2149
2149
  });
2150
2150
  }
2151
- var import_fs, import_pngjs, c, m;
2151
+ var import_fs, import_pngjs, h2, m;
2152
2152
  var init_dist = __esm({
2153
- "../pngjs-transformer/dist/index.mjs"() {
2153
+ "../codec-pngjs/dist/index.mjs"() {
2154
2154
  "use strict";
2155
2155
  import_fs = require("fs");
2156
2156
  import_pngjs = __toESM(require_png(), 1);
2157
- c = { read: d, write: s };
2158
- m = c;
2157
+ h2 = { read: d, write: c };
2158
+ m = h2;
2159
2159
  }
2160
2160
  });
2161
2161
 
2162
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/is.js
2162
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/is.js
2163
2163
  var require_is = __commonJS({
2164
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/is.js"(exports2, module2) {
2164
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/is.js"(exports2, module2) {
2165
2165
  "use strict";
2166
- var defined = function(val) {
2167
- return typeof val !== "undefined" && val !== null;
2168
- };
2169
- var object = function(val) {
2170
- return typeof val === "object";
2171
- };
2172
- var plainObject = function(val) {
2173
- return Object.prototype.toString.call(val) === "[object Object]";
2174
- };
2175
- var fn = function(val) {
2176
- return typeof val === "function";
2177
- };
2178
- var bool = function(val) {
2179
- return typeof val === "boolean";
2180
- };
2181
- var buffer = function(val) {
2182
- return val instanceof Buffer;
2183
- };
2184
- var typedArray = function(val) {
2166
+ var defined = (val) => typeof val !== "undefined" && val !== null;
2167
+ var object = (val) => typeof val === "object";
2168
+ var plainObject = (val) => Object.prototype.toString.call(val) === "[object Object]";
2169
+ var fn = (val) => typeof val === "function";
2170
+ var bool = (val) => typeof val === "boolean";
2171
+ var buffer = (val) => val instanceof Buffer;
2172
+ var typedArray = (val) => {
2185
2173
  if (defined(val)) {
2186
2174
  switch (val.constructor) {
2187
2175
  case Uint8Array:
@@ -2198,30 +2186,16 @@ var require_is = __commonJS({
2198
2186
  }
2199
2187
  return false;
2200
2188
  };
2201
- var arrayBuffer = function(val) {
2202
- return val instanceof ArrayBuffer;
2203
- };
2204
- var string = function(val) {
2205
- return typeof val === "string" && val.length > 0;
2206
- };
2207
- var number = function(val) {
2208
- return typeof val === "number" && !Number.isNaN(val);
2209
- };
2210
- var integer = function(val) {
2211
- return Number.isInteger(val);
2212
- };
2213
- var inRange = function(val, min, max) {
2214
- return val >= min && val <= max;
2215
- };
2216
- var inArray = function(val, list) {
2217
- return list.includes(val);
2218
- };
2219
- var invalidParameterError = function(name, expected, actual) {
2220
- return new Error(
2221
- `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
2222
- );
2223
- };
2224
- var nativeError = function(native, context) {
2189
+ var arrayBuffer = (val) => val instanceof ArrayBuffer;
2190
+ var string = (val) => typeof val === "string" && val.length > 0;
2191
+ var number = (val) => typeof val === "number" && !Number.isNaN(val);
2192
+ var integer = (val) => Number.isInteger(val);
2193
+ var inRange = (val, min, max) => val >= min && val <= max;
2194
+ var inArray = (val, list) => list.includes(val);
2195
+ var invalidParameterError = (name, expected, actual) => new Error(
2196
+ `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
2197
+ );
2198
+ var nativeError = (native, context) => {
2225
2199
  context.message = native.message;
2226
2200
  return context;
2227
2201
  };
@@ -2245,9 +2219,9 @@ var require_is = __commonJS({
2245
2219
  }
2246
2220
  });
2247
2221
 
2248
- // ../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/process.js
2222
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js
2249
2223
  var require_process = __commonJS({
2250
- "../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/process.js"(exports2, module2) {
2224
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js"(exports2, module2) {
2251
2225
  "use strict";
2252
2226
  var isLinux = () => process.platform === "linux";
2253
2227
  var report = null;
@@ -2268,37 +2242,91 @@ var require_process = __commonJS({
2268
2242
  }
2269
2243
  });
2270
2244
 
2271
- // ../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/filesystem.js
2245
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js
2272
2246
  var require_filesystem = __commonJS({
2273
- "../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/filesystem.js"(exports2, module2) {
2247
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js"(exports2, module2) {
2274
2248
  "use strict";
2275
2249
  var fs = require("fs");
2276
2250
  var LDD_PATH = "/usr/bin/ldd";
2277
- var readFileSync2 = (path) => fs.readFileSync(path, "utf-8");
2251
+ var SELF_PATH = "/proc/self/exe";
2252
+ var MAX_LENGTH = 2048;
2253
+ var readFileSync3 = (path) => {
2254
+ const fd = fs.openSync(path, "r");
2255
+ const buffer = Buffer.alloc(MAX_LENGTH);
2256
+ const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
2257
+ fs.close(fd, () => {
2258
+ });
2259
+ return buffer.subarray(0, bytesRead);
2260
+ };
2278
2261
  var readFile = (path) => new Promise((resolve, reject) => {
2279
- fs.readFile(path, "utf-8", (err, data) => {
2262
+ fs.open(path, "r", (err, fd) => {
2280
2263
  if (err) {
2281
2264
  reject(err);
2282
2265
  } else {
2283
- resolve(data);
2266
+ const buffer = Buffer.alloc(MAX_LENGTH);
2267
+ fs.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
2268
+ resolve(buffer.subarray(0, bytesRead));
2269
+ fs.close(fd, () => {
2270
+ });
2271
+ });
2284
2272
  }
2285
2273
  });
2286
2274
  });
2287
2275
  module2.exports = {
2288
2276
  LDD_PATH,
2289
- readFileSync: readFileSync2,
2277
+ SELF_PATH,
2278
+ readFileSync: readFileSync3,
2290
2279
  readFile
2291
2280
  };
2292
2281
  }
2293
2282
  });
2294
2283
 
2295
- // ../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/detect-libc.js
2284
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js
2285
+ var require_elf = __commonJS({
2286
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js"(exports2, module2) {
2287
+ "use strict";
2288
+ var interpreterPath = (elf) => {
2289
+ if (elf.length < 64) {
2290
+ return null;
2291
+ }
2292
+ if (elf.readUInt32BE(0) !== 2135247942) {
2293
+ return null;
2294
+ }
2295
+ if (elf.readUInt8(4) !== 2) {
2296
+ return null;
2297
+ }
2298
+ if (elf.readUInt8(5) !== 1) {
2299
+ return null;
2300
+ }
2301
+ const offset = elf.readUInt32LE(32);
2302
+ const size = elf.readUInt16LE(54);
2303
+ const count = elf.readUInt16LE(56);
2304
+ for (let i3 = 0; i3 < count; i3++) {
2305
+ const headerOffset = offset + i3 * size;
2306
+ const type = elf.readUInt32LE(headerOffset);
2307
+ if (type === 3) {
2308
+ const fileOffset = elf.readUInt32LE(headerOffset + 8);
2309
+ const fileSize = elf.readUInt32LE(headerOffset + 32);
2310
+ return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, "");
2311
+ }
2312
+ }
2313
+ return null;
2314
+ };
2315
+ module2.exports = {
2316
+ interpreterPath
2317
+ };
2318
+ }
2319
+ });
2320
+
2321
+ // ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js
2296
2322
  var require_detect_libc = __commonJS({
2297
- "../../node_modules/.pnpm/detect-libc@2.0.4/node_modules/detect-libc/lib/detect-libc.js"(exports2, module2) {
2323
+ "../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js"(exports2, module2) {
2298
2324
  "use strict";
2299
2325
  var childProcess = require("child_process");
2300
2326
  var { isLinux, getReport } = require_process();
2301
- var { LDD_PATH, readFile, readFileSync: readFileSync2 } = require_filesystem();
2327
+ var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync3 } = require_filesystem();
2328
+ var { interpreterPath } = require_elf();
2329
+ var cachedFamilyInterpreter;
2302
2330
  var cachedFamilyFilesystem;
2303
2331
  var cachedVersionFilesystem;
2304
2332
  var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
@@ -2350,7 +2378,18 @@ var require_detect_libc = __commonJS({
2350
2378
  }
2351
2379
  return null;
2352
2380
  };
2381
+ var familyFromInterpreterPath = (path) => {
2382
+ if (path) {
2383
+ if (path.includes("/ld-musl-")) {
2384
+ return MUSL;
2385
+ } else if (path.includes("/ld-linux-")) {
2386
+ return GLIBC;
2387
+ }
2388
+ }
2389
+ return null;
2390
+ };
2353
2391
  var getFamilyFromLddContent = (content) => {
2392
+ content = content.toString();
2354
2393
  if (content.includes("musl")) {
2355
2394
  return MUSL;
2356
2395
  }
@@ -2377,22 +2416,51 @@ var require_detect_libc = __commonJS({
2377
2416
  }
2378
2417
  cachedFamilyFilesystem = null;
2379
2418
  try {
2380
- const lddContent = readFileSync2(LDD_PATH);
2419
+ const lddContent = readFileSync3(LDD_PATH);
2381
2420
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
2382
2421
  } catch (e) {
2383
2422
  }
2384
2423
  return cachedFamilyFilesystem;
2385
2424
  };
2425
+ var familyFromInterpreter = async () => {
2426
+ if (cachedFamilyInterpreter !== void 0) {
2427
+ return cachedFamilyInterpreter;
2428
+ }
2429
+ cachedFamilyInterpreter = null;
2430
+ try {
2431
+ const selfContent = await readFile(SELF_PATH);
2432
+ const path = interpreterPath(selfContent);
2433
+ cachedFamilyInterpreter = familyFromInterpreterPath(path);
2434
+ } catch (e) {
2435
+ }
2436
+ return cachedFamilyInterpreter;
2437
+ };
2438
+ var familyFromInterpreterSync = () => {
2439
+ if (cachedFamilyInterpreter !== void 0) {
2440
+ return cachedFamilyInterpreter;
2441
+ }
2442
+ cachedFamilyInterpreter = null;
2443
+ try {
2444
+ const selfContent = readFileSync3(SELF_PATH);
2445
+ const path = interpreterPath(selfContent);
2446
+ cachedFamilyInterpreter = familyFromInterpreterPath(path);
2447
+ } catch (e) {
2448
+ }
2449
+ return cachedFamilyInterpreter;
2450
+ };
2386
2451
  var family = async () => {
2387
2452
  let family2 = null;
2388
2453
  if (isLinux()) {
2389
- family2 = await familyFromFilesystem();
2454
+ family2 = await familyFromInterpreter();
2390
2455
  if (!family2) {
2391
- family2 = familyFromReport();
2392
- }
2393
- if (!family2) {
2394
- const out = await safeCommand();
2395
- family2 = familyFromCommand(out);
2456
+ family2 = await familyFromFilesystem();
2457
+ if (!family2) {
2458
+ family2 = familyFromReport();
2459
+ }
2460
+ if (!family2) {
2461
+ const out = await safeCommand();
2462
+ family2 = familyFromCommand(out);
2463
+ }
2396
2464
  }
2397
2465
  }
2398
2466
  return family2;
@@ -2400,13 +2468,16 @@ var require_detect_libc = __commonJS({
2400
2468
  var familySync = () => {
2401
2469
  let family2 = null;
2402
2470
  if (isLinux()) {
2403
- family2 = familyFromFilesystemSync();
2471
+ family2 = familyFromInterpreterSync();
2404
2472
  if (!family2) {
2405
- family2 = familyFromReport();
2406
- }
2407
- if (!family2) {
2408
- const out = safeCommandSync();
2409
- family2 = familyFromCommand(out);
2473
+ family2 = familyFromFilesystemSync();
2474
+ if (!family2) {
2475
+ family2 = familyFromReport();
2476
+ }
2477
+ if (!family2) {
2478
+ const out = safeCommandSync();
2479
+ family2 = familyFromCommand(out);
2480
+ }
2410
2481
  }
2411
2482
  }
2412
2483
  return family2;
@@ -2434,7 +2505,7 @@ var require_detect_libc = __commonJS({
2434
2505
  }
2435
2506
  cachedVersionFilesystem = null;
2436
2507
  try {
2437
- const lddContent = readFileSync2(LDD_PATH);
2508
+ const lddContent = readFileSync3(LDD_PATH);
2438
2509
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
2439
2510
  if (versionMatch) {
2440
2511
  cachedVersionFilesystem = versionMatch[1];
@@ -2450,7 +2521,7 @@ var require_detect_libc = __commonJS({
2450
2521
  }
2451
2522
  return null;
2452
2523
  };
2453
- var versionSuffix = (s2) => s2.trim().split(/\s+/)[1];
2524
+ var versionSuffix = (s) => s.trim().split(/\s+/)[1];
2454
2525
  var versionFromCommand = (out) => {
2455
2526
  const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/);
2456
2527
  if (getconf && getconf.includes(GLIBC)) {
@@ -2502,9 +2573,9 @@ var require_detect_libc = __commonJS({
2502
2573
  }
2503
2574
  });
2504
2575
 
2505
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
2576
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
2506
2577
  var require_debug = __commonJS({
2507
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js"(exports2, module2) {
2578
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports2, module2) {
2508
2579
  "use strict";
2509
2580
  var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
2510
2581
  };
@@ -2512,9 +2583,9 @@ var require_debug = __commonJS({
2512
2583
  }
2513
2584
  });
2514
2585
 
2515
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
2586
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
2516
2587
  var require_constants2 = __commonJS({
2517
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js"(exports2, module2) {
2588
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
2518
2589
  "use strict";
2519
2590
  var SEMVER_SPEC_VERSION = "2.0.0";
2520
2591
  var MAX_LENGTH = 256;
@@ -2544,9 +2615,9 @@ var require_constants2 = __commonJS({
2544
2615
  }
2545
2616
  });
2546
2617
 
2547
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
2618
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
2548
2619
  var require_re = __commonJS({
2549
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js"(exports2, module2) {
2620
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports2, module2) {
2550
2621
  "use strict";
2551
2622
  var {
2552
2623
  MAX_SAFE_COMPONENT_LENGTH,
@@ -2632,9 +2703,9 @@ var require_re = __commonJS({
2632
2703
  }
2633
2704
  });
2634
2705
 
2635
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
2706
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
2636
2707
  var require_parse_options = __commonJS({
2637
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js"(exports2, module2) {
2708
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports2, module2) {
2638
2709
  "use strict";
2639
2710
  var looseOption = Object.freeze({ loose: true });
2640
2711
  var emptyOpts = Object.freeze({});
@@ -2651,12 +2722,15 @@ var require_parse_options = __commonJS({
2651
2722
  }
2652
2723
  });
2653
2724
 
2654
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
2725
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
2655
2726
  var require_identifiers = __commonJS({
2656
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js"(exports2, module2) {
2727
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports2, module2) {
2657
2728
  "use strict";
2658
2729
  var numeric = /^[0-9]+$/;
2659
2730
  var compareIdentifiers = (a2, b) => {
2731
+ if (typeof a2 === "number" && typeof b === "number") {
2732
+ return a2 === b ? 0 : a2 < b ? -1 : 1;
2733
+ }
2660
2734
  const anum = numeric.test(a2);
2661
2735
  const bnum = numeric.test(b);
2662
2736
  if (anum && bnum) {
@@ -2673,9 +2747,9 @@ var require_identifiers = __commonJS({
2673
2747
  }
2674
2748
  });
2675
2749
 
2676
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
2750
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
2677
2751
  var require_semver = __commonJS({
2678
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js"(exports2, module2) {
2752
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports2, module2) {
2679
2753
  "use strict";
2680
2754
  var debug = require_debug();
2681
2755
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants2();
@@ -2703,14 +2777,14 @@ var require_semver = __commonJS({
2703
2777
  this.options = options;
2704
2778
  this.loose = !!options.loose;
2705
2779
  this.includePrerelease = !!options.includePrerelease;
2706
- const m2 = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
2707
- if (!m2) {
2780
+ const m3 = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
2781
+ if (!m3) {
2708
2782
  throw new TypeError(`Invalid Version: ${version}`);
2709
2783
  }
2710
2784
  this.raw = version;
2711
- this.major = +m2[1];
2712
- this.minor = +m2[2];
2713
- this.patch = +m2[3];
2785
+ this.major = +m3[1];
2786
+ this.minor = +m3[2];
2787
+ this.patch = +m3[3];
2714
2788
  if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
2715
2789
  throw new TypeError("Invalid major version");
2716
2790
  }
@@ -2720,10 +2794,10 @@ var require_semver = __commonJS({
2720
2794
  if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
2721
2795
  throw new TypeError("Invalid patch version");
2722
2796
  }
2723
- if (!m2[4]) {
2797
+ if (!m3[4]) {
2724
2798
  this.prerelease = [];
2725
2799
  } else {
2726
- this.prerelease = m2[4].split(".").map((id) => {
2800
+ this.prerelease = m3[4].split(".").map((id) => {
2727
2801
  if (/^[0-9]+$/.test(id)) {
2728
2802
  const num = +id;
2729
2803
  if (num >= 0 && num < MAX_SAFE_INTEGER) {
@@ -2733,7 +2807,7 @@ var require_semver = __commonJS({
2733
2807
  return id;
2734
2808
  });
2735
2809
  }
2736
- this.build = m2[5] ? m2[5].split(".") : [];
2810
+ this.build = m3[5] ? m3[5].split(".") : [];
2737
2811
  this.format();
2738
2812
  }
2739
2813
  format() {
@@ -2763,7 +2837,25 @@ var require_semver = __commonJS({
2763
2837
  if (!(other instanceof _SemVer)) {
2764
2838
  other = new _SemVer(other, this.options);
2765
2839
  }
2766
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
2840
+ if (this.major < other.major) {
2841
+ return -1;
2842
+ }
2843
+ if (this.major > other.major) {
2844
+ return 1;
2845
+ }
2846
+ if (this.minor < other.minor) {
2847
+ return -1;
2848
+ }
2849
+ if (this.minor > other.minor) {
2850
+ return 1;
2851
+ }
2852
+ if (this.patch < other.patch) {
2853
+ return -1;
2854
+ }
2855
+ if (this.patch > other.patch) {
2856
+ return 1;
2857
+ }
2858
+ return 0;
2767
2859
  }
2768
2860
  comparePre(other) {
2769
2861
  if (!(other instanceof _SemVer)) {
@@ -2776,11 +2868,11 @@ var require_semver = __commonJS({
2776
2868
  } else if (!this.prerelease.length && !other.prerelease.length) {
2777
2869
  return 0;
2778
2870
  }
2779
- let i2 = 0;
2871
+ let i3 = 0;
2780
2872
  do {
2781
- const a2 = this.prerelease[i2];
2782
- const b = other.prerelease[i2];
2783
- debug("prerelease compare", i2, a2, b);
2873
+ const a2 = this.prerelease[i3];
2874
+ const b = other.prerelease[i3];
2875
+ debug("prerelease compare", i3, a2, b);
2784
2876
  if (a2 === void 0 && b === void 0) {
2785
2877
  return 0;
2786
2878
  } else if (b === void 0) {
@@ -2792,17 +2884,17 @@ var require_semver = __commonJS({
2792
2884
  } else {
2793
2885
  return compareIdentifiers(a2, b);
2794
2886
  }
2795
- } while (++i2);
2887
+ } while (++i3);
2796
2888
  }
2797
2889
  compareBuild(other) {
2798
2890
  if (!(other instanceof _SemVer)) {
2799
2891
  other = new _SemVer(other, this.options);
2800
2892
  }
2801
- let i2 = 0;
2893
+ let i3 = 0;
2802
2894
  do {
2803
- const a2 = this.build[i2];
2804
- const b = other.build[i2];
2805
- debug("build compare", i2, a2, b);
2895
+ const a2 = this.build[i3];
2896
+ const b = other.build[i3];
2897
+ debug("build compare", i3, a2, b);
2806
2898
  if (a2 === void 0 && b === void 0) {
2807
2899
  return 0;
2808
2900
  } else if (b === void 0) {
@@ -2814,7 +2906,7 @@ var require_semver = __commonJS({
2814
2906
  } else {
2815
2907
  return compareIdentifiers(a2, b);
2816
2908
  }
2817
- } while (++i2);
2909
+ } while (++i3);
2818
2910
  }
2819
2911
  // preminor will bump the version up to the next minor release, and immediately
2820
2912
  // down to pre-release. premajor and prepatch work the same way.
@@ -2891,14 +2983,14 @@ var require_semver = __commonJS({
2891
2983
  if (this.prerelease.length === 0) {
2892
2984
  this.prerelease = [base];
2893
2985
  } else {
2894
- let i2 = this.prerelease.length;
2895
- while (--i2 >= 0) {
2896
- if (typeof this.prerelease[i2] === "number") {
2897
- this.prerelease[i2]++;
2898
- i2 = -2;
2986
+ let i3 = this.prerelease.length;
2987
+ while (--i3 >= 0) {
2988
+ if (typeof this.prerelease[i3] === "number") {
2989
+ this.prerelease[i3]++;
2990
+ i3 = -2;
2899
2991
  }
2900
2992
  }
2901
- if (i2 === -1) {
2993
+ if (i3 === -1) {
2902
2994
  if (identifier === this.prerelease.join(".") && identifierBase === false) {
2903
2995
  throw new Error("invalid increment argument: identifier already exists");
2904
2996
  }
@@ -2934,9 +3026,9 @@ var require_semver = __commonJS({
2934
3026
  }
2935
3027
  });
2936
3028
 
2937
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
3029
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
2938
3030
  var require_parse = __commonJS({
2939
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js"(exports2, module2) {
3031
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
2940
3032
  "use strict";
2941
3033
  var SemVer = require_semver();
2942
3034
  var parse = (version, options, throwErrors = false) => {
@@ -2956,9 +3048,9 @@ var require_parse = __commonJS({
2956
3048
  }
2957
3049
  });
2958
3050
 
2959
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
3051
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
2960
3052
  var require_coerce = __commonJS({
2961
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js"(exports2, module2) {
3053
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports2, module2) {
2962
3054
  "use strict";
2963
3055
  var SemVer = require_semver();
2964
3056
  var parse = require_parse();
@@ -3002,9 +3094,9 @@ var require_coerce = __commonJS({
3002
3094
  }
3003
3095
  });
3004
3096
 
3005
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
3097
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
3006
3098
  var require_compare = __commonJS({
3007
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js"(exports2, module2) {
3099
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports2, module2) {
3008
3100
  "use strict";
3009
3101
  var SemVer = require_semver();
3010
3102
  var compare = (a2, b, loose) => new SemVer(a2, loose).compare(new SemVer(b, loose));
@@ -3012,9 +3104,9 @@ var require_compare = __commonJS({
3012
3104
  }
3013
3105
  });
3014
3106
 
3015
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
3107
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
3016
3108
  var require_gte = __commonJS({
3017
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js"(exports2, module2) {
3109
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports2, module2) {
3018
3110
  "use strict";
3019
3111
  var compare = require_compare();
3020
3112
  var gte = (a2, b, loose) => compare(a2, b, loose) >= 0;
@@ -3022,9 +3114,9 @@ var require_gte = __commonJS({
3022
3114
  }
3023
3115
  });
3024
3116
 
3025
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
3117
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
3026
3118
  var require_lrucache = __commonJS({
3027
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js"(exports2, module2) {
3119
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports2, module2) {
3028
3120
  "use strict";
3029
3121
  var LRUCache = class {
3030
3122
  constructor() {
@@ -3060,9 +3152,9 @@ var require_lrucache = __commonJS({
3060
3152
  }
3061
3153
  });
3062
3154
 
3063
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
3155
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
3064
3156
  var require_eq = __commonJS({
3065
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js"(exports2, module2) {
3157
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports2, module2) {
3066
3158
  "use strict";
3067
3159
  var compare = require_compare();
3068
3160
  var eq = (a2, b, loose) => compare(a2, b, loose) === 0;
@@ -3070,9 +3162,9 @@ var require_eq = __commonJS({
3070
3162
  }
3071
3163
  });
3072
3164
 
3073
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
3165
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
3074
3166
  var require_neq = __commonJS({
3075
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js"(exports2, module2) {
3167
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports2, module2) {
3076
3168
  "use strict";
3077
3169
  var compare = require_compare();
3078
3170
  var neq = (a2, b, loose) => compare(a2, b, loose) !== 0;
@@ -3080,9 +3172,9 @@ var require_neq = __commonJS({
3080
3172
  }
3081
3173
  });
3082
3174
 
3083
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
3175
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
3084
3176
  var require_gt = __commonJS({
3085
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js"(exports2, module2) {
3177
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports2, module2) {
3086
3178
  "use strict";
3087
3179
  var compare = require_compare();
3088
3180
  var gt = (a2, b, loose) => compare(a2, b, loose) > 0;
@@ -3090,9 +3182,9 @@ var require_gt = __commonJS({
3090
3182
  }
3091
3183
  });
3092
3184
 
3093
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
3185
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
3094
3186
  var require_lt = __commonJS({
3095
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js"(exports2, module2) {
3187
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports2, module2) {
3096
3188
  "use strict";
3097
3189
  var compare = require_compare();
3098
3190
  var lt = (a2, b, loose) => compare(a2, b, loose) < 0;
@@ -3100,9 +3192,9 @@ var require_lt = __commonJS({
3100
3192
  }
3101
3193
  });
3102
3194
 
3103
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
3195
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
3104
3196
  var require_lte = __commonJS({
3105
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js"(exports2, module2) {
3197
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports2, module2) {
3106
3198
  "use strict";
3107
3199
  var compare = require_compare();
3108
3200
  var lte = (a2, b, loose) => compare(a2, b, loose) <= 0;
@@ -3110,9 +3202,9 @@ var require_lte = __commonJS({
3110
3202
  }
3111
3203
  });
3112
3204
 
3113
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
3205
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
3114
3206
  var require_cmp = __commonJS({
3115
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js"(exports2, module2) {
3207
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports2, module2) {
3116
3208
  "use strict";
3117
3209
  var eq = require_eq();
3118
3210
  var neq = require_neq();
@@ -3160,9 +3252,9 @@ var require_cmp = __commonJS({
3160
3252
  }
3161
3253
  });
3162
3254
 
3163
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
3255
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
3164
3256
  var require_comparator = __commonJS({
3165
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js"(exports2, module2) {
3257
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports2, module2) {
3166
3258
  "use strict";
3167
3259
  var ANY = Symbol("SemVer ANY");
3168
3260
  var Comparator = class _Comparator {
@@ -3192,18 +3284,18 @@ var require_comparator = __commonJS({
3192
3284
  }
3193
3285
  parse(comp) {
3194
3286
  const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
3195
- const m2 = comp.match(r);
3196
- if (!m2) {
3287
+ const m3 = comp.match(r);
3288
+ if (!m3) {
3197
3289
  throw new TypeError(`Invalid comparator: ${comp}`);
3198
3290
  }
3199
- this.operator = m2[1] !== void 0 ? m2[1] : "";
3291
+ this.operator = m3[1] !== void 0 ? m3[1] : "";
3200
3292
  if (this.operator === "=") {
3201
3293
  this.operator = "";
3202
3294
  }
3203
- if (!m2[2]) {
3295
+ if (!m3[2]) {
3204
3296
  this.semver = ANY;
3205
3297
  } else {
3206
- this.semver = new SemVer(m2[2], this.options.loose);
3298
+ this.semver = new SemVer(m3[2], this.options.loose);
3207
3299
  }
3208
3300
  }
3209
3301
  toString() {
@@ -3273,9 +3365,9 @@ var require_comparator = __commonJS({
3273
3365
  }
3274
3366
  });
3275
3367
 
3276
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
3368
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
3277
3369
  var require_range = __commonJS({
3278
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js"(exports2, module2) {
3370
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports2, module2) {
3279
3371
  "use strict";
3280
3372
  var SPACE_CHARACTERS = /\s+/g;
3281
3373
  var Range = class _Range {
@@ -3298,19 +3390,19 @@ var require_range = __commonJS({
3298
3390
  this.loose = !!options.loose;
3299
3391
  this.includePrerelease = !!options.includePrerelease;
3300
3392
  this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
3301
- this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c2) => c2.length);
3393
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c3) => c3.length);
3302
3394
  if (!this.set.length) {
3303
3395
  throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
3304
3396
  }
3305
3397
  if (this.set.length > 1) {
3306
3398
  const first = this.set[0];
3307
- this.set = this.set.filter((c2) => !isNullSet(c2[0]));
3399
+ this.set = this.set.filter((c3) => !isNullSet(c3[0]));
3308
3400
  if (this.set.length === 0) {
3309
3401
  this.set = [first];
3310
3402
  } else if (this.set.length > 1) {
3311
- for (const c2 of this.set) {
3312
- if (c2.length === 1 && isAny(c2[0])) {
3313
- this.set = [c2];
3403
+ for (const c3 of this.set) {
3404
+ if (c3.length === 1 && isAny(c3[0])) {
3405
+ this.set = [c3];
3314
3406
  break;
3315
3407
  }
3316
3408
  }
@@ -3321,11 +3413,11 @@ var require_range = __commonJS({
3321
3413
  get range() {
3322
3414
  if (this.formatted === void 0) {
3323
3415
  this.formatted = "";
3324
- for (let i2 = 0; i2 < this.set.length; i2++) {
3325
- if (i2 > 0) {
3416
+ for (let i3 = 0; i3 < this.set.length; i3++) {
3417
+ if (i3 > 0) {
3326
3418
  this.formatted += "||";
3327
3419
  }
3328
- const comps = this.set[i2];
3420
+ const comps = this.set[i3];
3329
3421
  for (let k = 0; k < comps.length; k++) {
3330
3422
  if (k > 0) {
3331
3423
  this.formatted += " ";
@@ -3408,8 +3500,8 @@ var require_range = __commonJS({
3408
3500
  return false;
3409
3501
  }
3410
3502
  }
3411
- for (let i2 = 0; i2 < this.set.length; i2++) {
3412
- if (testSet(this.set[i2], version, this.options)) {
3503
+ for (let i3 = 0; i3 < this.set.length; i3++) {
3504
+ if (testSet(this.set[i3], version, this.options)) {
3413
3505
  return true;
3414
3506
  }
3415
3507
  }
@@ -3431,8 +3523,8 @@ var require_range = __commonJS({
3431
3523
  caretTrimReplace
3432
3524
  } = require_re();
3433
3525
  var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants2();
3434
- var isNullSet = (c2) => c2.value === "<0.0.0-0";
3435
- var isAny = (c2) => c2.value === "";
3526
+ var isNullSet = (c3) => c3.value === "<0.0.0-0";
3527
+ var isAny = (c3) => c3.value === "";
3436
3528
  var isSatisfiable = (comparators, options) => {
3437
3529
  let result = true;
3438
3530
  const remainingComparators = comparators.slice();
@@ -3446,6 +3538,7 @@ var require_range = __commonJS({
3446
3538
  return result;
3447
3539
  };
3448
3540
  var parseComparator = (comp, options) => {
3541
+ comp = comp.replace(re[t.BUILD], "");
3449
3542
  debug("comp", comp, options);
3450
3543
  comp = replaceCarets(comp, options);
3451
3544
  debug("caret", comp);
@@ -3459,70 +3552,70 @@ var require_range = __commonJS({
3459
3552
  };
3460
3553
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
3461
3554
  var replaceTildes = (comp, options) => {
3462
- return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
3555
+ return comp.trim().split(/\s+/).map((c3) => replaceTilde(c3, options)).join(" ");
3463
3556
  };
3464
3557
  var replaceTilde = (comp, options) => {
3465
3558
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
3466
- return comp.replace(r, (_, M, m2, p2, pr) => {
3467
- debug("tilde", comp, _, M, m2, p2, pr);
3559
+ return comp.replace(r, (_, M, m3, p3, pr) => {
3560
+ debug("tilde", comp, _, M, m3, p3, pr);
3468
3561
  let ret;
3469
3562
  if (isX(M)) {
3470
3563
  ret = "";
3471
- } else if (isX(m2)) {
3564
+ } else if (isX(m3)) {
3472
3565
  ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
3473
- } else if (isX(p2)) {
3474
- ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
3566
+ } else if (isX(p3)) {
3567
+ ret = `>=${M}.${m3}.0 <${M}.${+m3 + 1}.0-0`;
3475
3568
  } else if (pr) {
3476
3569
  debug("replaceTilde pr", pr);
3477
- ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
3570
+ ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${+m3 + 1}.0-0`;
3478
3571
  } else {
3479
- ret = `>=${M}.${m2}.${p2} <${M}.${+m2 + 1}.0-0`;
3572
+ ret = `>=${M}.${m3}.${p3} <${M}.${+m3 + 1}.0-0`;
3480
3573
  }
3481
3574
  debug("tilde return", ret);
3482
3575
  return ret;
3483
3576
  });
3484
3577
  };
3485
3578
  var replaceCarets = (comp, options) => {
3486
- return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
3579
+ return comp.trim().split(/\s+/).map((c3) => replaceCaret(c3, options)).join(" ");
3487
3580
  };
3488
3581
  var replaceCaret = (comp, options) => {
3489
3582
  debug("caret", comp, options);
3490
3583
  const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
3491
3584
  const z = options.includePrerelease ? "-0" : "";
3492
- return comp.replace(r, (_, M, m2, p2, pr) => {
3493
- debug("caret", comp, _, M, m2, p2, pr);
3585
+ return comp.replace(r, (_, M, m3, p3, pr) => {
3586
+ debug("caret", comp, _, M, m3, p3, pr);
3494
3587
  let ret;
3495
3588
  if (isX(M)) {
3496
3589
  ret = "";
3497
- } else if (isX(m2)) {
3590
+ } else if (isX(m3)) {
3498
3591
  ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
3499
- } else if (isX(p2)) {
3592
+ } else if (isX(p3)) {
3500
3593
  if (M === "0") {
3501
- ret = `>=${M}.${m2}.0${z} <${M}.${+m2 + 1}.0-0`;
3594
+ ret = `>=${M}.${m3}.0${z} <${M}.${+m3 + 1}.0-0`;
3502
3595
  } else {
3503
- ret = `>=${M}.${m2}.0${z} <${+M + 1}.0.0-0`;
3596
+ ret = `>=${M}.${m3}.0${z} <${+M + 1}.0.0-0`;
3504
3597
  }
3505
3598
  } else if (pr) {
3506
3599
  debug("replaceCaret pr", pr);
3507
3600
  if (M === "0") {
3508
- if (m2 === "0") {
3509
- ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${m2}.${+p2 + 1}-0`;
3601
+ if (m3 === "0") {
3602
+ ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${m3}.${+p3 + 1}-0`;
3510
3603
  } else {
3511
- ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
3604
+ ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${+m3 + 1}.0-0`;
3512
3605
  }
3513
3606
  } else {
3514
- ret = `>=${M}.${m2}.${p2}-${pr} <${+M + 1}.0.0-0`;
3607
+ ret = `>=${M}.${m3}.${p3}-${pr} <${+M + 1}.0.0-0`;
3515
3608
  }
3516
3609
  } else {
3517
3610
  debug("no pr");
3518
3611
  if (M === "0") {
3519
- if (m2 === "0") {
3520
- ret = `>=${M}.${m2}.${p2}${z} <${M}.${m2}.${+p2 + 1}-0`;
3612
+ if (m3 === "0") {
3613
+ ret = `>=${M}.${m3}.${p3}${z} <${M}.${m3}.${+p3 + 1}-0`;
3521
3614
  } else {
3522
- ret = `>=${M}.${m2}.${p2}${z} <${M}.${+m2 + 1}.0-0`;
3615
+ ret = `>=${M}.${m3}.${p3}${z} <${M}.${+m3 + 1}.0-0`;
3523
3616
  }
3524
3617
  } else {
3525
- ret = `>=${M}.${m2}.${p2} <${+M + 1}.0.0-0`;
3618
+ ret = `>=${M}.${m3}.${p3} <${+M + 1}.0.0-0`;
3526
3619
  }
3527
3620
  }
3528
3621
  debug("caret return", ret);
@@ -3531,16 +3624,16 @@ var require_range = __commonJS({
3531
3624
  };
3532
3625
  var replaceXRanges = (comp, options) => {
3533
3626
  debug("replaceXRanges", comp, options);
3534
- return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
3627
+ return comp.split(/\s+/).map((c3) => replaceXRange(c3, options)).join(" ");
3535
3628
  };
3536
3629
  var replaceXRange = (comp, options) => {
3537
3630
  comp = comp.trim();
3538
3631
  const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
3539
- return comp.replace(r, (ret, gtlt, M, m2, p2, pr) => {
3540
- debug("xRange", comp, ret, gtlt, M, m2, p2, pr);
3632
+ return comp.replace(r, (ret, gtlt, M, m3, p3, pr) => {
3633
+ debug("xRange", comp, ret, gtlt, M, m3, p3, pr);
3541
3634
  const xM = isX(M);
3542
- const xm = xM || isX(m2);
3543
- const xp = xm || isX(p2);
3635
+ const xm = xM || isX(m3);
3636
+ const xp = xm || isX(p3);
3544
3637
  const anyX = xp;
3545
3638
  if (gtlt === "=" && anyX) {
3546
3639
  gtlt = "";
@@ -3554,35 +3647,35 @@ var require_range = __commonJS({
3554
3647
  }
3555
3648
  } else if (gtlt && anyX) {
3556
3649
  if (xm) {
3557
- m2 = 0;
3650
+ m3 = 0;
3558
3651
  }
3559
- p2 = 0;
3652
+ p3 = 0;
3560
3653
  if (gtlt === ">") {
3561
3654
  gtlt = ">=";
3562
3655
  if (xm) {
3563
3656
  M = +M + 1;
3564
- m2 = 0;
3565
- p2 = 0;
3657
+ m3 = 0;
3658
+ p3 = 0;
3566
3659
  } else {
3567
- m2 = +m2 + 1;
3568
- p2 = 0;
3660
+ m3 = +m3 + 1;
3661
+ p3 = 0;
3569
3662
  }
3570
3663
  } else if (gtlt === "<=") {
3571
3664
  gtlt = "<";
3572
3665
  if (xm) {
3573
3666
  M = +M + 1;
3574
3667
  } else {
3575
- m2 = +m2 + 1;
3668
+ m3 = +m3 + 1;
3576
3669
  }
3577
3670
  }
3578
3671
  if (gtlt === "<") {
3579
3672
  pr = "-0";
3580
3673
  }
3581
- ret = `${gtlt + M}.${m2}.${p2}${pr}`;
3674
+ ret = `${gtlt + M}.${m3}.${p3}${pr}`;
3582
3675
  } else if (xm) {
3583
3676
  ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
3584
3677
  } else if (xp) {
3585
- ret = `>=${M}.${m2}.0${pr} <${M}.${+m2 + 1}.0-0`;
3678
+ ret = `>=${M}.${m3}.0${pr} <${M}.${+m3 + 1}.0-0`;
3586
3679
  }
3587
3680
  debug("xRange return", ret);
3588
3681
  return ret;
@@ -3624,19 +3717,19 @@ var require_range = __commonJS({
3624
3717
  return `${from} ${to}`.trim();
3625
3718
  };
3626
3719
  var testSet = (set, version, options) => {
3627
- for (let i2 = 0; i2 < set.length; i2++) {
3628
- if (!set[i2].test(version)) {
3720
+ for (let i3 = 0; i3 < set.length; i3++) {
3721
+ if (!set[i3].test(version)) {
3629
3722
  return false;
3630
3723
  }
3631
3724
  }
3632
3725
  if (version.prerelease.length && !options.includePrerelease) {
3633
- for (let i2 = 0; i2 < set.length; i2++) {
3634
- debug(set[i2].semver);
3635
- if (set[i2].semver === Comparator.ANY) {
3726
+ for (let i3 = 0; i3 < set.length; i3++) {
3727
+ debug(set[i3].semver);
3728
+ if (set[i3].semver === Comparator.ANY) {
3636
3729
  continue;
3637
3730
  }
3638
- if (set[i2].semver.prerelease.length > 0) {
3639
- const allowed = set[i2].semver;
3731
+ if (set[i3].semver.prerelease.length > 0) {
3732
+ const allowed = set[i3].semver;
3640
3733
  if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
3641
3734
  return true;
3642
3735
  }
@@ -3649,9 +3742,9 @@ var require_range = __commonJS({
3649
3742
  }
3650
3743
  });
3651
3744
 
3652
- // ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
3745
+ // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
3653
3746
  var require_satisfies = __commonJS({
3654
- "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js"(exports2, module2) {
3747
+ "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports2, module2) {
3655
3748
  "use strict";
3656
3749
  var Range = require_range();
3657
3750
  var satisfies = (version, range, options) => {
@@ -3666,13 +3759,13 @@ var require_satisfies = __commonJS({
3666
3759
  }
3667
3760
  });
3668
3761
 
3669
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/package.json
3762
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/package.json
3670
3763
  var require_package = __commonJS({
3671
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/package.json"(exports2, module2) {
3764
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/package.json"(exports2, module2) {
3672
3765
  module2.exports = {
3673
3766
  name: "sharp",
3674
3767
  description: "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
3675
- version: "0.34.3",
3768
+ version: "0.34.5",
3676
3769
  author: "Lovell Fuller <npm@lovell.info>",
3677
3770
  homepage: "https://sharp.pixelplumbing.com",
3678
3771
  contributors: [
@@ -3763,15 +3856,18 @@ var require_package = __commonJS({
3763
3856
  "Don Denton <don@happycollision.com>"
3764
3857
  ],
3765
3858
  scripts: {
3766
- install: "node install/check.js",
3859
+ build: "node install/build.js",
3860
+ install: "node install/check.js || npm run build",
3767
3861
  clean: "rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",
3768
- test: "npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types",
3769
- "test-lint": "semistandard && cpplint",
3770
- "test-unit": "nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha",
3771
- "test-licensing": 'license-checker --production --summary --onlyAllow="Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT"',
3862
+ test: "npm run lint && npm run test-unit",
3863
+ lint: "npm run lint-cpp && npm run lint-js && npm run lint-types",
3864
+ "lint-cpp": "cpplint --quiet src/*.h src/*.cc",
3865
+ "lint-js": "biome lint",
3866
+ "lint-types": "tsd --files ./test/types/sharp.test-d.ts",
3772
3867
  "test-leak": "./test/leak/leak.sh",
3773
- "test-types": "tsd",
3868
+ "test-unit": "node --experimental-test-coverage test/unit.mjs",
3774
3869
  "package-from-local-build": "node npm/from-local-build.js",
3870
+ "package-release-notes": "node npm/release-notes.js",
3775
3871
  "docs-build": "node docs/build.mjs",
3776
3872
  "docs-serve": "cd docs && npm start",
3777
3873
  "docs-publish": "cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"
@@ -3807,93 +3903,73 @@ var require_package = __commonJS({
3807
3903
  "vips"
3808
3904
  ],
3809
3905
  dependencies: {
3810
- color: "^4.2.3",
3811
- "detect-libc": "^2.0.4",
3812
- semver: "^7.7.2"
3906
+ "@img/colour": "^1.0.0",
3907
+ "detect-libc": "^2.1.2",
3908
+ semver: "^7.7.3"
3813
3909
  },
3814
3910
  optionalDependencies: {
3815
- "@img/sharp-darwin-arm64": "0.34.3",
3816
- "@img/sharp-darwin-x64": "0.34.3",
3817
- "@img/sharp-libvips-darwin-arm64": "1.2.0",
3818
- "@img/sharp-libvips-darwin-x64": "1.2.0",
3819
- "@img/sharp-libvips-linux-arm": "1.2.0",
3820
- "@img/sharp-libvips-linux-arm64": "1.2.0",
3821
- "@img/sharp-libvips-linux-ppc64": "1.2.0",
3822
- "@img/sharp-libvips-linux-s390x": "1.2.0",
3823
- "@img/sharp-libvips-linux-x64": "1.2.0",
3824
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.0",
3825
- "@img/sharp-libvips-linuxmusl-x64": "1.2.0",
3826
- "@img/sharp-linux-arm": "0.34.3",
3827
- "@img/sharp-linux-arm64": "0.34.3",
3828
- "@img/sharp-linux-ppc64": "0.34.3",
3829
- "@img/sharp-linux-s390x": "0.34.3",
3830
- "@img/sharp-linux-x64": "0.34.3",
3831
- "@img/sharp-linuxmusl-arm64": "0.34.3",
3832
- "@img/sharp-linuxmusl-x64": "0.34.3",
3833
- "@img/sharp-wasm32": "0.34.3",
3834
- "@img/sharp-win32-arm64": "0.34.3",
3835
- "@img/sharp-win32-ia32": "0.34.3",
3836
- "@img/sharp-win32-x64": "0.34.3"
3911
+ "@img/sharp-darwin-arm64": "0.34.5",
3912
+ "@img/sharp-darwin-x64": "0.34.5",
3913
+ "@img/sharp-libvips-darwin-arm64": "1.2.4",
3914
+ "@img/sharp-libvips-darwin-x64": "1.2.4",
3915
+ "@img/sharp-libvips-linux-arm": "1.2.4",
3916
+ "@img/sharp-libvips-linux-arm64": "1.2.4",
3917
+ "@img/sharp-libvips-linux-ppc64": "1.2.4",
3918
+ "@img/sharp-libvips-linux-riscv64": "1.2.4",
3919
+ "@img/sharp-libvips-linux-s390x": "1.2.4",
3920
+ "@img/sharp-libvips-linux-x64": "1.2.4",
3921
+ "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
3922
+ "@img/sharp-libvips-linuxmusl-x64": "1.2.4",
3923
+ "@img/sharp-linux-arm": "0.34.5",
3924
+ "@img/sharp-linux-arm64": "0.34.5",
3925
+ "@img/sharp-linux-ppc64": "0.34.5",
3926
+ "@img/sharp-linux-riscv64": "0.34.5",
3927
+ "@img/sharp-linux-s390x": "0.34.5",
3928
+ "@img/sharp-linux-x64": "0.34.5",
3929
+ "@img/sharp-linuxmusl-arm64": "0.34.5",
3930
+ "@img/sharp-linuxmusl-x64": "0.34.5",
3931
+ "@img/sharp-wasm32": "0.34.5",
3932
+ "@img/sharp-win32-arm64": "0.34.5",
3933
+ "@img/sharp-win32-ia32": "0.34.5",
3934
+ "@img/sharp-win32-x64": "0.34.5"
3837
3935
  },
3838
3936
  devDependencies: {
3839
- "@emnapi/runtime": "^1.4.4",
3840
- "@img/sharp-libvips-dev": "1.2.0",
3841
- "@img/sharp-libvips-dev-wasm32": "1.2.0",
3842
- "@img/sharp-libvips-win32-arm64": "1.2.0",
3843
- "@img/sharp-libvips-win32-ia32": "1.2.0",
3844
- "@img/sharp-libvips-win32-x64": "1.2.0",
3937
+ "@biomejs/biome": "^2.3.4",
3938
+ "@cpplint/cli": "^0.1.0",
3939
+ "@emnapi/runtime": "^1.7.0",
3940
+ "@img/sharp-libvips-dev": "1.2.4",
3941
+ "@img/sharp-libvips-dev-wasm32": "1.2.4",
3942
+ "@img/sharp-libvips-win32-arm64": "1.2.4",
3943
+ "@img/sharp-libvips-win32-ia32": "1.2.4",
3944
+ "@img/sharp-libvips-win32-x64": "1.2.4",
3845
3945
  "@types/node": "*",
3846
- cc: "^3.0.1",
3847
- emnapi: "^1.4.4",
3946
+ emnapi: "^1.7.0",
3848
3947
  "exif-reader": "^2.0.2",
3849
3948
  "extract-zip": "^2.0.1",
3850
3949
  icc: "^3.0.0",
3851
- "jsdoc-to-markdown": "^9.1.1",
3852
- "license-checker": "^25.0.1",
3853
- mocha: "^11.7.1",
3854
- "node-addon-api": "^8.4.0",
3855
- "node-gyp": "^11.2.0",
3856
- nyc: "^17.1.0",
3857
- semistandard: "^17.0.0",
3858
- "tar-fs": "^3.1.0",
3859
- tsd: "^0.32.0"
3950
+ "jsdoc-to-markdown": "^9.1.3",
3951
+ "node-addon-api": "^8.5.0",
3952
+ "node-gyp": "^11.5.0",
3953
+ "tar-fs": "^3.1.1",
3954
+ tsd: "^0.33.0"
3860
3955
  },
3861
3956
  license: "Apache-2.0",
3862
3957
  engines: {
3863
3958
  node: "^18.17.0 || ^20.3.0 || >=21.0.0"
3864
3959
  },
3865
3960
  config: {
3866
- libvips: ">=8.17.1"
3961
+ libvips: ">=8.17.3"
3867
3962
  },
3868
3963
  funding: {
3869
3964
  url: "https://opencollective.com/libvips"
3870
- },
3871
- semistandard: {
3872
- env: [
3873
- "mocha"
3874
- ]
3875
- },
3876
- cc: {
3877
- linelength: "120",
3878
- filter: [
3879
- "build/include"
3880
- ]
3881
- },
3882
- nyc: {
3883
- include: [
3884
- "lib"
3885
- ]
3886
- },
3887
- tsd: {
3888
- directory: "test/types/"
3889
3965
  }
3890
3966
  };
3891
3967
  }
3892
3968
  });
3893
3969
 
3894
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/libvips.js
3970
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/libvips.js
3895
3971
  var require_libvips = __commonJS({
3896
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/libvips.js"(exports2, module2) {
3972
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/libvips.js"(exports2, module2) {
3897
3973
  "use strict";
3898
3974
  var { spawnSync } = require("child_process");
3899
3975
  var { createHash } = require("crypto");
@@ -3902,8 +3978,7 @@ var require_libvips = __commonJS({
3902
3978
  var semverSatisfies = require_satisfies();
3903
3979
  var detectLibc = require_detect_libc();
3904
3980
  var { config, engines, optionalDependencies } = require_package();
3905
- var minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || /* istanbul ignore next */
3906
- config.libvips;
3981
+ var minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || config.libvips;
3907
3982
  var minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version;
3908
3983
  var prebuiltPlatforms = [
3909
3984
  "darwin-arm64",
@@ -3911,6 +3986,7 @@ var require_libvips = __commonJS({
3911
3986
  "linux-arm",
3912
3987
  "linux-arm64",
3913
3988
  "linux-ppc64",
3989
+ "linux-riscv64",
3914
3990
  "linux-s390x",
3915
3991
  "linux-x64",
3916
3992
  "linuxmusl-arm64",
@@ -3978,7 +4054,7 @@ var require_libvips = __commonJS({
3978
4054
  };
3979
4055
  var isEmscripten = () => {
3980
4056
  const { CC } = process.env;
3981
- return Boolean(CC && CC.endsWith("/emcc"));
4057
+ return Boolean(CC?.endsWith("/emcc"));
3982
4058
  };
3983
4059
  var isRosetta = () => {
3984
4060
  if (process.platform === "darwin" && process.arch === "x64") {
@@ -3987,7 +4063,7 @@ var require_libvips = __commonJS({
3987
4063
  }
3988
4064
  return false;
3989
4065
  };
3990
- var sha512 = (s2) => createHash("sha512").update(s2).digest("hex");
4066
+ var sha512 = (s) => createHash("sha512").update(s).digest("hex");
3991
4067
  var yarnLocator = () => {
3992
4068
  try {
3993
4069
  const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
@@ -4052,8 +4128,7 @@ var require_libvips = __commonJS({
4052
4128
  return skipSearch(false, "Rosetta", logger);
4053
4129
  }
4054
4130
  const globalVipsVersion = globalLibvipsVersion();
4055
- return !!globalVipsVersion && /* istanbul ignore next */
4056
- semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
4131
+ return !!globalVipsVersion && semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
4057
4132
  };
4058
4133
  module2.exports = {
4059
4134
  minimumLibvipsVersion,
@@ -4074,9 +4149,9 @@ var require_libvips = __commonJS({
4074
4149
  }
4075
4150
  });
4076
4151
 
4077
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/sharp.js
4152
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/sharp.js
4078
4153
  var require_sharp = __commonJS({
4079
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/sharp.js"(exports2, module2) {
4154
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/sharp.js"(exports2, module2) {
4080
4155
  "use strict";
4081
4156
  var { familySync, versionSync } = require_detect_libc();
4082
4157
  var { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = require_libvips();
@@ -4152,7 +4227,7 @@ var require_sharp = __commonJS({
4152
4227
  ` Found ${libcFound}`,
4153
4228
  ` Requires ${libcRequires}`
4154
4229
  );
4155
- } catch (errEngines) {
4230
+ } catch (_errEngines) {
4156
4231
  }
4157
4232
  }
4158
4233
  if (isLinux && /\/snap\/core[0-9]{2}/.test(messages)) {
@@ -4187,15 +4262,18 @@ var require_sharp = __commonJS({
4187
4262
  }
4188
4263
  });
4189
4264
 
4190
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/constructor.js
4265
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/constructor.js
4191
4266
  var require_constructor = __commonJS({
4192
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/constructor.js"(exports2, module2) {
4267
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/constructor.js"(exports2, module2) {
4193
4268
  "use strict";
4194
4269
  var util = require("util");
4195
4270
  var stream = require("stream");
4196
4271
  var is = require_is();
4197
4272
  require_sharp();
4198
4273
  var debuglog = util.debuglog("sharp");
4274
+ var queueListener = (queueLength) => {
4275
+ Sharp.queue.emit("change", queueLength);
4276
+ };
4199
4277
  var Sharp = function(input, options) {
4200
4278
  if (arguments.length === 1 && !is.defined(input)) {
4201
4279
  throw new Error("Invalid input");
@@ -4222,7 +4300,8 @@ var require_constructor = __commonJS({
4222
4300
  angle: 0,
4223
4301
  rotationAngle: 0,
4224
4302
  rotationBackground: [0, 0, 0, 255],
4225
- rotateBeforePreExtract: false,
4303
+ rotateBefore: false,
4304
+ orientBefore: false,
4226
4305
  flip: false,
4227
4306
  flop: false,
4228
4307
  extendTop: 0,
@@ -4344,6 +4423,7 @@ var require_constructor = __commonJS({
4344
4423
  gifProgressive: false,
4345
4424
  tiffQuality: 80,
4346
4425
  tiffCompression: "jpeg",
4426
+ tiffBigtiff: false,
4347
4427
  tiffPredictor: "horizontal",
4348
4428
  tiffPyramid: false,
4349
4429
  tiffMiniswhite: false,
@@ -4387,9 +4467,7 @@ var require_constructor = __commonJS({
4387
4467
  debuglog(warning);
4388
4468
  },
4389
4469
  // Function to notify of queue length changes
4390
- queueListener: function(queueLength) {
4391
- Sharp.queue.emit("change", queueLength);
4392
- }
4470
+ queueListener
4393
4471
  };
4394
4472
  this.options.input = this._createInputDescriptor(input, options, { allowStream: true });
4395
4473
  return this;
@@ -4398,10 +4476,10 @@ var require_constructor = __commonJS({
4398
4476
  Object.setPrototypeOf(Sharp, stream.Duplex);
4399
4477
  function clone() {
4400
4478
  const clone2 = this.constructor.call();
4401
- const { debuglog: debuglog2, queueListener, ...options } = this.options;
4479
+ const { debuglog: debuglog2, queueListener: queueListener2, ...options } = this.options;
4402
4480
  clone2.options = structuredClone(options);
4403
4481
  clone2.options.debuglog = debuglog2;
4404
- clone2.options.queueListener = queueListener;
4482
+ clone2.options.queueListener = queueListener2;
4405
4483
  if (this._isStreamInput()) {
4406
4484
  this.on("finish", () => {
4407
4485
  this._flattenBufferIn();
@@ -4416,9 +4494,9 @@ var require_constructor = __commonJS({
4416
4494
  }
4417
4495
  });
4418
4496
 
4419
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/input.js
4497
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/input.js
4420
4498
  var require_input = __commonJS({
4421
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/input.js"(exports2, module2) {
4499
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/input.js"(exports2, module2) {
4422
4500
  "use strict";
4423
4501
  var is = require_is();
4424
4502
  var sharp = require_sharp();
@@ -4459,14 +4537,14 @@ var require_input = __commonJS({
4459
4537
  "tiffSubifd"
4460
4538
  ];
4461
4539
  function _inputOptionsFromObject(obj) {
4462
- const params = inputStreamParameters.filter((p2) => is.defined(obj[p2])).map((p2) => [p2, obj[p2]]);
4540
+ const params = inputStreamParameters.filter((p3) => is.defined(obj[p3])).map((p3) => [p3, obj[p3]]);
4463
4541
  return params.length ? Object.fromEntries(params) : void 0;
4464
4542
  }
4465
4543
  function _createInputDescriptor(input, inputOptions, containerOptions) {
4466
4544
  const inputDescriptor = {
4467
4545
  autoOrient: false,
4468
4546
  failOn: "warning",
4469
- limitInputPixels: Math.pow(16383, 2),
4547
+ limitInputPixels: 16383 ** 2,
4470
4548
  ignoreIcc: false,
4471
4549
  unlimited: false,
4472
4550
  sequentialRead: true
@@ -4499,7 +4577,7 @@ var require_input = __commonJS({
4499
4577
  if (input.length > 1) {
4500
4578
  if (!this.options.joining) {
4501
4579
  this.options.joining = true;
4502
- this.options.join = input.map((i2) => this._createInputDescriptor(i2));
4580
+ this.options.join = input.map((i3) => this._createInputDescriptor(i3));
4503
4581
  } else {
4504
4582
  throw new Error("Recursive join is unsupported");
4505
4583
  }
@@ -4547,7 +4625,7 @@ var require_input = __commonJS({
4547
4625
  }
4548
4626
  if (is.defined(inputOptions.limitInputPixels)) {
4549
4627
  if (is.bool(inputOptions.limitInputPixels)) {
4550
- inputDescriptor.limitInputPixels = inputOptions.limitInputPixels ? Math.pow(16383, 2) : 0;
4628
+ inputDescriptor.limitInputPixels = inputOptions.limitInputPixels ? 16383 ** 2 : 0;
4551
4629
  } else if (is.integer(inputOptions.limitInputPixels) && is.inRange(inputOptions.limitInputPixels, 0, Number.MAX_SAFE_INTEGER)) {
4552
4630
  inputDescriptor.limitInputPixels = inputOptions.limitInputPixels;
4553
4631
  } else {
@@ -4883,11 +4961,11 @@ var require_input = __commonJS({
4883
4961
  }
4884
4962
  }
4885
4963
  } else if (is.defined(inputOptions)) {
4886
- throw new Error("Invalid input options " + inputOptions);
4964
+ throw new Error(`Invalid input options ${inputOptions}`);
4887
4965
  }
4888
4966
  return inputDescriptor;
4889
4967
  }
4890
- function _write(chunk, encoding, callback) {
4968
+ function _write(chunk, _encoding, callback) {
4891
4969
  if (Array.isArray(this.options.input.buffer)) {
4892
4970
  if (is.buffer(chunk)) {
4893
4971
  if (this.options.input.buffer.length === 0) {
@@ -5019,7 +5097,7 @@ var require_input = __commonJS({
5019
5097
  }
5020
5098
  }
5021
5099
  }
5022
- module2.exports = function(Sharp) {
5100
+ module2.exports = (Sharp) => {
5023
5101
  Object.assign(Sharp.prototype, {
5024
5102
  // Private
5025
5103
  _inputOptionsFromObject,
@@ -5036,9 +5114,9 @@ var require_input = __commonJS({
5036
5114
  }
5037
5115
  });
5038
5116
 
5039
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/resize.js
5117
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/resize.js
5040
5118
  var require_resize = __commonJS({
5041
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/resize.js"(exports2, module2) {
5119
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/resize.js"(exports2, module2) {
5042
5120
  "use strict";
5043
5121
  var is = require_is();
5044
5122
  var gravity = {
@@ -5098,7 +5176,7 @@ var require_resize = __commonJS({
5098
5176
  outside: "min"
5099
5177
  };
5100
5178
  function isRotationExpected(options) {
5101
- return options.angle % 360 !== 0 || options.input.autoOrient === true || options.rotationAngle !== 0;
5179
+ return options.angle % 360 !== 0 || options.rotationAngle !== 0;
5102
5180
  }
5103
5181
  function isResizeExpected(options) {
5104
5182
  return options.width !== -1 || options.height !== -1;
@@ -5180,7 +5258,7 @@ var require_resize = __commonJS({
5180
5258
  }
5181
5259
  }
5182
5260
  if (isRotationExpected(this.options) && isResizeExpected(this.options)) {
5183
- this.options.rotateBeforePreExtract = true;
5261
+ this.options.rotateBefore = true;
5184
5262
  }
5185
5263
  return this;
5186
5264
  }
@@ -5247,9 +5325,12 @@ var require_resize = __commonJS({
5247
5325
  }, this);
5248
5326
  if (isRotationExpected(this.options) && !isResizeExpected(this.options)) {
5249
5327
  if (this.options.widthPre === -1 || this.options.widthPost === -1) {
5250
- this.options.rotateBeforePreExtract = true;
5328
+ this.options.rotateBefore = true;
5251
5329
  }
5252
5330
  }
5331
+ if (this.options.input.autoOrient) {
5332
+ this.options.orientBefore = true;
5333
+ }
5253
5334
  return this;
5254
5335
  }
5255
5336
  function trim(options) {
@@ -5274,11 +5355,11 @@ var require_resize = __commonJS({
5274
5355
  }
5275
5356
  }
5276
5357
  if (isRotationExpected(this.options)) {
5277
- this.options.rotateBeforePreExtract = true;
5358
+ this.options.rotateBefore = true;
5278
5359
  }
5279
5360
  return this;
5280
5361
  }
5281
- module2.exports = function(Sharp) {
5362
+ module2.exports = (Sharp) => {
5282
5363
  Object.assign(Sharp.prototype, {
5283
5364
  resize,
5284
5365
  extend,
@@ -5294,9 +5375,9 @@ var require_resize = __commonJS({
5294
5375
  }
5295
5376
  });
5296
5377
 
5297
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/composite.js
5378
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/composite.js
5298
5379
  var require_composite = __commonJS({
5299
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/composite.js"(exports2, module2) {
5380
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/composite.js"(exports2, module2) {
5300
5381
  "use strict";
5301
5382
  var is = require_is();
5302
5383
  var blend = {
@@ -5400,16 +5481,16 @@ var require_composite = __commonJS({
5400
5481
  });
5401
5482
  return this;
5402
5483
  }
5403
- module2.exports = function(Sharp) {
5484
+ module2.exports = (Sharp) => {
5404
5485
  Sharp.prototype.composite = composite;
5405
5486
  Sharp.blend = blend;
5406
5487
  };
5407
5488
  }
5408
5489
  });
5409
5490
 
5410
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/operation.js
5491
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/operation.js
5411
5492
  var require_operation = __commonJS({
5412
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/operation.js"(exports2, module2) {
5493
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/operation.js"(exports2, module2) {
5413
5494
  "use strict";
5414
5495
  var is = require_is();
5415
5496
  var vipsPrecision = {
@@ -5731,9 +5812,7 @@ var require_operation = __commonJS({
5731
5812
  throw new Error("Invalid convolution kernel");
5732
5813
  }
5733
5814
  if (!is.integer(kernel.scale)) {
5734
- kernel.scale = kernel.kernel.reduce(function(a2, b) {
5735
- return a2 + b;
5736
- }, 0);
5815
+ kernel.scale = kernel.kernel.reduce((a2, b) => a2 + b, 0);
5737
5816
  }
5738
5817
  if (kernel.scale < 1) {
5739
5818
  kernel.scale = 1;
@@ -5847,7 +5926,7 @@ var require_operation = __commonJS({
5847
5926
  }
5848
5927
  return this;
5849
5928
  }
5850
- module2.exports = function(Sharp) {
5929
+ module2.exports = (Sharp) => {
5851
5930
  Object.assign(Sharp.prototype, {
5852
5931
  autoOrient,
5853
5932
  rotate,
@@ -5877,313 +5956,279 @@ var require_operation = __commonJS({
5877
5956
  }
5878
5957
  });
5879
5958
 
5880
- // ../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
5881
- var require_color_name = __commonJS({
5882
- "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) {
5883
- "use strict";
5884
- module2.exports = {
5885
- "aliceblue": [240, 248, 255],
5886
- "antiquewhite": [250, 235, 215],
5887
- "aqua": [0, 255, 255],
5888
- "aquamarine": [127, 255, 212],
5889
- "azure": [240, 255, 255],
5890
- "beige": [245, 245, 220],
5891
- "bisque": [255, 228, 196],
5892
- "black": [0, 0, 0],
5893
- "blanchedalmond": [255, 235, 205],
5894
- "blue": [0, 0, 255],
5895
- "blueviolet": [138, 43, 226],
5896
- "brown": [165, 42, 42],
5897
- "burlywood": [222, 184, 135],
5898
- "cadetblue": [95, 158, 160],
5899
- "chartreuse": [127, 255, 0],
5900
- "chocolate": [210, 105, 30],
5901
- "coral": [255, 127, 80],
5902
- "cornflowerblue": [100, 149, 237],
5903
- "cornsilk": [255, 248, 220],
5904
- "crimson": [220, 20, 60],
5905
- "cyan": [0, 255, 255],
5906
- "darkblue": [0, 0, 139],
5907
- "darkcyan": [0, 139, 139],
5908
- "darkgoldenrod": [184, 134, 11],
5909
- "darkgray": [169, 169, 169],
5910
- "darkgreen": [0, 100, 0],
5911
- "darkgrey": [169, 169, 169],
5912
- "darkkhaki": [189, 183, 107],
5913
- "darkmagenta": [139, 0, 139],
5914
- "darkolivegreen": [85, 107, 47],
5915
- "darkorange": [255, 140, 0],
5916
- "darkorchid": [153, 50, 204],
5917
- "darkred": [139, 0, 0],
5918
- "darksalmon": [233, 150, 122],
5919
- "darkseagreen": [143, 188, 143],
5920
- "darkslateblue": [72, 61, 139],
5921
- "darkslategray": [47, 79, 79],
5922
- "darkslategrey": [47, 79, 79],
5923
- "darkturquoise": [0, 206, 209],
5924
- "darkviolet": [148, 0, 211],
5925
- "deeppink": [255, 20, 147],
5926
- "deepskyblue": [0, 191, 255],
5927
- "dimgray": [105, 105, 105],
5928
- "dimgrey": [105, 105, 105],
5929
- "dodgerblue": [30, 144, 255],
5930
- "firebrick": [178, 34, 34],
5931
- "floralwhite": [255, 250, 240],
5932
- "forestgreen": [34, 139, 34],
5933
- "fuchsia": [255, 0, 255],
5934
- "gainsboro": [220, 220, 220],
5935
- "ghostwhite": [248, 248, 255],
5936
- "gold": [255, 215, 0],
5937
- "goldenrod": [218, 165, 32],
5938
- "gray": [128, 128, 128],
5939
- "green": [0, 128, 0],
5940
- "greenyellow": [173, 255, 47],
5941
- "grey": [128, 128, 128],
5942
- "honeydew": [240, 255, 240],
5943
- "hotpink": [255, 105, 180],
5944
- "indianred": [205, 92, 92],
5945
- "indigo": [75, 0, 130],
5946
- "ivory": [255, 255, 240],
5947
- "khaki": [240, 230, 140],
5948
- "lavender": [230, 230, 250],
5949
- "lavenderblush": [255, 240, 245],
5950
- "lawngreen": [124, 252, 0],
5951
- "lemonchiffon": [255, 250, 205],
5952
- "lightblue": [173, 216, 230],
5953
- "lightcoral": [240, 128, 128],
5954
- "lightcyan": [224, 255, 255],
5955
- "lightgoldenrodyellow": [250, 250, 210],
5956
- "lightgray": [211, 211, 211],
5957
- "lightgreen": [144, 238, 144],
5958
- "lightgrey": [211, 211, 211],
5959
- "lightpink": [255, 182, 193],
5960
- "lightsalmon": [255, 160, 122],
5961
- "lightseagreen": [32, 178, 170],
5962
- "lightskyblue": [135, 206, 250],
5963
- "lightslategray": [119, 136, 153],
5964
- "lightslategrey": [119, 136, 153],
5965
- "lightsteelblue": [176, 196, 222],
5966
- "lightyellow": [255, 255, 224],
5967
- "lime": [0, 255, 0],
5968
- "limegreen": [50, 205, 50],
5969
- "linen": [250, 240, 230],
5970
- "magenta": [255, 0, 255],
5971
- "maroon": [128, 0, 0],
5972
- "mediumaquamarine": [102, 205, 170],
5973
- "mediumblue": [0, 0, 205],
5974
- "mediumorchid": [186, 85, 211],
5975
- "mediumpurple": [147, 112, 219],
5976
- "mediumseagreen": [60, 179, 113],
5977
- "mediumslateblue": [123, 104, 238],
5978
- "mediumspringgreen": [0, 250, 154],
5979
- "mediumturquoise": [72, 209, 204],
5980
- "mediumvioletred": [199, 21, 133],
5981
- "midnightblue": [25, 25, 112],
5982
- "mintcream": [245, 255, 250],
5983
- "mistyrose": [255, 228, 225],
5984
- "moccasin": [255, 228, 181],
5985
- "navajowhite": [255, 222, 173],
5986
- "navy": [0, 0, 128],
5987
- "oldlace": [253, 245, 230],
5988
- "olive": [128, 128, 0],
5989
- "olivedrab": [107, 142, 35],
5990
- "orange": [255, 165, 0],
5991
- "orangered": [255, 69, 0],
5992
- "orchid": [218, 112, 214],
5993
- "palegoldenrod": [238, 232, 170],
5994
- "palegreen": [152, 251, 152],
5995
- "paleturquoise": [175, 238, 238],
5996
- "palevioletred": [219, 112, 147],
5997
- "papayawhip": [255, 239, 213],
5998
- "peachpuff": [255, 218, 185],
5999
- "peru": [205, 133, 63],
6000
- "pink": [255, 192, 203],
6001
- "plum": [221, 160, 221],
6002
- "powderblue": [176, 224, 230],
6003
- "purple": [128, 0, 128],
6004
- "rebeccapurple": [102, 51, 153],
6005
- "red": [255, 0, 0],
6006
- "rosybrown": [188, 143, 143],
6007
- "royalblue": [65, 105, 225],
6008
- "saddlebrown": [139, 69, 19],
6009
- "salmon": [250, 128, 114],
6010
- "sandybrown": [244, 164, 96],
6011
- "seagreen": [46, 139, 87],
6012
- "seashell": [255, 245, 238],
6013
- "sienna": [160, 82, 45],
6014
- "silver": [192, 192, 192],
6015
- "skyblue": [135, 206, 235],
6016
- "slateblue": [106, 90, 205],
6017
- "slategray": [112, 128, 144],
6018
- "slategrey": [112, 128, 144],
6019
- "snow": [255, 250, 250],
6020
- "springgreen": [0, 255, 127],
6021
- "steelblue": [70, 130, 180],
6022
- "tan": [210, 180, 140],
6023
- "teal": [0, 128, 128],
6024
- "thistle": [216, 191, 216],
6025
- "tomato": [255, 99, 71],
6026
- "turquoise": [64, 224, 208],
6027
- "violet": [238, 130, 238],
6028
- "wheat": [245, 222, 179],
6029
- "white": [255, 255, 255],
6030
- "whitesmoke": [245, 245, 245],
6031
- "yellow": [255, 255, 0],
6032
- "yellowgreen": [154, 205, 50]
6033
- };
6034
- }
6035
- });
6036
-
6037
- // ../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js
6038
- var require_is_arrayish = __commonJS({
6039
- "../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js"(exports2, module2) {
6040
- "use strict";
6041
- module2.exports = function isArrayish(obj) {
6042
- if (!obj || typeof obj === "string") {
6043
- return false;
6044
- }
6045
- return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String");
6046
- };
6047
- }
6048
- });
6049
-
6050
- // ../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js
6051
- var require_simple_swizzle = __commonJS({
6052
- "../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js"(exports2, module2) {
5959
+ // ../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/color.cjs
5960
+ var require_color = __commonJS({
5961
+ "../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/color.cjs"(exports2, module2) {
6053
5962
  "use strict";
6054
- var isArrayish = require_is_arrayish();
6055
- var concat = Array.prototype.concat;
6056
- var slice = Array.prototype.slice;
6057
- var swizzle = module2.exports = function swizzle2(args) {
6058
- var results = [];
6059
- for (var i2 = 0, len = args.length; i2 < len; i2++) {
6060
- var arg = args[i2];
6061
- if (isArrayish(arg)) {
6062
- results = concat.call(results, slice.call(arg));
6063
- } else {
6064
- results.push(arg);
6065
- }
6066
- }
6067
- return results;
6068
- };
6069
- swizzle.wrap = function(fn) {
6070
- return function() {
6071
- return fn(swizzle(arguments));
6072
- };
5963
+ var __defProp2 = Object.defineProperty;
5964
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
5965
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
5966
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
5967
+ var __export2 = (target, all) => {
5968
+ for (var name in all)
5969
+ __defProp2(target, name, { get: all[name], enumerable: true });
5970
+ };
5971
+ var __copyProps2 = (to, from, except, desc) => {
5972
+ if (from && typeof from === "object" || typeof from === "function") {
5973
+ for (let key of __getOwnPropNames2(from))
5974
+ if (!__hasOwnProp2.call(to, key) && key !== except)
5975
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
5976
+ }
5977
+ return to;
5978
+ };
5979
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
5980
+ var index_exports = {};
5981
+ __export2(index_exports, {
5982
+ default: () => index_default
5983
+ });
5984
+ module2.exports = __toCommonJS2(index_exports);
5985
+ var color_name_default = {
5986
+ aliceblue: [240, 248, 255],
5987
+ antiquewhite: [250, 235, 215],
5988
+ aqua: [0, 255, 255],
5989
+ aquamarine: [127, 255, 212],
5990
+ azure: [240, 255, 255],
5991
+ beige: [245, 245, 220],
5992
+ bisque: [255, 228, 196],
5993
+ black: [0, 0, 0],
5994
+ blanchedalmond: [255, 235, 205],
5995
+ blue: [0, 0, 255],
5996
+ blueviolet: [138, 43, 226],
5997
+ brown: [165, 42, 42],
5998
+ burlywood: [222, 184, 135],
5999
+ cadetblue: [95, 158, 160],
6000
+ chartreuse: [127, 255, 0],
6001
+ chocolate: [210, 105, 30],
6002
+ coral: [255, 127, 80],
6003
+ cornflowerblue: [100, 149, 237],
6004
+ cornsilk: [255, 248, 220],
6005
+ crimson: [220, 20, 60],
6006
+ cyan: [0, 255, 255],
6007
+ darkblue: [0, 0, 139],
6008
+ darkcyan: [0, 139, 139],
6009
+ darkgoldenrod: [184, 134, 11],
6010
+ darkgray: [169, 169, 169],
6011
+ darkgreen: [0, 100, 0],
6012
+ darkgrey: [169, 169, 169],
6013
+ darkkhaki: [189, 183, 107],
6014
+ darkmagenta: [139, 0, 139],
6015
+ darkolivegreen: [85, 107, 47],
6016
+ darkorange: [255, 140, 0],
6017
+ darkorchid: [153, 50, 204],
6018
+ darkred: [139, 0, 0],
6019
+ darksalmon: [233, 150, 122],
6020
+ darkseagreen: [143, 188, 143],
6021
+ darkslateblue: [72, 61, 139],
6022
+ darkslategray: [47, 79, 79],
6023
+ darkslategrey: [47, 79, 79],
6024
+ darkturquoise: [0, 206, 209],
6025
+ darkviolet: [148, 0, 211],
6026
+ deeppink: [255, 20, 147],
6027
+ deepskyblue: [0, 191, 255],
6028
+ dimgray: [105, 105, 105],
6029
+ dimgrey: [105, 105, 105],
6030
+ dodgerblue: [30, 144, 255],
6031
+ firebrick: [178, 34, 34],
6032
+ floralwhite: [255, 250, 240],
6033
+ forestgreen: [34, 139, 34],
6034
+ fuchsia: [255, 0, 255],
6035
+ gainsboro: [220, 220, 220],
6036
+ ghostwhite: [248, 248, 255],
6037
+ gold: [255, 215, 0],
6038
+ goldenrod: [218, 165, 32],
6039
+ gray: [128, 128, 128],
6040
+ green: [0, 128, 0],
6041
+ greenyellow: [173, 255, 47],
6042
+ grey: [128, 128, 128],
6043
+ honeydew: [240, 255, 240],
6044
+ hotpink: [255, 105, 180],
6045
+ indianred: [205, 92, 92],
6046
+ indigo: [75, 0, 130],
6047
+ ivory: [255, 255, 240],
6048
+ khaki: [240, 230, 140],
6049
+ lavender: [230, 230, 250],
6050
+ lavenderblush: [255, 240, 245],
6051
+ lawngreen: [124, 252, 0],
6052
+ lemonchiffon: [255, 250, 205],
6053
+ lightblue: [173, 216, 230],
6054
+ lightcoral: [240, 128, 128],
6055
+ lightcyan: [224, 255, 255],
6056
+ lightgoldenrodyellow: [250, 250, 210],
6057
+ lightgray: [211, 211, 211],
6058
+ lightgreen: [144, 238, 144],
6059
+ lightgrey: [211, 211, 211],
6060
+ lightpink: [255, 182, 193],
6061
+ lightsalmon: [255, 160, 122],
6062
+ lightseagreen: [32, 178, 170],
6063
+ lightskyblue: [135, 206, 250],
6064
+ lightslategray: [119, 136, 153],
6065
+ lightslategrey: [119, 136, 153],
6066
+ lightsteelblue: [176, 196, 222],
6067
+ lightyellow: [255, 255, 224],
6068
+ lime: [0, 255, 0],
6069
+ limegreen: [50, 205, 50],
6070
+ linen: [250, 240, 230],
6071
+ magenta: [255, 0, 255],
6072
+ maroon: [128, 0, 0],
6073
+ mediumaquamarine: [102, 205, 170],
6074
+ mediumblue: [0, 0, 205],
6075
+ mediumorchid: [186, 85, 211],
6076
+ mediumpurple: [147, 112, 219],
6077
+ mediumseagreen: [60, 179, 113],
6078
+ mediumslateblue: [123, 104, 238],
6079
+ mediumspringgreen: [0, 250, 154],
6080
+ mediumturquoise: [72, 209, 204],
6081
+ mediumvioletred: [199, 21, 133],
6082
+ midnightblue: [25, 25, 112],
6083
+ mintcream: [245, 255, 250],
6084
+ mistyrose: [255, 228, 225],
6085
+ moccasin: [255, 228, 181],
6086
+ navajowhite: [255, 222, 173],
6087
+ navy: [0, 0, 128],
6088
+ oldlace: [253, 245, 230],
6089
+ olive: [128, 128, 0],
6090
+ olivedrab: [107, 142, 35],
6091
+ orange: [255, 165, 0],
6092
+ orangered: [255, 69, 0],
6093
+ orchid: [218, 112, 214],
6094
+ palegoldenrod: [238, 232, 170],
6095
+ palegreen: [152, 251, 152],
6096
+ paleturquoise: [175, 238, 238],
6097
+ palevioletred: [219, 112, 147],
6098
+ papayawhip: [255, 239, 213],
6099
+ peachpuff: [255, 218, 185],
6100
+ peru: [205, 133, 63],
6101
+ pink: [255, 192, 203],
6102
+ plum: [221, 160, 221],
6103
+ powderblue: [176, 224, 230],
6104
+ purple: [128, 0, 128],
6105
+ rebeccapurple: [102, 51, 153],
6106
+ red: [255, 0, 0],
6107
+ rosybrown: [188, 143, 143],
6108
+ royalblue: [65, 105, 225],
6109
+ saddlebrown: [139, 69, 19],
6110
+ salmon: [250, 128, 114],
6111
+ sandybrown: [244, 164, 96],
6112
+ seagreen: [46, 139, 87],
6113
+ seashell: [255, 245, 238],
6114
+ sienna: [160, 82, 45],
6115
+ silver: [192, 192, 192],
6116
+ skyblue: [135, 206, 235],
6117
+ slateblue: [106, 90, 205],
6118
+ slategray: [112, 128, 144],
6119
+ slategrey: [112, 128, 144],
6120
+ snow: [255, 250, 250],
6121
+ springgreen: [0, 255, 127],
6122
+ steelblue: [70, 130, 180],
6123
+ tan: [210, 180, 140],
6124
+ teal: [0, 128, 128],
6125
+ thistle: [216, 191, 216],
6126
+ tomato: [255, 99, 71],
6127
+ turquoise: [64, 224, 208],
6128
+ violet: [238, 130, 238],
6129
+ wheat: [245, 222, 179],
6130
+ white: [255, 255, 255],
6131
+ whitesmoke: [245, 245, 245],
6132
+ yellow: [255, 255, 0],
6133
+ yellowgreen: [154, 205, 50]
6073
6134
  };
6074
- }
6075
- });
6076
-
6077
- // ../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js
6078
- var require_color_string = __commonJS({
6079
- "../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"(exports2, module2) {
6080
- "use strict";
6081
- var colorNames = require_color_name();
6082
- var swizzle = require_simple_swizzle();
6083
- var hasOwnProperty = Object.hasOwnProperty;
6084
6135
  var reverseNames = /* @__PURE__ */ Object.create(null);
6085
- for (name in colorNames) {
6086
- if (hasOwnProperty.call(colorNames, name)) {
6087
- reverseNames[colorNames[name]] = name;
6136
+ for (const name in color_name_default) {
6137
+ if (Object.hasOwn(color_name_default, name)) {
6138
+ reverseNames[color_name_default[name]] = name;
6088
6139
  }
6089
6140
  }
6090
- var name;
6091
- var cs = module2.exports = {
6141
+ var cs = {
6092
6142
  to: {},
6093
6143
  get: {}
6094
6144
  };
6095
6145
  cs.get = function(string) {
6096
- var prefix = string.substring(0, 3).toLowerCase();
6097
- var val;
6098
- var model;
6146
+ const prefix = string.slice(0, 3).toLowerCase();
6147
+ let value;
6148
+ let model;
6099
6149
  switch (prefix) {
6100
- case "hsl":
6101
- val = cs.get.hsl(string);
6150
+ case "hsl": {
6151
+ value = cs.get.hsl(string);
6102
6152
  model = "hsl";
6103
6153
  break;
6104
- case "hwb":
6105
- val = cs.get.hwb(string);
6154
+ }
6155
+ case "hwb": {
6156
+ value = cs.get.hwb(string);
6106
6157
  model = "hwb";
6107
6158
  break;
6108
- default:
6109
- val = cs.get.rgb(string);
6159
+ }
6160
+ default: {
6161
+ value = cs.get.rgb(string);
6110
6162
  model = "rgb";
6111
6163
  break;
6164
+ }
6112
6165
  }
6113
- if (!val) {
6166
+ if (!value) {
6114
6167
  return null;
6115
6168
  }
6116
- return { model, value: val };
6169
+ return { model, value };
6117
6170
  };
6118
6171
  cs.get.rgb = function(string) {
6119
6172
  if (!string) {
6120
6173
  return null;
6121
6174
  }
6122
- var abbr = /^#([a-f0-9]{3,4})$/i;
6123
- var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
6124
- var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
6125
- var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
6126
- var keyword = /^(\w+)$/;
6127
- var rgb = [0, 0, 0, 1];
6128
- var match;
6129
- var i2;
6130
- var hexAlpha;
6175
+ const abbr = /^#([a-f\d]{3,4})$/i;
6176
+ const hex = /^#([a-f\d]{6})([a-f\d]{2})?$/i;
6177
+ const rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
6178
+ const per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
6179
+ const keyword = /^(\w+)$/;
6180
+ let rgb = [0, 0, 0, 1];
6181
+ let match;
6182
+ let i3;
6183
+ let hexAlpha;
6131
6184
  if (match = string.match(hex)) {
6132
6185
  hexAlpha = match[2];
6133
6186
  match = match[1];
6134
- for (i2 = 0; i2 < 3; i2++) {
6135
- var i22 = i2 * 2;
6136
- rgb[i2] = parseInt(match.slice(i22, i22 + 2), 16);
6187
+ for (i3 = 0; i3 < 3; i3++) {
6188
+ const i22 = i3 * 2;
6189
+ rgb[i3] = Number.parseInt(match.slice(i22, i22 + 2), 16);
6137
6190
  }
6138
6191
  if (hexAlpha) {
6139
- rgb[3] = parseInt(hexAlpha, 16) / 255;
6192
+ rgb[3] = Number.parseInt(hexAlpha, 16) / 255;
6140
6193
  }
6141
6194
  } else if (match = string.match(abbr)) {
6142
6195
  match = match[1];
6143
6196
  hexAlpha = match[3];
6144
- for (i2 = 0; i2 < 3; i2++) {
6145
- rgb[i2] = parseInt(match[i2] + match[i2], 16);
6197
+ for (i3 = 0; i3 < 3; i3++) {
6198
+ rgb[i3] = Number.parseInt(match[i3] + match[i3], 16);
6146
6199
  }
6147
6200
  if (hexAlpha) {
6148
- rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
6201
+ rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
6149
6202
  }
6150
6203
  } else if (match = string.match(rgba)) {
6151
- for (i2 = 0; i2 < 3; i2++) {
6152
- rgb[i2] = parseInt(match[i2 + 1], 0);
6204
+ for (i3 = 0; i3 < 3; i3++) {
6205
+ rgb[i3] = Number.parseInt(match[i3 + 1], 10);
6153
6206
  }
6154
6207
  if (match[4]) {
6155
- if (match[5]) {
6156
- rgb[3] = parseFloat(match[4]) * 0.01;
6157
- } else {
6158
- rgb[3] = parseFloat(match[4]);
6159
- }
6208
+ rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
6160
6209
  }
6161
6210
  } else if (match = string.match(per)) {
6162
- for (i2 = 0; i2 < 3; i2++) {
6163
- rgb[i2] = Math.round(parseFloat(match[i2 + 1]) * 2.55);
6211
+ for (i3 = 0; i3 < 3; i3++) {
6212
+ rgb[i3] = Math.round(Number.parseFloat(match[i3 + 1]) * 2.55);
6164
6213
  }
6165
6214
  if (match[4]) {
6166
- if (match[5]) {
6167
- rgb[3] = parseFloat(match[4]) * 0.01;
6168
- } else {
6169
- rgb[3] = parseFloat(match[4]);
6170
- }
6215
+ rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
6171
6216
  }
6172
6217
  } else if (match = string.match(keyword)) {
6173
6218
  if (match[1] === "transparent") {
6174
6219
  return [0, 0, 0, 0];
6175
6220
  }
6176
- if (!hasOwnProperty.call(colorNames, match[1])) {
6221
+ if (!Object.hasOwn(color_name_default, match[1])) {
6177
6222
  return null;
6178
6223
  }
6179
- rgb = colorNames[match[1]];
6224
+ rgb = color_name_default[match[1]];
6180
6225
  rgb[3] = 1;
6181
6226
  return rgb;
6182
6227
  } else {
6183
6228
  return null;
6184
6229
  }
6185
- for (i2 = 0; i2 < 3; i2++) {
6186
- rgb[i2] = clamp(rgb[i2], 0, 255);
6230
+ for (i3 = 0; i3 < 3; i3++) {
6231
+ rgb[i3] = clamp(rgb[i3], 0, 255);
6187
6232
  }
6188
6233
  rgb[3] = clamp(rgb[3], 0, 1);
6189
6234
  return rgb;
@@ -6192,15 +6237,15 @@ var require_color_string = __commonJS({
6192
6237
  if (!string) {
6193
6238
  return null;
6194
6239
  }
6195
- 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*)?\)$/;
6196
- var match = string.match(hsl);
6240
+ 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*)?\)$/;
6241
+ const match = string.match(hsl);
6197
6242
  if (match) {
6198
- var alpha = parseFloat(match[4]);
6199
- var h2 = (parseFloat(match[1]) % 360 + 360) % 360;
6200
- var s2 = clamp(parseFloat(match[2]), 0, 100);
6201
- var l = clamp(parseFloat(match[3]), 0, 100);
6202
- var a2 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
6203
- return [h2, s2, l, a2];
6243
+ const alpha = Number.parseFloat(match[4]);
6244
+ const h4 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6245
+ const s = clamp(Number.parseFloat(match[2]), 0, 100);
6246
+ const l2 = clamp(Number.parseFloat(match[3]), 0, 100);
6247
+ const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
6248
+ return [h4, s, l2, a2];
6204
6249
  }
6205
6250
  return null;
6206
6251
  };
@@ -6208,66 +6253,54 @@ var require_color_string = __commonJS({
6208
6253
  if (!string) {
6209
6254
  return null;
6210
6255
  }
6211
- 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*)?\)$/;
6212
- var match = string.match(hwb);
6256
+ 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*)?\)$/;
6257
+ const match = string.match(hwb);
6213
6258
  if (match) {
6214
- var alpha = parseFloat(match[4]);
6215
- var h2 = (parseFloat(match[1]) % 360 + 360) % 360;
6216
- var w = clamp(parseFloat(match[2]), 0, 100);
6217
- var b = clamp(parseFloat(match[3]), 0, 100);
6218
- var a2 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
6219
- return [h2, w, b, a2];
6259
+ const alpha = Number.parseFloat(match[4]);
6260
+ const h4 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6261
+ const w = clamp(Number.parseFloat(match[2]), 0, 100);
6262
+ const b = clamp(Number.parseFloat(match[3]), 0, 100);
6263
+ const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
6264
+ return [h4, w, b, a2];
6220
6265
  }
6221
6266
  return null;
6222
6267
  };
6223
- cs.to.hex = function() {
6224
- var rgba = swizzle(arguments);
6268
+ cs.to.hex = function(...rgba) {
6225
6269
  return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
6226
6270
  };
6227
- cs.to.rgb = function() {
6228
- var rgba = swizzle(arguments);
6271
+ cs.to.rgb = function(...rgba) {
6229
6272
  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] + ")";
6230
6273
  };
6231
- cs.to.rgb.percent = function() {
6232
- var rgba = swizzle(arguments);
6233
- var r = Math.round(rgba[0] / 255 * 100);
6234
- var g = Math.round(rgba[1] / 255 * 100);
6235
- var b = Math.round(rgba[2] / 255 * 100);
6274
+ cs.to.rgb.percent = function(...rgba) {
6275
+ const r = Math.round(rgba[0] / 255 * 100);
6276
+ const g = Math.round(rgba[1] / 255 * 100);
6277
+ const b = Math.round(rgba[2] / 255 * 100);
6236
6278
  return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g + "%, " + b + "%)" : "rgba(" + r + "%, " + g + "%, " + b + "%, " + rgba[3] + ")";
6237
6279
  };
6238
- cs.to.hsl = function() {
6239
- var hsla = swizzle(arguments);
6280
+ cs.to.hsl = function(...hsla) {
6240
6281
  return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
6241
6282
  };
6242
- cs.to.hwb = function() {
6243
- var hwba = swizzle(arguments);
6244
- var a2 = "";
6283
+ cs.to.hwb = function(...hwba) {
6284
+ let a2 = "";
6245
6285
  if (hwba.length >= 4 && hwba[3] !== 1) {
6246
6286
  a2 = ", " + hwba[3];
6247
6287
  }
6248
6288
  return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a2 + ")";
6249
6289
  };
6250
- cs.to.keyword = function(rgb) {
6290
+ cs.to.keyword = function(...rgb) {
6251
6291
  return reverseNames[rgb.slice(0, 3)];
6252
6292
  };
6253
- function clamp(num, min, max) {
6254
- return Math.min(Math.max(min, num), max);
6293
+ function clamp(number_, min, max) {
6294
+ return Math.min(Math.max(min, number_), max);
6255
6295
  }
6256
- function hexDouble(num) {
6257
- var str = Math.round(num).toString(16).toUpperCase();
6258
- return str.length < 2 ? "0" + str : str;
6296
+ function hexDouble(number_) {
6297
+ const string_ = Math.round(number_).toString(16).toUpperCase();
6298
+ return string_.length < 2 ? "0" + string_ : string_;
6259
6299
  }
6260
- }
6261
- });
6262
-
6263
- // ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
6264
- var require_conversions = __commonJS({
6265
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) {
6266
- "use strict";
6267
- var cssKeywords = require_color_name();
6300
+ var color_string_default = cs;
6268
6301
  var reverseKeywords = {};
6269
- for (const key of Object.keys(cssKeywords)) {
6270
- reverseKeywords[cssKeywords[key]] = key;
6302
+ for (const key of Object.keys(color_name_default)) {
6303
+ reverseKeywords[color_name_default[key]] = key;
6271
6304
  }
6272
6305
  var convert = {
6273
6306
  rgb: { channels: 3, labels: "rgb" },
@@ -6277,7 +6310,9 @@ var require_conversions = __commonJS({
6277
6310
  cmyk: { channels: 4, labels: "cmyk" },
6278
6311
  xyz: { channels: 3, labels: "xyz" },
6279
6312
  lab: { channels: 3, labels: "lab" },
6313
+ oklab: { channels: 3, labels: ["okl", "oka", "okb"] },
6280
6314
  lch: { channels: 3, labels: "lch" },
6315
+ oklch: { channels: 3, labels: ["okl", "okc", "okh"] },
6281
6316
  hex: { channels: 1, labels: ["hex"] },
6282
6317
  keyword: { channels: 1, labels: ["keyword"] },
6283
6318
  ansi16: { channels: 1, labels: ["ansi16"] },
@@ -6286,7 +6321,15 @@ var require_conversions = __commonJS({
6286
6321
  apple: { channels: 3, labels: ["r16", "g16", "b16"] },
6287
6322
  gray: { channels: 1, labels: ["gray"] }
6288
6323
  };
6289
- module2.exports = convert;
6324
+ var conversions_default = convert;
6325
+ var LAB_FT = (6 / 29) ** 3;
6326
+ function srgbNonlinearTransform(c3) {
6327
+ const cc = c3 > 31308e-7 ? 1.055 * c3 ** (1 / 2.4) - 0.055 : c3 * 12.92;
6328
+ return Math.min(Math.max(0, cc), 1);
6329
+ }
6330
+ function srgbNonlinearTransformInv(c3) {
6331
+ return c3 > 0.04045 ? ((c3 + 0.055) / 1.055) ** 2.4 : c3 / 12.92;
6332
+ }
6290
6333
  for (const model of Object.keys(convert)) {
6291
6334
  if (!("channels" in convert[model])) {
6292
6335
  throw new Error("missing channels property: " + model);
@@ -6310,69 +6353,85 @@ var require_conversions = __commonJS({
6310
6353
  const min = Math.min(r, g, b);
6311
6354
  const max = Math.max(r, g, b);
6312
6355
  const delta = max - min;
6313
- let h2;
6314
- let s2;
6315
- if (max === min) {
6316
- h2 = 0;
6317
- } else if (r === max) {
6318
- h2 = (g - b) / delta;
6319
- } else if (g === max) {
6320
- h2 = 2 + (b - r) / delta;
6321
- } else if (b === max) {
6322
- h2 = 4 + (r - g) / delta;
6323
- }
6324
- h2 = Math.min(h2 * 60, 360);
6325
- if (h2 < 0) {
6326
- h2 += 360;
6327
- }
6328
- const l = (min + max) / 2;
6356
+ let h4;
6357
+ let s;
6358
+ switch (max) {
6359
+ case min: {
6360
+ h4 = 0;
6361
+ break;
6362
+ }
6363
+ case r: {
6364
+ h4 = (g - b) / delta;
6365
+ break;
6366
+ }
6367
+ case g: {
6368
+ h4 = 2 + (b - r) / delta;
6369
+ break;
6370
+ }
6371
+ case b: {
6372
+ h4 = 4 + (r - g) / delta;
6373
+ break;
6374
+ }
6375
+ }
6376
+ h4 = Math.min(h4 * 60, 360);
6377
+ if (h4 < 0) {
6378
+ h4 += 360;
6379
+ }
6380
+ const l2 = (min + max) / 2;
6329
6381
  if (max === min) {
6330
- s2 = 0;
6331
- } else if (l <= 0.5) {
6332
- s2 = delta / (max + min);
6382
+ s = 0;
6383
+ } else if (l2 <= 0.5) {
6384
+ s = delta / (max + min);
6333
6385
  } else {
6334
- s2 = delta / (2 - max - min);
6386
+ s = delta / (2 - max - min);
6335
6387
  }
6336
- return [h2, s2 * 100, l * 100];
6388
+ return [h4, s * 100, l2 * 100];
6337
6389
  };
6338
6390
  convert.rgb.hsv = function(rgb) {
6339
6391
  let rdif;
6340
6392
  let gdif;
6341
6393
  let bdif;
6342
- let h2;
6343
- let s2;
6394
+ let h4;
6395
+ let s;
6344
6396
  const r = rgb[0] / 255;
6345
6397
  const g = rgb[1] / 255;
6346
6398
  const b = rgb[2] / 255;
6347
6399
  const v = Math.max(r, g, b);
6348
6400
  const diff = v - Math.min(r, g, b);
6349
- const diffc = function(c2) {
6350
- return (v - c2) / 6 / diff + 1 / 2;
6401
+ const diffc = function(c3) {
6402
+ return (v - c3) / 6 / diff + 1 / 2;
6351
6403
  };
6352
6404
  if (diff === 0) {
6353
- h2 = 0;
6354
- s2 = 0;
6405
+ h4 = 0;
6406
+ s = 0;
6355
6407
  } else {
6356
- s2 = diff / v;
6408
+ s = diff / v;
6357
6409
  rdif = diffc(r);
6358
6410
  gdif = diffc(g);
6359
6411
  bdif = diffc(b);
6360
- if (r === v) {
6361
- h2 = bdif - gdif;
6362
- } else if (g === v) {
6363
- h2 = 1 / 3 + rdif - bdif;
6364
- } else if (b === v) {
6365
- h2 = 2 / 3 + gdif - rdif;
6412
+ switch (v) {
6413
+ case r: {
6414
+ h4 = bdif - gdif;
6415
+ break;
6416
+ }
6417
+ case g: {
6418
+ h4 = 1 / 3 + rdif - bdif;
6419
+ break;
6420
+ }
6421
+ case b: {
6422
+ h4 = 2 / 3 + gdif - rdif;
6423
+ break;
6424
+ }
6366
6425
  }
6367
- if (h2 < 0) {
6368
- h2 += 1;
6369
- } else if (h2 > 1) {
6370
- h2 -= 1;
6426
+ if (h4 < 0) {
6427
+ h4 += 1;
6428
+ } else if (h4 > 1) {
6429
+ h4 -= 1;
6371
6430
  }
6372
6431
  }
6373
6432
  return [
6374
- h2 * 360,
6375
- s2 * 100,
6433
+ h4 * 360,
6434
+ s * 100,
6376
6435
  v * 100
6377
6436
  ];
6378
6437
  };
@@ -6380,20 +6439,32 @@ var require_conversions = __commonJS({
6380
6439
  const r = rgb[0];
6381
6440
  const g = rgb[1];
6382
6441
  let b = rgb[2];
6383
- const h2 = convert.rgb.hsl(rgb)[0];
6442
+ const h4 = convert.rgb.hsl(rgb)[0];
6384
6443
  const w = 1 / 255 * Math.min(r, Math.min(g, b));
6385
6444
  b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
6386
- return [h2, w * 100, b * 100];
6445
+ return [h4, w * 100, b * 100];
6446
+ };
6447
+ convert.rgb.oklab = function(rgb) {
6448
+ const r = srgbNonlinearTransformInv(rgb[0] / 255);
6449
+ const g = srgbNonlinearTransformInv(rgb[1] / 255);
6450
+ const b = srgbNonlinearTransformInv(rgb[2] / 255);
6451
+ const lp = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
6452
+ const mp = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
6453
+ const sp = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
6454
+ const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6455
+ const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
6456
+ const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
6457
+ return [l2 * 100, aa * 100, bb * 100];
6387
6458
  };
6388
6459
  convert.rgb.cmyk = function(rgb) {
6389
6460
  const r = rgb[0] / 255;
6390
6461
  const g = rgb[1] / 255;
6391
6462
  const b = rgb[2] / 255;
6392
6463
  const k = Math.min(1 - r, 1 - g, 1 - b);
6393
- const c2 = (1 - r - k) / (1 - k) || 0;
6394
- const m2 = (1 - g - k) / (1 - k) || 0;
6464
+ const c3 = (1 - r - k) / (1 - k) || 0;
6465
+ const m3 = (1 - g - k) / (1 - k) || 0;
6395
6466
  const y = (1 - b - k) / (1 - k) || 0;
6396
- return [c2 * 100, m2 * 100, y * 100, k * 100];
6467
+ return [c3 * 100, m3 * 100, y * 100, k * 100];
6397
6468
  };
6398
6469
  function comparativeDistance(x, y) {
6399
6470
  return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
@@ -6403,10 +6474,10 @@ var require_conversions = __commonJS({
6403
6474
  if (reversed) {
6404
6475
  return reversed;
6405
6476
  }
6406
- let currentClosestDistance = Infinity;
6477
+ let currentClosestDistance = Number.POSITIVE_INFINITY;
6407
6478
  let currentClosestKeyword;
6408
- for (const keyword of Object.keys(cssKeywords)) {
6409
- const value = cssKeywords[keyword];
6479
+ for (const keyword of Object.keys(color_name_default)) {
6480
+ const value = color_name_default[keyword];
6410
6481
  const distance = comparativeDistance(rgb, value);
6411
6482
  if (distance < currentClosestDistance) {
6412
6483
  currentClosestDistance = distance;
@@ -6416,18 +6487,15 @@ var require_conversions = __commonJS({
6416
6487
  return currentClosestKeyword;
6417
6488
  };
6418
6489
  convert.keyword.rgb = function(keyword) {
6419
- return cssKeywords[keyword];
6490
+ return color_name_default[keyword];
6420
6491
  };
6421
6492
  convert.rgb.xyz = function(rgb) {
6422
- let r = rgb[0] / 255;
6423
- let g = rgb[1] / 255;
6424
- let b = rgb[2] / 255;
6425
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
6426
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
6427
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
6428
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
6429
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
6430
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
6493
+ const r = srgbNonlinearTransformInv(rgb[0] / 255);
6494
+ const g = srgbNonlinearTransformInv(rgb[1] / 255);
6495
+ const b = srgbNonlinearTransformInv(rgb[2] / 255);
6496
+ const x = r * 0.4124564 + g * 0.3575761 + b * 0.1804375;
6497
+ const y = r * 0.2126729 + g * 0.7151522 + b * 0.072175;
6498
+ const z = r * 0.0193339 + g * 0.119192 + b * 0.9503041;
6431
6499
  return [x * 100, y * 100, z * 100];
6432
6500
  };
6433
6501
  convert.rgb.lab = function(rgb) {
@@ -6438,34 +6506,29 @@ var require_conversions = __commonJS({
6438
6506
  x /= 95.047;
6439
6507
  y /= 100;
6440
6508
  z /= 108.883;
6441
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6442
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6443
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
6444
- const l = 116 * y - 16;
6509
+ x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6510
+ y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6511
+ z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
6512
+ const l2 = 116 * y - 16;
6445
6513
  const a2 = 500 * (x - y);
6446
6514
  const b = 200 * (y - z);
6447
- return [l, a2, b];
6515
+ return [l2, a2, b];
6448
6516
  };
6449
6517
  convert.hsl.rgb = function(hsl) {
6450
- const h2 = hsl[0] / 360;
6451
- const s2 = hsl[1] / 100;
6452
- const l = hsl[2] / 100;
6453
- let t2;
6518
+ const h4 = hsl[0] / 360;
6519
+ const s = hsl[1] / 100;
6520
+ const l2 = hsl[2] / 100;
6454
6521
  let t3;
6455
- let val;
6456
- if (s2 === 0) {
6457
- val = l * 255;
6458
- return [val, val, val];
6459
- }
6460
- if (l < 0.5) {
6461
- t2 = l * (1 + s2);
6462
- } else {
6463
- t2 = l + s2 - l * s2;
6522
+ let value;
6523
+ if (s === 0) {
6524
+ value = l2 * 255;
6525
+ return [value, value, value];
6464
6526
  }
6465
- const t1 = 2 * l - t2;
6527
+ const t2 = l2 < 0.5 ? l2 * (1 + s) : l2 + s - l2 * s;
6528
+ const t1 = 2 * l2 - t2;
6466
6529
  const rgb = [0, 0, 0];
6467
- for (let i2 = 0; i2 < 3; i2++) {
6468
- t3 = h2 + 1 / 3 * -(i2 - 1);
6530
+ for (let i3 = 0; i3 < 3; i3++) {
6531
+ t3 = h4 + 1 / 3 * -(i3 - 1);
6469
6532
  if (t3 < 0) {
6470
6533
  t3++;
6471
6534
  }
@@ -6473,73 +6536,79 @@ var require_conversions = __commonJS({
6473
6536
  t3--;
6474
6537
  }
6475
6538
  if (6 * t3 < 1) {
6476
- val = t1 + (t2 - t1) * 6 * t3;
6539
+ value = t1 + (t2 - t1) * 6 * t3;
6477
6540
  } else if (2 * t3 < 1) {
6478
- val = t2;
6541
+ value = t2;
6479
6542
  } else if (3 * t3 < 2) {
6480
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
6543
+ value = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
6481
6544
  } else {
6482
- val = t1;
6545
+ value = t1;
6483
6546
  }
6484
- rgb[i2] = val * 255;
6547
+ rgb[i3] = value * 255;
6485
6548
  }
6486
6549
  return rgb;
6487
6550
  };
6488
6551
  convert.hsl.hsv = function(hsl) {
6489
- const h2 = hsl[0];
6490
- let s2 = hsl[1] / 100;
6491
- let l = hsl[2] / 100;
6492
- let smin = s2;
6493
- const lmin = Math.max(l, 0.01);
6494
- l *= 2;
6495
- s2 *= l <= 1 ? l : 2 - l;
6552
+ const h4 = hsl[0];
6553
+ let s = hsl[1] / 100;
6554
+ let l2 = hsl[2] / 100;
6555
+ let smin = s;
6556
+ const lmin = Math.max(l2, 0.01);
6557
+ l2 *= 2;
6558
+ s *= l2 <= 1 ? l2 : 2 - l2;
6496
6559
  smin *= lmin <= 1 ? lmin : 2 - lmin;
6497
- const v = (l + s2) / 2;
6498
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s2 / (l + s2);
6499
- return [h2, sv * 100, v * 100];
6560
+ const v = (l2 + s) / 2;
6561
+ const sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l2 + s);
6562
+ return [h4, sv * 100, v * 100];
6500
6563
  };
6501
6564
  convert.hsv.rgb = function(hsv) {
6502
- const h2 = hsv[0] / 60;
6503
- const s2 = hsv[1] / 100;
6565
+ const h4 = hsv[0] / 60;
6566
+ const s = hsv[1] / 100;
6504
6567
  let v = hsv[2] / 100;
6505
- const hi = Math.floor(h2) % 6;
6506
- const f2 = h2 - Math.floor(h2);
6507
- const p2 = 255 * v * (1 - s2);
6508
- const q = 255 * v * (1 - s2 * f2);
6509
- const t = 255 * v * (1 - s2 * (1 - f2));
6568
+ const hi = Math.floor(h4) % 6;
6569
+ const f2 = h4 - Math.floor(h4);
6570
+ const p3 = 255 * v * (1 - s);
6571
+ const q = 255 * v * (1 - s * f2);
6572
+ const t = 255 * v * (1 - s * (1 - f2));
6510
6573
  v *= 255;
6511
6574
  switch (hi) {
6512
- case 0:
6513
- return [v, t, p2];
6514
- case 1:
6515
- return [q, v, p2];
6516
- case 2:
6517
- return [p2, v, t];
6518
- case 3:
6519
- return [p2, q, v];
6520
- case 4:
6521
- return [t, p2, v];
6522
- case 5:
6523
- return [v, p2, q];
6575
+ case 0: {
6576
+ return [v, t, p3];
6577
+ }
6578
+ case 1: {
6579
+ return [q, v, p3];
6580
+ }
6581
+ case 2: {
6582
+ return [p3, v, t];
6583
+ }
6584
+ case 3: {
6585
+ return [p3, q, v];
6586
+ }
6587
+ case 4: {
6588
+ return [t, p3, v];
6589
+ }
6590
+ case 5: {
6591
+ return [v, p3, q];
6592
+ }
6524
6593
  }
6525
6594
  };
6526
6595
  convert.hsv.hsl = function(hsv) {
6527
- const h2 = hsv[0];
6528
- const s2 = hsv[1] / 100;
6596
+ const h4 = hsv[0];
6597
+ const s = hsv[1] / 100;
6529
6598
  const v = hsv[2] / 100;
6530
6599
  const vmin = Math.max(v, 0.01);
6531
6600
  let sl;
6532
- let l;
6533
- l = (2 - s2) * v;
6534
- const lmin = (2 - s2) * vmin;
6535
- sl = s2 * vmin;
6601
+ let l2;
6602
+ l2 = (2 - s) * v;
6603
+ const lmin = (2 - s) * vmin;
6604
+ sl = s * vmin;
6536
6605
  sl /= lmin <= 1 ? lmin : 2 - lmin;
6537
6606
  sl = sl || 0;
6538
- l /= 2;
6539
- return [h2, sl * 100, l * 100];
6607
+ l2 /= 2;
6608
+ return [h4, sl * 100, l2 * 100];
6540
6609
  };
6541
6610
  convert.hwb.rgb = function(hwb) {
6542
- const h2 = hwb[0] / 360;
6611
+ const h4 = hwb[0] / 360;
6543
6612
  let wh = hwb[1] / 100;
6544
6613
  let bl = hwb[2] / 100;
6545
6614
  const ratio = wh + bl;
@@ -6548,59 +6617,65 @@ var require_conversions = __commonJS({
6548
6617
  wh /= ratio;
6549
6618
  bl /= ratio;
6550
6619
  }
6551
- const i2 = Math.floor(6 * h2);
6620
+ const i3 = Math.floor(6 * h4);
6552
6621
  const v = 1 - bl;
6553
- f2 = 6 * h2 - i2;
6554
- if ((i2 & 1) !== 0) {
6622
+ f2 = 6 * h4 - i3;
6623
+ if ((i3 & 1) !== 0) {
6555
6624
  f2 = 1 - f2;
6556
6625
  }
6557
- const n2 = wh + f2 * (v - wh);
6626
+ const n3 = wh + f2 * (v - wh);
6558
6627
  let r;
6559
6628
  let g;
6560
6629
  let b;
6561
- switch (i2) {
6630
+ switch (i3) {
6562
6631
  default:
6563
6632
  case 6:
6564
- case 0:
6633
+ case 0: {
6565
6634
  r = v;
6566
- g = n2;
6635
+ g = n3;
6567
6636
  b = wh;
6568
6637
  break;
6569
- case 1:
6570
- r = n2;
6638
+ }
6639
+ case 1: {
6640
+ r = n3;
6571
6641
  g = v;
6572
6642
  b = wh;
6573
6643
  break;
6574
- case 2:
6644
+ }
6645
+ case 2: {
6575
6646
  r = wh;
6576
6647
  g = v;
6577
- b = n2;
6648
+ b = n3;
6578
6649
  break;
6579
- case 3:
6650
+ }
6651
+ case 3: {
6580
6652
  r = wh;
6581
- g = n2;
6653
+ g = n3;
6582
6654
  b = v;
6583
6655
  break;
6584
- case 4:
6585
- r = n2;
6656
+ }
6657
+ case 4: {
6658
+ r = n3;
6586
6659
  g = wh;
6587
6660
  b = v;
6588
6661
  break;
6589
- case 5:
6662
+ }
6663
+ case 5: {
6590
6664
  r = v;
6591
6665
  g = wh;
6592
- b = n2;
6666
+ b = n3;
6593
6667
  break;
6668
+ }
6594
6669
  }
6595
6670
  return [r * 255, g * 255, b * 255];
6596
6671
  };
6597
6672
  convert.cmyk.rgb = function(cmyk) {
6598
- const c2 = cmyk[0] / 100;
6599
- const m2 = cmyk[1] / 100;
6673
+ const c3 = cmyk[0] / 100;
6674
+ const m3 = cmyk[1] / 100;
6600
6675
  const y = cmyk[2] / 100;
6601
6676
  const k = cmyk[3] / 100;
6602
- const r = 1 - Math.min(1, c2 * (1 - k) + k);
6603
- const g = 1 - Math.min(1, m2 * (1 - k) + k);
6677
+ const r = 1 - Math.min(1, c3 * (1 - k) + k);
6678
+ const g = 1 - Math.min(1, m3 * (1 - k) + k);
6604
6679
  const b = 1 - Math.min(1, y * (1 - k) + k);
6605
6680
  return [r * 255, g * 255, b * 255];
6606
6681
  };
@@ -6611,15 +6686,12 @@ var require_conversions = __commonJS({
6611
6686
  let r;
6612
6687
  let g;
6613
6688
  let b;
6614
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
6615
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
6616
- b = x * 0.0557 + y * -0.204 + z * 1.057;
6617
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
6618
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
6619
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
6620
- r = Math.min(Math.max(0, r), 1);
6621
- g = Math.min(Math.max(0, g), 1);
6622
- b = Math.min(Math.max(0, b), 1);
6689
+ r = x * 3.2404542 + y * -1.5371385 + z * -0.4985314;
6690
+ g = x * -0.969266 + y * 1.8760108 + z * 0.041556;
6691
+ b = x * 0.0556434 + y * -0.2040259 + z * 1.0572252;
6692
+ r = srgbNonlinearTransform(r);
6693
+ g = srgbNonlinearTransform(g);
6694
+ b = srgbNonlinearTransform(b);
6623
6695
  return [r * 255, g * 255, b * 255];
6624
6696
  };
6625
6697
  convert.xyz.lab = function(xyz) {
@@ -6629,56 +6701,98 @@ var require_conversions = __commonJS({
6629
6701
  x /= 95.047;
6630
6702
  y /= 100;
6631
6703
  z /= 108.883;
6632
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6633
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6634
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
6635
- const l = 116 * y - 16;
6704
+ x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6705
+ y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6706
+ z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
6707
+ const l2 = 116 * y - 16;
6636
6708
  const a2 = 500 * (x - y);
6637
6709
  const b = 200 * (y - z);
6638
- return [l, a2, b];
6710
+ return [l2, a2, b];
6711
+ };
6712
+ convert.xyz.oklab = function(xyz) {
6713
+ const x = xyz[0] / 100;
6714
+ const y = xyz[1] / 100;
6715
+ const z = xyz[2] / 100;
6716
+ const lp = Math.cbrt(0.8189330101 * x + 0.3618667424 * y - 0.1288597137 * z);
6717
+ const mp = Math.cbrt(0.0329845436 * x + 0.9293118715 * y + 0.0361456387 * z);
6718
+ const sp = Math.cbrt(0.0482003018 * x + 0.2643662691 * y + 0.633851707 * z);
6719
+ const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6720
+ const a2 = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
6721
+ const b = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
6722
+ return [l2 * 100, a2 * 100, b * 100];
6723
+ };
6724
+ convert.oklab.oklch = function(oklab) {
6725
+ return convert.lab.lch(oklab);
6726
+ };
6727
+ convert.oklab.xyz = function(oklab) {
6728
+ const ll = oklab[0] / 100;
6729
+ const a2 = oklab[1] / 100;
6730
+ const b = oklab[2] / 100;
6731
+ const l2 = (0.999999998 * ll + 0.396337792 * a2 + 0.215803758 * b) ** 3;
6732
+ const m3 = (1.000000008 * ll - 0.105561342 * a2 - 0.063854175 * b) ** 3;
6733
+ const s = (1.000000055 * ll - 0.089484182 * a2 - 1.291485538 * b) ** 3;
6734
+ const x = 1.227013851 * l2 - 0.55779998 * m3 + 0.281256149 * s;
6735
+ const y = -0.040580178 * l2 + 1.11225687 * m3 - 0.071676679 * s;
6736
+ const z = -0.076381285 * l2 - 0.421481978 * m3 + 1.58616322 * s;
6737
+ return [x * 100, y * 100, z * 100];
6738
+ };
6739
+ convert.oklab.rgb = function(oklab) {
6740
+ const ll = oklab[0] / 100;
6741
+ const aa = oklab[1] / 100;
6742
+ const bb = oklab[2] / 100;
6743
+ const l2 = (ll + 0.3963377774 * aa + 0.2158037573 * bb) ** 3;
6744
+ const m3 = (ll - 0.1055613458 * aa - 0.0638541728 * bb) ** 3;
6745
+ const s = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
6746
+ const r = srgbNonlinearTransform(4.0767416621 * l2 - 3.3077115913 * m3 + 0.2309699292 * s);
6747
+ const g = srgbNonlinearTransform(-1.2684380046 * l2 + 2.6097574011 * m3 - 0.3413193965 * s);
6748
+ const b = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m3 + 1.707614701 * s);
6749
+ return [r * 255, g * 255, b * 255];
6750
+ };
6751
+ convert.oklch.oklab = function(oklch) {
6752
+ return convert.lch.lab(oklch);
6639
6753
  };
6640
6754
  convert.lab.xyz = function(lab) {
6641
- const l = lab[0];
6755
+ const l2 = lab[0];
6642
6756
  const a2 = lab[1];
6643
6757
  const b = lab[2];
6644
6758
  let x;
6645
6759
  let y;
6646
6760
  let z;
6647
- y = (l + 16) / 116;
6761
+ y = (l2 + 16) / 116;
6648
6762
  x = a2 / 500 + y;
6649
6763
  z = y - b / 200;
6650
6764
  const y2 = y ** 3;
6651
6765
  const x2 = x ** 3;
6652
6766
  const z2 = z ** 3;
6653
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
6654
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
6655
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
6767
+ y = y2 > LAB_FT ? y2 : (y - 16 / 116) / 7.787;
6768
+ x = x2 > LAB_FT ? x2 : (x - 16 / 116) / 7.787;
6769
+ z = z2 > LAB_FT ? z2 : (z - 16 / 116) / 7.787;
6656
6770
  x *= 95.047;
6657
6771
  y *= 100;
6658
6772
  z *= 108.883;
6659
6773
  return [x, y, z];
6660
6774
  };
6661
6775
  convert.lab.lch = function(lab) {
6662
- const l = lab[0];
6776
+ const l2 = lab[0];
6663
6777
  const a2 = lab[1];
6664
6778
  const b = lab[2];
6665
- let h2;
6779
+ let h4;
6666
6780
  const hr = Math.atan2(b, a2);
6667
- h2 = hr * 360 / 2 / Math.PI;
6668
- if (h2 < 0) {
6669
- h2 += 360;
6781
+ h4 = hr * 360 / 2 / Math.PI;
6782
+ if (h4 < 0) {
6783
+ h4 += 360;
6670
6784
  }
6671
- const c2 = Math.sqrt(a2 * a2 + b * b);
6672
- return [l, c2, h2];
6785
+ const c3 = Math.sqrt(a2 * a2 + b * b);
6786
+ return [l2, c3, h4];
6673
6787
  };
6674
6788
  convert.lch.lab = function(lch) {
6675
- const l = lch[0];
6676
- const c2 = lch[1];
6677
- const h2 = lch[2];
6678
- const hr = h2 / 360 * 2 * Math.PI;
6679
- const a2 = c2 * Math.cos(hr);
6680
- const b = c2 * Math.sin(hr);
6681
- return [l, a2, b];
6789
+ const l2 = lch[0];
6790
+ const c3 = lch[1];
6791
+ const h4 = lch[2];
6792
+ const hr = h4 / 360 * 2 * Math.PI;
6793
+ const a2 = c3 * Math.cos(hr);
6794
+ const b = c3 * Math.sin(hr);
6795
+ return [l2, a2, b];
6682
6796
  };
6683
6797
  convert.rgb.ansi16 = function(args, saturation = null) {
6684
6798
  const [r, g, b] = args;
@@ -6700,7 +6814,7 @@ var require_conversions = __commonJS({
6700
6814
  const r = args[0];
6701
6815
  const g = args[1];
6702
6816
  const b = args[2];
6703
- if (r === g && g === b) {
6817
+ if (r >> 4 === g >> 4 && g >> 4 === b >> 4) {
6704
6818
  if (r < 8) {
6705
6819
  return 16;
6706
6820
  }
@@ -6713,6 +6827,7 @@ var require_conversions = __commonJS({
6713
6827
  return ansi;
6714
6828
  };
6715
6829
  convert.ansi16.rgb = function(args) {
6830
+ args = args[0];
6716
6831
  let color = args % 10;
6717
6832
  if (color === 0 || color === 7) {
6718
6833
  if (args > 50) {
@@ -6721,16 +6836,17 @@ var require_conversions = __commonJS({
6721
6836
  color = color / 10.5 * 255;
6722
6837
  return [color, color, color];
6723
6838
  }
6724
- const mult = (~~(args > 50) + 1) * 0.5;
6839
+ const mult = (Math.trunc(args > 50) + 1) * 0.5;
6725
6840
  const r = (color & 1) * mult * 255;
6726
6841
  const g = (color >> 1 & 1) * mult * 255;
6727
6842
  const b = (color >> 2 & 1) * mult * 255;
6728
6843
  return [r, g, b];
6729
6844
  };
6730
6845
  convert.ansi256.rgb = function(args) {
6846
+ args = args[0];
6731
6847
  if (args >= 232) {
6732
- const c2 = (args - 232) * 10 + 8;
6733
- return [c2, c2, c2];
6848
+ const c3 = (args - 232) * 10 + 8;
6849
+ return [c3, c3, c3];
6734
6850
  }
6735
6851
  args -= 16;
6736
6852
  let rem;
@@ -6742,20 +6858,18 @@ var require_conversions = __commonJS({
6742
6858
  convert.rgb.hex = function(args) {
6743
6859
  const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
6744
6860
  const string = integer.toString(16).toUpperCase();
6745
- return "000000".substring(string.length) + string;
6861
+ return "000000".slice(string.length) + string;
6746
6862
  };
6747
6863
  convert.hex.rgb = function(args) {
6748
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
6864
+ const match = args.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);
6749
6865
  if (!match) {
6750
6866
  return [0, 0, 0];
6751
6867
  }
6752
6868
  let colorString = match[0];
6753
6869
  if (match[0].length === 3) {
6754
- colorString = colorString.split("").map((char) => {
6755
- return char + char;
6756
- }).join("");
6870
+ colorString = [...colorString].map((char) => char + char).join("");
6757
6871
  }
6758
- const integer = parseInt(colorString, 16);
6872
+ const integer = Number.parseInt(colorString, 16);
6759
6873
  const r = integer >> 16 & 255;
6760
6874
  const g = integer >> 8 & 255;
6761
6875
  const b = integer & 255;
@@ -6768,13 +6882,8 @@ var require_conversions = __commonJS({
6768
6882
  const max = Math.max(Math.max(r, g), b);
6769
6883
  const min = Math.min(Math.min(r, g), b);
6770
6884
  const chroma = max - min;
6771
- let grayscale;
6772
6885
  let hue;
6773
- if (chroma < 1) {
6774
- grayscale = min / (1 - chroma);
6775
- } else {
6776
- grayscale = 0;
6777
- }
6886
+ const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
6778
6887
  if (chroma <= 0) {
6779
6888
  hue = 0;
6780
6889
  } else if (max === r) {
@@ -6789,113 +6898,119 @@ var require_conversions = __commonJS({
6789
6898
  return [hue * 360, chroma * 100, grayscale * 100];
6790
6899
  };
6791
6900
  convert.hsl.hcg = function(hsl) {
6792
- const s2 = hsl[1] / 100;
6793
- const l = hsl[2] / 100;
6794
- const c2 = l < 0.5 ? 2 * s2 * l : 2 * s2 * (1 - l);
6901
+ const s = hsl[1] / 100;
6902
+ const l2 = hsl[2] / 100;
6903
+ const c3 = l2 < 0.5 ? 2 * s * l2 : 2 * s * (1 - l2);
6795
6904
  let f2 = 0;
6796
- if (c2 < 1) {
6797
- f2 = (l - 0.5 * c2) / (1 - c2);
6905
+ if (c3 < 1) {
6906
+ f2 = (l2 - 0.5 * c3) / (1 - c3);
6798
6907
  }
6799
- return [hsl[0], c2 * 100, f2 * 100];
6908
+ return [hsl[0], c3 * 100, f2 * 100];
6800
6909
  };
6801
6910
  convert.hsv.hcg = function(hsv) {
6802
- const s2 = hsv[1] / 100;
6911
+ const s = hsv[1] / 100;
6803
6912
  const v = hsv[2] / 100;
6804
- const c2 = s2 * v;
6913
+ const c3 = s * v;
6805
6914
  let f2 = 0;
6806
- if (c2 < 1) {
6807
- f2 = (v - c2) / (1 - c2);
6915
+ if (c3 < 1) {
6916
+ f2 = (v - c3) / (1 - c3);
6808
6917
  }
6809
- return [hsv[0], c2 * 100, f2 * 100];
6918
+ return [hsv[0], c3 * 100, f2 * 100];
6810
6919
  };
6811
6920
  convert.hcg.rgb = function(hcg) {
6812
- const h2 = hcg[0] / 360;
6813
- const c2 = hcg[1] / 100;
6921
+ const h4 = hcg[0] / 360;
6922
+ const c3 = hcg[1] / 100;
6814
6923
  const g = hcg[2] / 100;
6815
- if (c2 === 0) {
6924
+ if (c3 === 0) {
6816
6925
  return [g * 255, g * 255, g * 255];
6817
6926
  }
6818
6927
  const pure = [0, 0, 0];
6819
- const hi = h2 % 1 * 6;
6928
+ const hi = h4 % 1 * 6;
6820
6929
  const v = hi % 1;
6821
6930
  const w = 1 - v;
6822
6931
  let mg = 0;
6823
6932
  switch (Math.floor(hi)) {
6824
- case 0:
6933
+ case 0: {
6825
6934
  pure[0] = 1;
6826
6935
  pure[1] = v;
6827
6936
  pure[2] = 0;
6828
6937
  break;
6829
- case 1:
6938
+ }
6939
+ case 1: {
6830
6940
  pure[0] = w;
6831
6941
  pure[1] = 1;
6832
6942
  pure[2] = 0;
6833
6943
  break;
6834
- case 2:
6944
+ }
6945
+ case 2: {
6835
6946
  pure[0] = 0;
6836
6947
  pure[1] = 1;
6837
6948
  pure[2] = v;
6838
6949
  break;
6839
- case 3:
6950
+ }
6951
+ case 3: {
6840
6952
  pure[0] = 0;
6841
6953
  pure[1] = w;
6842
6954
  pure[2] = 1;
6843
6955
  break;
6844
- case 4:
6956
+ }
6957
+ case 4: {
6845
6958
  pure[0] = v;
6846
6959
  pure[1] = 0;
6847
6960
  pure[2] = 1;
6848
6961
  break;
6849
- default:
6962
+ }
6963
+ default: {
6850
6964
  pure[0] = 1;
6851
6965
  pure[1] = 0;
6852
6966
  pure[2] = w;
6967
+ }
6853
6968
  }
6854
- mg = (1 - c2) * g;
6969
+ mg = (1 - c3) * g;
6855
6970
  return [
6856
- (c2 * pure[0] + mg) * 255,
6857
- (c2 * pure[1] + mg) * 255,
6858
- (c2 * pure[2] + mg) * 255
6971
+ (c3 * pure[0] + mg) * 255,
6972
+ (c3 * pure[1] + mg) * 255,
6973
+ (c3 * pure[2] + mg) * 255
6859
6974
  ];
6860
6975
  };
6861
6976
  convert.hcg.hsv = function(hcg) {
6862
- const c2 = hcg[1] / 100;
6977
+ const c3 = hcg[1] / 100;
6863
6978
  const g = hcg[2] / 100;
6864
- const v = c2 + g * (1 - c2);
6979
+ const v = c3 + g * (1 - c3);
6865
6980
  let f2 = 0;
6866
6981
  if (v > 0) {
6867
- f2 = c2 / v;
6982
+ f2 = c3 / v;
6868
6983
  }
6869
6984
  return [hcg[0], f2 * 100, v * 100];
6870
6985
  };
6871
6986
  convert.hcg.hsl = function(hcg) {
6872
- const c2 = hcg[1] / 100;
6987
+ const c3 = hcg[1] / 100;
6873
6988
  const g = hcg[2] / 100;
6874
- const l = g * (1 - c2) + 0.5 * c2;
6875
- let s2 = 0;
6876
- if (l > 0 && l < 0.5) {
6877
- s2 = c2 / (2 * l);
6878
- } else if (l >= 0.5 && l < 1) {
6879
- s2 = c2 / (2 * (1 - l));
6989
+ const l2 = g * (1 - c3) + 0.5 * c3;
6990
+ let s = 0;
6991
+ if (l2 > 0 && l2 < 0.5) {
6992
+ s = c3 / (2 * l2);
6993
+ } else if (l2 >= 0.5 && l2 < 1) {
6994
+ s = c3 / (2 * (1 - l2));
6880
6995
  }
6881
- return [hcg[0], s2 * 100, l * 100];
6996
+ return [hcg[0], s * 100, l2 * 100];
6882
6997
  };
6883
6998
  convert.hcg.hwb = function(hcg) {
6884
- const c2 = hcg[1] / 100;
6999
+ const c3 = hcg[1] / 100;
6885
7000
  const g = hcg[2] / 100;
6886
- const v = c2 + g * (1 - c2);
6887
- return [hcg[0], (v - c2) * 100, (1 - v) * 100];
7001
+ const v = c3 + g * (1 - c3);
7002
+ return [hcg[0], (v - c3) * 100, (1 - v) * 100];
6888
7003
  };
6889
7004
  convert.hwb.hcg = function(hwb) {
6890
7005
  const w = hwb[1] / 100;
6891
7006
  const b = hwb[2] / 100;
6892
7007
  const v = 1 - b;
6893
- const c2 = v - w;
7008
+ const c3 = v - w;
6894
7009
  let g = 0;
6895
- if (c2 < 1) {
6896
- g = (v - c2) / (1 - c2);
7010
+ if (c3 < 1) {
7011
+ g = (v - c3) / (1 - c3);
6897
7012
  }
6898
- return [hwb[0], c2 * 100, g * 100];
7013
+ return [hwb[0], c3 * 100, g * 100];
6899
7014
  };
6900
7015
  convert.apple.rgb = function(apple) {
6901
7016
  return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
@@ -6920,28 +7035,20 @@ var require_conversions = __commonJS({
6920
7035
  return [gray[0], 0, 0];
6921
7036
  };
6922
7037
  convert.gray.hex = function(gray) {
6923
- const val = Math.round(gray[0] / 100 * 255) & 255;
6924
- const integer = (val << 16) + (val << 8) + val;
7038
+ const value = Math.round(gray[0] / 100 * 255) & 255;
7039
+ const integer = (value << 16) + (value << 8) + value;
6925
7040
  const string = integer.toString(16).toUpperCase();
6926
- return "000000".substring(string.length) + string;
7041
+ return "000000".slice(string.length) + string;
6927
7042
  };
6928
7043
  convert.rgb.gray = function(rgb) {
6929
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
6930
- return [val / 255 * 100];
7044
+ const value = (rgb[0] + rgb[1] + rgb[2]) / 3;
7045
+ return [value / 255 * 100];
6931
7046
  };
6932
- }
6933
- });
6934
-
6935
- // ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
6936
- var require_route = __commonJS({
6937
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) {
6938
- "use strict";
6939
- var conversions = require_conversions();
6940
7047
  function buildGraph() {
6941
7048
  const graph = {};
6942
- const models = Object.keys(conversions);
6943
- for (let len = models.length, i2 = 0; i2 < len; i2++) {
6944
- graph[models[i2]] = {
7049
+ const models2 = Object.keys(conversions_default);
7050
+ for (let { length } = models2, i3 = 0; i3 < length; i3++) {
7051
+ graph[models2[i3]] = {
6945
7052
  // http://jsperf.com/1-vs-infinity
6946
7053
  // micro-opt, but this is simple.
6947
7054
  distance: -1,
@@ -6954,11 +7061,11 @@ var require_route = __commonJS({
6954
7061
  const graph = buildGraph();
6955
7062
  const queue = [fromModel];
6956
7063
  graph[fromModel].distance = 0;
6957
- while (queue.length) {
7064
+ while (queue.length > 0) {
6958
7065
  const current = queue.pop();
6959
- const adjacents = Object.keys(conversions[current]);
6960
- for (let len = adjacents.length, i2 = 0; i2 < len; i2++) {
6961
- const adjacent = adjacents[i2];
7066
+ const adjacents = Object.keys(conversions_default[current]);
7067
+ for (let { length } = adjacents, i3 = 0; i3 < length; i3++) {
7068
+ const adjacent = adjacents[i3];
6962
7069
  const node = graph[adjacent];
6963
7070
  if (node.distance === -1) {
6964
7071
  node.distance = graph[current].distance + 1;
@@ -6976,22 +7083,22 @@ var require_route = __commonJS({
6976
7083
  }
6977
7084
  function wrapConversion(toModel, graph) {
6978
7085
  const path = [graph[toModel].parent, toModel];
6979
- let fn = conversions[graph[toModel].parent][toModel];
7086
+ let fn = conversions_default[graph[toModel].parent][toModel];
6980
7087
  let cur = graph[toModel].parent;
6981
7088
  while (graph[cur].parent) {
6982
7089
  path.unshift(graph[cur].parent);
6983
- fn = link(conversions[graph[cur].parent][cur], fn);
7090
+ fn = link(conversions_default[graph[cur].parent][cur], fn);
6984
7091
  cur = graph[cur].parent;
6985
7092
  }
6986
7093
  fn.conversion = path;
6987
7094
  return fn;
6988
7095
  }
6989
- module2.exports = function(fromModel) {
7096
+ function route(fromModel) {
6990
7097
  const graph = deriveBFS(fromModel);
6991
7098
  const conversion = {};
6992
- const models = Object.keys(graph);
6993
- for (let len = models.length, i2 = 0; i2 < len; i2++) {
6994
- const toModel = models[i2];
7099
+ const models2 = Object.keys(graph);
7100
+ for (let { length } = models2, i3 = 0; i3 < length; i3++) {
7101
+ const toModel = models2[i3];
6995
7102
  const node = graph[toModel];
6996
7103
  if (node.parent === null) {
6997
7104
  continue;
@@ -6999,18 +7106,10 @@ var require_route = __commonJS({
6999
7106
  conversion[toModel] = wrapConversion(toModel, graph);
7000
7107
  }
7001
7108
  return conversion;
7002
- };
7003
- }
7004
- });
7005
-
7006
- // ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
7007
- var require_color_convert = __commonJS({
7008
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) {
7009
- "use strict";
7010
- var conversions = require_conversions();
7011
- var route = require_route();
7012
- var convert = {};
7013
- var models = Object.keys(conversions);
7109
+ }
7110
+ var route_default = route;
7111
+ var convert2 = {};
7112
+ var models = Object.keys(conversions_default);
7014
7113
  function wrapRaw(fn) {
7015
7114
  const wrappedFn = function(...args) {
7016
7115
  const arg0 = args[0];
@@ -7038,8 +7137,8 @@ var require_color_convert = __commonJS({
7038
7137
  }
7039
7138
  const result = fn(args);
7040
7139
  if (typeof result === "object") {
7041
- for (let len = result.length, i2 = 0; i2 < len; i2++) {
7042
- result[i2] = Math.round(result[i2]);
7140
+ for (let { length } = result, i3 = 0; i3 < length; i3++) {
7141
+ result[i3] = Math.round(result[i3]);
7043
7142
  }
7044
7143
  }
7045
7144
  return result;
@@ -7049,28 +7148,19 @@ var require_color_convert = __commonJS({
7049
7148
  }
7050
7149
  return wrappedFn;
7051
7150
  }
7052
- models.forEach((fromModel) => {
7053
- convert[fromModel] = {};
7054
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
7055
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
7056
- const routes = route(fromModel);
7151
+ for (const fromModel of models) {
7152
+ convert2[fromModel] = {};
7153
+ Object.defineProperty(convert2[fromModel], "channels", { value: conversions_default[fromModel].channels });
7154
+ Object.defineProperty(convert2[fromModel], "labels", { value: conversions_default[fromModel].labels });
7155
+ const routes = route_default(fromModel);
7057
7156
  const routeModels = Object.keys(routes);
7058
- routeModels.forEach((toModel) => {
7157
+ for (const toModel of routeModels) {
7059
7158
  const fn = routes[toModel];
7060
- convert[fromModel][toModel] = wrapRounded(fn);
7061
- convert[fromModel][toModel].raw = wrapRaw(fn);
7062
- });
7063
- });
7064
- module2.exports = convert;
7065
- }
7066
- });
7067
-
7068
- // ../../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js
7069
- var require_color = __commonJS({
7070
- "../../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js"(exports2, module2) {
7071
- "use strict";
7072
- var colorString = require_color_string();
7073
- var convert = require_color_convert();
7159
+ convert2[fromModel][toModel] = wrapRounded(fn);
7160
+ convert2[fromModel][toModel].raw = wrapRaw(fn);
7161
+ }
7162
+ }
7163
+ var color_convert_default = convert2;
7074
7164
  var skippedModels = [
7075
7165
  // To be honest, I don't really feel like keyword belongs in color convert, but eh.
7076
7166
  "keyword",
@@ -7080,8 +7170,8 @@ var require_color = __commonJS({
7080
7170
  "hex"
7081
7171
  ];
7082
7172
  var hashedModelKeys = {};
7083
- for (const model of Object.keys(convert)) {
7084
- hashedModelKeys[[...convert[model].labels].sort().join("")] = model;
7173
+ for (const model of Object.keys(color_convert_default)) {
7174
+ hashedModelKeys[[...color_convert_default[model].labels].sort().join("")] = model;
7085
7175
  }
7086
7176
  var limiters = {};
7087
7177
  function Color(object, model) {
@@ -7091,10 +7181,10 @@ var require_color = __commonJS({
7091
7181
  if (model && model in skippedModels) {
7092
7182
  model = null;
7093
7183
  }
7094
- if (model && !(model in convert)) {
7184
+ if (model && !(model in color_convert_default)) {
7095
7185
  throw new Error("Unknown model: " + model);
7096
7186
  }
7097
- let i2;
7187
+ let i3;
7098
7188
  let channels;
7099
7189
  if (object == null) {
7100
7190
  this.model = "rgb";
@@ -7105,17 +7195,17 @@ var require_color = __commonJS({
7105
7195
  this.color = [...object.color];
7106
7196
  this.valpha = object.valpha;
7107
7197
  } else if (typeof object === "string") {
7108
- const result = colorString.get(object);
7198
+ const result = color_string_default.get(object);
7109
7199
  if (result === null) {
7110
7200
  throw new Error("Unable to parse color from string: " + object);
7111
7201
  }
7112
7202
  this.model = result.model;
7113
- channels = convert[this.model].channels;
7203
+ channels = color_convert_default[this.model].channels;
7114
7204
  this.color = result.value.slice(0, channels);
7115
7205
  this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
7116
7206
  } else if (object.length > 0) {
7117
7207
  this.model = model || "rgb";
7118
- channels = convert[this.model].channels;
7208
+ channels = color_convert_default[this.model].channels;
7119
7209
  const newArray = Array.prototype.slice.call(object, 0, channels);
7120
7210
  this.color = zeroArray(newArray, channels);
7121
7211
  this.valpha = typeof object[channels] === "number" ? object[channels] : 1;
@@ -7139,19 +7229,19 @@ var require_color = __commonJS({
7139
7229
  throw new Error("Unable to parse color from object: " + JSON.stringify(object));
7140
7230
  }
7141
7231
  this.model = hashedModelKeys[hashedKeys];
7142
- const { labels } = convert[this.model];
7232
+ const { labels } = color_convert_default[this.model];
7143
7233
  const color = [];
7144
- for (i2 = 0; i2 < labels.length; i2++) {
7145
- color.push(object[labels[i2]]);
7234
+ for (i3 = 0; i3 < labels.length; i3++) {
7235
+ color.push(object[labels[i3]]);
7146
7236
  }
7147
7237
  this.color = zeroArray(color);
7148
7238
  }
7149
7239
  if (limiters[this.model]) {
7150
- channels = convert[this.model].channels;
7151
- for (i2 = 0; i2 < channels; i2++) {
7152
- const limit = limiters[this.model][i2];
7240
+ channels = color_convert_default[this.model].channels;
7241
+ for (i3 = 0; i3 < channels; i3++) {
7242
+ const limit = limiters[this.model][i3];
7153
7243
  if (limit) {
7154
- this.color[i2] = limit(this.color[i2]);
7244
+ this.color[i3] = limit(this.color[i3]);
7155
7245
  }
7156
7246
  }
7157
7247
  }
@@ -7168,25 +7258,25 @@ var require_color = __commonJS({
7168
7258
  return this[this.model]();
7169
7259
  },
7170
7260
  string(places) {
7171
- let self = this.model in colorString.to ? this : this.rgb();
7172
- self = self.round(typeof places === "number" ? places : 1);
7173
- const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7174
- return colorString.to[self.model](args);
7261
+ let self2 = this.model in color_string_default.to ? this : this.rgb();
7262
+ self2 = self2.round(typeof places === "number" ? places : 1);
7263
+ const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
7264
+ return color_string_default.to[self2.model](...arguments_);
7175
7265
  },
7176
7266
  percentString(places) {
7177
- const self = this.rgb().round(typeof places === "number" ? places : 1);
7178
- const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7179
- return colorString.to.rgb.percent(args);
7267
+ const self2 = this.rgb().round(typeof places === "number" ? places : 1);
7268
+ const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
7269
+ return color_string_default.to.rgb.percent(...arguments_);
7180
7270
  },
7181
7271
  array() {
7182
7272
  return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
7183
7273
  },
7184
7274
  object() {
7185
7275
  const result = {};
7186
- const { channels } = convert[this.model];
7187
- const { labels } = convert[this.model];
7188
- for (let i2 = 0; i2 < channels; i2++) {
7189
- result[labels[i2]] = this.color[i2];
7276
+ const { channels } = color_convert_default[this.model];
7277
+ const { labels } = color_convert_default[this.model];
7278
+ for (let i3 = 0; i3 < channels; i3++) {
7279
+ result[labels[i3]] = this.color[i3];
7190
7280
  }
7191
7281
  if (this.valpha !== 1) {
7192
7282
  result.alpha = this.valpha;
@@ -7250,13 +7340,13 @@ var require_color = __commonJS({
7250
7340
  if (value !== void 0) {
7251
7341
  return new Color(value);
7252
7342
  }
7253
- return convert[this.model].keyword(this.color);
7343
+ return color_convert_default[this.model].keyword(this.color);
7254
7344
  },
7255
7345
  hex(value) {
7256
7346
  if (value !== void 0) {
7257
7347
  return new Color(value);
7258
7348
  }
7259
- return colorString.to.hex(this.rgb().round().color);
7349
+ return color_string_default.to.hex(...this.rgb().round().color);
7260
7350
  },
7261
7351
  hexa(value) {
7262
7352
  if (value !== void 0) {
@@ -7267,7 +7357,7 @@ var require_color = __commonJS({
7267
7357
  if (alphaHex.length === 1) {
7268
7358
  alphaHex = "0" + alphaHex;
7269
7359
  }
7270
- return colorString.to.hex(rgbArray) + alphaHex;
7360
+ return color_string_default.to.hex(...rgbArray) + alphaHex;
7271
7361
  },
7272
7362
  rgbNumber() {
7273
7363
  const rgb = this.rgb().color;
@@ -7276,9 +7366,9 @@ var require_color = __commonJS({
7276
7366
  luminosity() {
7277
7367
  const rgb = this.rgb().color;
7278
7368
  const lum = [];
7279
- for (const [i2, element] of rgb.entries()) {
7369
+ for (const [i3, element] of rgb.entries()) {
7280
7370
  const chan = element / 255;
7281
- lum[i2] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
7371
+ lum[i3] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
7282
7372
  }
7283
7373
  return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
7284
7374
  },
@@ -7307,8 +7397,8 @@ var require_color = __commonJS({
7307
7397
  },
7308
7398
  negate() {
7309
7399
  const rgb = this.rgb();
7310
- for (let i2 = 0; i2 < 3; i2++) {
7311
- rgb.color[i2] = 255 - rgb.color[i2];
7400
+ for (let i3 = 0; i3 < 3; i3++) {
7401
+ rgb.color[i3] = 255 - rgb.color[i3];
7312
7402
  }
7313
7403
  return rgb;
7314
7404
  },
@@ -7367,8 +7457,8 @@ var require_color = __commonJS({
7367
7457
  }
7368
7458
  const color1 = mixinColor.rgb();
7369
7459
  const color2 = this.rgb();
7370
- const p2 = weight === void 0 ? 0.5 : weight;
7371
- const w = 2 * p2 - 1;
7460
+ const p3 = weight === void 0 ? 0.5 : weight;
7461
+ const w = 2 * p3 - 1;
7372
7462
  const a2 = color1.alpha() - color2.alpha();
7373
7463
  const w1 = ((w * a2 === -1 ? w : (w + a2) / (1 + w * a2)) + 1) / 2;
7374
7464
  const w2 = 1 - w1;
@@ -7376,28 +7466,28 @@ var require_color = __commonJS({
7376
7466
  w1 * color1.red() + w2 * color2.red(),
7377
7467
  w1 * color1.green() + w2 * color2.green(),
7378
7468
  w1 * color1.blue() + w2 * color2.blue(),
7379
- color1.alpha() * p2 + color2.alpha() * (1 - p2)
7469
+ color1.alpha() * p3 + color2.alpha() * (1 - p3)
7380
7470
  );
7381
7471
  }
7382
7472
  };
7383
- for (const model of Object.keys(convert)) {
7473
+ for (const model of Object.keys(color_convert_default)) {
7384
7474
  if (skippedModels.includes(model)) {
7385
7475
  continue;
7386
7476
  }
7387
- const { channels } = convert[model];
7388
- Color.prototype[model] = function(...args) {
7477
+ const { channels } = color_convert_default[model];
7478
+ Color.prototype[model] = function(...arguments_) {
7389
7479
  if (this.model === model) {
7390
7480
  return new Color(this);
7391
7481
  }
7392
- if (args.length > 0) {
7393
- return new Color(args, model);
7482
+ if (arguments_.length > 0) {
7483
+ return new Color(arguments_, model);
7394
7484
  }
7395
- return new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);
7485
+ return new Color([...assertArray(color_convert_default[this.model][model].raw(this.color)), this.valpha], model);
7396
7486
  };
7397
- Color[model] = function(...args) {
7398
- let color = args[0];
7487
+ Color[model] = function(...arguments_) {
7488
+ let color = arguments_[0];
7399
7489
  if (typeof color === "number") {
7400
- color = zeroArray(args, channels);
7490
+ color = zeroArray(arguments_, channels);
7401
7491
  }
7402
7492
  return new Color(color, model);
7403
7493
  };
@@ -7412,8 +7502,8 @@ var require_color = __commonJS({
7412
7502
  }
7413
7503
  function getset(model, channel, modifier) {
7414
7504
  model = Array.isArray(model) ? model : [model];
7415
- for (const m2 of model) {
7416
- (limiters[m2] || (limiters[m2] = []))[channel] = modifier;
7505
+ for (const m3 of model) {
7506
+ (limiters[m3] || (limiters[m3] = []))[channel] = modifier;
7417
7507
  }
7418
7508
  model = model[0];
7419
7509
  return function(value) {
@@ -7442,22 +7532,30 @@ var require_color = __commonJS({
7442
7532
  return Array.isArray(value) ? value : [value];
7443
7533
  }
7444
7534
  function zeroArray(array, length) {
7445
- for (let i2 = 0; i2 < length; i2++) {
7446
- if (typeof array[i2] !== "number") {
7447
- array[i2] = 0;
7535
+ for (let i3 = 0; i3 < length; i3++) {
7536
+ if (typeof array[i3] !== "number") {
7537
+ array[i3] = 0;
7448
7538
  }
7449
7539
  }
7450
7540
  return array;
7451
7541
  }
7452
- module2.exports = Color;
7542
+ var index_default = Color;
7453
7543
  }
7454
7544
  });
7455
7545
 
7456
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/colour.js
7546
+ // ../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/index.cjs
7457
7547
  var require_colour = __commonJS({
7458
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/colour.js"(exports2, module2) {
7548
+ "../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/index.cjs"(exports2, module2) {
7549
+ "use strict";
7550
+ module2.exports = require_color().default;
7551
+ }
7552
+ });
7553
+
7554
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/colour.js
7555
+ var require_colour2 = __commonJS({
7556
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/colour.js"(exports2, module2) {
7459
7557
  "use strict";
7460
- var color = require_color();
7558
+ var color = require_colour();
7461
7559
  var is = require_is();
7462
7560
  var colourspace = {
7463
7561
  multiband: "multiband",
@@ -7498,7 +7596,7 @@ var require_colour = __commonJS({
7498
7596
  return this.toColourspace(colorspace);
7499
7597
  }
7500
7598
  function _getBackgroundColourOption(value) {
7501
- if (is.object(value) || is.string(value)) {
7599
+ if (is.object(value) || is.string(value) && value.length >= 3 && value.length <= 200) {
7502
7600
  const colour = color(value);
7503
7601
  return [
7504
7602
  colour.red(),
@@ -7515,7 +7613,7 @@ var require_colour = __commonJS({
7515
7613
  this.options[key] = _getBackgroundColourOption(value);
7516
7614
  }
7517
7615
  }
7518
- module2.exports = function(Sharp) {
7616
+ module2.exports = (Sharp) => {
7519
7617
  Object.assign(Sharp.prototype, {
7520
7618
  // Public
7521
7619
  tint,
@@ -7535,9 +7633,9 @@ var require_colour = __commonJS({
7535
7633
  }
7536
7634
  });
7537
7635
 
7538
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/channel.js
7636
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/channel.js
7539
7637
  var require_channel = __commonJS({
7540
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/channel.js"(exports2, module2) {
7638
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/channel.js"(exports2, module2) {
7541
7639
  "use strict";
7542
7640
  var is = require_is();
7543
7641
  var bool = {
@@ -7591,7 +7689,7 @@ var require_channel = __commonJS({
7591
7689
  }
7592
7690
  return this;
7593
7691
  }
7594
- module2.exports = function(Sharp) {
7692
+ module2.exports = (Sharp) => {
7595
7693
  Object.assign(Sharp.prototype, {
7596
7694
  // Public instance functions
7597
7695
  removeAlpha,
@@ -7605,9 +7703,9 @@ var require_channel = __commonJS({
7605
7703
  }
7606
7704
  });
7607
7705
 
7608
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/output.js
7706
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/output.js
7609
7707
  var require_output = __commonJS({
7610
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/output.js"(exports2, module2) {
7708
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/output.js"(exports2, module2) {
7611
7709
  "use strict";
7612
7710
  var path = require("path");
7613
7711
  var is = require_is();
@@ -8116,6 +8214,9 @@ var require_output = __commonJS({
8116
8214
  throw is.invalidParameterError("compression", "one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k", options.compression);
8117
8215
  }
8118
8216
  }
8217
+ if (is.defined(options.bigtiff)) {
8218
+ this._setBooleanOption("tiffBigtiff", options.bigtiff);
8219
+ }
8119
8220
  if (is.defined(options.predictor)) {
8120
8221
  if (is.string(options.predictor) && is.inArray(options.predictor, ["none", "horizontal", "float"])) {
8121
8222
  this.options.tiffPredictor = options.predictor;
@@ -8444,7 +8545,7 @@ var require_output = __commonJS({
8444
8545
  }
8445
8546
  }
8446
8547
  }
8447
- module2.exports = function(Sharp) {
8548
+ module2.exports = (Sharp) => {
8448
8549
  Object.assign(Sharp.prototype, {
8449
8550
  // Public
8450
8551
  toFile,
@@ -8481,9 +8582,9 @@ var require_output = __commonJS({
8481
8582
  }
8482
8583
  });
8483
8584
 
8484
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/utility.js
8585
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/utility.js
8485
8586
  var require_utility = __commonJS({
8486
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/utility.js"(exports2, module2) {
8587
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/utility.js"(exports2, module2) {
8487
8588
  "use strict";
8488
8589
  var events = require("events");
8489
8590
  var detectLibc = require_detect_libc();
@@ -8587,7 +8688,7 @@ var require_utility = __commonJS({
8587
8688
  throw is.invalidParameterError("options", "object", options);
8588
8689
  }
8589
8690
  }
8590
- module2.exports = function(Sharp) {
8691
+ module2.exports = (Sharp) => {
8591
8692
  Sharp.cache = cache;
8592
8693
  Sharp.concurrency = concurrency;
8593
8694
  Sharp.counters = counters;
@@ -8602,16 +8703,16 @@ var require_utility = __commonJS({
8602
8703
  }
8603
8704
  });
8604
8705
 
8605
- // ../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/index.js
8706
+ // ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/index.js
8606
8707
  var require_lib = __commonJS({
8607
- "../../node_modules/.pnpm/sharp@0.34.3/node_modules/sharp/lib/index.js"(exports2, module2) {
8708
+ "../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/index.js"(exports2, module2) {
8608
8709
  "use strict";
8609
8710
  var Sharp = require_constructor();
8610
8711
  require_input()(Sharp);
8611
8712
  require_resize()(Sharp);
8612
8713
  require_composite()(Sharp);
8613
8714
  require_operation()(Sharp);
8614
- require_colour()(Sharp);
8715
+ require_colour2()(Sharp);
8615
8716
  require_channel()(Sharp);
8616
8717
  require_output()(Sharp);
8617
8718
  require_utility()(Sharp);
@@ -8619,32 +8720,32 @@ var require_lib = __commonJS({
8619
8720
  }
8620
8721
  });
8621
8722
 
8622
- // ../sharp-transformer/dist/index.mjs
8723
+ // ../codec-sharp/dist/index.mjs
8623
8724
  var dist_exports2 = {};
8624
8725
  __export(dist_exports2, {
8625
- default: () => f,
8626
- sharpTransformer: () => o
8726
+ codecSharp: () => o,
8727
+ default: () => f
8627
8728
  });
8628
- async function a(e) {
8729
+ async function a(r) {
8629
8730
  try {
8630
- let r = await (0, import_sharp.default)(e).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
8631
- if (!r.info.width || !r.info.height) throw new Error(`Invalid image dimensions: ${e}`);
8632
- return { data: r.data, width: r.info.width, height: r.info.height };
8633
- } catch (r) {
8634
- throw new Error(`Failed to read image file ${e}: ${r}`);
8731
+ let e = await (0, import_sharp.default)(r).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
8732
+ if (!e.info.width || !e.info.height) throw new Error(`Invalid image dimensions: ${r}`);
8733
+ return { data: e.data, width: e.info.width, height: e.info.height };
8734
+ } catch (e) {
8735
+ throw new Error(`Failed to read image file ${r}: ${e}`);
8635
8736
  }
8636
8737
  }
8637
- async function n(e, r) {
8738
+ async function n(r, e) {
8638
8739
  try {
8639
- let t = (0, import_sharp.default)(e.data, { raw: { width: e.width, height: e.height, channels: 4 } });
8640
- typeof r == "string" ? await t.png().toFile(r) : r.set(await t.png().toBuffer());
8740
+ let t = (0, import_sharp.default)(r.data, { raw: { width: r.width, height: r.height, channels: 4 } });
8741
+ typeof e == "string" ? await t.png().toFile(e) : e.set(await t.png().toBuffer());
8641
8742
  } catch (t) {
8642
- throw new Error(`Failed to write image file ${r}: ${t}`);
8743
+ throw new Error(`Failed to write image file ${e}: ${t}`);
8643
8744
  }
8644
8745
  }
8645
8746
  var import_sharp, o, f;
8646
8747
  var init_dist2 = __esm({
8647
- "../sharp-transformer/dist/index.mjs"() {
8748
+ "../codec-sharp/dist/index.mjs"() {
8648
8749
  "use strict";
8649
8750
  import_sharp = __toESM(require_lib(), 1);
8650
8751
  o = { read: a, write: n };
@@ -8652,6 +8753,366 @@ var init_dist2 = __esm({
8652
8753
  }
8653
8754
  });
8654
8755
 
8756
+ // ../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/codec/pkg/squoosh_png.js
8757
+ function addHeapObject(obj) {
8758
+ if (heap_next === heap.length) heap.push(heap.length + 1);
8759
+ const idx = heap_next;
8760
+ heap_next = heap[idx];
8761
+ heap[idx] = obj;
8762
+ return idx;
8763
+ }
8764
+ function getObject(idx) {
8765
+ return heap[idx];
8766
+ }
8767
+ function dropObject(idx) {
8768
+ if (idx < 132) return;
8769
+ heap[idx] = heap_next;
8770
+ heap_next = idx;
8771
+ }
8772
+ function takeObject(idx) {
8773
+ const ret = getObject(idx);
8774
+ dropObject(idx);
8775
+ return ret;
8776
+ }
8777
+ function getUint8Memory0() {
8778
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
8779
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
8780
+ }
8781
+ return cachedUint8Memory0;
8782
+ }
8783
+ function getStringFromWasm0(ptr, len) {
8784
+ ptr = ptr >>> 0;
8785
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
8786
+ }
8787
+ function getUint8ClampedMemory0() {
8788
+ if (cachedUint8ClampedMemory0 === null || cachedUint8ClampedMemory0.byteLength === 0) {
8789
+ cachedUint8ClampedMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
8790
+ }
8791
+ return cachedUint8ClampedMemory0;
8792
+ }
8793
+ function getClampedArrayU8FromWasm0(ptr, len) {
8794
+ ptr = ptr >>> 0;
8795
+ return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);
8796
+ }
8797
+ function passArray8ToWasm0(arg, malloc) {
8798
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
8799
+ getUint8Memory0().set(arg, ptr / 1);
8800
+ WASM_VECTOR_LEN = arg.length;
8801
+ return ptr;
8802
+ }
8803
+ function getInt32Memory0() {
8804
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
8805
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
8806
+ }
8807
+ return cachedInt32Memory0;
8808
+ }
8809
+ function getArrayU8FromWasm0(ptr, len) {
8810
+ ptr = ptr >>> 0;
8811
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
8812
+ }
8813
+ function encode(data, width, height, bit_depth) {
8814
+ try {
8815
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
8816
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
8817
+ const len0 = WASM_VECTOR_LEN;
8818
+ wasm.encode(retptr, ptr0, len0, width, height, bit_depth);
8819
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
8820
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
8821
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
8822
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
8823
+ return v2;
8824
+ } finally {
8825
+ wasm.__wbindgen_add_to_stack_pointer(16);
8826
+ }
8827
+ }
8828
+ function decode(data) {
8829
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
8830
+ const len0 = WASM_VECTOR_LEN;
8831
+ const ret = wasm.decode(ptr0, len0);
8832
+ return takeObject(ret);
8833
+ }
8834
+ function decode_rgba16(data) {
8835
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
8836
+ const len0 = WASM_VECTOR_LEN;
8837
+ const ret = wasm.decode_rgba16(ptr0, len0);
8838
+ return ImageDataRGBA16.__wrap(ret);
8839
+ }
8840
+ async function __wbg_load(module2, imports) {
8841
+ if (typeof Response === "function" && module2 instanceof Response) {
8842
+ if (typeof WebAssembly.instantiateStreaming === "function") {
8843
+ try {
8844
+ return await WebAssembly.instantiateStreaming(module2, imports);
8845
+ } catch (e) {
8846
+ if (module2.headers.get("Content-Type") != "application/wasm") {
8847
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
8848
+ } else {
8849
+ throw e;
8850
+ }
8851
+ }
8852
+ }
8853
+ const bytes = await module2.arrayBuffer();
8854
+ return await WebAssembly.instantiate(bytes, imports);
8855
+ } else {
8856
+ const instance = await WebAssembly.instantiate(module2, imports);
8857
+ if (instance instanceof WebAssembly.Instance) {
8858
+ return { instance, module: module2 };
8859
+ } else {
8860
+ return instance;
8861
+ }
8862
+ }
8863
+ }
8864
+ function __wbg_get_imports() {
8865
+ const imports = {};
8866
+ imports.wbg = {};
8867
+ imports.wbg.__wbindgen_memory = function() {
8868
+ const ret = wasm.memory;
8869
+ return addHeapObject(ret);
8870
+ };
8871
+ imports.wbg.__wbg_buffer_a448f833075b71ba = function(arg0) {
8872
+ const ret = getObject(arg0).buffer;
8873
+ return addHeapObject(ret);
8874
+ };
8875
+ imports.wbg.__wbg_newwithbyteoffsetandlength_099217381c451830 = function(arg0, arg1, arg2) {
8876
+ const ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
8877
+ return addHeapObject(ret);
8878
+ };
8879
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
8880
+ takeObject(arg0);
8881
+ };
8882
+ imports.wbg.__wbg_newwithownedu8clampedarrayandsh_91db5987993a08fb = function(arg0, arg1, arg2, arg3) {
8883
+ var v0 = getClampedArrayU8FromWasm0(arg0, arg1).slice();
8884
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
8885
+ const ret = new ImageData(v0, arg2 >>> 0, arg3 >>> 0);
8886
+ return addHeapObject(ret);
8887
+ };
8888
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
8889
+ throw new Error(getStringFromWasm0(arg0, arg1));
8890
+ };
8891
+ return imports;
8892
+ }
8893
+ function __wbg_init_memory(imports, maybe_memory) {
8894
+ }
8895
+ function __wbg_finalize_init(instance, module2) {
8896
+ wasm = instance.exports;
8897
+ __wbg_init.__wbindgen_wasm_module = module2;
8898
+ cachedInt32Memory0 = null;
8899
+ cachedUint8Memory0 = null;
8900
+ cachedUint8ClampedMemory0 = null;
8901
+ return wasm;
8902
+ }
8903
+ async function __wbg_init(input) {
8904
+ if (wasm !== void 0) return wasm;
8905
+ if (typeof input === "undefined") {
8906
+ input = new URL("squoosh_png_bg.wasm", import_meta.url);
8907
+ }
8908
+ const imports = __wbg_get_imports();
8909
+ if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
8910
+ input = fetch(input);
8911
+ }
8912
+ __wbg_init_memory(imports);
8913
+ const { instance, module: module2 } = await __wbg_load(await input, imports);
8914
+ return __wbg_finalize_init(instance, module2);
8915
+ }
8916
+ var import_meta, wasm, heap, heap_next, cachedTextDecoder, cachedUint8Memory0, cachedUint8ClampedMemory0, WASM_VECTOR_LEN, cachedInt32Memory0, ImageDataRGBA16, squoosh_png_default, isServiceWorker, isRunningInCloudFlareWorkers, isRunningInNode;
8917
+ var init_squoosh_png = __esm({
8918
+ "../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/codec/pkg/squoosh_png.js"() {
8919
+ "use strict";
8920
+ import_meta = {};
8921
+ heap = new Array(128).fill(void 0);
8922
+ heap.push(void 0, null, true, false);
8923
+ heap_next = heap.length;
8924
+ cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
8925
+ throw Error("TextDecoder not available");
8926
+ } };
8927
+ if (typeof TextDecoder !== "undefined") {
8928
+ cachedTextDecoder.decode();
8929
+ }
8930
+ cachedUint8Memory0 = null;
8931
+ cachedUint8ClampedMemory0 = null;
8932
+ WASM_VECTOR_LEN = 0;
8933
+ cachedInt32Memory0 = null;
8934
+ ImageDataRGBA16 = class _ImageDataRGBA16 {
8935
+ static __wrap(ptr) {
8936
+ ptr = ptr >>> 0;
8937
+ const obj = Object.create(_ImageDataRGBA16.prototype);
8938
+ obj.__wbg_ptr = ptr;
8939
+ return obj;
8940
+ }
8941
+ __destroy_into_raw() {
8942
+ const ptr = this.__wbg_ptr;
8943
+ this.__wbg_ptr = 0;
8944
+ return ptr;
8945
+ }
8946
+ free() {
8947
+ const ptr = this.__destroy_into_raw();
8948
+ wasm.__wbg_imagedatargba16_free(ptr);
8949
+ }
8950
+ /**
8951
+ * @returns {number}
8952
+ */
8953
+ get width() {
8954
+ const ret = wasm.imagedatargba16_width(this.__wbg_ptr);
8955
+ return ret >>> 0;
8956
+ }
8957
+ /**
8958
+ * @returns {number}
8959
+ */
8960
+ get height() {
8961
+ const ret = wasm.imagedatargba16_height(this.__wbg_ptr);
8962
+ return ret >>> 0;
8963
+ }
8964
+ /**
8965
+ * @returns {Uint16Array}
8966
+ */
8967
+ get data() {
8968
+ const ret = wasm.imagedatargba16_data(this.__wbg_ptr);
8969
+ return takeObject(ret);
8970
+ }
8971
+ };
8972
+ squoosh_png_default = __wbg_init;
8973
+ isServiceWorker = globalThis.ServiceWorkerGlobalScope !== void 0;
8974
+ isRunningInCloudFlareWorkers = isServiceWorker && typeof self !== "undefined" && globalThis.caches && globalThis.caches.default !== void 0;
8975
+ isRunningInNode = typeof process === "object" && process.release && process.release.name === "node";
8976
+ if (isRunningInCloudFlareWorkers || isRunningInNode) {
8977
+ if (!globalThis.ImageData) {
8978
+ globalThis.ImageData = class ImageData {
8979
+ constructor(data, width, height) {
8980
+ this.data = data;
8981
+ this.width = width;
8982
+ this.height = height;
8983
+ }
8984
+ };
8985
+ }
8986
+ if (import_meta.url === void 0) {
8987
+ import_meta.url = "https://localhost";
8988
+ }
8989
+ if (typeof self !== "undefined" && self.location === void 0) {
8990
+ self.location = { href: "" };
8991
+ }
8992
+ }
8993
+ }
8994
+ });
8995
+
8996
+ // ../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/decode.js
8997
+ var decode_exports = {};
8998
+ __export(decode_exports, {
8999
+ decode: () => decode2,
9000
+ default: () => decode_default,
9001
+ init: () => init
9002
+ });
9003
+ async function init(moduleOrPath) {
9004
+ if (!pngModule) {
9005
+ pngModule = squoosh_png_default(moduleOrPath);
9006
+ }
9007
+ return pngModule;
9008
+ }
9009
+ async function decode2(data, options = {}) {
9010
+ await init();
9011
+ const { bitDepth = 8 } = options;
9012
+ if (bitDepth === 16) {
9013
+ const imageData2 = await decode_rgba16(new Uint8Array(data));
9014
+ if (!imageData2)
9015
+ throw new Error("Encoding error.");
9016
+ return imageData2;
9017
+ }
9018
+ const imageData = await decode(new Uint8Array(data));
9019
+ if (!imageData)
9020
+ throw new Error("Encoding error.");
9021
+ return imageData;
9022
+ }
9023
+ var pngModule, decode_default;
9024
+ var init_decode = __esm({
9025
+ "../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/decode.js"() {
9026
+ "use strict";
9027
+ init_squoosh_png();
9028
+ decode_default = decode2;
9029
+ }
9030
+ });
9031
+
9032
+ // ../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/encode.js
9033
+ var encode_exports = {};
9034
+ __export(encode_exports, {
9035
+ default: () => encode2,
9036
+ init: () => init2
9037
+ });
9038
+ async function init2(moduleOrPath) {
9039
+ if (!pngModule2) {
9040
+ pngModule2 = squoosh_png_default(moduleOrPath);
9041
+ }
9042
+ return pngModule2;
9043
+ }
9044
+ async function encode2(data, options = {}) {
9045
+ var _a;
9046
+ await init2();
9047
+ const bitDepth = (_a = options === null || options === void 0 ? void 0 : options.bitDepth) !== null && _a !== void 0 ? _a : 8;
9048
+ if (bitDepth !== 8 && bitDepth !== 16) {
9049
+ throw new Error("Invalid bit depth. Must be either 8 or 16.");
9050
+ }
9051
+ const isUint16Array = data.data instanceof Uint16Array;
9052
+ if (isUint16Array && bitDepth !== 16) {
9053
+ throw new Error("Invalid bit depth, must be 16 for Uint16Array or manually convert to RGB8 values with Uint8Array.");
9054
+ }
9055
+ if (!isUint16Array && bitDepth === 16) {
9056
+ throw new Error("Invalid bit depth, must be 8 for Uint8Array or manually convert to RGB16 values with Uint16Array.");
9057
+ }
9058
+ const encodeData = new Uint8Array(data.data.buffer);
9059
+ const output = await encode(encodeData, data.width, data.height, bitDepth);
9060
+ if (!output)
9061
+ throw new Error("Encoding error.");
9062
+ return output.buffer;
9063
+ }
9064
+ var pngModule2;
9065
+ var init_encode = __esm({
9066
+ "../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/encode.js"() {
9067
+ "use strict";
9068
+ init_squoosh_png();
9069
+ }
9070
+ });
9071
+
9072
+ // ../codec-jsquash-png/dist/index.mjs
9073
+ var dist_exports3 = {};
9074
+ __export(dist_exports3, {
9075
+ codecJsquashPng: () => l,
9076
+ default: () => p2
9077
+ });
9078
+ function c2() {
9079
+ return n2 || (n2 = (async () => {
9080
+ let e = (0, import_path.dirname)(i2.resolve("@jsquash/png")), t = (0, import_path.join)(e, "codec", "pkg", "squoosh_png_bg.wasm"), a2 = (0, import_fs2.readFileSync)(t), o2 = await Promise.resolve().then(() => (init_decode(), decode_exports)), r = await Promise.resolve().then(() => (init_encode(), encode_exports));
9081
+ return await Promise.all([o2.init(a2), r.init(a2)]), { decode: o2.default, encode: r.default };
9082
+ })(), n2);
9083
+ }
9084
+ async function h3(e) {
9085
+ try {
9086
+ let { decode: t } = await c2(), a2 = typeof e == "string" ? (0, import_fs2.readFileSync)(e) : e, o2 = new Uint8Array(a2).buffer, r = await t(o2);
9087
+ return { data: r.data, width: r.width, height: r.height };
9088
+ } catch (t) {
9089
+ throw new Error(`Failed to read PNG file ${e}: ${t}`);
9090
+ }
9091
+ }
9092
+ async function m2(e, t) {
9093
+ try {
9094
+ let { encode: a2 } = await c2(), o2 = { data: new Uint8ClampedArray(e.data.buffer, e.data.byteOffset, e.data.byteLength), width: e.width, height: e.height, colorSpace: "srgb" }, r = await a2(o2);
9095
+ (0, import_fs2.writeFileSync)(t, Buffer.from(r));
9096
+ } catch (a2) {
9097
+ throw new Error(`Failed to write PNG file ${t}: ${a2}`);
9098
+ }
9099
+ }
9100
+ var import_fs2, import_path, i2, n2, l, p2;
9101
+ var init_dist3 = __esm({
9102
+ "../codec-jsquash-png/dist/index.mjs"() {
9103
+ "use strict";
9104
+ import_fs2 = require("fs");
9105
+ import_path = require("path");
9106
+ i2 = ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, a2) => (typeof require < "u" ? require : t)[a2] }) : e)(function(e) {
9107
+ if (typeof require < "u") return require.apply(this, arguments);
9108
+ throw Error('Dynamic require of "' + e + '" is not supported');
9109
+ });
9110
+ n2 = null;
9111
+ l = { read: h3, write: m2 };
9112
+ p2 = l;
9113
+ }
9114
+ });
9115
+
8655
9116
  // src/commands/hitchhikers-ssim.ts
8656
9117
  var hitchhikers_ssim_exports = {};
8657
9118
  __export(hitchhikers_ssim_exports, {
@@ -8660,62 +9121,62 @@ __export(hitchhikers_ssim_exports, {
8660
9121
  module.exports = __toCommonJS(hitchhikers_ssim_exports);
8661
9122
 
8662
9123
  // ../ssim/dist/hitchhikers-ssim.mjs
8663
- function p(o2, a2, c2) {
8664
- let n2 = new Float32Array(a2 * c2), r = 0;
8665
- for (let s2 = 0; s2 < o2.length; s2 += 4) {
8666
- let t = o2[s2], e = o2[s2 + 1], u = o2[s2 + 2];
8667
- n2[r++] = 0.298936 * t + 0.587043 * e + 0.114021 * u;
9124
+ function p(o2, a2, c3) {
9125
+ let n3 = new Float32Array(a2 * c3), r = 0;
9126
+ for (let s = 0; s < o2.length; s += 4) {
9127
+ let t = o2[s], e = o2[s + 1], u = o2[s + 2];
9128
+ n3[r++] = 0.298936 * t + 0.587043 * e + 0.114021 * u;
8668
9129
  }
8669
- return n2;
9130
+ return n3;
8670
9131
  }
8671
- function h(o2, a2, c2, n2, r, s2 = {}) {
8672
- let { windowSize: t = 11, windowStride: e = t, k1: u = 0.01, k2: i2 = 0.03, L: d2 = 255, covPooling: v = true } = s2, g = p(o2, n2, r), A = p(a2, n2, r), y = (u * d2) ** 2, O = (i2 * d2) ** 2, Y = F(g, n2, r), z = F(A, n2, r), P = new Float32Array(n2 * r), G = new Float32Array(n2 * r), H = new Float32Array(n2 * r);
8673
- for (let l = 0; l < g.length; l++) {
8674
- let m2 = g[l], f2 = A[l];
8675
- P[l] = m2 * m2, G[l] = f2 * f2, H[l] = m2 * f2;
9132
+ function h(o2, a2, c3, n3, r, s = {}) {
9133
+ let { windowSize: t = 11, windowStride: e = t, k1: u = 0.01, k2: i3 = 0.03, L: d2 = 255, covPooling: v = true } = s, g = p(o2, n3, r), A = p(a2, n3, r), y = (u * d2) ** 2, O = (i3 * d2) ** 2, Y = F(g, n3, r), z = F(A, n3, r), P = new Float32Array(n3 * r), G = new Float32Array(n3 * r), H = new Float32Array(n3 * r);
9134
+ for (let l2 = 0; l2 < g.length; l2++) {
9135
+ let m3 = g[l2], f2 = A[l2];
9136
+ P[l2] = m3 * m3, G[l2] = f2 * f2, H[l2] = m3 * f2;
8676
9137
  }
8677
- let D = F(P, n2, r), V = F(G, n2, r), j = F(H, n2, r), M = Math.floor((n2 - t) / e) + 1, I = Math.floor((r - t) / e) + 1, S = new Float32Array(M * I), x = t * t, E = 0;
8678
- for (let l = 0; l < I; l++) {
8679
- let m2 = l * e, f2 = m2 + t;
9138
+ let D = F(P, n3, r), V = F(G, n3, r), j = F(H, n3, r), M = Math.floor((n3 - t) / e) + 1, I = Math.floor((r - t) / e) + 1, S = new Float32Array(M * I), x = t * t, E = 0;
9139
+ for (let l2 = 0; l2 < I; l2++) {
9140
+ let m3 = l2 * e, f2 = m3 + t;
8680
9141
  for (let k = 0; k < M; k++) {
8681
- let b = k * e, q = b + t, J = U(Y, b, m2, q, f2, n2), K = U(z, b, m2, q, f2, n2), N = U(D, b, m2, q, f2, n2), Q = U(V, b, m2, q, f2, n2), R = U(j, b, m2, q, f2, n2), C = J / x, B = K / x, L = C * C, T = B * B, X = C * B, W = N / x - L, Z = Q / x - T, _ = R / x - X, $ = (2 * X + y) * (2 * _ + O), w = (L + T + y) * (W + Z + O);
9142
+ let b = k * e, q = b + t, J = U(Y, b, m3, q, f2, n3), K = U(z, b, m3, q, f2, n3), N = U(D, b, m3, q, f2, n3), Q = U(V, b, m3, q, f2, n3), R = U(j, b, m3, q, f2, n3), C = J / x, B = K / x, L = C * C, T = B * B, X = C * B, W = N / x - L, Z = Q / x - T, _ = R / x - X, $ = (2 * X + y) * (2 * _ + O), w = (L + T + y) * (W + Z + O);
8682
9143
  S[E++] = $ / w;
8683
9144
  }
8684
9145
  }
8685
- if (c2 && on(c2, S, M, I, n2, r), v) return nn(S);
9146
+ if (c3 && on(c3, S, M, I, n3, r), v) return nn(S);
8686
9147
  {
8687
- let l = 0;
8688
- for (let m2 = 0; m2 < S.length; m2++) l += S[m2];
8689
- return l / S.length;
9148
+ let l2 = 0;
9149
+ for (let m3 = 0; m3 < S.length; m3++) l2 += S[m3];
9150
+ return l2 / S.length;
8690
9151
  }
8691
9152
  }
8692
- function F(o2, a2, c2) {
8693
- let n2 = a2 + 1, r = c2 + 1, s2 = new Float64Array(n2 * r);
8694
- for (let t = 1; t <= c2; t++) for (let e = 1; e <= a2; e++) {
8695
- let u = (t - 1) * a2 + (e - 1), i2 = t * n2 + e;
8696
- s2[i2] = o2[u] + s2[(t - 1) * n2 + e] + s2[t * n2 + (e - 1)] - s2[(t - 1) * n2 + (e - 1)];
9153
+ function F(o2, a2, c3) {
9154
+ let n3 = a2 + 1, r = c3 + 1, s = new Float64Array(n3 * r);
9155
+ for (let t = 1; t <= c3; t++) for (let e = 1; e <= a2; e++) {
9156
+ let u = (t - 1) * a2 + (e - 1), i3 = t * n3 + e;
9157
+ s[i3] = o2[u] + s[(t - 1) * n3 + e] + s[t * n3 + (e - 1)] - s[(t - 1) * n3 + (e - 1)];
8697
9158
  }
8698
- return s2;
9159
+ return s;
8699
9160
  }
8700
- function U(o2, a2, c2, n2, r, s2) {
8701
- let t = s2 + 1;
8702
- return o2[r * t + n2] - o2[c2 * t + n2] - o2[r * t + a2] + o2[c2 * t + a2];
9161
+ function U(o2, a2, c3, n3, r, s) {
9162
+ let t = s + 1;
9163
+ return o2[r * t + n3] - o2[c3 * t + n3] - o2[r * t + a2] + o2[c3 * t + a2];
8703
9164
  }
8704
9165
  function nn(o2) {
8705
9166
  let a2 = 0;
8706
9167
  for (let e = 0; e < o2.length; e++) a2 += o2[e];
8707
- let c2 = a2 / o2.length, n2 = 0;
9168
+ let c3 = a2 / o2.length, n3 = 0;
8708
9169
  for (let e = 0; e < o2.length; e++) {
8709
- let u = o2[e] - c2;
8710
- n2 += u * u;
9170
+ let u = o2[e] - c3;
9171
+ n3 += u * u;
8711
9172
  }
8712
- let r = n2 / o2.length, s2 = Math.sqrt(r);
8713
- return 1 - (c2 > 0 ? s2 / c2 : 0);
9173
+ let r = n3 / o2.length, s = Math.sqrt(r);
9174
+ return 1 - (c3 > 0 ? s / c3 : 0);
8714
9175
  }
8715
- function on(o2, a2, c2, n2, r, s2) {
8716
- let t = r / c2, e = s2 / n2;
8717
- for (let u = 0; u < s2; u++) for (let i2 = 0; i2 < r; i2++) {
8718
- let d2 = Math.min(Math.floor(i2 / t), c2 - 1), v = Math.min(Math.floor(u / e), n2 - 1), g = a2[v * c2 + d2], A = Math.floor(Math.max(0, Math.min(1, g)) * 255), y = (u * r + i2) * 4;
9176
+ function on(o2, a2, c3, n3, r, s) {
9177
+ let t = r / c3, e = s / n3;
9178
+ for (let u = 0; u < s; u++) for (let i3 = 0; i3 < r; i3++) {
9179
+ let d2 = Math.min(Math.floor(i3 / t), c3 - 1), v = Math.min(Math.floor(u / e), n3 - 1), g = a2[v * c3 + d2], A = Math.floor(Math.max(0, Math.min(1, g)) * 255), y = (u * r + i3) * 4;
8719
9180
  o2[y] = A, o2[y + 1] = A, o2[y + 2] = A, o2[y + 3] = 255;
8720
9181
  }
8721
9182
  }
@@ -8732,7 +9193,7 @@ Arguments:
8732
9193
 
8733
9194
  Options:
8734
9195
  -o, --output <path> Output path for SSIM map visualization
8735
- --transformer <name> Specify transformer to use (e.g. pngjs, sharp)
9196
+ --codec <name> Specify codec to use (pngjs, sharp, jsquash-png)
8736
9197
  --window-size <size> Window size (default: 11)
8737
9198
  --window-stride <size> Window stride (default: windowSize for non-overlapping)
8738
9199
  --no-cov-pooling Use mean pooling instead of CoV pooling
@@ -8754,16 +9215,20 @@ Examples:
8754
9215
  blazediff hitchhikers-ssim image1.png image2.png --no-cov-pooling
8755
9216
  `);
8756
9217
  }
8757
- var getTransformer = async (transformer) => {
8758
- if (!transformer || transformer === "pngjs") {
8759
- const { default: transformer2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
8760
- return transformer2;
9218
+ var getCodec = async (codec) => {
9219
+ if (!codec || codec === "pngjs") {
9220
+ const { default: c3 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
9221
+ return c3;
9222
+ }
9223
+ if (codec === "sharp") {
9224
+ const { default: c3 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
9225
+ return c3;
8761
9226
  }
8762
- if (transformer === "sharp") {
8763
- const { default: transformer2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
8764
- return transformer2;
9227
+ if (codec === "jsquash-png") {
9228
+ const { default: c3 } = await Promise.resolve().then(() => (init_dist3(), dist_exports3));
9229
+ return c3;
8765
9230
  }
8766
- throw new Error(`Unknown transformer: ${transformer}`);
9231
+ throw new Error(`Unknown codec: ${codec}`);
8767
9232
  };
8768
9233
  async function main() {
8769
9234
  try {
@@ -8782,21 +9247,21 @@ async function main() {
8782
9247
  const options = {
8783
9248
  covPooling: true
8784
9249
  };
8785
- for (let i2 = 2; i2 < args.length; i2++) {
8786
- const arg = args[i2];
8787
- const nextArg = args[i2 + 1];
9250
+ for (let i3 = 2; i3 < args.length; i3++) {
9251
+ const arg = args[i3];
9252
+ const nextArg = args[i3 + 1];
8788
9253
  switch (arg) {
8789
9254
  case "-o":
8790
9255
  case "--output":
8791
9256
  if (nextArg) {
8792
9257
  options.outputPath = nextArg;
8793
- i2++;
9258
+ i3++;
8794
9259
  }
8795
9260
  break;
8796
- case "--transformer":
9261
+ case "--codec":
8797
9262
  if (nextArg) {
8798
- options.transformer = nextArg;
8799
- i2++;
9263
+ options.codec = nextArg;
9264
+ i3++;
8800
9265
  }
8801
9266
  break;
8802
9267
  case "--window-size":
@@ -8806,7 +9271,7 @@ async function main() {
8806
9271
  throw new Error(`Invalid window size: ${nextArg}`);
8807
9272
  }
8808
9273
  options.windowSize = size;
8809
- i2++;
9274
+ i3++;
8810
9275
  }
8811
9276
  break;
8812
9277
  case "--window-stride":
@@ -8816,7 +9281,7 @@ async function main() {
8816
9281
  throw new Error(`Invalid window stride: ${nextArg}`);
8817
9282
  }
8818
9283
  options.windowStride = stride;
8819
- i2++;
9284
+ i3++;
8820
9285
  }
8821
9286
  break;
8822
9287
  case "--no-cov-pooling":
@@ -8828,12 +9293,10 @@ async function main() {
8828
9293
  process.exit(1);
8829
9294
  }
8830
9295
  }
8831
- const transformer = await getTransformer(
8832
- options.transformer
8833
- );
9296
+ const codec = await getCodec(options.codec);
8834
9297
  const [img1, img2] = await Promise.all([
8835
- transformer.read(image1),
8836
- transformer.read(image2)
9298
+ codec.read(image1),
9299
+ codec.read(image2)
8837
9300
  ]);
8838
9301
  if (img1.width !== img2.width || img1.height !== img2.height) {
8839
9302
  throw new Error(
@@ -8865,7 +9328,7 @@ async function main() {
8865
9328
  );
8866
9329
  const duration = performance.now() - startTime;
8867
9330
  if (options.outputPath && outputData) {
8868
- await transformer.write(
9331
+ await codec.write(
8869
9332
  {
8870
9333
  data: outputData,
8871
9334
  width: img1.width,
@@ -8913,3 +9376,23 @@ async function main() {
8913
9376
  if (typeof require !== "undefined" && require.main === module) {
8914
9377
  main();
8915
9378
  }
9379
+ /*! Bundled license information:
9380
+
9381
+ sharp/lib/is.js:
9382
+ sharp/lib/libvips.js:
9383
+ sharp/lib/sharp.js:
9384
+ sharp/lib/constructor.js:
9385
+ sharp/lib/input.js:
9386
+ sharp/lib/resize.js:
9387
+ sharp/lib/composite.js:
9388
+ sharp/lib/operation.js:
9389
+ sharp/lib/colour.js:
9390
+ sharp/lib/channel.js:
9391
+ sharp/lib/output.js:
9392
+ sharp/lib/utility.js:
9393
+ sharp/lib/index.js:
9394
+ (*!
9395
+ Copyright 2013 Lovell Fuller and others.
9396
+ SPDX-License-Identifier: Apache-2.0
9397
+ *)
9398
+ */