@silurus/ooxml 0.89.6 → 0.89.8
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/assets/render-worker-Ck21oePL.js +16 -0
- package/dist/assets/render-worker-DJiGqgi0.js +15 -0
- package/dist/assets/render-worker-hPLJ82d2.js +35 -0
- package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
- package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
- package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
- package/dist/chart-ex.mjs +367 -367
- package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-B7AoyoDK.js} +18 -18
- package/dist/{comment-ui-runtime-hfewTmVJ.js → comment-ui-runtime-C5eWtZSW.js} +3 -3
- package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-CV0I9faV.js} +3 -3
- package/dist/{document-model-source-BUTSwkyP.js → document-model-source-90ext13g.js} +37 -37
- package/dist/{document-pull-client-C_D779tO.js → document-pull-client-DSYpUET2.js} +17525 -13847
- package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
- package/dist/{docx-BfLZeiwa.js → docx-DCCDnwrG.js} +593 -593
- package/dist/{docx-BC2HQtjg.js → docx-G7pt7ajR.js} +33 -33
- package/dist/{docx-model-source-IjrOZgnl.js → docx-model-source-Beon3BD5.js} +6 -6
- package/dist/docx.mjs +4 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
- package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
- package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
- package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
- package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
- package/dist/{host-layout-measure-DJvccDI3.js → host-layout-measure-Z2fIsmDw.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +2 -2
- package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
- package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
- package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
- package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
- package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
- package/dist/node.mjs +5 -5
- package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
- package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
- package/dist/{pptx-CfCiVlNB.js → pptx-Ci1Y9SS_.js} +261 -259
- package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
- package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-3N7xLtmI.js} +6 -6
- package/dist/region-map.mjs +39 -39
- package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
- package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-BZoh-wqR.js} +1 -1
- package/dist/{render-worker-host-D_0g-TQ2.js → render-worker-host-BmVeB_mR.js} +1 -1
- package/dist/{render-worker-host-DjBotZNL.js → render-worker-host-CVr53kg0.js} +1 -1
- package/dist/{renderer-IFuBkPvF.js → renderer-CCA_bQB8.js} +777 -707
- package/dist/renderer-DpTePxGq.js +5887 -0
- package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
- package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
- package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
- package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
- package/dist/three-d.mjs +678 -678
- package/dist/types/chart-ex.d.ts +5 -2
- package/dist/types/docx.d.ts +29 -7
- package/dist/types/index.d.ts +34 -11
- package/dist/types/node.d.ts +27 -5
- package/dist/types/pptx.d.ts +11 -7
- package/dist/types/region-map.d.ts +5 -2
- package/dist/types/three-d.d.ts +5 -2
- package/dist/types/xlsx.d.ts +10 -7
- package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
- package/dist/{workbook-model-source-DBfVsWj7.js → workbook-model-source-BHR8shXr.js} +6 -6
- package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
- package/dist/{xlsx-CD1VeDIg.js → xlsx-7aY3Pbvh.js} +44 -44
- package/dist/{xlsx-CCMRAxPB.js → xlsx-DTtDjzFq.js} +299 -299
- package/dist/{xlsx-model-source-udh7Q4WB.js → xlsx-model-source-DXKvb90T.js} +36 -36
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-B5HWxkbU.js +0 -16
- package/dist/assets/render-worker-Ba4LYMJd.js +0 -15
- package/dist/assets/render-worker-DkqinUC6.js +0 -35
- package/dist/renderer-xdugdcMd.js +0 -5769
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $r as e, Ar as t, ei as n, kr as r, ni as i, ti as a } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
2
|
import { f as o, o as s, s as c, t as l, u } from "./pixel-budget-DI82Hn3R.js";
|
|
3
3
|
var d = {
|
|
4
4
|
HEADER: 16385,
|
|
@@ -379,8 +379,8 @@ var w = class {
|
|
|
379
379
|
return [(r - a.left) * a.W / a.boundsW, (i - a.top) * a.H / a.boundsH];
|
|
380
380
|
}
|
|
381
381
|
drawImage(e, t) {
|
|
382
|
-
let
|
|
383
|
-
if (t.end - t.start < 24 + (
|
|
382
|
+
let r = (t.flags & 16384) != 0;
|
|
383
|
+
if (t.end - t.start < 24 + (r ? 8 : 16)) throw RangeError("Truncated EMF+ DrawImage");
|
|
384
384
|
let i = this.objects.get(t.flags & 255);
|
|
385
385
|
if (i?.kind !== "image") {
|
|
386
386
|
this.target.unsupported.add("EMF+ DrawImage of an unavailable image");
|
|
@@ -396,7 +396,7 @@ var w = class {
|
|
|
396
396
|
s(12),
|
|
397
397
|
s(16),
|
|
398
398
|
s(20)
|
|
399
|
-
], [f, p, m, h] =
|
|
399
|
+
], [f, p, m, h] = r ? [
|
|
400
400
|
0,
|
|
401
401
|
2,
|
|
402
402
|
4,
|
|
@@ -458,7 +458,7 @@ var w = class {
|
|
|
458
458
|
if (this.sourceCopy) try {
|
|
459
459
|
A.clearRect(Math.min(v, b), Math.min(y, x), Math.abs(b - v), Math.abs(x - y));
|
|
460
460
|
} catch {}
|
|
461
|
-
|
|
461
|
+
n(A, k, v, y, b, x) ? this.target.drew = !0 : this.target.unsupported.add("EMF+ DrawImage (the bitmap could not be drawn)");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}, T = {
|
|
@@ -1196,37 +1196,37 @@ function Je(e) {
|
|
|
1196
1196
|
e.moveTo(-1e7, -1e7), e.lineTo(1e7, -1e7), e.lineTo(1e7, 1e7), e.lineTo(-1e7, 1e7), e.closePath();
|
|
1197
1197
|
}
|
|
1198
1198
|
function Ye(e) {
|
|
1199
|
-
let t = e.u32(), n = e.u32(),
|
|
1199
|
+
let t = e.u32(), n = e.u32(), i = e.i32();
|
|
1200
1200
|
e.i32();
|
|
1201
|
-
let
|
|
1201
|
+
let a = e.u32();
|
|
1202
1202
|
return [t, {
|
|
1203
1203
|
kind: "pen",
|
|
1204
|
-
stroke: (n & 255) == 5 ? null : a
|
|
1205
|
-
width: Math.abs(
|
|
1204
|
+
stroke: (n & 255) == 5 ? null : r(a),
|
|
1205
|
+
width: Math.abs(i)
|
|
1206
1206
|
}];
|
|
1207
1207
|
}
|
|
1208
1208
|
function Xe(e) {
|
|
1209
1209
|
let t = e.u32();
|
|
1210
1210
|
e.skip(16);
|
|
1211
|
-
let n = e.u32(),
|
|
1211
|
+
let n = e.u32(), i = e.u32();
|
|
1212
1212
|
e.u32();
|
|
1213
|
-
let
|
|
1213
|
+
let a = e.u32();
|
|
1214
1214
|
return [t, {
|
|
1215
1215
|
kind: "pen",
|
|
1216
|
-
stroke: (n & 255) == 5 ? null : a
|
|
1217
|
-
width: Math.abs(
|
|
1216
|
+
stroke: (n & 255) == 5 ? null : r(a),
|
|
1217
|
+
width: Math.abs(i)
|
|
1218
1218
|
}];
|
|
1219
1219
|
}
|
|
1220
1220
|
function Ze(e) {
|
|
1221
|
-
let t = e.u32(), n = e.u32(),
|
|
1221
|
+
let t = e.u32(), n = e.u32(), i = e.u32();
|
|
1222
1222
|
return e.u32(), [t, {
|
|
1223
1223
|
kind: "brush",
|
|
1224
|
-
fill: n === 1 ? null :
|
|
1224
|
+
fill: n === 1 ? null : r(i)
|
|
1225
1225
|
}];
|
|
1226
1226
|
}
|
|
1227
|
-
function Qe(e, t, r, i,
|
|
1228
|
-
let c = e.pos -
|
|
1229
|
-
return
|
|
1227
|
+
function Qe(e, t, n, r, i, o, s) {
|
|
1228
|
+
let c = e.pos - n;
|
|
1229
|
+
return r < c || o < c ? null : a(t, n + r, i, n + o, s);
|
|
1230
1230
|
}
|
|
1231
1231
|
function $e(e, t, n) {
|
|
1232
1232
|
let r = e.u32();
|
|
@@ -1263,7 +1263,7 @@ function et(e, t, n) {
|
|
|
1263
1263
|
escapement: o
|
|
1264
1264
|
}];
|
|
1265
1265
|
}
|
|
1266
|
-
function tt(
|
|
1266
|
+
function tt(t, n, r, i) {
|
|
1267
1267
|
let a = n.pos + n.remaining;
|
|
1268
1268
|
if (n.remaining < 48) throw RangeError("Truncated EMF text record");
|
|
1269
1269
|
n.skip(16), n.u32(), n.f32(), n.f32();
|
|
@@ -1279,19 +1279,19 @@ function tt(e, n, r, i) {
|
|
|
1279
1279
|
p += String.fromCharCode(r.getUint16(t, !0));
|
|
1280
1280
|
}
|
|
1281
1281
|
if (p.length === 0) return;
|
|
1282
|
-
let m =
|
|
1282
|
+
let m = t.curFont, h = !1;
|
|
1283
1283
|
if (m?.charset === 2 && /[\uf000-\uf0ff]/.test(p)) {
|
|
1284
|
-
let n = d === 0 ?
|
|
1285
|
-
n === null ? Q(
|
|
1284
|
+
let n = d === 0 ? e(p, m.face, !0) : null;
|
|
1285
|
+
n === null ? Q(t, "EMR_EXTTEXTOUTW (unsupported symbol encoding)") : (p = n, h = !0), h && c > 1 && r.getUint32(i + f - 4, !0) !== 0 && Q(t, "EMR_EXTTEXTOUTW (symbol character advances)");
|
|
1286
1286
|
}
|
|
1287
|
-
let g = Math.abs(m?.height ?? 0) * Ce(
|
|
1287
|
+
let g = Math.abs(m?.height ?? 0) * Ce(t) * Math.abs(z(t)) * we(t);
|
|
1288
1288
|
if (!Number.isFinite(g) || g < 1) return;
|
|
1289
|
-
let { ctx: _ } =
|
|
1290
|
-
_.fillStyle =
|
|
1289
|
+
let { ctx: _ } = t, [v, y] = B(t, o, s);
|
|
1290
|
+
_.fillStyle = t.textColor;
|
|
1291
1291
|
let b = m && m.weight >= 700 ? "bold " : "";
|
|
1292
1292
|
_.font = `${m?.italic ? "italic " : ""}${b}${g}px ${h ? "serif" : m?.face || "sans-serif"}`;
|
|
1293
|
-
let x =
|
|
1294
|
-
_.textAlign = x === 2 ? "right" : x === 6 ? "center" : "left", _.textBaseline = (
|
|
1293
|
+
let x = t.textAlign & 6;
|
|
1294
|
+
_.textAlign = x === 2 ? "right" : x === 6 ? "center" : "left", _.textBaseline = (t.textAlign & 24) == 24 ? "alphabetic" : "top";
|
|
1295
1295
|
let S = m?.escapement ?? 0;
|
|
1296
1296
|
try {
|
|
1297
1297
|
if (S !== 0) {
|
|
@@ -1302,18 +1302,18 @@ function tt(e, n, r, i) {
|
|
|
1302
1302
|
_.restore();
|
|
1303
1303
|
}
|
|
1304
1304
|
} else _.fillText(p, v, y);
|
|
1305
|
-
|
|
1305
|
+
t.drew = !0;
|
|
1306
1306
|
} catch {}
|
|
1307
1307
|
}
|
|
1308
|
-
function nt(e, t,
|
|
1308
|
+
function nt(e, t, r, i, a, o, s, c, l, u, d, f) {
|
|
1309
1309
|
if (o === 0 || c === 0) return;
|
|
1310
|
-
let p = Qe(t,
|
|
1310
|
+
let p = Qe(t, r, i, a, o, s, c);
|
|
1311
1311
|
if (!p) {
|
|
1312
1312
|
e.unsupported.add("EMF bitmap (DIB encoding)");
|
|
1313
1313
|
return;
|
|
1314
1314
|
}
|
|
1315
1315
|
let [m, h] = B(e, l, u), [g, _] = B(e, d, f);
|
|
1316
|
-
|
|
1316
|
+
n(e.ctx, p, m, h, g, _) && (e.drew = !0);
|
|
1317
1317
|
}
|
|
1318
1318
|
function rt(e, t, n, r) {
|
|
1319
1319
|
t.skip(16);
|
|
@@ -1350,10 +1350,10 @@ function it(e, t, n, r) {
|
|
|
1350
1350
|
let u = t.i32(), d = t.i32();
|
|
1351
1351
|
nt(e, t, n, r, o, s, c, l, i, a, i + u, a + d);
|
|
1352
1352
|
}
|
|
1353
|
-
function at(
|
|
1353
|
+
function at(e, n, r, i, a = {}) {
|
|
1354
1354
|
let o = a;
|
|
1355
|
-
if (!e
|
|
1356
|
-
let s = new DataView(
|
|
1355
|
+
if (!t(e) || r <= 0 || i <= 0) return !1;
|
|
1356
|
+
let s = new DataView(e.buffer, e.byteOffset, e.byteLength), c = () => ({
|
|
1357
1357
|
ctx: n,
|
|
1358
1358
|
W: r,
|
|
1359
1359
|
H: i,
|
|
@@ -1395,20 +1395,20 @@ function at(t, n, r, i, a = {}) {
|
|
|
1395
1395
|
clipped: !1,
|
|
1396
1396
|
outerClipped: !1,
|
|
1397
1397
|
unsupported: /* @__PURE__ */ new Set()
|
|
1398
|
-
}), l = x(
|
|
1398
|
+
}), l = x(e), u = c();
|
|
1399
1399
|
if (l.play) {
|
|
1400
|
-
let
|
|
1401
|
-
if (ot(u,
|
|
1402
|
-
let
|
|
1400
|
+
let t = new w(u);
|
|
1401
|
+
if (ot(u, t, l.dual, s, e), t.drawFailed && l.dual) {
|
|
1402
|
+
let t = [...u.unsupported];
|
|
1403
1403
|
try {
|
|
1404
1404
|
n.clearRect(0, 0, r, i);
|
|
1405
1405
|
} catch {}
|
|
1406
|
-
u = c(), ot(u, null, !1, s,
|
|
1407
|
-
for (let
|
|
1406
|
+
u = c(), ot(u, null, !1, s, e);
|
|
1407
|
+
for (let e of t) u.unsupported.add(e);
|
|
1408
1408
|
}
|
|
1409
1409
|
} else {
|
|
1410
1410
|
if (!l.dual) for (let e of l.failures) u.unsupported.add(e);
|
|
1411
|
-
ot(u, null, !1, s,
|
|
1411
|
+
ot(u, null, !1, s, e);
|
|
1412
1412
|
}
|
|
1413
1413
|
return u.unsupported.size > 0 && a.onUnsupported?.([...u.unsupported]), u.drew;
|
|
1414
1414
|
}
|
|
@@ -1421,17 +1421,17 @@ function ot(e, t, n, r, i) {
|
|
|
1421
1421
|
for (let t = 0; t <= e.stack.length; t++) a.restore();
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
function st(e, t, n,
|
|
1424
|
+
function st(e, t, n, i, a) {
|
|
1425
1425
|
let s = e.ctx, c = 0;
|
|
1426
|
-
for (; c + 8 <=
|
|
1427
|
-
let l =
|
|
1428
|
-
if (u < 8 || u & 3 || c + u >
|
|
1426
|
+
for (; c + 8 <= a.length;) {
|
|
1427
|
+
let l = i.getUint32(c, !0), u = i.getUint32(c + 4, !0);
|
|
1428
|
+
if (u < 8 || u & 3 || c + u > a.length) {
|
|
1429
1429
|
e.unsupported.add("EMF record stream (truncated or invalid record size)");
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
1432
1432
|
let d = c + u;
|
|
1433
1433
|
if (l === T.EOF) break;
|
|
1434
|
-
let f = new DataView(
|
|
1434
|
+
let f = new DataView(i.buffer, i.byteOffset, d), p = new ne(f, c + 8, d);
|
|
1435
1435
|
if (t && l !== T.HEADER) {
|
|
1436
1436
|
if (l === T.GDICOMMENT) {
|
|
1437
1437
|
if (t.playComment(f, c, d), n && t.drawFailed) break;
|
|
@@ -1718,7 +1718,7 @@ function st(e, t, n, r, i) {
|
|
|
1718
1718
|
e.fillRule = p.u32() === 1 ? "evenodd" : "nonzero";
|
|
1719
1719
|
break;
|
|
1720
1720
|
case T.SETTEXTCOLOR:
|
|
1721
|
-
e.textColor =
|
|
1721
|
+
e.textColor = r(p.u32());
|
|
1722
1722
|
break;
|
|
1723
1723
|
case T.SETTEXTALIGN:
|
|
1724
1724
|
e.textAlign = p.u32();
|
|
@@ -1766,12 +1766,12 @@ function st(e, t, n, r, i) {
|
|
|
1766
1766
|
c = d;
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
|
-
async function ct(
|
|
1769
|
+
async function ct(e, n, r) {
|
|
1770
1770
|
let a = {
|
|
1771
1771
|
bitmap: null,
|
|
1772
1772
|
unsupported: []
|
|
1773
1773
|
};
|
|
1774
|
-
if (!e
|
|
1774
|
+
if (!t(e) || n <= 0 || r <= 0) return a;
|
|
1775
1775
|
let o = i(n, r);
|
|
1776
1776
|
if (!o) return a;
|
|
1777
1777
|
let s = o.getContext("2d");
|
|
@@ -1779,7 +1779,7 @@ async function ct(t, n, r) {
|
|
|
1779
1779
|
s.lineJoin = "round", s.lineCap = "round";
|
|
1780
1780
|
let c = [];
|
|
1781
1781
|
return {
|
|
1782
|
-
bitmap: at(
|
|
1782
|
+
bitmap: at(e, s, n, r, { onUnsupported: (e) => {
|
|
1783
1783
|
c = e;
|
|
1784
1784
|
} }) ? await createImageBitmap(o) : null,
|
|
1785
1785
|
unsupported: c
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e } from "./slide-pull-client-
|
|
2
|
-
import { Kr as t } from "./plot-area-frame-
|
|
1
|
+
import { m as e } from "./slide-pull-client-3g6TxaKa.js";
|
|
2
|
+
import { Kr as t } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
3
|
var n;
|
|
4
4
|
function r() {
|
|
5
5
|
return n ??= [
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./docx-
|
|
2
|
-
import { t } from "./pptx-
|
|
3
|
-
import { t as n } from "./xlsx-
|
|
1
|
+
import { t as e } from "./docx-DCCDnwrG.js";
|
|
2
|
+
import { t } from "./pptx-Ci1Y9SS_.js";
|
|
3
|
+
import { t as n } from "./xlsx-DTtDjzFq.js";
|
|
4
4
|
export { e as docx, t as pptx, n as xlsx };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./model-source-COXegBNA.js";
|
|
2
|
-
var t = "0.89.
|
|
2
|
+
var t = "0.89.8", n = class extends Error {
|
|
3
3
|
constructor(n, r) {
|
|
4
4
|
super(`Companion requires @silurus/ooxml ${n} (${r}); installed runtime is ${t} (${e})`), this.code = "companion-runtime-mismatch", this.name = "CompanionRuntimeMismatchError";
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
7
|
function r(e, t) {
|
|
8
|
-
if (e !== "0.89.
|
|
8
|
+
if (e !== "0.89.8" || t !== "ooxml-model-source-module/v2") throw new n(e, t);
|
|
9
9
|
}
|
|
10
10
|
export { n as CompanionRuntimeMismatchError, e as MODEL_SOURCE_MODULE_PROTOCOL, r as assertCompanionRuntime };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Io as e, Po as t } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
|
+
import { Bt as n, Vt as r, cn as i, in as a, sn as o, un as s } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
3
3
|
var c = /^\p{Cf}$/u, l = /^\s$/u, u = /^\p{M}$/u, d = /^\p{Script_Extensions=Arabic}$/u, f = /^(?=\p{Script=Arabic})\p{L}$/u;
|
|
4
4
|
function p(e, t) {
|
|
5
5
|
for (let n of t) if (!(l.test(n) || c.test(n))) switch (e) {
|
|
@@ -10,7 +10,7 @@ function p(e, t) {
|
|
|
10
10
|
function m(e, t, n) {
|
|
11
11
|
let r = [...new Set([
|
|
12
12
|
0,
|
|
13
|
-
...
|
|
13
|
+
...a(t),
|
|
14
14
|
t.length
|
|
15
15
|
])].sort((e, t) => e - t), i = r.slice(0, -1).map((i, a) => {
|
|
16
16
|
let o = r[a + 1], s = p(e, t.slice(i, o));
|
|
@@ -19,28 +19,28 @@ function m(e, t, n) {
|
|
|
19
19
|
end: o,
|
|
20
20
|
cls: s !== "neutral" && s !== "other" && n && !n(i, o) ? "other" : s
|
|
21
21
|
};
|
|
22
|
-
}),
|
|
23
|
-
for (;
|
|
24
|
-
if (i[
|
|
25
|
-
|
|
26
|
-
...i[
|
|
22
|
+
}), o = [], s = 0;
|
|
23
|
+
for (; s < i.length;) {
|
|
24
|
+
if (i[s].cls === "other") {
|
|
25
|
+
o.push({
|
|
26
|
+
...i[s],
|
|
27
27
|
inScope: !1
|
|
28
|
-
}),
|
|
28
|
+
}), s += 1;
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
|
-
let e =
|
|
31
|
+
let e = s;
|
|
32
32
|
for (; e < i.length && i[e].cls !== "other";) e += 1;
|
|
33
|
-
let t = i.slice(
|
|
34
|
-
for (let r =
|
|
35
|
-
let e = i[r],
|
|
36
|
-
|
|
33
|
+
let t = i.slice(s, e).some((e) => e.cls === "proof"), n = !1;
|
|
34
|
+
for (let r = s; r < e; r += 1) {
|
|
35
|
+
let e = i[r], a = t && (e.cls === "neutral" ? n : !0);
|
|
36
|
+
o.push({
|
|
37
37
|
...e,
|
|
38
|
-
inScope:
|
|
39
|
-
}), n =
|
|
38
|
+
inScope: a
|
|
39
|
+
}), n = a;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
s = e;
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return o;
|
|
44
44
|
}
|
|
45
45
|
function h(e, t, n) {
|
|
46
46
|
let r = m(e, t), i = r.some((e) => e.cls === "proof");
|
|
@@ -2701,7 +2701,7 @@ function q(e, t = {}) {
|
|
|
2701
2701
|
pendingLastWidth: 0,
|
|
2702
2702
|
naturalGapSum: 0,
|
|
2703
2703
|
gapCount: 0
|
|
2704
|
-
}, r = [], c = [], l = t.collect !== !1, u = t.segmentOffset ?? 0, d = t.lastDrawnSi ?? e.length - 1, f = t.isWhitespace ?? K, p = t.isGapChar ??
|
|
2704
|
+
}, r = [], c = [], l = t.collect !== !1, u = t.segmentOffset ?? 0, d = t.lastDrawnSi ?? e.length - 1, f = t.isWhitespace ?? K, p = t.isGapChar ?? s, m = (e) => t.gapWidth?.(e.si, e.off, e.cp ?? 0) ?? 1, h = (e, t = "space") => ({
|
|
2705
2705
|
kind: t,
|
|
2706
2706
|
codePoint: e.cp,
|
|
2707
2707
|
segIndex: e.si,
|
|
@@ -2709,18 +2709,24 @@ function q(e, t = {}) {
|
|
|
2709
2709
|
naturalPx: m(e),
|
|
2710
2710
|
trailing: e.off === e.len - 1
|
|
2711
2711
|
}), g = (e) => {
|
|
2712
|
-
let
|
|
2713
|
-
if (f > 0 && n.hasContent && n.pendingCount === 0 && u(
|
|
2714
|
-
...h(
|
|
2712
|
+
let s = n.last, u = (e) => e?.cp !== void 0 && e.cp !== 9, f = e.off === 0 && !e.ws && t.leadingGapWidth ? t.leadingGapWidth(e.si) : 0;
|
|
2713
|
+
if (f > 0 && n.hasContent && n.pendingCount === 0 && u(s) && u(e) && s.si !== d && (n.naturalGapSum += f, n.gapCount += 1, l && r.push({
|
|
2714
|
+
...h(s, "leading"),
|
|
2715
2715
|
naturalPx: f
|
|
2716
2716
|
})), e.ws) {
|
|
2717
|
-
n.hasContent && e.si !== d
|
|
2717
|
+
if (n.hasContent && e.si !== d) {
|
|
2718
|
+
if (t.seaClusterSpaceGaps && t.seaClusterGaps && n.pendingCount === 0 && s?.cp !== void 0 && i(s.cp) && s.si !== d) {
|
|
2719
|
+
let e = m(s);
|
|
2720
|
+
n.pendingWidth += e, n.pendingCount += 1, l && c.push(h(s, "boundary"));
|
|
2721
|
+
}
|
|
2722
|
+
n.pendingLastWidth = m(e), n.pendingWidth += n.pendingLastWidth, n.pendingCount += 1, l && c.push(h(e));
|
|
2723
|
+
}
|
|
2718
2724
|
return;
|
|
2719
2725
|
}
|
|
2720
2726
|
if (n.pendingCount > 0) {
|
|
2721
|
-
if (t.atomicSpaceGaps && e.cp !== void 0 && !
|
|
2727
|
+
if (t.atomicSpaceGaps && e.cp !== void 0 && !a(` ${String.fromCodePoint(e.cp)}`).includes(1) && (n.pendingWidth -= n.pendingLastWidth, --n.pendingCount, l && c.pop()), (!t.textCellSpaceGaps || u(s) && u(e)) && (n.naturalGapSum += n.pendingWidth, n.gapCount += n.pendingCount, l)) for (let e of c) r.push(e);
|
|
2722
2728
|
n.pendingWidth = 0, n.pendingCount = 0, n.pendingLastWidth = 0, c = [];
|
|
2723
|
-
} else
|
|
2729
|
+
} else s && s.si !== d && n.hasContent && !_ && (s.cp !== void 0 && p(s.cp) || e.cp !== void 0 && p(e.cp) || t.seaClusterGaps && s.cp !== void 0 && e.cp !== void 0 && i(s.cp) && i(e.cp) && !o(e.cp)) && (n.naturalGapSum += m(s), n.gapCount += 1, l && r.push(h(s, "boundary")));
|
|
2724
2730
|
n.hasContent = !0, n.last = e;
|
|
2725
2731
|
}, _ = (t.prefix?.pendingCount ?? 0) > 0;
|
|
2726
2732
|
for (let n = t.firstContentSi ?? 0; n < e.length; n++) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./cfb-guard-
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./cfb-guard-DzYlucez.js";
|
|
2
|
+
import { K as t } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
3
3
|
import { i as n, n as r, o as i } from "./model-source-COXegBNA.js";
|
|
4
4
|
async function a(a, s, c, l, u = (e) => t(e) ?? e) {
|
|
5
5
|
let d = a instanceof Uint8Array ? a : new Uint8Array(a), f = c.source === void 0 ? void 0 : i([c.source], s, d);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as e, K as t, P as n, U as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
2
2
|
import { n as i } from "./abort-JztSoyw2.js";
|
|
3
|
-
import { b as a } from "./worksheet-pull-client-
|
|
3
|
+
import { b as a } from "./worksheet-pull-client-BudfclVl.js";
|
|
4
4
|
import { a as o } from "./model-source-COXegBNA.js";
|
|
5
5
|
import { t as s } from "./host-layout-Cz_lCuTZ.js";
|
|
6
6
|
var c = [
|
|
@@ -21,45 +21,45 @@ function u(e) {
|
|
|
21
21
|
let [t] = Object.keys(e);
|
|
22
22
|
if (t !== void 0) throw TypeError(`unsupported XLSX model source view default: ${t}`);
|
|
23
23
|
}
|
|
24
|
-
function d(
|
|
25
|
-
let
|
|
24
|
+
function d(e, t) {
|
|
25
|
+
let n = e(), i = t();
|
|
26
26
|
return {
|
|
27
|
-
workbook:
|
|
28
|
-
usage: i === void 0 ? void 0 :
|
|
27
|
+
workbook: n,
|
|
28
|
+
usage: i === void 0 ? void 0 : r(i)
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
var f = "XLSX workbook session was aborted";
|
|
32
|
-
function p(
|
|
32
|
+
function p(r, o = {}) {
|
|
33
33
|
let s;
|
|
34
34
|
try {
|
|
35
|
-
let
|
|
36
|
-
if (!Number.isSafeInteger(
|
|
37
|
-
let c =
|
|
38
|
-
s = new
|
|
35
|
+
let t = a(o);
|
|
36
|
+
if (!Number.isSafeInteger(r.sourceByteLength) || r.sourceByteLength < 0) throw RangeError("XLSX sourceByteLength must be a non-negative safe integer");
|
|
37
|
+
let c = e(o);
|
|
38
|
+
s = new n({
|
|
39
39
|
enabled: c.debug || c.onResourceMetrics !== void 0,
|
|
40
40
|
format: "xlsx",
|
|
41
41
|
mode: "node",
|
|
42
42
|
scope: "session",
|
|
43
43
|
policy: c.policy,
|
|
44
|
-
formatLimits: { xlsxWorksheetLimits: { ...
|
|
44
|
+
formatLimits: { xlsxWorksheetLimits: { ...t.worksheet } },
|
|
45
45
|
onMetrics: c.onResourceMetrics,
|
|
46
46
|
emitToConsole: c.debug
|
|
47
|
-
}), s.setSourceBytes(
|
|
48
|
-
let l =
|
|
49
|
-
return
|
|
47
|
+
}), s.setSourceBytes(r.sourceByteLength), i(o.signal, f);
|
|
48
|
+
let l = r.archive, { workbook: u, usage: p } = d(() => JSON.parse(new TextDecoder().decode(l.parse())), () => l.resource_usage?.());
|
|
49
|
+
return r.layoutMetrics && (u.layoutMetrics = { maximumDigitWidth: r.layoutMetrics.maximumDigitWidth }), s.observeUsage(p), s.checkpoint("workbook index ready"), {
|
|
50
50
|
archive: l,
|
|
51
51
|
workbookIndex: u,
|
|
52
52
|
usage: p,
|
|
53
53
|
metrics: s,
|
|
54
|
-
worksheetPolicy:
|
|
55
|
-
closeArchive: () =>
|
|
54
|
+
worksheetPolicy: t,
|
|
55
|
+
closeArchive: () => r.closeArchive()
|
|
56
56
|
};
|
|
57
|
-
} catch (
|
|
57
|
+
} catch (e) {
|
|
58
58
|
try {
|
|
59
|
-
|
|
59
|
+
r.closeArchive();
|
|
60
60
|
} catch {}
|
|
61
|
-
let
|
|
62
|
-
throw s?.fail(
|
|
61
|
+
let n = t(e) ?? e;
|
|
62
|
+
throw s?.fail(n), n;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
export { p as acquireXlsxSessionFromArchive, s as configureHostLayout, l as validateXlsxModelSourceArchive, u as validateXlsxModelSourceViewDefaults };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e } from "./slide-pull-client-
|
|
2
|
-
import {
|
|
1
|
+
import { a as e } from "./slide-pull-client-3g6TxaKa.js";
|
|
2
|
+
import { G as t, I as n, P as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
3
3
|
import { n as i } from "./abort-JztSoyw2.js";
|
|
4
4
|
import { a } from "./model-source-COXegBNA.js";
|
|
5
5
|
var o = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as e, K as t, P as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
2
2
|
import { n as r } from "./abort-JztSoyw2.js";
|
|
3
3
|
import { a as i } from "./model-source-COXegBNA.js";
|
|
4
4
|
import { t as a } from "./in-process-pull-transport-BPJ7M0uC.js";
|
|
5
|
-
import { n as o, r as s, t as c } from "./document-pull-worker-
|
|
5
|
+
import { n as o, r as s, t as c } from "./document-pull-worker-hMKJ5RdB.js";
|
|
6
6
|
var l = [
|
|
7
7
|
"open_document_cursor",
|
|
8
8
|
"pull_document_chunk",
|
package/dist/node.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Co as e, wo as t } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
2
|
import { f as n, u as r } from "./pixel-budget-DI82Hn3R.js";
|
|
3
|
-
import { n as i, r as a } from "./pptx-
|
|
4
|
-
import { n as o, r as s } from "./docx-
|
|
5
|
-
import { n as c, r as l, t as u } from "./render-
|
|
6
|
-
import { a as d, i as f, n as p, r as m } from "./xlsx-
|
|
3
|
+
import { n as i, r as a } from "./pptx-C1CiFW1D.js";
|
|
4
|
+
import { n as o, r as s } from "./docx-G7pt7ajR.js";
|
|
5
|
+
import { n as c, r as l, t as u } from "./render-Bf_Gywxw.js";
|
|
6
|
+
import { a as d, i as f, n as p, r as m } from "./xlsx-7aY3Pbvh.js";
|
|
7
7
|
export { r as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, u as installImageBitmapShim, c as installOffscreenCanvasShim, n as isOoxmlDecodedImageLimitError, o as materializeDocxDocument, i as materializePptxPresentation, p as materializeXlsxWorkbook, m as materializeXlsxWorkbookIndex, f as materializeXlsxWorksheet, s as openDocxDocument, a as openPptxPresentation, d as openXlsxWorkbook, l as renderSlideNode };
|