@poe-platform/safe-bash 0.1.816 → 0.1.817
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pdf-ast/content/evaluator.d.ts +4 -0
- package/dist/pdf-ast/cos/value-parser.d.ts +2 -0
- package/dist/pdf-ast/fonts/resolve.d.ts +5 -1
- package/dist/pdf-ast/index.js +172 -165
- package/dist/safe-bash/command-chunks/biff-KLS4T7FP-UO3CXFFF.js +5581 -0
- package/dist/safe-bash/command-chunks/chunk-2J4OQT3F.js +153 -0
- package/dist/safe-bash/command-chunks/{chunk-K7VDCBXW.js → chunk-ABL2DPJI.js} +20 -20
- package/dist/safe-bash/command-chunks/{chunk-RINR7XPR.js → chunk-E64ZI2YB.js} +121 -4
- package/dist/safe-bash/command-chunks/{chunk-GEDO5V32.js → chunk-FSG6UC2N.js} +243 -105
- package/dist/safe-bash/command-chunks/{chunk-4QEJPP3K.js → chunk-S5X7PBO4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IHLZ6HNQ.js → chunk-TSKJNCKD.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-DBZCTL7C.js → chunk-UYZ6EFZE.js} +20 -18
- package/dist/safe-bash/command-chunks/{chunk-B2C3UPJS.js → chunk-W42SUPD6.js} +13 -1
- package/dist/safe-bash/command-chunks/chunk-ZHHALBM7.js +398 -0
- package/dist/safe-bash/command-chunks/{command-engine-GHE6QUHU.js → command-engine-2QXVRRH3.js} +8 -4
- package/dist/safe-bash/command-chunks/{engine-RG6HQCCB-FXYZS264.js → engine-T4GP6QOK-ECFKMR5V.js} +1 -1
- package/dist/safe-bash/command-chunks/odf-SL5TG4B3-XI3FNOTN.js +3041 -0
- package/dist/safe-bash/command-chunks/{xlsx-RE54MFCS-IQ6OXXKK.js → xlsx-RE54MFCS-4UZ5W3U7.js} +1 -1
- package/dist/safe-bash-command-apply-patch/apply.js +1 -1
- package/dist/safe-bash-command-apply-patch/index.js +1 -1
- package/dist/safe-bash-command-csvkit/index.js +1 -1
- package/dist/safe-bash-command-diff/diff.js +1 -1
- package/dist/safe-bash-command-diff/index.js +1 -1
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +5 -5
- package/dist/safe-bash-presentation-engine/index.js +1 -1
- package/dist/safe-bash-presentation-engine/retained-tags.d.ts +20 -0
- package/dist/safe-bash-presentation-engine/tags.d.ts +2 -0
- package/dist/safe-bash-presentation-engine/tags.js +11 -3
- package/dist/safe-bash-xml-engine/document.js +2 -2
- package/dist/safe-bash-xml-engine/index.js +2 -2
- package/dist/safe-bash-xml-engine/stored-document.d.ts +2 -0
- package/dist/safe-bash-xml-engine/stored-document.js +1 -1
- package/dist/safe-bash-xml-engine/stored-evaluate.js +2 -2
- package/dist/safe-bash-xml-engine/stored-namespaces.d.ts +21 -0
- package/dist/safe-bash-zip-engine/zip/safety.js +1 -1
- package/dist/safe-bash-zip-engine/zip/volumes.js +1 -1
- package/dist/spreadsheet-format-xls/biff-properties-merge.js +3 -3
- package/dist/spreadsheet-format-xls/biff-properties.d.ts +4 -2
- package/dist/spreadsheet-format-xls/biff-properties.js +141 -122
- package/dist/spreadsheet-format-xls/biff-property-names.d.ts +24 -0
- package/dist/spreadsheet-format-xls/biff-property-names.js +167 -0
- package/dist/xlsx-ast/comment-geometry.js +1 -1
- package/package.json +3 -2
- package/dist/safe-bash/command-chunks/biff-UBP2BZLK-JPODPKS3.js +0 -5448
- package/dist/safe-bash/command-chunks/chunk-O2HNOQQG.js +0 -161
- package/dist/safe-bash/command-chunks/chunk-ZUP5TBRG.js +0 -99
- package/dist/safe-bash/command-chunks/odf-3EA3EVSD-7B5GVNTC.js +0 -3097
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import {
|
|
2
|
+
C,
|
|
3
|
+
D,
|
|
4
|
+
L,
|
|
5
|
+
R,
|
|
6
|
+
T,
|
|
7
|
+
V,
|
|
8
|
+
nt,
|
|
9
|
+
ot,
|
|
10
|
+
rt
|
|
11
|
+
} from "./chunk-LNWAYODV.js";
|
|
12
|
+
|
|
13
|
+
// packages/safe-bash-command-ssconvert/dist/chunks/chunk-XDMJ4TRJ.js
|
|
14
|
+
var W = Uint32Array.from([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]);
|
|
15
|
+
var b = new Uint32Array(64);
|
|
16
|
+
var S = class extends L {
|
|
17
|
+
A = 0;
|
|
18
|
+
B = 0;
|
|
19
|
+
C = 0;
|
|
20
|
+
D = 0;
|
|
21
|
+
E = 0;
|
|
22
|
+
F = 0;
|
|
23
|
+
G = 0;
|
|
24
|
+
H = 0;
|
|
25
|
+
constructor(a, r) {
|
|
26
|
+
super(64, a, 8, false), this.A = r[0] | 0, this.B = r[1] | 0, this.C = r[2] | 0, this.D = r[3] | 0, this.E = r[4] | 0, this.F = r[5] | 0, this.G = r[6] | 0, this.H = r[7] | 0;
|
|
27
|
+
}
|
|
28
|
+
get() {
|
|
29
|
+
let { A: a, B: r, C: c, D: t, E: h, F: x, G: e, H: s } = this;
|
|
30
|
+
return [a, r, c, t, h, x, e, s];
|
|
31
|
+
}
|
|
32
|
+
set(a, r, c, t, h, x, e, s) {
|
|
33
|
+
this.A = a | 0, this.B = r | 0, this.C = c | 0, this.D = t | 0, this.E = h | 0, this.F = x | 0, this.G = e | 0, this.H = s | 0;
|
|
34
|
+
}
|
|
35
|
+
_cloneInto(a) {
|
|
36
|
+
return (a ||= new this.constructor()).set(...this.get()), this._cloneIntoMeta(a);
|
|
37
|
+
}
|
|
38
|
+
process(a, r) {
|
|
39
|
+
for (let i = 0; i < 16; i++, r += 4) b[i] = a.getUint32(r, false);
|
|
40
|
+
for (let i = 16; i < 64; i++) {
|
|
41
|
+
let m = b[i - 15], p = b[i - 2], L2 = V(m, 7) ^ V(m, 18) ^ m >>> 3, y = V(p, 17) ^ V(p, 19) ^ p >>> 10;
|
|
42
|
+
b[i] = y + b[i - 7] + L2 + b[i - 16] | 0;
|
|
43
|
+
}
|
|
44
|
+
let { A: c, B: t, C: h, D: x, E: e, F: s, G: o, H: n } = this;
|
|
45
|
+
for (let i = 0; i < 64; i++) {
|
|
46
|
+
let m = V(e, 6) ^ V(e, 11) ^ V(e, 25), p = n + m + nt(e, s, o) + W[i] + b[i] | 0, y = (V(c, 2) ^ V(c, 13) ^ V(c, 22)) + ot(c, t, h) | 0;
|
|
47
|
+
n = o, o = s, s = e, e = x + p | 0, x = h, h = t, t = c, c = p + y | 0;
|
|
48
|
+
}
|
|
49
|
+
c = c + this.A | 0, t = t + this.B | 0, h = h + this.C | 0, x = x + this.D | 0, e = e + this.E | 0, s = s + this.F | 0, o = o + this.G | 0, n = n + this.H | 0, this.set(c, t, h, x, e, s, o, n);
|
|
50
|
+
}
|
|
51
|
+
roundClean() {
|
|
52
|
+
T(b);
|
|
53
|
+
}
|
|
54
|
+
destroy() {
|
|
55
|
+
this.destroyed = true, this.set(0, 0, 0, 0, 0, 0, 0, 0), T(this.buffer);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var _ = class extends S {
|
|
59
|
+
constructor() {
|
|
60
|
+
super(32, rt);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var I = C(() => new _(), D(1));
|
|
64
|
+
var H = Uint32Array.from([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
65
|
+
var l = new Uint32Array(80);
|
|
66
|
+
var F = class extends L {
|
|
67
|
+
A = H[0] | 0;
|
|
68
|
+
B = H[1] | 0;
|
|
69
|
+
C = H[2] | 0;
|
|
70
|
+
D = H[3] | 0;
|
|
71
|
+
E = H[4] | 0;
|
|
72
|
+
constructor() {
|
|
73
|
+
super(64, 20, 8, false);
|
|
74
|
+
}
|
|
75
|
+
get() {
|
|
76
|
+
let { A: a, B: r, C: c, D: t, E: h } = this;
|
|
77
|
+
return [a, r, c, t, h];
|
|
78
|
+
}
|
|
79
|
+
set(a, r, c, t, h) {
|
|
80
|
+
this.A = a | 0, this.B = r | 0, this.C = c | 0, this.D = t | 0, this.E = h | 0;
|
|
81
|
+
}
|
|
82
|
+
_cloneInto(a) {
|
|
83
|
+
return (a ||= new this.constructor()).set(...this.get()), this._cloneIntoMeta(a);
|
|
84
|
+
}
|
|
85
|
+
process(a, r) {
|
|
86
|
+
for (let s = 0; s < 16; s++, r += 4) l[s] = a.getUint32(r, false);
|
|
87
|
+
for (let s = 16; s < 80; s++) l[s] = R(l[s - 3] ^ l[s - 8] ^ l[s - 14] ^ l[s - 16], 1);
|
|
88
|
+
let { A: c, B: t, C: h, D: x, E: e } = this;
|
|
89
|
+
for (let s = 0; s < 80; s++) {
|
|
90
|
+
let o, n;
|
|
91
|
+
s < 20 ? (o = nt(t, h, x), n = 1518500249) : s < 40 ? (o = t ^ h ^ x, n = 1859775393) : s < 60 ? (o = ot(t, h, x), n = 2400959708) : (o = t ^ h ^ x, n = 3395469782);
|
|
92
|
+
let i = R(c, 5) + o + e + n + l[s] | 0;
|
|
93
|
+
e = x, x = h, h = R(t, 30), t = c, c = i;
|
|
94
|
+
}
|
|
95
|
+
c = c + this.A | 0, t = t + this.B | 0, h = h + this.C | 0, x = x + this.D | 0, e = e + this.E | 0, this.set(c, t, h, x, e);
|
|
96
|
+
}
|
|
97
|
+
roundClean() {
|
|
98
|
+
T(l);
|
|
99
|
+
}
|
|
100
|
+
destroy() {
|
|
101
|
+
this.destroyed = true, this.set(0, 0, 0, 0, 0), T(this.buffer);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var X = C(() => new F());
|
|
105
|
+
var T2 = Math.pow(2, 32);
|
|
106
|
+
var K = Array.from({ length: 64 }, (u, a) => Math.floor(T2 * Math.abs(Math.sin(a + 1))));
|
|
107
|
+
var U = H.slice(0, 4);
|
|
108
|
+
var E = new Uint32Array(16);
|
|
109
|
+
var R2 = (() => {
|
|
110
|
+
let u = [[7, 12, 17, 22], [5, 9, 14, 20], [4, 11, 16, 23], [6, 10, 15, 21]];
|
|
111
|
+
return Uint8Array.from({ length: 64 }, (a, r) => u[Math.floor(r / 16)][r % 4]);
|
|
112
|
+
})();
|
|
113
|
+
var w = class extends L {
|
|
114
|
+
A = U[0] | 0;
|
|
115
|
+
B = U[1] | 0;
|
|
116
|
+
C = U[2] | 0;
|
|
117
|
+
D = U[3] | 0;
|
|
118
|
+
constructor() {
|
|
119
|
+
super(64, 16, 8, true);
|
|
120
|
+
}
|
|
121
|
+
get() {
|
|
122
|
+
let { A: a, B: r, C: c, D: t } = this;
|
|
123
|
+
return [a, r, c, t];
|
|
124
|
+
}
|
|
125
|
+
set(a, r, c, t) {
|
|
126
|
+
this.A = a | 0, this.B = r | 0, this.C = c | 0, this.D = t | 0;
|
|
127
|
+
}
|
|
128
|
+
_cloneInto(a) {
|
|
129
|
+
return (a ||= new this.constructor()).set(...this.get()), this._cloneIntoMeta(a);
|
|
130
|
+
}
|
|
131
|
+
process(a, r) {
|
|
132
|
+
for (let e = 0; e < 16; e++, r += 4) E[e] = a.getUint32(r, true);
|
|
133
|
+
let { A: c, B: t, C: h, D: x } = this;
|
|
134
|
+
for (let e = 0; e < 64; e++) {
|
|
135
|
+
let s, o;
|
|
136
|
+
e < 16 ? (s = nt(t, h, x), o = e) : e < 32 ? (s = nt(x, t, h), o = (5 * e + 1) % 16) : e < 48 ? (s = t ^ h ^ x, o = (3 * e + 5) % 16) : (s = h ^ (t | ~x), o = 7 * e % 16), s = s + c + K[e] + E[o], c = x, x = h, h = t, t = t + R(s, R2[e]);
|
|
137
|
+
}
|
|
138
|
+
c = c + this.A | 0, t = t + this.B | 0, h = h + this.C | 0, x = x + this.D | 0, this.set(c, t, h, x);
|
|
139
|
+
}
|
|
140
|
+
roundClean() {
|
|
141
|
+
T(E);
|
|
142
|
+
}
|
|
143
|
+
destroy() {
|
|
144
|
+
this.destroyed = true, this.set(0, 0, 0, 0), T(this.buffer);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
var Y = C(() => new w());
|
|
148
|
+
|
|
149
|
+
export {
|
|
150
|
+
I,
|
|
151
|
+
X,
|
|
152
|
+
Y
|
|
153
|
+
};
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
g
|
|
3
3
|
} from "./chunk-Z7ESJVFP.js";
|
|
4
4
|
|
|
5
|
-
// packages/safe-bash-command-ssconvert/dist/chunks/chunk-
|
|
5
|
+
// packages/safe-bash-command-ssconvert/dist/chunks/chunk-VIZKA76A.js
|
|
6
6
|
import { createEngine as vt } from "../../spreadsheet-engine/index.js";
|
|
7
7
|
import { SsconvertError as O } from "../../spreadsheet-engine/contracts.js";
|
|
8
8
|
import { decodeTextSource as ot } from "../../spreadsheet-engine/encoding/decode-source.js";
|
|
@@ -35,21 +35,21 @@ var te = { id: "Gnumeric_applix", services: [{ id: "applix", direction: "read",
|
|
|
35
35
|
var re = { id: "Gnumeric_dif", services: [{ id: "dif", direction: "read", read: async (e, t) => (await import("./dif-BXKPQOCO-4KB3RC6G.js")).readDif(e, t), description: "Data Interchange Format (*.dif)", extensions: ["dif"], probePriority: 1 }, { id: "dif", direction: "write", write: async (e, t, i) => (await import("./dif-BXKPQOCO-4KB3RC6G.js")).writeDif(e, t, i), description: "Data Interchange Format (*.dif)", extensions: ["dif"], formatLevel: "manual_remember", saveScope: "sheet", selectionSource: "view" }], source: "plugins/dif/plugin.xml.in" };
|
|
36
36
|
var Qe = ["xor", "rc4", ...[false, true].flatMap((e) => [40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128].map((t) => `rc4-cryptoapi-${t}${e ? "-properties" : ""}`))];
|
|
37
37
|
var ie = ["xor"];
|
|
38
|
-
var W = { id: "Gnumeric_Excel", source: "plugins/excel/plugin.xml.in", services: [{ id: "excel", direction: "read", readWorkbookSource: async (...e) => (await import("./biff-
|
|
39
|
-
yield* (await import("./biff-
|
|
40
|
-
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: Qe } }, direction: "write", description: "MS Excel\u2122 97/2000/XP", extensions: ["xls"], mimeTypes: ["application/vnd.ms-excel"], formatLevel: "auto", defaultSaverPriority: 1 }, { id: "excel_biff7", write: async (...e) => (await import("./biff-
|
|
41
|
-
yield* (await import("./biff-
|
|
42
|
-
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: ie } }, direction: "write", description: "MS Excel\u2122 5.0/95", extensions: ["xls"], mimeTypes: ["application/vnd.ms-excel"], formatLevel: "auto" }, { id: "excel_dsf", write: async (...e) => (await import("./biff-
|
|
43
|
-
yield* (await import("./biff-
|
|
44
|
-
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: ie } }, direction: "write", description: "MS Excel\u2122 97/2000/XP & 5.0/95", extensions: ["xls"], mimeTypes: ["application/vnd.ms-excel"], formatLevel: "auto" }, { id: "excel_enc", direction: "read", read: async (...e) => (await import("./biff-
|
|
45
|
-
var oe = { id: "Gnumeric_Excel", source: "plugins/excel/plugin.xml.in", services: [{ id: "xlsx", direction: "read", probeContent: async (e, t) => (await import("./xlsx-RE54MFCS-
|
|
46
|
-
yield* (await import("./xlsx-RE54MFCS-
|
|
38
|
+
var W = { id: "Gnumeric_Excel", source: "plugins/excel/plugin.xml.in", services: [{ id: "excel", direction: "read", readWorkbookSource: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).readBiffWorkbookSource(...e), readSource: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).readBiff(...e), probeSource: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).probeBiff(...e), read: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).readBiff(...e), probeContent: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).probeBiff(...e), description: "MS Excel\u2122 (*.xls)", extensions: ["xls", "xlw", "xlt"], mimeTypes: ["application/vnd.ms-excel", "application/excel", "application/msexcel", "application/x-excel", "application/x-ms-excel", "application/x-msexcel", "application/x-xls", "application/xls", "application/x-dos_ms_excel", "zz-application/zz-winassoc-xls"], probePriority: 100, contentProbe: true }, { id: "excel_biff8", write: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).createBiffWriter(8)(...e), writeStream: async function* (...e) {
|
|
39
|
+
yield* (await import("./biff-KLS4T7FP-UO3CXFFF.js")).createBiffStreamWriter(8)(...e);
|
|
40
|
+
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: Qe } }, direction: "write", description: "MS Excel\u2122 97/2000/XP", extensions: ["xls"], mimeTypes: ["application/vnd.ms-excel"], formatLevel: "auto", defaultSaverPriority: 1 }, { id: "excel_biff7", write: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).createBiffWriter(7)(...e), writeStream: async function* (...e) {
|
|
41
|
+
yield* (await import("./biff-KLS4T7FP-UO3CXFFF.js")).createBiffStreamWriter(7)(...e);
|
|
42
|
+
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: ie } }, direction: "write", description: "MS Excel\u2122 5.0/95", extensions: ["xls"], mimeTypes: ["application/vnd.ms-excel"], formatLevel: "auto" }, { id: "excel_dsf", write: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).createBiffWriter("dsf")(...e), writeStream: async function* (...e) {
|
|
43
|
+
yield* (await import("./biff-KLS4T7FP-UO3CXFFF.js")).createBiffStreamWriter("dsf")(...e);
|
|
44
|
+
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: ie } }, direction: "write", description: "MS Excel\u2122 97/2000/XP & 5.0/95", extensions: ["xls"], mimeTypes: ["application/vnd.ms-excel"], formatLevel: "auto" }, { id: "excel_enc", direction: "read", read: async (...e) => (await import("./biff-KLS4T7FP-UO3CXFFF.js")).readBiff(...e), description: "MS Excel\u2122 (*.xls) requiring encoding specification", extensions: [], probePriority: 200, encodingDependent: true }] };
|
|
45
|
+
var oe = { id: "Gnumeric_Excel", source: "plugins/excel/plugin.xml.in", services: [{ id: "xlsx", direction: "read", probeContent: async (e, t) => (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).probeXlsx(e, t), probeSource: async (e, t) => (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).probeXlsx(e, t), readWorkbookSource: async (e, t) => (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).readXlsx(e, t, true), readSource: async (e, t) => (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).readXlsx(e, t), read: async (e, t) => (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).readXlsx(e, t), description: "ECMA 376 / Office Open XML [MS Excel\u2122 2007/2010] (*.xlsx)", extensions: ["xlsx", "xltx", "xlsb", "xlsm", "xltm"], mimeTypes: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"], probePriority: 100, contentProbe: true }, { id: "xlsx", direction: "write", sourceAxes: true, write: async (e, t, i) => (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).createXlsxWriter("2006")(e, t, i), writeStream: async function* (e, t, i) {
|
|
46
|
+
yield* (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).createXlsxStreamWriter("2006")(e, t, i);
|
|
47
47
|
}, writeWorkbookSource: async function* (e, t, i) {
|
|
48
|
-
yield* (await import("./xlsx-RE54MFCS-
|
|
49
|
-
}, description: "ECMA 376 1st edition (2006); [MS Excel\u2122 2007]", extensions: ["xlsx"], mimeTypes: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"], formatLevel: "auto" }, { id: "xlsx2", direction: "write", sourceAxes: true, write: async (e, t, i) => (await import("./xlsx-RE54MFCS-
|
|
50
|
-
yield* (await import("./xlsx-RE54MFCS-
|
|
48
|
+
yield* (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).createXlsxStreamWriter("2006")(e, t, i);
|
|
49
|
+
}, description: "ECMA 376 1st edition (2006); [MS Excel\u2122 2007]", extensions: ["xlsx"], mimeTypes: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"], formatLevel: "auto" }, { id: "xlsx2", direction: "write", sourceAxes: true, write: async (e, t, i) => (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).createXlsxWriter("2008")(e, t, i), writeStream: async function* (e, t, i) {
|
|
50
|
+
yield* (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).createXlsxStreamWriter("2008")(e, t, i);
|
|
51
51
|
}, writeWorkbookSource: async function* (e, t, i) {
|
|
52
|
-
yield* (await import("./xlsx-RE54MFCS-
|
|
52
|
+
yield* (await import("./xlsx-RE54MFCS-4UZ5W3U7.js")).createXlsxStreamWriter("2008")(e, t, i);
|
|
53
53
|
}, description: "ISO/IEC 29500:2008 & ECMA 376 2nd edition (2008); [MS Excel\u2122 2010]", extensions: ["xlsx"], mimeTypes: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"], formatLevel: "auto" }] };
|
|
54
54
|
var D = { id: "Gnumeric_Excel", source: "plugins/excel/plugin.xml.in", services: [{ id: "excel_xml", direction: "read", read: async (e, t) => (await import("./spreadsheetml-FUAFHANW-NHCLA747.js")).readSpreadsheetML(e, t), probeContent: async (...e) => (await import("./spreadsheetml-FUAFHANW-NHCLA747.js")).probeSpreadsheetML(...e), description: "MS Excel\u2122 2003 SpreadsheetML", extensions: ["xml"], probePriority: 1, contentProbe: true }] };
|
|
55
55
|
var ne = { ...W, services: [...W.services.slice(0, -1), ...D.services, ...oe.services, W.services.at(-1)] };
|
|
@@ -62,14 +62,14 @@ var de = { id: "Gnumeric_lpsolve", services: [{ id: "lpsolve", direction: "write
|
|
|
62
62
|
var me = { id: "Gnumeric_mps", services: [{ id: "mps", direction: "read", read: async (e, t) => (await import("./mps-6LOYNSEU-JHPKED6S.js")).readMps(e, t), description: "Linear and integer program (*.mps) file format", extensions: ["mps"], mimeTypes: ["application/x-mps"], probePriority: 1 }], source: "plugins/mps/plugin.xml.in" };
|
|
63
63
|
var ue = { id: "Gnumeric_oleo", services: [{ id: "oleo", direction: "read", read: async (e, t) => (await import("./oleo-SCXSASJM-HMISZSBK.js")).readOleo(e, t), description: "GNU Oleo (*.oleo)", extensions: ["oleo"], mimeTypes: ["application/x-oleo"], probePriority: 100 }], source: "plugins/oleo/plugin.xml.in" };
|
|
64
64
|
var pe = ["odf12-aes128-cbc", "odf12-aes192-cbc", "odf12-aes256-cbc", "odf12-blowfish-cfb8", "odf12-blowfish-cfb64", "libreoffice-aes256-gcm"];
|
|
65
|
-
var j = { id: "Gnumeric_OpenCalc", services: [{ id: "openoffice", direction: "read", probeSource: async (...e) => (await import("./odf-
|
|
66
|
-
yield* (await import("./odf-
|
|
65
|
+
var j = { id: "Gnumeric_OpenCalc", services: [{ id: "openoffice", direction: "read", probeSource: async (...e) => (await import("./odf-SL5TG4B3-XI3FNOTN.js")).probeOdf(...e), readWorkbookSource: async (e, t) => (await import("./odf-SL5TG4B3-XI3FNOTN.js")).readOdfWorkbookSource(e, t), readSource: async (e, t) => (await import("./odf-SL5TG4B3-XI3FNOTN.js")).readOdf(e, t), read: async (e, t) => (await import("./odf-SL5TG4B3-XI3FNOTN.js")).readOdf(e, t), probeContent: async (...e) => (await import("./odf-SL5TG4B3-XI3FNOTN.js")).probeOdf(...e), description: "Open Document Format (*.sxc, *.ods)", extensions: ["ods", "ots", "sxc", "stc"], mimeTypes: ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "application/vnd.sun.xml.calc", "application/vnd.sun.xml.calc.template"], probePriority: 1, contentProbe: true }, { id: "openoffice", direction: "write", sourceAxes: true, write: async (e, t, i) => (await import("./odf-SL5TG4B3-XI3FNOTN.js")).createOdfWriter("strict")(e, t, i), writeStream: async function* (e, t, i) {
|
|
66
|
+
yield* (await import("./odf-SL5TG4B3-XI3FNOTN.js")).createOdfStreamWriter("strict")(e, t, i);
|
|
67
67
|
}, writeWorkbookSource: async function* (e, t, i) {
|
|
68
|
-
yield* (await import("./odf-
|
|
69
|
-
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: pe } }, description: "ODF 1.2 strict conformance (*.ods)", extensions: ["ods"], mimeTypes: ["application/vnd.oasis.opendocument.spreadsheet"], formatLevel: "auto" }, { id: "odf", direction: "write", sourceAxes: true, write: async (e, t, i) => (await import("./odf-
|
|
70
|
-
yield* (await import("./odf-
|
|
68
|
+
yield* (await import("./odf-SL5TG4B3-XI3FNOTN.js")).createOdfStreamWriter("strict")(e, t, i);
|
|
69
|
+
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: pe } }, description: "ODF 1.2 strict conformance (*.ods)", extensions: ["ods"], mimeTypes: ["application/vnd.oasis.opendocument.spreadsheet"], formatLevel: "auto" }, { id: "odf", direction: "write", sourceAxes: true, write: async (e, t, i) => (await import("./odf-SL5TG4B3-XI3FNOTN.js")).createOdfWriter("extended")(e, t, i), writeStream: async function* (e, t, i) {
|
|
70
|
+
yield* (await import("./odf-SL5TG4B3-XI3FNOTN.js")).createOdfStreamWriter("extended")(e, t, i);
|
|
71
71
|
}, writeWorkbookSource: async function* (e, t, i) {
|
|
72
|
-
yield* (await import("./odf-
|
|
72
|
+
yield* (await import("./odf-SL5TG4B3-XI3FNOTN.js")).createOdfStreamWriter("extended")(e, t, i);
|
|
73
73
|
}, labelRanges: true, exportOptionRules: { encryption: { kind: "enum", values: pe } }, description: "ODF 1.2 extended conformance (*.ods)", extensions: ["ods"], mimeTypes: ["application/vnd.oasis.opendocument.spreadsheet"], formatLevel: "auto" }], source: "plugins/openoffice/plugin.xml.in" };
|
|
74
74
|
var fe = { id: "Gnumeric_paradox", services: [{ id: "paradox", direction: "read", read: async (e, t) => (await import("./paradox-4FCZE53D-LQPGVMEL.js")).readParadox(e, t), description: "Paradox database or primary index file (*.db, *.px)", extensions: ["db", "px"], probePriority: 100 }, { id: "paradox", direction: "write", write: async (e, t, i) => (await import("./paradox-4FCZE53D-LQPGVMEL.js")).writeParadox(e, t, i), exportOptionRules: { encryption: { kind: "enum", values: ["paradox"] } }, description: "Paradox database (*.db)", extensions: ["db"] }], source: "plugins/paradox/plugin.xml.in" };
|
|
75
75
|
var xe = { id: "Gnumeric_pdf", source: "src/print-info.c:1074", services: [{ id: "pdf_assistant", direction: "write", description: "PDF export", extensions: ["pdf"], sheetSelection: true, honorsExportRange: false, write: async (...e) => (await import("./pdf-XHHFTOT4-UJJYOYJ2.js")).writePdf(...e), exportOptions: async (...e) => (await import("./pdf-XHHFTOT4-UJJYOYJ2.js")).pdfExportOptions(...e), exportOptionRules: { object: { kind: "string" }, paper: { kind: "string" } } }] };
|
|
@@ -150,7 +150,113 @@ async function parseStoredXml(source, context, budget, recover, consume) {
|
|
|
150
150
|
|
|
151
151
|
// packages/safe-bash-xml-engine/src/stored-document.ts
|
|
152
152
|
import { PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
|
|
153
|
-
|
|
153
|
+
|
|
154
|
+
// packages/safe-bash-xml-engine/src/stored-namespaces.ts
|
|
155
|
+
var StoredNamespaces = class _StoredNamespaces {
|
|
156
|
+
constructor(storage, budget, reference = 0) {
|
|
157
|
+
this.storage = storage;
|
|
158
|
+
this.budget = budget;
|
|
159
|
+
this.reference = reference;
|
|
160
|
+
}
|
|
161
|
+
storage;
|
|
162
|
+
budget;
|
|
163
|
+
reference;
|
|
164
|
+
async read(reference) {
|
|
165
|
+
const header = await this.storage.read(reference, 8);
|
|
166
|
+
const size = new DataView(header.buffer, header.byteOffset, 8).getFloat64(0, true);
|
|
167
|
+
const decoder = new TextDecoder(), parts = [];
|
|
168
|
+
for (let offset = 0; offset < size; offset += 16384) {
|
|
169
|
+
const length = Math.min(16384, size - offset);
|
|
170
|
+
const checkpoint = this.budget.tick(length);
|
|
171
|
+
if (checkpoint) await checkpoint;
|
|
172
|
+
parts.push(decoder.decode(await this.storage.read(reference + 8 + offset, length), { stream: true }));
|
|
173
|
+
}
|
|
174
|
+
parts.push(decoder.decode());
|
|
175
|
+
return JSON.parse(parts.join(""));
|
|
176
|
+
}
|
|
177
|
+
async write(entry) {
|
|
178
|
+
const source = JSON.stringify(entry), encoder = new TextEncoder(), header = new Uint8Array(8);
|
|
179
|
+
const reference = await this.storage.append(header);
|
|
180
|
+
let size = 0;
|
|
181
|
+
for (let offset = 0; offset < source.length; ) {
|
|
182
|
+
let end = Math.min(source.length, offset + 4096);
|
|
183
|
+
const last = source.charCodeAt(end - 1);
|
|
184
|
+
if (end < source.length && last >= 55296 && last <= 56319) end--;
|
|
185
|
+
const bytes = encoder.encode(source.slice(offset, end));
|
|
186
|
+
const checkpoint = this.budget.tick(bytes.length);
|
|
187
|
+
if (checkpoint) await checkpoint;
|
|
188
|
+
await this.storage.append(bytes);
|
|
189
|
+
size += bytes.length;
|
|
190
|
+
offset = end;
|
|
191
|
+
}
|
|
192
|
+
new DataView(header.buffer).setFloat64(0, size, true);
|
|
193
|
+
await this.storage.write(reference, header);
|
|
194
|
+
return reference;
|
|
195
|
+
}
|
|
196
|
+
async get(prefix) {
|
|
197
|
+
let reference = this.reference;
|
|
198
|
+
while (reference) {
|
|
199
|
+
const entry = await this.read(reference);
|
|
200
|
+
const checkpoint = this.budget.tick(prefix.length + 1);
|
|
201
|
+
if (checkpoint) await checkpoint;
|
|
202
|
+
if (prefix === entry.prefix) return entry.uri;
|
|
203
|
+
reference = prefix < entry.prefix ? entry.left : entry.right;
|
|
204
|
+
}
|
|
205
|
+
return void 0;
|
|
206
|
+
}
|
|
207
|
+
async height(reference) {
|
|
208
|
+
return reference ? (await this.read(reference)).height : 0;
|
|
209
|
+
}
|
|
210
|
+
async updated(entry) {
|
|
211
|
+
return this.write({ ...entry, height: 1 + Math.max(await this.height(entry.left), await this.height(entry.right)) });
|
|
212
|
+
}
|
|
213
|
+
async rotate(entry, left) {
|
|
214
|
+
const pivot = await this.read(left ? entry.right : entry.left);
|
|
215
|
+
const child = await this.updated(left ? { ...entry, right: pivot.left } : { ...entry, left: pivot.right });
|
|
216
|
+
return this.updated(left ? { ...pivot, left: child } : { ...pivot, right: child });
|
|
217
|
+
}
|
|
218
|
+
async balance(entry) {
|
|
219
|
+
const difference = await this.height(entry.left) - await this.height(entry.right);
|
|
220
|
+
if (difference > 1) {
|
|
221
|
+
const child = await this.read(entry.left);
|
|
222
|
+
if (await this.height(child.left) < await this.height(child.right)) entry = { ...entry, left: await this.rotate(child, true) };
|
|
223
|
+
return this.rotate(entry, false);
|
|
224
|
+
}
|
|
225
|
+
if (difference < -1) {
|
|
226
|
+
const child = await this.read(entry.right);
|
|
227
|
+
if (await this.height(child.right) < await this.height(child.left)) entry = { ...entry, right: await this.rotate(child, false) };
|
|
228
|
+
return this.rotate(entry, true);
|
|
229
|
+
}
|
|
230
|
+
return this.updated(entry);
|
|
231
|
+
}
|
|
232
|
+
async set(prefix, uri) {
|
|
233
|
+
const insert = async (reference) => {
|
|
234
|
+
if (!reference) return this.write({ prefix, uri, left: 0, right: 0, height: 1 });
|
|
235
|
+
const entry = await this.read(reference);
|
|
236
|
+
const checkpoint = this.budget.tick(prefix.length + uri.length + 1);
|
|
237
|
+
if (checkpoint) await checkpoint;
|
|
238
|
+
if (prefix === entry.prefix) return entry.uri === uri ? reference : this.write({ ...entry, uri });
|
|
239
|
+
const side = prefix < entry.prefix ? "left" : "right";
|
|
240
|
+
const child = await insert(entry[side]);
|
|
241
|
+
return child === entry[side] ? reference : this.balance({ ...entry, [side]: child });
|
|
242
|
+
};
|
|
243
|
+
return new _StoredNamespaces(this.storage, this.budget, await insert(this.reference));
|
|
244
|
+
}
|
|
245
|
+
async *[Symbol.asyncIterator]() {
|
|
246
|
+
const visit = async function* (scope, reference) {
|
|
247
|
+
if (!reference) return;
|
|
248
|
+
const entry = await scope.read(reference);
|
|
249
|
+
yield* visit(scope, entry.left);
|
|
250
|
+
yield [entry.prefix, entry.uri];
|
|
251
|
+
yield* visit(scope, entry.right);
|
|
252
|
+
};
|
|
253
|
+
yield* visit(this, this.reference);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// packages/safe-bash-xml-engine/src/stored-document.ts
|
|
258
|
+
var headerBytes = 80;
|
|
259
|
+
var namespacesField = 72;
|
|
154
260
|
var parentField = 0;
|
|
155
261
|
var nextField = 8;
|
|
156
262
|
var firstField = 16;
|
|
@@ -183,6 +289,8 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
183
289
|
try {
|
|
184
290
|
context.registerCleanup?.(document.close.bind(document));
|
|
185
291
|
document.documentReference = await document.storage.append(new Uint8Array(headerBytes));
|
|
292
|
+
const namespaces = await new StoredNamespaces(document.storage, budget).set("xml", "http://www.w3.org/XML/1998/namespace");
|
|
293
|
+
await document.set(document.documentReference, namespacesField, namespaces.reference);
|
|
186
294
|
let parent = document.documentReference, fragmentTail = 0;
|
|
187
295
|
const consume = async (event) => {
|
|
188
296
|
if (event.type === "close") {
|
|
@@ -198,7 +306,6 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
198
306
|
name: element.name,
|
|
199
307
|
localName: element.localName,
|
|
200
308
|
namespace: element.namespace,
|
|
201
|
-
namespaces: [...element.namespaces],
|
|
202
309
|
...element.declaration === void 0 ? {} : { declaration: element.declaration }
|
|
203
310
|
};
|
|
204
311
|
}
|
|
@@ -207,6 +314,10 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
207
314
|
if (continuation) await document.set(fragmentTail, fragmentField, reference);
|
|
208
315
|
fragmentTail = reference;
|
|
209
316
|
if (event.type === "open") {
|
|
317
|
+
let namespaces2 = await document.namespaceScope(parent);
|
|
318
|
+
for (const attribute of event.element.attributes) if (attribute.namespace === "http://www.w3.org/2000/xmlns/")
|
|
319
|
+
namespaces2 = await namespaces2.set(attribute.name === "xmlns" ? "" : attribute.localName, attribute.value);
|
|
320
|
+
await document.set(reference, namespacesField, namespaces2.reference);
|
|
210
321
|
for (const attribute of event.element.attributes) {
|
|
211
322
|
await document.append(reference, { kind: "attribute", value: attribute });
|
|
212
323
|
}
|
|
@@ -279,10 +390,15 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
279
390
|
if (value.kind === "element") {
|
|
280
391
|
const attributes = [];
|
|
281
392
|
for await (const attribute of this.attributes(reference)) attributes.push(attribute);
|
|
282
|
-
|
|
393
|
+
const namespaces = /* @__PURE__ */ new Map();
|
|
394
|
+
for await (const [prefix, uri] of await this.namespaceScope(reference)) namespaces.set(prefix, uri);
|
|
395
|
+
return { ...value, attributes, namespaces };
|
|
283
396
|
}
|
|
284
397
|
return value;
|
|
285
398
|
}
|
|
399
|
+
async namespaceScope(reference) {
|
|
400
|
+
return new StoredNamespaces(this.storage, this.budget, await this.field(reference, namespacesField));
|
|
401
|
+
}
|
|
286
402
|
async metadata(reference) {
|
|
287
403
|
const size = await this.field(reference, sizeField);
|
|
288
404
|
const decoder = new TextDecoder();
|
|
@@ -297,7 +413,7 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
297
413
|
const metadata = JSON.parse(parts.join(""));
|
|
298
414
|
if (metadata.kind === "cdata" && await this.field(reference, flagsField) & textFlag)
|
|
299
415
|
return { kind: "text", text: metadata.text };
|
|
300
|
-
return metadata.kind === "element" ? { ...metadata, attributes: [], namespaces: new Map(
|
|
416
|
+
return metadata.kind === "element" ? { ...metadata, attributes: [], namespaces: /* @__PURE__ */ new Map(), children: [], content: [], text: "" } : metadata;
|
|
301
417
|
}
|
|
302
418
|
/** Content bodies may span parser fragments or coalesced text tokens.
|
|
303
419
|
* Replay them without making a concatenated node value. */
|
|
@@ -428,6 +544,7 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
428
544
|
};
|
|
429
545
|
|
|
430
546
|
export {
|
|
547
|
+
StoredNamespaces,
|
|
431
548
|
parseStoredXml,
|
|
432
549
|
StoredXmlDocument
|
|
433
550
|
};
|