kordoc 4.24.64 → 4.24.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{-QAZ44KKA.js → -3Q26OZHW.js} +21 -21
- package/dist/{chunk-36EJXOCF.js → chunk-27ZUZMQY.js} +5 -5
- package/dist/{chunk-34OGRWYW.js → chunk-3JHKWOVZ.js} +49 -5
- package/dist/{chunk-34OGRWYW.js.map → chunk-3JHKWOVZ.js.map} +1 -1
- package/dist/{chunk-OJKFBZPW.js → chunk-3Z7WJCP2.js} +2 -2
- package/dist/{chunk-T3JCWBOI.cjs → chunk-4T4Y2WRR.cjs} +2 -2
- package/dist/{chunk-T3JCWBOI.cjs.map → chunk-4T4Y2WRR.cjs.map} +1 -1
- package/dist/{chunk-MMZO2B5N.cjs → chunk-6J5RTSBG.cjs} +3 -3
- package/dist/{chunk-MMZO2B5N.cjs.map → chunk-6J5RTSBG.cjs.map} +1 -1
- package/dist/{chunk-COARY4DW.js → chunk-6R4M2LVY.js} +2 -2
- package/dist/{chunk-MEHJKEUZ.js → chunk-7DQI7BU6.js} +2 -2
- package/dist/{chunk-R7GE5HUE.js → chunk-7PTPUYYJ.js} +3 -3
- package/dist/{chunk-PZOKLEDR.js → chunk-ABA2Z4LT.js} +2 -2
- package/dist/{chunk-GOXFAAHN.js → chunk-AKYUE4JE.js} +2 -2
- package/dist/{chunk-EUNUDJXO.js → chunk-AX34AL6K.js} +2 -2
- package/dist/{chunk-72H52U6F.cjs → chunk-B4AKPVWA.cjs} +134 -90
- package/dist/{chunk-72H52U6F.cjs.map → chunk-B4AKPVWA.cjs.map} +1 -1
- package/dist/{chunk-FEFKONND.cjs → chunk-B4ZNG3G7.cjs} +25 -25
- package/dist/{chunk-FEFKONND.cjs.map → chunk-B4ZNG3G7.cjs.map} +1 -1
- package/dist/{chunk-ACDKOGKO.js → chunk-BPNJBWKQ.js} +15 -15
- package/dist/{chunk-PO2TQW2B.js → chunk-BRDRZHVC.js} +2 -2
- package/dist/{chunk-DFZIE6NM.js → chunk-BYTIJ226.js} +2 -2
- package/dist/{chunk-AZZKSDLD.js → chunk-CLI5IIY3.js} +2 -2
- package/dist/{chunk-XCPST2YL.js → chunk-DKSSS4ED.js} +2 -2
- package/dist/{chunk-CKA2X7FC.js → chunk-DQQ6C7WA.js} +2 -2
- package/dist/{chunk-IEOC3SKK.js → chunk-EG47QXJE.js} +5 -5
- package/dist/{chunk-X2XUGRV3.js → chunk-FTMDZ4Y5.js} +3 -3
- package/dist/{chunk-KVLIFFDJ.cjs → chunk-GITPHKYL.cjs} +8 -8
- package/dist/{chunk-KVLIFFDJ.cjs.map → chunk-GITPHKYL.cjs.map} +1 -1
- package/dist/{chunk-LJUESQWH.js → chunk-GZC4XIKW.js} +5 -5
- package/dist/{chunk-LNAOHM6K.js → chunk-I2HHHJF5.js} +2 -2
- package/dist/{chunk-4R6LAJCT.js → chunk-JW6PNIXI.js} +7 -7
- package/dist/{chunk-PTJDTKU3.js → chunk-KUAPGGQE.js} +6 -6
- package/dist/{chunk-HQSGKBH4.js → chunk-LXRBEPYC.js} +2 -2
- package/dist/{chunk-I4ON2NHU.js → chunk-MTUGM4ZK.js} +6 -6
- package/dist/{chunk-Q4AQE7TN.js → chunk-NBBT2EYG.js} +2 -2
- package/dist/{chunk-GDRQGXPC.js → chunk-NTMN5UKQ.js} +3 -3
- package/dist/{chunk-R5PEYGFS.js → chunk-PWSUGKMS.js} +2 -2
- package/dist/{chunk-PNEMJTPG.js → chunk-RH6E2YVG.js} +2 -2
- package/dist/{chunk-35WLNE3R.cjs → chunk-S5XPBZQ6.cjs} +3 -3
- package/dist/{chunk-35WLNE3R.cjs.map → chunk-S5XPBZQ6.cjs.map} +1 -1
- package/dist/{chunk-NVHBKHTR.js → chunk-TN2C7M6Q.js} +11 -11
- package/dist/{chunk-LKCLRP4E.js → chunk-TYJFA5S7.js} +2 -2
- package/dist/{chunk-YFEV3NNV.js → chunk-U2TSYPPM.js} +2 -2
- package/dist/{chunk-3XZR5JQY.cjs → chunk-UJI2ZP6M.cjs} +104 -104
- package/dist/{chunk-3XZR5JQY.cjs.map → chunk-UJI2ZP6M.cjs.map} +1 -1
- package/dist/{chunk-S6WRR43D.js → chunk-UYEZER77.js} +2 -2
- package/dist/{chunk-DAP3G7G3.js → chunk-VMR3QMB5.js} +50 -6
- package/dist/{chunk-DAP3G7G3.js.map → chunk-VMR3QMB5.js.map} +1 -1
- package/dist/{chunk-FPC3GEAD.js → chunk-VQZIP2UW.js} +10 -10
- package/dist/{chunk-ZRHMLFJB.js → chunk-XS254L5R.js} +3 -3
- package/dist/{chunk-FNRCQGZN.js → chunk-Y6UT3AYV.js} +4 -4
- package/dist/{chunk-LKH3LG3N.cjs → chunk-ZMJVWAH2.cjs} +58 -58
- package/dist/{chunk-LKH3LG3N.cjs.map → chunk-ZMJVWAH2.cjs.map} +1 -1
- package/dist/chunks-LAMEBTHT.js +11 -0
- package/dist/cli.js +45 -45
- package/dist/{formula-IWBM3D27.cjs → formula-HNVGC323.cjs} +9 -9
- package/dist/{formula-IWBM3D27.cjs.map → formula-HNVGC323.cjs.map} +1 -1
- package/dist/{formula-AKSUUGPE.js → formula-N6HZBMYV.js} +4 -4
- package/dist/{formula-TGSWQZXE.js → formula-WDYM2TBT.js} +3 -3
- package/dist/generator-GJID5Q4V.cjs +12 -0
- package/dist/{generator-AUHRYGI3.cjs.map → generator-GJID5Q4V.cjs.map} +1 -1
- package/dist/generator-LGSVRPVO.js +11 -0
- package/dist/generator-QQTCTEMZ.js +18 -0
- package/dist/{hancom-HQBZBCSR.js → hancom-TJ2T5WD7.js} +2 -2
- package/dist/{hancom-PV626GYI.js → hancom-XNW5F3S5.js} +2 -2
- package/dist/{hancom-QSZ33R47.cjs → hancom-Y4QJMNTG.cjs} +5 -5
- package/dist/{hancom-QSZ33R47.cjs.map → hancom-Y4QJMNTG.cjs.map} +1 -1
- package/dist/{image-ocr-EL2WFECB.cjs → image-ocr-2P6OUO7R.cjs} +28 -28
- package/dist/{image-ocr-EL2WFECB.cjs.map → image-ocr-2P6OUO7R.cjs.map} +1 -1
- package/dist/{image-ocr-2EYCNJJU.js → image-ocr-EEI3UA36.js} +10 -10
- package/dist/{image-ocr-P5XZGIPX.js → image-ocr-HXQV325C.js} +7 -7
- package/dist/index.cjs +1115 -1115
- package/dist/index.js +9 -9
- package/dist/mcp.js +36 -36
- package/dist/memo-JYBL4KYT.js +17 -0
- package/dist/{model-bundle-5ZAV3WPL.js → model-bundle-QMXOK6ML.js} +5 -5
- package/dist/{models-KOHBYNOH.js → models-VRTWSRWY.js} +5 -5
- package/dist/{parse-worker-v2-SSXAWHMP.js → parse-worker-v2-4YEQVFDN.js} +22 -22
- package/dist/{parser-Q2LYKLLS.js → parser-4FZWTV4P.js} +12 -12
- package/dist/{parser-JAXFIY4Z.cjs → parser-5X3O5FMI.cjs} +166 -166
- package/dist/{parser-JAXFIY4Z.cjs.map → parser-5X3O5FMI.cjs.map} +1 -1
- package/dist/{parser-GAT6U7NK.js → parser-6ZIQHTU7.js} +9 -9
- package/dist/pdf-ocr-47CN4L3H.cjs +43 -0
- package/dist/{pdf-ocr-S6LZ5SDT.cjs.map → pdf-ocr-47CN4L3H.cjs.map} +1 -1
- package/dist/{pdf-ocr-ZK6W2KRC.js → pdf-ocr-HHWYGVYA.js} +9 -9
- package/dist/{pdf-ocr-5EHHYF3C.js → pdf-ocr-TIYXB6UN.js} +6 -6
- package/dist/{profile-io-6LSVAJGK.js → profile-io-6FHN5UEA.js} +3 -3
- package/dist/{rasterize-JRBWIABQ.js → rasterize-JFBYSQSV.js} +3 -3
- package/dist/{redact-doc-K6Q3J4QN.js → redact-doc-PYL7KZBW.js} +21 -21
- package/dist/{render-QXCUXJBD.js → render-6V2YIVO3.js} +12 -12
- package/dist/{rewrite-fallback-LKK3CK7E.js → rewrite-fallback-53SOLUTC.js} +13 -13
- package/dist/seal-KRIMAC4M.js +16 -0
- package/dist/{setup-NA3L7AP4.js → setup-LFIDDDUO.js} +3 -3
- package/dist/{to-hwpx-YNCXFNZV.js → to-hwpx-PVXV4MP3.js} +7 -7
- package/dist/to-hwpx-SNIR5XQE.cjs +16 -0
- package/dist/{to-hwpx-ICWG2YYM.cjs.map → to-hwpx-SNIR5XQE.cjs.map} +1 -1
- package/dist/{to-hwpx-QVGHZIYD.js → to-hwpx-VPIDINZP.js} +4 -4
- package/dist/visual-HKD7SS2K.js +38 -0
- package/dist/{watch-C276YW4I.js → watch-RDE5VTIX.js} +22 -22
- package/package.json +1 -1
- package/dist/chunks-OWWHWU6T.js +0 -11
- package/dist/generator-AUHRYGI3.cjs +0 -12
- package/dist/generator-TGYD6N7S.js +0 -11
- package/dist/generator-UB2TEEE6.js +0 -18
- package/dist/memo-I5S4HZBP.js +0 -17
- package/dist/pdf-ocr-S6LZ5SDT.cjs +0 -43
- package/dist/seal-GMZGRQE7.js +0 -16
- package/dist/to-hwpx-ICWG2YYM.cjs +0 -16
- package/dist/visual-5BXQ3MAX.js +0 -38
- /package/dist/{-QAZ44KKA.js.map → -3Q26OZHW.js.map} +0 -0
- /package/dist/{chunk-36EJXOCF.js.map → chunk-27ZUZMQY.js.map} +0 -0
- /package/dist/{chunk-OJKFBZPW.js.map → chunk-3Z7WJCP2.js.map} +0 -0
- /package/dist/{chunk-COARY4DW.js.map → chunk-6R4M2LVY.js.map} +0 -0
- /package/dist/{chunk-MEHJKEUZ.js.map → chunk-7DQI7BU6.js.map} +0 -0
- /package/dist/{chunk-R7GE5HUE.js.map → chunk-7PTPUYYJ.js.map} +0 -0
- /package/dist/{chunk-PZOKLEDR.js.map → chunk-ABA2Z4LT.js.map} +0 -0
- /package/dist/{chunk-GOXFAAHN.js.map → chunk-AKYUE4JE.js.map} +0 -0
- /package/dist/{chunk-EUNUDJXO.js.map → chunk-AX34AL6K.js.map} +0 -0
- /package/dist/{chunk-ACDKOGKO.js.map → chunk-BPNJBWKQ.js.map} +0 -0
- /package/dist/{chunk-PO2TQW2B.js.map → chunk-BRDRZHVC.js.map} +0 -0
- /package/dist/{chunk-DFZIE6NM.js.map → chunk-BYTIJ226.js.map} +0 -0
- /package/dist/{chunk-AZZKSDLD.js.map → chunk-CLI5IIY3.js.map} +0 -0
- /package/dist/{chunk-XCPST2YL.js.map → chunk-DKSSS4ED.js.map} +0 -0
- /package/dist/{chunk-CKA2X7FC.js.map → chunk-DQQ6C7WA.js.map} +0 -0
- /package/dist/{chunk-IEOC3SKK.js.map → chunk-EG47QXJE.js.map} +0 -0
- /package/dist/{chunk-X2XUGRV3.js.map → chunk-FTMDZ4Y5.js.map} +0 -0
- /package/dist/{chunk-LJUESQWH.js.map → chunk-GZC4XIKW.js.map} +0 -0
- /package/dist/{chunk-LNAOHM6K.js.map → chunk-I2HHHJF5.js.map} +0 -0
- /package/dist/{chunk-4R6LAJCT.js.map → chunk-JW6PNIXI.js.map} +0 -0
- /package/dist/{chunk-PTJDTKU3.js.map → chunk-KUAPGGQE.js.map} +0 -0
- /package/dist/{chunk-HQSGKBH4.js.map → chunk-LXRBEPYC.js.map} +0 -0
- /package/dist/{chunk-I4ON2NHU.js.map → chunk-MTUGM4ZK.js.map} +0 -0
- /package/dist/{chunk-Q4AQE7TN.js.map → chunk-NBBT2EYG.js.map} +0 -0
- /package/dist/{chunk-GDRQGXPC.js.map → chunk-NTMN5UKQ.js.map} +0 -0
- /package/dist/{chunk-R5PEYGFS.js.map → chunk-PWSUGKMS.js.map} +0 -0
- /package/dist/{chunk-PNEMJTPG.js.map → chunk-RH6E2YVG.js.map} +0 -0
- /package/dist/{chunk-NVHBKHTR.js.map → chunk-TN2C7M6Q.js.map} +0 -0
- /package/dist/{chunk-LKCLRP4E.js.map → chunk-TYJFA5S7.js.map} +0 -0
- /package/dist/{chunk-YFEV3NNV.js.map → chunk-U2TSYPPM.js.map} +0 -0
- /package/dist/{chunk-S6WRR43D.js.map → chunk-UYEZER77.js.map} +0 -0
- /package/dist/{chunk-FPC3GEAD.js.map → chunk-VQZIP2UW.js.map} +0 -0
- /package/dist/{chunk-ZRHMLFJB.js.map → chunk-XS254L5R.js.map} +0 -0
- /package/dist/{chunk-FNRCQGZN.js.map → chunk-Y6UT3AYV.js.map} +0 -0
- /package/dist/{chunks-OWWHWU6T.js.map → chunks-LAMEBTHT.js.map} +0 -0
- /package/dist/{formula-AKSUUGPE.js.map → formula-N6HZBMYV.js.map} +0 -0
- /package/dist/{formula-TGSWQZXE.js.map → formula-WDYM2TBT.js.map} +0 -0
- /package/dist/{generator-TGYD6N7S.js.map → generator-LGSVRPVO.js.map} +0 -0
- /package/dist/{generator-UB2TEEE6.js.map → generator-QQTCTEMZ.js.map} +0 -0
- /package/dist/{hancom-HQBZBCSR.js.map → hancom-TJ2T5WD7.js.map} +0 -0
- /package/dist/{hancom-PV626GYI.js.map → hancom-XNW5F3S5.js.map} +0 -0
- /package/dist/{image-ocr-2EYCNJJU.js.map → image-ocr-EEI3UA36.js.map} +0 -0
- /package/dist/{image-ocr-P5XZGIPX.js.map → image-ocr-HXQV325C.js.map} +0 -0
- /package/dist/{memo-I5S4HZBP.js.map → memo-JYBL4KYT.js.map} +0 -0
- /package/dist/{model-bundle-5ZAV3WPL.js.map → model-bundle-QMXOK6ML.js.map} +0 -0
- /package/dist/{models-KOHBYNOH.js.map → models-VRTWSRWY.js.map} +0 -0
- /package/dist/{parse-worker-v2-SSXAWHMP.js.map → parse-worker-v2-4YEQVFDN.js.map} +0 -0
- /package/dist/{parser-Q2LYKLLS.js.map → parser-4FZWTV4P.js.map} +0 -0
- /package/dist/{parser-GAT6U7NK.js.map → parser-6ZIQHTU7.js.map} +0 -0
- /package/dist/{pdf-ocr-5EHHYF3C.js.map → pdf-ocr-HHWYGVYA.js.map} +0 -0
- /package/dist/{pdf-ocr-ZK6W2KRC.js.map → pdf-ocr-TIYXB6UN.js.map} +0 -0
- /package/dist/{profile-io-6LSVAJGK.js.map → profile-io-6FHN5UEA.js.map} +0 -0
- /package/dist/{rasterize-JRBWIABQ.js.map → rasterize-JFBYSQSV.js.map} +0 -0
- /package/dist/{redact-doc-K6Q3J4QN.js.map → redact-doc-PYL7KZBW.js.map} +0 -0
- /package/dist/{render-QXCUXJBD.js.map → render-6V2YIVO3.js.map} +0 -0
- /package/dist/{rewrite-fallback-LKK3CK7E.js.map → rewrite-fallback-53SOLUTC.js.map} +0 -0
- /package/dist/{seal-GMZGRQE7.js.map → seal-KRIMAC4M.js.map} +0 -0
- /package/dist/{setup-NA3L7AP4.js.map → setup-LFIDDDUO.js.map} +0 -0
- /package/dist/{to-hwpx-QVGHZIYD.js.map → to-hwpx-PVXV4MP3.js.map} +0 -0
- /package/dist/{to-hwpx-YNCXFNZV.js.map → to-hwpx-VPIDINZP.js.map} +0 -0
- /package/dist/{visual-5BXQ3MAX.js.map → visual-HKD7SS2K.js.map} +0 -0
- /package/dist/{watch-C276YW4I.js.map → watch-RDE5VTIX.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6J5RTSBGcjs = require('./chunk-6J5RTSBG.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -9,11 +9,11 @@ var _chunkMMZO2B5Ncjs = require('./chunk-MMZO2B5N.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkGITPHKYLcjs = require('./chunk-GITPHKYL.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunk4T4Y2WRRcjs = require('./chunk-4T4Y2WRR.cjs');
|
|
17
17
|
|
|
18
18
|
// src/ocr/models.ts
|
|
19
19
|
var _path = require('path');
|
|
@@ -65,7 +65,7 @@ var OCR_REC_DICT = {
|
|
|
65
65
|
sizeMb: 1
|
|
66
66
|
};
|
|
67
67
|
function getOcrModelsDir() {
|
|
68
|
-
return
|
|
68
|
+
return _chunk6J5RTSBGcjs.getModelsDir.call(void 0, "ppocr");
|
|
69
69
|
}
|
|
70
70
|
var DEFAULT_OCR_MODELS = Object.freeze({
|
|
71
71
|
det: { spec: OCR_DET_MODEL },
|
|
@@ -110,7 +110,7 @@ async function ensureOcrModelsFor(sel, onProgress) {
|
|
|
110
110
|
if (!stamp || verifiedInProcess.get(path) !== stamp) todo.push(s.spec);
|
|
111
111
|
}
|
|
112
112
|
if (!todo.length) return;
|
|
113
|
-
await
|
|
113
|
+
await _chunk6J5RTSBGcjs.ensureModelsIn.call(void 0, dir, todo, onProgress);
|
|
114
114
|
for (const spec of todo) {
|
|
115
115
|
const path = _path.join.call(void 0, dir, spec.filename), stamp = await fileStamp(path);
|
|
116
116
|
if (stamp) verifiedInProcess.set(path, stamp);
|
|
@@ -3407,16 +3407,16 @@ function recordOpenEndCellEdges(grid, cells, horizontals) {
|
|
|
3407
3407
|
}
|
|
3408
3408
|
function takeClipCellEdges(from, to) {
|
|
3409
3409
|
const e = CLIP_CELL_EDGES.get(from);
|
|
3410
|
-
if (e)
|
|
3410
|
+
if (e) _chunkGITPHKYLcjs.CELL_EDGES.set(to, e);
|
|
3411
3411
|
}
|
|
3412
3412
|
function hasOpenCellSeam(a, b) {
|
|
3413
|
-
const u =
|
|
3413
|
+
const u = _chunkGITPHKYLcjs.CELL_EDGES.get(a), d = _chunkGITPHKYLcjs.CELL_EDGES.get(b);
|
|
3414
3414
|
return !!u && !!d && u.t && !u.b && !d.t && d.b && u.l && u.r && d.l && d.r;
|
|
3415
3415
|
}
|
|
3416
3416
|
function joinCellEdges(a, b) {
|
|
3417
|
-
const u =
|
|
3417
|
+
const u = _chunkGITPHKYLcjs.CELL_EDGES.get(a), d = _chunkGITPHKYLcjs.CELL_EDGES.get(b);
|
|
3418
3418
|
if (!u || !d) return;
|
|
3419
|
-
|
|
3419
|
+
_chunkGITPHKYLcjs.CELL_EDGES.set(a, { t: u.t, b: d.b, l: u.l || d.l, r: u.r || d.r });
|
|
3420
3420
|
}
|
|
3421
3421
|
|
|
3422
3422
|
// src/pdf/cell-extract.ts
|
|
@@ -3592,7 +3592,7 @@ function tagScripts(text, lines) {
|
|
|
3592
3592
|
const [s, e, kind] = marks[m];
|
|
3593
3593
|
out = out.slice(0, s) + `<${kind}>` + out.slice(s, e) + `</${kind}>` + out.slice(e);
|
|
3594
3594
|
}
|
|
3595
|
-
return
|
|
3595
|
+
return _chunkGITPHKYLcjs.tidyScriptTags.call(void 0, out);
|
|
3596
3596
|
}
|
|
3597
3597
|
|
|
3598
3598
|
// src/pdf/line-wrap.ts
|
|
@@ -7016,9 +7016,9 @@ function detectHeadings(blocks, medianFontSize) {
|
|
|
7016
7016
|
if (/^\d+$/.test(text) && !isChapterNumber(block, blocks[bi + 1], medianFontSize)) continue;
|
|
7017
7017
|
const ratio = block.style.fontSize / medianFontSize;
|
|
7018
7018
|
let level = 0;
|
|
7019
|
-
if (ratio >=
|
|
7020
|
-
else if (ratio >=
|
|
7021
|
-
else if (ratio >=
|
|
7019
|
+
if (ratio >= _chunkGITPHKYLcjs.HEADING_RATIO_H1) level = 1;
|
|
7020
|
+
else if (ratio >= _chunkGITPHKYLcjs.HEADING_RATIO_H2) level = 2;
|
|
7021
|
+
else if (ratio >= _chunkGITPHKYLcjs.HEADING_RATIO_H3) level = 3;
|
|
7022
7022
|
if (level > 0) {
|
|
7023
7023
|
block.type = "heading";
|
|
7024
7024
|
block.level = level;
|
|
@@ -7031,7 +7031,7 @@ function isChapterNumber(block, next, medianFontSize) {
|
|
|
7031
7031
|
const nextSize = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _195 => _195.style, 'optionalAccess', _196 => _196.fontSize]), () => ( 0));
|
|
7032
7032
|
const text = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _197 => _197.text, 'optionalAccess', _198 => _198.trim, 'call', _199 => _199()]), () => ( ""));
|
|
7033
7033
|
const a = block.bbox, b = _optionalChain([next, 'optionalAccess', _200 => _200.bbox]);
|
|
7034
|
-
return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _201 => _201.text, 'optionalAccess', _202 => _202.trim, 'call', _203 => _203()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize *
|
|
7034
|
+
return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _201 => _201.text, 'optionalAccess', _202 => _202.trim, 'call', _203 => _203()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize * _chunkGITPHKYLcjs.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;
|
|
7035
7035
|
}
|
|
7036
7036
|
function mergeStackedHeadingLines(blocks, medianFontSize) {
|
|
7037
7037
|
for (let i = 0; i < blocks.length - 1; ) {
|
|
@@ -8801,16 +8801,16 @@ function isProseSpread(items) {
|
|
|
8801
8801
|
for (let i = 1; i < sorted.length; i++) {
|
|
8802
8802
|
gaps.push(sorted[i].x - (sorted[i - 1].x + sorted[i - 1].w));
|
|
8803
8803
|
}
|
|
8804
|
-
const maxGap =
|
|
8804
|
+
const maxGap = _chunk4T4Y2WRRcjs.safeMax.call(void 0, gaps);
|
|
8805
8805
|
const avgLen = items.reduce((s, i) => s + i.text.length, 0) / items.length;
|
|
8806
8806
|
if (items.length >= 4 && maxGap < 40 && avgLen < 5) return true;
|
|
8807
|
-
const minGap =
|
|
8807
|
+
const minGap = _chunk4T4Y2WRRcjs.safeMin.call(void 0, gaps);
|
|
8808
8808
|
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 || items.some((i) => /\p{L}[,.;:]["”’)]?$/u.test(i.text)));
|
|
8809
8809
|
}
|
|
8810
8810
|
function detectColumns(yLines) {
|
|
8811
8811
|
const allItems = yLines.flat();
|
|
8812
8812
|
if (allItems.length === 0) return null;
|
|
8813
|
-
const pageWidth =
|
|
8813
|
+
const pageWidth = _chunk4T4Y2WRRcjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunk4T4Y2WRRcjs.safeMin.call(void 0, allItems.map((i) => i.x));
|
|
8814
8814
|
if (pageWidth < 100) return null;
|
|
8815
8815
|
let bigoLineIdx = -1;
|
|
8816
8816
|
for (let i = 0; i < yLines.length; i++) {
|
|
@@ -9208,13 +9208,13 @@ function partTex(group) {
|
|
|
9208
9208
|
const base = Math.min(...g.filter((i) => i.fontSize >= size * SCRIPT_SIZE_RATIO).map((i) => i.y));
|
|
9209
9209
|
let s = "", run = "";
|
|
9210
9210
|
const flush = () => {
|
|
9211
|
-
if (run) s +=
|
|
9211
|
+
if (run) s += _chunkGITPHKYLcjs.toTex.call(void 0, run);
|
|
9212
9212
|
run = "";
|
|
9213
9213
|
};
|
|
9214
9214
|
g.forEach((it, k) => {
|
|
9215
9215
|
if (it.fontSize < size * SCRIPT_SIZE_RATIO && it.y - base >= size * SCRIPT_RISE_EM) {
|
|
9216
9216
|
flush();
|
|
9217
|
-
s += `^{${
|
|
9217
|
+
s += `^{${_chunkGITPHKYLcjs.toTex.call(void 0, it.text)}}`;
|
|
9218
9218
|
return;
|
|
9219
9219
|
}
|
|
9220
9220
|
if (k && it.x - (g[k - 1].x + g[k - 1].w) > spaceGapThreshold(it.fontSize)) run += " ";
|
|
@@ -9387,7 +9387,7 @@ function rebuildUnitLine(items, grid) {
|
|
|
9387
9387
|
function prependUnitRow(cells, cols, line, usedItems) {
|
|
9388
9388
|
const text = cleanCellText(line.map((item) => item.text).join(""));
|
|
9389
9389
|
cells.unshift(Array.from({ length: cols }, (_, c) => ({ text: c === 0 ? text : "", colSpan: c === 0 ? cols : 1, rowSpan: 1 })));
|
|
9390
|
-
for (const cell of cells[0])
|
|
9390
|
+
for (const cell of cells[0]) _chunkGITPHKYLcjs.CELL_EDGES.set(cell, NO_EDGES);
|
|
9391
9391
|
for (const item of line) usedItems.add(item);
|
|
9392
9392
|
}
|
|
9393
9393
|
function attachUnitRow(items, grid, cells, cols, usedItems) {
|
|
@@ -9969,7 +9969,7 @@ function recordFrameTitle(table, source, pageNum) {
|
|
|
9969
9969
|
const [label, spacer, title] = cells;
|
|
9970
9970
|
if (!/^(?:붙임|별첨|첨부|부록)\s*\d{1,3}$/.test(label.text.trim()) || spacer.text.trim() || !title.text.trim()) return;
|
|
9971
9971
|
if (cells.some((c) => {
|
|
9972
|
-
const e =
|
|
9972
|
+
const e = _chunkGITPHKYLcjs.CELL_EDGES.get(c);
|
|
9973
9973
|
return !e || e.t || e.b || e.l || e.r;
|
|
9974
9974
|
})) return;
|
|
9975
9975
|
const xs = TABLE_COLXS.get(table), style = dominantStyle(source), fs = _nullishCoalesce(_optionalChain([style, 'optionalAccess', _395 => _395.fontSize]), () => ( 0));
|
|
@@ -10730,7 +10730,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
10730
10730
|
groupSizes.push(1);
|
|
10731
10731
|
}
|
|
10732
10732
|
const allY = remaining.map((i) => i.y);
|
|
10733
|
-
const pageH =
|
|
10733
|
+
const pageH = _chunk4T4Y2WRRcjs.safeMax.call(void 0, allY) - _chunk4T4Y2WRRcjs.safeMin.call(void 0, allY);
|
|
10734
10734
|
const gapThreshold = Math.max(15, pageH * 0.03);
|
|
10735
10735
|
const sides = frameColumnTextBands(remaining, spanning, gx);
|
|
10736
10736
|
const textBlocks = [];
|
|
@@ -10746,7 +10746,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
10746
10746
|
finalTextBlocks.push(...detectListBlocks(textBlocks));
|
|
10747
10747
|
} else {
|
|
10748
10748
|
const allY = remaining.map((i) => i.y);
|
|
10749
|
-
const pageH =
|
|
10749
|
+
const pageH = _chunk4T4Y2WRRcjs.safeMax.call(void 0, allY) - _chunk4T4Y2WRRcjs.safeMin.call(void 0, allY);
|
|
10750
10750
|
const gapThreshold = Math.max(15, pageH * 0.03);
|
|
10751
10751
|
const groups = xyCutOrder(remaining, gapThreshold);
|
|
10752
10752
|
const textBlocks = [];
|
|
@@ -11108,7 +11108,7 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false, detectTable
|
|
|
11108
11108
|
blocks.push(...columnTextToBlocks(tableText, pageNum, bbox, dominantStyle(items)));
|
|
11109
11109
|
} else {
|
|
11110
11110
|
const allY = items.map((i) => i.y);
|
|
11111
|
-
const pageHeight =
|
|
11111
|
+
const pageHeight = _chunk4T4Y2WRRcjs.safeMax.call(void 0, allY) - _chunk4T4Y2WRRcjs.safeMin.call(void 0, allY);
|
|
11112
11112
|
const gapThreshold = Math.max(15, pageHeight * 0.03);
|
|
11113
11113
|
const orderedGroups = proseCutX !== null ? splitTwoColumnProse(items, proseCutX) : xyCutOrder(items, gapThreshold, 0, void 0, minGap);
|
|
11114
11114
|
for (const group of orderedGroups) {
|
|
@@ -11378,4 +11378,4 @@ function rowParagraphs(block) {
|
|
|
11378
11378
|
|
|
11379
11379
|
|
|
11380
11380
|
exports.DEFAULT_OCR_MODELS = DEFAULT_OCR_MODELS; exports.resolveOcrModels = resolveOcrModels; exports.handwritingFallbackModels = handwritingFallbackModels; exports.ocrSelectionKey = ocrSelectionKey; exports.ocrSourcePath = ocrSourcePath; exports.ensureOcrModelsFor = ensureOcrModelsFor; exports.ocrModelsCached = ocrModelsCached; exports.parseCharacterDict = parseCharacterDict; exports.grayCrop = grayCrop; exports.inkStats = inkStats; exports.splitRowBands = splitRowBands; exports.leadingTriangle = leadingTriangle; exports.arrowGlyph = arrowGlyph; exports.leaderRuns = leaderRuns; exports.inkBounds = inkBounds; exports.bracketFeatures = bracketFeatures; exports.slantedPair = slantedPair; exports.romanStems = romanStems; exports.circledAt = circledAt; exports.ringBoxes = ringBoxes; exports.quoteHead = quoteHead; exports.edgeTrim = edgeTrim; exports.tallInkCount = tallInkCount; exports.gapGlyphs = gapGlyphs; exports.ringBullet = ringBullet; exports.dashRatio = dashRatio; exports.leadingRing = leadingRing; exports.discAt = discAt; exports.serifOne = serifOne; exports.starRun = starRun; exports.bracketShape = bracketShape; exports.leadingBullet = leadingBullet; exports.stackedGlyphBands = stackedGlyphBands; exports.rememberOcrTextGaps = rememberOcrTextGaps; exports.copyOcrTextGaps = copyOcrTextGaps; exports.findOcrTextGaps = findOcrTextGaps; exports.extractLines = extractLines; exports.extractImageRegions = extractImageRegions; exports.NO_EDGES = NO_EDGES; exports.hasOpenCellSeam = hasOpenCellSeam; exports.joinCellEdges = joinCellEdges; 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.splitPageBreakWraps = splitPageBreakWraps; 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.runningLinePatterns = runningLinePatterns; exports.stripAbsorbedRunningLines = stripAbsorbedRunningLines; 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.restoreImageBullets = restoreImageBullets; exports.detectRightArrowRegions = detectRightArrowRegions; exports.removeSideTabs = removeSideTabs; exports.extractPageBlocksWithLines = extractPageBlocksWithLines; exports.UNRULED_REGION_TABLES = UNRULED_REGION_TABLES; exports.mergeOcrImageRegions = mergeOcrImageRegions;
|
|
11381
|
-
//# sourceMappingURL=chunk-
|
|
11381
|
+
//# sourceMappingURL=chunk-B4ZNG3G7.cjs.map
|