@dpuse/dpuse-tool-file-previewer 1.0.129 → 1.0.131
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.
|
@@ -1690,39 +1690,39 @@ var T = [
|
|
|
1690
1690
|
isMultibyteCjk: !1,
|
|
1691
1691
|
languages: ["de"]
|
|
1692
1692
|
})
|
|
1693
|
-
],
|
|
1694
|
-
function
|
|
1695
|
-
let r = `${e}|${t ? [...t].sort().join(",") : ""}|${n ? [...n].sort().join(",") : ""}`, i =
|
|
1693
|
+
], Se = Object.freeze(Object.fromEntries(xe.map((e) => [e.name, e]))), Ce = /* @__PURE__ */ new Map();
|
|
1694
|
+
function we(e, t, n) {
|
|
1695
|
+
let r = `${e}|${t ? [...t].sort().join(",") : ""}|${n ? [...n].sort().join(",") : ""}`, i = Ce.get(r);
|
|
1696
1696
|
if (i !== void 0) return i;
|
|
1697
|
-
let a = Object.values(
|
|
1697
|
+
let a = Object.values(Se).filter((t) => t.era & e);
|
|
1698
1698
|
t !== void 0 && (a = a.filter((e) => t.has(e.name))), n !== void 0 && (a = a.filter((e) => !n.has(e.name)));
|
|
1699
1699
|
let o = Object.freeze(a);
|
|
1700
|
-
return
|
|
1700
|
+
return Ce.set(r, o), o;
|
|
1701
1701
|
}
|
|
1702
|
-
var
|
|
1703
|
-
function
|
|
1702
|
+
var Te = 1024, Ee = /* @__PURE__ */ new Map();
|
|
1703
|
+
function De(e) {
|
|
1704
1704
|
let t = e.toLowerCase();
|
|
1705
|
-
for (let e of Object.values(
|
|
1705
|
+
for (let e of Object.values(Se)) {
|
|
1706
1706
|
if (e.name === t) return e.name;
|
|
1707
1707
|
for (let n of e.aliases) if (n.toLowerCase() === t) return e.name;
|
|
1708
1708
|
}
|
|
1709
1709
|
let n = me(e);
|
|
1710
|
-
return n === null || n === t ? null :
|
|
1710
|
+
return n === null || n === t ? null : E(n);
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1713
|
-
let t =
|
|
1714
|
-
if (t !== void 0) return
|
|
1715
|
-
let n =
|
|
1716
|
-
return
|
|
1712
|
+
function E(e) {
|
|
1713
|
+
let t = Ee.get(e);
|
|
1714
|
+
if (t !== void 0) return Ee.delete(e), Ee.set(e, t), t;
|
|
1715
|
+
let n = De(e);
|
|
1716
|
+
return Ee.size >= Te && Ee.delete(Ee.keys().next().value), Ee.set(e, n), n;
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1719
|
-
let n =
|
|
1718
|
+
function D(e, t) {
|
|
1719
|
+
let n = E(e);
|
|
1720
1720
|
if (n === null) throw Error(`Unknown encoding ${JSON.stringify(e)} in ${t}`);
|
|
1721
1721
|
return n;
|
|
1722
1722
|
}
|
|
1723
1723
|
function Oe(e, t) {
|
|
1724
1724
|
if (e == null) return null;
|
|
1725
|
-
let n = new Set([...e].map((e) =>
|
|
1725
|
+
let n = new Set([...e].map((e) => D(e, t)));
|
|
1726
1726
|
if (n.size === 0) throw Error(`${t} must not be empty; omit the argument or pass null to disable filtering`);
|
|
1727
1727
|
return n;
|
|
1728
1728
|
}
|
|
@@ -2166,7 +2166,7 @@ var ke = /* @__PURE__ */ "Lu.Ll.Lt.Lm.Lo.Mn.Mc.Me.Nd.Nl.No.Pc.Pd.Ps.Pe.Pi.Pf.Po.
|
|
|
2166
2166
|
function A(e) {
|
|
2167
2167
|
let t = Me.get(e);
|
|
2168
2168
|
if (t !== void 0) return t;
|
|
2169
|
-
let n =
|
|
2169
|
+
let n = E(e);
|
|
2170
2170
|
return n === null ? null : Me.get(n) ?? null;
|
|
2171
2171
|
}
|
|
2172
2172
|
function Ne(e, t) {
|
|
@@ -2776,7 +2776,7 @@ function Ot() {
|
|
|
2776
2776
|
return Dt || (Dt = typeof Buffer < "u" ? new Uint8Array(Buffer.from(Et, "base64")) : Uint8Array.from(atob(Et), (e) => e.charCodeAt(0)), Dt);
|
|
2777
2777
|
}
|
|
2778
2778
|
var kt = {};
|
|
2779
|
-
for (let e of Object.values(
|
|
2779
|
+
for (let e of Object.values(Se)) e.languages.length === 1 && (kt[e.name] = e.languages[0]);
|
|
2780
2780
|
var At = null;
|
|
2781
2781
|
function jt() {
|
|
2782
2782
|
if (At) return At;
|
|
@@ -2800,7 +2800,7 @@ function Nt(e) {
|
|
|
2800
2800
|
]);
|
|
2801
2801
|
}
|
|
2802
2802
|
for (let e of [...t.keys()]) {
|
|
2803
|
-
let n =
|
|
2803
|
+
let n = E(e);
|
|
2804
2804
|
n !== null && !t.has(n) && t.set(n, t.get(e));
|
|
2805
2805
|
}
|
|
2806
2806
|
return t;
|
|
@@ -3953,8 +3953,8 @@ function Ur(e) {
|
|
|
3953
3953
|
if (n < t.length * Vr) return null;
|
|
3954
3954
|
let r = ze(Hr, t);
|
|
3955
3955
|
for (let t of r.matchAll(zr)) for (let n of t[0].matchAll(Br)) {
|
|
3956
|
-
let r =
|
|
3957
|
-
if (r !== null && (
|
|
3956
|
+
let r = E(n[1].trim());
|
|
3957
|
+
if (r !== null && (Se[r].era & w.MAINFRAME) !== 0 && Lr(e, r)) return {
|
|
3958
3958
|
encoding: r,
|
|
3959
3959
|
confidence: .95,
|
|
3960
3960
|
language: null,
|
|
@@ -3965,7 +3965,7 @@ function Ur(e) {
|
|
|
3965
3965
|
}
|
|
3966
3966
|
function Wr(e) {
|
|
3967
3967
|
let t = e.slice(0, 12).toLowerCase().replaceAll("_", "-");
|
|
3968
|
-
return t === "utf-8" || t.startsWith("utf-8-") ? "utf-8" : t === "latin-1" || t === "iso-8859-1" || t === "iso-latin-1" || t.startsWith("latin-1-") || t.startsWith("iso-8859-1-") || t.startsWith("iso-latin-1-") ? "iso8859-1" :
|
|
3968
|
+
return t === "utf-8" || t.startsWith("utf-8-") ? "utf-8" : t === "latin-1" || t === "iso-8859-1" || t === "iso-latin-1" || t.startsWith("latin-1-") || t.startsWith("iso-8859-1-") || t.startsWith("iso-latin-1-") ? "iso8859-1" : E(e);
|
|
3969
3969
|
}
|
|
3970
3970
|
function Gr(e) {
|
|
3971
3971
|
let t = e.subarray(0, Er);
|
|
@@ -3996,7 +3996,7 @@ function Kr(e) {
|
|
|
3996
3996
|
}
|
|
3997
3997
|
function qr(e) {
|
|
3998
3998
|
if (e.toLowerCase() === "x-user-defined") return "cp1252";
|
|
3999
|
-
let t =
|
|
3999
|
+
let t = E(e);
|
|
4000
4000
|
return t !== null && Dr.has(t) ? "utf-8" : t;
|
|
4001
4001
|
}
|
|
4002
4002
|
function Jr(e) {
|
|
@@ -4056,7 +4056,7 @@ function Qr(e, t, n) {
|
|
|
4056
4056
|
if (t.encoding === null) return t;
|
|
4057
4057
|
let r = Zr[t.encoding];
|
|
4058
4058
|
if (r === void 0 || !n.has(r)) return t;
|
|
4059
|
-
let i =
|
|
4059
|
+
let i = Se[r], a = Se[t.encoding];
|
|
4060
4060
|
if (i === void 0 || a === void 0) return t;
|
|
4061
4061
|
let o = e.subarray(0, Er), s = new en(), c = $r.computeStructuralScore(o, a, s);
|
|
4062
4062
|
return $r.computeStructuralScore(o, i, s) > c && $r.decodesWithoutError(r, e) ? {
|
|
@@ -4116,7 +4116,7 @@ function oi() {
|
|
|
4116
4116
|
}
|
|
4117
4117
|
let n = /* @__PURE__ */ new Map();
|
|
4118
4118
|
for (let [e, r] of t) {
|
|
4119
|
-
let t = e.indexOf("\0"), i = e.slice(0, t), a = e.slice(t + 1), o =
|
|
4119
|
+
let t = e.indexOf("\0"), i = e.slice(0, t), a = e.slice(t + 1), o = E(i) ?? i, s = E(a) ?? a;
|
|
4120
4120
|
n.set(F(o, s), r);
|
|
4121
4121
|
}
|
|
4122
4122
|
return ai = n, ai;
|
|
@@ -4552,7 +4552,7 @@ var Ki = Object.freeze({
|
|
|
4552
4552
|
euc_kr: "cp949"
|
|
4553
4553
|
}), qi = Pi, Ji = 3, Yi = 4, Xi = 16384;
|
|
4554
4554
|
function Zi(e) {
|
|
4555
|
-
let t =
|
|
4555
|
+
let t = Se[e];
|
|
4556
4556
|
if (t === void 0) return 1 << 30;
|
|
4557
4557
|
let n = t.era;
|
|
4558
4558
|
return n & -n;
|
|
@@ -4643,7 +4643,7 @@ function ia(e, t) {
|
|
|
4643
4643
|
function aa(e, t) {
|
|
4644
4644
|
if (!Ye(t, e)) return !1;
|
|
4645
4645
|
let n = nt[t];
|
|
4646
|
-
return n === void 0 || Ye(
|
|
4646
|
+
return n === void 0 || Ye(E(n) ?? n, e);
|
|
4647
4647
|
}
|
|
4648
4648
|
function oa(e, t, n) {
|
|
4649
4649
|
let r = t.length > 0 ? t[0] : null;
|
|
@@ -4916,7 +4916,7 @@ function Ja(e) {
|
|
|
4916
4916
|
function Ya(e, t, n, r, i, a, o, s) {
|
|
4917
4917
|
let c = new en();
|
|
4918
4918
|
s ||= e.length > n, e = e.subarray(0, n);
|
|
4919
|
-
let l =
|
|
4919
|
+
let l = we(t, r ?? void 0, i ?? void 0), u = new Set(l.map((e) => e.name));
|
|
4920
4920
|
if (e.length === 0) return za(o, u, "empty_input_encoding");
|
|
4921
4921
|
let d = mn(e, s);
|
|
4922
4922
|
if (d !== null && d.encoding !== null && u.has(d.encoding)) return [d];
|
|
@@ -4979,7 +4979,7 @@ var Za = {
|
|
|
4979
4979
|
constructor(e = {}) {
|
|
4980
4980
|
f(this, "_preferSuperset"), f(this, "_compatNames"), f(this, "_encodingEra"), f(this, "_maxBytes"), f(this, "_includeEncodings"), f(this, "_excludeEncodings"), f(this, "_noMatchEncoding"), f(this, "_emptyInputEncoding"), f(this, "_chunks", []), f(this, "_bufferLength", 0), f(this, "_inputTruncated", !1), f(this, "_done", !1), f(this, "_closed", !1), f(this, "_detection", null), f(this, "_buffer", null), e.langFilter ?? ee.ALL;
|
|
4981
4981
|
let t = e.shouldRenameLegacy ?? !1, n = e.encodingEra ?? w.ALL, r = e.maxBytes ?? _, i = e.preferSuperset ?? !1, a = e.compatNames ?? !0, o = e.includeEncodings ?? null, s = e.excludeEncodings ?? null, c = e.noMatchEncoding ?? "cp1252", l = e.emptyInputEncoding ?? "utf-8";
|
|
4982
|
-
ee.ALL, this._preferSuperset = b(t, i), this._compatNames = a, y(r), this._encodingEra = n, this._maxBytes = r, this._includeEncodings = Oe(o, "include_encodings"), this._excludeEncodings = Oe(s, "exclude_encodings"), this._noMatchEncoding =
|
|
4982
|
+
ee.ALL, this._preferSuperset = b(t, i), this._compatNames = a, y(r), this._encodingEra = n, this._maxBytes = r, this._includeEncodings = Oe(o, "include_encodings"), this._excludeEncodings = Oe(s, "exclude_encodings"), this._noMatchEncoding = D(c, "no_match_encoding"), this._emptyInputEncoding = D(l, "empty_input_encoding");
|
|
4983
4983
|
}
|
|
4984
4984
|
feed(e) {
|
|
4985
4985
|
if (this._closed) throw Error("feed() called after close() without reset()");
|
|
@@ -5037,8 +5037,8 @@ function $a(e, t = {}) {
|
|
|
5037
5037
|
maxBytes: i,
|
|
5038
5038
|
includeEncodings: f,
|
|
5039
5039
|
excludeEncodings: p,
|
|
5040
|
-
noMatchEncoding:
|
|
5041
|
-
emptyInputEncoding:
|
|
5040
|
+
noMatchEncoding: D(l, "no_match_encoding"),
|
|
5041
|
+
emptyInputEncoding: D(u, "empty_input_encoding")
|
|
5042
5042
|
})[0] };
|
|
5043
5043
|
return d && tt(m, e.subarray(0, i), {
|
|
5044
5044
|
includeEncodings: f,
|
|
@@ -5054,8 +5054,8 @@ function eo(e, t = {}) {
|
|
|
5054
5054
|
maxBytes: a,
|
|
5055
5055
|
includeEncodings: p,
|
|
5056
5056
|
excludeEncodings: m,
|
|
5057
|
-
noMatchEncoding:
|
|
5058
|
-
emptyInputEncoding:
|
|
5057
|
+
noMatchEncoding: D(u, "no_match_encoding"),
|
|
5058
|
+
emptyInputEncoding: D(d, "empty_input_encoding")
|
|
5059
5059
|
}).map((e) => ({ ...e }));
|
|
5060
5060
|
if (!n) {
|
|
5061
5061
|
let e = h.filter((e) => e.confidence > C);
|
|
@@ -6339,18 +6339,18 @@ function Ps(e, t, n) {
|
|
|
6339
6339
|
if (!Number.isFinite(e) || e < 0 || e > t) throw new Ns(`${n} has invalid size ${e} (maximum ${t} bytes)`);
|
|
6340
6340
|
return e;
|
|
6341
6341
|
}
|
|
6342
|
-
async function
|
|
6342
|
+
async function K(e, t, { maximumLength: n = Ms, reason: r = "skip" } = {}) {
|
|
6343
6343
|
let i = Ps(t, n, r);
|
|
6344
6344
|
await e.ignore(i);
|
|
6345
6345
|
}
|
|
6346
|
-
async function
|
|
6346
|
+
async function Fs(e, t, n, { maximumLength: r = t.length, reason: i = "read" } = {}) {
|
|
6347
6347
|
let a = Ps(n?.length ?? t.length, r, i);
|
|
6348
6348
|
return e.readBuffer(t, {
|
|
6349
6349
|
...n,
|
|
6350
6350
|
length: a
|
|
6351
6351
|
});
|
|
6352
6352
|
}
|
|
6353
|
-
function
|
|
6353
|
+
function q(e, t, n) {
|
|
6354
6354
|
n = {
|
|
6355
6355
|
offset: 0,
|
|
6356
6356
|
...n
|
|
@@ -6360,31 +6360,31 @@ function K(e, t, n) {
|
|
|
6360
6360
|
} else if (i !== e[r + n.offset]) return !1;
|
|
6361
6361
|
return !0;
|
|
6362
6362
|
}
|
|
6363
|
-
function
|
|
6363
|
+
function J(e) {
|
|
6364
6364
|
let t = e.fileInfo.size;
|
|
6365
6365
|
return !Number.isFinite(t) || t === 2 ** 53 - 1;
|
|
6366
6366
|
}
|
|
6367
|
-
function
|
|
6368
|
-
return
|
|
6367
|
+
function Is(e, t, n) {
|
|
6368
|
+
return J(e) && e.position - t > n;
|
|
6369
6369
|
}
|
|
6370
6370
|
// node_modules/file-type/source/detectors/zip.js
|
|
6371
|
-
var
|
|
6371
|
+
var Ls = 1048576, Rs = 1024, zs = Ls, Bs = /* @__PURE__ */ new Set([
|
|
6372
6372
|
"Unexpected signature",
|
|
6373
6373
|
"Encrypted ZIP",
|
|
6374
6374
|
"Expected Central-File-Header signature"
|
|
6375
|
-
]),
|
|
6375
|
+
]), Vs = ["Unsupported ZIP compression method:", "Expected data-descriptor-signature at position "], Hs = /* @__PURE__ */ new Set([
|
|
6376
6376
|
"Z_BUF_ERROR",
|
|
6377
6377
|
"Z_DATA_ERROR",
|
|
6378
6378
|
"ERR_INVALID_STATE"
|
|
6379
6379
|
]);
|
|
6380
|
-
function
|
|
6380
|
+
function Us(e) {
|
|
6381
6381
|
if (e instanceof W || e instanceof Ns || e instanceof is) return !0;
|
|
6382
6382
|
if (!(e instanceof Error)) return !1;
|
|
6383
|
-
if (e instanceof TypeError && e.message.startsWith("Failed to deflate ZIP entry:") ||
|
|
6384
|
-
for (let t of
|
|
6383
|
+
if (e instanceof TypeError && e.message.startsWith("Failed to deflate ZIP entry:") || Bs.has(e.message) || Hs.has(e.code)) return !0;
|
|
6384
|
+
for (let t of Vs) if (e.message.startsWith(t)) return !0;
|
|
6385
6385
|
return !1;
|
|
6386
6386
|
}
|
|
6387
|
-
function
|
|
6387
|
+
function Ws(e) {
|
|
6388
6388
|
return e instanceof is && [
|
|
6389
6389
|
"maxTotalScanBytes",
|
|
6390
6390
|
"maxTotalDataDescriptorScanBytes",
|
|
@@ -6392,12 +6392,12 @@ function Gs(e) {
|
|
|
6392
6392
|
"maxSkippedEntrySize"
|
|
6393
6393
|
].includes(e.limit);
|
|
6394
6394
|
}
|
|
6395
|
-
function
|
|
6395
|
+
function Gs(e, t = Ls) {
|
|
6396
6396
|
let n = [e.compressedSize, e.uncompressedSize];
|
|
6397
6397
|
for (let e of n) if (!Number.isFinite(e) || e < 0 || e > t) return !1;
|
|
6398
6398
|
return !0;
|
|
6399
6399
|
}
|
|
6400
|
-
function
|
|
6400
|
+
function Ks() {
|
|
6401
6401
|
return {
|
|
6402
6402
|
hasDocumentEntry: !1,
|
|
6403
6403
|
hasMasterSlideEntry: !1,
|
|
@@ -6405,10 +6405,10 @@ function qs() {
|
|
|
6405
6405
|
hasCalculationEngineEntry: !1
|
|
6406
6406
|
};
|
|
6407
6407
|
}
|
|
6408
|
-
function
|
|
6408
|
+
function qs(e, t) {
|
|
6409
6409
|
t === "Index/Document.iwa" && (e.hasDocumentEntry = !0), t.startsWith("Index/MasterSlide") && (e.hasMasterSlideEntry = !0), t.startsWith("Index/Tables/") && (e.hasTablesEntry = !0), t === "Index/CalculationEngine.iwa" && (e.hasCalculationEngineEntry = !0);
|
|
6410
6410
|
}
|
|
6411
|
-
function
|
|
6411
|
+
function Js(e) {
|
|
6412
6412
|
if (e.hasDocumentEntry) return e.hasMasterSlideEntry ? {
|
|
6413
6413
|
ext: "key",
|
|
6414
6414
|
mime: "application/vnd.apple.keynote"
|
|
@@ -6420,7 +6420,7 @@ function Ys(e) {
|
|
|
6420
6420
|
mime: "application/vnd.apple.pages"
|
|
6421
6421
|
};
|
|
6422
6422
|
}
|
|
6423
|
-
function
|
|
6423
|
+
function Ys(e) {
|
|
6424
6424
|
switch (e = e.toLowerCase(), e) {
|
|
6425
6425
|
case "application/epub+zip": return {
|
|
6426
6426
|
ext: "epub",
|
|
@@ -6524,7 +6524,7 @@ function Xs(e) {
|
|
|
6524
6524
|
};
|
|
6525
6525
|
}
|
|
6526
6526
|
}
|
|
6527
|
-
function
|
|
6527
|
+
function Xs() {
|
|
6528
6528
|
return {
|
|
6529
6529
|
hasContentTypesEntry: !1,
|
|
6530
6530
|
hasParsedContentTypesEntry: !1,
|
|
@@ -6536,10 +6536,10 @@ function Zs() {
|
|
|
6536
6536
|
hasThreeDimensionalModelEntry: !1
|
|
6537
6537
|
};
|
|
6538
6538
|
}
|
|
6539
|
-
function
|
|
6539
|
+
function Zs(e, t) {
|
|
6540
6540
|
t.startsWith("word/") && (e.hasWordDirectory = !0), t.startsWith("ppt/") && (e.hasPresentationDirectory = !0), t.startsWith("xl/") && (e.hasSpreadsheetDirectory = !0), t.startsWith("3D/") && t.endsWith(".model") && (e.hasThreeDimensionalModelEntry = !0);
|
|
6541
6541
|
}
|
|
6542
|
-
function
|
|
6542
|
+
function Qs(e) {
|
|
6543
6543
|
if (e.hasWordDirectory) return {
|
|
6544
6544
|
ext: "docx",
|
|
6545
6545
|
mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
@@ -6557,10 +6557,10 @@ function $s(e) {
|
|
|
6557
6557
|
mime: "model/3mf"
|
|
6558
6558
|
};
|
|
6559
6559
|
}
|
|
6560
|
-
function
|
|
6561
|
-
if (!(!e.hasContentTypesEntry || e.hasUnparseableContentTypes || e.isParsingContentTypes || e.hasParsedContentTypesEntry)) return
|
|
6560
|
+
function $s(e) {
|
|
6561
|
+
if (!(!e.hasContentTypesEntry || e.hasUnparseableContentTypes || e.isParsingContentTypes || e.hasParsedContentTypesEntry)) return Qs(e);
|
|
6562
6562
|
}
|
|
6563
|
-
function
|
|
6563
|
+
function ec(e) {
|
|
6564
6564
|
let t = e.indexOf(".main+xml\"");
|
|
6565
6565
|
if (t === -1) {
|
|
6566
6566
|
let t = "application/vnd.ms-package.3dmanufacturing-3dmodel+xml";
|
|
@@ -6569,22 +6569,22 @@ function tc(e) {
|
|
|
6569
6569
|
let n = e.slice(0, t), r = n.lastIndexOf("\"");
|
|
6570
6570
|
return n.slice(r + 1);
|
|
6571
6571
|
}
|
|
6572
|
-
async function
|
|
6573
|
-
let t, n =
|
|
6572
|
+
async function tc(e) {
|
|
6573
|
+
let t, n = Xs(), r = Ks();
|
|
6574
6574
|
try {
|
|
6575
6575
|
await new ps(e, {
|
|
6576
6576
|
useCentralDirectory: !1,
|
|
6577
6577
|
allowTruncatedDataDescriptor: !0,
|
|
6578
|
-
maxEntryCount:
|
|
6579
|
-
maxTotalScanBytes:
|
|
6580
|
-
maxTotalDataDescriptorScanBytes:
|
|
6581
|
-
maxSkippedEntrySize:
|
|
6582
|
-
maxDataDescriptorScanBytes:
|
|
6583
|
-
maxCompressedSize:
|
|
6584
|
-
maxUncompressedSize:
|
|
6578
|
+
maxEntryCount: Rs,
|
|
6579
|
+
maxTotalScanBytes: J(e) ? Ms : Infinity,
|
|
6580
|
+
maxTotalDataDescriptorScanBytes: J(e) ? Infinity : Ls,
|
|
6581
|
+
maxSkippedEntrySize: J(e) ? Ls : Infinity,
|
|
6582
|
+
maxDataDescriptorScanBytes: Ls,
|
|
6583
|
+
maxCompressedSize: zs,
|
|
6584
|
+
maxUncompressedSize: zs
|
|
6585
6585
|
}).unzip((e) => {
|
|
6586
|
-
if (
|
|
6587
|
-
let i = e.filename === "[Content_Types].xml", a =
|
|
6586
|
+
if (Zs(n, e.filename), qs(r, e.filename), r.hasDocumentEntry && (r.hasMasterSlideEntry || r.hasTablesEntry)) return t = Js(r), { stop: !0 };
|
|
6587
|
+
let i = e.filename === "[Content_Types].xml", a = $s(n);
|
|
6588
6588
|
if (!i && a) return t = a, { stop: !0 };
|
|
6589
6589
|
switch (e.filename) {
|
|
6590
6590
|
case "META-INF/mozilla.rsa": return t = {
|
|
@@ -6595,16 +6595,16 @@ async function nc(e) {
|
|
|
6595
6595
|
ext: "jar",
|
|
6596
6596
|
mime: "application/java-archive"
|
|
6597
6597
|
}, { stop: !0 };
|
|
6598
|
-
case "mimetype": return
|
|
6598
|
+
case "mimetype": return Gs(e, zs) ? {
|
|
6599
6599
|
async handler(e) {
|
|
6600
|
-
t =
|
|
6600
|
+
t = Ys(new TextDecoder("utf-8").decode(e).trim());
|
|
6601
6601
|
},
|
|
6602
6602
|
stop: !0
|
|
6603
6603
|
} : {};
|
|
6604
|
-
case "[Content_Types].xml": return n.hasContentTypesEntry = !0,
|
|
6604
|
+
case "[Content_Types].xml": return n.hasContentTypesEntry = !0, Gs(e, zs) ? (n.isParsingContentTypes = !0, {
|
|
6605
6605
|
async handler(e) {
|
|
6606
|
-
let r =
|
|
6607
|
-
r && (t =
|
|
6606
|
+
let r = ec(new TextDecoder("utf-8").decode(e));
|
|
6607
|
+
r && (t = Ys(r)), n.hasParsedContentTypesEntry = !0, n.isParsingContentTypes = !1;
|
|
6608
6608
|
},
|
|
6609
6609
|
stop: !0
|
|
6610
6610
|
}) : (n.hasUnparseableContentTypes = !0, {});
|
|
@@ -6615,23 +6615,23 @@ async function nc(e) {
|
|
|
6615
6615
|
}
|
|
6616
6616
|
});
|
|
6617
6617
|
} catch (e) {
|
|
6618
|
-
if (!
|
|
6619
|
-
n.isParsingContentTypes && (n.isParsingContentTypes = !1, n.hasUnparseableContentTypes = !0), !t && (e instanceof W || e instanceof Ns ||
|
|
6618
|
+
if (!Us(e)) throw e;
|
|
6619
|
+
n.isParsingContentTypes && (n.isParsingContentTypes = !1, n.hasUnparseableContentTypes = !0), !t && (e instanceof W || e instanceof Ns || Ws(e)) && !n.hasContentTypesEntry && (t = Qs(n));
|
|
6620
6620
|
}
|
|
6621
|
-
let i =
|
|
6622
|
-
return t ??
|
|
6621
|
+
let i = J(e) && r.hasDocumentEntry && !r.hasMasterSlideEntry && !r.hasTablesEntry && !r.hasCalculationEngineEntry ? void 0 : Js(r);
|
|
6622
|
+
return t ?? $s(n) ?? i ?? {
|
|
6623
6623
|
ext: "zip",
|
|
6624
6624
|
mime: "application/zip"
|
|
6625
6625
|
};
|
|
6626
6626
|
}
|
|
6627
6627
|
// node_modules/file-type/source/detectors/ebml.js
|
|
6628
|
-
var
|
|
6629
|
-
async function
|
|
6628
|
+
var nc = 64, rc = 1048576, ic = 256;
|
|
6629
|
+
async function ac(e) {
|
|
6630
6630
|
async function t(e) {
|
|
6631
6631
|
let t = await e.peekNumber(To), n = 128, r = 0;
|
|
6632
6632
|
for (; n !== 0 && (t & n) === 0;) ++r, n >>= 1;
|
|
6633
6633
|
let i = new Uint8Array(r + 1);
|
|
6634
|
-
return await
|
|
6634
|
+
return await Fs(e, i, void 0, {
|
|
6635
6635
|
maximumLength: i.length,
|
|
6636
6636
|
reason: "EBML field"
|
|
6637
6637
|
}), i;
|
|
@@ -6645,19 +6645,19 @@ async function oc(e) {
|
|
|
6645
6645
|
len: Es(o)
|
|
6646
6646
|
};
|
|
6647
6647
|
}
|
|
6648
|
-
let r =
|
|
6648
|
+
let r = J(e);
|
|
6649
6649
|
async function i(t) {
|
|
6650
6650
|
let i = 0;
|
|
6651
6651
|
for (; t.remaining > 0;) {
|
|
6652
|
-
if (i++, i >
|
|
6652
|
+
if (i++, i > ic || Is(e, o, 16777216)) return;
|
|
6653
6653
|
let a = e.position, s = await n(t);
|
|
6654
6654
|
if (s.id === 17026) {
|
|
6655
|
-
if (s.len >
|
|
6656
|
-
let e = Ps(s.len,
|
|
6655
|
+
if (s.len > nc) return;
|
|
6656
|
+
let e = Ps(s.len, nc, "EBML DocType");
|
|
6657
6657
|
return (await t.readToken(new U(e))).split("\0", 1)[0];
|
|
6658
6658
|
}
|
|
6659
|
-
if (r && (!Number.isFinite(s.len) || s.len < 0 || s.len >
|
|
6660
|
-
maximumLength: r ?
|
|
6659
|
+
if (r && (!Number.isFinite(s.len) || s.len < 0 || s.len > rc) || (await K(t, s.len, {
|
|
6660
|
+
maximumLength: r ? rc : e.fileInfo.size,
|
|
6661
6661
|
reason: "EBML payload"
|
|
6662
6662
|
}), e.position <= a)) return;
|
|
6663
6663
|
}
|
|
@@ -6683,11 +6683,11 @@ async function oc(e) {
|
|
|
6683
6683
|
}
|
|
6684
6684
|
}
|
|
6685
6685
|
// node_modules/file-type/source/detectors/png.js
|
|
6686
|
-
var
|
|
6687
|
-
function
|
|
6686
|
+
var oc = 512, sc = 16777216, cc = 1048576;
|
|
6687
|
+
function lc(e) {
|
|
6688
6688
|
return !!(e.codePointAt(0) & 32);
|
|
6689
6689
|
}
|
|
6690
|
-
async function
|
|
6690
|
+
async function uc(e) {
|
|
6691
6691
|
let t = {
|
|
6692
6692
|
ext: "png",
|
|
6693
6693
|
mime: "image/png"
|
|
@@ -6702,9 +6702,9 @@ async function dc(e) {
|
|
|
6702
6702
|
type: await e.readToken(new U(4, "latin1"))
|
|
6703
6703
|
};
|
|
6704
6704
|
}
|
|
6705
|
-
let i =
|
|
6705
|
+
let i = J(e), a = e.position, o = 0, s = !1;
|
|
6706
6706
|
do {
|
|
6707
|
-
if (o++, o >
|
|
6707
|
+
if (o++, o > oc || Is(e, a, sc)) break;
|
|
6708
6708
|
let c = e.position, l = await r();
|
|
6709
6709
|
if (l.length < 0) return;
|
|
6710
6710
|
if (l.type === "IHDR") {
|
|
@@ -6716,9 +6716,9 @@ async function dc(e) {
|
|
|
6716
6716
|
case "acTL": return n;
|
|
6717
6717
|
default:
|
|
6718
6718
|
if (!s && l.type !== "CgBI") return;
|
|
6719
|
-
if (i && l.length >
|
|
6719
|
+
if (i && l.length > cc) return s && lc(l.type) ? t : void 0;
|
|
6720
6720
|
try {
|
|
6721
|
-
await
|
|
6721
|
+
await K(e, l.length + 4, {
|
|
6722
6722
|
maximumLength: i ? 1048580 : e.fileInfo.size,
|
|
6723
6723
|
reason: "PNG chunk payload"
|
|
6724
6724
|
});
|
|
@@ -6732,13 +6732,13 @@ async function dc(e) {
|
|
|
6732
6732
|
return t;
|
|
6733
6733
|
}
|
|
6734
6734
|
// node_modules/file-type/source/detectors/asf.js
|
|
6735
|
-
var
|
|
6736
|
-
async function
|
|
6735
|
+
var dc = 512, fc = 1048576;
|
|
6736
|
+
async function pc(e) {
|
|
6737
6737
|
let t = !1;
|
|
6738
6738
|
try {
|
|
6739
6739
|
async function n() {
|
|
6740
6740
|
let t = /* @__PURE__ */ new Uint8Array(16);
|
|
6741
|
-
return await
|
|
6741
|
+
return await Fs(e, t, void 0, {
|
|
6742
6742
|
maximumLength: t.length,
|
|
6743
6743
|
reason: "ASF header GUID"
|
|
6744
6744
|
}), {
|
|
@@ -6746,18 +6746,18 @@ async function mc(e) {
|
|
|
6746
6746
|
size: Number(await e.readToken(ko))
|
|
6747
6747
|
};
|
|
6748
6748
|
}
|
|
6749
|
-
await
|
|
6749
|
+
await K(e, 30, {
|
|
6750
6750
|
maximumLength: 30,
|
|
6751
6751
|
reason: "ASF header prelude"
|
|
6752
6752
|
});
|
|
6753
|
-
let r =
|
|
6754
|
-
for (; e.position + 24 < e.fileInfo.size && (a++, !(a >
|
|
6753
|
+
let r = J(e), i = e.position, a = 0;
|
|
6754
|
+
for (; e.position + 24 < e.fileInfo.size && (a++, !(a > dc || Is(e, i, 16777216)));) {
|
|
6755
6755
|
let i = e.position, a = await n(), o = a.size - 24;
|
|
6756
6756
|
if (!Number.isFinite(o) || o < 0) {
|
|
6757
6757
|
t = !0;
|
|
6758
6758
|
break;
|
|
6759
6759
|
}
|
|
6760
|
-
if (
|
|
6760
|
+
if (q(a.id, [
|
|
6761
6761
|
145,
|
|
6762
6762
|
7,
|
|
6763
6763
|
220,
|
|
@@ -6776,10 +6776,10 @@ async function mc(e) {
|
|
|
6776
6776
|
101
|
|
6777
6777
|
])) {
|
|
6778
6778
|
let t = /* @__PURE__ */ new Uint8Array(16);
|
|
6779
|
-
if (o -= await
|
|
6779
|
+
if (o -= await Fs(e, t, void 0, {
|
|
6780
6780
|
maximumLength: t.length,
|
|
6781
6781
|
reason: "ASF stream type GUID"
|
|
6782
|
-
}),
|
|
6782
|
+
}), q(t, [
|
|
6783
6783
|
64,
|
|
6784
6784
|
158,
|
|
6785
6785
|
105,
|
|
@@ -6800,7 +6800,7 @@ async function mc(e) {
|
|
|
6800
6800
|
ext: "asf",
|
|
6801
6801
|
mime: "audio/x-ms-asf"
|
|
6802
6802
|
};
|
|
6803
|
-
if (
|
|
6803
|
+
if (q(t, [
|
|
6804
6804
|
192,
|
|
6805
6805
|
239,
|
|
6806
6806
|
25,
|
|
@@ -6823,8 +6823,8 @@ async function mc(e) {
|
|
|
6823
6823
|
};
|
|
6824
6824
|
break;
|
|
6825
6825
|
}
|
|
6826
|
-
if (r && o >
|
|
6827
|
-
maximumLength: r ?
|
|
6826
|
+
if (r && o > fc || (await K(e, o, {
|
|
6827
|
+
maximumLength: r ? fc : e.fileInfo.size,
|
|
6828
6828
|
reason: "ASF header payload"
|
|
6829
6829
|
}), e.position <= i)) {
|
|
6830
6830
|
t = !0;
|
|
@@ -6832,7 +6832,7 @@ async function mc(e) {
|
|
|
6832
6832
|
}
|
|
6833
6833
|
}
|
|
6834
6834
|
} catch (n) {
|
|
6835
|
-
if (n instanceof W || n instanceof Ns)
|
|
6835
|
+
if (n instanceof W || n instanceof Ns) J(e) && (t = !0);
|
|
6836
6836
|
else throw n;
|
|
6837
6837
|
}
|
|
6838
6838
|
if (!t) return {
|
|
@@ -6841,34 +6841,34 @@ async function mc(e) {
|
|
|
6841
6841
|
};
|
|
6842
6842
|
}
|
|
6843
6843
|
// node_modules/file-type/source/index.js
|
|
6844
|
-
var
|
|
6844
|
+
var mc = 4100, hc = 4096, gc = Ms, _c = 1, vc = 100, yc = Ms, bc = 512, xc = 256, Sc = 1048576, Cc = Ms;
|
|
6845
|
+
function wc(e) {
|
|
6846
|
+
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : mc;
|
|
6847
|
+
}
|
|
6845
6848
|
function Tc(e) {
|
|
6846
|
-
return Number.isFinite(e) ? Math.max(
|
|
6849
|
+
return Number.isFinite(e) ? Math.max(0, Math.min(hc, Math.trunc(e))) : 0;
|
|
6847
6850
|
}
|
|
6848
6851
|
function Ec(e) {
|
|
6849
|
-
return Number.isFinite(e) ? Math.max(0, Math.min(gc, Math.trunc(e))) : 0;
|
|
6850
|
-
}
|
|
6851
|
-
function Dc(e) {
|
|
6852
6852
|
return Number.isFinite(e) ? Math.max(0, e) : 2 ** 53 - 1;
|
|
6853
6853
|
}
|
|
6854
|
-
function
|
|
6854
|
+
function Dc(e) {
|
|
6855
6855
|
return import(
|
|
6856
6856
|
/* @vite-ignore */
|
|
6857
6857
|
/* webpackIgnore: true */
|
|
6858
6858
|
e
|
|
6859
6859
|
);
|
|
6860
6860
|
}
|
|
6861
|
-
function
|
|
6861
|
+
function Oc(e) {
|
|
6862
6862
|
return e.pipeThrough(new TransformStream());
|
|
6863
6863
|
}
|
|
6864
|
-
function
|
|
6864
|
+
function kc(e, t) {
|
|
6865
6865
|
return t === void 0 ? e.read() : (t.throwIfAborted(), Promise.race([e.read(), new Promise((n, r) => {
|
|
6866
6866
|
t.addEventListener("abort", () => {
|
|
6867
6867
|
r(t.reason), e.cancel(t.reason).catch(() => {});
|
|
6868
6868
|
}, { once: !0 });
|
|
6869
6869
|
})]));
|
|
6870
6870
|
}
|
|
6871
|
-
function
|
|
6871
|
+
function Ac(e, t) {
|
|
6872
6872
|
let n = e.getReader(), r = 0, i = !1, a = !1, o = async (e) => {
|
|
6873
6873
|
i || a || (a = !0, await n.cancel(e));
|
|
6874
6874
|
};
|
|
@@ -6891,15 +6891,15 @@ function jc(e, t) {
|
|
|
6891
6891
|
}
|
|
6892
6892
|
});
|
|
6893
6893
|
}
|
|
6894
|
-
async function
|
|
6895
|
-
return new
|
|
6894
|
+
async function jc(e, t) {
|
|
6895
|
+
return new Mc(t).fromBuffer(e);
|
|
6896
6896
|
}
|
|
6897
|
-
var
|
|
6897
|
+
var Mc = class e {
|
|
6898
6898
|
buffer;
|
|
6899
6899
|
tokenizer;
|
|
6900
6900
|
detectionReentryCount;
|
|
6901
6901
|
constructor(e) {
|
|
6902
|
-
let t =
|
|
6902
|
+
let t = Tc(e?.mpegOffsetTolerance), n = e?.maxBufferSize ?? Infinity;
|
|
6903
6903
|
if (n !== Infinity && (!Number.isSafeInteger(n) || n <= 0)) throw RangeError("maxBufferSize must be a positive safe integer or Infinity");
|
|
6904
6904
|
this.options = {
|
|
6905
6905
|
...e,
|
|
@@ -6923,7 +6923,7 @@ var Nc = class e {
|
|
|
6923
6923
|
return { ...this.tokenizerOptions };
|
|
6924
6924
|
}
|
|
6925
6925
|
createTokenizerFromWebStream(e) {
|
|
6926
|
-
return Zo(
|
|
6926
|
+
return Zo(Oc(e), this.getTokenizerOptions());
|
|
6927
6927
|
}
|
|
6928
6928
|
async parseTokenizer(e, t = 0) {
|
|
6929
6929
|
this.detectionReentryCount = t;
|
|
@@ -6964,7 +6964,7 @@ var Nc = class e {
|
|
|
6964
6964
|
}
|
|
6965
6965
|
async fromFile(e) {
|
|
6966
6966
|
this.options.signal?.throwIfAborted();
|
|
6967
|
-
let { fromFile: t, NotRegularFileError: n } = await
|
|
6967
|
+
let { fromFile: t, NotRegularFileError: n } = await Dc("strtok3"), r;
|
|
6968
6968
|
try {
|
|
6969
6969
|
r = await t(e, {
|
|
6970
6970
|
...this.getTokenizerOptions(),
|
|
@@ -6978,10 +6978,10 @@ var Nc = class e {
|
|
|
6978
6978
|
}
|
|
6979
6979
|
async toDetectionStream(e, t) {
|
|
6980
6980
|
this.options.signal?.throwIfAborted();
|
|
6981
|
-
let n =
|
|
6981
|
+
let n = wc(t?.sampleSize ?? 4100), r, i = !1, a = e.getReader(), o = [], s = 0;
|
|
6982
6982
|
try {
|
|
6983
6983
|
for (; s < n;) {
|
|
6984
|
-
let { value: e, done: t } = await
|
|
6984
|
+
let { value: e, done: t } = await kc(a, this.options.signal);
|
|
6985
6985
|
if (t || !e) {
|
|
6986
6986
|
i = !0;
|
|
6987
6987
|
break;
|
|
@@ -6989,7 +6989,7 @@ var Nc = class e {
|
|
|
6989
6989
|
o.push(e), s += e.length;
|
|
6990
6990
|
}
|
|
6991
6991
|
if (!i && s === n) {
|
|
6992
|
-
let { value: e, done: t } = await
|
|
6992
|
+
let { value: e, done: t } = await kc(a, this.options.signal);
|
|
6993
6993
|
t || !e ? i = !0 : (o.push(e), s += e.length);
|
|
6994
6994
|
}
|
|
6995
6995
|
} finally {
|
|
@@ -7019,16 +7019,16 @@ var Nc = class e {
|
|
|
7019
7019
|
return l.fileType = r, l;
|
|
7020
7020
|
}
|
|
7021
7021
|
async detectGzip(t) {
|
|
7022
|
-
if (this.gzipProbeDepth >=
|
|
7022
|
+
if (this.gzipProbeDepth >= _c) return {
|
|
7023
7023
|
ext: "gz",
|
|
7024
7024
|
mime: "application/gzip"
|
|
7025
7025
|
};
|
|
7026
|
-
let n =
|
|
7026
|
+
let n = Ac(new es(t).inflate(), gc), r = J(t), i, a, o, s;
|
|
7027
7027
|
if (r) {
|
|
7028
7028
|
let t = new AbortController();
|
|
7029
7029
|
i = setTimeout(() => {
|
|
7030
|
-
t.abort(new DOMException(`Operation timed out after ${
|
|
7031
|
-
},
|
|
7030
|
+
t.abort(new DOMException(`Operation timed out after ${vc} ms`, "TimeoutError"));
|
|
7031
|
+
}, vc), a = this.options.signal === void 0 ? t.signal : AbortSignal.any([this.options.signal, t.signal]), o = new e({
|
|
7032
7032
|
...this.options,
|
|
7033
7033
|
signal: a
|
|
7034
7034
|
}), o.gzipProbeDepth = this.gzipProbeDepth + 1;
|
|
@@ -7049,13 +7049,13 @@ var Nc = class e {
|
|
|
7049
7049
|
};
|
|
7050
7050
|
}
|
|
7051
7051
|
check(e, t) {
|
|
7052
|
-
return
|
|
7052
|
+
return q(this.buffer, e, t);
|
|
7053
7053
|
}
|
|
7054
7054
|
checkString(e, t) {
|
|
7055
7055
|
return this.check(Ds(e, t?.encoding), t);
|
|
7056
7056
|
}
|
|
7057
7057
|
async detectConfident(e) {
|
|
7058
|
-
if (this.buffer = new Uint8Array(
|
|
7058
|
+
if (this.buffer = new Uint8Array(mc), e.fileInfo.size === void 0 && (e.fileInfo.size = 2 ** 53 - 1), this.tokenizer = e, J(e) && (await e.peekBuffer(this.buffer, {
|
|
7059
7059
|
length: 3,
|
|
7060
7060
|
mayBeLess: !0
|
|
7061
7061
|
}), this.check([
|
|
@@ -7108,7 +7108,7 @@ var Nc = class e {
|
|
|
7108
7108
|
239,
|
|
7109
7109
|
187,
|
|
7110
7110
|
191
|
|
7111
|
-
])) return this.detectionReentryCount >=
|
|
7111
|
+
])) return this.detectionReentryCount >= xc ? void 0 : (this.detectionReentryCount++, await this.tokenizer.ignore(3), this.detectConfident(e));
|
|
7112
7112
|
if (this.check([
|
|
7113
7113
|
71,
|
|
7114
7114
|
73,
|
|
@@ -7139,26 +7139,26 @@ var Nc = class e {
|
|
|
7139
7139
|
mime: "application/x-bzip2"
|
|
7140
7140
|
};
|
|
7141
7141
|
if (this.checkString("ID3")) {
|
|
7142
|
-
await
|
|
7142
|
+
await K(e, 6, {
|
|
7143
7143
|
maximumLength: 6,
|
|
7144
7144
|
reason: "ID3 header prefix"
|
|
7145
7145
|
});
|
|
7146
|
-
let t = await e.readToken(ks), n =
|
|
7147
|
-
if (!Number.isFinite(t) || t < 0 || n && (t >
|
|
7146
|
+
let t = await e.readToken(ks), n = J(e);
|
|
7147
|
+
if (!Number.isFinite(t) || t < 0 || n && (t > yc || e.position + t > yc)) return;
|
|
7148
7148
|
if (e.position + t > e.fileInfo.size) return n ? void 0 : {
|
|
7149
7149
|
ext: "mp3",
|
|
7150
7150
|
mime: "audio/mpeg"
|
|
7151
7151
|
};
|
|
7152
7152
|
try {
|
|
7153
|
-
await
|
|
7154
|
-
maximumLength: n ?
|
|
7153
|
+
await K(e, t, {
|
|
7154
|
+
maximumLength: n ? yc : e.fileInfo.size,
|
|
7155
7155
|
reason: "ID3 payload"
|
|
7156
7156
|
});
|
|
7157
7157
|
} catch (e) {
|
|
7158
7158
|
if (e instanceof W) return;
|
|
7159
7159
|
throw e;
|
|
7160
7160
|
}
|
|
7161
|
-
return this.detectionReentryCount >=
|
|
7161
|
+
return this.detectionReentryCount >= xc ? void 0 : (this.detectionReentryCount++, this.parseTokenizer(e, this.detectionReentryCount));
|
|
7162
7162
|
}
|
|
7163
7163
|
if (this.checkString("MP+")) return {
|
|
7164
7164
|
ext: "mpc",
|
|
@@ -7217,11 +7217,11 @@ var Nc = class e {
|
|
|
7217
7217
|
75,
|
|
7218
7218
|
3,
|
|
7219
7219
|
4
|
|
7220
|
-
])) return
|
|
7220
|
+
])) return tc(e);
|
|
7221
7221
|
if (this.checkString("OggS")) {
|
|
7222
7222
|
await e.ignore(28);
|
|
7223
7223
|
let t = /* @__PURE__ */ new Uint8Array(8);
|
|
7224
|
-
return await e.readBuffer(t),
|
|
7224
|
+
return await e.readBuffer(t), q(t, [
|
|
7225
7225
|
79,
|
|
7226
7226
|
112,
|
|
7227
7227
|
117,
|
|
@@ -7233,7 +7233,7 @@ var Nc = class e {
|
|
|
7233
7233
|
]) ? {
|
|
7234
7234
|
ext: "opus",
|
|
7235
7235
|
mime: "audio/ogg; codecs=opus"
|
|
7236
|
-
} :
|
|
7236
|
+
} : q(t, [
|
|
7237
7237
|
128,
|
|
7238
7238
|
116,
|
|
7239
7239
|
104,
|
|
@@ -7244,7 +7244,7 @@ var Nc = class e {
|
|
|
7244
7244
|
]) ? {
|
|
7245
7245
|
ext: "ogv",
|
|
7246
7246
|
mime: "video/ogg"
|
|
7247
|
-
} :
|
|
7247
|
+
} : q(t, [
|
|
7248
7248
|
1,
|
|
7249
7249
|
118,
|
|
7250
7250
|
105,
|
|
@@ -7255,7 +7255,7 @@ var Nc = class e {
|
|
|
7255
7255
|
]) ? {
|
|
7256
7256
|
ext: "ogm",
|
|
7257
7257
|
mime: "video/ogg"
|
|
7258
|
-
} :
|
|
7258
|
+
} : q(t, [
|
|
7259
7259
|
127,
|
|
7260
7260
|
70,
|
|
7261
7261
|
76,
|
|
@@ -7264,7 +7264,7 @@ var Nc = class e {
|
|
|
7264
7264
|
]) ? {
|
|
7265
7265
|
ext: "oga",
|
|
7266
7266
|
mime: "audio/ogg"
|
|
7267
|
-
} :
|
|
7267
|
+
} : q(t, [
|
|
7268
7268
|
83,
|
|
7269
7269
|
112,
|
|
7270
7270
|
101,
|
|
@@ -7275,7 +7275,7 @@ var Nc = class e {
|
|
|
7275
7275
|
]) ? {
|
|
7276
7276
|
ext: "spx",
|
|
7277
7277
|
mime: "audio/ogg"
|
|
7278
|
-
} :
|
|
7278
|
+
} : q(t, [
|
|
7279
7279
|
1,
|
|
7280
7280
|
118,
|
|
7281
7281
|
111,
|
|
@@ -7394,7 +7394,7 @@ var Nc = class e {
|
|
|
7394
7394
|
69,
|
|
7395
7395
|
223,
|
|
7396
7396
|
163
|
|
7397
|
-
])) return
|
|
7397
|
+
])) return ac(e);
|
|
7398
7398
|
if (this.checkString("SQLi")) return {
|
|
7399
7399
|
ext: "sqlite",
|
|
7400
7400
|
mime: "application/x-sqlite3"
|
|
@@ -7676,7 +7676,7 @@ var Nc = class e {
|
|
|
7676
7676
|
10,
|
|
7677
7677
|
26,
|
|
7678
7678
|
10
|
|
7679
|
-
])) return
|
|
7679
|
+
])) return uc(e);
|
|
7680
7680
|
if (this.check([
|
|
7681
7681
|
65,
|
|
7682
7682
|
82,
|
|
@@ -7894,7 +7894,7 @@ var Nc = class e {
|
|
|
7894
7894
|
17,
|
|
7895
7895
|
166,
|
|
7896
7896
|
217
|
|
7897
|
-
])) return
|
|
7897
|
+
])) return pc(e);
|
|
7898
7898
|
if (this.check([
|
|
7899
7899
|
171,
|
|
7900
7900
|
75,
|
|
@@ -8301,15 +8301,15 @@ var Nc = class e {
|
|
|
8301
8301
|
position: 32769,
|
|
8302
8302
|
length: 5,
|
|
8303
8303
|
mayBeLess: !0
|
|
8304
|
-
}),
|
|
8304
|
+
}), q(t, Ds("CD001"))) return {
|
|
8305
8305
|
ext: "iso",
|
|
8306
8306
|
mime: "application/x-iso9660-image"
|
|
8307
8307
|
};
|
|
8308
8308
|
}
|
|
8309
8309
|
}
|
|
8310
8310
|
async detectImprecise(e) {
|
|
8311
|
-
this.buffer = new Uint8Array(
|
|
8312
|
-
let t =
|
|
8311
|
+
this.buffer = new Uint8Array(mc);
|
|
8312
|
+
let t = Ec(e.fileInfo.size);
|
|
8313
8313
|
if (await e.peekBuffer(this.buffer, {
|
|
8314
8314
|
length: Math.min(8, t),
|
|
8315
8315
|
mayBeLess: !0
|
|
@@ -8378,7 +8378,7 @@ var Nc = class e {
|
|
|
8378
8378
|
}
|
|
8379
8379
|
async readTiffIFD(e) {
|
|
8380
8380
|
let t = await this.tokenizer.readToken(e ? Eo : V);
|
|
8381
|
-
if (!(t >
|
|
8381
|
+
if (!(t > bc) && !(J(this.tokenizer) && 2 + t * 12 > Cc)) for (let n = 0; n < t; ++n) {
|
|
8382
8382
|
let t = await this.readTiffTag(e);
|
|
8383
8383
|
if (t) return t;
|
|
8384
8384
|
}
|
|
@@ -8402,10 +8402,10 @@ var Nc = class e {
|
|
|
8402
8402
|
};
|
|
8403
8403
|
}
|
|
8404
8404
|
}
|
|
8405
|
-
if (
|
|
8406
|
-
let n =
|
|
8405
|
+
if (J(this.tokenizer) && r > Sc) return t;
|
|
8406
|
+
let n = J(this.tokenizer) ? Cc : this.tokenizer.fileInfo.size;
|
|
8407
8407
|
try {
|
|
8408
|
-
await
|
|
8408
|
+
await K(this.tokenizer, r, {
|
|
8409
8409
|
maximumLength: n,
|
|
8410
8410
|
reason: "TIFF IFD offset"
|
|
8411
8411
|
});
|
|
@@ -8472,31 +8472,28 @@ var Nc = class e {
|
|
|
8472
8472
|
};
|
|
8473
8473
|
new Set(As), new Set(js);
|
|
8474
8474
|
// node_modules/@dpuse/dpuse-shared/dist/dpuse-shared.es.js
|
|
8475
|
-
|
|
8476
|
-
return new Map(Object.entries(e));
|
|
8477
|
-
}
|
|
8478
|
-
var Pc = {
|
|
8475
|
+
var Nc = {
|
|
8479
8476
|
lang: void 0,
|
|
8480
8477
|
message: void 0,
|
|
8481
8478
|
abortEarly: void 0,
|
|
8482
8479
|
abortPipeEarly: void 0
|
|
8483
8480
|
};
|
|
8484
8481
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8485
|
-
function
|
|
8482
|
+
function Pc(e) {
|
|
8486
8483
|
return e ? {
|
|
8487
8484
|
lang: e?.lang ?? void 0,
|
|
8488
8485
|
message: e?.message,
|
|
8489
8486
|
abortEarly: e?.abortEarly ?? void 0,
|
|
8490
8487
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
8491
|
-
} :
|
|
8488
|
+
} : Nc;
|
|
8492
8489
|
}
|
|
8493
8490
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8494
|
-
function
|
|
8491
|
+
function Fc(e) {
|
|
8495
8492
|
let t = typeof e;
|
|
8496
8493
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
8497
8494
|
}
|
|
8498
8495
|
function Y(e, t, n, r, i) {
|
|
8499
|
-
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */
|
|
8496
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Fc(a), c = {
|
|
8500
8497
|
kind: e.kind,
|
|
8501
8498
|
type: e.type,
|
|
8502
8499
|
input: a,
|
|
@@ -8513,11 +8510,11 @@ function Y(e, t, n, r, i) {
|
|
|
8513
8510
|
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
8514
8511
|
}
|
|
8515
8512
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8516
|
-
function
|
|
8513
|
+
function Ic(e, t) {
|
|
8517
8514
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
8518
8515
|
}
|
|
8519
8516
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8520
|
-
function
|
|
8517
|
+
function Lc(e, t) {
|
|
8521
8518
|
let n = [...new Set(e)];
|
|
8522
8519
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
8523
8520
|
}
|
|
@@ -8525,29 +8522,29 @@ function X(e) {
|
|
|
8525
8522
|
return e["~standard"] = {
|
|
8526
8523
|
version: 1,
|
|
8527
8524
|
vendor: "valibot",
|
|
8528
|
-
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */
|
|
8525
|
+
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ Pc())
|
|
8529
8526
|
}, e;
|
|
8530
8527
|
}
|
|
8531
8528
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8532
|
-
function
|
|
8529
|
+
function Rc(e, t, n) {
|
|
8533
8530
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
8534
8531
|
}
|
|
8535
8532
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8536
|
-
function
|
|
8533
|
+
function zc(e, t, n) {
|
|
8537
8534
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
8538
8535
|
}
|
|
8539
8536
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8540
|
-
function
|
|
8537
|
+
function Bc(e, t) {
|
|
8541
8538
|
return X({
|
|
8542
8539
|
kind: "schema",
|
|
8543
8540
|
type: "literal",
|
|
8544
|
-
reference:
|
|
8545
|
-
expects: /* @__PURE__ */
|
|
8541
|
+
reference: Bc,
|
|
8542
|
+
expects: /* @__PURE__ */ Fc(e),
|
|
8546
8543
|
async: !1,
|
|
8547
8544
|
literal: e,
|
|
8548
8545
|
message: t,
|
|
8549
8546
|
"~run"(e, t) {
|
|
8550
|
-
return /* @__PURE__ */
|
|
8547
|
+
return /* @__PURE__ */ Ic(e.value, this.literal) ? e.typed = !0 : Y(this, "type", e, t), e;
|
|
8551
8548
|
}
|
|
8552
8549
|
});
|
|
8553
8550
|
}
|
|
@@ -8562,16 +8559,16 @@ function Z(e, t) {
|
|
|
8562
8559
|
wrapped: e,
|
|
8563
8560
|
default: t,
|
|
8564
8561
|
"~run"(e, t) {
|
|
8565
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
8562
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ zc(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
8566
8563
|
}
|
|
8567
8564
|
});
|
|
8568
8565
|
}
|
|
8569
8566
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8570
|
-
function
|
|
8567
|
+
function Vc(e) {
|
|
8571
8568
|
return X({
|
|
8572
8569
|
kind: "schema",
|
|
8573
8570
|
type: "number",
|
|
8574
|
-
reference:
|
|
8571
|
+
reference: Vc,
|
|
8575
8572
|
expects: "number",
|
|
8576
8573
|
async: !1,
|
|
8577
8574
|
message: e,
|
|
@@ -8581,26 +8578,26 @@ function Hc(e) {
|
|
|
8581
8578
|
});
|
|
8582
8579
|
}
|
|
8583
8580
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8584
|
-
function
|
|
8581
|
+
function Hc(e, t) {
|
|
8585
8582
|
return X({
|
|
8586
8583
|
kind: "schema",
|
|
8587
8584
|
type: "optional",
|
|
8588
|
-
reference:
|
|
8585
|
+
reference: Hc,
|
|
8589
8586
|
expects: `(${e.expects} | undefined)`,
|
|
8590
8587
|
async: !1,
|
|
8591
8588
|
wrapped: e,
|
|
8592
8589
|
default: t,
|
|
8593
8590
|
"~run"(e, t) {
|
|
8594
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
8591
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ zc(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
8595
8592
|
}
|
|
8596
8593
|
});
|
|
8597
8594
|
}
|
|
8598
8595
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8599
|
-
function
|
|
8596
|
+
function Uc(e, t) {
|
|
8600
8597
|
return X({
|
|
8601
8598
|
kind: "schema",
|
|
8602
8599
|
type: "strict_object",
|
|
8603
|
-
reference:
|
|
8600
|
+
reference: Uc,
|
|
8604
8601
|
expects: "Object",
|
|
8605
8602
|
async: !1,
|
|
8606
8603
|
entries: e,
|
|
@@ -8612,7 +8609,7 @@ function Wc(e, t) {
|
|
|
8612
8609
|
for (let r in this.entries) {
|
|
8613
8610
|
let i = this.entries[r];
|
|
8614
8611
|
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
8615
|
-
let a = r in n ? n[r] : /* @__PURE__ */
|
|
8612
|
+
let a = r in n ? n[r] : /* @__PURE__ */ zc(i), o = i["~run"]({ value: a }, t);
|
|
8616
8613
|
if (o.issues) {
|
|
8617
8614
|
let i = {
|
|
8618
8615
|
type: "object",
|
|
@@ -8628,7 +8625,7 @@ function Wc(e, t) {
|
|
|
8628
8625
|
}
|
|
8629
8626
|
}
|
|
8630
8627
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
8631
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
8628
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Rc(i);
|
|
8632
8629
|
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (Y(this, "key", e, t, {
|
|
8633
8630
|
input: void 0,
|
|
8634
8631
|
expected: `"${r}"`,
|
|
@@ -8677,19 +8674,19 @@ function Q(e) {
|
|
|
8677
8674
|
});
|
|
8678
8675
|
}
|
|
8679
8676
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8680
|
-
function
|
|
8677
|
+
function Wc(e) {
|
|
8681
8678
|
let t;
|
|
8682
8679
|
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
8683
8680
|
else t = n.issues;
|
|
8684
8681
|
return t;
|
|
8685
8682
|
}
|
|
8686
8683
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8687
|
-
function
|
|
8684
|
+
function Gc(e, t) {
|
|
8688
8685
|
return X({
|
|
8689
8686
|
kind: "schema",
|
|
8690
8687
|
type: "union",
|
|
8691
|
-
reference:
|
|
8692
|
-
expects: /* @__PURE__ */
|
|
8688
|
+
reference: Gc,
|
|
8689
|
+
expects: /* @__PURE__ */ Lc(e.map((e) => e.expects), "|"),
|
|
8693
8690
|
async: !1,
|
|
8694
8691
|
options: e,
|
|
8695
8692
|
message: t,
|
|
@@ -8708,26 +8705,26 @@ function Kc(e, t) {
|
|
|
8708
8705
|
if (n) return n;
|
|
8709
8706
|
if (r) {
|
|
8710
8707
|
if (r.length === 1) return r[0];
|
|
8711
|
-
Y(this, "type", e, t, { issues: /* @__PURE__ */
|
|
8708
|
+
Y(this, "type", e, t, { issues: /* @__PURE__ */ Wc(r) }), e.typed = !0;
|
|
8712
8709
|
} else if (i?.length === 1) return i[0];
|
|
8713
|
-
else Y(this, "type", e, t, { issues: /* @__PURE__ */
|
|
8710
|
+
else Y(this, "type", e, t, { issues: /* @__PURE__ */ Wc(i) });
|
|
8714
8711
|
return e;
|
|
8715
8712
|
}
|
|
8716
8713
|
});
|
|
8717
8714
|
}
|
|
8718
|
-
var
|
|
8715
|
+
var Kc = {
|
|
8719
8716
|
id: /* @__PURE__ */ Q(),
|
|
8720
|
-
label: /* @__PURE__ */
|
|
8721
|
-
en: /* @__PURE__ */
|
|
8722
|
-
es: /* @__PURE__ */
|
|
8717
|
+
label: /* @__PURE__ */ Uc({
|
|
8718
|
+
en: /* @__PURE__ */ Hc(/* @__PURE__ */ Q()),
|
|
8719
|
+
es: /* @__PURE__ */ Hc(/* @__PURE__ */ Q())
|
|
8723
8720
|
}),
|
|
8724
|
-
description: /* @__PURE__ */
|
|
8725
|
-
en: /* @__PURE__ */
|
|
8726
|
-
es: /* @__PURE__ */
|
|
8721
|
+
description: /* @__PURE__ */ Uc({
|
|
8722
|
+
en: /* @__PURE__ */ Hc(/* @__PURE__ */ Q()),
|
|
8723
|
+
es: /* @__PURE__ */ Hc(/* @__PURE__ */ Q())
|
|
8727
8724
|
}),
|
|
8728
8725
|
icon: /* @__PURE__ */ Z(/* @__PURE__ */ Q()),
|
|
8729
8726
|
iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ Q())
|
|
8730
|
-
}, $ = (e) => /* @__PURE__ */
|
|
8727
|
+
}, $ = (e) => /* @__PURE__ */ Gc(e.map((e) => /* @__PURE__ */ Bc(e))), qc = $([
|
|
8731
8728
|
"app",
|
|
8732
8729
|
"connector",
|
|
8733
8730
|
"connectorConnection",
|
|
@@ -8749,31 +8746,31 @@ var qc = {
|
|
|
8749
8746
|
"presenter",
|
|
8750
8747
|
"presenterPresentation",
|
|
8751
8748
|
"tool"
|
|
8752
|
-
]),
|
|
8749
|
+
]), Jc = $([
|
|
8753
8750
|
"danger",
|
|
8754
8751
|
"success",
|
|
8755
8752
|
"warning"
|
|
8756
|
-
]),
|
|
8753
|
+
]), Yc = $([
|
|
8757
8754
|
"alpha",
|
|
8758
8755
|
"beta",
|
|
8759
8756
|
"releaseCandidate",
|
|
8760
8757
|
"generalAvailability"
|
|
8761
|
-
]),
|
|
8762
|
-
color:
|
|
8758
|
+
]), Xc = /* @__PURE__ */ Uc({
|
|
8759
|
+
color: Jc,
|
|
8763
8760
|
label: /* @__PURE__ */ Q()
|
|
8764
|
-
}),
|
|
8765
|
-
...
|
|
8766
|
-
typeId:
|
|
8761
|
+
}), Zc = {
|
|
8762
|
+
...Kc,
|
|
8763
|
+
typeId: qc
|
|
8767
8764
|
};
|
|
8768
|
-
({ ...
|
|
8769
|
-
var
|
|
8770
|
-
...
|
|
8771
|
-
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
8772
|
-
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
8773
|
-
status: /* @__PURE__ */ Z(
|
|
8774
|
-
statusId: /* @__PURE__ */ Z(
|
|
8765
|
+
({ ...Zc });
|
|
8766
|
+
var Qc = {
|
|
8767
|
+
...Zc,
|
|
8768
|
+
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Vc()),
|
|
8769
|
+
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Vc()),
|
|
8770
|
+
status: /* @__PURE__ */ Z(Xc),
|
|
8771
|
+
statusId: /* @__PURE__ */ Z(Yc)
|
|
8775
8772
|
};
|
|
8776
|
-
({
|
|
8773
|
+
({ ...Qc }), $([
|
|
8777
8774
|
"app",
|
|
8778
8775
|
"engine",
|
|
8779
8776
|
"connector",
|
|
@@ -8781,14 +8778,14 @@ var $c = {
|
|
|
8781
8778
|
"presenter",
|
|
8782
8779
|
"tool"
|
|
8783
8780
|
]);
|
|
8784
|
-
var
|
|
8785
|
-
|
|
8781
|
+
var $c = {
|
|
8782
|
+
...Qc,
|
|
8786
8783
|
vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ Q()),
|
|
8787
8784
|
vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ Q()),
|
|
8788
8785
|
vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ Q()),
|
|
8789
8786
|
version: /* @__PURE__ */ Q()
|
|
8790
8787
|
};
|
|
8791
|
-
({
|
|
8788
|
+
({ ...$c }), $([
|
|
8792
8789
|
"abortOperation",
|
|
8793
8790
|
"auditObjectContent",
|
|
8794
8791
|
"closeStore",
|
|
@@ -8827,8 +8824,8 @@ var el = {
|
|
|
8827
8824
|
"disabled",
|
|
8828
8825
|
"oAuth2",
|
|
8829
8826
|
"none"
|
|
8830
|
-
]), {
|
|
8831
|
-
var
|
|
8827
|
+
]), { ...$c };
|
|
8828
|
+
var el = {
|
|
8832
8829
|
"armscii-8": {
|
|
8833
8830
|
id: "armscii-8",
|
|
8834
8831
|
groupId: "armenian",
|
|
@@ -9621,33 +9618,33 @@ var tl = {
|
|
|
9621
9618
|
iconvLiteDecoderId: "windows1257"
|
|
9622
9619
|
}
|
|
9623
9620
|
};
|
|
9624
|
-
function
|
|
9625
|
-
return Object.hasOwn(
|
|
9621
|
+
function tl(e) {
|
|
9622
|
+
return Object.hasOwn(el, e);
|
|
9626
9623
|
}
|
|
9627
|
-
function
|
|
9628
|
-
return
|
|
9624
|
+
function nl(e) {
|
|
9625
|
+
return tl(e) ? el[e].textDecoderId ?? e : e;
|
|
9629
9626
|
}
|
|
9630
|
-
var
|
|
9627
|
+
var rl = 2048, il = class extends Error {
|
|
9631
9628
|
data;
|
|
9632
9629
|
locator;
|
|
9633
9630
|
constructor(e, t, n, r) {
|
|
9634
9631
|
super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
|
|
9635
9632
|
}
|
|
9636
|
-
},
|
|
9633
|
+
}, al = class extends il {
|
|
9637
9634
|
constructor(e, t, n, r) {
|
|
9638
9635
|
super(e, t, n, r), this.name = "FetchError";
|
|
9639
9636
|
}
|
|
9640
9637
|
};
|
|
9641
|
-
async function
|
|
9638
|
+
async function ol(e, t, n) {
|
|
9642
9639
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
9643
9640
|
try {
|
|
9644
9641
|
a = await e.text();
|
|
9645
9642
|
} catch (e) {
|
|
9646
|
-
a = `<body unavailable: ${
|
|
9643
|
+
a = `<body unavailable: ${sl(e).message}>`;
|
|
9647
9644
|
}
|
|
9648
|
-
return new
|
|
9645
|
+
return new al(i, n, { body: cl(a) });
|
|
9649
9646
|
}
|
|
9650
|
-
function
|
|
9647
|
+
function sl(e) {
|
|
9651
9648
|
if (e instanceof Error) return e;
|
|
9652
9649
|
if (typeof e == "string") return Error(e);
|
|
9653
9650
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -9659,8 +9656,8 @@ function cl(e) {
|
|
|
9659
9656
|
}
|
|
9660
9657
|
return /* @__PURE__ */ Error("Unknown error");
|
|
9661
9658
|
}
|
|
9662
|
-
function
|
|
9663
|
-
if (e != null && e !== "") return e.length >
|
|
9659
|
+
function cl(e) {
|
|
9660
|
+
if (e != null && e !== "") return e.length > rl ? `${e.slice(0, rl)}... [truncated]` : e;
|
|
9664
9661
|
}
|
|
9665
9662
|
$([
|
|
9666
9663
|
"arrow",
|
|
@@ -9675,34 +9672,34 @@ $([
|
|
|
9675
9672
|
"sqlite",
|
|
9676
9673
|
"xlsx",
|
|
9677
9674
|
"xml"
|
|
9678
|
-
]), {
|
|
9675
|
+
]), { ...$c }, $(["list"]), { ...$c }, $([
|
|
9679
9676
|
"list",
|
|
9680
9677
|
"render",
|
|
9681
9678
|
"setColorMode"
|
|
9682
|
-
]), {
|
|
9683
|
-
function
|
|
9679
|
+
]), { ...$c };
|
|
9680
|
+
function ll(e) {
|
|
9684
9681
|
if (!e) return;
|
|
9685
|
-
let t =
|
|
9682
|
+
let t = ul(e);
|
|
9686
9683
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
9687
9684
|
}
|
|
9688
|
-
function
|
|
9685
|
+
function ul(e) {
|
|
9689
9686
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
9690
9687
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
9691
9688
|
}
|
|
9692
9689
|
// src/index.ts
|
|
9693
|
-
var
|
|
9690
|
+
var dl = .2, fl = 4096, pl = 65536, ml = {
|
|
9694
9691
|
id: "utf-8",
|
|
9695
9692
|
confidenceLevel: void 0
|
|
9696
|
-
},
|
|
9693
|
+
}, hl = 256, gl = /^<\?xml\s[^?]*?\bencoding\s*=\s*(["'])([A-Za-z][\w.:-]*)\1/, _l = [
|
|
9697
9694
|
"false",
|
|
9698
9695
|
"null",
|
|
9699
9696
|
"true"
|
|
9700
|
-
],
|
|
9697
|
+
], vl = /* @__PURE__ */ new Set([
|
|
9701
9698
|
" ",
|
|
9702
9699
|
" ",
|
|
9703
9700
|
"\n",
|
|
9704
9701
|
"\r"
|
|
9705
|
-
]),
|
|
9702
|
+
]), yl = /* @__PURE__ */ new Set(["markdown", "md"]), bl = "text/markdown", xl = "application/octet-stream", Sl = {
|
|
9706
9703
|
arrow: {
|
|
9707
9704
|
dataFormatId: "arrow",
|
|
9708
9705
|
label: "Columnar format for tables of data.",
|
|
@@ -9757,29 +9754,29 @@ var fl = .2, pl = 4096, ml = 65536, hl = {
|
|
|
9757
9754
|
structure: "tree",
|
|
9758
9755
|
isAutoDetectable: !0
|
|
9759
9756
|
}
|
|
9760
|
-
},
|
|
9761
|
-
async previewFile(e, t, n, r, i =
|
|
9762
|
-
let o = a?.dataFormatId, s = o == null ?
|
|
9757
|
+
}, Cl = class {
|
|
9758
|
+
async previewFile(e, t, n, r, i = dl, a) {
|
|
9759
|
+
let o = a?.dataFormatId, s = o == null ? Nl(r, ll(new URL(e).pathname)?.toLowerCase()) : o === "markdown", c = n ?? (s ? pl : fl), l = await fetch(encodeURI(e), {
|
|
9763
9760
|
headers: { Range: `bytes=0-${String(c - 1)}` },
|
|
9764
9761
|
signal: t
|
|
9765
9762
|
});
|
|
9766
9763
|
if (l.status === 416) return {
|
|
9767
|
-
...await
|
|
9764
|
+
...await Tl(/* @__PURE__ */ new Uint8Array(), s, i, !0),
|
|
9768
9765
|
isComplete: !0
|
|
9769
9766
|
};
|
|
9770
|
-
if (!l.ok) throw await
|
|
9771
|
-
let u = new Uint8Array(await l.arrayBuffer()), d =
|
|
9767
|
+
if (!l.ok) throw await ol(l, `Failed to fetch '${e}' file.`, "dpuse-tool-file-previewer.previewRemoteFile");
|
|
9768
|
+
let u = new Uint8Array(await l.arrayBuffer()), d = wl(l, u.length, c);
|
|
9772
9769
|
return {
|
|
9773
|
-
...await
|
|
9770
|
+
...await Tl(u, s, i, d, a),
|
|
9774
9771
|
isComplete: d
|
|
9775
9772
|
};
|
|
9776
9773
|
}
|
|
9777
9774
|
};
|
|
9778
|
-
function
|
|
9775
|
+
function wl(e, t, n) {
|
|
9779
9776
|
let r = /\/(\d+)$/.exec(e.headers.get("content-range") ?? "")?.[1];
|
|
9780
9777
|
return r == null ? e.status !== 206 || t < n : t >= Number(r);
|
|
9781
9778
|
}
|
|
9782
|
-
async function
|
|
9779
|
+
async function Tl(e, t, n, r, i) {
|
|
9783
9780
|
if (e.length === 0) return {
|
|
9784
9781
|
bytes: e,
|
|
9785
9782
|
dataFormatId: void 0,
|
|
@@ -9789,12 +9786,12 @@ async function El(e, t, n, r, i) {
|
|
|
9789
9786
|
fileTypeConfig: void 0,
|
|
9790
9787
|
text: void 0
|
|
9791
9788
|
};
|
|
9792
|
-
let a = await
|
|
9793
|
-
if (a != null) return
|
|
9794
|
-
let o =
|
|
9789
|
+
let a = await jc(e);
|
|
9790
|
+
if (a != null) return El(e, a, r, i);
|
|
9791
|
+
let o = Ol(e, n), s = Ml(e, jl(i) ?? o[0] ?? ml, r);
|
|
9795
9792
|
return {
|
|
9796
9793
|
bytes: e,
|
|
9797
|
-
dataFormatId: i?.dataFormatId ??
|
|
9794
|
+
dataFormatId: i?.dataFormatId ?? Pl(s.text, t),
|
|
9798
9795
|
encodingId: s.encoding.id,
|
|
9799
9796
|
encodingConfidenceLevel: s.encoding.confidenceLevel,
|
|
9800
9797
|
encodingCandidates: o,
|
|
@@ -9802,11 +9799,11 @@ async function El(e, t, n, r, i) {
|
|
|
9802
9799
|
text: s.text
|
|
9803
9800
|
};
|
|
9804
9801
|
}
|
|
9805
|
-
function
|
|
9806
|
-
let i = Object.hasOwn(
|
|
9802
|
+
function El(e, t, n, r) {
|
|
9803
|
+
let i = Object.hasOwn(Sl, t.ext) ? Sl[t.ext]?.dataFormatId : void 0, a = r?.dataFormatId ?? i;
|
|
9807
9804
|
if (t.ext === "xml") {
|
|
9808
|
-
let i =
|
|
9809
|
-
id:
|
|
9805
|
+
let i = Ml(e, jl(r) ?? {
|
|
9806
|
+
id: Al(e),
|
|
9810
9807
|
confidenceLevel: 1
|
|
9811
9808
|
}, n);
|
|
9812
9809
|
return {
|
|
@@ -9826,29 +9823,29 @@ function Dl(e, t, n, r) {
|
|
|
9826
9823
|
encodingConfidenceLevel: void 0,
|
|
9827
9824
|
encodingCandidates: void 0,
|
|
9828
9825
|
fileTypeConfig: t,
|
|
9829
|
-
text:
|
|
9826
|
+
text: Dl(e)
|
|
9830
9827
|
};
|
|
9831
9828
|
}
|
|
9832
|
-
function
|
|
9829
|
+
function Dl(e) {
|
|
9833
9830
|
return Array.from(new TextDecoder("windows-1252").decode(e), (e) => {
|
|
9834
9831
|
let t = e.codePointAt(0) ?? 0;
|
|
9835
9832
|
return t < 32 && e !== " " && e !== "\n" && e !== "\r" || t >= 127 && t <= 159 ? "·" : e;
|
|
9836
9833
|
}).join("");
|
|
9837
9834
|
}
|
|
9838
|
-
function
|
|
9839
|
-
let n =
|
|
9835
|
+
function Ol(e, t) {
|
|
9836
|
+
let n = kl(e);
|
|
9840
9837
|
if (n != null) return [n];
|
|
9841
9838
|
let r = no(e, { minimumThreshold: 0 }), i = [];
|
|
9842
9839
|
for (let { confidence: e, encoding: t } of r) {
|
|
9843
9840
|
let n = t?.toLowerCase();
|
|
9844
|
-
n != null &&
|
|
9841
|
+
n != null && tl(n) && i.push({
|
|
9845
9842
|
confidenceLevel: e,
|
|
9846
9843
|
id: n
|
|
9847
9844
|
});
|
|
9848
9845
|
}
|
|
9849
9846
|
return i.filter(({ confidenceLevel: e = 0 }, n) => n === 0 || e >= t);
|
|
9850
9847
|
}
|
|
9851
|
-
function
|
|
9848
|
+
function kl(e) {
|
|
9852
9849
|
return e[0] === 239 && e[1] === 187 && e[2] === 191 ? {
|
|
9853
9850
|
confidenceLevel: 1,
|
|
9854
9851
|
id: "utf-8-sig"
|
|
@@ -9860,52 +9857,52 @@ function Al(e) {
|
|
|
9860
9857
|
id: "utf-16-le"
|
|
9861
9858
|
} : void 0;
|
|
9862
9859
|
}
|
|
9863
|
-
function
|
|
9864
|
-
let t = new TextDecoder("ascii").decode(e.subarray(0,
|
|
9865
|
-
return
|
|
9860
|
+
function Al(e) {
|
|
9861
|
+
let t = new TextDecoder("ascii").decode(e.subarray(0, hl));
|
|
9862
|
+
return kl(e)?.id ?? gl.exec(t)?.[2] ?? "utf-8";
|
|
9866
9863
|
}
|
|
9867
|
-
function
|
|
9864
|
+
function jl(e) {
|
|
9868
9865
|
return e?.encodingId == null ? void 0 : {
|
|
9869
9866
|
id: e.encodingId,
|
|
9870
9867
|
confidenceLevel: 1
|
|
9871
9868
|
};
|
|
9872
9869
|
}
|
|
9873
|
-
function
|
|
9874
|
-
let r = n ? e :
|
|
9870
|
+
function Ml(e, t, n) {
|
|
9871
|
+
let r = n ? e : Kl(e);
|
|
9875
9872
|
try {
|
|
9876
9873
|
return {
|
|
9877
9874
|
encoding: t,
|
|
9878
|
-
text: new TextDecoder(
|
|
9875
|
+
text: new TextDecoder(nl(t.id)).decode(r)
|
|
9879
9876
|
};
|
|
9880
9877
|
} catch {
|
|
9881
9878
|
return {
|
|
9882
|
-
encoding:
|
|
9883
|
-
text: new TextDecoder(
|
|
9879
|
+
encoding: ml,
|
|
9880
|
+
text: new TextDecoder(ml.id, { fatal: !1 }).decode(r)
|
|
9884
9881
|
};
|
|
9885
9882
|
}
|
|
9886
9883
|
}
|
|
9887
|
-
function
|
|
9884
|
+
function Nl(e, t) {
|
|
9888
9885
|
let n = e?.split(";", 1)[0]?.trim().toLowerCase();
|
|
9889
|
-
return n != null && n !== "" && n !==
|
|
9886
|
+
return n != null && n !== "" && n !== xl ? n === bl : t != null && yl.has(t);
|
|
9890
9887
|
}
|
|
9891
|
-
function
|
|
9892
|
-
return
|
|
9888
|
+
function Pl(e, t) {
|
|
9889
|
+
return Fl(e) ? "json" : Il(e) ? "jsonl" : t ? "markdown" : "dtv";
|
|
9893
9890
|
}
|
|
9894
|
-
function
|
|
9891
|
+
function Fl(e) {
|
|
9895
9892
|
let t = [], n = e.search(/\S/);
|
|
9896
9893
|
if (e[n] !== "{" && e[n] !== "[") return !1;
|
|
9897
9894
|
let r = {
|
|
9898
9895
|
expectation: "value",
|
|
9899
9896
|
index: n
|
|
9900
9897
|
};
|
|
9901
|
-
for (; r != null && r.index < e.length;) r =
|
|
9898
|
+
for (; r != null && r.index < e.length;) r = Rl(e, r, t);
|
|
9902
9899
|
return r != null;
|
|
9903
9900
|
}
|
|
9904
|
-
function
|
|
9901
|
+
function Il(e) {
|
|
9905
9902
|
let t = e.split(/\r\n|\n|\r/).filter((e) => e.trim() !== "");
|
|
9906
|
-
return t.length > 1 && t.every((e) =>
|
|
9903
|
+
return t.length > 1 && t.every((e) => Ll(e));
|
|
9907
9904
|
}
|
|
9908
|
-
function
|
|
9905
|
+
function Ll(e) {
|
|
9909
9906
|
try {
|
|
9910
9907
|
let t = JSON.parse(e);
|
|
9911
9908
|
return typeof t == "object" && !!t;
|
|
@@ -9913,15 +9910,15 @@ function Rl(e) {
|
|
|
9913
9910
|
return !1;
|
|
9914
9911
|
}
|
|
9915
9912
|
}
|
|
9916
|
-
function
|
|
9913
|
+
function Rl(e, { expectation: t, index: n }, r) {
|
|
9917
9914
|
let i = e.charAt(n);
|
|
9918
|
-
if (
|
|
9915
|
+
if (vl.has(i)) return {
|
|
9919
9916
|
expectation: t,
|
|
9920
9917
|
index: n + 1
|
|
9921
9918
|
};
|
|
9922
9919
|
switch (t) {
|
|
9923
|
-
case "closeOrKey": return i === "}" ?
|
|
9924
|
-
case "closeOrValue": return i === "]" ?
|
|
9920
|
+
case "closeOrKey": return i === "}" ? zl(i, n, r) : Bl(e, n);
|
|
9921
|
+
case "closeOrValue": return i === "]" ? zl(i, n, r) : Vl(e, n, r);
|
|
9925
9922
|
case "colon": return i === ":" ? {
|
|
9926
9923
|
expectation: "value",
|
|
9927
9924
|
index: n + 1
|
|
@@ -9929,69 +9926,69 @@ function zl(e, { expectation: t, index: n }, r) {
|
|
|
9929
9926
|
case "commaOrClose": return i === "," ? {
|
|
9930
9927
|
expectation: r.at(-1) === "{" ? "key" : "value",
|
|
9931
9928
|
index: n + 1
|
|
9932
|
-
} :
|
|
9929
|
+
} : zl(i, n, r);
|
|
9933
9930
|
case "end": return;
|
|
9934
|
-
case "key": return
|
|
9935
|
-
case "value": return
|
|
9931
|
+
case "key": return Bl(e, n);
|
|
9932
|
+
case "value": return Vl(e, n, r);
|
|
9936
9933
|
}
|
|
9937
9934
|
}
|
|
9938
|
-
function
|
|
9935
|
+
function zl(e, t, n) {
|
|
9939
9936
|
if (e === (n.at(-1) === "{" ? "}" : "]")) return n.pop(), {
|
|
9940
9937
|
expectation: n.length === 0 ? "end" : "commaOrClose",
|
|
9941
9938
|
index: t + 1
|
|
9942
9939
|
};
|
|
9943
9940
|
}
|
|
9944
|
-
function
|
|
9945
|
-
let n = e.charAt(t) === "\"" ?
|
|
9941
|
+
function Bl(e, t) {
|
|
9942
|
+
let n = e.charAt(t) === "\"" ? Hl(e, t) : void 0;
|
|
9946
9943
|
return n == null ? void 0 : {
|
|
9947
9944
|
expectation: "colon",
|
|
9948
9945
|
index: n
|
|
9949
9946
|
};
|
|
9950
9947
|
}
|
|
9951
|
-
function
|
|
9948
|
+
function Vl(e, t, n) {
|
|
9952
9949
|
let r = e.charAt(t);
|
|
9953
9950
|
if (r === "{" || r === "[") return n.push(r), {
|
|
9954
9951
|
expectation: r === "{" ? "closeOrKey" : "closeOrValue",
|
|
9955
9952
|
index: t + 1
|
|
9956
9953
|
};
|
|
9957
|
-
let i = r === "\"" ?
|
|
9954
|
+
let i = r === "\"" ? Hl(e, t) : Wl(e, t);
|
|
9958
9955
|
return i == null ? void 0 : {
|
|
9959
9956
|
expectation: "commaOrClose",
|
|
9960
9957
|
index: i
|
|
9961
9958
|
};
|
|
9962
9959
|
}
|
|
9963
|
-
function
|
|
9960
|
+
function Hl(e, t) {
|
|
9964
9961
|
let n = t + 1;
|
|
9965
9962
|
for (; n < e.length;) {
|
|
9966
9963
|
let t = e.charAt(n);
|
|
9967
9964
|
if (t === "\"") return n + 1;
|
|
9968
9965
|
if (t < " ") return;
|
|
9969
9966
|
if (t === "\\") {
|
|
9970
|
-
let t =
|
|
9967
|
+
let t = Ul(e, n);
|
|
9971
9968
|
if (t == null) return;
|
|
9972
9969
|
n = t;
|
|
9973
9970
|
} else n++;
|
|
9974
9971
|
}
|
|
9975
9972
|
return e.length;
|
|
9976
9973
|
}
|
|
9977
|
-
function
|
|
9974
|
+
function Ul(e, t) {
|
|
9978
9975
|
let n = e.charAt(t + 1);
|
|
9979
9976
|
return n === "u" ? /^[\da-f]*$/i.test(e.slice(t + 2, t + 6)) ? t + 6 : void 0 : n === "" || String.raw`"\/bfnrt`.includes(n) ? t + 2 : void 0;
|
|
9980
9977
|
}
|
|
9981
|
-
function
|
|
9978
|
+
function Wl(e, t) {
|
|
9982
9979
|
let n = /^[\w.+-]+/.exec(e.slice(t))?.[0];
|
|
9983
9980
|
if (n == null) return;
|
|
9984
9981
|
let r = t + n.length;
|
|
9985
|
-
return r === e.length ?
|
|
9982
|
+
return r === e.length ? _l.some((e) => e.startsWith(n)) || /^[\d.e+-]*$/i.test(n) ? r : void 0 : _l.includes(n) || Gl(n) ? r : void 0;
|
|
9986
9983
|
}
|
|
9987
|
-
function
|
|
9984
|
+
function Gl(e) {
|
|
9988
9985
|
try {
|
|
9989
9986
|
return typeof JSON.parse(e) == "number";
|
|
9990
9987
|
} catch {
|
|
9991
9988
|
return !1;
|
|
9992
9989
|
}
|
|
9993
9990
|
}
|
|
9994
|
-
function
|
|
9991
|
+
function Kl(e) {
|
|
9995
9992
|
let t = e, n = t.length;
|
|
9996
9993
|
for (let e = n - 1; e >= 0; e--) {
|
|
9997
9994
|
let n = t[e];
|
|
@@ -10006,4 +10003,4 @@ function ql(e) {
|
|
|
10006
10003
|
}
|
|
10007
10004
|
return t;
|
|
10008
10005
|
}
|
|
10009
|
-
export {
|
|
10006
|
+
export { Cl as Tool };
|