kordoc 4.24.76 → 4.24.77
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 +2 -2
- package/dist/{-2LCJEMU4.js → -5UTN72IU.js} +22 -22
- package/dist/{chunk-43VUUMKV.cjs → chunk-3FCFBMS5.cjs} +6 -6
- package/dist/{chunk-43VUUMKV.cjs.map → chunk-3FCFBMS5.cjs.map} +1 -1
- package/dist/{chunk-J6RLB6KE.js → chunk-4MAW3JZO.js} +2 -2
- package/dist/{chunk-CWEB4XAH.js → chunk-5D25RVT5.js} +5 -5
- package/dist/{chunk-E2RQPNXX.js → chunk-5TM34VJ5.js} +2 -2
- package/dist/{chunk-RNBBMRKF.js → chunk-5XWGKCPA.js} +2 -2
- package/dist/{chunk-PE3XRCTM.js → chunk-67WGWE23.js} +4 -4
- package/dist/{chunk-T7YHAP4A.js → chunk-6P3XVII7.js} +3 -3
- package/dist/{chunk-DTKVCSRC.js → chunk-7AWQXTSU.js} +2 -2
- package/dist/{chunk-2ZQUSUDC.js → chunk-7Y2RNRWL.js} +5 -5
- package/dist/{chunk-IRCO55NY.js → chunk-A7VTEP5R.js} +2 -2
- package/dist/{chunk-TGM5V7UD.js → chunk-AMSLIVAC.js} +2 -2
- package/dist/{chunk-MHDVZBUV.js → chunk-AOBRIYGM.js} +2 -2
- package/dist/{chunk-MQ44UJN6.js → chunk-BFAGTWOT.js} +10 -6
- package/dist/chunk-BFAGTWOT.js.map +1 -0
- package/dist/{chunk-MRHLGVK5.js → chunk-BPMDM3JP.js} +2 -2
- package/dist/{chunk-PJ32UFPA.js → chunk-CG4BCYQ2.js} +2 -2
- package/dist/{chunk-2P5GYSEI.js → chunk-CNUWB5NK.js} +2 -2
- package/dist/{chunk-QDETIVPA.js → chunk-D4XGVKQV.js} +6 -6
- package/dist/{chunk-A7QRUXCJ.cjs → chunk-DGOTUUCW.cjs} +3 -3
- package/dist/{chunk-A7QRUXCJ.cjs.map → chunk-DGOTUUCW.cjs.map} +1 -1
- package/dist/{chunk-QIVOVMEC.cjs → chunk-DZX2B4CB.cjs} +2 -2
- package/dist/{chunk-QIVOVMEC.cjs.map → chunk-DZX2B4CB.cjs.map} +1 -1
- package/dist/{chunk-ODJRLTXE.js → chunk-EFLSK5JD.js} +2 -2
- package/dist/{chunk-DIUYXWT2.cjs → chunk-ENGSBT44.cjs} +3 -3
- package/dist/{chunk-DIUYXWT2.cjs.map → chunk-ENGSBT44.cjs.map} +1 -1
- package/dist/{chunk-4L3SF7EF.js → chunk-ERMTVALW.js} +2 -2
- package/dist/{chunk-PATC34WZ.js → chunk-F33LA2ET.js} +111 -12
- package/dist/chunk-F33LA2ET.js.map +1 -0
- package/dist/{chunk-V3MVGLWO.js → chunk-GCUP3CBW.js} +5 -5
- package/dist/{chunk-ZWA3MWAE.js → chunk-GUTZU7XE.js} +3 -3
- package/dist/{chunk-BUZLNJXB.js → chunk-H7HRVW32.js} +2 -2
- package/dist/{chunk-QCH63KBP.cjs → chunk-HDDU4LP5.cjs} +104 -104
- package/dist/{chunk-QCH63KBP.cjs.map → chunk-HDDU4LP5.cjs.map} +1 -1
- package/dist/{chunk-2P3SFHOF.cjs → chunk-JVM237XE.cjs} +88 -88
- package/dist/{chunk-2P3SFHOF.cjs.map → chunk-JVM237XE.cjs.map} +1 -1
- package/dist/{chunk-SABDVSQU.js → chunk-K6YLVT6X.js} +11 -11
- package/dist/{chunk-JYNG27VR.js → chunk-LGQ75OKH.js} +9 -5
- package/dist/chunk-LGQ75OKH.js.map +1 -0
- package/dist/{chunk-XM4VBVYH.cjs → chunk-LHHZZVRD.cjs} +8 -8
- package/dist/{chunk-XM4VBVYH.cjs.map → chunk-LHHZZVRD.cjs.map} +1 -1
- package/dist/{chunk-HHRQX733.cjs → chunk-O5IIMWXC.cjs} +31 -27
- package/dist/chunk-O5IIMWXC.cjs.map +1 -0
- package/dist/{chunk-SQ7BI34M.js → chunk-OLO76CMN.js} +3 -3
- package/dist/{chunk-XIUXBJHE.js → chunk-P6GTNKAA.js} +2 -2
- package/dist/{chunk-RZXJFM3A.js → chunk-QJ7MMZUI.js} +2 -2
- package/dist/{chunk-LFXIZHPE.js → chunk-QWK3DGUI.js} +16 -16
- package/dist/{chunk-U7EJ6QY7.js → chunk-SAUEKG7G.js} +3 -3
- package/dist/{chunk-XOC5PVAC.js → chunk-SKP4XXCB.js} +2 -2
- package/dist/{chunk-JT54JHR3.js → chunk-T424VUF7.js} +2 -2
- package/dist/{chunk-45AT4XJD.js → chunk-UFTF2BO7.js} +2 -2
- package/dist/{chunk-DKRKNL2X.cjs → chunk-UIHCY476.cjs} +58 -58
- package/dist/{chunk-DKRKNL2X.cjs.map → chunk-UIHCY476.cjs.map} +1 -1
- package/dist/{chunk-ODQJEBCB.js → chunk-UN3YZZNT.js} +2 -2
- package/dist/{chunk-HQXVNLH2.js → chunk-XY5BFX3H.js} +6 -6
- package/dist/{chunk-3X3ETOLW.js → chunk-Y2RWVFGG.js} +7 -7
- package/dist/{chunk-WTKISVEW.js → chunk-YSOXWADD.js} +2 -2
- package/dist/{chunk-4RB5OPUZ.js → chunk-ZZNZGQRX.js} +2 -2
- package/dist/chunks-QN364YXU.js +11 -0
- package/dist/cli.js +46 -46
- package/dist/{formula-3RUSZL2X.js → formula-37OIV2H3.js} +4 -4
- package/dist/{formula-UJKRUT4H.js → formula-P6EJMUKF.js} +3 -3
- package/dist/{formula-PNWIA2MN.cjs → formula-YN4NKDPV.cjs} +9 -9
- package/dist/{formula-PNWIA2MN.cjs.map → formula-YN4NKDPV.cjs.map} +1 -1
- package/dist/generator-6YDUW5RE.cjs +12 -0
- package/dist/{generator-3S2MTXHO.cjs.map → generator-6YDUW5RE.cjs.map} +1 -1
- package/dist/generator-C5FWPI6A.js +18 -0
- package/dist/generator-JX3OZYTO.js +11 -0
- package/dist/{hancom-VLS77NRS.js → hancom-547ZXYYE.js} +2 -2
- package/dist/{hancom-4LFQU2RS.js → hancom-GOOSRL7W.js} +2 -2
- package/dist/{hancom-35Z4YAJB.cjs → hancom-LKRD7PXX.cjs} +5 -5
- package/dist/{hancom-35Z4YAJB.cjs.map → hancom-LKRD7PXX.cjs.map} +1 -1
- package/dist/{image-ocr-CCLUXSWY.js → image-ocr-6HQTBMLN.js} +11 -11
- package/dist/{image-ocr-AGEB22EF.cjs → image-ocr-EZEOBMEQ.cjs} +36 -36
- package/dist/{image-ocr-AGEB22EF.cjs.map → image-ocr-EZEOBMEQ.cjs.map} +1 -1
- package/dist/{image-ocr-B7RRK43I.js → image-ocr-RNY2H3HS.js} +8 -8
- package/dist/index.cjs +1214 -1115
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +111 -12
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +37 -37
- package/dist/memo-RE3TCSXK.js +17 -0
- package/dist/{model-bundle-KFPWVEFB.js → model-bundle-ZYGK4G65.js} +5 -5
- package/dist/{models-IOX5WK67.js → models-K65TUK4Q.js} +5 -5
- package/dist/{parse-worker-v2-IL6U65X3.js → parse-worker-v2-VOM4DPZV.js} +23 -23
- package/dist/{parser-ANWES7Z3.js → parser-6KOCPC6H.js} +22 -13
- package/dist/{parser-ANWES7Z3.js.map → parser-6KOCPC6H.js.map} +1 -1
- package/dist/{parser-NCSJG5KJ.cjs → parser-7V6AQMPT.cjs} +176 -167
- package/dist/parser-7V6AQMPT.cjs.map +1 -0
- package/dist/{parser-ATU5CQZY.js → parser-SNW4ZFUX.js} +19 -10
- package/dist/{parser-ATU5CQZY.js.map → parser-SNW4ZFUX.js.map} +1 -1
- package/dist/{pdf-ocr-7IH7FGKQ.js → pdf-ocr-2JDCK34V.js} +9 -9
- package/dist/pdf-ocr-A4GJJCT3.cjs +43 -0
- package/dist/{pdf-ocr-F3ABLLXD.cjs.map → pdf-ocr-A4GJJCT3.cjs.map} +1 -1
- package/dist/{pdf-ocr-ZUGHKM32.js → pdf-ocr-JNCOGFLO.js} +6 -6
- package/dist/{profile-io-BGUQJDGK.js → profile-io-WHUZPJEM.js} +3 -3
- package/dist/{rasterize-JOAG2QCQ.js → rasterize-XR5V2FQQ.js} +3 -3
- package/dist/{redact-doc-WL2GWBMN.js → redact-doc-5FMV7KOY.js} +22 -22
- package/dist/{render-672D354C.js → render-OKC4QJUY.js} +12 -12
- package/dist/{rewrite-fallback-2JAAIU6G.js → rewrite-fallback-Y6ZUV6GG.js} +13 -13
- package/dist/seal-VMMMFVLG.js +16 -0
- package/dist/{setup-L4PVFG65.js → setup-Q6CIDVRW.js} +3 -3
- package/dist/to-hwpx-B7RPAOQC.cjs +16 -0
- package/dist/{to-hwpx-VBVI5H4N.cjs.map → to-hwpx-B7RPAOQC.cjs.map} +1 -1
- package/dist/{to-hwpx-OHZK2KBP.js → to-hwpx-BS2NFDUM.js} +4 -4
- package/dist/{to-hwpx-FR6GDNMY.js → to-hwpx-XFNMYMGR.js} +7 -7
- package/dist/visual-SECUV4LR.js +40 -0
- package/dist/{watch-OH4BMY2N.js → watch-ADXQOSZY.js} +23 -23
- package/package.json +1 -1
- package/dist/chunk-HHRQX733.cjs.map +0 -1
- package/dist/chunk-JYNG27VR.js.map +0 -1
- package/dist/chunk-MQ44UJN6.js.map +0 -1
- package/dist/chunk-PATC34WZ.js.map +0 -1
- package/dist/chunks-INR44FWQ.js +0 -11
- package/dist/generator-335G75L5.js +0 -11
- package/dist/generator-3S2MTXHO.cjs +0 -12
- package/dist/generator-R2CZZ2KU.js +0 -18
- package/dist/memo-SPNLGMIZ.js +0 -17
- package/dist/parser-NCSJG5KJ.cjs.map +0 -1
- package/dist/pdf-ocr-F3ABLLXD.cjs +0 -43
- package/dist/seal-XLDIGIIE.js +0 -16
- package/dist/to-hwpx-VBVI5H4N.cjs +0 -16
- package/dist/visual-IXMRTYJK.js +0 -40
- /package/dist/{-2LCJEMU4.js.map → -5UTN72IU.js.map} +0 -0
- /package/dist/{chunk-J6RLB6KE.js.map → chunk-4MAW3JZO.js.map} +0 -0
- /package/dist/{chunk-CWEB4XAH.js.map → chunk-5D25RVT5.js.map} +0 -0
- /package/dist/{chunk-E2RQPNXX.js.map → chunk-5TM34VJ5.js.map} +0 -0
- /package/dist/{chunk-RNBBMRKF.js.map → chunk-5XWGKCPA.js.map} +0 -0
- /package/dist/{chunk-PE3XRCTM.js.map → chunk-67WGWE23.js.map} +0 -0
- /package/dist/{chunk-T7YHAP4A.js.map → chunk-6P3XVII7.js.map} +0 -0
- /package/dist/{chunk-DTKVCSRC.js.map → chunk-7AWQXTSU.js.map} +0 -0
- /package/dist/{chunk-2ZQUSUDC.js.map → chunk-7Y2RNRWL.js.map} +0 -0
- /package/dist/{chunk-IRCO55NY.js.map → chunk-A7VTEP5R.js.map} +0 -0
- /package/dist/{chunk-TGM5V7UD.js.map → chunk-AMSLIVAC.js.map} +0 -0
- /package/dist/{chunk-MHDVZBUV.js.map → chunk-AOBRIYGM.js.map} +0 -0
- /package/dist/{chunk-MRHLGVK5.js.map → chunk-BPMDM3JP.js.map} +0 -0
- /package/dist/{chunk-PJ32UFPA.js.map → chunk-CG4BCYQ2.js.map} +0 -0
- /package/dist/{chunk-2P5GYSEI.js.map → chunk-CNUWB5NK.js.map} +0 -0
- /package/dist/{chunk-QDETIVPA.js.map → chunk-D4XGVKQV.js.map} +0 -0
- /package/dist/{chunk-ODJRLTXE.js.map → chunk-EFLSK5JD.js.map} +0 -0
- /package/dist/{chunk-4L3SF7EF.js.map → chunk-ERMTVALW.js.map} +0 -0
- /package/dist/{chunk-V3MVGLWO.js.map → chunk-GCUP3CBW.js.map} +0 -0
- /package/dist/{chunk-ZWA3MWAE.js.map → chunk-GUTZU7XE.js.map} +0 -0
- /package/dist/{chunk-BUZLNJXB.js.map → chunk-H7HRVW32.js.map} +0 -0
- /package/dist/{chunk-SABDVSQU.js.map → chunk-K6YLVT6X.js.map} +0 -0
- /package/dist/{chunk-SQ7BI34M.js.map → chunk-OLO76CMN.js.map} +0 -0
- /package/dist/{chunk-XIUXBJHE.js.map → chunk-P6GTNKAA.js.map} +0 -0
- /package/dist/{chunk-RZXJFM3A.js.map → chunk-QJ7MMZUI.js.map} +0 -0
- /package/dist/{chunk-LFXIZHPE.js.map → chunk-QWK3DGUI.js.map} +0 -0
- /package/dist/{chunk-U7EJ6QY7.js.map → chunk-SAUEKG7G.js.map} +0 -0
- /package/dist/{chunk-XOC5PVAC.js.map → chunk-SKP4XXCB.js.map} +0 -0
- /package/dist/{chunk-JT54JHR3.js.map → chunk-T424VUF7.js.map} +0 -0
- /package/dist/{chunk-45AT4XJD.js.map → chunk-UFTF2BO7.js.map} +0 -0
- /package/dist/{chunk-ODQJEBCB.js.map → chunk-UN3YZZNT.js.map} +0 -0
- /package/dist/{chunk-HQXVNLH2.js.map → chunk-XY5BFX3H.js.map} +0 -0
- /package/dist/{chunk-3X3ETOLW.js.map → chunk-Y2RWVFGG.js.map} +0 -0
- /package/dist/{chunk-WTKISVEW.js.map → chunk-YSOXWADD.js.map} +0 -0
- /package/dist/{chunk-4RB5OPUZ.js.map → chunk-ZZNZGQRX.js.map} +0 -0
- /package/dist/{chunks-INR44FWQ.js.map → chunks-QN364YXU.js.map} +0 -0
- /package/dist/{formula-3RUSZL2X.js.map → formula-37OIV2H3.js.map} +0 -0
- /package/dist/{formula-UJKRUT4H.js.map → formula-P6EJMUKF.js.map} +0 -0
- /package/dist/{generator-335G75L5.js.map → generator-C5FWPI6A.js.map} +0 -0
- /package/dist/{generator-R2CZZ2KU.js.map → generator-JX3OZYTO.js.map} +0 -0
- /package/dist/{hancom-VLS77NRS.js.map → hancom-547ZXYYE.js.map} +0 -0
- /package/dist/{hancom-4LFQU2RS.js.map → hancom-GOOSRL7W.js.map} +0 -0
- /package/dist/{image-ocr-CCLUXSWY.js.map → image-ocr-6HQTBMLN.js.map} +0 -0
- /package/dist/{image-ocr-B7RRK43I.js.map → image-ocr-RNY2H3HS.js.map} +0 -0
- /package/dist/{memo-SPNLGMIZ.js.map → memo-RE3TCSXK.js.map} +0 -0
- /package/dist/{model-bundle-KFPWVEFB.js.map → model-bundle-ZYGK4G65.js.map} +0 -0
- /package/dist/{models-IOX5WK67.js.map → models-K65TUK4Q.js.map} +0 -0
- /package/dist/{parse-worker-v2-IL6U65X3.js.map → parse-worker-v2-VOM4DPZV.js.map} +0 -0
- /package/dist/{pdf-ocr-7IH7FGKQ.js.map → pdf-ocr-2JDCK34V.js.map} +0 -0
- /package/dist/{pdf-ocr-ZUGHKM32.js.map → pdf-ocr-JNCOGFLO.js.map} +0 -0
- /package/dist/{profile-io-BGUQJDGK.js.map → profile-io-WHUZPJEM.js.map} +0 -0
- /package/dist/{rasterize-JOAG2QCQ.js.map → rasterize-XR5V2FQQ.js.map} +0 -0
- /package/dist/{redact-doc-WL2GWBMN.js.map → redact-doc-5FMV7KOY.js.map} +0 -0
- /package/dist/{render-672D354C.js.map → render-OKC4QJUY.js.map} +0 -0
- /package/dist/{rewrite-fallback-2JAAIU6G.js.map → rewrite-fallback-Y6ZUV6GG.js.map} +0 -0
- /package/dist/{seal-XLDIGIIE.js.map → seal-VMMMFVLG.js.map} +0 -0
- /package/dist/{setup-L4PVFG65.js.map → setup-Q6CIDVRW.js.map} +0 -0
- /package/dist/{to-hwpx-FR6GDNMY.js.map → to-hwpx-BS2NFDUM.js.map} +0 -0
- /package/dist/{to-hwpx-OHZK2KBP.js.map → to-hwpx-XFNMYMGR.js.map} +0 -0
- /package/dist/{visual-IXMRTYJK.js.map → visual-SECUV4LR.js.map} +0 -0
- /package/dist/{watch-OH4BMY2N.js.map → watch-ADXQOSZY.js.map} +0 -0
package/dist/mcp.js
CHANGED
|
@@ -48,46 +48,46 @@ import {
|
|
|
48
48
|
unknownFontWarnings,
|
|
49
49
|
usesGaejosikMunche,
|
|
50
50
|
usesLogicStructure
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-QWK3DGUI.js";
|
|
52
|
+
import "./chunk-F33LA2ET.js";
|
|
53
|
+
import "./chunk-AMSLIVAC.js";
|
|
54
54
|
import {
|
|
55
55
|
extractHwpxMetadataOnly,
|
|
56
56
|
patchHwp,
|
|
57
57
|
patchHwpx
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import "./chunk-
|
|
58
|
+
} from "./chunk-K6YLVT6X.js";
|
|
59
|
+
import "./chunk-6P3XVII7.js";
|
|
60
60
|
import {
|
|
61
61
|
AGENCY_COMMON_NAME,
|
|
62
62
|
PRESET_ALIAS,
|
|
63
63
|
agencyNames,
|
|
64
64
|
incompatibleGongmunWarnings,
|
|
65
65
|
markdownToHwpx
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
66
|
+
} from "./chunk-XY5BFX3H.js";
|
|
67
|
+
import "./chunk-H7HRVW32.js";
|
|
68
|
+
import "./chunk-D4XGVKQV.js";
|
|
69
|
+
import "./chunk-7Y2RNRWL.js";
|
|
70
|
+
import "./chunk-SKP4XXCB.js";
|
|
71
|
+
import "./chunk-QJ7MMZUI.js";
|
|
72
72
|
import {
|
|
73
73
|
extractFormFields,
|
|
74
74
|
fillWithUniqueGuard
|
|
75
75
|
} from "./chunk-3AHL6YEA.js";
|
|
76
|
-
import "./chunk-
|
|
76
|
+
import "./chunk-5XWGKCPA.js";
|
|
77
77
|
import {
|
|
78
78
|
hwpToHwpx
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-Y2RWVFGG.js";
|
|
80
80
|
import {
|
|
81
81
|
extractHwp5MetadataOnly
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-GCUP3CBW.js";
|
|
83
83
|
import "./chunk-ZP2EW3YG.js";
|
|
84
|
-
import "./chunk-
|
|
84
|
+
import "./chunk-CG4BCYQ2.js";
|
|
85
85
|
import "./chunk-WFKFG2RT.js";
|
|
86
86
|
import "./chunk-3WSNLH4B.js";
|
|
87
|
-
import "./chunk-
|
|
88
|
-
import "./chunk-
|
|
87
|
+
import "./chunk-CNUWB5NK.js";
|
|
88
|
+
import "./chunk-UFTF2BO7.js";
|
|
89
89
|
import "./chunk-VQFA55IC.js";
|
|
90
|
-
import "./chunk-
|
|
90
|
+
import "./chunk-ERMTVALW.js";
|
|
91
91
|
import "./chunk-EFQPEQ43.js";
|
|
92
92
|
import "./chunk-CK7LADMK.js";
|
|
93
93
|
import {
|
|
@@ -98,16 +98,16 @@ import {
|
|
|
98
98
|
import "./chunk-H7K5YHWQ.js";
|
|
99
99
|
import "./chunk-IIOBUTXH.js";
|
|
100
100
|
import "./chunk-QLZHIJWJ.js";
|
|
101
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-ZZNZGQRX.js";
|
|
102
102
|
import {
|
|
103
103
|
blocksToMarkdown
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-A7VTEP5R.js";
|
|
105
105
|
import "./chunk-KFF47XZ7.js";
|
|
106
106
|
import {
|
|
107
107
|
assertWithinRoot,
|
|
108
108
|
getAccessRoot,
|
|
109
109
|
isOfflineMode
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-BPMDM3JP.js";
|
|
111
111
|
import {
|
|
112
112
|
KordocError,
|
|
113
113
|
VERSION,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
routeConsoleToStderr,
|
|
116
116
|
sanitizeError,
|
|
117
117
|
toArrayBuffer
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-7AWQXTSU.js";
|
|
119
119
|
|
|
120
120
|
// src/mcp.ts
|
|
121
121
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -432,7 +432,7 @@ ${markdown}`);
|
|
|
432
432
|
break;
|
|
433
433
|
case "pdf":
|
|
434
434
|
try {
|
|
435
|
-
const { extractPdfMetadataOnly } = await import("./parser-
|
|
435
|
+
const { extractPdfMetadataOnly } = await import("./parser-6KOCPC6H.js");
|
|
436
436
|
metadata = await extractPdfMetadataOnly(buffer);
|
|
437
437
|
} catch {
|
|
438
438
|
metadata = void 0;
|
|
@@ -609,7 +609,7 @@ ${tableMarkdown}` }]
|
|
|
609
609
|
if (!parsed.success) {
|
|
610
610
|
return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
|
|
611
611
|
}
|
|
612
|
-
const { blocksToChunks } = await import("./chunks-
|
|
612
|
+
const { blocksToChunks } = await import("./chunks-QN364YXU.js");
|
|
613
613
|
const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
|
|
614
614
|
return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
|
|
615
615
|
} catch (err) {
|
|
@@ -889,7 +889,7 @@ ${previewMd}` }]
|
|
|
889
889
|
}
|
|
890
890
|
const image = new Uint8Array(await readFile2(imgResolved));
|
|
891
891
|
const ext = extname2(imgResolved).slice(1).toLowerCase();
|
|
892
|
-
const { placeSealHwpx } = await import("./seal-
|
|
892
|
+
const { placeSealHwpx } = await import("./seal-VMMMFVLG.js");
|
|
893
893
|
const result = await placeSealHwpx(buffer, [{
|
|
894
894
|
anchor,
|
|
895
895
|
occurrence,
|
|
@@ -945,7 +945,7 @@ ${previewMd}` }]
|
|
|
945
945
|
if (format !== "hwpx") {
|
|
946
946
|
return { content: [{ type: "text", text: `add_memo \uB294 HWPX\xB7HWP 5.x \uD30C\uC77C\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 (\uAC10\uC9C0\uB41C \uD3EC\uB9F7: ${format}).` }], isError: true };
|
|
947
947
|
}
|
|
948
|
-
const { addMemoHwpx } = await import("./memo-
|
|
948
|
+
const { addMemoHwpx } = await import("./memo-RE3TCSXK.js");
|
|
949
949
|
const result = await addMemoHwpx(buffer, [{ anchor, text, author, occurrence }]);
|
|
950
950
|
await mkdir(dirname2(outPath), { recursive: true });
|
|
951
951
|
await writeOutputFile(outPath, Buffer.from(result.buffer));
|
|
@@ -987,7 +987,7 @@ ${previewMd}` }]
|
|
|
987
987
|
}
|
|
988
988
|
const original = new Uint8Array(buffer);
|
|
989
989
|
const result = isHwpx ? await patchHwpx(original, edited_markdown, structure === false ? { structure: false } : void 0) : await patchHwp(original, edited_markdown);
|
|
990
|
-
const { needsRewrite, rewriteEdited, rewritePath } = await import("./rewrite-fallback-
|
|
990
|
+
const { needsRewrite, rewriteEdited, rewritePath } = await import("./rewrite-fallback-Y6ZUV6GG.js");
|
|
991
991
|
const rewrite = needsRewrite(result) ? await rewriteEdited(original, isHwpx, edited_markdown, result.success) : null;
|
|
992
992
|
const rwOut = rewrite ? safeOutputPath(rewritePath(out), /* @__PURE__ */ new Set([".hwpx"])) : void 0;
|
|
993
993
|
if (rewrite && rwOut) {
|
|
@@ -1056,7 +1056,7 @@ ${rewriteLine}` }] };
|
|
|
1056
1056
|
if (outPath && await isSameFile(outPath, resolved)) {
|
|
1057
1057
|
return { content: [{ type: "text", text: "output_path\uAC00 \uC785\uB825 \uD30C\uC77C\uACFC \uAC19\uC2B5\uB2C8\uB2E4 \u2014 \uC6D0\uBCF8\uC744 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694." }], isError: true };
|
|
1058
1058
|
}
|
|
1059
|
-
const { redactDocument } = await import("./redact-doc-
|
|
1059
|
+
const { redactDocument } = await import("./redact-doc-5FMV7KOY.js");
|
|
1060
1060
|
const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
|
|
1061
1061
|
const MAX_LINES = 50;
|
|
1062
1062
|
const listed = r.fileHits.length > 0 ? r.fileHits.map((h) => ` - [${h.rule}] ${h.masked} (${h.where} @ ${h.part})`) : r.markdownHits.map((h) => ` - [${h.rule}] ${h.masked}`);
|
|
@@ -1131,7 +1131,7 @@ function registerRenderTools(server2) {
|
|
|
1131
1131
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1132
1132
|
const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
|
|
1133
1133
|
if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
|
|
1134
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
1134
|
+
const { renderHwpxToSvg } = await import("./render-OKC4QJUY.js");
|
|
1135
1135
|
const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode, password });
|
|
1136
1136
|
const summary2 = [
|
|
1137
1137
|
`\uB80C\uB354 \uC644\uB8CC: ${result.pageCount}\uD398\uC774\uC9C0, ${Math.round(result.width)}x${Math.round(result.height)}pt (\uD14D\uC2A4\uD2B8 ${result.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${result.stats.images}\xB7\uD45C ${result.stats.tables})`,
|
|
@@ -1143,7 +1143,7 @@ function registerRenderTools(server2) {
|
|
|
1143
1143
|
summary2.push(`\uC800\uC7A5: ${outPath}`);
|
|
1144
1144
|
return { content: [{ type: "text", text: summary2.join("\n") }] };
|
|
1145
1145
|
}
|
|
1146
|
-
const { rasterizeSvg } = await import("./rasterize-
|
|
1146
|
+
const { rasterizeSvg } = await import("./rasterize-XR5V2FQQ.js");
|
|
1147
1147
|
const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
|
|
1148
1148
|
if (outPath) {
|
|
1149
1149
|
await mkdir2(dirname3(outPath), { recursive: true });
|
|
@@ -1158,7 +1158,7 @@ function registerRenderTools(server2) {
|
|
|
1158
1158
|
]
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
|
-
const { renderDocument } = await import("./render-
|
|
1161
|
+
const { renderDocument } = await import("./render-OKC4QJUY.js");
|
|
1162
1162
|
const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px, password });
|
|
1163
1163
|
const summary = [
|
|
1164
1164
|
`\uB80C\uB354 \uC644\uB8CC: \uBB38\uC11C ${scene.pages.length}\uD398\uC774\uC9C0 \uC911 ${assets.filter((a) => a.page !== void 0).length || 1}\uAC74 (\uD14D\uC2A4\uD2B8 ${scene.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${scene.stats.images}\xB7\uD45C ${scene.stats.tables}\xB7\uB3C4\uD615 ${scene.stats.shapes})`,
|
|
@@ -1208,7 +1208,7 @@ function registerRenderTools(server2) {
|
|
|
1208
1208
|
try {
|
|
1209
1209
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1210
1210
|
const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
|
|
1211
|
-
const { extractRenderedRegions } = await import("./render-
|
|
1211
|
+
const { extractRenderedRegions } = await import("./render-OKC4QJUY.js");
|
|
1212
1212
|
const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
|
|
1213
1213
|
await mkdir2(dir, { recursive: true });
|
|
1214
1214
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1244,7 +1244,7 @@ function registerRenderTools(server2) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1246
1246
|
const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
|
|
1247
|
-
const { extractTables } = await import("./visual-
|
|
1247
|
+
const { extractTables } = await import("./visual-SECUV4LR.js");
|
|
1248
1248
|
const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
|
|
1249
1249
|
if (dir) await mkdir2(dir, { recursive: true });
|
|
1250
1250
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1301,7 +1301,7 @@ function registerGenerateTools(server2) {
|
|
|
1301
1301
|
try {
|
|
1302
1302
|
const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
|
|
1303
1303
|
const { buffer } = await readValidatedFile(hwpx_path);
|
|
1304
|
-
const { hwpxToProfile } = await import("./-
|
|
1304
|
+
const { hwpxToProfile } = await import("./-5UTN72IU.js");
|
|
1305
1305
|
const profile = await hwpxToProfile(buffer);
|
|
1306
1306
|
await mkdir3(dirname4(out), { recursive: true });
|
|
1307
1307
|
await writeOutputFile(out, JSON.stringify(profile, null, 2));
|
|
@@ -1456,7 +1456,7 @@ ${g.blocking.map((f) => `- ${formatGateFinding(f)}`).join("\n")}` }],
|
|
|
1456
1456
|
}
|
|
1457
1457
|
let profile;
|
|
1458
1458
|
if (profile_path) {
|
|
1459
|
-
const { parseFormatProfileJson } = await import("./profile-io-
|
|
1459
|
+
const { parseFormatProfileJson } = await import("./profile-io-WHUZPJEM.js");
|
|
1460
1460
|
profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
|
|
1461
1461
|
}
|
|
1462
1462
|
const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
|
|
@@ -1609,7 +1609,7 @@ function registerLintTools(server2) {
|
|
|
1609
1609
|
let irBlocks;
|
|
1610
1610
|
if (file_path !== void 0) {
|
|
1611
1611
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, ALLOWED_EXTENSIONS);
|
|
1612
|
-
const { parse: parse2 } = await import("./-
|
|
1612
|
+
const { parse: parse2 } = await import("./-5UTN72IU.js");
|
|
1613
1613
|
const parsed = await parse2(buffer, { filePath: resolved });
|
|
1614
1614
|
if (!parsed.success) throw new KordocError(`\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 \u2014 ${parsed.error}`);
|
|
1615
1615
|
body = parsed.markdown;
|
|
@@ -1668,7 +1668,7 @@ function registerConvertTools(server2) {
|
|
|
1668
1668
|
if (!output_path && await access(outPath).then(() => true, () => false)) {
|
|
1669
1669
|
throw new KordocError(`${outPath} \uC774(\uAC00) \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB36E\uC5B4\uC4F0\uB824\uBA74 output_path \uB85C \uACBD\uB85C\uB97C \uC9C1\uC811 \uC9C0\uC815\uD558\uC138\uC694`);
|
|
1670
1670
|
}
|
|
1671
|
-
const { convertToHwpx, validateHwpx } = await import("./-
|
|
1671
|
+
const { convertToHwpx, validateHwpx } = await import("./-5UTN72IU.js");
|
|
1672
1672
|
const result = await convertToHwpx(buffer, { password, engine });
|
|
1673
1673
|
const check = await validateHwpx(result.data);
|
|
1674
1674
|
await mkdir4(dirname5(outPath), { recursive: true });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
addMemoHwpx
|
|
4
|
+
} from "./chunk-D4XGVKQV.js";
|
|
5
|
+
import "./chunk-7Y2RNRWL.js";
|
|
6
|
+
import "./chunk-SKP4XXCB.js";
|
|
7
|
+
import "./chunk-QJ7MMZUI.js";
|
|
8
|
+
import "./chunk-3AHL6YEA.js";
|
|
9
|
+
import "./chunk-5XWGKCPA.js";
|
|
10
|
+
import "./chunk-CG4BCYQ2.js";
|
|
11
|
+
import "./chunk-WFKFG2RT.js";
|
|
12
|
+
import "./chunk-KFF47XZ7.js";
|
|
13
|
+
import "./chunk-7AWQXTSU.js";
|
|
14
|
+
export {
|
|
15
|
+
addMemoHwpx
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=memo-RE3TCSXK.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ALL_OCR_MODELS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AOBRIYGM.js";
|
|
5
5
|
import {
|
|
6
6
|
ALL_FORMULA_MODELS,
|
|
7
7
|
getModelStatusIn,
|
|
8
8
|
getModelsDir
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-EFLSK5JD.js";
|
|
10
|
+
import "./chunk-BPMDM3JP.js";
|
|
11
|
+
import "./chunk-7AWQXTSU.js";
|
|
12
12
|
|
|
13
13
|
// src/shared/model-bundle.ts
|
|
14
14
|
import { copyFile, mkdir } from "fs/promises";
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
importModels,
|
|
102
102
|
modelCacheStatus
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=model-bundle-
|
|
104
|
+
//# sourceMappingURL=model-bundle-ZYGK4G65.js.map
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
ocrSourcePath,
|
|
20
20
|
parseCharacterDict,
|
|
21
21
|
resolveOcrModels
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-AOBRIYGM.js";
|
|
23
|
+
import "./chunk-EFLSK5JD.js";
|
|
24
|
+
import "./chunk-BPMDM3JP.js";
|
|
25
|
+
import "./chunk-7AWQXTSU.js";
|
|
26
26
|
export {
|
|
27
27
|
ALL_OCR_MODELS,
|
|
28
28
|
DEFAULT_OCR_MODELS,
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
parseCharacterDict,
|
|
45
45
|
resolveOcrModels
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=models-
|
|
47
|
+
//# sourceMappingURL=models-K65TUK4Q.js.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
parseWorkerFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GUTZU7XE.js";
|
|
5
5
|
import {
|
|
6
6
|
insideSandbox
|
|
7
7
|
} from "./chunk-7Y6KVNIT.js";
|
|
8
8
|
import {
|
|
9
9
|
lintBlocks
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-QWK3DGUI.js";
|
|
11
|
+
import "./chunk-F33LA2ET.js";
|
|
12
|
+
import "./chunk-AMSLIVAC.js";
|
|
13
|
+
import "./chunk-K6YLVT6X.js";
|
|
14
|
+
import "./chunk-6P3XVII7.js";
|
|
15
15
|
import {
|
|
16
16
|
PRESET_ALIAS
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-XY5BFX3H.js";
|
|
18
|
+
import "./chunk-H7HRVW32.js";
|
|
19
|
+
import "./chunk-D4XGVKQV.js";
|
|
20
|
+
import "./chunk-7Y2RNRWL.js";
|
|
21
|
+
import "./chunk-SKP4XXCB.js";
|
|
22
|
+
import "./chunk-QJ7MMZUI.js";
|
|
23
23
|
import "./chunk-3AHL6YEA.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-5XWGKCPA.js";
|
|
25
|
+
import "./chunk-Y2RWVFGG.js";
|
|
26
|
+
import "./chunk-GCUP3CBW.js";
|
|
27
27
|
import "./chunk-ZP2EW3YG.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-CG4BCYQ2.js";
|
|
29
29
|
import "./chunk-WFKFG2RT.js";
|
|
30
30
|
import "./chunk-3WSNLH4B.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-CNUWB5NK.js";
|
|
32
|
+
import "./chunk-UFTF2BO7.js";
|
|
33
33
|
import "./chunk-VQFA55IC.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-ERMTVALW.js";
|
|
35
35
|
import "./chunk-EFQPEQ43.js";
|
|
36
36
|
import "./chunk-CK7LADMK.js";
|
|
37
37
|
import "./chunk-3O3KTZ7H.js";
|
|
@@ -40,13 +40,13 @@ import {
|
|
|
40
40
|
validateOcrOptions
|
|
41
41
|
} from "./chunk-IIOBUTXH.js";
|
|
42
42
|
import "./chunk-QLZHIJWJ.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-ZZNZGQRX.js";
|
|
44
|
+
import "./chunk-A7VTEP5R.js";
|
|
45
45
|
import "./chunk-KFF47XZ7.js";
|
|
46
46
|
import {
|
|
47
47
|
VERSION,
|
|
48
48
|
sanitizeError
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-7AWQXTSU.js";
|
|
50
50
|
|
|
51
51
|
// src/cli/parse-worker-v2.ts
|
|
52
52
|
import { createHash } from "crypto";
|
|
@@ -389,4 +389,4 @@ export {
|
|
|
389
389
|
runParseWorkerV2,
|
|
390
390
|
toParseOptions
|
|
391
391
|
};
|
|
392
|
-
//# sourceMappingURL=parse-worker-v2-
|
|
392
|
+
//# sourceMappingURL=parse-worker-v2-VOM4DPZV.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
blocksToPages,
|
|
5
5
|
isBlankRgba,
|
|
6
6
|
loadQrReader
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AMSLIVAC.js";
|
|
8
8
|
import {
|
|
9
9
|
hasRequestedPagesAfter,
|
|
10
10
|
parsePageRange
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
stripAbsorbedRunningLines,
|
|
70
70
|
trimTrailingEmptyTableCols,
|
|
71
71
|
wrapJoiner
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-LGQ75OKH.js";
|
|
73
73
|
import {
|
|
74
74
|
validateOcrOptions
|
|
75
75
|
} from "./chunk-IIOBUTXH.js";
|
|
@@ -82,12 +82,12 @@ import {
|
|
|
82
82
|
stripScriptTags,
|
|
83
83
|
toTex,
|
|
84
84
|
unframeLayoutTables
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-ZZNZGQRX.js";
|
|
86
86
|
import {
|
|
87
87
|
assignTableIds,
|
|
88
88
|
blocksToMarkdown,
|
|
89
89
|
escapeLiteralDollar
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-A7VTEP5R.js";
|
|
91
91
|
import {
|
|
92
92
|
WINGDINGS,
|
|
93
93
|
enclosedNumber,
|
|
@@ -98,13 +98,13 @@ import {
|
|
|
98
98
|
handwritingFallbackModels,
|
|
99
99
|
ocrModelsCached,
|
|
100
100
|
resolveOcrModels
|
|
101
|
-
} from "./chunk-
|
|
102
|
-
import "./chunk-
|
|
103
|
-
import "./chunk-
|
|
101
|
+
} from "./chunk-AOBRIYGM.js";
|
|
102
|
+
import "./chunk-EFLSK5JD.js";
|
|
103
|
+
import "./chunk-BPMDM3JP.js";
|
|
104
104
|
import {
|
|
105
105
|
KordocError,
|
|
106
106
|
sanitizeHref
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-7AWQXTSU.js";
|
|
108
108
|
|
|
109
109
|
// src/pdf/image-blank.ts
|
|
110
110
|
import { createHash } from "crypto";
|
|
@@ -4731,7 +4731,7 @@ function mergeLinkRuns(markdown) {
|
|
|
4731
4731
|
|
|
4732
4732
|
// src/pdf/formula-ocr.ts
|
|
4733
4733
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
4734
|
-
const formulaMod = await import("./formula-
|
|
4734
|
+
const formulaMod = await import("./formula-37OIV2H3.js");
|
|
4735
4735
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
4736
4736
|
await ensureFormulaModels((p) => {
|
|
4737
4737
|
if (p.phase === "download" && p.total) {
|
|
@@ -4985,7 +4985,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
4985
4985
|
const extractedImages = [];
|
|
4986
4986
|
const pageImageBlocks = /* @__PURE__ */ new Map();
|
|
4987
4987
|
const carry = {};
|
|
4988
|
-
const preciseGaps = await isHancomPdf(doc);
|
|
4988
|
+
const preciseGaps = await isHancomPdf(doc) || await isPreciseGapProducer(doc);
|
|
4989
4989
|
const vectorPageOps = /* @__PURE__ */ new Map();
|
|
4990
4990
|
const wrapLexicon = new WrapLexicon();
|
|
4991
4991
|
const noteMarks = /* @__PURE__ */ new Map();
|
|
@@ -5180,10 +5180,10 @@ async function parsePdfDocument(buffer, options) {
|
|
|
5180
5180
|
}
|
|
5181
5181
|
if (targets.size > 0) {
|
|
5182
5182
|
try {
|
|
5183
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
5183
|
+
const { runPdfOcr } = await import("./pdf-ocr-2JDCK34V.js");
|
|
5184
5184
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
5185
5185
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
5186
|
-
const { builtinOcrConfig } = await import("./pdf-ocr-
|
|
5186
|
+
const { builtinOcrConfig } = await import("./pdf-ocr-2JDCK34V.js");
|
|
5187
5187
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages, builtinOcrConfig(options), ocrLinesOut);
|
|
5188
5188
|
for (const obs of ocrPageBlocks.values()) stripScriptTags({ blocks: obs });
|
|
5189
5189
|
if (ocrPageBlocks.size > 0) {
|
|
@@ -5385,6 +5385,14 @@ async function extractPdfMetadata(doc, metadata) {
|
|
|
5385
5385
|
} catch {
|
|
5386
5386
|
}
|
|
5387
5387
|
}
|
|
5388
|
+
async function isPreciseGapProducer(doc) {
|
|
5389
|
+
try {
|
|
5390
|
+
const info = (await doc.getMetadata())?.info;
|
|
5391
|
+
return [info?.Producer, info?.Creator].some((v) => typeof v === "string" && /^\s*(?:microsoft: print to pdf|libreoffice)\b/i.test(v));
|
|
5392
|
+
} catch {
|
|
5393
|
+
return false;
|
|
5394
|
+
}
|
|
5395
|
+
}
|
|
5388
5396
|
async function isHancomPdf(doc) {
|
|
5389
5397
|
try {
|
|
5390
5398
|
const info = (await doc.getMetadata())?.info;
|
|
@@ -5428,9 +5436,10 @@ export {
|
|
|
5428
5436
|
detectKoreanListBlocks,
|
|
5429
5437
|
detectTableCaptions,
|
|
5430
5438
|
extractPdfMetadataOnly,
|
|
5439
|
+
isPreciseGapProducer,
|
|
5431
5440
|
mergeCrossPageTables,
|
|
5432
5441
|
ocrImageRegions,
|
|
5433
5442
|
parsePdfDocument,
|
|
5434
5443
|
removeHeaderFooterBlocks
|
|
5435
5444
|
};
|
|
5436
|
-
//# sourceMappingURL=parser-
|
|
5445
|
+
//# sourceMappingURL=parser-6KOCPC6H.js.map
|