kordoc 4.24.45 → 4.24.47

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.
Files changed (185) hide show
  1. package/README.md +5 -5
  2. package/dist/{-U63KR7FM.js → -PWMZE4CC.js} +21 -21
  3. package/dist/{chunk-KXTTQ3RN.js → chunk-2CBIY2OH.js} +2 -2
  4. package/dist/chunk-2CBIY2OH.js.map +1 -0
  5. package/dist/{chunk-56HJNAU2.js → chunk-2VXVBB5Q.js} +3 -3
  6. package/dist/{chunk-K4BI5IO3.cjs → chunk-3CWVQNFL.cjs} +58 -58
  7. package/dist/{chunk-K4BI5IO3.cjs.map → chunk-3CWVQNFL.cjs.map} +1 -1
  8. package/dist/{chunk-BXL3WAEY.js → chunk-4MNRUPS5.js} +38 -8
  9. package/dist/chunk-4MNRUPS5.js.map +1 -0
  10. package/dist/{chunk-YOMV4HR6.js → chunk-56FEGA44.js} +11 -11
  11. package/dist/{chunk-E6OSXYA4.js → chunk-57BKTVR5.js} +2 -2
  12. package/dist/{chunk-ELEYRONP.js → chunk-A67OXFXM.js} +39 -9
  13. package/dist/chunk-A67OXFXM.js.map +1 -0
  14. package/dist/{chunk-B3BUBTAB.js → chunk-AB7MYMPZ.js} +2 -2
  15. package/dist/{chunk-3DV5MIZK.js → chunk-AO3YFJVW.js} +2 -2
  16. package/dist/{chunk-WK3QLJCE.js → chunk-AYM7XTI2.js} +2 -2
  17. package/dist/{chunk-B773KHRO.cjs → chunk-BKK2SMVM.cjs} +2 -2
  18. package/dist/{chunk-B773KHRO.cjs.map → chunk-BKK2SMVM.cjs.map} +1 -1
  19. package/dist/{chunk-JKBJDB6X.js → chunk-BO2IJGNZ.js} +2 -2
  20. package/dist/{chunk-FZRETZG3.js → chunk-BP5GDQBT.js} +5 -5
  21. package/dist/{chunk-U4MF5C62.js → chunk-CQ33HCSU.js} +2 -2
  22. package/dist/{chunk-HMTXDJZA.js → chunk-FI7ULBC6.js} +6 -6
  23. package/dist/{chunk-NKWF62JV.js → chunk-FOTG4MMD.js} +5 -5
  24. package/dist/{chunk-U453MJJB.js → chunk-GRQXAWNW.js} +2 -2
  25. package/dist/{chunk-W7BLAMBO.js → chunk-HFQFCAEJ.js} +2 -2
  26. package/dist/{chunk-MVLVCUBP.js → chunk-HMD35PMD.js} +3 -3
  27. package/dist/{chunk-DLYJKFRY.js → chunk-IPXFIH5E.js} +2 -2
  28. package/dist/{chunk-DLYJKFRY.js.map → chunk-IPXFIH5E.js.map} +1 -1
  29. package/dist/{chunk-MKJRT3PP.js → chunk-IWC6PTMT.js} +2 -2
  30. package/dist/{chunk-5IEBL77T.js → chunk-KIVWAZKL.js} +2 -2
  31. package/dist/{chunk-HHORHT5O.js → chunk-KSE5HSU3.js} +2 -2
  32. package/dist/{chunk-HVVPLWQD.js → chunk-LEUAWTMU.js} +6 -6
  33. package/dist/{chunk-2QHC2YXC.cjs → chunk-LMHE4HDR.cjs} +135 -97
  34. package/dist/chunk-LMHE4HDR.cjs.map +1 -0
  35. package/dist/{chunk-AJAVVV7C.js → chunk-MOWJOFIH.js} +2 -2
  36. package/dist/{chunk-AUSFVOEA.js → chunk-NYIJU4Q6.js} +10 -10
  37. package/dist/{chunk-F7MGZMTQ.cjs → chunk-O2652KK3.cjs} +3 -3
  38. package/dist/{chunk-F7MGZMTQ.cjs.map → chunk-O2652KK3.cjs.map} +1 -1
  39. package/dist/{chunk-FZFESBG6.js → chunk-OAKJNKAS.js} +54 -16
  40. package/dist/chunk-OAKJNKAS.js.map +1 -0
  41. package/dist/{chunk-MOZCSVGA.js → chunk-PM46GSMV.js} +55 -17
  42. package/dist/chunk-PM46GSMV.js.map +1 -0
  43. package/dist/{chunk-BM4NQPJ7.js → chunk-Q3UCWUEV.js} +5 -5
  44. package/dist/{chunk-VVV54QND.cjs → chunk-RQ4XTX4J.cjs} +98 -98
  45. package/dist/{chunk-VVV54QND.cjs.map → chunk-RQ4XTX4J.cjs.map} +1 -1
  46. package/dist/{chunk-WHWBBUSD.js → chunk-SQ5Q4Q3R.js} +7 -7
  47. package/dist/{chunk-7D7CLX3U.js → chunk-SUIH5LY7.js} +2 -2
  48. package/dist/{chunk-BCRSFFTV.js → chunk-T5J4GW6B.js} +2 -2
  49. package/dist/{chunk-BHL5HQNO.js → chunk-TGLXN6VH.js} +3 -3
  50. package/dist/{chunk-3JKPMYNQ.js → chunk-TN5ZK2WN.js} +2 -2
  51. package/dist/{chunk-ASS2MVTL.cjs → chunk-UFY6XX4U.cjs} +84 -54
  52. package/dist/chunk-UFY6XX4U.cjs.map +1 -0
  53. package/dist/{chunk-H6YKDFKG.js → chunk-VL43TUO6.js} +2 -2
  54. package/dist/{chunk-YIWEURPR.cjs → chunk-WAFJUSUF.cjs} +6 -6
  55. package/dist/{chunk-YIWEURPR.cjs.map → chunk-WAFJUSUF.cjs.map} +1 -1
  56. package/dist/{chunk-XS3SXFUY.cjs → chunk-WPLAEJU5.cjs} +3 -3
  57. package/dist/{chunk-XS3SXFUY.cjs.map → chunk-WPLAEJU5.cjs.map} +1 -1
  58. package/dist/{chunk-TJYUA2VR.js → chunk-YLYSJSEP.js} +2 -2
  59. package/dist/{chunk-MXCODLV5.js → chunk-Z5TDZDWU.js} +87 -25
  60. package/dist/chunk-Z5TDZDWU.js.map +1 -0
  61. package/dist/chunks-SHXTE5HM.js +11 -0
  62. package/dist/cli.js +43 -43
  63. package/dist/{formula-FBBDRGK6.js → formula-2BQBGPM2.js} +3 -3
  64. package/dist/{formula-V2ZZCARY.cjs → formula-V6CNOC4G.cjs} +9 -9
  65. package/dist/{formula-V2ZZCARY.cjs.map → formula-V6CNOC4G.cjs.map} +1 -1
  66. package/dist/{formula-C46F5MG6.js → formula-W5MTLANP.js} +4 -4
  67. package/dist/generator-E4VQKPRP.js +10 -0
  68. package/dist/generator-MBR4V3JQ.js +17 -0
  69. package/dist/generator-U2BRFTJ4.cjs +11 -0
  70. package/dist/{generator-MINQI74H.cjs.map → generator-U2BRFTJ4.cjs.map} +1 -1
  71. package/dist/{hancom-WBVEG72Q.js → hancom-7SU4XBXJ.js} +2 -2
  72. package/dist/{hancom-3U6TQO6F.cjs → hancom-MP7D7HWW.cjs} +5 -5
  73. package/dist/{hancom-3U6TQO6F.cjs.map → hancom-MP7D7HWW.cjs.map} +1 -1
  74. package/dist/{hancom-P2ULOGNX.js → hancom-RNJWH63M.js} +2 -2
  75. package/dist/{image-ocr-7HH262GO.js → image-ocr-2WSZULNO.js} +7 -7
  76. package/dist/{image-ocr-G5T3YPM5.js → image-ocr-COBRSG6O.js} +10 -10
  77. package/dist/{image-ocr-4Y4WGZKF.cjs → image-ocr-MVOSHIY5.cjs} +27 -27
  78. package/dist/{image-ocr-4Y4WGZKF.cjs.map → image-ocr-MVOSHIY5.cjs.map} +1 -1
  79. package/dist/index.cjs +1585 -1523
  80. package/dist/index.cjs.map +1 -1
  81. package/dist/index.d.cts +11 -3
  82. package/dist/index.d.ts +11 -3
  83. package/dist/index.js +81 -19
  84. package/dist/index.js.map +1 -1
  85. package/dist/mcp.js +36 -36
  86. package/dist/memo-QJ5RKTBN.js +17 -0
  87. package/dist/{model-bundle-APD72FGN.js → model-bundle-LFLRW2SI.js} +5 -5
  88. package/dist/{models-RK4ENUTB.js → models-UGOWUUAL.js} +5 -5
  89. package/dist/{parse-worker-v2-TSULPUIC.js → parse-worker-v2-LCCTZWPT.js} +22 -22
  90. package/dist/{parser-55MAW7G3.js → parser-J56FGU6P.js} +9 -9
  91. package/dist/{parser-VBQTQ6K6.js → parser-JAL2OOOL.js} +12 -12
  92. package/dist/{parser-K275FDSR.cjs → parser-RE52HQXO.cjs} +159 -159
  93. package/dist/{parser-K275FDSR.cjs.map → parser-RE52HQXO.cjs.map} +1 -1
  94. package/dist/pdf-ocr-5O336TCR.cjs +42 -0
  95. package/dist/{pdf-ocr-FR4G5PDF.cjs.map → pdf-ocr-5O336TCR.cjs.map} +1 -1
  96. package/dist/{pdf-ocr-6AAMBNUY.js → pdf-ocr-NQ3HAL77.js} +9 -9
  97. package/dist/{pdf-ocr-YSEEZMJI.js → pdf-ocr-PQZZVFI5.js} +6 -6
  98. package/dist/{profile-io-DSBGIVPH.js → profile-io-K22CB2ZB.js} +3 -3
  99. package/dist/{rasterize-46HYG3R6.js → rasterize-A6B5K4QN.js} +3 -3
  100. package/dist/{redact-doc-GN673LJP.js → redact-doc-TPXMML5Q.js} +21 -21
  101. package/dist/{render-R7S7ZM3G.js → render-ROFIMWW5.js} +12 -12
  102. package/dist/{rewrite-fallback-J3IBHAY2.js → rewrite-fallback-WG7Z3LR3.js} +13 -13
  103. package/dist/seal-35U76WY2.js +16 -0
  104. package/dist/{setup-EFW6CWKF.js → setup-J5SHDFIE.js} +3 -3
  105. package/dist/to-hwpx-RWDQB3T2.cjs +16 -0
  106. package/dist/{to-hwpx-X7YKAFO7.cjs.map → to-hwpx-RWDQB3T2.cjs.map} +1 -1
  107. package/dist/{to-hwpx-6TQLW6WX.js → to-hwpx-X7JE6YJB.js} +4 -4
  108. package/dist/{to-hwpx-EPTNQA53.js → to-hwpx-XQULU2I7.js} +7 -7
  109. package/dist/visual-4HRP2VIH.js +37 -0
  110. package/dist/{watch-ZQPN6IBT.js → watch-WZBW6UE7.js} +22 -22
  111. package/package.json +1 -1
  112. package/dist/chunk-2QHC2YXC.cjs.map +0 -1
  113. package/dist/chunk-ASS2MVTL.cjs.map +0 -1
  114. package/dist/chunk-BXL3WAEY.js.map +0 -1
  115. package/dist/chunk-ELEYRONP.js.map +0 -1
  116. package/dist/chunk-FZFESBG6.js.map +0 -1
  117. package/dist/chunk-KXTTQ3RN.js.map +0 -1
  118. package/dist/chunk-MOZCSVGA.js.map +0 -1
  119. package/dist/chunk-MXCODLV5.js.map +0 -1
  120. package/dist/chunks-LIB2Y6AD.js +0 -11
  121. package/dist/generator-BNV7GC2V.js +0 -17
  122. package/dist/generator-CKRACBBG.js +0 -10
  123. package/dist/generator-MINQI74H.cjs +0 -11
  124. package/dist/memo-CBYIVGEA.js +0 -17
  125. package/dist/pdf-ocr-FR4G5PDF.cjs +0 -42
  126. package/dist/seal-D6PQOQJI.js +0 -16
  127. package/dist/to-hwpx-X7YKAFO7.cjs +0 -16
  128. package/dist/visual-RODVDMIJ.js +0 -37
  129. /package/dist/{-U63KR7FM.js.map → -PWMZE4CC.js.map} +0 -0
  130. /package/dist/{chunk-56HJNAU2.js.map → chunk-2VXVBB5Q.js.map} +0 -0
  131. /package/dist/{chunk-YOMV4HR6.js.map → chunk-56FEGA44.js.map} +0 -0
  132. /package/dist/{chunk-E6OSXYA4.js.map → chunk-57BKTVR5.js.map} +0 -0
  133. /package/dist/{chunk-B3BUBTAB.js.map → chunk-AB7MYMPZ.js.map} +0 -0
  134. /package/dist/{chunk-3DV5MIZK.js.map → chunk-AO3YFJVW.js.map} +0 -0
  135. /package/dist/{chunk-WK3QLJCE.js.map → chunk-AYM7XTI2.js.map} +0 -0
  136. /package/dist/{chunk-JKBJDB6X.js.map → chunk-BO2IJGNZ.js.map} +0 -0
  137. /package/dist/{chunk-FZRETZG3.js.map → chunk-BP5GDQBT.js.map} +0 -0
  138. /package/dist/{chunk-U4MF5C62.js.map → chunk-CQ33HCSU.js.map} +0 -0
  139. /package/dist/{chunk-HMTXDJZA.js.map → chunk-FI7ULBC6.js.map} +0 -0
  140. /package/dist/{chunk-NKWF62JV.js.map → chunk-FOTG4MMD.js.map} +0 -0
  141. /package/dist/{chunk-U453MJJB.js.map → chunk-GRQXAWNW.js.map} +0 -0
  142. /package/dist/{chunk-W7BLAMBO.js.map → chunk-HFQFCAEJ.js.map} +0 -0
  143. /package/dist/{chunk-MVLVCUBP.js.map → chunk-HMD35PMD.js.map} +0 -0
  144. /package/dist/{chunk-MKJRT3PP.js.map → chunk-IWC6PTMT.js.map} +0 -0
  145. /package/dist/{chunk-5IEBL77T.js.map → chunk-KIVWAZKL.js.map} +0 -0
  146. /package/dist/{chunk-HHORHT5O.js.map → chunk-KSE5HSU3.js.map} +0 -0
  147. /package/dist/{chunk-HVVPLWQD.js.map → chunk-LEUAWTMU.js.map} +0 -0
  148. /package/dist/{chunk-AJAVVV7C.js.map → chunk-MOWJOFIH.js.map} +0 -0
  149. /package/dist/{chunk-AUSFVOEA.js.map → chunk-NYIJU4Q6.js.map} +0 -0
  150. /package/dist/{chunk-BM4NQPJ7.js.map → chunk-Q3UCWUEV.js.map} +0 -0
  151. /package/dist/{chunk-WHWBBUSD.js.map → chunk-SQ5Q4Q3R.js.map} +0 -0
  152. /package/dist/{chunk-7D7CLX3U.js.map → chunk-SUIH5LY7.js.map} +0 -0
  153. /package/dist/{chunk-BCRSFFTV.js.map → chunk-T5J4GW6B.js.map} +0 -0
  154. /package/dist/{chunk-BHL5HQNO.js.map → chunk-TGLXN6VH.js.map} +0 -0
  155. /package/dist/{chunk-3JKPMYNQ.js.map → chunk-TN5ZK2WN.js.map} +0 -0
  156. /package/dist/{chunk-H6YKDFKG.js.map → chunk-VL43TUO6.js.map} +0 -0
  157. /package/dist/{chunk-TJYUA2VR.js.map → chunk-YLYSJSEP.js.map} +0 -0
  158. /package/dist/{chunks-LIB2Y6AD.js.map → chunks-SHXTE5HM.js.map} +0 -0
  159. /package/dist/{formula-FBBDRGK6.js.map → formula-2BQBGPM2.js.map} +0 -0
  160. /package/dist/{formula-C46F5MG6.js.map → formula-W5MTLANP.js.map} +0 -0
  161. /package/dist/{generator-BNV7GC2V.js.map → generator-E4VQKPRP.js.map} +0 -0
  162. /package/dist/{generator-CKRACBBG.js.map → generator-MBR4V3JQ.js.map} +0 -0
  163. /package/dist/{hancom-WBVEG72Q.js.map → hancom-7SU4XBXJ.js.map} +0 -0
  164. /package/dist/{hancom-P2ULOGNX.js.map → hancom-RNJWH63M.js.map} +0 -0
  165. /package/dist/{image-ocr-7HH262GO.js.map → image-ocr-2WSZULNO.js.map} +0 -0
  166. /package/dist/{image-ocr-G5T3YPM5.js.map → image-ocr-COBRSG6O.js.map} +0 -0
  167. /package/dist/{memo-CBYIVGEA.js.map → memo-QJ5RKTBN.js.map} +0 -0
  168. /package/dist/{model-bundle-APD72FGN.js.map → model-bundle-LFLRW2SI.js.map} +0 -0
  169. /package/dist/{models-RK4ENUTB.js.map → models-UGOWUUAL.js.map} +0 -0
  170. /package/dist/{parse-worker-v2-TSULPUIC.js.map → parse-worker-v2-LCCTZWPT.js.map} +0 -0
  171. /package/dist/{parser-55MAW7G3.js.map → parser-J56FGU6P.js.map} +0 -0
  172. /package/dist/{parser-VBQTQ6K6.js.map → parser-JAL2OOOL.js.map} +0 -0
  173. /package/dist/{pdf-ocr-6AAMBNUY.js.map → pdf-ocr-NQ3HAL77.js.map} +0 -0
  174. /package/dist/{pdf-ocr-YSEEZMJI.js.map → pdf-ocr-PQZZVFI5.js.map} +0 -0
  175. /package/dist/{profile-io-DSBGIVPH.js.map → profile-io-K22CB2ZB.js.map} +0 -0
  176. /package/dist/{rasterize-46HYG3R6.js.map → rasterize-A6B5K4QN.js.map} +0 -0
  177. /package/dist/{redact-doc-GN673LJP.js.map → redact-doc-TPXMML5Q.js.map} +0 -0
  178. /package/dist/{render-R7S7ZM3G.js.map → render-ROFIMWW5.js.map} +0 -0
  179. /package/dist/{rewrite-fallback-J3IBHAY2.js.map → rewrite-fallback-WG7Z3LR3.js.map} +0 -0
  180. /package/dist/{seal-D6PQOQJI.js.map → seal-35U76WY2.js.map} +0 -0
  181. /package/dist/{setup-EFW6CWKF.js.map → setup-J5SHDFIE.js.map} +0 -0
  182. /package/dist/{to-hwpx-6TQLW6WX.js.map → to-hwpx-X7JE6YJB.js.map} +0 -0
  183. /package/dist/{to-hwpx-EPTNQA53.js.map → to-hwpx-XQULU2I7.js.map} +0 -0
  184. /package/dist/{visual-RODVDMIJ.js.map → visual-4HRP2VIH.js.map} +0 -0
  185. /package/dist/{watch-ZQPN6IBT.js.map → watch-WZBW6UE7.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  decryptHwpxInPlace,
4
4
  lockedHwpxError
5
- } from "./chunk-MVLVCUBP.js";
5
+ } from "./chunk-HMD35PMD.js";
6
6
  import {
7
7
  AUTONUM_PREFIX_RE,
8
8
  EMPH_BOLD,
@@ -63,15 +63,15 @@ import {
63
63
  unescapeGfm,
64
64
  unescapeGfmCell,
65
65
  wordHunks
66
- } from "./chunk-HVVPLWQD.js";
66
+ } from "./chunk-LEUAWTMU.js";
67
67
  import {
68
68
  noteFormatFrom,
69
69
  noteRefMark
70
- } from "./chunk-AJAVVV7C.js";
70
+ } from "./chunk-MOWJOFIH.js";
71
71
  import {
72
72
  patchZipEntries,
73
73
  readZipEntries
74
- } from "./chunk-H6YKDFKG.js";
74
+ } from "./chunk-VL43TUO6.js";
75
75
  import {
76
76
  allLinesegRemovalSplices,
77
77
  applySplices,
@@ -99,7 +99,7 @@ import {
99
99
  findChildByLocalName,
100
100
  localName,
101
101
  readZipEntry
102
- } from "./chunk-B3BUBTAB.js";
102
+ } from "./chunk-AB7MYMPZ.js";
103
103
  import {
104
104
  detectImageMime,
105
105
  hasRealStrike,
@@ -108,7 +108,7 @@ import {
108
108
  locateMemoBlocks,
109
109
  parseHwp5Document,
110
110
  unfilledClickHereGuide
111
- } from "./chunk-NKWF62JV.js";
111
+ } from "./chunk-FOTG4MMD.js";
112
112
  import {
113
113
  FLAG_COMPRESSED,
114
114
  FLAG_DISTRIBUTION,
@@ -129,7 +129,7 @@ import {
129
129
  isExtendedOnlyCtrlChar,
130
130
  parseFileHeader,
131
131
  readRecords
132
- } from "./chunk-JKBJDB6X.js";
132
+ } from "./chunk-BO2IJGNZ.js";
133
133
  import {
134
134
  parsePageRange
135
135
  } from "./chunk-VQFA55IC.js";
@@ -138,20 +138,20 @@ import {
138
138
  } from "./chunk-GHHVT4Q5.js";
139
139
  import {
140
140
  unframeLayoutTables
141
- } from "./chunk-KXTTQ3RN.js";
141
+ } from "./chunk-2CBIY2OH.js";
142
142
  import {
143
143
  blocksToMarkdown,
144
144
  escapeGfm,
145
145
  hasInlineCellBlocks,
146
146
  sanitizeText
147
- } from "./chunk-HHORHT5O.js";
147
+ } from "./chunk-KSE5HSU3.js";
148
148
  import {
149
149
  KordocError,
150
150
  compareSectionPaths,
151
151
  isPathTraversal,
152
152
  precheckZipSize,
153
153
  stripDtd
154
- } from "./chunk-E6OSXYA4.js";
154
+ } from "./chunk-57BKTVR5.js";
155
155
 
156
156
  // src/hwpx/parser.ts
157
157
  import JSZip2 from "jszip";
@@ -4206,4 +4206,4 @@ export {
4206
4206
  removeNoteMarks,
4207
4207
  diffUnitLists
4208
4208
  };
4209
- //# sourceMappingURL=chunk-YOMV4HR6.js.map
4209
+ //# sourceMappingURL=chunk-56FEGA44.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.45" : "0.0.0-dev";
5
+ var VERSION = true ? "4.24.47" : "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-E6OSXYA4.js.map
175
+ //# sourceMappingURL=chunk-57BKTVR5.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ensureModelsIn,
3
3
  getModelsDir
4
- } from "./chunk-U453MJJB.js";
4
+ } from "./chunk-GRQXAWNW.js";
5
5
  import {
6
6
  CELL_EDGES,
7
7
  HEADING_RATIO_H1,
@@ -9,11 +9,11 @@ import {
9
9
  HEADING_RATIO_H3,
10
10
  tidyScriptTags,
11
11
  toTex
12
- } from "./chunk-DLYJKFRY.js";
12
+ } from "./chunk-IPXFIH5E.js";
13
13
  import {
14
14
  safeMax,
15
15
  safeMin
16
- } from "./chunk-7D7CLX3U.js";
16
+ } from "./chunk-SUIH5LY7.js";
17
17
 
18
18
  // src/ocr/models.ts
19
19
  import { join } from "path";
@@ -1096,6 +1096,13 @@ function leadingBullet(gray, w, h, ink, firstX, squareMax = 0.92) {
1096
1096
  if (!mark) return null;
1097
1097
  return { mark, covers: firstX <= x1 + ch * 0.3 };
1098
1098
  }
1099
+ var STACK_INK_RATIO = 1.6;
1100
+ function stackedGlyphBands(gray, w, h, ink) {
1101
+ const ib = inkBounds(gray, w, h, ink);
1102
+ if (ib.y1 - ib.y0 < STACK_INK_RATIO * (ib.x1 - ib.x0)) return null;
1103
+ const bands = splitRowBands(gray, w, h, ink, 0.45);
1104
+ return bands.length >= 2 && bands.length <= 4 ? bands : null;
1105
+ }
1099
1106
 
1100
1107
  // src/ocr/text-gaps.ts
1101
1108
  var evidence = /* @__PURE__ */ new WeakMap();
@@ -1669,6 +1676,7 @@ var EDGE_INSET = 15;
1669
1676
  var EDGE_NEAR = 10;
1670
1677
  var EDGE_CONNECT_TOL = 5;
1671
1678
  var EDGE_YGAP_SPLIT_K = 2.5;
1679
+ var EDGE_FRAME_WIDTH_K = 1.5;
1672
1680
  var EDGE_YGAP_ABS_MIN = 30;
1673
1681
  var CHAIN_Y_TOL = 1.5;
1674
1682
  var CHAIN_GAP = 3;
@@ -1721,6 +1729,13 @@ function closeOpenTableEdges(horizontals, verticals) {
1721
1729
  for (let i = 1; i < sorted.length; i++) gaps.push(sorted[i].y1 - sorted[i - 1].y1);
1722
1730
  const median3 = gaps.length ? [...gaps].sort((a, b) => a - b)[gaps.length >> 1] : 0;
1723
1731
  const threshold = median3 * EDGE_YGAP_SPLIT_K;
1732
+ const thin = Math.min(...sorted.map((l) => l.lineWidth));
1733
+ const frame = (l) => thin > 0 && l.lineWidth >= thin * EDGE_FRAME_WIDTH_K;
1734
+ const frameEnd = (from, step) => {
1735
+ if (!frame(sorted[from])) return -1;
1736
+ for (let j = from + step; j >= 0 && j < sorted.length; j += step) if (frame(sorted[j])) return Math.abs(j - from) >= EDGE_MIN_RULES - 1 ? j : -1;
1737
+ return -1;
1738
+ };
1724
1739
  let cur = sorted.length ? [sorted[0]] : [];
1725
1740
  for (let i = 1; i < sorted.length; i++) {
1726
1741
  const yLo = sorted[i - 1].y1, yHi = sorted[i].y1;
@@ -1728,7 +1743,8 @@ function closeOpenTableEdges(horizontals, verticals) {
1728
1743
  const gx1 = Math.min(sorted[i - 1].x1, sorted[i].x1);
1729
1744
  const gx2 = Math.max(sorted[i - 1].x2, sorted[i].x2);
1730
1745
  const bridged = verticals.some((vl) => vl.y1 <= yLo + EDGE_NEAR && vl.y2 >= yHi - EDGE_NEAR && vl.x1 >= gx1 - EDGE_CONNECT_TOL && vl.x1 <= gx2 + EDGE_CONNECT_TOL);
1731
- if (median3 > 0 && gap > threshold && gap > EDGE_YGAP_ABS_MIN && !bridged && cur.length >= EDGE_MIN_RULES && sorted.length - i >= EDGE_MIN_RULES) {
1746
+ const between = gap > threshold || frameEnd(i - 1, -1) >= 0 && frameEnd(i, 1) >= 0;
1747
+ if (median3 > 0 && between && gap > EDGE_YGAP_ABS_MIN && !bridged && cur.length >= EDGE_MIN_RULES && sorted.length - i >= EDGE_MIN_RULES) {
1732
1748
  splitGroups.push(cur);
1733
1749
  cur = [];
1734
1750
  }
@@ -4165,12 +4181,17 @@ function anchoredSubRows(byCol, minLines, covered) {
4165
4181
  const pitches = ys.slice(1).map((y, i) => Math.abs(ys[i] - y)).sort((x, y) => x - y), pitch = pitches[pitches.length >> 1] ?? 0;
4166
4182
  const numericCols = byCol.every((lines, c) => c === a || vertical[c] || lines.every((line) => NUMERIC_LINE.test(cellTextToString(line).trim()) || /^[-–—]$/.test(cellTextToString(line).trim())));
4167
4183
  const tol = numericCols ? Math.max(h * ALIGNED_LINE_TOL, pitch * 0.4) : h * ALIGNED_LINE_TOL;
4184
+ const valueColsNumeric = byCol.every((lines, c) => c === 0 || c === a || lines.every((line) => NUMERIC_LINE.test(cellTextToString(line).trim()) || /^[-–—]$/.test(cellTextToString(line).trim())));
4168
4185
  const rows = Array.from({ length: k }, () => byCol.map(() => ""));
4169
4186
  for (let c = 0; c < byCol.length; c++) {
4170
4187
  if (vertical[c]) {
4171
4188
  if (!covered[c]) rows[0][c] = byCol[c].map((line) => cellTextToString(line).trim()).join("");
4172
4189
  continue;
4173
4190
  }
4191
+ if (c === 0 && c !== a && valueColsNumeric && byCol[c].length < k && byCol[c].every((line) => !NUMERIC_LINE.test(cellTextToString(line).trim())) && byCol[c].some((line) => Math.min(...ys.map((y) => Math.abs(y - cy(line)))) > tol)) {
4192
+ if (!covered[c]) rows[0][c] = byCol[c].map((line) => cellTextToString(line).trim()).join(" ");
4193
+ continue;
4194
+ }
4174
4195
  const used = /* @__PURE__ */ new Set();
4175
4196
  for (const line of byCol[c]) {
4176
4197
  const y = cy(line);
@@ -4210,7 +4231,8 @@ function normalizeUndersegmentedTable(originalCells, colXs, items, rowYs, kept,
4210
4231
  const body = normalizeUndersegmentedTable([originalCells[r]], colXs, rowItems, void 0, void 0, void 0, band > 1 ? 2 : MIN_ALIGNED_LINES);
4211
4232
  if (body) {
4212
4233
  originalCells[r].forEach((cell, c) => {
4213
- if (cell.text.trim() && body.every((cells) => !cells[c]?.trim())) body[0][c] = cell.text;
4234
+ const cols = Array.from({ length: Math.max(1, cell.colSpan ?? 1) }, (_, k) => c + k);
4235
+ if (cell.text.trim() && body.every((cells) => cols.every((k) => !cells[k]?.trim()))) body[0][c] = cell.text;
4214
4236
  });
4215
4237
  rebuilt2.push(...body);
4216
4238
  expanded++;
@@ -8046,7 +8068,8 @@ function ocrGutterVerticals(grids, items) {
8046
8068
  for (const g of support) gaps.splice(gaps.indexOf(g), 1);
8047
8069
  if (x - x0 < margin || x1 - x < margin) continue;
8048
8070
  const supportLines = new Set(support.map((g) => lines[g.line].y));
8049
- if (supportLines.size < Math.max(3, valueLines * 0.4)) continue;
8071
+ const minSupport = valueLines === 2 && supportLines.size === 2 ? 2 : Math.max(3, valueLines * 0.4);
8072
+ if (supportLines.size < minSupport) continue;
8050
8073
  const rows = grid.rowYs.length - 1;
8051
8074
  const supportIn = (r) => [...supportLines].filter((y) => y < grid.rowYs[r] && y > grid.rowYs[r + 1]).length;
8052
8075
  const blocked = Array.from({ length: rows }, (_, r) => lines.filter((l) => l.y < grid.rowYs[r] && l.y > grid.rowYs[r + 1] && l.cover.some((sp) => sp.estimated ? x - sp.left > size * 0.6 && sp.right - x > size * 0.6 : sp.left < x - 0.5 && sp.right > x + 0.5)).length > supportIn(r) * 0.25);
@@ -8064,7 +8087,7 @@ function ocrGutterVerticals(grids, items) {
8064
8087
  }
8065
8088
  r = e;
8066
8089
  }
8067
- if (!bestRun || bestCount < 3) continue;
8090
+ if (!bestRun || bestCount < Math.min(3, minSupport)) continue;
8068
8091
  const list = out.get(grid) ?? [];
8069
8092
  list.push({ x1: x, y1: grid.rowYs[bestRun[1]], x2: x, y2: grid.rowYs[bestRun[0]], lineWidth: 0.5 });
8070
8093
  out.set(grid, list);
@@ -10252,7 +10275,13 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
10252
10275
  })();
10253
10276
  const layoutProse = irGrid.some((row) => row.some((c) => c.colSpan >= numCols - 1 && c.text.length > 60));
10254
10277
  const maxRows = numericBody ? layoutProse ? OCR_NUMERIC_MAX_ROWS_FRAMED : OCR_NUMERIC_MAX_ROWS : 5;
10255
- if (!grid.cells && numRows <= maxRows && numCols >= 3 && !nestedAttached && (numRows <= 2 || unitLine.length > 0 || numericBody)) {
10278
+ const proseLine = (t) => (t.match(/[가-힣]/g)?.length ?? 0) > 6 && !/^[-−]?[\d,.]+$/.test(t.replace(/\s+/g, ""));
10279
+ const proseCols = numRows === 2 ? (irGrid[1] ?? []).filter((c) => {
10280
+ const ls = c.text.split("\n").map((t) => t.trim()).filter(Boolean);
10281
+ return ls.length >= 3 && ls.filter(proseLine).length >= ls.length * 0.6;
10282
+ }).length : 0;
10283
+ const twoRowOk = !ocrPage || proseCols < 2;
10284
+ if (!grid.cells && numRows <= maxRows && numCols >= 3 && !nestedAttached && (numRows <= 2 ? twoRowOk : unitLine.length > 0 || numericBody)) {
10256
10285
  const kept = /* @__PURE__ */ new Map();
10257
10286
  const rebuilt = normalizeUndersegmentedTable(irGrid, grid.colXs, textItems, grid.rowYs, kept, maxRows);
10258
10287
  if (rebuilt) {
@@ -11055,6 +11084,7 @@ export {
11055
11084
  starRun,
11056
11085
  bracketShape,
11057
11086
  leadingBullet,
11087
+ stackedGlyphBands,
11058
11088
  rememberOcrTextGaps,
11059
11089
  copyOcrTextGaps,
11060
11090
  findOcrTextGaps,
@@ -11112,4 +11142,4 @@ export {
11112
11142
  UNRULED_REGION_TABLES,
11113
11143
  mergeOcrImageRegions
11114
11144
  };
11115
- //# sourceMappingURL=chunk-ELEYRONP.js.map
11145
+ //# sourceMappingURL=chunk-A67OXFXM.js.map