omezarr-tilesource 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -7
- package/dist/{__vite-browser-external-BIIyDRRX.js → __vite-browser-external-B2tgTj77.js} +1 -1
- package/dist/{__vite-browser-external-YbutIfMq-Cv1_GH0S.js → __vite-browser-external-YbutIfMq-DmIpWUUk.js} +1 -1
- package/dist/dist-DXBnbeGc.js +90 -0
- package/dist/omezarr-tilesource.d.ts +29 -23
- package/dist/omezarr-tilesource.js +1759 -61283
- package/dist/omezarr-tilesource.umd.cjs +8 -8
- package/dist/{png-K1gqQ34g-FkA_MCNO.js → png-K1gqQ34g-aB7GLn6k.js} +245 -245
- package/package.json +5 -5
- package/dist/chunk-BXES_1_E.js +0 -13
- package/dist/dist-DIvEDGnZ.js +0 -87
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
1
|
+
import { t as e } from "./dist-DXBnbeGc.js";
|
|
2
|
+
import { _ as t } from "./__vite-browser-external-YbutIfMq-DmIpWUUk.js";
|
|
3
3
|
//#region node_modules/.pnpm/vite-plugin-node-polyfills@0.28.0_vite@8.0.14_yaml@2.9.0_/node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
function
|
|
4
|
+
var n = {}, r = {};
|
|
5
|
+
r.byteLength = d, r.toByteArray = p, r.fromByteArray = g;
|
|
6
|
+
for (var i = [], a = [], o = typeof Uint8Array < "u" ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = 0, l = s.length; c < l; ++c) i[c] = s[c], a[s.charCodeAt(c)] = c;
|
|
7
|
+
a[45] = 62, a[95] = 63;
|
|
8
|
+
function u(e) {
|
|
9
9
|
var t = e.length;
|
|
10
10
|
if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
11
11
|
var n = e.indexOf("=");
|
|
@@ -13,31 +13,31 @@ function d(e) {
|
|
|
13
13
|
var r = n === t ? 0 : 4 - n % 4;
|
|
14
14
|
return [n, r];
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
var t =
|
|
16
|
+
function d(e) {
|
|
17
|
+
var t = u(e), n = t[0], r = t[1];
|
|
18
18
|
return (n + r) * 3 / 4 - r;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function f(e, t, n) {
|
|
21
21
|
return (t + n) * 3 / 4 - n;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
var t, n =
|
|
25
|
-
for (
|
|
26
|
-
return i === 2 && (t =
|
|
23
|
+
function p(e) {
|
|
24
|
+
var t, n = u(e), r = n[0], i = n[1], s = new o(f(e, r, i)), c = 0, l = i > 0 ? r - 4 : r, d;
|
|
25
|
+
for (d = 0; d < l; d += 4) t = a[e.charCodeAt(d)] << 18 | a[e.charCodeAt(d + 1)] << 12 | a[e.charCodeAt(d + 2)] << 6 | a[e.charCodeAt(d + 3)], s[c++] = t >> 16 & 255, s[c++] = t >> 8 & 255, s[c++] = t & 255;
|
|
26
|
+
return i === 2 && (t = a[e.charCodeAt(d)] << 2 | a[e.charCodeAt(d + 1)] >> 4, s[c++] = t & 255), i === 1 && (t = a[e.charCodeAt(d)] << 10 | a[e.charCodeAt(d + 1)] << 4 | a[e.charCodeAt(d + 2)] >> 2, s[c++] = t >> 8 & 255, s[c++] = t & 255), s;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function m(e) {
|
|
29
|
+
return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[e & 63];
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(
|
|
31
|
+
function h(e, t, n) {
|
|
32
|
+
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(m(r));
|
|
33
33
|
return i.join("");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
for (var t, n = e.length, r = n % 3,
|
|
37
|
-
return r === 1 ? (t = e[n - 1],
|
|
35
|
+
function g(e) {
|
|
36
|
+
for (var t, n = e.length, r = n % 3, a = [], o = 16383, s = 0, c = n - r; s < c; s += o) a.push(h(e, s, s + o > c ? c : s + o));
|
|
37
|
+
return r === 1 ? (t = e[n - 1], a.push(i[t >> 2] + i[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], a.push(i[t >> 10] + i[t >> 4 & 63] + i[t << 2 & 63] + "=")), a.join("");
|
|
38
38
|
}
|
|
39
|
-
var
|
|
40
|
-
|
|
39
|
+
var _ = {};
|
|
40
|
+
_.read = function(e, t, n, r, i) {
|
|
41
41
|
var a, o, s = i * 8 - r - 1, c = (1 << s) - 1, l = c >> 1, u = -7, d = n ? i - 1 : 0, f = n ? -1 : 1, p = e[t + d];
|
|
42
42
|
for (d += f, a = p & (1 << -u) - 1, p >>= -u, u += s; u > 0; a = a * 256 + e[t + d], d += f, u -= 8);
|
|
43
43
|
for (o = a & (1 << -u) - 1, a >>= -u, u += r; u > 0; o = o * 256 + e[t + d], d += f, u -= 8);
|
|
@@ -45,13 +45,13 @@ v.read = function(e, t, n, r, i) {
|
|
|
45
45
|
else if (a === c) return o ? NaN : (p ? -1 : 1) * Infinity;
|
|
46
46
|
else o += 2 ** r, a -= l;
|
|
47
47
|
return (p ? -1 : 1) * o * 2 ** (a - r);
|
|
48
|
-
},
|
|
48
|
+
}, _.write = function(e, t, n, r, i, a) {
|
|
49
49
|
var o, s, c, l = a * 8 - i - 1, u = (1 << l) - 1, d = u >> 1, f = i === 23 ? 2 ** -24 - 2 ** -77 : 0, p = r ? 0 : a - 1, m = r ? 1 : -1, h = +(t < 0 || t === 0 && 1 / t < 0);
|
|
50
50
|
for (t = Math.abs(t), isNaN(t) || t === Infinity ? (s = +!!isNaN(t), o = u) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = 2 ** -o) < 1 && (o--, c *= 2), o + d >= 1 ? t += f / c : t += f * 2 ** (1 - d), t * c >= 2 && (o++, c /= 2), o + d >= u ? (s = 0, o = u) : o + d >= 1 ? (s = (t * c - 1) * 2 ** i, o += d) : (s = t * 2 ** (d - 1) * 2 ** i, o = 0)); i >= 8; e[n + p] = s & 255, p += m, s /= 256, i -= 8);
|
|
51
51
|
for (o = o << i | s, l += i; l > 0; e[n + p] = o & 255, p += m, o /= 256, l -= 8);
|
|
52
52
|
e[n + p - m] |= h * 128;
|
|
53
53
|
}, (function(e) {
|
|
54
|
-
let t =
|
|
54
|
+
let t = r, n = _, i = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
55
55
|
e.Buffer = d, e.SlowBuffer = S, e.INSPECT_MAX_BYTES = 50;
|
|
56
56
|
let a = 2147483647;
|
|
57
57
|
e.kMaxLength = a;
|
|
@@ -93,13 +93,13 @@ v.read = function(e, t, n, r, i) {
|
|
|
93
93
|
d.poolSize = 8192;
|
|
94
94
|
function f(e, t, n) {
|
|
95
95
|
if (typeof e == "string") return g(e, t);
|
|
96
|
-
if (s.isView(e)) return
|
|
96
|
+
if (s.isView(e)) return ee(e);
|
|
97
97
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
98
|
-
if (X(e, s) || e && X(e.buffer, s) || c !== void 0 && (X(e, c) || e && X(e.buffer, c))) return
|
|
98
|
+
if (X(e, s) || e && X(e.buffer, s) || c !== void 0 && (X(e, c) || e && X(e.buffer, c))) return y(e, t, n);
|
|
99
99
|
if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
|
|
100
100
|
let r = e.valueOf && e.valueOf();
|
|
101
101
|
if (r != null && r !== e) return d.from(r, t, n);
|
|
102
|
-
let i =
|
|
102
|
+
let i = b(e);
|
|
103
103
|
if (i) return i;
|
|
104
104
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == "function") return d.from(e[Symbol.toPrimitive]("string"), t, n);
|
|
105
105
|
throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
@@ -130,31 +130,31 @@ v.read = function(e, t, n, r, i) {
|
|
|
130
130
|
let n = C(e, t) | 0, r = u(n), i = r.write(e, t);
|
|
131
131
|
return i !== n && (r = r.slice(0, i)), r;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function v(e) {
|
|
134
134
|
let t = e.length < 0 ? 0 : x(e.length) | 0, n = u(t);
|
|
135
135
|
for (let r = 0; r < t; r += 1) n[r] = e[r] & 255;
|
|
136
136
|
return n;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function ee(e) {
|
|
139
139
|
if (X(e, o)) {
|
|
140
140
|
let t = new o(e);
|
|
141
|
-
return
|
|
141
|
+
return y(t.buffer, t.byteOffset, t.byteLength);
|
|
142
142
|
}
|
|
143
|
-
return
|
|
143
|
+
return v(e);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function y(e, t, n) {
|
|
146
146
|
if (t < 0 || e.byteLength < t) throw RangeError("\"offset\" is outside of buffer bounds");
|
|
147
147
|
if (e.byteLength < t + (n || 0)) throw RangeError("\"length\" is outside of buffer bounds");
|
|
148
148
|
let r;
|
|
149
149
|
return r = t === void 0 && n === void 0 ? new o(e) : n === void 0 ? new o(e, t) : new o(e, t, n), Object.setPrototypeOf(r, d.prototype), r;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function b(e) {
|
|
152
152
|
if (d.isBuffer(e)) {
|
|
153
153
|
let t = x(e.length) | 0, n = u(t);
|
|
154
154
|
return n.length === 0 || e.copy(n, 0, 0, t), n;
|
|
155
155
|
}
|
|
156
|
-
if (e.length !== void 0) return typeof e.length != "number" || Z(e.length) ? u(0) :
|
|
157
|
-
if (e.type === "Buffer" && Array.isArray(e.data)) return
|
|
156
|
+
if (e.length !== void 0) return typeof e.length != "number" || Z(e.length) ? u(0) : v(e);
|
|
157
|
+
if (e.type === "Buffer" && Array.isArray(e.data)) return v(e.data);
|
|
158
158
|
}
|
|
159
159
|
function x(e) {
|
|
160
160
|
if (e >= a) throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a.toString(16) + " bytes");
|
|
@@ -222,7 +222,7 @@ v.read = function(e, t, n, r, i) {
|
|
|
222
222
|
case "utf16le":
|
|
223
223
|
case "utf-16le": return n * 2;
|
|
224
224
|
case "hex": return n >>> 1;
|
|
225
|
-
case "base64": return
|
|
225
|
+
case "base64": return J(e).length;
|
|
226
226
|
default:
|
|
227
227
|
if (i) return r ? -1 : q(e).length;
|
|
228
228
|
t = ("" + t).toLowerCase(), i = !0;
|
|
@@ -235,11 +235,11 @@ v.read = function(e, t, n, r, i) {
|
|
|
235
235
|
for (e ||= "utf8";;) switch (e) {
|
|
236
236
|
case "hex": return ce(this, t, n);
|
|
237
237
|
case "utf8":
|
|
238
|
-
case "utf-8": return
|
|
239
|
-
case "ascii": return
|
|
238
|
+
case "utf-8": return k(this, t, n);
|
|
239
|
+
case "ascii": return se(this, t, n);
|
|
240
240
|
case "latin1":
|
|
241
|
-
case "binary": return
|
|
242
|
-
case "base64": return
|
|
241
|
+
case "binary": return j(this, t, n);
|
|
242
|
+
case "base64": return ae(this, t, n);
|
|
243
243
|
case "ucs2":
|
|
244
244
|
case "ucs-2":
|
|
245
245
|
case "utf16le":
|
|
@@ -271,14 +271,14 @@ v.read = function(e, t, n, r, i) {
|
|
|
271
271
|
return this;
|
|
272
272
|
}, d.prototype.toString = function() {
|
|
273
273
|
let e = this.length;
|
|
274
|
-
return e === 0 ? "" : arguments.length === 0 ?
|
|
274
|
+
return e === 0 ? "" : arguments.length === 0 ? k(this, 0, e) : w.apply(this, arguments);
|
|
275
275
|
}, d.prototype.toLocaleString = d.prototype.toString, d.prototype.equals = function(e) {
|
|
276
276
|
if (!d.isBuffer(e)) throw TypeError("Argument must be a Buffer");
|
|
277
277
|
return this === e ? !0 : d.compare(this, e) === 0;
|
|
278
278
|
}, d.prototype.inspect = function() {
|
|
279
279
|
let t = "", n = e.INSPECT_MAX_BYTES;
|
|
280
280
|
return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
|
|
281
|
-
},
|
|
281
|
+
}, i && (d.prototype[i] = d.prototype.inspect), d.prototype.compare = function(e, t, n, r, i) {
|
|
282
282
|
if (X(e, o) && (e = d.from(e, e.offset, e.byteLength)), !d.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
|
|
283
283
|
if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), i === void 0 && (i = this.length), t < 0 || n > e.length || r < 0 || i > this.length) throw RangeError("out of range index");
|
|
284
284
|
if (r >= i && t >= n) return 0;
|
|
@@ -349,17 +349,17 @@ v.read = function(e, t, n, r, i) {
|
|
|
349
349
|
}
|
|
350
350
|
return o;
|
|
351
351
|
}
|
|
352
|
-
function k(e, t, n, r) {
|
|
353
|
-
return Y(q(t, e.length - n), e, n, r);
|
|
354
|
-
}
|
|
355
352
|
function te(e, t, n, r) {
|
|
356
|
-
return Y(
|
|
353
|
+
return Y(q(t, e.length - n), e, n, r);
|
|
357
354
|
}
|
|
358
355
|
function ne(e, t, n, r) {
|
|
359
|
-
return Y(
|
|
356
|
+
return Y(de(t), e, n, r);
|
|
360
357
|
}
|
|
361
358
|
function re(e, t, n, r) {
|
|
362
|
-
return Y(
|
|
359
|
+
return Y(J(t), e, n, r);
|
|
360
|
+
}
|
|
361
|
+
function ie(e, t, n, r) {
|
|
362
|
+
return Y(fe(t, e.length - n), e, n, r);
|
|
363
363
|
}
|
|
364
364
|
d.prototype.write = function(e, t, n, r) {
|
|
365
365
|
if (t === void 0) r = "utf8", n = this.length, t = 0;
|
|
@@ -373,15 +373,15 @@ v.read = function(e, t, n, r, i) {
|
|
|
373
373
|
for (;;) switch (r) {
|
|
374
374
|
case "hex": return O(this, e, t, n);
|
|
375
375
|
case "utf8":
|
|
376
|
-
case "utf-8": return
|
|
376
|
+
case "utf-8": return te(this, e, t, n);
|
|
377
377
|
case "ascii":
|
|
378
378
|
case "latin1":
|
|
379
|
-
case "binary": return
|
|
380
|
-
case "base64": return
|
|
379
|
+
case "binary": return ne(this, e, t, n);
|
|
380
|
+
case "base64": return re(this, e, t, n);
|
|
381
381
|
case "ucs2":
|
|
382
382
|
case "ucs-2":
|
|
383
383
|
case "utf16le":
|
|
384
|
-
case "utf-16le": return
|
|
384
|
+
case "utf-16le": return ie(this, e, t, n);
|
|
385
385
|
default:
|
|
386
386
|
if (a) throw TypeError("Unknown encoding: " + r);
|
|
387
387
|
r = ("" + r).toLowerCase(), a = !0;
|
|
@@ -392,10 +392,10 @@ v.read = function(e, t, n, r, i) {
|
|
|
392
392
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
-
function
|
|
395
|
+
function ae(e, n, r) {
|
|
396
396
|
return n === 0 && r === e.length ? t.fromByteArray(e) : t.fromByteArray(e.slice(n, r));
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function k(e, t, n) {
|
|
399
399
|
n = Math.min(e.length, n);
|
|
400
400
|
let r = [], i = t;
|
|
401
401
|
for (; i < n;) {
|
|
@@ -417,23 +417,23 @@ v.read = function(e, t, n, r, i) {
|
|
|
417
417
|
}
|
|
418
418
|
a === null ? (a = 65533, o = 1) : a > 65535 && (a -= 65536, r.push(a >>> 10 & 1023 | 55296), a = 56320 | a & 1023), r.push(a), i += o;
|
|
419
419
|
}
|
|
420
|
-
return
|
|
420
|
+
return oe(r);
|
|
421
421
|
}
|
|
422
|
-
let
|
|
423
|
-
function
|
|
422
|
+
let A = 4096;
|
|
423
|
+
function oe(e) {
|
|
424
424
|
let t = e.length;
|
|
425
|
-
if (t <=
|
|
425
|
+
if (t <= A) return String.fromCharCode.apply(String, e);
|
|
426
426
|
let n = "", r = 0;
|
|
427
|
-
for (; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r +=
|
|
427
|
+
for (; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += A));
|
|
428
428
|
return n;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function se(e, t, n) {
|
|
431
431
|
let r = "";
|
|
432
432
|
n = Math.min(e.length, n);
|
|
433
433
|
for (let i = t; i < n; ++i) r += String.fromCharCode(e[i] & 127);
|
|
434
434
|
return r;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function j(e, t, n) {
|
|
437
437
|
let r = "";
|
|
438
438
|
n = Math.min(e.length, n);
|
|
439
439
|
for (let i = t; i < n; ++i) r += String.fromCharCode(e[i]);
|
|
@@ -482,15 +482,15 @@ v.read = function(e, t, n, r, i) {
|
|
|
482
482
|
}, d.prototype.readUint32BE = d.prototype.readUInt32BE = function(e, t) {
|
|
483
483
|
return e >>>= 0, t || M(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
484
484
|
}, d.prototype.readBigUInt64LE = Q(function(e) {
|
|
485
|
-
e >>>= 0,
|
|
485
|
+
e >>>= 0, U(e, "offset");
|
|
486
486
|
let t = this[e], n = this[e + 7];
|
|
487
|
-
(t === void 0 || n === void 0) &&
|
|
487
|
+
(t === void 0 || n === void 0) && W(e, this.length - 8);
|
|
488
488
|
let r = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + n * 2 ** 24;
|
|
489
489
|
return BigInt(r) + (BigInt(i) << BigInt(32));
|
|
490
490
|
}), d.prototype.readBigUInt64BE = Q(function(e) {
|
|
491
|
-
e >>>= 0,
|
|
491
|
+
e >>>= 0, U(e, "offset");
|
|
492
492
|
let t = this[e], n = this[e + 7];
|
|
493
|
-
(t === void 0 || n === void 0) &&
|
|
493
|
+
(t === void 0 || n === void 0) && W(e, this.length - 8);
|
|
494
494
|
let r = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n;
|
|
495
495
|
return (BigInt(r) << BigInt(32)) + BigInt(i);
|
|
496
496
|
}), d.prototype.readIntLE = function(e, t, n) {
|
|
@@ -518,15 +518,15 @@ v.read = function(e, t, n, r, i) {
|
|
|
518
518
|
}, d.prototype.readInt32BE = function(e, t) {
|
|
519
519
|
return e >>>= 0, t || M(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
520
520
|
}, d.prototype.readBigInt64LE = Q(function(e) {
|
|
521
|
-
e >>>= 0,
|
|
521
|
+
e >>>= 0, U(e, "offset");
|
|
522
522
|
let t = this[e], n = this[e + 7];
|
|
523
|
-
(t === void 0 || n === void 0) &&
|
|
523
|
+
(t === void 0 || n === void 0) && W(e, this.length - 8);
|
|
524
524
|
let r = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (n << 24);
|
|
525
525
|
return (BigInt(r) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
|
|
526
526
|
}), d.prototype.readBigInt64BE = Q(function(e) {
|
|
527
|
-
e >>>= 0,
|
|
527
|
+
e >>>= 0, U(e, "offset");
|
|
528
528
|
let t = this[e], n = this[e + 7];
|
|
529
|
-
(t === void 0 || n === void 0) &&
|
|
529
|
+
(t === void 0 || n === void 0) && W(e, this.length - 8);
|
|
530
530
|
let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
|
|
531
531
|
return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n);
|
|
532
532
|
}), d.prototype.readFloatLE = function(e, t) {
|
|
@@ -571,14 +571,14 @@ v.read = function(e, t, n, r, i) {
|
|
|
571
571
|
return e = +e, t >>>= 0, n || N(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
572
572
|
};
|
|
573
573
|
function P(e, t, n, r, i) {
|
|
574
|
-
|
|
574
|
+
H(t, r, i, e, n, 7);
|
|
575
575
|
let a = Number(t & BigInt(4294967295));
|
|
576
576
|
e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a;
|
|
577
577
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
578
578
|
return e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, n;
|
|
579
579
|
}
|
|
580
580
|
function F(e, t, n, r, i) {
|
|
581
|
-
|
|
581
|
+
H(t, r, i, e, n, 7);
|
|
582
582
|
let a = Number(t & BigInt(4294967295));
|
|
583
583
|
e[n + 7] = a, a >>= 8, e[n + 6] = a, a >>= 8, e[n + 5] = a, a >>= 8, e[n + 4] = a;
|
|
584
584
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
@@ -706,25 +706,25 @@ v.read = function(e, t, n, r, i) {
|
|
|
706
706
|
for (; n >= r + 4; n -= 3) t = `_${e.slice(n - 3, n)}${t}`;
|
|
707
707
|
return `${e.slice(0, n)}${t}`;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
|
|
709
|
+
function ue(e, t, n) {
|
|
710
|
+
U(t, "offset"), (e[t] === void 0 || e[t + n] === void 0) && W(t, e.length - (n + 1));
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function H(e, t, n, r, i, a) {
|
|
713
713
|
if (e > n || e < t) {
|
|
714
714
|
let r = typeof t == "bigint" ? "n" : "", i;
|
|
715
715
|
throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new z.ERR_OUT_OF_RANGE("value", i, e);
|
|
716
716
|
}
|
|
717
|
-
|
|
717
|
+
ue(r, i, a);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function U(e, t) {
|
|
720
720
|
if (typeof e != "number") throw new z.ERR_INVALID_ARG_TYPE(t, "number", e);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
723
|
-
throw Math.floor(e) === e ? t < 0 ? new z.ERR_BUFFER_OUT_OF_BOUNDS() : new z.ERR_OUT_OF_RANGE(n || "offset", `>= ${+!!n} and <= ${t}`, e) : (
|
|
722
|
+
function W(e, t, n) {
|
|
723
|
+
throw Math.floor(e) === e ? t < 0 ? new z.ERR_BUFFER_OUT_OF_BOUNDS() : new z.ERR_OUT_OF_RANGE(n || "offset", `>= ${+!!n} and <= ${t}`, e) : (U(e, n), new z.ERR_OUT_OF_RANGE(n || "offset", "an integer", e));
|
|
724
724
|
}
|
|
725
|
-
let
|
|
725
|
+
let G = /[^+/0-9A-Za-z-_]/g;
|
|
726
726
|
function K(e) {
|
|
727
|
-
if (e = e.split("=")[0], e = e.trim().replace(
|
|
727
|
+
if (e = e.split("=")[0], e = e.trim().replace(G, ""), e.length < 2) return "";
|
|
728
728
|
for (; e.length % 4 != 0;) e += "=";
|
|
729
729
|
return e;
|
|
730
730
|
}
|
|
@@ -766,17 +766,17 @@ v.read = function(e, t, n, r, i) {
|
|
|
766
766
|
}
|
|
767
767
|
return a;
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function de(e) {
|
|
770
770
|
let t = [];
|
|
771
771
|
for (let n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
|
|
772
772
|
return t;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function fe(e, t) {
|
|
775
775
|
let n, r, i, a = [];
|
|
776
776
|
for (let o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
|
|
777
777
|
return a;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function J(e) {
|
|
780
780
|
return t.toByteArray(K(e));
|
|
781
781
|
}
|
|
782
782
|
function Y(e, t, n, r) {
|
|
@@ -804,12 +804,12 @@ v.read = function(e, t, n, r, i) {
|
|
|
804
804
|
function me() {
|
|
805
805
|
throw Error("BigInt not supported");
|
|
806
806
|
}
|
|
807
|
-
})(
|
|
808
|
-
var
|
|
807
|
+
})(n);
|
|
808
|
+
var v = n.Buffer;
|
|
809
|
+
n.Blob, n.BlobOptions, n.Buffer, n.File, n.FileOptions, n.INSPECT_MAX_BYTES, n.SlowBuffer, n.TranscodeEncoding, n.atob, n.btoa, n.constants, n.isAscii, n.isUtf8, n.kMaxLength, n.kStringMaxLength, n.resolveObjectURL, n.transcode;
|
|
809
810
|
//#endregion
|
|
810
|
-
//#region node_modules/.pnpm/ome-zarr.js@0.0.
|
|
811
|
-
|
|
812
|
-
function b(e, t) {
|
|
811
|
+
//#region node_modules/.pnpm/ome-zarr.js@0.0.20/node_modules/ome-zarr.js/dist/png-K1gqQ34g.js
|
|
812
|
+
function ee(e, t) {
|
|
813
813
|
for (var n = 0; n < t.length; n++) {
|
|
814
814
|
let r = t[n];
|
|
815
815
|
if (typeof r != "string" && !Array.isArray(r)) {
|
|
@@ -824,7 +824,7 @@ function b(e, t) {
|
|
|
824
824
|
}
|
|
825
825
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function y(e) {
|
|
828
828
|
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
829
829
|
var t = e.default;
|
|
830
830
|
if (typeof t == "function") {
|
|
@@ -843,11 +843,11 @@ function ee(e) {
|
|
|
843
843
|
});
|
|
844
844
|
}), n;
|
|
845
845
|
}
|
|
846
|
-
var
|
|
847
|
-
function
|
|
848
|
-
if (
|
|
849
|
-
|
|
850
|
-
let t =
|
|
846
|
+
var b = {}, x = /* @__PURE__ */ y(t), S = { exports: {} }, C = { exports: {} }, w;
|
|
847
|
+
function T() {
|
|
848
|
+
if (w) return C.exports;
|
|
849
|
+
w = 1;
|
|
850
|
+
let t = x, n = x, r = C.exports = function() {
|
|
851
851
|
n.call(this), this._buffers = [], this._buffered = 0, this._reads = [], this._paused = !1, this._encoding = "utf8", this.writable = !0;
|
|
852
852
|
};
|
|
853
853
|
return t.inherits(r, n), r.prototype.read = function(t, n) {
|
|
@@ -861,7 +861,7 @@ function E() {
|
|
|
861
861
|
}, r.prototype.write = function(e, t) {
|
|
862
862
|
if (!this.writable) return this.emit("error", /* @__PURE__ */ Error("Stream not writable")), !1;
|
|
863
863
|
let n;
|
|
864
|
-
return n =
|
|
864
|
+
return n = v.isBuffer(e) ? e : v.from(e, t || this._encoding), this._buffers.push(n), this._buffered += n.length, this._process(), this._reads && this._reads.length === 0 && (this._paused = !0), this.writable && !this._paused;
|
|
865
865
|
}, r.prototype.end = function(e, t) {
|
|
866
866
|
e && this.write(e, t), this.writable = !1, this._buffers && (this._buffers.length === 0 ? this._end() : (this._buffers.push(null), this._process()));
|
|
867
867
|
}, r.prototype.destroySoon = r.prototype.end, r.prototype._end = function() {
|
|
@@ -874,7 +874,7 @@ function E() {
|
|
|
874
874
|
t.length > e.length ? (this._buffered -= e.length, this._buffers[0] = t.slice(e.length), e.func.call(this, t.slice(0, e.length))) : (this._buffered -= t.length, this._buffers.shift(), e.func.call(this, t));
|
|
875
875
|
}, r.prototype._processRead = function(e) {
|
|
876
876
|
this._reads.shift();
|
|
877
|
-
let t = 0, n = 0, r =
|
|
877
|
+
let t = 0, n = 0, r = v.alloc(e.length);
|
|
878
878
|
for (; t < e.length;) {
|
|
879
879
|
let i = this._buffers[n++], a = Math.min(i.length, e.length - t);
|
|
880
880
|
i.copy(r, t, 0, a), t += a, a !== i.length && (this._buffers[--n] = i.slice(a));
|
|
@@ -892,11 +892,11 @@ function E() {
|
|
|
892
892
|
} catch (e) {
|
|
893
893
|
this.emit("error", e);
|
|
894
894
|
}
|
|
895
|
-
},
|
|
895
|
+
}, C.exports;
|
|
896
896
|
}
|
|
897
|
-
var
|
|
897
|
+
var E = { exports: {} }, D = { exports: {} }, O = {}, te;
|
|
898
898
|
function ne() {
|
|
899
|
-
if (te) return
|
|
899
|
+
if (te) return O;
|
|
900
900
|
te = 1;
|
|
901
901
|
let e = [
|
|
902
902
|
{
|
|
@@ -957,7 +957,7 @@ function ne() {
|
|
|
957
957
|
]
|
|
958
958
|
}
|
|
959
959
|
];
|
|
960
|
-
return
|
|
960
|
+
return O.getImagePasses = function(t, n) {
|
|
961
961
|
let r = [], i = t % 8, a = n % 8, o = (t - i) / 8, s = (n - a) / 8;
|
|
962
962
|
for (let t = 0; t < e.length; t++) {
|
|
963
963
|
let n = e[t], c = o * n.x.length, l = s * n.y.length;
|
|
@@ -970,30 +970,30 @@ function ne() {
|
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
return r;
|
|
973
|
-
},
|
|
973
|
+
}, O.getInterlaceIterator = function(t) {
|
|
974
974
|
return function(n, r, i) {
|
|
975
975
|
let a = n % e[i].x.length, o = (n - a) / e[i].x.length * 8 + e[i].x[a], s = r % e[i].y.length, c = (r - s) / e[i].y.length * 8 + e[i].y[s];
|
|
976
976
|
return o * 4 + c * t * 4;
|
|
977
977
|
};
|
|
978
|
-
},
|
|
978
|
+
}, O;
|
|
979
979
|
}
|
|
980
980
|
var re, ie;
|
|
981
|
-
function
|
|
981
|
+
function ae() {
|
|
982
982
|
return ie || (ie = 1, re = function(e, t, n) {
|
|
983
983
|
let r = e + t - n, i = Math.abs(r - e), a = Math.abs(r - t), o = Math.abs(r - n);
|
|
984
984
|
return i <= a && i <= o ? e : a <= o ? t : n;
|
|
985
985
|
}), re;
|
|
986
986
|
}
|
|
987
|
-
var
|
|
988
|
-
function
|
|
989
|
-
if (
|
|
990
|
-
|
|
991
|
-
let e = ne(), t =
|
|
987
|
+
var k;
|
|
988
|
+
function A() {
|
|
989
|
+
if (k) return D.exports;
|
|
990
|
+
k = 1;
|
|
991
|
+
let e = ne(), t = ae();
|
|
992
992
|
function n(e, t, n) {
|
|
993
993
|
let r = e * t;
|
|
994
994
|
return n !== 8 && (r = Math.ceil(r / (8 / n))), r;
|
|
995
995
|
}
|
|
996
|
-
let r =
|
|
996
|
+
let r = D.exports = function(t, r) {
|
|
997
997
|
let i = t.width, a = t.height, o = t.interlace, s = t.bpp, c = t.depth;
|
|
998
998
|
if (this.read = r.read, this.write = r.write, this.complete = r.complete, this._imageIndex = 0, this._images = [], o) {
|
|
999
999
|
let t = e.getImagePasses(i, a);
|
|
@@ -1032,7 +1032,7 @@ function ae() {
|
|
|
1032
1032
|
}, r.prototype._reverseFilterLine = function(e) {
|
|
1033
1033
|
let t = e[0], n, r = this._images[this._imageIndex], i = r.byteWidth;
|
|
1034
1034
|
if (t === 0) n = e.slice(1, i + 1);
|
|
1035
|
-
else switch (n =
|
|
1035
|
+
else switch (n = v.alloc(i), t) {
|
|
1036
1036
|
case 1:
|
|
1037
1037
|
this._unFilterType1(e, n, i);
|
|
1038
1038
|
break;
|
|
@@ -1048,13 +1048,13 @@ function ae() {
|
|
|
1048
1048
|
default: throw Error("Unrecognised filter type - " + t);
|
|
1049
1049
|
}
|
|
1050
1050
|
this.write(n), r.lineIndex++, r.lineIndex >= r.height ? (this._lastLine = null, this._imageIndex++, r = this._images[this._imageIndex]) : this._lastLine = n, r ? this.read(r.byteWidth + 1, this._reverseFilterLine.bind(this)) : (this._lastLine = null, this.complete());
|
|
1051
|
-
},
|
|
1051
|
+
}, D.exports;
|
|
1052
1052
|
}
|
|
1053
1053
|
var oe;
|
|
1054
1054
|
function se() {
|
|
1055
|
-
if (oe) return
|
|
1055
|
+
if (oe) return E.exports;
|
|
1056
1056
|
oe = 1;
|
|
1057
|
-
let e =
|
|
1057
|
+
let e = x, t = T(), n = A(), r = E.exports = function(e) {
|
|
1058
1058
|
t.call(this);
|
|
1059
1059
|
let r = [], i = this;
|
|
1060
1060
|
this._filter = new n(e, {
|
|
@@ -1063,15 +1063,15 @@ function se() {
|
|
|
1063
1063
|
r.push(e);
|
|
1064
1064
|
},
|
|
1065
1065
|
complete: function() {
|
|
1066
|
-
i.emit("complete",
|
|
1066
|
+
i.emit("complete", v.concat(r));
|
|
1067
1067
|
}
|
|
1068
1068
|
}), this._filter.start();
|
|
1069
1069
|
};
|
|
1070
|
-
return e.inherits(r, t),
|
|
1070
|
+
return e.inherits(r, t), E.exports;
|
|
1071
1071
|
}
|
|
1072
|
-
var
|
|
1073
|
-
function
|
|
1074
|
-
return
|
|
1072
|
+
var j = { exports: {} }, ce, le;
|
|
1073
|
+
function M() {
|
|
1074
|
+
return le || (le = 1, ce = {
|
|
1075
1075
|
PNG_SIGNATURE: [
|
|
1076
1076
|
137,
|
|
1077
1077
|
80,
|
|
@@ -1102,12 +1102,12 @@ function N() {
|
|
|
1102
1102
|
6: 4
|
|
1103
1103
|
},
|
|
1104
1104
|
GAMMA_DIVISION: 1e5
|
|
1105
|
-
}),
|
|
1105
|
+
}), ce;
|
|
1106
1106
|
}
|
|
1107
|
-
var
|
|
1108
|
-
function
|
|
1109
|
-
if (
|
|
1110
|
-
|
|
1107
|
+
var N = { exports: {} }, P;
|
|
1108
|
+
function F() {
|
|
1109
|
+
if (P) return N.exports;
|
|
1110
|
+
P = 1;
|
|
1111
1111
|
let e = [];
|
|
1112
1112
|
(function() {
|
|
1113
1113
|
for (let t = 0; t < 256; t++) {
|
|
@@ -1116,7 +1116,7 @@ function I() {
|
|
|
1116
1116
|
e[t] = n;
|
|
1117
1117
|
}
|
|
1118
1118
|
})();
|
|
1119
|
-
let t =
|
|
1119
|
+
let t = N.exports = function() {
|
|
1120
1120
|
this._crc = -1;
|
|
1121
1121
|
};
|
|
1122
1122
|
return t.prototype.write = function(t) {
|
|
@@ -1128,13 +1128,13 @@ function I() {
|
|
|
1128
1128
|
let n = -1;
|
|
1129
1129
|
for (let r = 0; r < t.length; r++) n = e[(n ^ t[r]) & 255] ^ n >>> 8;
|
|
1130
1130
|
return n ^ -1;
|
|
1131
|
-
},
|
|
1131
|
+
}, N.exports;
|
|
1132
1132
|
}
|
|
1133
|
-
var
|
|
1134
|
-
function
|
|
1135
|
-
if (
|
|
1136
|
-
|
|
1137
|
-
let e =
|
|
1133
|
+
var I;
|
|
1134
|
+
function L() {
|
|
1135
|
+
if (I) return j.exports;
|
|
1136
|
+
I = 1;
|
|
1137
|
+
let e = M(), t = F(), n = j.exports = function(t, n) {
|
|
1138
1138
|
this._options = t, t.checkCRC = t.checkCRC !== !1, this._hasIHDR = !1, this._hasIEND = !1, this._emittedHeadersFinished = !1, this._palette = [], this._colorType = 0, this._chunks = {}, this._chunks[e.TYPE_IHDR] = this._handleIHDR.bind(this), this._chunks[e.TYPE_IEND] = this._handleIEND.bind(this), this._chunks[e.TYPE_IDAT] = this._handleIDAT.bind(this), this._chunks[e.TYPE_PLTE] = this._handlePLTE.bind(this), this._chunks[e.TYPE_tRNS] = this._handleTRNS.bind(this), this._chunks[e.TYPE_gAMA] = this._handleGAMA.bind(this), this.read = n.read, this.error = n.error, this.metadata = n.metadata, this.gamma = n.gamma, this.transColor = n.transColor, this.palette = n.palette, this.parsed = n.parsed, this.inflateData = n.inflateData, this.finished = n.finished, this.simpleTransparency = n.simpleTransparency, this.headersFinished = n.headersFinished || function() {};
|
|
1139
1139
|
};
|
|
1140
1140
|
return n.prototype.start = function() {
|
|
@@ -1154,7 +1154,7 @@ function R() {
|
|
|
1154
1154
|
this.error(/* @__PURE__ */ Error("Expected IHDR on beggining"));
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
|
-
if (this._crc = new t(), this._crc.write(
|
|
1157
|
+
if (this._crc = new t(), this._crc.write(v.from(a)), this._chunks[i]) return this._chunks[i](r);
|
|
1158
1158
|
if (!o) {
|
|
1159
1159
|
this.error(/* @__PURE__ */ Error("Unsupported critical chunk type " + a));
|
|
1160
1160
|
return;
|
|
@@ -1256,12 +1256,12 @@ function R() {
|
|
|
1256
1256
|
this.read(e, this._parseIEND.bind(this));
|
|
1257
1257
|
}, n.prototype._parseIEND = function(e) {
|
|
1258
1258
|
this._crc.write(e), this._hasIEND = !0, this._handleChunkEnd(), this.finished && this.finished();
|
|
1259
|
-
},
|
|
1259
|
+
}, j.exports;
|
|
1260
1260
|
}
|
|
1261
|
-
var
|
|
1262
|
-
function
|
|
1263
|
-
if (
|
|
1264
|
-
|
|
1261
|
+
var R = {}, z;
|
|
1262
|
+
function B() {
|
|
1263
|
+
if (z) return R;
|
|
1264
|
+
z = 1;
|
|
1265
1265
|
let e = ne(), t = [
|
|
1266
1266
|
function() {},
|
|
1267
1267
|
function(e, t, n, r) {
|
|
@@ -1354,11 +1354,11 @@ function V() {
|
|
|
1354
1354
|
a.resetAfterLine();
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
return
|
|
1357
|
+
return R.dataToBitMap = function(t, n) {
|
|
1358
1358
|
let o = n.width, s = n.height, c = n.depth, l = n.bpp, u = n.interlace, d;
|
|
1359
1359
|
c !== 8 && (d = r(t, c));
|
|
1360
1360
|
let f;
|
|
1361
|
-
f = c <= 8 ?
|
|
1361
|
+
f = c <= 8 ? v.alloc(o * s * 4) : new Uint16Array(o * s * 4);
|
|
1362
1362
|
let p = 2 ** c - 1, m = 0, h, g;
|
|
1363
1363
|
if (u) h = e.getImagePasses(o, s), g = e.getInterlaceIterator(o, s);
|
|
1364
1364
|
else {
|
|
@@ -1376,12 +1376,12 @@ function V() {
|
|
|
1376
1376
|
if (m !== t.length) throw Error("extra data found");
|
|
1377
1377
|
} else d.end();
|
|
1378
1378
|
return f;
|
|
1379
|
-
},
|
|
1379
|
+
}, R;
|
|
1380
1380
|
}
|
|
1381
|
-
var
|
|
1382
|
-
function
|
|
1383
|
-
if (
|
|
1384
|
-
|
|
1381
|
+
var V, ue;
|
|
1382
|
+
function H() {
|
|
1383
|
+
if (ue) return V;
|
|
1384
|
+
ue = 1;
|
|
1385
1385
|
function e(e, t, n, r, i) {
|
|
1386
1386
|
let a = 0;
|
|
1387
1387
|
for (let o = 0; o < r; o++) for (let r = 0; r < n; r++) {
|
|
@@ -1406,16 +1406,16 @@ function W() {
|
|
|
1406
1406
|
o += 4;
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
return
|
|
1409
|
+
return V = function(r, i, a = !1) {
|
|
1410
1410
|
let o = i.depth, s = i.width, c = i.height, l = i.colorType, u = i.transColor, d = i.palette, f = r;
|
|
1411
|
-
return l === 3 ? e(r, f, s, c, d) : (u && t(r, f, s, c, u), o !== 8 && !a && (o === 16 && (f =
|
|
1412
|
-
},
|
|
1411
|
+
return l === 3 ? e(r, f, s, c, d) : (u && t(r, f, s, c, u), o !== 8 && !a && (o === 16 && (f = v.alloc(s * c * 4)), n(r, f, s, c, o))), f;
|
|
1412
|
+
}, V;
|
|
1413
1413
|
}
|
|
1414
|
-
var
|
|
1415
|
-
function
|
|
1416
|
-
if (
|
|
1417
|
-
|
|
1418
|
-
let e =
|
|
1414
|
+
var U;
|
|
1415
|
+
function W() {
|
|
1416
|
+
if (U) return S.exports;
|
|
1417
|
+
U = 1;
|
|
1418
|
+
let e = x, t = x, n = T(), r = se(), i = L(), a = B(), o = H(), s = S.exports = function(e) {
|
|
1419
1419
|
n.call(this), this._parser = new i(e, {
|
|
1420
1420
|
read: this.read.bind(this),
|
|
1421
1421
|
error: this._handleError.bind(this),
|
|
@@ -1469,14 +1469,14 @@ function ue() {
|
|
|
1469
1469
|
return;
|
|
1470
1470
|
}
|
|
1471
1471
|
this.emit("parsed", t);
|
|
1472
|
-
},
|
|
1472
|
+
}, S.exports;
|
|
1473
1473
|
}
|
|
1474
|
-
var
|
|
1474
|
+
var G = { exports: {} }, K = { exports: {} }, q, de;
|
|
1475
1475
|
function fe() {
|
|
1476
|
-
if (de) return
|
|
1476
|
+
if (de) return q;
|
|
1477
1477
|
de = 1;
|
|
1478
|
-
let e =
|
|
1479
|
-
return
|
|
1478
|
+
let e = M();
|
|
1479
|
+
return q = function(t, n, r, i) {
|
|
1480
1480
|
let a = [e.COLORTYPE_COLOR_ALPHA, e.COLORTYPE_ALPHA].indexOf(i.colorType) !== -1;
|
|
1481
1481
|
if (i.colorType === i.inputColorType) {
|
|
1482
1482
|
let e = (function() {
|
|
@@ -1489,7 +1489,7 @@ function fe() {
|
|
|
1489
1489
|
c === 4 && !i.inputHasAlpha && (c = 3);
|
|
1490
1490
|
let l = e.COLORTYPE_TO_BPP_MAP[i.colorType];
|
|
1491
1491
|
i.bitDepth === 16 && (s = 65535, l *= 2);
|
|
1492
|
-
let u =
|
|
1492
|
+
let u = v.alloc(n * r * l), d = 0, f = 0, p = i.bgColor || {};
|
|
1493
1493
|
p.red === void 0 && (p.red = s), p.green === void 0 && (p.green = s), p.blue === void 0 && (p.blue = s);
|
|
1494
1494
|
function m() {
|
|
1495
1495
|
let t, n, r, c = s;
|
|
@@ -1533,13 +1533,13 @@ function fe() {
|
|
|
1533
1533
|
d += c, f += l;
|
|
1534
1534
|
}
|
|
1535
1535
|
return u;
|
|
1536
|
-
},
|
|
1536
|
+
}, q;
|
|
1537
1537
|
}
|
|
1538
|
-
var
|
|
1539
|
-
function
|
|
1540
|
-
if (
|
|
1541
|
-
|
|
1542
|
-
let e =
|
|
1538
|
+
var J, Y;
|
|
1539
|
+
function X() {
|
|
1540
|
+
if (Y) return J;
|
|
1541
|
+
Y = 1;
|
|
1542
|
+
let e = ae();
|
|
1543
1543
|
function t(e, t, n, r, i) {
|
|
1544
1544
|
for (let a = 0; a < n; a++) r[i + a] = e[t + a];
|
|
1545
1545
|
}
|
|
@@ -1617,7 +1617,7 @@ function Z() {
|
|
|
1617
1617
|
3: c,
|
|
1618
1618
|
4: u
|
|
1619
1619
|
};
|
|
1620
|
-
return
|
|
1620
|
+
return J = function(e, t, n, r, i) {
|
|
1621
1621
|
let a;
|
|
1622
1622
|
if (!("filterType" in r) || r.filterType === -1) a = [
|
|
1623
1623
|
0,
|
|
@@ -1629,7 +1629,7 @@ function Z() {
|
|
|
1629
1629
|
else if (typeof r.filterType == "number") a = [r.filterType];
|
|
1630
1630
|
else throw Error("unrecognised filter types");
|
|
1631
1631
|
r.bitDepth === 16 && (i *= 2);
|
|
1632
|
-
let o = t * i, s = 0, c = 0, l =
|
|
1632
|
+
let o = t * i, s = 0, c = 0, l = v.alloc((o + 1) * n), u = a[0];
|
|
1633
1633
|
for (let t = 0; t < n; t++) {
|
|
1634
1634
|
if (a.length > 1) {
|
|
1635
1635
|
let t = Infinity;
|
|
@@ -1641,13 +1641,13 @@ function Z() {
|
|
|
1641
1641
|
l[s] = u, s++, d[u](e, c, o, l, s, i), s += o, c += o;
|
|
1642
1642
|
}
|
|
1643
1643
|
return l;
|
|
1644
|
-
},
|
|
1644
|
+
}, J;
|
|
1645
1645
|
}
|
|
1646
|
-
var
|
|
1647
|
-
function
|
|
1648
|
-
if (
|
|
1649
|
-
|
|
1650
|
-
let e =
|
|
1646
|
+
var Z;
|
|
1647
|
+
function pe() {
|
|
1648
|
+
if (Z) return K.exports;
|
|
1649
|
+
Z = 1;
|
|
1650
|
+
let e = M(), t = F(), n = fe(), r = X(), i = x, a = K.exports = function(t) {
|
|
1651
1651
|
if (this._options = t, t.deflateChunkSize = t.deflateChunkSize || 32 * 1024, t.deflateLevel = t.deflateLevel == null ? 9 : t.deflateLevel, t.deflateStrategy = t.deflateStrategy == null ? 3 : t.deflateStrategy, t.inputHasAlpha = t.inputHasAlpha == null ? !0 : t.inputHasAlpha, t.deflateFactory = t.deflateFactory || i.createDeflate, t.bitDepth = t.bitDepth || 8, t.colorType = typeof t.colorType == "number" ? t.colorType : e.COLORTYPE_COLOR_ALPHA, t.inputColorType = typeof t.inputColorType == "number" ? t.inputColorType : e.COLORTYPE_COLOR_ALPHA, [
|
|
1652
1652
|
e.COLORTYPE_GRAYSCALE,
|
|
1653
1653
|
e.COLORTYPE_COLOR,
|
|
@@ -1674,43 +1674,43 @@ function Q() {
|
|
|
1674
1674
|
let o = n(t, i, a, this._options), s = e.COLORTYPE_TO_BPP_MAP[this._options.colorType];
|
|
1675
1675
|
return r(o, i, a, this._options, s);
|
|
1676
1676
|
}, a.prototype._packChunk = function(e, n) {
|
|
1677
|
-
let r = n ? n.length : 0, i =
|
|
1677
|
+
let r = n ? n.length : 0, i = v.alloc(r + 12);
|
|
1678
1678
|
return i.writeUInt32BE(r, 0), i.writeUInt32BE(e, 4), n && n.copy(i, 8), i.writeInt32BE(t.crc32(i.slice(4, i.length - 4)), i.length - 4), i;
|
|
1679
1679
|
}, a.prototype.packGAMA = function(t) {
|
|
1680
|
-
let n =
|
|
1680
|
+
let n = v.alloc(4);
|
|
1681
1681
|
return n.writeUInt32BE(Math.floor(t * e.GAMMA_DIVISION), 0), this._packChunk(e.TYPE_gAMA, n);
|
|
1682
1682
|
}, a.prototype.packIHDR = function(t, n) {
|
|
1683
|
-
let r =
|
|
1683
|
+
let r = v.alloc(13);
|
|
1684
1684
|
return r.writeUInt32BE(t, 0), r.writeUInt32BE(n, 4), r[8] = this._options.bitDepth, r[9] = this._options.colorType, r[10] = 0, r[11] = 0, r[12] = 0, this._packChunk(e.TYPE_IHDR, r);
|
|
1685
1685
|
}, a.prototype.packIDAT = function(t) {
|
|
1686
1686
|
return this._packChunk(e.TYPE_IDAT, t);
|
|
1687
1687
|
}, a.prototype.packIEND = function() {
|
|
1688
1688
|
return this._packChunk(e.TYPE_IEND, null);
|
|
1689
|
-
},
|
|
1689
|
+
}, K.exports;
|
|
1690
1690
|
}
|
|
1691
|
-
var
|
|
1692
|
-
function
|
|
1693
|
-
if (
|
|
1694
|
-
|
|
1695
|
-
let e =
|
|
1691
|
+
var Q;
|
|
1692
|
+
function me() {
|
|
1693
|
+
if (Q) return G.exports;
|
|
1694
|
+
Q = 1;
|
|
1695
|
+
let e = x, t = x, n = M(), r = pe(), i = G.exports = function(e) {
|
|
1696
1696
|
t.call(this);
|
|
1697
1697
|
let n = e || {};
|
|
1698
1698
|
this._packer = new r(n), this._deflate = this._packer.createDeflate(), this.readable = !0;
|
|
1699
1699
|
};
|
|
1700
1700
|
return e.inherits(i, t), i.prototype.pack = function(e, t, r, i) {
|
|
1701
|
-
this.emit("data",
|
|
1701
|
+
this.emit("data", v.from(n.PNG_SIGNATURE)), this.emit("data", this._packer.packIHDR(t, r)), i && this.emit("data", this._packer.packGAMA(i));
|
|
1702
1702
|
let a = this._packer.filterData(e, t, r);
|
|
1703
1703
|
this._deflate.on("error", this.emit.bind(this, "error")), this._deflate.on("data", (function(e) {
|
|
1704
1704
|
this.emit("data", this._packer.packIDAT(e));
|
|
1705
1705
|
}).bind(this)), this._deflate.on("end", (function() {
|
|
1706
1706
|
this.emit("data", this._packer.packIEND()), this.emit("end");
|
|
1707
1707
|
}).bind(this)), this._deflate.end(a);
|
|
1708
|
-
},
|
|
1708
|
+
}, G.exports;
|
|
1709
1709
|
}
|
|
1710
|
-
var $ = {},
|
|
1711
|
-
function
|
|
1712
|
-
return
|
|
1713
|
-
let n =
|
|
1710
|
+
var $ = {}, he = { exports: {} }, ge;
|
|
1711
|
+
function _e() {
|
|
1712
|
+
return ge || (ge = 1, (function(e, t) {
|
|
1713
|
+
let n = x.ok, r = x, i = x, a = x.kMaxLength;
|
|
1714
1714
|
function o(e) {
|
|
1715
1715
|
if (!(this instanceof o)) return new o(e);
|
|
1716
1716
|
e && e.chunkSize < r.Z_MIN_CHUNK && (e.chunkSize = r.Z_MIN_CHUNK), r.Inflate.call(this, e), this._offset = this._offset === void 0 ? this._outOffset : this._offset, this._buffer = this._buffer || this._outBuffer, e && e.maxLength != null && (this._maxLength = e.maxLength);
|
|
@@ -1734,7 +1734,7 @@ function ve() {
|
|
|
1734
1734
|
let e = o._buffer.slice(o._offset, o._offset + r);
|
|
1735
1735
|
if (o._offset += r, e.length > u && (e = e.slice(0, u)), f.push(e), p += e.length, u -= e.length, u === 0) return !1;
|
|
1736
1736
|
}
|
|
1737
|
-
return (t === 0 || o._offset >= o._chunkSize) && (l = o._chunkSize, o._offset = 0, o._buffer =
|
|
1737
|
+
return (t === 0 || o._offset >= o._chunkSize) && (l = o._chunkSize, o._offset = 0, o._buffer = v.allocUnsafe(o._chunkSize)), t === 0 ? (d += s - e, s = e, !0) : !1;
|
|
1738
1738
|
}
|
|
1739
1739
|
n(this._handle, "zlib binding closed");
|
|
1740
1740
|
let g;
|
|
@@ -1743,11 +1743,11 @@ function ve() {
|
|
|
1743
1743
|
while (!this._hadError && h(g[0], g[1]));
|
|
1744
1744
|
if (this._hadError) throw m;
|
|
1745
1745
|
if (p >= a) throw c(this), /* @__PURE__ */ RangeError("Cannot create final Buffer. It would be larger than 0x" + a.toString(16) + " bytes");
|
|
1746
|
-
let _ =
|
|
1746
|
+
let _ = v.concat(f, p);
|
|
1747
1747
|
return c(this), _;
|
|
1748
1748
|
}, i.inherits(o, r.Inflate);
|
|
1749
1749
|
function l(e, t) {
|
|
1750
|
-
if (typeof t == "string" && (t =
|
|
1750
|
+
if (typeof t == "string" && (t = v.from(t)), !(t instanceof v)) throw TypeError("Not a string or buffer");
|
|
1751
1751
|
let n = e._finishFlushFlag;
|
|
1752
1752
|
return n ??= r.Z_FINISH, e._processChunk(t, n);
|
|
1753
1753
|
}
|
|
@@ -1755,13 +1755,13 @@ function ve() {
|
|
|
1755
1755
|
return l(new o(t), e);
|
|
1756
1756
|
}
|
|
1757
1757
|
e.exports = t = u, t.Inflate = o, t.createInflate = s, t.inflateSync = u;
|
|
1758
|
-
})(
|
|
1758
|
+
})(he, he.exports)), he.exports;
|
|
1759
1759
|
}
|
|
1760
|
-
var
|
|
1761
|
-
function
|
|
1762
|
-
if (
|
|
1763
|
-
|
|
1764
|
-
let e =
|
|
1760
|
+
var ve = { exports: {} }, ye;
|
|
1761
|
+
function be() {
|
|
1762
|
+
if (ye) return ve.exports;
|
|
1763
|
+
ye = 1;
|
|
1764
|
+
let e = ve.exports = function(e) {
|
|
1765
1765
|
this._buffer = e, this._reads = [];
|
|
1766
1766
|
};
|
|
1767
1767
|
return e.prototype.read = function(e, t) {
|
|
@@ -1781,14 +1781,14 @@ function xe() {
|
|
|
1781
1781
|
}
|
|
1782
1782
|
if (this._reads.length > 0) throw Error("There are some read requests waitng on finished stream");
|
|
1783
1783
|
if (this._buffer.length > 0) throw Error("unrecognised content at end of stream");
|
|
1784
|
-
},
|
|
1784
|
+
}, ve.exports;
|
|
1785
1785
|
}
|
|
1786
|
-
var
|
|
1787
|
-
function
|
|
1788
|
-
if (
|
|
1789
|
-
|
|
1790
|
-
let e =
|
|
1791
|
-
return
|
|
1786
|
+
var xe = {}, Se;
|
|
1787
|
+
function Ce() {
|
|
1788
|
+
if (Se) return xe;
|
|
1789
|
+
Se = 1;
|
|
1790
|
+
let e = be(), t = A();
|
|
1791
|
+
return xe.process = function(n, r) {
|
|
1792
1792
|
let i = [], a = new e(n);
|
|
1793
1793
|
return new t(r, {
|
|
1794
1794
|
read: a.read.bind(a),
|
|
@@ -1796,17 +1796,17 @@ function we() {
|
|
|
1796
1796
|
i.push(e);
|
|
1797
1797
|
},
|
|
1798
1798
|
complete: function() {}
|
|
1799
|
-
}).start(), a.process(),
|
|
1800
|
-
},
|
|
1799
|
+
}).start(), a.process(), v.concat(i);
|
|
1800
|
+
}, xe;
|
|
1801
1801
|
}
|
|
1802
|
-
var
|
|
1803
|
-
function
|
|
1804
|
-
if (
|
|
1805
|
-
|
|
1806
|
-
let e = !0, t =
|
|
1802
|
+
var we, Te;
|
|
1803
|
+
function Ee() {
|
|
1804
|
+
if (Te) return we;
|
|
1805
|
+
Te = 1;
|
|
1806
|
+
let e = !0, t = x, n = _e();
|
|
1807
1807
|
t.deflateSync || (e = !1);
|
|
1808
|
-
let r =
|
|
1809
|
-
return
|
|
1808
|
+
let r = be(), i = Ce(), a = L(), o = B(), s = H();
|
|
1809
|
+
return we = function(c, l) {
|
|
1810
1810
|
if (!e) throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
|
|
1811
1811
|
let u;
|
|
1812
1812
|
function d(e) {
|
|
@@ -1826,26 +1826,26 @@ function De() {
|
|
|
1826
1826
|
f.alpha = !0;
|
|
1827
1827
|
}
|
|
1828
1828
|
let _;
|
|
1829
|
-
function
|
|
1829
|
+
function ee(e) {
|
|
1830
1830
|
_ = e;
|
|
1831
1831
|
}
|
|
1832
|
-
let
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1832
|
+
let y = [];
|
|
1833
|
+
function b(e) {
|
|
1834
|
+
y.push(e);
|
|
1835
1835
|
}
|
|
1836
1836
|
let x = new r(c);
|
|
1837
1837
|
if (new a(l, {
|
|
1838
1838
|
read: x.read.bind(x),
|
|
1839
1839
|
error: d,
|
|
1840
1840
|
metadata: p,
|
|
1841
|
-
gamma:
|
|
1841
|
+
gamma: ee,
|
|
1842
1842
|
palette: h,
|
|
1843
1843
|
transColor: m,
|
|
1844
|
-
inflateData:
|
|
1844
|
+
inflateData: b,
|
|
1845
1845
|
simpleTransparency: g
|
|
1846
1846
|
}).start(), x.process(), u) throw u;
|
|
1847
|
-
let S =
|
|
1848
|
-
|
|
1847
|
+
let S = v.concat(y);
|
|
1848
|
+
y.length = 0;
|
|
1849
1849
|
let C;
|
|
1850
1850
|
if (f.interlace) C = t.inflateSync(S);
|
|
1851
1851
|
else {
|
|
@@ -1862,41 +1862,41 @@ function De() {
|
|
|
1862
1862
|
w = null;
|
|
1863
1863
|
let E = s(T, f, l.skipRescale);
|
|
1864
1864
|
return f.data = E, f.gamma = _ || 0, f;
|
|
1865
|
-
},
|
|
1865
|
+
}, we;
|
|
1866
1866
|
}
|
|
1867
|
-
var
|
|
1868
|
-
function
|
|
1869
|
-
if (
|
|
1870
|
-
|
|
1871
|
-
let e = !0, t =
|
|
1867
|
+
var De, Oe;
|
|
1868
|
+
function ke() {
|
|
1869
|
+
if (Oe) return De;
|
|
1870
|
+
Oe = 1;
|
|
1871
|
+
let e = !0, t = x;
|
|
1872
1872
|
t.deflateSync || (e = !1);
|
|
1873
|
-
let n =
|
|
1874
|
-
return
|
|
1873
|
+
let n = M(), r = pe();
|
|
1874
|
+
return De = function(i, a) {
|
|
1875
1875
|
if (!e) throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
|
|
1876
1876
|
let o = new r(a || {}), s = [];
|
|
1877
|
-
s.push(
|
|
1877
|
+
s.push(v.from(n.PNG_SIGNATURE)), s.push(o.packIHDR(i.width, i.height)), i.gamma && s.push(o.packGAMA(i.gamma));
|
|
1878
1878
|
let c = o.filterData(i.data, i.width, i.height), l = t.deflateSync(c, o.getDeflateOptions());
|
|
1879
1879
|
if (c = null, !l || !l.length) throw Error("bad png - invalid compressed data response");
|
|
1880
|
-
return s.push(o.packIDAT(l)), s.push(o.packIEND()),
|
|
1881
|
-
},
|
|
1880
|
+
return s.push(o.packIDAT(l)), s.push(o.packIEND()), v.concat(s);
|
|
1881
|
+
}, De;
|
|
1882
1882
|
}
|
|
1883
|
-
var
|
|
1884
|
-
function
|
|
1885
|
-
if (
|
|
1886
|
-
|
|
1887
|
-
let e =
|
|
1883
|
+
var Ae;
|
|
1884
|
+
function je() {
|
|
1885
|
+
if (Ae) return $;
|
|
1886
|
+
Ae = 1;
|
|
1887
|
+
let e = Ee(), t = ke();
|
|
1888
1888
|
return $.read = function(t, n) {
|
|
1889
1889
|
return e(t, n || {});
|
|
1890
1890
|
}, $.write = function(e, n) {
|
|
1891
1891
|
return t(e, n);
|
|
1892
1892
|
}, $;
|
|
1893
1893
|
}
|
|
1894
|
-
var
|
|
1895
|
-
function
|
|
1896
|
-
if (
|
|
1897
|
-
|
|
1898
|
-
let t =
|
|
1899
|
-
n.call(this), e ||= {}, this.width = e.width | 0, this.height = e.height | 0, this.data = this.width > 0 && this.height > 0 ?
|
|
1894
|
+
var Me;
|
|
1895
|
+
function Ne() {
|
|
1896
|
+
if (Me) return b;
|
|
1897
|
+
Me = 1;
|
|
1898
|
+
let t = x, n = x, r = W(), i = me(), a = je(), o = b.PNG = function(e) {
|
|
1899
|
+
n.call(this), e ||= {}, this.width = e.width | 0, this.height = e.height | 0, this.data = this.width > 0 && this.height > 0 ? v.alloc(4 * this.width * this.height) : null, e.fill && this.data && this.data.fill(0), this.gamma = 0, this.readable = this.writable = !0, this._parser = new r(e), this._parser.on("error", this.emit.bind(this, "error")), this._parser.on("close", this._handleClose.bind(this)), this._parser.on("metadata", this._metadata.bind(this)), this._parser.on("gamma", this._gamma.bind(this)), this._parser.on("parsed", (function(e) {
|
|
1900
1900
|
this.data = e, this.emit("parsed", e);
|
|
1901
1901
|
}).bind(this)), this._packer = new i(e), this._packer.on("data", this.emit.bind(this, "data")), this._packer.on("end", this.emit.bind(this, "end")), this._parser.on("close", this._handleClose.bind(this)), this._packer.on("error", this.emit.bind(this, "error"));
|
|
1902
1902
|
};
|
|
@@ -1943,8 +1943,8 @@ function Pe() {
|
|
|
1943
1943
|
}
|
|
1944
1944
|
}, o.prototype.adjustGamma = function() {
|
|
1945
1945
|
o.adjustGamma(this);
|
|
1946
|
-
},
|
|
1946
|
+
}, b;
|
|
1947
1947
|
}
|
|
1948
|
-
var
|
|
1948
|
+
var Pe = /* @__PURE__ */ ee({ __proto__: null }, [Ne()]);
|
|
1949
1949
|
//#endregion
|
|
1950
|
-
export {
|
|
1950
|
+
export { Pe as p };
|