kordoc 4.18.4 → 4.18.5
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/{-DDAVBMHD.js → -3HZVXMPX.js} +11 -11
- package/dist/{chunk-ELOPDQES.js → chunk-235UD74F.js} +2 -2
- package/dist/{chunk-KUUSP6OS.js → chunk-2CRD4Q76.js} +140 -10
- package/dist/{chunk-MXA6YW2W.js.map → chunk-2CRD4Q76.js.map} +1 -1
- package/dist/{chunk-OIUSF2VA.cjs → chunk-2UY3FG26.cjs} +12 -12
- package/dist/{chunk-OIUSF2VA.cjs.map → chunk-2UY3FG26.cjs.map} +1 -1
- package/dist/{chunk-LGF2IO66.js → chunk-33YID2RV.js} +2 -2
- package/dist/{chunk-RCI7LY4N.js → chunk-5SWBC7HH.js} +4 -4
- package/dist/{chunk-HRJJDNRD.js → chunk-BFFAHFG5.js} +2 -2
- package/dist/{chunk-QVCHFCT2.js → chunk-BXSMPCT5.js} +2 -2
- package/dist/{chunk-DUV7Y6IQ.js → chunk-DV7DQEYU.js} +3 -3
- package/dist/{chunk-3XSP7V5P.cjs → chunk-EFVBB45E.cjs} +2 -2
- package/dist/{chunk-3XSP7V5P.cjs.map → chunk-EFVBB45E.cjs.map} +1 -1
- package/dist/{chunk-SVNBZEL6.cjs → chunk-FBY574Q5.cjs} +3 -3
- package/dist/{chunk-SVNBZEL6.cjs.map → chunk-FBY574Q5.cjs.map} +1 -1
- package/dist/{chunk-IBQCK4F3.js → chunk-FYJDRO4B.js} +3 -3
- package/dist/{chunk-4IBY5LTJ.js → chunk-GYUV53LM.js} +2 -2
- package/dist/{chunk-AVIZ55NQ.cjs → chunk-H4NV5KRM.cjs} +3 -3
- package/dist/{chunk-AVIZ55NQ.cjs.map → chunk-H4NV5KRM.cjs.map} +1 -1
- package/dist/{chunk-V5X4LLVM.js → chunk-KDKPSX4V.js} +6 -6
- package/dist/{chunk-IAXGGQGD.js → chunk-L2K45SOK.js} +2 -2
- package/dist/{chunk-3WLZOJIE.cjs → chunk-MU7XW5KO.cjs} +6 -6
- package/dist/{chunk-3WLZOJIE.cjs.map → chunk-MU7XW5KO.cjs.map} +1 -1
- package/dist/{chunk-274ZPMHK.js → chunk-N7GNBY2F.js} +2 -2
- package/dist/{chunk-T2BJPT6D.js → chunk-OFSMOXS4.js} +2 -2
- package/dist/{chunk-TMJVD6FW.js → chunk-OLCBIT3I.js} +2 -2
- package/dist/{chunk-XG4SYOZL.js → chunk-PQ2ER3VQ.js} +2 -2
- package/dist/{chunk-F5YVCJVF.js → chunk-QAE2NVVO.js} +2 -2
- package/dist/{chunk-YCY2R4FM.js → chunk-U4SBX3B5.js} +2 -2
- package/dist/{chunk-E2644XCO.cjs → chunk-XGIUYCXI.cjs} +91 -41
- package/dist/chunk-XGIUYCXI.cjs.map +1 -0
- package/dist/{chunk-F2GDLA45.js → chunk-XNIVXYIZ.js} +10 -10
- package/dist/{chunk-VTVK2JMI.js → chunk-XSCQQ74A.js} +2 -2
- package/dist/{chunk-Z2PPDQK2.js → chunk-XTB2IERG.js} +2 -2
- package/dist/{chunk-MXA6YW2W.js → chunk-YON3IOC3.js} +60 -90
- package/dist/{chunk-KUUSP6OS.js.map → chunk-YON3IOC3.js.map} +1 -1
- package/dist/{chunk-7GR2GCJF.js → chunk-ZH5Y3JT6.js} +2 -2
- package/dist/chunks-ONP3Z3Z2.js +10 -0
- package/dist/cli.js +33 -27
- package/dist/cli.js.map +1 -1
- package/dist/{formula-YYJQBKEN.cjs → formula-DTPPV22Y.cjs} +9 -9
- package/dist/{formula-YYJQBKEN.cjs.map → formula-DTPPV22Y.cjs.map} +1 -1
- package/dist/{formula-HQFZEXFF.js → formula-EJQ6SI4B.js} +3 -3
- package/dist/{formula-7ZOZ5QJ6.js → formula-FFC3PUFZ.js} +4 -4
- package/dist/{image-ocr-CC26Q5KG.cjs → image-ocr-6JWCKPMH.cjs} +15 -15
- package/dist/{image-ocr-CC26Q5KG.cjs.map → image-ocr-6JWCKPMH.cjs.map} +1 -1
- package/dist/{image-ocr-RK3HJVCI.js → image-ocr-7KNVEPI5.js} +9 -9
- package/dist/{image-ocr-4BGX2EJJ.js → image-ocr-RCNFR4ET.js} +6 -6
- package/dist/index.cjs +277 -277
- package/dist/index.js +5 -5
- package/dist/mcp.js +22 -22
- package/dist/{model-bundle-VHRXG63R.js → model-bundle-NULKJLSH.js} +5 -5
- package/dist/{models-G3WA24SY.js → models-3TJW4OTW.js} +5 -5
- package/dist/{parser-GFDGAVLV.js → parser-2YBNBFSA.js} +8 -8
- package/dist/{parser-BGORCLIU.cjs → parser-NDX6SCHX.cjs} +126 -126
- package/dist/{parser-BGORCLIU.cjs.map → parser-NDX6SCHX.cjs.map} +1 -1
- package/dist/{parser-SOWTUOMK.js → parser-UL67LFWP.js} +11 -11
- package/dist/pdf-ocr-E5MEIMJO.cjs +17 -0
- package/dist/{pdf-ocr-EJ2HNZN6.cjs.map → pdf-ocr-E5MEIMJO.cjs.map} +1 -1
- package/dist/pdf-ocr-QPBJBELT.js +20 -0
- package/dist/pdf-ocr-RQ6FN3GA.js +16 -0
- package/dist/{profile-io-Q2T47RVH.js → profile-io-YVU5YX57.js} +3 -3
- package/dist/{rasterize-OAVMUTE6.js → rasterize-JLMPBFFB.js} +3 -3
- package/dist/{redact-doc-ECFOVR4X.js → redact-doc-PH37VIKN.js} +11 -11
- package/dist/{render-NSKWZVTD.js → render-E6K2EZZZ.js} +7 -7
- package/dist/seal-TJOKACHN.js +10 -0
- package/dist/{setup-REH2KZP2.js → setup-MRNDUCQQ.js} +3 -3
- package/dist/visual-T2YKRHW3.js +20 -0
- package/dist/{watch-JXDUZYBY.js → watch-ZGBBBTBH.js} +12 -12
- package/package.json +1 -1
- package/dist/chunk-E2644XCO.cjs.map +0 -1
- package/dist/chunks-5QTTAT5T.js +0 -10
- package/dist/pdf-ocr-7IOOVR2I.js +0 -20
- package/dist/pdf-ocr-EJ2HNZN6.cjs +0 -17
- package/dist/pdf-ocr-RACAZU3N.js +0 -16
- package/dist/seal-A4MG7MPQ.js +0 -10
- package/dist/visual-B56WQAGW.js +0 -20
- /package/dist/{-DDAVBMHD.js.map → -3HZVXMPX.js.map} +0 -0
- /package/dist/{chunk-ELOPDQES.js.map → chunk-235UD74F.js.map} +0 -0
- /package/dist/{chunk-LGF2IO66.js.map → chunk-33YID2RV.js.map} +0 -0
- /package/dist/{chunk-RCI7LY4N.js.map → chunk-5SWBC7HH.js.map} +0 -0
- /package/dist/{chunk-HRJJDNRD.js.map → chunk-BFFAHFG5.js.map} +0 -0
- /package/dist/{chunk-QVCHFCT2.js.map → chunk-BXSMPCT5.js.map} +0 -0
- /package/dist/{chunk-DUV7Y6IQ.js.map → chunk-DV7DQEYU.js.map} +0 -0
- /package/dist/{chunk-IBQCK4F3.js.map → chunk-FYJDRO4B.js.map} +0 -0
- /package/dist/{chunk-4IBY5LTJ.js.map → chunk-GYUV53LM.js.map} +0 -0
- /package/dist/{chunk-V5X4LLVM.js.map → chunk-KDKPSX4V.js.map} +0 -0
- /package/dist/{chunk-IAXGGQGD.js.map → chunk-L2K45SOK.js.map} +0 -0
- /package/dist/{chunk-274ZPMHK.js.map → chunk-N7GNBY2F.js.map} +0 -0
- /package/dist/{chunk-T2BJPT6D.js.map → chunk-OFSMOXS4.js.map} +0 -0
- /package/dist/{chunk-TMJVD6FW.js.map → chunk-OLCBIT3I.js.map} +0 -0
- /package/dist/{chunk-XG4SYOZL.js.map → chunk-PQ2ER3VQ.js.map} +0 -0
- /package/dist/{chunk-F5YVCJVF.js.map → chunk-QAE2NVVO.js.map} +0 -0
- /package/dist/{chunk-YCY2R4FM.js.map → chunk-U4SBX3B5.js.map} +0 -0
- /package/dist/{chunk-F2GDLA45.js.map → chunk-XNIVXYIZ.js.map} +0 -0
- /package/dist/{chunk-VTVK2JMI.js.map → chunk-XSCQQ74A.js.map} +0 -0
- /package/dist/{chunk-Z2PPDQK2.js.map → chunk-XTB2IERG.js.map} +0 -0
- /package/dist/{chunk-7GR2GCJF.js.map → chunk-ZH5Y3JT6.js.map} +0 -0
- /package/dist/{chunks-5QTTAT5T.js.map → chunks-ONP3Z3Z2.js.map} +0 -0
- /package/dist/{formula-HQFZEXFF.js.map → formula-EJQ6SI4B.js.map} +0 -0
- /package/dist/{formula-7ZOZ5QJ6.js.map → formula-FFC3PUFZ.js.map} +0 -0
- /package/dist/{image-ocr-RK3HJVCI.js.map → image-ocr-7KNVEPI5.js.map} +0 -0
- /package/dist/{image-ocr-4BGX2EJJ.js.map → image-ocr-RCNFR4ET.js.map} +0 -0
- /package/dist/{model-bundle-VHRXG63R.js.map → model-bundle-NULKJLSH.js.map} +0 -0
- /package/dist/{models-G3WA24SY.js.map → models-3TJW4OTW.js.map} +0 -0
- /package/dist/{parser-GFDGAVLV.js.map → parser-2YBNBFSA.js.map} +0 -0
- /package/dist/{parser-SOWTUOMK.js.map → parser-UL67LFWP.js.map} +0 -0
- /package/dist/{pdf-ocr-7IOOVR2I.js.map → pdf-ocr-QPBJBELT.js.map} +0 -0
- /package/dist/{pdf-ocr-RACAZU3N.js.map → pdf-ocr-RQ6FN3GA.js.map} +0 -0
- /package/dist/{profile-io-Q2T47RVH.js.map → profile-io-YVU5YX57.js.map} +0 -0
- /package/dist/{rasterize-OAVMUTE6.js.map → rasterize-JLMPBFFB.js.map} +0 -0
- /package/dist/{redact-doc-ECFOVR4X.js.map → redact-doc-PH37VIKN.js.map} +0 -0
- /package/dist/{render-NSKWZVTD.js.map → render-E6K2EZZZ.js.map} +0 -0
- /package/dist/{seal-A4MG7MPQ.js.map → seal-TJOKACHN.js.map} +0 -0
- /package/dist/{setup-REH2KZP2.js.map → setup-MRNDUCQQ.js.map} +0 -0
- /package/dist/{visual-B56WQAGW.js.map → visual-T2YKRHW3.js.map} +0 -0
- /package/dist/{watch-JXDUZYBY.js.map → watch-ZGBBBTBH.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToMarkdown
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PQ2ER3VQ.js";
|
|
4
4
|
|
|
5
5
|
// src/page-markdown.ts
|
|
6
6
|
function blocksToPages(blocks, render = blocksToMarkdown) {
|
|
@@ -167,4 +167,4 @@ export {
|
|
|
167
167
|
inlineImagesIntoMarkdown,
|
|
168
168
|
blocksToPages
|
|
169
169
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-N7GNBY2F.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
KordocError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QAE2NVVO.js";
|
|
5
5
|
|
|
6
6
|
// src/hwpx/profile-io.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -89,4 +89,4 @@ export {
|
|
|
89
89
|
formatProfileSchema,
|
|
90
90
|
parseFormatProfileJson
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-OFSMOXS4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
visibleText
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XSCQQ74A.js";
|
|
5
5
|
|
|
6
6
|
// src/script-tags.ts
|
|
7
7
|
var LITERAL_TAG = /<(?=\/?(?:u|sup|sub)>)/g;
|
|
@@ -274,4 +274,4 @@ export {
|
|
|
274
274
|
HEADING_RATIO_H2,
|
|
275
275
|
HEADING_RATIO_H3
|
|
276
276
|
};
|
|
277
|
-
//# sourceMappingURL=chunk-
|
|
277
|
+
//# sourceMappingURL=chunk-OLCBIT3I.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
escapeHtml,
|
|
3
3
|
sanitizeHref
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZH5Y3JT6.js";
|
|
5
5
|
|
|
6
6
|
// src/script-tags.ts
|
|
7
7
|
var LITERAL_TAG = /<(?=\/?(?:u|sup|sub)>)/g;
|
|
@@ -1242,4 +1242,4 @@ export {
|
|
|
1242
1242
|
HEADING_RATIO_H2,
|
|
1243
1243
|
HEADING_RATIO_H3
|
|
1244
1244
|
};
|
|
1245
|
-
//# sourceMappingURL=chunk-
|
|
1245
|
+
//# sourceMappingURL=chunk-PQ2ER3VQ.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/utils.ts
|
|
4
4
|
import { format } from "util";
|
|
5
|
-
var VERSION = true ? "4.18.
|
|
5
|
+
var VERSION = true ? "4.18.5" : "0.0.0-dev";
|
|
6
6
|
function toArrayBuffer(buf) {
|
|
7
7
|
if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
|
|
8
8
|
return buf.buffer;
|
|
@@ -170,4 +170,4 @@ export {
|
|
|
170
170
|
classifyError,
|
|
171
171
|
partExtension
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-QAE2NVVO.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
blocksToMarkdown
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XSCQQ74A.js";
|
|
5
5
|
|
|
6
6
|
// src/chunks.ts
|
|
7
7
|
var LIST_MARKER_RE = /^(?:[□■◇◆○◎●◦ㅇ•▪▸▶※-]|\d{1,3}[.)]|[가나다라마바사아자차카타파하][.)]|\([가나다라마바사아자차카타파하0-9]{1,3}\)|[①-⑳㉮-㉻㈎-㈛])\s/;
|
|
@@ -79,4 +79,4 @@ function blocksToChunks(blocks, options) {
|
|
|
79
79
|
export {
|
|
80
80
|
blocksToChunks
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-U4SBX3B5.js.map
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkMU7XW5KOcjs = require('./chunk-MU7XW5KO.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkH4NV5KRMcjs = require('./chunk-H4NV5KRM.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkEFVBB45Ecjs = require('./chunk-EFVBB45E.cjs');
|
|
16
16
|
|
|
17
17
|
// src/ocr/models.ts
|
|
18
18
|
var _path = require('path');
|
|
@@ -40,10 +40,10 @@ var OCR_REC_DICT = {
|
|
|
40
40
|
};
|
|
41
41
|
var ALL_OCR_MODELS = [OCR_DET_MODEL, OCR_REC_MODEL, OCR_REC_DICT];
|
|
42
42
|
function getOcrModelsDir() {
|
|
43
|
-
return
|
|
43
|
+
return _chunkH4NV5KRMcjs.getModelsDir.call(void 0, "ppocr");
|
|
44
44
|
}
|
|
45
45
|
async function ensureOcrModels(onProgress) {
|
|
46
|
-
return
|
|
46
|
+
return _chunkH4NV5KRMcjs.ensureModelsIn.call(void 0, getOcrModelsDir(), ALL_OCR_MODELS, onProgress);
|
|
47
47
|
}
|
|
48
48
|
async function ocrModelsCached() {
|
|
49
49
|
const dir = getOcrModelsDir();
|
|
@@ -2091,7 +2091,7 @@ function tagScripts(text, lines) {
|
|
|
2091
2091
|
const [s, e, kind] = marks[m];
|
|
2092
2092
|
out = out.slice(0, s) + `<${kind}>` + out.slice(s, e) + `</${kind}>` + out.slice(e);
|
|
2093
2093
|
}
|
|
2094
|
-
return
|
|
2094
|
+
return _chunkMU7XW5KOcjs.tidyScriptTags.call(void 0, out);
|
|
2095
2095
|
}
|
|
2096
2096
|
|
|
2097
2097
|
// src/pdf/line-wrap.ts
|
|
@@ -3644,9 +3644,9 @@ function detectHeadings(blocks, medianFontSize) {
|
|
|
3644
3644
|
if (/^\d+$/.test(text) && !isChapterNumber(block, blocks[bi + 1], medianFontSize)) continue;
|
|
3645
3645
|
const ratio = block.style.fontSize / medianFontSize;
|
|
3646
3646
|
let level = 0;
|
|
3647
|
-
if (ratio >=
|
|
3648
|
-
else if (ratio >=
|
|
3649
|
-
else if (ratio >=
|
|
3647
|
+
if (ratio >= _chunkMU7XW5KOcjs.HEADING_RATIO_H1) level = 1;
|
|
3648
|
+
else if (ratio >= _chunkMU7XW5KOcjs.HEADING_RATIO_H2) level = 2;
|
|
3649
|
+
else if (ratio >= _chunkMU7XW5KOcjs.HEADING_RATIO_H3) level = 3;
|
|
3650
3650
|
if (level > 0) {
|
|
3651
3651
|
block.type = "heading";
|
|
3652
3652
|
block.level = level;
|
|
@@ -3659,7 +3659,7 @@ function isChapterNumber(block, next, medianFontSize) {
|
|
|
3659
3659
|
const nextSize = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _96 => _96.style, 'optionalAccess', _97 => _97.fontSize]), () => ( 0));
|
|
3660
3660
|
const text = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _98 => _98.text, 'optionalAccess', _99 => _99.trim, 'call', _100 => _100()]), () => ( ""));
|
|
3661
3661
|
const a = block.bbox, b = _optionalChain([next, 'optionalAccess', _101 => _101.bbox]);
|
|
3662
|
-
return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _102 => _102.text, 'optionalAccess', _103 => _103.trim, 'call', _104 => _104()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize *
|
|
3662
|
+
return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _102 => _102.text, 'optionalAccess', _103 => _103.trim, 'call', _104 => _104()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize * _chunkMU7XW5KOcjs.HEADING_RATIO_H1 && text.length > 0 && text.length <= 80 && !/^[\d\s.]+$/.test(text) && !!a && !!b && a.y > b.y && a.y - (b.y + b.height) <= size * 2;
|
|
3663
3663
|
}
|
|
3664
3664
|
function mergeStackedHeadingLines(blocks, medianFontSize) {
|
|
3665
3665
|
for (let i = 0; i < blocks.length - 1; ) {
|
|
@@ -5959,16 +5959,16 @@ function isProseSpread(items) {
|
|
|
5959
5959
|
for (let i = 1; i < sorted.length; i++) {
|
|
5960
5960
|
gaps.push(sorted[i].x - (sorted[i - 1].x + sorted[i - 1].w));
|
|
5961
5961
|
}
|
|
5962
|
-
const maxGap =
|
|
5962
|
+
const maxGap = _chunkEFVBB45Ecjs.safeMax.call(void 0, gaps);
|
|
5963
5963
|
const avgLen = items.reduce((s, i) => s + i.text.length, 0) / items.length;
|
|
5964
5964
|
if (items.length >= 4 && maxGap < 40 && avgLen < 5) return true;
|
|
5965
|
-
const minGap =
|
|
5965
|
+
const minGap = _chunkEFVBB45Ecjs.safeMin.call(void 0, gaps);
|
|
5966
5966
|
return minGap > 0 && maxGap - minGap <= Math.max(2, maxGap * 0.15) && items.filter((i) => /^\P{L}*\p{Ll}/u.test(i.text)).length * 2 >= items.length;
|
|
5967
5967
|
}
|
|
5968
5968
|
function detectColumns(yLines) {
|
|
5969
5969
|
const allItems = yLines.flat();
|
|
5970
5970
|
if (allItems.length === 0) return null;
|
|
5971
|
-
const pageWidth =
|
|
5971
|
+
const pageWidth = _chunkEFVBB45Ecjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunkEFVBB45Ecjs.safeMin.call(void 0, allItems.map((i) => i.x));
|
|
5972
5972
|
if (pageWidth < 100) return null;
|
|
5973
5973
|
let bigoLineIdx = -1;
|
|
5974
5974
|
for (let i = 0; i < yLines.length; i++) {
|
|
@@ -6438,12 +6438,12 @@ function recordClipCellEdges(grids, horizontals, verticals, nonRules) {
|
|
|
6438
6438
|
}
|
|
6439
6439
|
function takeClipCellEdges(from, to) {
|
|
6440
6440
|
const e = CLIP_CELL_EDGES.get(from);
|
|
6441
|
-
if (e)
|
|
6441
|
+
if (e) _chunkMU7XW5KOcjs.CELL_EDGES.set(to, e);
|
|
6442
6442
|
}
|
|
6443
6443
|
function joinCellEdges(a, b) {
|
|
6444
|
-
const u =
|
|
6444
|
+
const u = _chunkMU7XW5KOcjs.CELL_EDGES.get(a), d = _chunkMU7XW5KOcjs.CELL_EDGES.get(b);
|
|
6445
6445
|
if (!u || !d) return;
|
|
6446
|
-
|
|
6446
|
+
_chunkMU7XW5KOcjs.CELL_EDGES.set(a, { t: u.t, b: d.b, l: u.l || d.l, r: u.r || d.r });
|
|
6447
6447
|
}
|
|
6448
6448
|
|
|
6449
6449
|
// src/pdf/table-unit-row.ts
|
|
@@ -6459,7 +6459,7 @@ function rebuildUnitLine(items, grid) {
|
|
|
6459
6459
|
function prependUnitRow(cells, cols, line, usedItems) {
|
|
6460
6460
|
const text = cleanCellText(line.map((item) => item.text).join(""));
|
|
6461
6461
|
cells.unshift(Array.from({ length: cols }, (_, c) => ({ text: c === 0 ? text : "", colSpan: c === 0 ? cols : 1, rowSpan: 1 })));
|
|
6462
|
-
for (const cell of cells[0])
|
|
6462
|
+
for (const cell of cells[0]) _chunkMU7XW5KOcjs.CELL_EDGES.set(cell, NO_EDGES);
|
|
6463
6463
|
for (const item of line) usedItems.add(item);
|
|
6464
6464
|
}
|
|
6465
6465
|
function attachUnitRow(items, grid, cells, cols, usedItems) {
|
|
@@ -6901,12 +6901,61 @@ function frameLayoutBoxes(blocks) {
|
|
|
6901
6901
|
}
|
|
6902
6902
|
return boxes;
|
|
6903
6903
|
}
|
|
6904
|
+
function takeFrameSpanningText(items, cutX, pageNum, lex) {
|
|
6905
|
+
let minX = Infinity, maxR = -Infinity;
|
|
6906
|
+
for (const item of items) {
|
|
6907
|
+
minX = Math.min(minX, item.x);
|
|
6908
|
+
maxR = Math.max(maxR, item.x + item.w);
|
|
6909
|
+
}
|
|
6910
|
+
const span = maxR - minX;
|
|
6911
|
+
const rows = groupByY([...items].sort((a, b) => b.y - a.y || a.x - b.x)).map((line) => {
|
|
6912
|
+
const runs = [];
|
|
6913
|
+
for (const item of [...line].sort((a, b) => a.x - b.x)) {
|
|
6914
|
+
const run = runs[runs.length - 1], prev = _optionalChain([run, 'optionalAccess', _315 => _315[run.length - 1]]);
|
|
6915
|
+
if (prev && item.x - (prev.x + prev.w) <= Math.max(prev.fontSize, item.fontSize) * 0.6) run.push(item);
|
|
6916
|
+
else runs.push([item]);
|
|
6917
|
+
}
|
|
6918
|
+
return runs;
|
|
6919
|
+
});
|
|
6920
|
+
const taken = /* @__PURE__ */ new Set(), blocks = [];
|
|
6921
|
+
for (let r = 0; r < rows.length; r++) for (const run of rows[r]) {
|
|
6922
|
+
if (taken.has(run[0]) || run[0].x >= cutX || Math.max(...run.map((i) => i.x + i.w)) <= cutX) continue;
|
|
6923
|
+
const lines = [run], fs = Math.max(...run.map((i) => i.fontSize));
|
|
6924
|
+
const left = run[0].x, right = Math.max(...run.map((i) => i.x + i.w));
|
|
6925
|
+
if (right - left < span * 0.75) continue;
|
|
6926
|
+
let prevY = run[0].y;
|
|
6927
|
+
for (let next = r + 1; next < rows.length && rows[next].length === 1; next++) {
|
|
6928
|
+
const tail = rows[next][0], y = tail[0].y;
|
|
6929
|
+
if (taken.has(tail[0]) || prevY - y > fs * 1.8 || tail[0].x < left - 1 || tail[0].x > left + fs * 2 || tail.some((i) => Math.abs(i.fontSize - fs) > fs * 0.15) || Math.max(...tail.map((i) => i.x + i.w)) > right + 1) break;
|
|
6930
|
+
lines.push(tail);
|
|
6931
|
+
prevY = y;
|
|
6932
|
+
}
|
|
6933
|
+
for (const line of lines) for (const item of line) taken.add(item);
|
|
6934
|
+
pushLineParagraphs(blocks, mergeSuperscriptLines(lines), pageNum, lex);
|
|
6935
|
+
}
|
|
6936
|
+
let keep = 0;
|
|
6937
|
+
for (const item of items) if (!taken.has(item)) items[keep++] = item;
|
|
6938
|
+
items.length = keep;
|
|
6939
|
+
return blocks;
|
|
6940
|
+
}
|
|
6941
|
+
function frameColumnTextBands(items, spanning, cutX) {
|
|
6942
|
+
const tops = spanning.filter((b) => b.bbox).map((b) => b.bbox.y + b.bbox.height).sort((a, b) => b - a);
|
|
6943
|
+
const bands = /* @__PURE__ */ new Map();
|
|
6944
|
+
for (const item of items) {
|
|
6945
|
+
let band = 0;
|
|
6946
|
+
while (band < tops.length && tops[band] > item.y + item.h) band++;
|
|
6947
|
+
const sides = _nullishCoalesce(bands.get(band), () => ( [[], [], []]));
|
|
6948
|
+
sides[item.x + item.w <= cutX ? 0 : item.x >= cutX ? 2 : 1].push(item);
|
|
6949
|
+
bands.set(band, sides);
|
|
6950
|
+
}
|
|
6951
|
+
return [...bands].sort((a, b) => a[0] - b[0]).flatMap(([, sides]) => sides.filter((side) => side.length));
|
|
6952
|
+
}
|
|
6904
6953
|
function groupFrameParagraphUnits(units, frames) {
|
|
6905
6954
|
const source = /* @__PURE__ */ new Map();
|
|
6906
6955
|
for (const unit of units) for (const block of unit) source.set(block, unit);
|
|
6907
6956
|
const members = /* @__PURE__ */ new Map(), emitted = /* @__PURE__ */ new Set();
|
|
6908
6957
|
for (const frame of frames) {
|
|
6909
|
-
if (frame.length < 2 || frame.some((block) => block.type !== "paragraph" || _optionalChain([source, 'access',
|
|
6958
|
+
if (frame.length < 2 || frame.some((block) => block.type !== "paragraph" || _optionalChain([source, 'access', _316 => _316.get, 'call', _317 => _317(block), 'optionalAccess', _318 => _318.length]) !== 1)) continue;
|
|
6910
6959
|
for (const block of frame) members.set(block, frame);
|
|
6911
6960
|
}
|
|
6912
6961
|
const out = [];
|
|
@@ -6919,7 +6968,7 @@ function groupFrameParagraphUnits(units, frames) {
|
|
|
6919
6968
|
}
|
|
6920
6969
|
}
|
|
6921
6970
|
for (const unit of out) {
|
|
6922
|
-
if (unit.length < 2 || _optionalChain([FRAME_READING_UNITS, 'access',
|
|
6971
|
+
if (unit.length < 2 || _optionalChain([FRAME_READING_UNITS, 'access', _319 => _319.get, 'call', _320 => _320(unit[0]), 'optionalAccess', _321 => _321.blocks]) === unit) continue;
|
|
6923
6972
|
const bs = unit.map((b) => b.bbox).filter((b) => !!b);
|
|
6924
6973
|
if (bs.length !== unit.length) continue;
|
|
6925
6974
|
const x = Math.min(...bs.map((b) => b.x)), y = Math.min(...bs.map((b) => b.y));
|
|
@@ -6936,14 +6985,14 @@ function groupFrameParagraphUnits(units, frames) {
|
|
|
6936
6985
|
function recordFrameTitle(table, source, pageNum) {
|
|
6937
6986
|
if (!CLIP_TABLES.has(table) || table.rows !== 1 || table.cols !== 3 || source.length < 2) return;
|
|
6938
6987
|
const cells = table.cells[0];
|
|
6939
|
-
if (cells.length !== 3 || cells.some((c) => c.colSpan !== 1 || c.rowSpan !== 1 || _optionalChain([c, 'access',
|
|
6988
|
+
if (cells.length !== 3 || cells.some((c) => c.colSpan !== 1 || c.rowSpan !== 1 || _optionalChain([c, 'access', _322 => _322.blocks, 'optionalAccess', _323 => _323.length]) || c.text.includes("\n"))) return;
|
|
6940
6989
|
const [label, spacer, title] = cells;
|
|
6941
6990
|
if (!/^(?:붙임|별첨|첨부|부록)\s*\d{1,3}$/.test(label.text.trim()) || spacer.text.trim() || !title.text.trim()) return;
|
|
6942
6991
|
if (cells.some((c) => {
|
|
6943
|
-
const e =
|
|
6992
|
+
const e = _chunkMU7XW5KOcjs.CELL_EDGES.get(c);
|
|
6944
6993
|
return !e || e.t || e.b || e.l || e.r;
|
|
6945
6994
|
})) return;
|
|
6946
|
-
const xs = TABLE_COLXS.get(table), style = dominantStyle(source), fs = _nullishCoalesce(_optionalChain([style, 'optionalAccess',
|
|
6995
|
+
const xs = TABLE_COLXS.get(table), style = dominantStyle(source), fs = _nullishCoalesce(_optionalChain([style, 'optionalAccess', _324 => _324.fontSize]), () => ( 0));
|
|
6947
6996
|
if (!xs || xs.length !== 4 || fs <= 0) return;
|
|
6948
6997
|
const width = xs[3] - xs[0], gap = xs[2] - xs[1];
|
|
6949
6998
|
if (width < fs * 12 || gap <= 0 || gap > fs * 1.5 || xs[1] - xs[0] > width * 0.25 || xs[3] - xs[2] < width * 0.6) return;
|
|
@@ -7001,7 +7050,7 @@ function extendNestedShadedHeaders(clipGrids, lineGrids, horizontals, verticals,
|
|
|
7001
7050
|
const extended = [];
|
|
7002
7051
|
for (let i = 0; i < clipGrids.length; i++) {
|
|
7003
7052
|
const c = clipGrids[i], parent = c.clipParent;
|
|
7004
|
-
if (!parent || c.rowYs.length !== 2 || c.colXs.length < 3 || !_optionalChain([c, 'access',
|
|
7053
|
+
if (!parent || c.rowYs.length !== 2 || c.colXs.length < 3 || !_optionalChain([c, 'access', _325 => _325.cells, 'optionalAccess', _326 => _326.length]) || c.cells.some((cell) => cell.filler || cell.rowSpan !== 1 || cell.colSpan !== 1)) continue;
|
|
7005
7054
|
if (!clipGrids.some((g) => g.rowYs.length === 2 && g.colXs.length === 2 && near(g.bbox.x1, parent.x1) && near(g.bbox.x2, parent.x2) && near(g.bbox.y1, parent.y1) && near(g.bbox.y2, parent.y2))) continue;
|
|
7006
7055
|
if (!c.cells.every((cell) => fills.some((f) => near(f.x1, cell.bbox.x1) && near(f.x2, cell.bbox.x2) && near(f.y1, cell.bbox.y1) && near(f.y2, cell.bbox.y2)))) continue;
|
|
7007
7056
|
const host = lineGrids.find((l) => l.rowYs.length > 2 && l.colXs.length === c.colXs.length && c.colXs.every((x, k) => near(x, l.colXs[k])) && c.rowYs.every((y, k) => near(y, l.rowYs[k])) && contains3(parent, l.bbox) && l.rowYs.every((y) => horizontals.some((h) => near(h.y1, y) && near(h.x1, l.bbox.x1) && near(h.x2, l.bbox.x2))) && l.colXs.every((x) => verticals.some((v) => near(v.x1, x) && v.y1 <= l.bbox.y1 + 1.5 && v.y2 >= l.bbox.y2 - 1.5)) && !clipGrids.some((o) => o !== c && !contains3(o.bbox, l.bbox) && Math.min(o.bbox.x2, l.bbox.x2) > Math.max(o.bbox.x1, l.bbox.x1) && Math.min(o.bbox.y2, l.bbox.y2) > Math.max(o.bbox.y1, l.bbox.y1)));
|
|
@@ -7189,7 +7238,7 @@ function stackedTableBands(items) {
|
|
|
7189
7238
|
const caption = (start, end) => lines.slice(start, end).some((line) => /^Table\s+\d+\s*[:.]/i.test(mergeLineSimple(line).trim()));
|
|
7190
7239
|
while (runs.length > 0 && !caption(runs[runs.length - 1].end, lines.length)) runs.pop();
|
|
7191
7240
|
if (runs.length < 2) return null;
|
|
7192
|
-
if (runs.some((run, i) => !caption(run.end, _nullishCoalesce(_optionalChain([runs, 'access',
|
|
7241
|
+
if (runs.some((run, i) => !caption(run.end, _nullishCoalesce(_optionalChain([runs, 'access', _327 => _327[i + 1], 'optionalAccess', _328 => _328.start]), () => ( lines.length))))) return null;
|
|
7193
7242
|
const tables = runs.map((run) => lines.slice(run.start, run.end).flat());
|
|
7194
7243
|
const between = runs.slice(0, -1).map((run, i) => lines.slice(run.end, runs[i + 1].start).flat());
|
|
7195
7244
|
const tail = lines.slice(runs[runs.length - 1].end);
|
|
@@ -7358,7 +7407,7 @@ function extractPageBlocksWithLines(items, pageNum, opList, pageWidth, pageHeigh
|
|
|
7358
7407
|
const filled = fillBlanks(items, horizontals, verticals);
|
|
7359
7408
|
items = filled.items;
|
|
7360
7409
|
horizontals = filled.horizontals;
|
|
7361
|
-
const prevPage = _optionalChain([carry, 'optionalAccess',
|
|
7410
|
+
const prevPage = _optionalChain([carry, 'optionalAccess', _329 => _329.page]) === pageNum - 1 ? carry.clip : void 0;
|
|
7362
7411
|
const clipResult = detectTables ? buildClipCellGrids(extracted.clipRects, horizontals, verticals, pageWidth, pageHeight, items.map((it) => ({ x: it.x + it.w / 2, y: it.y + it.h / 2 })), extracted.fillRects, prevPage) : { grids: [], containers: [], page: void 0 };
|
|
7363
7412
|
if (carry) {
|
|
7364
7413
|
carry.page = pageNum;
|
|
@@ -7626,14 +7675,14 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7626
7675
|
if (!assignedItems.has(textItems[ti])) usedItems.delete(tableItems[ti]);
|
|
7627
7676
|
}
|
|
7628
7677
|
}
|
|
7629
|
-
if (unitLine.length > 0 && rebuiltUsed && !/^\s*\(\s*단위\s*[::]/.test(_nullishCoalesce(_optionalChain([finalGrid, 'access',
|
|
7678
|
+
if (unitLine.length > 0 && rebuiltUsed && !/^\s*\(\s*단위\s*[::]/.test(_nullishCoalesce(_optionalChain([finalGrid, 'access', _330 => _330[0], 'optionalAccess', _331 => _331[0], 'optionalAccess', _332 => _332.text]), () => ( "")))) {
|
|
7630
7679
|
prependUnitRow(finalGrid, numCols, unitLine, usedItems);
|
|
7631
7680
|
finalRows++;
|
|
7632
7681
|
}
|
|
7633
7682
|
if (!rebuiltUsed && attachUnitRow(items, grid, finalGrid, numCols, usedItems)) finalRows++;
|
|
7634
7683
|
let semanticOneColumn = false;
|
|
7635
7684
|
if (!grid.cells && !nestedAttached && numCols === 1 && numGridRows >= 2) {
|
|
7636
|
-
const populatedRows = finalGrid.filter((row) => _optionalChain([row, 'access',
|
|
7685
|
+
const populatedRows = finalGrid.filter((row) => _optionalChain([row, 'access', _333 => _333[0], 'optionalAccess', _334 => _334.text, 'access', _335 => _335.trim, 'call', _336 => _336()]));
|
|
7637
7686
|
if (populatedRows.length >= 4) {
|
|
7638
7687
|
const fontSizes = tableItems.map((item) => item.fontSize).filter((size) => size > 0).sort((a, b) => a - b);
|
|
7639
7688
|
const medianFont = _nullishCoalesce(fontSizes[Math.floor(fontSizes.length / 2)], () => ( 0));
|
|
@@ -7719,7 +7768,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7719
7768
|
height: grid.bbox.y2 - grid.bbox.y1
|
|
7720
7769
|
};
|
|
7721
7770
|
if (numRows === 1 && numCols === 1 && gridW < pageWidth * 0.35) {
|
|
7722
|
-
const prose = _nullishCoalesce(_optionalChain([finalGrid, 'access',
|
|
7771
|
+
const prose = _nullishCoalesce(_optionalChain([finalGrid, 'access', _337 => _337[0], 'optionalAccess', _338 => _338[0], 'optionalAccess', _339 => _339.text]), () => ( ""));
|
|
7723
7772
|
const besideLines = (side) => new Set(side.map((it) => Math.round(it.y / 3))).size;
|
|
7724
7773
|
const rightLines = items.filter((it) => it.x >= grid.bbox.x2 + 3 && it.y >= grid.bbox.y1 && it.y <= grid.bbox.y2);
|
|
7725
7774
|
const leftLines = items.filter((it) => it.x + it.w <= grid.bbox.x1 - 3 && it.y >= grid.bbox.y1 && it.y <= grid.bbox.y2);
|
|
@@ -7738,8 +7787,8 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7738
7787
|
}
|
|
7739
7788
|
}
|
|
7740
7789
|
if (!grid.cells && !nestedAttached && shouldDemoteTable(irTable)) {
|
|
7741
|
-
const paragraphs = numRows === 1 && numCols === 1 ? _optionalChain([irTable, 'access',
|
|
7742
|
-
if (_optionalChain([paragraphs, 'optionalAccess',
|
|
7790
|
+
const paragraphs = numRows === 1 && numCols === 1 ? _optionalChain([irTable, 'access', _340 => _340.cells, 'access', _341 => _341[0], 'optionalAccess', _342 => _342[0], 'optionalAccess', _343 => _343.blocks]) : void 0;
|
|
7791
|
+
if (_optionalChain([paragraphs, 'optionalAccess', _344 => _344.length])) {
|
|
7743
7792
|
blocks.push(...paragraphs);
|
|
7744
7793
|
frameParagraphUnits.push(paragraphs);
|
|
7745
7794
|
recordFrameReadingUnit(paragraphs, tableBbox);
|
|
@@ -7780,7 +7829,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7780
7829
|
const proseColumns = findTwoColumnProseCutX(clusterItems) !== null || detectPersistentColumnGutter(remaining.map((i) => ({ x: i.x, y: i.y, w: i.w, h: i.h > 0 ? i.h : i.fontSize }))) !== null;
|
|
7781
7830
|
const clusterResults = (proseColumns ? [] : detectClusterTables(clusterItems, pageNum)).filter((cr) => {
|
|
7782
7831
|
const b = cr.bbox;
|
|
7783
|
-
return !blocks.some((x) => x.type === "paragraph" && x.bbox && (_nullishCoalesce(_optionalChain([x, 'access',
|
|
7832
|
+
return !blocks.some((x) => x.type === "paragraph" && x.bbox && (_nullishCoalesce(_optionalChain([x, 'access', _345 => _345.text, 'optionalAccess', _346 => _346.match, 'call', _347 => _347(/\p{L}/gu), 'optionalAccess', _348 => _348.length]), () => ( 0))) >= 10 && Math.min(x.bbox.x + x.bbox.width, b.x + b.width) - Math.max(x.bbox.x, b.x) >= 0.8 * b.width && x.bbox.y >= b.y - 2 && x.bbox.y + x.bbox.height <= b.y + b.height + 2);
|
|
7784
7833
|
});
|
|
7785
7834
|
if (clusterResults.length > 0) {
|
|
7786
7835
|
const ciToIdx = /* @__PURE__ */ new Map();
|
|
@@ -7811,14 +7860,15 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7811
7860
|
if (remaining.length > 0) {
|
|
7812
7861
|
if (gutterX !== null) {
|
|
7813
7862
|
const gx = gutterX;
|
|
7863
|
+
const spanning = detectListBlocks(takeFrameSpanningText(remaining, gx, pageNum, lex));
|
|
7864
|
+
for (const block of spanning) {
|
|
7865
|
+
finalTextBlocks.push(block);
|
|
7866
|
+
groupSizes.push(1);
|
|
7867
|
+
}
|
|
7814
7868
|
const allY = remaining.map((i) => i.y);
|
|
7815
|
-
const pageH =
|
|
7869
|
+
const pageH = _chunkEFVBB45Ecjs.safeMax.call(void 0, allY) - _chunkEFVBB45Ecjs.safeMin.call(void 0, allY);
|
|
7816
7870
|
const gapThreshold = Math.max(15, pageH * 0.03);
|
|
7817
|
-
const sides =
|
|
7818
|
-
remaining.filter((i) => i.x + i.w <= gx),
|
|
7819
|
-
remaining.filter((i) => i.x < gx && i.x + i.w > gx),
|
|
7820
|
-
remaining.filter((i) => i.x >= gx)
|
|
7821
|
-
];
|
|
7871
|
+
const sides = frameColumnTextBands(remaining, spanning, gx);
|
|
7822
7872
|
const textBlocks = [];
|
|
7823
7873
|
for (const side of sides) {
|
|
7824
7874
|
if (side.length === 0) continue;
|
|
@@ -7829,10 +7879,10 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7829
7879
|
groupSizes.push(groupBlocks.length);
|
|
7830
7880
|
}
|
|
7831
7881
|
}
|
|
7832
|
-
finalTextBlocks
|
|
7882
|
+
finalTextBlocks.push(...detectListBlocks(textBlocks));
|
|
7833
7883
|
} else {
|
|
7834
7884
|
const allY = remaining.map((i) => i.y);
|
|
7835
|
-
const pageH =
|
|
7885
|
+
const pageH = _chunkEFVBB45Ecjs.safeMax.call(void 0, allY) - _chunkEFVBB45Ecjs.safeMin.call(void 0, allY);
|
|
7836
7886
|
const groups = xyCutOrder(remaining, Math.max(15, pageH * 0.03));
|
|
7837
7887
|
const textBlocks = [];
|
|
7838
7888
|
for (const group of groups) {
|
|
@@ -8157,7 +8207,7 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false, detectTable
|
|
|
8157
8207
|
blocks.push(...columnTextToBlocks(tableText, pageNum, bbox, dominantStyle(items)));
|
|
8158
8208
|
} else {
|
|
8159
8209
|
const allY = items.map((i) => i.y);
|
|
8160
|
-
const pageHeight =
|
|
8210
|
+
const pageHeight = _chunkEFVBB45Ecjs.safeMax.call(void 0, allY) - _chunkEFVBB45Ecjs.safeMin.call(void 0, allY);
|
|
8161
8211
|
const gapThreshold = Math.max(15, pageHeight * 0.03);
|
|
8162
8212
|
const orderedGroups = proseCutX !== null ? splitTwoColumnProse(items, proseCutX) : xyCutOrder(items, gapThreshold);
|
|
8163
8213
|
for (const group of orderedGroups) {
|
|
@@ -8235,4 +8285,4 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false, detectTable
|
|
|
8235
8285
|
|
|
8236
8286
|
|
|
8237
8287
|
exports.OCR_DET_MODEL = OCR_DET_MODEL; exports.OCR_REC_MODEL = OCR_REC_MODEL; exports.OCR_REC_DICT = OCR_REC_DICT; exports.getOcrModelsDir = getOcrModelsDir; exports.ensureOcrModels = ensureOcrModels; exports.ocrModelsCached = ocrModelsCached; exports.parseCharacterDict = parseCharacterDict; exports.extractLines = extractLines; exports.extractImageRegions = extractImageRegions; exports.filterHiddenText = filterHiddenText; exports.collapseEvenSpacing = collapseEvenSpacing; exports.computeBBox = computeBBox; exports.dominantStyle = dominantStyle; exports.normalizeItems = normalizeItems; exports.groupByY = groupByY; exports.mergeLineSimple = mergeLineSimple; exports.WrapLexicon = WrapLexicon; exports.startsNewItem = startsNewItem; exports.wrapJoiner = wrapJoiner; exports.joinPageBreakWraps = joinPageBreakWraps; exports.latinSoftWrap = latinSoftWrap; exports.TOC_BLOCKS = TOC_BLOCKS; exports.computeMedianFontSizeFromFreq = computeMedianFontSizeFromFreq; exports.detectHeadings = detectHeadings; exports.mergeStackedHeadingLines = mergeStackedHeadingLines; exports.detectTypographyHeadings = detectTypographyHeadings; exports.detectDocumentStyleHeadings = detectDocumentStyleHeadings; exports.detectSiblingStyleHeadings = detectSiblingStyleHeadings; exports.detectRepeatedPageLabels = detectRepeatedPageLabels; exports.detectPageLeadHeadings = detectPageLeadHeadings; exports.refineDocumentStyleHeadings = refineDocumentStyleHeadings; exports.detectMarkerHeadings = detectMarkerHeadings; exports.detectTableCaptions = detectTableCaptions; exports.detectKoreanListBlocks = detectKoreanListBlocks; exports.removeHeaderFooterBlocks = removeHeaderFooterBlocks; exports.CLIP_TABLES = CLIP_TABLES; exports.FRAME_TITLE_BLOCKS = FRAME_TITLE_BLOCKS; exports.TABLE_COLXS = TABLE_COLXS; exports.TABLE_ROWYS = TABLE_ROWYS; exports.TABLE_TAIL = TABLE_TAIL; exports.PART_COLXS = PART_COLXS; exports.EMPTY_PARTS = EMPTY_PARTS; exports.IMAGE_CELLS = IMAGE_CELLS; exports.FILLER_CELLS = FILLER_CELLS; exports.CONT_PARTS = CONT_PARTS; exports.CELL_LINES = CELL_LINES; exports.ROW_RULES = ROW_RULES; exports.trimTrailingEmptyTableCols = trimTrailingEmptyTableCols; exports.NO_EDGES = NO_EDGES; exports.joinCellEdges = joinCellEdges; exports.FRAME_READING_UNITS = FRAME_READING_UNITS; exports.recordFrameReadingUnit = recordFrameReadingUnit; exports.restoreImageBullets = restoreImageBullets; exports.detectRightArrowRegions = detectRightArrowRegions; exports.removeSideTabs = removeSideTabs; exports.extractPageBlocksWithLines = extractPageBlocksWithLines;
|
|
8238
|
-
//# sourceMappingURL=chunk-
|
|
8288
|
+
//# sourceMappingURL=chunk-XGIUYCXI.cjs.map
|