kordoc 4.24.40 → 4.24.42
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 +4 -4
- package/dist/{-BCZOAUIB.js → -4FV4UFBP.js} +22 -22
- package/dist/{chunk-SSGMLZ4L.js → chunk-2DK2NCNW.js} +2 -2
- package/dist/{chunk-MVPRBXWX.js → chunk-2GJZMZKE.js} +5 -5
- package/dist/{chunk-3NO2PYSA.js → chunk-2RCML4RI.js} +3 -3
- package/dist/{chunk-HZFZWQN7.js → chunk-3CMQ5PPW.js} +110 -34
- package/dist/chunk-3CMQ5PPW.js.map +1 -0
- package/dist/{chunk-S2VVFKSQ.js → chunk-3PMJMMYO.js} +2 -2
- package/dist/{chunk-S4VJWOH7.js → chunk-4CGVUHGB.js} +3 -3
- package/dist/{chunk-2U57FX3D.js → chunk-6BKH6JOD.js} +44 -20
- package/dist/chunk-6BKH6JOD.js.map +1 -0
- package/dist/{chunk-M54ERXRI.cjs → chunk-7EKOJLJY.cjs} +3 -3
- package/dist/{chunk-M54ERXRI.cjs.map → chunk-7EKOJLJY.cjs.map} +1 -1
- package/dist/{chunk-7MLCHVDC.cjs → chunk-7JSL5CSQ.cjs} +98 -98
- package/dist/{chunk-7MLCHVDC.cjs.map → chunk-7JSL5CSQ.cjs.map} +1 -1
- package/dist/{chunk-EM4H62JN.js → chunk-7VRDNOXF.js} +45 -21
- package/dist/chunk-7VRDNOXF.js.map +1 -0
- package/dist/{chunk-Z4WJNI2B.cjs → chunk-BE62Y3BP.cjs} +2 -2
- package/dist/{chunk-Z4WJNI2B.cjs.map → chunk-BE62Y3BP.cjs.map} +1 -1
- package/dist/{chunk-L3VJUQT2.js → chunk-BJ6CKAQL.js} +2 -2
- package/dist/{chunk-B3EQLBCI.cjs → chunk-BOFEAPZJ.cjs} +3 -3
- package/dist/{chunk-B3EQLBCI.cjs.map → chunk-BOFEAPZJ.cjs.map} +1 -1
- package/dist/{chunk-TOM4NLMF.js → chunk-DDEOJIOC.js} +10 -10
- package/dist/{chunk-ZTA7R42I.js → chunk-DEIHO5LT.js} +6 -6
- package/dist/{chunk-SASB4AHF.js → chunk-FGTG4IIL.js} +2 -2
- package/dist/{chunk-3CEG4237.js → chunk-G64OQCI2.js} +5 -5
- package/dist/{chunk-6O7O4GZS.js → chunk-GV3JHFAA.js} +2 -2
- package/dist/{chunk-EQIKF7RR.js → chunk-I4K5GVV5.js} +48 -18
- package/dist/chunk-I4K5GVV5.js.map +1 -0
- package/dist/{chunk-LKYLW3WN.js → chunk-ICF2GY2Q.js} +111 -34
- package/dist/chunk-ICF2GY2Q.js.map +1 -0
- package/dist/{chunk-JIMG76FW.js → chunk-IIOBUTXH.js} +3 -3
- package/dist/chunk-IIOBUTXH.js.map +1 -0
- package/dist/{chunk-N54IHM64.js → chunk-INZHSNJP.js} +2 -2
- package/dist/{chunk-JZ7S7PH5.js → chunk-KGAV4N3R.js} +2 -2
- package/dist/{chunk-BRGCGIZV.cjs → chunk-KMDRZIGO.cjs} +6 -6
- package/dist/{chunk-BRGCGIZV.cjs.map → chunk-KMDRZIGO.cjs.map} +1 -1
- package/dist/{chunk-IXC35A5Q.cjs → chunk-KOVWUN2F.cjs} +200 -170
- package/dist/chunk-KOVWUN2F.cjs.map +1 -0
- package/dist/{chunk-ATFJODWS.js → chunk-L5ETE5GI.js} +2 -2
- package/dist/{chunk-ZTN3T3GH.cjs → chunk-MMK32GPD.cjs} +3 -3
- package/dist/chunk-MMK32GPD.cjs.map +1 -0
- package/dist/{chunk-POIRZQ3P.js → chunk-MXBFGNEJ.js} +2 -2
- package/dist/{chunk-SDMMPYPM.js → chunk-N3MAZNY6.js} +16 -16
- package/dist/{chunk-OGJSEAII.js → chunk-N6AEYYEV.js} +2 -2
- package/dist/{chunk-OGJSEAII.js.map → chunk-N6AEYYEV.js.map} +1 -1
- package/dist/{chunk-42GIGYXH.js → chunk-NQJCR4W6.js} +2 -2
- package/dist/{chunk-AYSIDGRR.js → chunk-PSF2OWCU.js} +3 -3
- package/dist/chunk-PSF2OWCU.js.map +1 -0
- package/dist/{chunk-I4LD2BEQ.js → chunk-QPQZUYIR.js} +2 -2
- package/dist/{chunk-SJDASJCE.js → chunk-QZEPWIRV.js} +11 -11
- package/dist/{chunk-PJFQH7MC.cjs → chunk-RP2FGGAN.cjs} +128 -104
- package/dist/chunk-RP2FGGAN.cjs.map +1 -0
- package/dist/{chunk-GZ3AUXCU.js → chunk-RSY7TU4J.js} +2 -2
- package/dist/{chunk-4CLLC2HL.cjs → chunk-RSZERVJO.cjs} +182 -106
- package/dist/chunk-RSZERVJO.cjs.map +1 -0
- package/dist/{chunk-Y5YELCJQ.js → chunk-SHJFHRDG.js} +3 -3
- package/dist/{chunk-QTD6ZAFP.js → chunk-SJOQYUWH.js} +2 -2
- package/dist/{chunk-QTD6ZAFP.js.map → chunk-SJOQYUWH.js.map} +1 -1
- package/dist/{chunk-XGCDYSJW.js → chunk-SL4UHGZV.js} +2 -2
- package/dist/{chunk-GKEUWVGE.js → chunk-SWJLFU2Y.js} +2 -2
- package/dist/{chunk-IFWGHRCQ.js → chunk-TBGGAR7W.js} +3 -3
- package/dist/chunk-TBGGAR7W.js.map +1 -0
- package/dist/{chunk-5YG5UQNQ.js → chunk-U4R7GNS3.js} +50 -20
- package/dist/chunk-U4R7GNS3.js.map +1 -0
- package/dist/{chunk-DCWMR5QQ.js → chunk-US34K54L.js} +2 -2
- package/dist/{chunk-3TTIN736.js → chunk-VLHBQ2CA.js} +2 -2
- package/dist/{chunk-OMWG727Y.js → chunk-YXBKSJXE.js} +6 -6
- package/dist/chunks-456YDGK7.js +11 -0
- package/dist/cli.js +46 -46
- package/dist/cli.js.map +1 -1
- package/dist/{formula-4T2UH2SU.js → formula-3JFTK4RE.js} +3 -3
- package/dist/{formula-CRQQYKMF.js → formula-6ZNPMIO2.js} +4 -4
- package/dist/{formula-DQ7Z2OHG.cjs → formula-KSUG6YMF.cjs} +9 -9
- package/dist/{formula-DQ7Z2OHG.cjs.map → formula-KSUG6YMF.cjs.map} +1 -1
- package/dist/generator-3XEJMYGP.js +10 -0
- package/dist/generator-HOFGOBUB.js +17 -0
- package/dist/generator-MZDOYDNL.cjs +11 -0
- package/dist/{generator-SVALWNDD.cjs.map → generator-MZDOYDNL.cjs.map} +1 -1
- package/dist/{hancom-HNX2LQ73.cjs → hancom-5OKIXXYQ.cjs} +5 -5
- package/dist/{hancom-HNX2LQ73.cjs.map → hancom-5OKIXXYQ.cjs.map} +1 -1
- package/dist/{hancom-7SBCAOEZ.js → hancom-7EP2RGN7.js} +2 -2
- package/dist/{hancom-EDHZ7SBY.js → hancom-FS3UV4XW.js} +2 -2
- package/dist/{image-ocr-6VRL4YR5.js → image-ocr-CRSF47VX.js} +12 -12
- package/dist/image-ocr-CRSF47VX.js.map +1 -0
- package/dist/{image-ocr-37JGUF74.cjs → image-ocr-PWPS6GJO.cjs} +29 -29
- package/dist/{image-ocr-37JGUF74.cjs.map → image-ocr-PWPS6GJO.cjs.map} +1 -1
- package/dist/{image-ocr-L5UN7AIS.js → image-ocr-V2NFWERQ.js} +9 -9
- package/dist/image-ocr-V2NFWERQ.js.map +1 -0
- package/dist/index.cjs +1107 -1107
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +10 -10
- package/dist/mcp.js +39 -39
- package/dist/mcp.js.map +1 -1
- package/dist/memo-5HCUFE7O.js +17 -0
- package/dist/{model-bundle-GDPQSFB6.js → model-bundle-2SFOC7MN.js} +5 -5
- package/dist/{models-JUOAMBO5.js → models-PLU2EPT7.js} +5 -5
- package/dist/{parse-worker-v2-WRNJYJYP.js → parse-worker-v2-WA23FJTR.js} +24 -24
- package/dist/parse-worker-v2-WA23FJTR.js.map +1 -0
- package/dist/{parser-M2JDL5MR.js → parser-6STVLFXK.js} +13 -13
- package/dist/{parser-DH44I6DQ.cjs → parser-FPPPPFKG.cjs} +161 -161
- package/dist/{parser-DH44I6DQ.cjs.map → parser-FPPPPFKG.cjs.map} +1 -1
- package/dist/{parser-3QHB4MZG.js → parser-ZZ5J23BV.js} +10 -10
- package/dist/{pdf-ocr-GAMAZHIY.js → pdf-ocr-4HCIQNKN.js} +7 -7
- package/dist/pdf-ocr-DEKAFNKL.cjs +40 -0
- package/dist/{pdf-ocr-HIK5RF27.cjs.map → pdf-ocr-DEKAFNKL.cjs.map} +1 -1
- package/dist/{pdf-ocr-54FGTFWV.js → pdf-ocr-ONVX6DOP.js} +10 -10
- package/dist/{profile-io-SFTAVZJZ.js → profile-io-TZFFQUIK.js} +3 -3
- package/dist/{rasterize-TQJXG5PE.js → rasterize-MIMMMVE4.js} +3 -3
- package/dist/{redact-doc-J3GBRKW3.js → redact-doc-ODRGSZR6.js} +22 -22
- package/dist/{render-7UUZGP34.js → render-CAJOYHGB.js} +12 -12
- package/dist/{rewrite-fallback-TPWEGJAJ.js → rewrite-fallback-HFHVUJMY.js} +13 -13
- package/dist/rewrite-fallback-HFHVUJMY.js.map +1 -0
- package/dist/seal-WHIN7ENH.js +16 -0
- package/dist/{setup-6OBIQ6CT.js → setup-FNKZ44RB.js} +3 -3
- package/dist/{to-hwpx-PZTHDUIW.js → to-hwpx-2KBVGBZP.js} +4 -4
- package/dist/to-hwpx-MRHCQ535.cjs +16 -0
- package/dist/{to-hwpx-TY7YLRPV.cjs.map → to-hwpx-MRHCQ535.cjs.map} +1 -1
- package/dist/{to-hwpx-PNHVMQS2.js → to-hwpx-U5ZI4SOL.js} +7 -7
- package/dist/visual-RMSREQRT.js +37 -0
- package/dist/{watch-KIEOCPMD.js → watch-UAPAV4KE.js} +23 -23
- package/package.json +1 -1
- package/dist/chunk-2U57FX3D.js.map +0 -1
- package/dist/chunk-4CLLC2HL.cjs.map +0 -1
- package/dist/chunk-5YG5UQNQ.js.map +0 -1
- package/dist/chunk-AYSIDGRR.js.map +0 -1
- package/dist/chunk-EM4H62JN.js.map +0 -1
- package/dist/chunk-EQIKF7RR.js.map +0 -1
- package/dist/chunk-HZFZWQN7.js.map +0 -1
- package/dist/chunk-IFWGHRCQ.js.map +0 -1
- package/dist/chunk-IXC35A5Q.cjs.map +0 -1
- package/dist/chunk-JIMG76FW.js.map +0 -1
- package/dist/chunk-LKYLW3WN.js.map +0 -1
- package/dist/chunk-PJFQH7MC.cjs.map +0 -1
- package/dist/chunk-ZTN3T3GH.cjs.map +0 -1
- package/dist/chunks-XIHXW5KF.js +0 -11
- package/dist/generator-4W73M27L.js +0 -10
- package/dist/generator-NEW7FGJ5.js +0 -17
- package/dist/generator-SVALWNDD.cjs +0 -11
- package/dist/image-ocr-6VRL4YR5.js.map +0 -1
- package/dist/image-ocr-L5UN7AIS.js.map +0 -1
- package/dist/memo-PDYKOOVQ.js +0 -17
- package/dist/parse-worker-v2-WRNJYJYP.js.map +0 -1
- package/dist/pdf-ocr-HIK5RF27.cjs +0 -40
- package/dist/rewrite-fallback-TPWEGJAJ.js.map +0 -1
- package/dist/seal-2X3GZVKH.js +0 -16
- package/dist/to-hwpx-TY7YLRPV.cjs +0 -16
- package/dist/visual-XBUBP2GE.js +0 -37
- /package/dist/{-BCZOAUIB.js.map → -4FV4UFBP.js.map} +0 -0
- /package/dist/{chunk-SSGMLZ4L.js.map → chunk-2DK2NCNW.js.map} +0 -0
- /package/dist/{chunk-MVPRBXWX.js.map → chunk-2GJZMZKE.js.map} +0 -0
- /package/dist/{chunk-3NO2PYSA.js.map → chunk-2RCML4RI.js.map} +0 -0
- /package/dist/{chunk-S2VVFKSQ.js.map → chunk-3PMJMMYO.js.map} +0 -0
- /package/dist/{chunk-S4VJWOH7.js.map → chunk-4CGVUHGB.js.map} +0 -0
- /package/dist/{chunk-L3VJUQT2.js.map → chunk-BJ6CKAQL.js.map} +0 -0
- /package/dist/{chunk-TOM4NLMF.js.map → chunk-DDEOJIOC.js.map} +0 -0
- /package/dist/{chunk-ZTA7R42I.js.map → chunk-DEIHO5LT.js.map} +0 -0
- /package/dist/{chunk-SASB4AHF.js.map → chunk-FGTG4IIL.js.map} +0 -0
- /package/dist/{chunk-3CEG4237.js.map → chunk-G64OQCI2.js.map} +0 -0
- /package/dist/{chunk-6O7O4GZS.js.map → chunk-GV3JHFAA.js.map} +0 -0
- /package/dist/{chunk-N54IHM64.js.map → chunk-INZHSNJP.js.map} +0 -0
- /package/dist/{chunk-JZ7S7PH5.js.map → chunk-KGAV4N3R.js.map} +0 -0
- /package/dist/{chunk-ATFJODWS.js.map → chunk-L5ETE5GI.js.map} +0 -0
- /package/dist/{chunk-POIRZQ3P.js.map → chunk-MXBFGNEJ.js.map} +0 -0
- /package/dist/{chunk-SDMMPYPM.js.map → chunk-N3MAZNY6.js.map} +0 -0
- /package/dist/{chunk-42GIGYXH.js.map → chunk-NQJCR4W6.js.map} +0 -0
- /package/dist/{chunk-I4LD2BEQ.js.map → chunk-QPQZUYIR.js.map} +0 -0
- /package/dist/{chunk-SJDASJCE.js.map → chunk-QZEPWIRV.js.map} +0 -0
- /package/dist/{chunk-GZ3AUXCU.js.map → chunk-RSY7TU4J.js.map} +0 -0
- /package/dist/{chunk-Y5YELCJQ.js.map → chunk-SHJFHRDG.js.map} +0 -0
- /package/dist/{chunk-XGCDYSJW.js.map → chunk-SL4UHGZV.js.map} +0 -0
- /package/dist/{chunk-GKEUWVGE.js.map → chunk-SWJLFU2Y.js.map} +0 -0
- /package/dist/{chunk-DCWMR5QQ.js.map → chunk-US34K54L.js.map} +0 -0
- /package/dist/{chunk-3TTIN736.js.map → chunk-VLHBQ2CA.js.map} +0 -0
- /package/dist/{chunk-OMWG727Y.js.map → chunk-YXBKSJXE.js.map} +0 -0
- /package/dist/{chunks-XIHXW5KF.js.map → chunks-456YDGK7.js.map} +0 -0
- /package/dist/{formula-4T2UH2SU.js.map → formula-3JFTK4RE.js.map} +0 -0
- /package/dist/{formula-CRQQYKMF.js.map → formula-6ZNPMIO2.js.map} +0 -0
- /package/dist/{generator-4W73M27L.js.map → generator-3XEJMYGP.js.map} +0 -0
- /package/dist/{generator-NEW7FGJ5.js.map → generator-HOFGOBUB.js.map} +0 -0
- /package/dist/{hancom-7SBCAOEZ.js.map → hancom-7EP2RGN7.js.map} +0 -0
- /package/dist/{hancom-EDHZ7SBY.js.map → hancom-FS3UV4XW.js.map} +0 -0
- /package/dist/{memo-PDYKOOVQ.js.map → memo-5HCUFE7O.js.map} +0 -0
- /package/dist/{model-bundle-GDPQSFB6.js.map → model-bundle-2SFOC7MN.js.map} +0 -0
- /package/dist/{models-JUOAMBO5.js.map → models-PLU2EPT7.js.map} +0 -0
- /package/dist/{parser-M2JDL5MR.js.map → parser-6STVLFXK.js.map} +0 -0
- /package/dist/{parser-3QHB4MZG.js.map → parser-ZZ5J23BV.js.map} +0 -0
- /package/dist/{pdf-ocr-54FGTFWV.js.map → pdf-ocr-4HCIQNKN.js.map} +0 -0
- /package/dist/{pdf-ocr-GAMAZHIY.js.map → pdf-ocr-ONVX6DOP.js.map} +0 -0
- /package/dist/{profile-io-SFTAVZJZ.js.map → profile-io-TZFFQUIK.js.map} +0 -0
- /package/dist/{rasterize-TQJXG5PE.js.map → rasterize-MIMMMVE4.js.map} +0 -0
- /package/dist/{redact-doc-J3GBRKW3.js.map → redact-doc-ODRGSZR6.js.map} +0 -0
- /package/dist/{render-7UUZGP34.js.map → render-CAJOYHGB.js.map} +0 -0
- /package/dist/{seal-2X3GZVKH.js.map → seal-WHIN7ENH.js.map} +0 -0
- /package/dist/{setup-6OBIQ6CT.js.map → setup-FNKZ44RB.js.map} +0 -0
- /package/dist/{to-hwpx-PNHVMQS2.js.map → to-hwpx-2KBVGBZP.js.map} +0 -0
- /package/dist/{to-hwpx-PZTHDUIW.js.map → to-hwpx-U5ZI4SOL.js.map} +0 -0
- /package/dist/{visual-XBUBP2GE.js.map → visual-RMSREQRT.js.map} +0 -0
- /package/dist/{watch-KIEOCPMD.js.map → watch-UAPAV4KE.js.map} +0 -0
package/README.md
CHANGED
|
@@ -125,7 +125,7 @@ await writeFile("보고서.hwpx", Buffer.from(hwpx))
|
|
|
125
125
|
| 법령 별표 | 272건 · 346표 | HWP **346/346**, PDF **343/346 · 99.13%** |
|
|
126
126
|
| PDF 전체 | 1,911문서 중 1,729건 채점 | 글 커버리지 **99.80%** |
|
|
127
127
|
| OCR | 53문서 · 102쪽 · 66표 | CER **0.0239** · 글자 재현율 **99.32%** · 표 구조 일치 **34/66** |
|
|
128
|
-
| KoOCR-Bench v2.0c (외부) | 공개 877쪽 (표·글·손글씨·순서) | 종합 기본값 **0.
|
|
128
|
+
| KoOCR-Bench v2.0c (외부) | 공개 877쪽 (표·글·손글씨·순서) | 종합 기본값 **0.872** · `ocrRec: "auto"` **0.873** · 손글씨 **0.901** · 제목 재현율 0.798 (4.24.42) |
|
|
129
129
|
| opendataloader-bench | PDF 200문서 | 종합 기본값 **0.964** · OCR 끔 **0.939** |
|
|
130
130
|
| HWPX 렌더 배치 | 한컴 PDF 짝 1,565문서(쪽 수 일치 1,508) · 글 조각 111,480 · 그림 4,300 | 글 위치(±1.5pt) **106,904 · 95.9%** · 그림 위치(±2pt) **4,213 · 98.0%** |
|
|
131
131
|
|
|
@@ -133,15 +133,15 @@ await writeFile("보고서.hwpx", Buffer.from(hwpx))
|
|
|
133
133
|
|
|
134
134
|
## 최근 업데이트
|
|
135
135
|
|
|
136
|
-
최신 배포: **[4.24.
|
|
136
|
+
최신 배포: **[4.24.42](https://github.com/chrisryugj/kordoc/releases/tag/v4.24.42)** · 2026-11-04
|
|
137
137
|
|
|
138
138
|
| 버전 | 주요 변경 | 수치 변화 |
|
|
139
139
|
| --- | --- | --- |
|
|
140
|
+
| 4.24.42 | OCR: 기본 설정도 뚜렷한 손글씨 쪽은 손글씨 모델로(`ocrRec: "printed"` 로 끔) · 납작한 한 줄 띠 검출 · 통계표 본문 펼치기(이름·값 줄·세로쓰기 이름표·두 줄 숫자 행·걸친 칸 글) · 부푼 상자 행 띠 · 구성비·증감률 열과 쌓인 구성비 행 · 세로선 너머 이웃 칸 글자 · 붙어 읽힌 쉼표 정수 | KoOCR-Bench 종합 0.835 → **0.872**(`auto` **0.873**) · 손글씨 .761 → **.901** · 통계표 .839 → .872 · 자체 벤치 문서별 하락 0 |
|
|
141
|
+
| 4.24.41 | HWP → HWPX: 배포용 문서도 변환(종전엔 거부) · 변경 추적 문서의 지운 구간·변경 목록 · 그림자 개체 바깥 여백 · 투명도 색 · 변경 추적 설정 기본값 · 겹친 쪽 번호 위치 · 형광펜 끝 · 메모 선 모양 | 공공 HWP 67개 한/글 저장본 대조: 변환 63 → **67**/67, 속성 완전 일치 38 → **52**/63 |
|
|
140
142
|
| 4.24.40 | OCR: 자간 좁은 숫자의 같은 숫자 합침("37,369,00")을 가로로 늘려 다시 읽기 · 이름표·값 표(대차대조표)의 쌓인 행을 이름표 줄에 맞춰 펼치기 | KoOCR-Bench 종합 0.830 → **0.835**(`auto` **0.856**) · 관보 CER .116 → .094 · 자체 벤치 문서별 하락 0 |
|
|
141
143
|
| 4.24.39 | OCR: 눕혀 찍은 가로 표 세우기 · 쪽 가운데 단 구분선·두 단 본문으로 두 단 가르기 · 열린 통계표 바깥 이름표 열 · 큰 숫자 표 행 펼치기(띠 밖 글 유실 막음) · 표 품은 쪽 테두리 틀 · 머리 여러 행 통계표 차트 오판 | KoOCR-Bench 종합 0.810 → **0.830**(`auto` **0.851**) · 시험지 CER .416 → .302 · 자체 벤치 문서별 하락 0 |
|
|
142
144
|
| 4.24.38 | OCR: 스캔·이미지 쪽 제목 판정(위아래로 쌓인 장 제목 잇기) · 작은 1칸 상자 쪽 두 단 읽기 순서 · 문장 조각 가짜 표 · 겹친 상자 이음매 글자 · 이미지 수식 OCR(`formulaOcr`) · to-hwpx 한/글 자체 저장 엔진(`--engine hancom`, 팝업 없이) | KoOCR-Bench 종합 0.807 → **0.810**(`auto` **0.831**) · 제목 재현율 0 → .798 · 자체 벤치 문서별 그대로 |
|
|
143
|
-
| 4.24.37 | OCR 표: 통계표 묶음 안 빈칸 열·괘선 없는 본문 행 펼치기·행 합침 아래 행 가르기·이웃 칸 값 몰림·음영 머리 띠와 칠한 첫 열 경계 · 머리 행 있는 표를 차트로 풀던 것 · 시험지 문항 상자 풀기 · `ocrRec: "auto"`(손글씨 쪽만 손글씨 모델) | KoOCR-Bench v2.0c 공개 877쪽 종합 0.742 → **0.807**(`ocrRec: "auto"` **0.828**) · 자체 벤치 문서별 그대로 |
|
|
144
|
-
| 4.24.36 | PDF 띄어쓰기(한컴 PDF): 자간 줄인 글의 낱말 공백 되살림 · 공백 글리프 위에 덧찍은 쉼표("55만원,") · 날짜 "2026. 8. 28." 공백 유지 · 줄 끝에서 갈린 연도 "20⏎25년" | PDF 글 어절 F1 99.076 → **99.103%** · 그 밖 지표 그대로 |
|
|
145
145
|
|
|
146
146
|
이전 버전과 상세 내용은 [변경 이력](CHANGELOG.md)에 있습니다.
|
|
147
147
|
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
usesGaejosikMunche,
|
|
54
54
|
usesLogicStructure,
|
|
55
55
|
validateHwpx
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-N3MAZNY6.js";
|
|
57
57
|
import {
|
|
58
58
|
blocksToPdf,
|
|
59
59
|
extractRenderedRegions,
|
|
@@ -64,16 +64,16 @@ import {
|
|
|
64
64
|
renderHwp5Pages,
|
|
65
65
|
renderHwpxToSvg,
|
|
66
66
|
renderSceneToHtml
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-DDEOJIOC.js";
|
|
68
68
|
import {
|
|
69
69
|
blocksToPages
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-VLHBQ2CA.js";
|
|
71
71
|
import {
|
|
72
72
|
extractClickHereFields,
|
|
73
73
|
patchHwp,
|
|
74
74
|
patchHwpx
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-QZEPWIRV.js";
|
|
76
|
+
import "./chunk-SHJFHRDG.js";
|
|
77
77
|
import {
|
|
78
78
|
AGENCY_COMMON_NAME,
|
|
79
79
|
PRESET_ALIAS,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
markdownToHwpx,
|
|
84
84
|
normalizeGongmunPreset,
|
|
85
85
|
placeTotalRow
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-YXBKSJXE.js";
|
|
87
87
|
import {
|
|
88
88
|
SPACE_EM_FIXED,
|
|
89
89
|
SPACE_EM_FONT,
|
|
@@ -92,15 +92,15 @@ import {
|
|
|
92
92
|
measureTextWidth,
|
|
93
93
|
simulateWrap,
|
|
94
94
|
simulateWrapKeepWord
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-NQJCR4W6.js";
|
|
96
96
|
import {
|
|
97
97
|
addMemoHwpx
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-DEIHO5LT.js";
|
|
99
99
|
import {
|
|
100
100
|
placeSealHwpx
|
|
101
|
-
} from "./chunk-
|
|
102
|
-
import "./chunk-
|
|
103
|
-
import "./chunk-
|
|
101
|
+
} from "./chunk-2GJZMZKE.js";
|
|
102
|
+
import "./chunk-INZHSNJP.js";
|
|
103
|
+
import "./chunk-RSY7TU4J.js";
|
|
104
104
|
import {
|
|
105
105
|
ValueCursor,
|
|
106
106
|
applySplices,
|
|
@@ -114,15 +114,15 @@ import {
|
|
|
114
114
|
isLabelCell,
|
|
115
115
|
scanSectionXml
|
|
116
116
|
} from "./chunk-3AHL6YEA.js";
|
|
117
|
-
import "./chunk-
|
|
117
|
+
import "./chunk-FGTG4IIL.js";
|
|
118
118
|
import {
|
|
119
119
|
convertToHwpx,
|
|
120
120
|
hwpToHwpx
|
|
121
|
-
} from "./chunk-
|
|
122
|
-
import "./chunk-
|
|
121
|
+
} from "./chunk-ICF2GY2Q.js";
|
|
122
|
+
import "./chunk-G64OQCI2.js";
|
|
123
123
|
import "./chunk-VKVDMH7X.js";
|
|
124
124
|
import "./chunk-OFVHQ2TZ.js";
|
|
125
|
-
import "./chunk-
|
|
125
|
+
import "./chunk-L5ETE5GI.js";
|
|
126
126
|
import "./chunk-WFKFG2RT.js";
|
|
127
127
|
import {
|
|
128
128
|
DEFAULT_REDACT_RULES,
|
|
@@ -131,8 +131,8 @@ import {
|
|
|
131
131
|
} from "./chunk-3WSNLH4B.js";
|
|
132
132
|
import {
|
|
133
133
|
blocksToChunks
|
|
134
|
-
} from "./chunk-
|
|
135
|
-
import "./chunk-
|
|
134
|
+
} from "./chunk-US34K54L.js";
|
|
135
|
+
import "./chunk-BJ6CKAQL.js";
|
|
136
136
|
import "./chunk-VQFA55IC.js";
|
|
137
137
|
import {
|
|
138
138
|
detectFormat,
|
|
@@ -144,17 +144,17 @@ import {
|
|
|
144
144
|
isZipFile
|
|
145
145
|
} from "./chunk-GHHVT4Q5.js";
|
|
146
146
|
import "./chunk-H7K5YHWQ.js";
|
|
147
|
-
import "./chunk-
|
|
148
|
-
import "./chunk-
|
|
147
|
+
import "./chunk-IIOBUTXH.js";
|
|
148
|
+
import "./chunk-N6AEYYEV.js";
|
|
149
149
|
import {
|
|
150
150
|
blocksToMarkdown,
|
|
151
151
|
flattenLayoutTables,
|
|
152
152
|
hasStructuredCellContent
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-GV3JHFAA.js";
|
|
154
154
|
import "./chunk-KFF47XZ7.js";
|
|
155
155
|
import {
|
|
156
156
|
VERSION
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-2DK2NCNW.js";
|
|
158
158
|
export {
|
|
159
159
|
AGENCY_COMMON_NAME,
|
|
160
160
|
BUILTIN_TEMPLATES,
|
|
@@ -268,4 +268,4 @@ export {
|
|
|
268
268
|
usesLogicStructure,
|
|
269
269
|
validateHwpx
|
|
270
270
|
};
|
|
271
|
-
//# sourceMappingURL=-
|
|
271
|
+
//# sourceMappingURL=-4FV4UFBP.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/utils.ts
|
|
4
4
|
import { format } from "util";
|
|
5
|
-
var VERSION = true ? "4.24.
|
|
5
|
+
var VERSION = true ? "4.24.42" : "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;
|
|
@@ -172,4 +172,4 @@ export {
|
|
|
172
172
|
classifyError,
|
|
173
173
|
partExtension
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-2DK2NCNW.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
parseRenderStyles
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-INZHSNJP.js";
|
|
5
5
|
import {
|
|
6
6
|
patchZipEntries
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RSY7TU4J.js";
|
|
8
8
|
import {
|
|
9
9
|
applySplices,
|
|
10
10
|
scanSectionXml
|
|
11
11
|
} from "./chunk-3AHL6YEA.js";
|
|
12
12
|
import {
|
|
13
13
|
readZipEntry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FGTG4IIL.js";
|
|
15
15
|
import {
|
|
16
16
|
KordocError,
|
|
17
17
|
precheckZipSize
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2DK2NCNW.js";
|
|
19
19
|
|
|
20
20
|
// src/form/seal.ts
|
|
21
21
|
import JSZip from "jszip";
|
|
@@ -321,4 +321,4 @@ export {
|
|
|
321
321
|
collectSites,
|
|
322
322
|
placeSealHwpx
|
|
323
323
|
};
|
|
324
|
-
//# sourceMappingURL=chunk-
|
|
324
|
+
//# sourceMappingURL=chunk-2GJZMZKE.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
parse
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-N3MAZNY6.js";
|
|
5
5
|
import {
|
|
6
6
|
classifyError,
|
|
7
7
|
sanitizeError,
|
|
8
8
|
toArrayBuffer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2DK2NCNW.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/worker-parse.ts
|
|
12
12
|
import { readFileSync, statSync } from "fs";
|
|
@@ -26,4 +26,4 @@ async function parseWorkerFile(absPath, options) {
|
|
|
26
26
|
export {
|
|
27
27
|
parseWorkerFile
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-2RCML4RI.js.map
|
|
@@ -39,12 +39,12 @@ import {
|
|
|
39
39
|
sanitizeText,
|
|
40
40
|
tidyScriptTags,
|
|
41
41
|
unframeLayoutTables
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-SJOQYUWH.js";
|
|
43
43
|
import {
|
|
44
44
|
KordocError,
|
|
45
45
|
VERSION,
|
|
46
46
|
sanitizeHref
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-3PMJMMYO.js";
|
|
48
48
|
|
|
49
49
|
// src/hwp5/to-hwpx/index.ts
|
|
50
50
|
import JSZip from "jszip";
|
|
@@ -3206,7 +3206,7 @@ function color(c) {
|
|
|
3206
3206
|
c >>>= 0;
|
|
3207
3207
|
if (c === 4294967295) return "none";
|
|
3208
3208
|
const a = c >>> 24;
|
|
3209
|
-
return "#" + (a ?
|
|
3209
|
+
return "#" + (a ? a.toString(16).toUpperCase() : "") + hex2(c & 255) + hex2(c >>> 8 & 255) + hex2(c >>> 16 & 255);
|
|
3210
3210
|
}
|
|
3211
3211
|
var bit = (v, n) => v >>> n & 1;
|
|
3212
3212
|
var bits = (v, from, width) => v >>> from & (1 << width) - 1;
|
|
@@ -3691,7 +3691,7 @@ function style(r, id, paraIds) {
|
|
|
3691
3691
|
}
|
|
3692
3692
|
function memoPr(r, id) {
|
|
3693
3693
|
const c = new Cur(r.data);
|
|
3694
|
-
const width = c.u32(),
|
|
3694
|
+
const width = c.u32(), lineType = c.u8(), lineWidth = c.u8(), lineColor = c.u32(), fillColor = c.u32(), activeColor = c.u32(), type = c.u16();
|
|
3695
3695
|
return el("hh:memoPr", [
|
|
3696
3696
|
["id", id],
|
|
3697
3697
|
["width", width],
|
|
@@ -3703,6 +3703,32 @@ function memoPr(r, id) {
|
|
|
3703
3703
|
["memoType", pick(MEMO_TYPES, type)]
|
|
3704
3704
|
]);
|
|
3705
3705
|
}
|
|
3706
|
+
var TRACK_TYPES = { 17: "Delete", 18: "CharShape", 19: "ParaShape" };
|
|
3707
|
+
function trackChange(r, id, paraIds) {
|
|
3708
|
+
const c = new Cur(r.data);
|
|
3709
|
+
const type = c.u32(), y = c.u16(), mo = c.u16(), d = c.u16(), h = c.u16(), mi = c.u16();
|
|
3710
|
+
const author = c.u32(), n = c.u32();
|
|
3711
|
+
const shape = n >= 4 ? c.u32() : 0;
|
|
3712
|
+
c.skip(Math.max(0, n - 4));
|
|
3713
|
+
const hide = c.u32();
|
|
3714
|
+
const name = TRACK_TYPES[type] ?? "UnKnown";
|
|
3715
|
+
return el("hh:trackChange", [
|
|
3716
|
+
["type", name],
|
|
3717
|
+
["date", new Date(y, mo - 1, d, h, mi).toISOString().replace(/\.\d+Z$/, "Z")],
|
|
3718
|
+
["authorID", author],
|
|
3719
|
+
["hide", hide],
|
|
3720
|
+
["id", id],
|
|
3721
|
+
...name === "CharShape" ? [["charshapeID", shape]] : [],
|
|
3722
|
+
...name === "ParaShape" ? [["parashapeID", paraIds[shape] ?? shape]] : []
|
|
3723
|
+
]);
|
|
3724
|
+
}
|
|
3725
|
+
function trackChangeAuthor(r, id) {
|
|
3726
|
+
const c = new Cur(r.data);
|
|
3727
|
+
const n = c.u32();
|
|
3728
|
+
const name = r.data.toString("utf16le", Math.min(c.o, r.data.length), Math.min(r.data.length, c.o + n * 2));
|
|
3729
|
+
c.skip(n * 2);
|
|
3730
|
+
return el("hh:trackChangeAuthor", [["name", name], ["mark", c.u32()], ["id", id]]);
|
|
3731
|
+
}
|
|
3706
3732
|
function docProps(recs) {
|
|
3707
3733
|
const r = recs.find((x) => x.tagId === TAG.DOCUMENT_PROPERTIES);
|
|
3708
3734
|
const c = new Cur(r?.data ?? Buffer.alloc(0));
|
|
@@ -3755,8 +3781,11 @@ function headerXml(recs, linkInfo, ref, secCnt) {
|
|
|
3755
3781
|
refList += list("hh:paraProperties", of(TAG.PARA_SHAPE).flatMap((r, i) => paraIds.indexOf(paraIds[i]) === i ? [paraPr(r, paraIds[i])] : []));
|
|
3756
3782
|
refList += list("hh:styles", of(TAG.STYLE).map((r, i) => style(r, i, paraIds)));
|
|
3757
3783
|
refList += list("hh:memoProperties", of(TAG.MEMO_SHAPE).map((r, i) => memoPr(r, i + 1)));
|
|
3784
|
+
refList += list("hh:trackChanges", recs.filter((r) => r.tagId === TAG.TRACK_CHANGE).map((r, i) => trackChange(r, i + 1, paraIds)));
|
|
3785
|
+
refList += list("hh:trackChangeAuthors", recs.filter((r) => r.tagId === TAG.TRACK_CHANGE_AUTHOR).map((r, i) => trackChangeAuthor(r, i + 1)));
|
|
3758
3786
|
const compat = new Cur(recs.find((r) => r.tagId === TAG.COMPATIBLE_DOCUMENT)?.data ?? Buffer.alloc(0)).u32();
|
|
3759
|
-
const
|
|
3787
|
+
const trackRec = recs.find((r) => r.tagId === TAG.TRACKCHANGE);
|
|
3788
|
+
const track = trackRec ? new Cur(trackRec.data).u32() : 56;
|
|
3760
3789
|
return XML_DECL + `<hh:head ${NS} version="1.5" secCnt="${secCnt}">` + el("hh:beginNum", [["page", bPage], ["footnote", bFoot], ["endnote", bEnd], ["pic", bPic], ["tbl", bTbl], ["equation", bEq]]) + `<hh:refList>${refList}</hh:refList>` + el("hh:compatibleDocument", [["targetProgram", pick(TARGET_PROGRAMS, compat)]], "<hh:layoutCompatibility/>") + el("hh:docOption", [], el("hh:linkinfo", [["path", linkInfo.path], ["pageInherit", linkInfo.pageInherit], ["footnoteInherit", linkInfo.footnoteInherit]])) + el("hh:trackchageConfig", [["flags", track]]) + "</hh:head>";
|
|
3761
3790
|
}
|
|
3762
3791
|
|
|
@@ -3980,7 +4009,13 @@ function drawingStyle(k, ctx) {
|
|
|
3980
4009
|
const lineAlpha = c.u8(), sAlpha = c.u8();
|
|
3981
4010
|
const line = lineShapeXml(lineColor, width, a, outline, lineAlpha);
|
|
3982
4011
|
const shadow = el("hp:shadow", [["type", pick(SHADOW_TYPES2, sType)], ["color", color(sColor)], ["offsetX", sx], ["offsetY", sy], ["alpha", sAlpha]]);
|
|
3983
|
-
return { xml: line + fill + shadow, instId };
|
|
4012
|
+
return { xml: line + fill + shadow, instId, shadow: [sType, sx, sy] };
|
|
4013
|
+
}
|
|
4014
|
+
function shadowMargin(m, [type, sx, sy]) {
|
|
4015
|
+
if (type < 1 || type > 4) return m;
|
|
4016
|
+
const h = sx + (type === 2 || type === 4 ? 600 : -600), v = sy + (type >= 3 ? 600 : -600);
|
|
4017
|
+
const cut = (x, d) => d > 0 ? x - d >>> 0 : x;
|
|
4018
|
+
return [cut(m[0], -h), cut(m[1], h), cut(m[2], -v), cut(m[3], v)];
|
|
3984
4019
|
}
|
|
3985
4020
|
function drawTextXml(comp, ctx) {
|
|
3986
4021
|
const g = listGroups(comp.kids)[0];
|
|
@@ -4008,7 +4043,7 @@ function shapeXml(comp, o, description, ctx, caption) {
|
|
|
4008
4043
|
const sub = (tag) => new Cur(comp.kids.find((x) => x.rec.tagId === tag)?.rec.data ?? Buffer.alloc(0));
|
|
4009
4044
|
const head = o ? objHeadAttrs(o) : [["id", 0], ["zOrder", 0], ["numberingType", "NONE"], ["textWrap", "TOP_AND_BOTTOM"], ["textFlow", "BOTH_SIDES"], ["lock", 0], ["dropcapstyle", "None"]];
|
|
4010
4045
|
const comment = o && description ? `<hp:shapeComment>${escText(description)}</hp:shapeComment>` : "";
|
|
4011
|
-
|
|
4046
|
+
let tail = o ? objPlacementXml(o) + comment + caption : comment;
|
|
4012
4047
|
const common = componentHeadXml(k);
|
|
4013
4048
|
const href = shapeHref(comp);
|
|
4014
4049
|
if (k.kind === "$pic") {
|
|
@@ -4050,6 +4085,7 @@ function shapeXml(comp, o, description, ctx, caption) {
|
|
|
4050
4085
|
return el("hp:container", [...head, ["href", href], ["groupLevel", k.groupLevel], ["instid", instId]], common + kids + tail);
|
|
4051
4086
|
}
|
|
4052
4087
|
const s = drawingStyle(k, ctx);
|
|
4088
|
+
if (o) tail = objPlacementXml({ ...o, margin: shadowMargin(o.margin, s.shadow) }) + comment + caption;
|
|
4053
4089
|
const text = drawTextXml(comp, ctx);
|
|
4054
4090
|
const ref = [["href", href], ["groupLevel", k.groupLevel], ["instid", s.instId]];
|
|
4055
4091
|
switch (k.kind) {
|
|
@@ -4688,7 +4724,7 @@ function paragraphXml(p, ctx) {
|
|
|
4688
4724
|
}
|
|
4689
4725
|
if (!runs.length) runs.push([0, 0]);
|
|
4690
4726
|
const ctrls = p.kids.filter((k) => k.rec.tagId === TAG2.CTRL_HEADER);
|
|
4691
|
-
const ranges = rangeTags(p.kids.find((k) => k.rec.tagId === TAG2.PARA_RANGE_TAG));
|
|
4727
|
+
const ranges = rangeTags(p.kids.find((k) => k.rec.tagId === TAG2.PARA_RANGE_TAG), crPos);
|
|
4692
4728
|
const toks = tokenize(text, ctrls, ctx, /* @__PURE__ */ new Set([...runs.map((r) => r[0]), ...ranges.styles.flatMap((r) => [r[0], r[1]])]), ranges.marks);
|
|
4693
4729
|
for (const k of toks) if (k.t !== "ctrl") k.cs = ranges.styles.find((r) => k.pos >= r[0] && k.pos < r[1])?.[2];
|
|
4694
4730
|
const units = text.length / 2;
|
|
@@ -4697,8 +4733,8 @@ function paragraphXml(p, ctx) {
|
|
|
4697
4733
|
for (let i = 0; i < runs.length; i++) {
|
|
4698
4734
|
const from = runs[i][0], to = i + 1 < runs.length ? runs[i + 1][0] : Math.max(units, nChars);
|
|
4699
4735
|
let seg = toks.filter((t) => t.pos >= from && t.pos < to);
|
|
4700
|
-
if (!seg.length && i > 0 && from >= crPos && hasCtrl) seg = [{ pos: from, t: "text", s: "" }];
|
|
4701
|
-
body += runXml(runs[i][1], seg);
|
|
4736
|
+
if (!seg.length && i > 0 && from >= crPos && (hasCtrl || toks.some((k) => k.t === "inline" && (k.end ?? -1) >= from))) seg = [{ pos: from, t: "text", s: "" }];
|
|
4737
|
+
body += runXml(runs[i][1], seg, ranges.charTc.find((r) => from >= r[0] && from < r[1])?.[2]);
|
|
4702
4738
|
}
|
|
4703
4739
|
const ls = p.kids.find((k) => k.rec.tagId === TAG2.PARA_LINE_SEG);
|
|
4704
4740
|
if (ls) {
|
|
@@ -4724,12 +4760,17 @@ function paragraphXml(p, ctx) {
|
|
|
4724
4760
|
["styleIDRef", styleId],
|
|
4725
4761
|
["pageBreak", bit(breaks, 2)],
|
|
4726
4762
|
["columnBreak", bit(breaks, 3)],
|
|
4727
|
-
["merged", merged]
|
|
4763
|
+
["merged", merged],
|
|
4764
|
+
...ranges.paraTc ? [["paraTcId", ranges.paraTc]] : []
|
|
4728
4765
|
], body);
|
|
4729
4766
|
}
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4767
|
+
var TRACK_RANGES = { 17: "delete" };
|
|
4768
|
+
var TRACK_CHAR_SHAPE = 18;
|
|
4769
|
+
var TRACK_PARA_SHAPE = 19;
|
|
4770
|
+
function rangeTags(node, crPos) {
|
|
4771
|
+
const marks = /* @__PURE__ */ new Map(), styles = [], charTc = [];
|
|
4772
|
+
let paraTc = 0;
|
|
4773
|
+
if (!node) return { marks, styles, charTc, paraTc };
|
|
4733
4774
|
const add = (pos, xml, first) => {
|
|
4734
4775
|
const list = marks.get(pos) ?? [];
|
|
4735
4776
|
if (first) list.unshift(xml);
|
|
@@ -4739,18 +4780,36 @@ function rangeTags(node) {
|
|
|
4739
4780
|
for (const c = new Cur(node.rec.data); c.rest >= 12; ) {
|
|
4740
4781
|
const start = c.u32(), end = c.u32(), tag = c.u32();
|
|
4741
4782
|
if (end <= start) continue;
|
|
4742
|
-
|
|
4743
|
-
if (
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
}
|
|
4783
|
+
const kind = tag >>> 24, data2 = tag & 16777215;
|
|
4784
|
+
if (kind === 1) styles.push([start, end, data2]);
|
|
4785
|
+
if (kind === TRACK_CHAR_SHAPE) charTc.push([start, end, data2]);
|
|
4786
|
+
if (kind === TRACK_PARA_SHAPE) paraTc = data2;
|
|
4787
|
+
if (TRACK_RANGES[kind]) {
|
|
4788
|
+
const range = { name: TRACK_RANGES[kind], tc: data2, paraend: end > crPos ? 1 : 0, id: 0 };
|
|
4789
|
+
add(start, { range, begin: true }, false);
|
|
4790
|
+
add(end, { range, begin: false }, true);
|
|
4791
|
+
}
|
|
4792
|
+
if (kind !== 2) continue;
|
|
4793
|
+
add(start, el("hp:markpenBegin", [["color", color(data2)]]), false);
|
|
4794
|
+
add(end, MARKPEN_END, true);
|
|
4795
|
+
}
|
|
4796
|
+
return { marks, styles, charTc, paraTc };
|
|
4797
|
+
}
|
|
4798
|
+
var MARKPEN_END = "<hp:markpenEnd/>";
|
|
4799
|
+
function markTok(pos, m, ctx) {
|
|
4800
|
+
if (typeof m === "string") return m === MARKPEN_END ? { pos: pos - 1, t: "inline", xml: m, mark: true, end: pos } : { pos, t: "inline", xml: m, mark: true };
|
|
4801
|
+
const r = m.range;
|
|
4802
|
+
if (m.begin) r.id = ++ctx.trackMarks;
|
|
4803
|
+
const xml = m.begin ? el(`hp:${r.name}Begin`, [["Id", r.id], ["TcId", r.tc]]) : el(`hp:${r.name}End`, [["Id", r.id], ["TcId", r.tc], ["paraend", r.paraend]]);
|
|
4804
|
+
return m.begin ? { pos, t: "inline", xml, track: true } : { pos: pos - 1, t: "inline", xml, track: true, end: pos };
|
|
4805
|
+
}
|
|
4806
|
+
var isTrack = (k) => k?.t === "inline" && !!k.track;
|
|
4749
4807
|
function tokenize(text, ctrls, ctx, cuts, marks) {
|
|
4750
4808
|
const toks = [];
|
|
4751
4809
|
const n = text.length / 2;
|
|
4752
4810
|
let ci = 0;
|
|
4753
4811
|
let buf = "", bufPos = 0;
|
|
4812
|
+
const pageNums = /* @__PURE__ */ new Set();
|
|
4754
4813
|
const flush = () => {
|
|
4755
4814
|
if (buf) toks.push({ pos: bufPos, t: "text", s: buf });
|
|
4756
4815
|
buf = "";
|
|
@@ -4761,7 +4820,7 @@ function tokenize(text, ctrls, ctx, cuts, marks) {
|
|
|
4761
4820
|
const mk = marks.get(i);
|
|
4762
4821
|
if (mk) {
|
|
4763
4822
|
flush();
|
|
4764
|
-
for (const
|
|
4823
|
+
for (const m of mk) toks.push(markTok(i, m, ctx));
|
|
4765
4824
|
}
|
|
4766
4825
|
if (c >= 32) {
|
|
4767
4826
|
if (!buf) bufPos = i;
|
|
@@ -4795,21 +4854,27 @@ function tokenize(text, ctrls, ctx, cuts, marks) {
|
|
|
4795
4854
|
const node = ctrls[ci++];
|
|
4796
4855
|
if (node) {
|
|
4797
4856
|
const r = controlXml(node, ctx);
|
|
4798
|
-
|
|
4857
|
+
const dup = r !== null && ctrlId(node) === "pgnp" && pageNums.has(r.xml);
|
|
4858
|
+
if (r && ctrlId(node) === "pgnp") pageNums.add(r.xml);
|
|
4859
|
+
if (r) toks.push({ pos: i, t: "ctrl", obj: r.obj, xml: dup ? "" : r.xml, def: r.def });
|
|
4799
4860
|
}
|
|
4800
4861
|
i += 8;
|
|
4801
4862
|
}
|
|
4802
4863
|
flush();
|
|
4803
|
-
for (const [pos, list] of marks) if (pos >= n) for (const
|
|
4864
|
+
for (const [pos, list] of marks) if (pos >= n) for (const m of list) toks.push(markTok(n, m, ctx));
|
|
4804
4865
|
for (let k = toks.length - 1; k >= 0; k--) {
|
|
4805
4866
|
const o = toks[k];
|
|
4806
|
-
if (o.t
|
|
4867
|
+
if (o.t !== "ctrl") continue;
|
|
4868
|
+
let j = k + 1;
|
|
4869
|
+
while (isTrack(toks[j]) && toks[j].pos <= o.pos + 8) j++;
|
|
4870
|
+
if (toks[j]?.pos !== o.pos + 8) toks.splice(j, 0, { pos: o.pos + 8, t: "text", s: "", fresh: j > k + 1 });
|
|
4807
4871
|
}
|
|
4808
4872
|
return toks;
|
|
4809
4873
|
}
|
|
4810
|
-
function runXml(charShape, toks) {
|
|
4811
|
-
const
|
|
4812
|
-
|
|
4874
|
+
function runXml(charShape, toks, tcId) {
|
|
4875
|
+
const runAttrs = [["charPrIDRef", charShape], ...tcId ? [["charTcId", tcId]] : []];
|
|
4876
|
+
const open = `<hp:run${attrs(runAttrs)}>`;
|
|
4877
|
+
if (!toks.length) return el("hp:run", runAttrs);
|
|
4813
4878
|
let out = "", t = null, tcs;
|
|
4814
4879
|
const closeT = () => {
|
|
4815
4880
|
if (t !== null) {
|
|
@@ -4819,6 +4884,7 @@ function runXml(charShape, toks) {
|
|
|
4819
4884
|
t = null;
|
|
4820
4885
|
};
|
|
4821
4886
|
toks.forEach((k, i) => {
|
|
4887
|
+
if (k.t === "text" && k.fresh) closeT();
|
|
4822
4888
|
if (k.t !== "ctrl" && t !== null && k.cs !== tcs) closeT();
|
|
4823
4889
|
if (k.t !== "ctrl" && t === null) tcs = k.cs;
|
|
4824
4890
|
if (k.t === "text") t = (t ?? "") + escText(k.s);
|
|
@@ -4834,7 +4900,7 @@ function runXml(charShape, toks) {
|
|
|
4834
4900
|
}
|
|
4835
4901
|
});
|
|
4836
4902
|
closeT();
|
|
4837
|
-
return (open + out + "</hp:run>").replace(`${open}</hp:run>`, el("hp:run",
|
|
4903
|
+
return (open + out + "</hp:run>").replace(`${open}</hp:run>`, el("hp:run", runAttrs));
|
|
4838
4904
|
}
|
|
4839
4905
|
function sectionXml(top, ctx) {
|
|
4840
4906
|
const last = top.filter((n) => n.rec.tagId === TAG2.PARA_HEADER).at(-1);
|
|
@@ -5128,13 +5194,22 @@ function shiftZeroBorderFill(parts) {
|
|
|
5128
5194
|
}
|
|
5129
5195
|
return out;
|
|
5130
5196
|
}
|
|
5197
|
+
function trackChangeSections(c) {
|
|
5198
|
+
if (c.distribution || !(c.header.flags & FLAG_TRACK_CHANGES)) return null;
|
|
5199
|
+
const out = [];
|
|
5200
|
+
for (let i = 0; ; i++) {
|
|
5201
|
+
const s = c.findStream(`/ViewText/Section${i}`);
|
|
5202
|
+
if (!s) break;
|
|
5203
|
+
out.push(s);
|
|
5204
|
+
}
|
|
5205
|
+
return out.length ? out : null;
|
|
5206
|
+
}
|
|
5131
5207
|
var V13_DEFAULT_SCRIPT = "function OnDocument_New()\r\n{\r\n //todo : \r\n}\r\n\r\n";
|
|
5132
5208
|
async function hwpToHwpx(input, options) {
|
|
5133
5209
|
const buffer = Buffer.from(input instanceof ArrayBuffer ? new Uint8Array(input) : input);
|
|
5134
5210
|
const c = openHwp5Container(buffer, options);
|
|
5135
|
-
if (c.distribution) throw new KordocError("\uBC30\uD3EC\uC6A9(\uC77D\uAE30 \uC804\uC6A9) HWP \uBB38\uC11C\uB294 HWPX \uB85C \uBCC0\uD658\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC791\uC131\uC790\uAC00 \uBCF5\uC0AC\xB7\uD3B8\uC9D1\uC744 \uB9C9\uC740 \uBB38\uC11C\uC785\uB2C8\uB2E4");
|
|
5136
5211
|
const docInfo = readHwp5DocInfoRecords(c) ?? [];
|
|
5137
|
-
const sections = readHwp5SectionRecords(c, readHwp5SectionStreams(c), c.warnings);
|
|
5212
|
+
const sections = readHwp5SectionRecords(c, trackChangeSections(c) ?? readHwp5SectionStreams(c), c.warnings);
|
|
5138
5213
|
const bins = readHwp5BinData(c);
|
|
5139
5214
|
const linkDoc = c.findStream("/DocOptions/_LinkDoc");
|
|
5140
5215
|
const link = { path: "", pageInherit: 0, footnoteInherit: 0 };
|
|
@@ -5161,6 +5236,7 @@ async function hwpToHwpx(input, options) {
|
|
|
5161
5236
|
tailMasters: [],
|
|
5162
5237
|
memos: /* @__PURE__ */ new Map(),
|
|
5163
5238
|
linkedParas: /* @__PURE__ */ new Map(),
|
|
5239
|
+
trackMarks: 0,
|
|
5164
5240
|
chartOf(binId) {
|
|
5165
5241
|
if (chartByBin.has(binId)) return chartByBin.get(binId);
|
|
5166
5242
|
const item = items.find((b) => b.index === binId);
|
|
@@ -5270,7 +5346,7 @@ async function convertToHwpx(input, options) {
|
|
|
5270
5346
|
if (format !== "hwp" && format !== "hwp3" && format !== "hwpml") throw new KordocError(`HWP \uBB38\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4 (${format})`);
|
|
5271
5347
|
const engine = options?.engine ?? "kordoc";
|
|
5272
5348
|
if (engine !== "kordoc") {
|
|
5273
|
-
const { hancomAvailable, hwpToHwpxViaHancom } = await import("./hancom-
|
|
5349
|
+
const { hancomAvailable, hwpToHwpxViaHancom } = await import("./hancom-FS3UV4XW.js");
|
|
5274
5350
|
if (engine === "hancom" || !options?.password && hancomAvailable()) {
|
|
5275
5351
|
if (options?.password) throw new KordocError('\uD55C/\uAE00 \uC800\uC7A5 \uBCC0\uD658\uC740 \uC5F4\uAE30 \uC554\uD638\uB97C \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 engine "kordoc" \uC73C\uB85C \uBC14\uAFB8\uC138\uC694');
|
|
5276
5352
|
return { data: hwpToHwpxViaHancom(bytes, format === "hwpml" ? "hml" : "hwp"), mode: "preserve", engine: "hancom", warnings: [] };
|
|
@@ -5278,7 +5354,7 @@ async function convertToHwpx(input, options) {
|
|
|
5278
5354
|
}
|
|
5279
5355
|
if (format === "hwp") return { data: await hwpToHwpx(bytes, options), mode: "preserve", engine: "kordoc", warnings: [] };
|
|
5280
5356
|
const { parse } = await import("./index.js");
|
|
5281
|
-
const { markdownToHwpx } = await import("./generator-
|
|
5357
|
+
const { markdownToHwpx } = await import("./generator-3XEJMYGP.js");
|
|
5282
5358
|
const parsed = await parse(ab, { password: options?.password });
|
|
5283
5359
|
if (!parsed.success) throw new KordocError(parsed.error ?? "\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4");
|
|
5284
5360
|
return {
|
|
@@ -5341,4 +5417,4 @@ export {
|
|
|
5341
5417
|
hwpToHwpx,
|
|
5342
5418
|
convertToHwpx
|
|
5343
5419
|
};
|
|
5344
|
-
//# sourceMappingURL=chunk-
|
|
5420
|
+
//# sourceMappingURL=chunk-3CMQ5PPW.js.map
|