kordoc 4.24.71 → 4.24.72

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 (182) hide show
  1. package/README.md +3 -3
  2. package/dist/{-F7GLIIGT.js → -S32WDXC4.js} +21 -21
  3. package/dist/{chunk-GFAWIBHG.js → chunk-2SUWIRWH.js} +10 -10
  4. package/dist/{chunk-T7MHZIFG.js → chunk-4ECEC6FD.js} +23 -4
  5. package/dist/chunk-4ECEC6FD.js.map +1 -0
  6. package/dist/{chunk-DSCT67WF.js → chunk-4GPZVPYG.js} +3 -3
  7. package/dist/{chunk-UJQRIX4L.js → chunk-4Q7L4IDD.js} +2 -2
  8. package/dist/{chunk-RUUUGCXS.js → chunk-4QOTRR5Z.js} +6 -6
  9. package/dist/{chunk-AUHQRRKM.js → chunk-4UL2KIOH.js} +3 -3
  10. package/dist/{chunk-YJ2YVG6N.cjs → chunk-5CYWVW3V.cjs} +88 -88
  11. package/dist/{chunk-YJ2YVG6N.cjs.map → chunk-5CYWVW3V.cjs.map} +1 -1
  12. package/dist/{chunk-IMT5TVVM.js → chunk-6DIACQ3R.js} +2 -2
  13. package/dist/{chunk-OJK4FLS5.js → chunk-6GQGU57N.js} +3 -3
  14. package/dist/{chunk-WMA4GJHC.js → chunk-7N2L6FBB.js} +5 -5
  15. package/dist/{chunk-5WWGC5SG.js → chunk-BD75GPTM.js} +2 -2
  16. package/dist/{chunk-2OF2YWIZ.js → chunk-BJCTFKEU.js} +2 -2
  17. package/dist/{chunk-MHXPW72E.js → chunk-C3USRXCH.js} +2 -2
  18. package/dist/{chunk-NPBNJCXZ.js → chunk-C4K2XCGX.js} +2 -2
  19. package/dist/{chunk-H2VOH7X3.cjs → chunk-COG4POSK.cjs} +199 -180
  20. package/dist/chunk-COG4POSK.cjs.map +1 -0
  21. package/dist/{chunk-O7PJFEOC.js → chunk-CQUOEZBJ.js} +2 -2
  22. package/dist/{chunk-2VBRCIPI.js → chunk-DIHV6CDK.js} +2 -2
  23. package/dist/{chunk-KGCJNPAI.js → chunk-FKCSNCWC.js} +5 -5
  24. package/dist/{chunk-2CPEW6WC.js → chunk-FTPYYLCR.js} +3 -3
  25. package/dist/{chunk-7KVDHXP2.js → chunk-G3TKEQZ3.js} +4 -4
  26. package/dist/{chunk-TYGZ6O2A.js → chunk-GAZDWFRT.js} +11 -11
  27. package/dist/{chunk-HIYRMYAS.js → chunk-GK4OHUV5.js} +2 -2
  28. package/dist/{chunk-LNWURZ2Z.js → chunk-GOQWCHX5.js} +7 -7
  29. package/dist/{chunk-ZPJZXTEG.js → chunk-IPYSZ2WD.js} +6 -6
  30. package/dist/{chunk-BNP3WXTB.cjs → chunk-JE4NCQIN.cjs} +3 -3
  31. package/dist/{chunk-BNP3WXTB.cjs.map → chunk-JE4NCQIN.cjs.map} +1 -1
  32. package/dist/{chunk-YTDHH362.js → chunk-JEPTA64I.js} +2 -2
  33. package/dist/{chunk-OW2XKTQA.cjs → chunk-L4GCUYDS.cjs} +8 -8
  34. package/dist/{chunk-OW2XKTQA.cjs.map → chunk-L4GCUYDS.cjs.map} +1 -1
  35. package/dist/{chunk-EZNUMAAJ.js → chunk-LINC7S3M.js} +2 -2
  36. package/dist/{chunk-6ZA4V4QS.js → chunk-MCO77XJN.js} +2 -2
  37. package/dist/{chunk-KLUI4SAZ.js → chunk-MHYFBIS5.js} +2 -2
  38. package/dist/{chunk-GRCIFCGC.js → chunk-NHWWNRQT.js} +2 -2
  39. package/dist/{chunk-RWU3Y5YK.js → chunk-O4MTW4JH.js} +18 -16
  40. package/dist/chunk-O4MTW4JH.js.map +1 -0
  41. package/dist/{chunk-M27VBFO6.js → chunk-SGQC3BVV.js} +22 -3
  42. package/dist/chunk-SGQC3BVV.js.map +1 -0
  43. package/dist/{chunk-OUHMNF2A.js → chunk-SNNM4GFE.js} +2 -2
  44. package/dist/{chunk-SK5AOGYK.cjs → chunk-TDNYBCPC.cjs} +104 -104
  45. package/dist/{chunk-SK5AOGYK.cjs.map → chunk-TDNYBCPC.cjs.map} +1 -1
  46. package/dist/{chunk-YTP7FPA5.cjs → chunk-U2K3WVR5.cjs} +3 -3
  47. package/dist/{chunk-YTP7FPA5.cjs.map → chunk-U2K3WVR5.cjs.map} +1 -1
  48. package/dist/{chunk-D4UFBXMT.js → chunk-U6CZ5IGF.js} +2 -2
  49. package/dist/{chunk-YPRIJDH6.js → chunk-UOML7PVK.js} +2 -2
  50. package/dist/{chunk-QK5KCWLE.js → chunk-VRJ3CABR.js} +2 -2
  51. package/dist/{chunk-YISBYF7X.cjs → chunk-WWTG5JUI.cjs} +58 -58
  52. package/dist/{chunk-YISBYF7X.cjs.map → chunk-WWTG5JUI.cjs.map} +1 -1
  53. package/dist/{chunk-SMEBVDM2.js → chunk-WXKUE2MU.js} +5 -5
  54. package/dist/{chunk-BHYBZSOC.js → chunk-YZXGUJFI.js} +2 -2
  55. package/dist/{chunk-LFTO5QAP.cjs → chunk-ZTVH2HQ5.cjs} +2 -2
  56. package/dist/{chunk-LFTO5QAP.cjs.map → chunk-ZTVH2HQ5.cjs.map} +1 -1
  57. package/dist/chunks-XNCDYMWO.js +11 -0
  58. package/dist/cli.js +45 -45
  59. package/dist/{formula-RTPZD2IM.cjs → formula-BLK43PWB.cjs} +41 -11
  60. package/dist/formula-BLK43PWB.cjs.map +1 -0
  61. package/dist/{formula-UJF4RZ6W.js → formula-E5QNTLM3.js} +35 -5
  62. package/dist/formula-E5QNTLM3.js.map +1 -0
  63. package/dist/{formula-3PJYUQMG.js → formula-WVFBIXND.js} +36 -6
  64. package/dist/formula-WVFBIXND.js.map +1 -0
  65. package/dist/generator-5VFDO4CB.js +11 -0
  66. package/dist/generator-APR6DUTL.cjs +12 -0
  67. package/dist/{generator-INMUN6KB.cjs.map → generator-APR6DUTL.cjs.map} +1 -1
  68. package/dist/generator-IOGPVCG2.js +18 -0
  69. package/dist/{hancom-RYIZHWJ5.js → hancom-BCYRSFDF.js} +2 -2
  70. package/dist/{hancom-MVPEYI4X.cjs → hancom-DJTR4HYI.cjs} +5 -5
  71. package/dist/{hancom-MVPEYI4X.cjs.map → hancom-DJTR4HYI.cjs.map} +1 -1
  72. package/dist/{hancom-P3SUQXM4.js → hancom-HLLJXF2H.js} +2 -2
  73. package/dist/{image-ocr-GL5YVCNU.js → image-ocr-B5SIBPET.js} +10 -10
  74. package/dist/{image-ocr-ZS4EMQN3.cjs → image-ocr-HCT57HQA.cjs} +28 -28
  75. package/dist/{image-ocr-ZS4EMQN3.cjs.map → image-ocr-HCT57HQA.cjs.map} +1 -1
  76. package/dist/{image-ocr-ZXLHPQI2.js → image-ocr-QSSVO27L.js} +7 -7
  77. package/dist/index.cjs +1118 -1116
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.js +12 -10
  80. package/dist/index.js.map +1 -1
  81. package/dist/mcp.js +36 -36
  82. package/dist/memo-R5CO35OZ.js +17 -0
  83. package/dist/{model-bundle-VCUAKBF3.js → model-bundle-KB7GFS7J.js} +5 -5
  84. package/dist/{models-UACAGYBI.js → models-A6PYBE2Q.js} +5 -5
  85. package/dist/{parse-worker-v2-LJB4QXGF.js → parse-worker-v2-OSOABIQB.js} +22 -22
  86. package/dist/{parser-5GZUD22P.js → parser-E2ZCR6UV.js} +12 -12
  87. package/dist/{parser-HCZD4DUO.js → parser-F7Q2ENVO.js} +9 -9
  88. package/dist/{parser-T4HAQ3QW.cjs → parser-JQXLIKOT.cjs} +166 -166
  89. package/dist/{parser-T4HAQ3QW.cjs.map → parser-JQXLIKOT.cjs.map} +1 -1
  90. package/dist/pdf-ocr-AV7FKNFZ.cjs +43 -0
  91. package/dist/{pdf-ocr-H4DKZSOB.cjs.map → pdf-ocr-AV7FKNFZ.cjs.map} +1 -1
  92. package/dist/{pdf-ocr-JXVGK5MR.js → pdf-ocr-B6QVPBMI.js} +6 -6
  93. package/dist/{pdf-ocr-YCMC2VL4.js → pdf-ocr-RY6UZ5PG.js} +9 -9
  94. package/dist/{profile-io-MVTEOXAU.js → profile-io-FX2SDCMR.js} +3 -3
  95. package/dist/{rasterize-VWT3C3RW.js → rasterize-ZJAMZCQM.js} +3 -3
  96. package/dist/{redact-doc-SU3JDC6F.js → redact-doc-DNXUF4WL.js} +21 -21
  97. package/dist/{render-D5N4FKWB.js → render-FQ2LMZIL.js} +12 -12
  98. package/dist/{rewrite-fallback-QXTWSPGY.js → rewrite-fallback-QNLQXJRS.js} +13 -13
  99. package/dist/seal-6LBVNZYX.js +16 -0
  100. package/dist/{setup-TXNJYX6P.js → setup-2VMN6LBY.js} +3 -3
  101. package/dist/to-hwpx-2RENWAWF.cjs +16 -0
  102. package/dist/{to-hwpx-KZTTH7EY.cjs.map → to-hwpx-2RENWAWF.cjs.map} +1 -1
  103. package/dist/{to-hwpx-YHGVFTBO.js → to-hwpx-DS6DH5WH.js} +4 -4
  104. package/dist/{to-hwpx-Z7NHUMUD.js → to-hwpx-H7B6CEN5.js} +7 -7
  105. package/dist/visual-3H3HGNOW.js +38 -0
  106. package/dist/{watch-EI5QYDT2.js → watch-53NVSD5Z.js} +22 -22
  107. package/package.json +1 -1
  108. package/dist/chunk-H2VOH7X3.cjs.map +0 -1
  109. package/dist/chunk-M27VBFO6.js.map +0 -1
  110. package/dist/chunk-RWU3Y5YK.js.map +0 -1
  111. package/dist/chunk-T7MHZIFG.js.map +0 -1
  112. package/dist/chunks-JAD5Z5YY.js +0 -11
  113. package/dist/formula-3PJYUQMG.js.map +0 -1
  114. package/dist/formula-RTPZD2IM.cjs.map +0 -1
  115. package/dist/formula-UJF4RZ6W.js.map +0 -1
  116. package/dist/generator-EB2436BE.js +0 -18
  117. package/dist/generator-INMUN6KB.cjs +0 -12
  118. package/dist/generator-K5KMPSLC.js +0 -11
  119. package/dist/memo-JNMSGIO7.js +0 -17
  120. package/dist/pdf-ocr-H4DKZSOB.cjs +0 -43
  121. package/dist/seal-Q3BD6CRB.js +0 -16
  122. package/dist/to-hwpx-KZTTH7EY.cjs +0 -16
  123. package/dist/visual-LNHFYJDL.js +0 -38
  124. /package/dist/{-F7GLIIGT.js.map → -S32WDXC4.js.map} +0 -0
  125. /package/dist/{chunk-GFAWIBHG.js.map → chunk-2SUWIRWH.js.map} +0 -0
  126. /package/dist/{chunk-DSCT67WF.js.map → chunk-4GPZVPYG.js.map} +0 -0
  127. /package/dist/{chunk-UJQRIX4L.js.map → chunk-4Q7L4IDD.js.map} +0 -0
  128. /package/dist/{chunk-RUUUGCXS.js.map → chunk-4QOTRR5Z.js.map} +0 -0
  129. /package/dist/{chunk-AUHQRRKM.js.map → chunk-4UL2KIOH.js.map} +0 -0
  130. /package/dist/{chunk-IMT5TVVM.js.map → chunk-6DIACQ3R.js.map} +0 -0
  131. /package/dist/{chunk-OJK4FLS5.js.map → chunk-6GQGU57N.js.map} +0 -0
  132. /package/dist/{chunk-WMA4GJHC.js.map → chunk-7N2L6FBB.js.map} +0 -0
  133. /package/dist/{chunk-5WWGC5SG.js.map → chunk-BD75GPTM.js.map} +0 -0
  134. /package/dist/{chunk-2OF2YWIZ.js.map → chunk-BJCTFKEU.js.map} +0 -0
  135. /package/dist/{chunk-MHXPW72E.js.map → chunk-C3USRXCH.js.map} +0 -0
  136. /package/dist/{chunk-NPBNJCXZ.js.map → chunk-C4K2XCGX.js.map} +0 -0
  137. /package/dist/{chunk-O7PJFEOC.js.map → chunk-CQUOEZBJ.js.map} +0 -0
  138. /package/dist/{chunk-2VBRCIPI.js.map → chunk-DIHV6CDK.js.map} +0 -0
  139. /package/dist/{chunk-KGCJNPAI.js.map → chunk-FKCSNCWC.js.map} +0 -0
  140. /package/dist/{chunk-2CPEW6WC.js.map → chunk-FTPYYLCR.js.map} +0 -0
  141. /package/dist/{chunk-7KVDHXP2.js.map → chunk-G3TKEQZ3.js.map} +0 -0
  142. /package/dist/{chunk-TYGZ6O2A.js.map → chunk-GAZDWFRT.js.map} +0 -0
  143. /package/dist/{chunk-HIYRMYAS.js.map → chunk-GK4OHUV5.js.map} +0 -0
  144. /package/dist/{chunk-LNWURZ2Z.js.map → chunk-GOQWCHX5.js.map} +0 -0
  145. /package/dist/{chunk-ZPJZXTEG.js.map → chunk-IPYSZ2WD.js.map} +0 -0
  146. /package/dist/{chunk-YTDHH362.js.map → chunk-JEPTA64I.js.map} +0 -0
  147. /package/dist/{chunk-EZNUMAAJ.js.map → chunk-LINC7S3M.js.map} +0 -0
  148. /package/dist/{chunk-6ZA4V4QS.js.map → chunk-MCO77XJN.js.map} +0 -0
  149. /package/dist/{chunk-KLUI4SAZ.js.map → chunk-MHYFBIS5.js.map} +0 -0
  150. /package/dist/{chunk-GRCIFCGC.js.map → chunk-NHWWNRQT.js.map} +0 -0
  151. /package/dist/{chunk-OUHMNF2A.js.map → chunk-SNNM4GFE.js.map} +0 -0
  152. /package/dist/{chunk-D4UFBXMT.js.map → chunk-U6CZ5IGF.js.map} +0 -0
  153. /package/dist/{chunk-YPRIJDH6.js.map → chunk-UOML7PVK.js.map} +0 -0
  154. /package/dist/{chunk-QK5KCWLE.js.map → chunk-VRJ3CABR.js.map} +0 -0
  155. /package/dist/{chunk-SMEBVDM2.js.map → chunk-WXKUE2MU.js.map} +0 -0
  156. /package/dist/{chunk-BHYBZSOC.js.map → chunk-YZXGUJFI.js.map} +0 -0
  157. /package/dist/{chunks-JAD5Z5YY.js.map → chunks-XNCDYMWO.js.map} +0 -0
  158. /package/dist/{generator-EB2436BE.js.map → generator-5VFDO4CB.js.map} +0 -0
  159. /package/dist/{generator-K5KMPSLC.js.map → generator-IOGPVCG2.js.map} +0 -0
  160. /package/dist/{hancom-RYIZHWJ5.js.map → hancom-BCYRSFDF.js.map} +0 -0
  161. /package/dist/{hancom-P3SUQXM4.js.map → hancom-HLLJXF2H.js.map} +0 -0
  162. /package/dist/{image-ocr-GL5YVCNU.js.map → image-ocr-B5SIBPET.js.map} +0 -0
  163. /package/dist/{image-ocr-ZXLHPQI2.js.map → image-ocr-QSSVO27L.js.map} +0 -0
  164. /package/dist/{memo-JNMSGIO7.js.map → memo-R5CO35OZ.js.map} +0 -0
  165. /package/dist/{model-bundle-VCUAKBF3.js.map → model-bundle-KB7GFS7J.js.map} +0 -0
  166. /package/dist/{models-UACAGYBI.js.map → models-A6PYBE2Q.js.map} +0 -0
  167. /package/dist/{parse-worker-v2-LJB4QXGF.js.map → parse-worker-v2-OSOABIQB.js.map} +0 -0
  168. /package/dist/{parser-5GZUD22P.js.map → parser-E2ZCR6UV.js.map} +0 -0
  169. /package/dist/{parser-HCZD4DUO.js.map → parser-F7Q2ENVO.js.map} +0 -0
  170. /package/dist/{pdf-ocr-JXVGK5MR.js.map → pdf-ocr-B6QVPBMI.js.map} +0 -0
  171. /package/dist/{pdf-ocr-YCMC2VL4.js.map → pdf-ocr-RY6UZ5PG.js.map} +0 -0
  172. /package/dist/{profile-io-MVTEOXAU.js.map → profile-io-FX2SDCMR.js.map} +0 -0
  173. /package/dist/{rasterize-VWT3C3RW.js.map → rasterize-ZJAMZCQM.js.map} +0 -0
  174. /package/dist/{redact-doc-SU3JDC6F.js.map → redact-doc-DNXUF4WL.js.map} +0 -0
  175. /package/dist/{render-D5N4FKWB.js.map → render-FQ2LMZIL.js.map} +0 -0
  176. /package/dist/{rewrite-fallback-QXTWSPGY.js.map → rewrite-fallback-QNLQXJRS.js.map} +0 -0
  177. /package/dist/{seal-Q3BD6CRB.js.map → seal-6LBVNZYX.js.map} +0 -0
  178. /package/dist/{setup-TXNJYX6P.js.map → setup-2VMN6LBY.js.map} +0 -0
  179. /package/dist/{to-hwpx-YHGVFTBO.js.map → to-hwpx-DS6DH5WH.js.map} +0 -0
  180. /package/dist/{to-hwpx-Z7NHUMUD.js.map → to-hwpx-H7B6CEN5.js.map} +0 -0
  181. /package/dist/{visual-LNHFYJDL.js.map → visual-3H3HGNOW.js.map} +0 -0
  182. /package/dist/{watch-EI5QYDT2.js.map → watch-53NVSD5Z.js.map} +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkBNP3WXTBcjs = require('./chunk-BNP3WXTB.cjs');
8
+ var _chunkJE4NCQINcjs = require('./chunk-JE4NCQIN.cjs');
9
9
 
10
10
 
11
11
  var _chunk6NZ32OTXcjs = require('./chunk-6NZ32OTX.cjs');
@@ -69,11 +69,11 @@ var _chunkJ55UQC5Hcjs = require('./chunk-J55UQC5H.cjs');
69
69
 
70
70
 
71
71
 
72
- var _chunkH2VOH7X3cjs = require('./chunk-H2VOH7X3.cjs');
72
+ var _chunkCOG4POSKcjs = require('./chunk-COG4POSK.cjs');
73
73
 
74
74
 
75
75
  var _chunkMMK32GPDcjs = require('./chunk-MMK32GPD.cjs');
76
- require('./chunk-YTP7FPA5.cjs');
76
+ require('./chunk-U2K3WVR5.cjs');
77
77
 
78
78
 
79
79
 
@@ -90,11 +90,11 @@ require('./chunk-YTP7FPA5.cjs');
90
90
 
91
91
 
92
92
 
93
- var _chunkOW2XKTQAcjs = require('./chunk-OW2XKTQA.cjs');
93
+ var _chunkL4GCUYDScjs = require('./chunk-L4GCUYDS.cjs');
94
94
 
95
95
 
96
96
 
97
- var _chunkLFTO5QAPcjs = require('./chunk-LFTO5QAP.cjs');
97
+ var _chunkZTVH2HQ5cjs = require('./chunk-ZTVH2HQ5.cjs');
98
98
 
99
99
 
100
100
  var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
@@ -427,7 +427,7 @@ async function extractPageImages(page, fnArray, argsArray, pageNumber, state, wa
427
427
  let pristine;
428
428
  let paintIndex = -1;
429
429
  const regions = state.placement ? /* @__PURE__ */ new Map() : void 0;
430
- if (regions) _chunkH2VOH7X3cjs.extractImageRegions.call(void 0, fnArray, argsArray, false, regions);
430
+ if (regions) _chunkCOG4POSKcjs.extractImageRegions.call(void 0, fnArray, argsArray, false, regions);
431
431
  const placed = (block, i) => {
432
432
  const r = _optionalChain([regions, 'optionalAccess', _4 => _4.get, 'call', _5 => _5(i)]);
433
433
  if (r) block.bbox = { page: pageNumber, x: r.x1, y: r.y1, width: r.x2 - r.x1, height: r.y2 - r.y1 };
@@ -509,7 +509,7 @@ async function extractPageImages(page, fnArray, argsArray, pageNumber, state, wa
509
509
  if (state.seen.has(hash)) continue;
510
510
  const rgba = toRgba(imgData, withBytes || !!readQr || state.dropBlank);
511
511
  if (!rgba) continue;
512
- if (state.dropBlank && _chunkBNP3WXTBcjs.isBlankRgba.call(void 0, rgba)) {
512
+ if (state.dropBlank && _chunkJE4NCQINcjs.isBlankRgba.call(void 0, rgba)) {
513
513
  state.seen.set(hash, "");
514
514
  continue;
515
515
  }
@@ -609,7 +609,7 @@ async function extractPdfiumImage(image, pageNumber, state, warnings, withBytes,
609
609
  const hash = `${w}x${h}kPh${contentHash(rgba)}`;
610
610
  state.rawKeys.set(image.raw, hash);
611
611
  if (state.seen.has(hash)) return null;
612
- if (state.dropBlank && _chunkBNP3WXTBcjs.isBlankRgba.call(void 0, rgba)) {
612
+ if (state.dropBlank && _chunkJE4NCQINcjs.isBlankRgba.call(void 0, rgba)) {
613
613
  state.seen.set(hash, "");
614
614
  return null;
615
615
  }
@@ -1057,13 +1057,13 @@ function ocrVectorOps(opList, paths) {
1057
1057
 
1058
1058
  // src/pdf/split-row-pattern.ts
1059
1059
  var textOf = (cell) => cell.text.replace(/<\/?u>|~~/g, "").trim();
1060
- var plain = (cell) => !_optionalChain([cell, 'access', _31 => _31.blocks, 'optionalAccess', _32 => _32.length]) && !_chunkH2VOH7X3cjs.IMAGE_CELLS.has(cell);
1060
+ var plain = (cell) => !_optionalChain([cell, 'access', _31 => _31.blocks, 'optionalAccess', _32 => _32.length]) && !_chunkCOG4POSKcjs.IMAGE_CELLS.has(cell);
1061
1061
  var labelsOf = (cell) => {
1062
1062
  const labels = textOf(cell).split("\n").map((s) => s.trim()).filter(Boolean);
1063
1063
  return labels.length && labels.every((s) => /^\p{L}[\p{L}\p{N} ]{0,15}[::]$/u.test(s)) ? labels.map((s) => s.replace(/\s+/g, "").replace(/:/g, ":")) : void 0;
1064
1064
  };
1065
1065
  var alignedLabels = (label, value, count) => {
1066
- const L = _chunkH2VOH7X3cjs.CELL_LINES.get(label), V = _chunkH2VOH7X3cjs.CELL_LINES.get(value);
1066
+ const L = _chunkCOG4POSKcjs.CELL_LINES.get(label), V = _chunkCOG4POSKcjs.CELL_LINES.get(value);
1067
1067
  let next = 0;
1068
1068
  return !!L && !!V && L.length === count && V.length >= count && Math.abs(L[0].y - V[0].y) <= 1 && L.every((l) => {
1069
1069
  while (next < V.length && Math.abs(l.y - V[next].y) > 1) next++;
@@ -1071,7 +1071,7 @@ var alignedLabels = (label, value, count) => {
1071
1071
  });
1072
1072
  };
1073
1073
  function partialAlignedLabelCells(table, owner, first) {
1074
- const pageOf = (a) => _nullishCoalesce(_chunkOW2XKTQAcjs.CELL_PAGES.get(_nullishCoalesce(a.cell, () => ( table.cells[a.r][a.c]))), () => ( (a.r < first ? -1 : -2)));
1074
+ const pageOf = (a) => _nullishCoalesce(_chunkL4GCUYDScjs.CELL_PAGES.get(_nullishCoalesce(a.cell, () => ( table.cells[a.r][a.c]))), () => ( (a.r < first ? -1 : -2)));
1075
1075
  const pairs = [];
1076
1076
  let carried = false;
1077
1077
  for (let c = 0; c < table.cols; ) {
@@ -1094,10 +1094,10 @@ function partialAlignedLabelCells(table, owner, first) {
1094
1094
  const keyed = pairs.filter((p) => labelsOf(p.upper) && labelsOf(p.lower));
1095
1095
  if (keyed.length !== 1) return;
1096
1096
  const label = keyed[0], value = pairs.find((p) => p.c === label.c + label.cs), context = pairs.find((p) => p.c + p.cs === label.c);
1097
- if (!value || !context || value === context || textOf(context.upper).replace(/\s+/g, "") === textOf(context.lower).replace(/\s+/g, "") || !_optionalChain([_chunkOW2XKTQAcjs.CELL_EDGES, 'access', _43 => _43.get, 'call', _44 => _44(context.upper), 'optionalAccess', _45 => _45.b]) || !_optionalChain([_chunkOW2XKTQAcjs.CELL_EDGES, 'access', _46 => _46.get, 'call', _47 => _47(context.lower), 'optionalAccess', _48 => _48.t])) return;
1097
+ if (!value || !context || value === context || textOf(context.upper).replace(/\s+/g, "") === textOf(context.lower).replace(/\s+/g, "") || !_optionalChain([_chunkL4GCUYDScjs.CELL_EDGES, 'access', _43 => _43.get, 'call', _44 => _44(context.upper), 'optionalAccess', _45 => _45.b]) || !_optionalChain([_chunkL4GCUYDScjs.CELL_EDGES, 'access', _46 => _46.get, 'call', _47 => _47(context.lower), 'optionalAccess', _48 => _48.t])) return;
1098
1098
  const U = labelsOf(label.upper), D = labelsOf(label.lower), sequence = [...U, ...D];
1099
1099
  if (D.length < 2 || sequence.length < 3 || new Set(sequence).size !== sequence.length || !alignedLabels(label.upper, value.upper, U.length)) return;
1100
- const L = _chunkH2VOH7X3cjs.CELL_LINES.get(label.lower), V = _chunkH2VOH7X3cjs.CELL_LINES.get(value.lower);
1100
+ const L = _chunkCOG4POSKcjs.CELL_LINES.get(label.lower), V = _chunkCOG4POSKcjs.CELL_LINES.get(value.lower);
1101
1101
  if (!L || !V || L.length !== D.length) return;
1102
1102
  let next = V.findIndex((v) => Math.abs(v.y - L[0].y) <= 1);
1103
1103
  if (next <= 0 || !V.slice(0, next).every((v) => v.y > L[0].y + 1) || !L.every((l) => {
@@ -1117,14 +1117,14 @@ function partialAlignedLabelCells(table, owner, first) {
1117
1117
  continue;
1118
1118
  }
1119
1119
  if (list.length < 3 || new Set(list).size !== list.length) continue;
1120
- const visible = _nullishCoalesce(_optionalChain([_chunkH2VOH7X3cjs.CELL_LINES, 'access', _53 => _53.get, 'call', _54 => _54(lc), 'optionalAccess', _55 => _55.length]), () => ( 0)), values = _chunkH2VOH7X3cjs.CELL_LINES.get(vc);
1120
+ const visible = _nullishCoalesce(_optionalChain([_chunkCOG4POSKcjs.CELL_LINES, 'access', _53 => _53.get, 'call', _54 => _54(lc), 'optionalAccess', _55 => _55.length]), () => ( 0)), values = _chunkCOG4POSKcjs.CELL_LINES.get(vc);
1121
1121
  if (visible < 3 || visible > list.length || !values || !alignedLabels(lc, vc, visible)) continue;
1122
1122
  const top = Math.max(...values.map((v2) => v2.y)), bottom = Math.min(...values.map((v2) => v2.y));
1123
1123
  const contexts = [];
1124
1124
  for (let rr = r; rr < r + l.rs && rr < table.rows; rr++) {
1125
1125
  const a = _optionalChain([owner, 'access', _56 => _56[rr], 'optionalAccess', _57 => _57[context.c]]), cell = a ? table.cells[a.r][a.c] : void 0;
1126
1126
  if (!a || a.r !== rr || a.c !== context.c || a.cs !== context.cs || a.rs !== 1 || !cell || !plain(cell) || !textOf(cell) || pageOf(a) !== pageOf(l)) break;
1127
- const lines = _chunkH2VOH7X3cjs.CELL_LINES.get(cell);
1127
+ const lines = _chunkCOG4POSKcjs.CELL_LINES.get(cell);
1128
1128
  if (!_optionalChain([lines, 'optionalAccess', _58 => _58.length]) || lines.some((line) => line.y > top + 1 || line.y < bottom - 1)) break;
1129
1129
  contexts.push(textOf(cell).replace(/\s+/g, ""));
1130
1130
  }
@@ -1426,7 +1426,7 @@ function rowStarts(t) {
1426
1426
  }
1427
1427
  var covering = (t, r) => rowStarts(t).slice(0, r + 1).flatMap((starts, rr) => starts.filter((s) => rr + s.cell.rowSpan > r).map((s) => s.cell));
1428
1428
  function cellPage(cell) {
1429
- const p = _chunkOW2XKTQAcjs.CELL_PAGES.get(cell);
1429
+ const p = _chunkL4GCUYDScjs.CELL_PAGES.get(cell);
1430
1430
  if (p !== void 0 || !_optionalChain([cell, 'access', _125 => _125.blocks, 'optionalAccess', _126 => _126.length]) || cell.blocks.some((b) => b.pageNumber === void 0)) return p;
1431
1431
  return Math.min(...cell.blocks.map((b) => b.pageNumber));
1432
1432
  }
@@ -1455,7 +1455,7 @@ function markJoinedPages(table, prev, curr) {
1455
1455
  rows.forEach((starts, r) => {
1456
1456
  const page2 = r < pt.rows ? pp[r] : cp[r - off];
1457
1457
  for (const { cell } of starts) {
1458
- if (page2 !== void 0 && page2 !== prev.pageNumber) _chunkOW2XKTQAcjs.CELL_PAGES.set(cell, page2);
1458
+ if (page2 !== void 0 && page2 !== prev.pageNumber) _chunkL4GCUYDScjs.CELL_PAGES.set(cell, page2);
1459
1459
  const src = _optionalChain([(r < pt.rows ? ptRows[r] : ctRows[r - off]), 'optionalAccess', _129 => _129.find, 'call', _130 => _130((s) => s.cell !== cell && s.cell.text === cell.text && CELL_SPLITS.has(s.cell))]);
1460
1460
  if (src) setSplits(cell, relocate(src.cell, cell));
1461
1461
  }
@@ -1515,8 +1515,8 @@ function splitCrossPageRows(t, pageNumber) {
1515
1515
  if (!splits.length) continue;
1516
1516
  const clone = (cell, patch) => {
1517
1517
  const out = { ...cell, ...patch };
1518
- const p = _chunkOW2XKTQAcjs.CELL_PAGES.get(cell);
1519
- if (p !== void 0) _chunkOW2XKTQAcjs.CELL_PAGES.set(out, p);
1518
+ const p = _chunkL4GCUYDScjs.CELL_PAGES.get(cell);
1519
+ if (p !== void 0) _chunkL4GCUYDScjs.CELL_PAGES.set(out, p);
1520
1520
  if (!("text" in patch) && CELL_SPLITS.has(cell)) CELL_SPLITS.set(out, CELL_SPLITS.get(cell));
1521
1521
  return out;
1522
1522
  };
@@ -1527,7 +1527,7 @@ function splitCrossPageRows(t, pageNumber) {
1527
1527
  for (const { cell, c, split } of splits) {
1528
1528
  cells[r][c] = clone(cell, { ...split.head, rowSpan: cut - r });
1529
1529
  const tail = { ...cell, ...split.tail, rowSpan: r + cell.rowSpan - cut };
1530
- _chunkOW2XKTQAcjs.CELL_PAGES.set(tail, split.page);
1530
+ _chunkL4GCUYDScjs.CELL_PAGES.set(tail, split.page);
1531
1531
  setSplits(tail, split.rest);
1532
1532
  cells[cut][c] = tail;
1533
1533
  }
@@ -1537,7 +1537,7 @@ function splitCrossPageRows(t, pageNumber) {
1537
1537
  for (const { cell, c, split } of splits) {
1538
1538
  cells[r][c] = clone(cell, split.head);
1539
1539
  const tail = { ...cell, ...split.tail, rowSpan: 1 };
1540
- _chunkOW2XKTQAcjs.CELL_PAGES.set(tail, split.page);
1540
+ _chunkL4GCUYDScjs.CELL_PAGES.set(tail, split.page);
1541
1541
  setSplits(tail, split.rest);
1542
1542
  row[c] = tail;
1543
1543
  }
@@ -1628,7 +1628,7 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1628
1628
  if (cols < 1) return null;
1629
1629
  const pa = anchorsOf(prev), ca = anchorsOf(curr);
1630
1630
  const cutOpen = (() => {
1631
- const u = _chunkH2VOH7X3cjs.ROW_RULES.get(prev), d = _chunkH2VOH7X3cjs.ROW_RULES.get(curr);
1631
+ const u = _chunkCOG4POSKcjs.ROW_RULES.get(prev), d = _chunkCOG4POSKcjs.ROW_RULES.get(curr);
1632
1632
  return !!u && !!d && !u.bottom && !d.top;
1633
1633
  })();
1634
1634
  let skip = 0, head = 0;
@@ -1660,19 +1660,19 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1660
1660
  if (r + dr < rows) owner[r + dr][dc] = placed;
1661
1661
  }
1662
1662
  grid[r][c1] = { ...a.cell, colSpan: c2 - c1, rowSpan: a.rs };
1663
- const lines = _chunkH2VOH7X3cjs.CELL_LINES.get(a.cell);
1664
- if (lines) _chunkH2VOH7X3cjs.CELL_LINES.set(grid[r][c1], shift ? lines.map((l) => ({ ...l, l: l.l + shift, r: l.r + shift })) : lines);
1665
- if (_chunkH2VOH7X3cjs.IMAGE_CELLS.has(a.cell)) _chunkH2VOH7X3cjs.IMAGE_CELLS.add(grid[r][c1]);
1666
- const edges = _chunkOW2XKTQAcjs.CELL_EDGES.get(a.cell);
1663
+ const lines = _chunkCOG4POSKcjs.CELL_LINES.get(a.cell);
1664
+ if (lines) _chunkCOG4POSKcjs.CELL_LINES.set(grid[r][c1], shift ? lines.map((l) => ({ ...l, l: l.l + shift, r: l.r + shift })) : lines);
1665
+ if (_chunkCOG4POSKcjs.IMAGE_CELLS.has(a.cell)) _chunkCOG4POSKcjs.IMAGE_CELLS.add(grid[r][c1]);
1666
+ const edges = _chunkL4GCUYDScjs.CELL_EDGES.get(a.cell);
1667
1667
  if (edges) {
1668
- _chunkOW2XKTQAcjs.CELL_EDGES.set(grid[r][c1], edges);
1668
+ _chunkL4GCUYDScjs.CELL_EDGES.set(grid[r][c1], edges);
1669
1669
  edged = true;
1670
1670
  }
1671
1671
  return true;
1672
1672
  };
1673
- for (const a of pa) if (!_chunkH2VOH7X3cjs.FILLER_CELLS.has(a.cell) && !place(a, pcx, 0)) return null;
1673
+ for (const a of pa) if (!_chunkCOG4POSKcjs.FILLER_CELLS.has(a.cell) && !place(a, pcx, 0)) return null;
1674
1674
  for (const a of ca) {
1675
- if (a.r < skip || _chunkH2VOH7X3cjs.FILLER_CELLS.has(a.cell)) continue;
1675
+ if (a.r < skip || _chunkCOG4POSKcjs.FILLER_CELLS.has(a.cell)) continue;
1676
1676
  if (!place(a, cxU, prev.rows - skip, dx)) return null;
1677
1677
  }
1678
1678
  const first = prev.rows;
@@ -1696,9 +1696,9 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1696
1696
  const grown = { ...above, rs: newRs };
1697
1697
  for (let rr = above.r; rr < above.r + newRs; rr++) for (let dc = above.c; dc < above.c + above.cs; dc++) owner[rr][dc] = grown;
1698
1698
  }
1699
- for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunkH2VOH7X3cjs.FILLER_CELLS.add(grid[r][c]);
1699
+ for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunkCOG4POSKcjs.FILLER_CELLS.add(grid[r][c]);
1700
1700
  if (edged) {
1701
- for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunkOW2XKTQAcjs.CELL_EDGES.set(grid[r][c], _chunkH2VOH7X3cjs.NO_EDGES);
1701
+ for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) if (owner[r][c] === null) _chunkL4GCUYDScjs.CELL_EDGES.set(grid[r][c], _chunkCOG4POSKcjs.NO_EDGES);
1702
1702
  }
1703
1703
  for (let c = 0; c < cols && U[c + 1] <= pcx[0] + PART_COL_TOL; c++) {
1704
1704
  let r = prev.rows;
@@ -1707,7 +1707,7 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1707
1707
  for (let rr = 0; rr < r; rr++) owner[rr][c] = through;
1708
1708
  }
1709
1709
  const table = { rows, cols, cells: grid, hasHeader: prev.hasHeader, ...prev.caption ? { caption: prev.caption } : {} };
1710
- const pr = _chunkH2VOH7X3cjs.ROW_RULES.get(prev), cr = _chunkH2VOH7X3cjs.ROW_RULES.get(curr);
1710
+ const pr = _chunkCOG4POSKcjs.ROW_RULES.get(prev), cr = _chunkCOG4POSKcjs.ROW_RULES.get(curr);
1711
1711
  const shifted = dx !== 0;
1712
1712
  const cut = {
1713
1713
  open: !!pr && !!cr && !pr.bottom && !cr.top && pr.innerOpen + cr.innerOpen === 0 && pr.innerRuled + cr.innerRuled > 0,
@@ -1715,13 +1715,13 @@ function joinSplitParts(prev, pcx, curr, ccx, dx = 0, prevBottom, lex) {
1715
1715
  list: !shifted ? "any" : skip > 0 && ca.filter((a) => a.r < skip && a.cell.text.trim()).length < 2 ? "none" : "multi"
1716
1716
  };
1717
1717
  let partial = !skip && cols === prev.cols && cols === curr.cols && cut.ruled && prevBottom !== void 0 ? partialAlignedLabelCells(table, owner, first) : void 0;
1718
- if (partial && (continuesAcross(partial.context.upper, partial.context.lower, U[partial.context.c], U[partial.context.c + partial.context.cs]) || clauseContinues(partial.context.upper, partial.context.lower) || quantityContinues(partial.context.upper, partial.context.lower) || !continuesAcross(partial.value.upper, partial.value.lower, U[partial.value.c], U[partial.value.c + partial.value.cs]) || _chunkH2VOH7X3cjs.startsNewItem.call(void 0, partial.value.upper.text, partial.value.lower.text))) partial = void 0;
1718
+ if (partial && (continuesAcross(partial.context.upper, partial.context.lower, U[partial.context.c], U[partial.context.c + partial.context.cs]) || clauseContinues(partial.context.upper, partial.context.lower) || quantityContinues(partial.context.upper, partial.context.lower) || !continuesAcross(partial.value.upper, partial.value.lower, U[partial.value.c], U[partial.value.c + partial.value.cs]) || _chunkCOG4POSKcjs.startsNewItem.call(void 0, partial.value.upper.text, partial.value.lower.text))) partial = void 0;
1719
1719
  const selected = partial ? /* @__PURE__ */ new Set([partial.label.c, partial.value.c]) : void 0;
1720
1720
  let split = !selected && rows > prev.rows && mergeSplitRow(table, owner, prev.rows, U, false, cut);
1721
1721
  if (rows > prev.rows && !split && prevBottom !== void 0 && mergeStraddlingCells(table, owner, prev.rows, prevBottom, lex, U, selected) && !selected) split = mergeSplitRow(table, owner, prev.rows, U, true, { ...cut, open: false });
1722
1722
  if (pr && cr) {
1723
1723
  const cutRuled = pr.bottom || cr.top;
1724
- _chunkH2VOH7X3cjs.ROW_RULES.set(table, { top: pr.top, bottom: cr.bottom, innerRuled: pr.innerRuled + cr.innerRuled + (!split && cutRuled ? 1 : 0), innerOpen: pr.innerOpen + cr.innerOpen + (!split && !cutRuled ? 1 : 0) });
1724
+ _chunkCOG4POSKcjs.ROW_RULES.set(table, { top: pr.top, bottom: cr.bottom, innerRuled: pr.innerRuled + cr.innerRuled + (!split && cutRuled ? 1 : 0), innerOpen: pr.innerOpen + cr.innerOpen + (!split && !cutRuled ? 1 : 0) });
1725
1725
  }
1726
1726
  return { table, colXs: U, split, header: ca.filter((a) => a.r < skip && a.cell.text.trim()).length >= 2 };
1727
1727
  }
@@ -1783,18 +1783,18 @@ function mergeStraddlingCells(table, owner, first, prevBottom, lex, colXs, selec
1783
1783
  if (!d || d === u || u.r + u.rs - 1 !== last || d.r !== first || d.c !== u.c || d.cs !== u.cs) continue;
1784
1784
  const a = table.cells[u.r][u.c], b = table.cells[first][d.c];
1785
1785
  if (selected && !selected.has(u.c)) continue;
1786
- const flowsOn = itemBreak && straddles && !!colXs && hasContent(a) && hasContent(b) && longLastLine(a) && !_chunkH2VOH7X3cjs.startsNewItem.call(void 0, a.text, b.text) && continuesAcross(a, b, colXs[u.c], colXs[u.c + u.cs]);
1787
- const openSeam = hasContent(a) && hasContent(b) && _chunkH2VOH7X3cjs.hasOpenCellSeam.call(void 0, a, b) && !owner.some((row, r) => {
1786
+ const flowsOn = itemBreak && straddles && !!colXs && hasContent(a) && hasContent(b) && longLastLine(a) && !_chunkCOG4POSKcjs.startsNewItem.call(void 0, a.text, b.text) && continuesAcross(a, b, colXs[u.c], colXs[u.c + u.cs]);
1787
+ const openSeam = hasContent(a) && hasContent(b) && _chunkCOG4POSKcjs.hasOpenCellSeam.call(void 0, a, b) && !owner.some((row, r) => {
1788
1788
  if (!r || r === first) return false;
1789
1789
  const up = owner[r - 1][u.c], down = row[u.c];
1790
1790
  if (!up || !down || up === down || up.c !== u.c || down.c !== u.c || up.cs !== u.cs || down.cs !== u.cs) return false;
1791
- const ue = _chunkOW2XKTQAcjs.CELL_EDGES.get(table.cells[up.r][up.c]), de = _chunkOW2XKTQAcjs.CELL_EDGES.get(table.cells[down.r][down.c]);
1791
+ const ue = _chunkL4GCUYDScjs.CELL_EDGES.get(table.cells[up.r][up.c]), de = _chunkL4GCUYDScjs.CELL_EDGES.get(table.cells[down.r][down.c]);
1792
1792
  return !!ue && !!de && !ue.b && !de.t;
1793
1793
  });
1794
1794
  if (!selected && !openSeam && !flowsOn && !crossed.has(shape(u, d)) && !(u.rs >= 2 && u.c + u.cs <= firstNew && hasContent(a) && !hasContent(b))) {
1795
1795
  if (!straddles && !midWord) continue;
1796
1796
  if (u.r >= last && d.rs < 2) continue;
1797
- const U = _chunkH2VOH7X3cjs.CELL_LINES.get(a);
1797
+ const U = _chunkCOG4POSKcjs.CELL_LINES.get(a);
1798
1798
  if (!_optionalChain([U, 'optionalAccess', _156 => _156.length]) || !hasContent(b)) continue;
1799
1799
  if (!(straddles && filledToBottom(U, prevBottom) && clauseContinues(a, b))) {
1800
1800
  if (U.length > STRADDLE_MAX_LINES) continue;
@@ -1812,7 +1812,7 @@ function mergeStraddlingCells(table, owner, first, prevBottom, lex, colXs, selec
1812
1812
  return merged;
1813
1813
  }
1814
1814
  function longLastLine(c) {
1815
- const L = _chunkH2VOH7X3cjs.CELL_LINES.get(c), l = _optionalChain([L, 'optionalAccess', _157 => _157[L.length - 1]]);
1815
+ const L = _chunkCOG4POSKcjs.CELL_LINES.get(c), l = _optionalChain([L, 'optionalAccess', _157 => _157[L.length - 1]]);
1816
1816
  return !!l && l.r - l.l >= 6 * (l.h || 10);
1817
1817
  }
1818
1818
  function filledToBottom(U, bottom) {
@@ -1845,7 +1845,7 @@ function nextItemHead(prev, next) {
1845
1845
  return false;
1846
1846
  }
1847
1847
  function continuesAcross(u, d, x1, x2) {
1848
- const U = _chunkH2VOH7X3cjs.CELL_LINES.get(u), D = _chunkH2VOH7X3cjs.CELL_LINES.get(d);
1848
+ const U = _chunkCOG4POSKcjs.CELL_LINES.get(u), D = _chunkCOG4POSKcjs.CELL_LINES.get(d);
1849
1849
  if (!_optionalChain([U, 'optionalAccess', _158 => _158.length]) || !_optionalChain([D, 'optionalAccess', _159 => _159.length])) return false;
1850
1850
  const last = U[U.length - 1];
1851
1851
  const fs = last.h || 10;
@@ -1863,7 +1863,7 @@ function continuesAcross(u, d, x1, x2) {
1863
1863
  if (U.length === 1 && x2 - last.r > Math.max(FULL_LINE_EDGE_MIN, SINGLE_LINE_WORD_GAP * fs)) return false;
1864
1864
  const indented = last.l - minL >= HANGING_MIN * fs;
1865
1865
  if (last.r - last.l < FULL_LINE_MIN_FRAC * (indented ? x2 - last.l : x2 - x1)) return false;
1866
- const newItem = _chunkH2VOH7X3cjs.startsNewItem.call(void 0, u.text, d.text);
1866
+ const newItem = _chunkCOG4POSKcjs.startsNewItem.call(void 0, u.text, d.text);
1867
1867
  const all = D.length ? U.concat(D) : U;
1868
1868
  const leftAligned = (l) => maxR - l.r > SHORT_LINE_GAP * fs && (l.l - minL <= fs || !newItem && all.some((o) => o !== l && Math.abs(o.l - l.l) <= HANGING_TOL && Math.abs(o.r - l.r) >= HANGING_MIN * fs));
1869
1869
  const hanging = U.length >= 2 && U.every((l) => maxR - l.r <= FULL_LINE_TOL * fs) && indented && Math.abs(D[0].l - last.l) <= HANGING_TOL;
@@ -1880,10 +1880,10 @@ function outlineContinues(u, d) {
1880
1880
  return U.length >= 2 && D.length >= 1 && U.some((l) => OUTLINE_HEAD.test(l)) && OUTLINE_ITEM.test(D[0]);
1881
1881
  }
1882
1882
  function lineEnded(c, x1, x2, next) {
1883
- const L = _chunkH2VOH7X3cjs.CELL_LINES.get(c);
1883
+ const L = _chunkCOG4POSKcjs.CELL_LINES.get(c);
1884
1884
  if (!L || L.length !== 1) return false;
1885
1885
  const l = L[0], h = l.h || 10;
1886
- const d0 = next ? _optionalChain([_chunkH2VOH7X3cjs.CELL_LINES, 'access', _160 => _160.get, 'call', _161 => _161(next), 'optionalAccess', _162 => _162[0]]) : void 0;
1886
+ const d0 = next ? _optionalChain([_chunkCOG4POSKcjs.CELL_LINES, 'access', _160 => _160.get, 'call', _161 => _161(next), 'optionalAccess', _162 => _162[0]]) : void 0;
1887
1887
  if (d0 && d0.l - l.l >= HANGING_MIN * h) return false;
1888
1888
  return x2 - l.r - (l.l - x1) >= Math.max(LABEL_ROOM, firstWordUnits(_nullishCoalesce(_optionalChain([next, 'optionalAccess', _163 => _163.text]), () => ( "")))) * h;
1889
1889
  }
@@ -1894,15 +1894,15 @@ function firstWordUnits(text) {
1894
1894
  return units;
1895
1895
  }
1896
1896
  function appendCell(a, b) {
1897
- if (_chunkH2VOH7X3cjs.IMAGE_CELLS.has(b)) _chunkH2VOH7X3cjs.IMAGE_CELLS.add(a);
1897
+ if (_chunkCOG4POSKcjs.IMAGE_CELLS.has(b)) _chunkCOG4POSKcjs.IMAGE_CELLS.add(a);
1898
1898
  if (_optionalChain([a, 'access', _164 => _164.blocks, 'optionalAccess', _165 => _165.length]) || _optionalChain([b, 'access', _166 => _166.blocks, 'optionalAccess', _167 => _167.length])) {
1899
1899
  const asBlocks = (c) => _optionalChain([c, 'access', _168 => _168.blocks, 'optionalAccess', _169 => _169.length]) ? c.blocks : c.text.split("\n").map((l) => l.trim()).filter(Boolean).map((text) => ({ type: "paragraph", text }));
1900
1900
  a.blocks = [...asBlocks(a), ...asBlocks(b)];
1901
1901
  }
1902
1902
  if (b.text.trim()) a.text = a.text.trim() ? a.text + "\n" + b.text : b.text;
1903
- _chunkH2VOH7X3cjs.joinCellEdges.call(void 0, a, b);
1903
+ _chunkCOG4POSKcjs.joinCellEdges.call(void 0, a, b);
1904
1904
  }
1905
- var hasContent = (cell) => !!cell.text.trim() || !!_optionalChain([cell, 'access', _170 => _170.blocks, 'optionalAccess', _171 => _171.length]) || _chunkH2VOH7X3cjs.IMAGE_CELLS.has(cell);
1905
+ var hasContent = (cell) => !!cell.text.trim() || !!_optionalChain([cell, 'access', _170 => _170.blocks, 'optionalAccess', _171 => _171.length]) || _chunkCOG4POSKcjs.IMAGE_CELLS.has(cell);
1906
1906
  var CLAUSE_OPEN_ENDING = /(?:하는|되는|하고|하며|하여|되어|되고|되며|이며|으며|어야|아야|여야)$/;
1907
1907
  var batchim = (ch) => {
1908
1908
  const k = ch.charCodeAt(0) - 44032;
@@ -1910,7 +1910,7 @@ var batchim = (ch) => {
1910
1910
  };
1911
1911
  function clauseContinues(u, d) {
1912
1912
  const tail = _nullishCoalesce(flowText(u.text).trim().split(/\s+/).pop(), () => ( "")), head = flowText(d.text).trim();
1913
- if (!/^[가-힣]{2,}$/.test(tail) || !/^[가-힣]/.test(head) || _chunkH2VOH7X3cjs.startsNewItem.call(void 0, u.text, head)) return false;
1913
+ if (!/^[가-힣]{2,}$/.test(tail) || !/^[가-힣]/.test(head) || _chunkCOG4POSKcjs.startsNewItem.call(void 0, u.text, head)) return false;
1914
1914
  const last = tail[tail.length - 1], before = tail[tail.length - 2];
1915
1915
  return last === "\uC744" && batchim(before) || last === "\uB97C" && !batchim(before) || CLAUSE_OPEN_ENDING.test(tail);
1916
1916
  }
@@ -1918,8 +1918,8 @@ function quantityContinues(u, d) {
1918
1918
  return /\d[\d,.]*\s*(?:%|[가-힣]{1,2})?$/.test(flowText(u.text).trim()) && /^(?:미만|이상|이하|초과)(?![가-힣])/.test(flowText(d.text).trim());
1919
1919
  }
1920
1920
  function wordOverflows(u, d, x1, x2) {
1921
- const U = _chunkH2VOH7X3cjs.CELL_LINES.get(u);
1922
- if (!_optionalChain([U, 'optionalAccess', _172 => _172.length]) || _chunkH2VOH7X3cjs.startsNewItem.call(void 0, u.text, d.text)) return false;
1921
+ const U = _chunkCOG4POSKcjs.CELL_LINES.get(u);
1922
+ if (!_optionalChain([U, 'optionalAccess', _172 => _172.length]) || _chunkCOG4POSKcjs.startsNewItem.call(void 0, u.text, d.text)) return false;
1923
1923
  const last = U[U.length - 1], units = firstWordUnits(d.text);
1924
1924
  return units > 0 && last.r - last.l + units * (last.h || 10) > x2 - x1;
1925
1925
  }
@@ -1988,7 +1988,7 @@ function mergeSplitRow(table, owner, first, colXs, textOnly = false, cut = NO_CU
1988
1988
  if (!carriedSplit && !band) {
1989
1989
  const norm = (c) => flowText(c.text).replace(/\s+/g, "");
1990
1990
  if (pairs.some(([u, d]) => hasContent(d.cell) && norm(cell(d)) !== norm(cell(u)) && lineEnded(cell(u), colXs[u.c], colXs[u.c + u.cs], cell(d)))) return false;
1991
- const oneLine = (c) => _optionalChain([_chunkH2VOH7X3cjs.CELL_LINES, 'access', _174 => _174.get, 'call', _175 => _175(c), 'optionalAccess', _176 => _176.length]) === 1;
1991
+ const oneLine = (c) => _optionalChain([_chunkCOG4POSKcjs.CELL_LINES, 'access', _174 => _174.get, 'call', _175 => _175(c), 'optionalAccess', _176 => _176.length]) === 1;
1992
1992
  if (pairs.some(([u, d]) => nextItemHead(cell(u).text, cell(d).text)) && pairs.some(([u, d]) => hasContent(u.cell) && hasContent(d.cell) && oneLine(cell(u)) && oneLine(cell(d)) && norm(cell(u)) !== norm(cell(d)))) return false;
1993
1993
  if (cut.ruled && pairs.some(([u, d]) => u.rs >= 2 && hasContent(u.cell) && hasContent(d.cell) && oneLine(cell(u)) && oneLine(cell(d)) && norm(cell(u)) !== norm(cell(d)))) return false;
1994
1994
  const flows = ([u, d]) => continuesAcross(cell(u), cell(d), colXs[u.c], colXs[u.c + u.cs]) || clauseContinues(cell(u), cell(d)) || quantityContinues(cell(u), cell(d));
@@ -2081,19 +2081,19 @@ function mergeCrossPageTables(blocks, pageHeights, lex) {
2081
2081
  placeJoined(blocks, i, j, joined);
2082
2082
  continue;
2083
2083
  }
2084
- if (_chunkH2VOH7X3cjs.EMPTY_PARTS.has(curr.table)) {
2084
+ if (_chunkCOG4POSKcjs.EMPTY_PARTS.has(curr.table)) {
2085
2085
  blocks.splice(j, 1);
2086
2086
  i++;
2087
2087
  continue;
2088
2088
  }
2089
2089
  if (joined === null) continue;
2090
- if (prev.table.cols !== curr.table.cols || prev.table.renderAsTable !== curr.table.renderAsTable || _chunkH2VOH7X3cjs.EMPTY_PARTS.has(prev.table)) continue;
2090
+ if (prev.table.cols !== curr.table.cols || prev.table.renderAsTable !== curr.table.renderAsTable || _chunkCOG4POSKcjs.EMPTY_PARTS.has(prev.table)) continue;
2091
2091
  const width = Math.max(prev.bbox.width, curr.bbox.width, 1);
2092
2092
  const leftDiff = Math.abs(prev.bbox.x - curr.bbox.x);
2093
2093
  const rightDiff = Math.abs(prev.bbox.x + prev.bbox.width - (curr.bbox.x + curr.bbox.width));
2094
2094
  if (leftDiff > width * NEIGHBOR_TABLE_EPSILON || rightDiff > width * NEIGHBOR_TABLE_EPSILON) continue;
2095
- const px = _chunkH2VOH7X3cjs.TABLE_COLXS.get(prev.table), cx = _chunkH2VOH7X3cjs.TABLE_COLXS.get(curr.table);
2096
- if (px && cx && !shiftedSame(px, cx, !_chunkH2VOH7X3cjs.CLIP_TABLES.has(prev.table) && !_chunkH2VOH7X3cjs.CLIP_TABLES.has(curr.table))) continue;
2095
+ const px = _chunkCOG4POSKcjs.TABLE_COLXS.get(prev.table), cx = _chunkCOG4POSKcjs.TABLE_COLXS.get(curr.table);
2096
+ if (px && cx && !shiftedSame(px, cx, !_chunkCOG4POSKcjs.CLIP_TABLES.has(prev.table) && !_chunkCOG4POSKcjs.CLIP_TABLES.has(curr.table))) continue;
2097
2097
  if (!px !== !cx) continue;
2098
2098
  if (!rowTextsEqual(prev.table.cells[0], curr.table.cells[0]) && sameHeadShape(prev.table.cells[0], curr.table.cells[0])) continue;
2099
2099
  let currCells = curr.table.cells;
@@ -2105,16 +2105,16 @@ function mergeCrossPageTables(blocks, pageHeights, lex) {
2105
2105
  blocks.splice(j, 1);
2106
2106
  continue;
2107
2107
  }
2108
- if (px && cx && !_chunkH2VOH7X3cjs.CLIP_TABLES.has(prev.table) && !_chunkH2VOH7X3cjs.CLIP_TABLES.has(curr.table) && currCells.length < curr.table.cells.length && curr.table.cells[0].filter((c) => c.text.trim()).length >= 2 && prev.table.cells.at(-1).concat(currCells[0]).every((c) => c.rowSpan === 1 && c.colSpan === 1 && _chunkH2VOH7X3cjs.CELL_LINES.has(c))) {
2108
+ if (px && cx && !_chunkCOG4POSKcjs.CLIP_TABLES.has(prev.table) && !_chunkCOG4POSKcjs.CLIP_TABLES.has(curr.table) && currCells.length < curr.table.cells.length && curr.table.cells[0].filter((c) => c.text.trim()).length >= 2 && prev.table.cells.at(-1).concat(currCells[0]).every((c) => c.rowSpan === 1 && c.colSpan === 1 && _chunkCOG4POSKcjs.CELL_LINES.has(c))) {
2109
2109
  const dx = px[0] - cx[0];
2110
2110
  const part = joinSplitParts(prev.table, px, curr.table, cx.map((x) => x + dx), dx, void 0, lex);
2111
2111
  if (_optionalChain([part, 'optionalAccess', _197 => _197.split]) && part.table.rows === prev.table.rows + currCells.length - 1) {
2112
2112
  const last = prev.table.rows - 1;
2113
2113
  for (let c = 0; c < part.table.cols; c++) {
2114
- const U = _chunkH2VOH7X3cjs.CELL_LINES.get(prev.table.cells[last][c]), D = _chunkH2VOH7X3cjs.CELL_LINES.get(currCells[0][c]);
2115
- _chunkH2VOH7X3cjs.CELL_LINES.set(part.table.cells[last][c], U.concat(D.map((l) => ({ ...l, l: l.l + dx, r: l.r + dx }))));
2114
+ const U = _chunkCOG4POSKcjs.CELL_LINES.get(prev.table.cells[last][c]), D = _chunkCOG4POSKcjs.CELL_LINES.get(currCells[0][c]);
2115
+ _chunkCOG4POSKcjs.CELL_LINES.set(part.table.cells[last][c], U.concat(D.map((l) => ({ ...l, l: l.l + dx, r: l.r + dx }))));
2116
2116
  }
2117
- _chunkH2VOH7X3cjs.TABLE_COLXS.set(part.table, part.colXs);
2117
+ _chunkCOG4POSKcjs.TABLE_COLXS.set(part.table, part.colXs);
2118
2118
  placeJoined(blocks, i, j, part.table);
2119
2119
  continue;
2120
2120
  }
@@ -2127,20 +2127,20 @@ function mergeCrossPageTables(blocks, pageHeights, lex) {
2127
2127
  caption: prev.table.caption,
2128
2128
  ...prev.table.renderAsTable ? { renderAsTable: true } : {}
2129
2129
  };
2130
- if (_nullishCoalesce(px, () => ( cx))) _chunkH2VOH7X3cjs.TABLE_COLXS.set(merged, _nullishCoalesce(px, () => ( cx)));
2131
- if (_chunkH2VOH7X3cjs.CLIP_TABLES.has(prev.table) || _chunkH2VOH7X3cjs.CLIP_TABLES.has(curr.table)) _chunkH2VOH7X3cjs.CLIP_TABLES.add(merged);
2130
+ if (_nullishCoalesce(px, () => ( cx))) _chunkCOG4POSKcjs.TABLE_COLXS.set(merged, _nullishCoalesce(px, () => ( cx)));
2131
+ if (_chunkCOG4POSKcjs.CLIP_TABLES.has(prev.table) || _chunkCOG4POSKcjs.CLIP_TABLES.has(curr.table)) _chunkCOG4POSKcjs.CLIP_TABLES.add(merged);
2132
2132
  placeJoined(blocks, i, j, merged);
2133
2133
  }
2134
2134
  for (let i = blocks.length - 1; i >= 0; i--) {
2135
2135
  const t = blocks[i].table;
2136
- if (blocks[i].type === "table" && t && _chunkH2VOH7X3cjs.EMPTY_PARTS.has(t)) blocks.splice(i, 1);
2136
+ if (blocks[i].type === "table" && t && _chunkCOG4POSKcjs.EMPTY_PARTS.has(t)) blocks.splice(i, 1);
2137
2137
  }
2138
2138
  }
2139
2139
  function mergeColumnFlow(blocks, pageHeights, lex) {
2140
2140
  if (!pageHeights) return;
2141
2141
  for (let i = 0; i < blocks.length; i++) {
2142
2142
  const L = blocks[i];
2143
- if (L.type !== "table" || !L.table || !L.bbox || !L.pageNumber || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(L.table) || _chunkH2VOH7X3cjs.EMPTY_PARTS.has(L.table)) continue;
2143
+ if (L.type !== "table" || !L.table || !L.bbox || !L.pageNumber || !_chunkCOG4POSKcjs.CLIP_TABLES.has(L.table) || _chunkCOG4POSKcjs.EMPTY_PARTS.has(L.table)) continue;
2144
2144
  const ph = pageHeights.get(L.pageNumber);
2145
2145
  if (!ph || L.bbox.y > ph * PAGE_EDGE_BAND) continue;
2146
2146
  let s0 = i, s1 = i;
@@ -2159,8 +2159,8 @@ function mergeColumnFlow(blocks, pageHeights, lex) {
2159
2159
  if (Math.abs(R.bbox.width - L.bbox.width) > Math.max(R.bbox.width, L.bbox.width) * NEIGHBOR_TABLE_EPSILON) continue;
2160
2160
  if (!looksContinued(L, R) || restartsTable(blocks, i, R.table, pageHeights)) continue;
2161
2161
  const rt = R.table;
2162
- if (rt.rows === 1 && rt.cols === 1 && !_chunkH2VOH7X3cjs.CLIP_TABLES.has(rt) && L.table.rows >= 2) {
2163
- const px = _chunkH2VOH7X3cjs.TABLE_COLXS.get(L.table), lb = L.bbox;
2162
+ if (rt.rows === 1 && rt.cols === 1 && !_chunkCOG4POSKcjs.CLIP_TABLES.has(rt) && L.table.rows >= 2) {
2163
+ const px = _chunkCOG4POSKcjs.TABLE_COLXS.get(L.table), lb = L.bbox;
2164
2164
  const dx = lb.x + lb.width - (R.bbox.x + R.bbox.width);
2165
2165
  const last = L.table.cells[L.table.rows - 1];
2166
2166
  let col = 0;
@@ -2189,8 +2189,8 @@ function mergeColumnFlow(blocks, pageHeights, lex) {
2189
2189
  }
2190
2190
  function joinClipParts(prev, curr, pageHeights, lex) {
2191
2191
  const pt = prev.table, ct = curr.table;
2192
- if (!_chunkH2VOH7X3cjs.CLIP_TABLES.has(pt) || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(ct)) return null;
2193
- const px = _chunkH2VOH7X3cjs.TABLE_COLXS.get(pt), cx = _chunkH2VOH7X3cjs.TABLE_COLXS.get(ct);
2192
+ if (!_chunkCOG4POSKcjs.CLIP_TABLES.has(pt) || !_chunkCOG4POSKcjs.CLIP_TABLES.has(ct)) return null;
2193
+ const px = _chunkCOG4POSKcjs.TABLE_COLXS.get(pt), cx = _chunkCOG4POSKcjs.TABLE_COLXS.get(ct);
2194
2194
  if (!px || !cx) return null;
2195
2195
  let xs = cx, shifted = false, dx = 0, foreign = false, within = false;
2196
2196
  if (!shiftedSame(px, cx, false)) {
@@ -2206,15 +2206,15 @@ function joinClipParts(prev, curr, pageHeights, lex) {
2206
2206
  const inner = b.slice(1, -1).map((x) => x + dx);
2207
2207
  return inner.length > 0 && !inner.some((x) => px.some((p) => Math.abs(p - x) <= CONTINUATION_COL_TOL));
2208
2208
  };
2209
- foreign = unrelated(cx) && unrelated(_nullishCoalesce(_chunkH2VOH7X3cjs.PART_COLXS.get(ct), () => ( cx))) && (headingRow(_nullishCoalesce(ct.cells[0], () => ( []))) || px.length > FOREIGN_FIRST_ROW_CELLS && anchorsOf(ct).filter((a) => a.r === 0).length >= FOREIGN_FIRST_ROW_CELLS);
2209
+ foreign = unrelated(cx) && unrelated(_nullishCoalesce(_chunkCOG4POSKcjs.PART_COLXS.get(ct), () => ( cx))) && (headingRow(_nullishCoalesce(ct.cells[0], () => ( []))) || px.length > FOREIGN_FIRST_ROW_CELLS && anchorsOf(ct).filter((a) => a.r === 0).length >= FOREIGN_FIRST_ROW_CELLS);
2210
2210
  }
2211
2211
  const res = joinSplitParts(pt, px, ct, xs, dx, _optionalChain([prev, 'access', _202 => _202.bbox, 'optionalAccess', _203 => _203.y]), lex);
2212
2212
  if (!res || (shifted || foreign || within) && !res.split && !res.header) return null;
2213
- _chunkH2VOH7X3cjs.TABLE_COLXS.set(res.table, res.colXs);
2214
- const ys = _chunkH2VOH7X3cjs.TABLE_ROWYS.get(pt);
2215
- if (ys) _chunkH2VOH7X3cjs.TABLE_ROWYS.set(res.table, ys);
2216
- _chunkH2VOH7X3cjs.PART_COLXS.set(res.table, _nullishCoalesce(_chunkH2VOH7X3cjs.PART_COLXS.get(pt), () => ( px)));
2217
- _chunkH2VOH7X3cjs.CLIP_TABLES.add(res.table);
2213
+ _chunkCOG4POSKcjs.TABLE_COLXS.set(res.table, res.colXs);
2214
+ const ys = _chunkCOG4POSKcjs.TABLE_ROWYS.get(pt);
2215
+ if (ys) _chunkCOG4POSKcjs.TABLE_ROWYS.set(res.table, ys);
2216
+ _chunkCOG4POSKcjs.PART_COLXS.set(res.table, _nullishCoalesce(_chunkCOG4POSKcjs.PART_COLXS.get(pt), () => ( px)));
2217
+ _chunkCOG4POSKcjs.CLIP_TABLES.add(res.table);
2218
2218
  return res.table;
2219
2219
  }
2220
2220
  function prevLacksLeftCols(prev, px, xs, pageHeights) {
@@ -2238,12 +2238,12 @@ function looksContinued(prev, curr, pageHeights) {
2238
2238
  return filled.length >= 2 && filled.every((t) => t === filled[0]);
2239
2239
  }
2240
2240
  function pushedLead(prev, curr) {
2241
- if (!_chunkH2VOH7X3cjs.CLIP_TABLES.has(prev.table) || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(curr.table)) return false;
2241
+ if (!_chunkCOG4POSKcjs.CLIP_TABLES.has(prev.table) || !_chunkCOG4POSKcjs.CLIP_TABLES.has(curr.table)) return false;
2242
2242
  const lead = leadRows(curr.table);
2243
2243
  return lead.image && lead.height > prev.bbox.y;
2244
2244
  }
2245
2245
  function leadRows(t) {
2246
- const ys = _chunkH2VOH7X3cjs.TABLE_ROWYS.get(t);
2246
+ const ys = _chunkCOG4POSKcjs.TABLE_ROWYS.get(t);
2247
2247
  if (!ys || ys.length < 2) return { height: 0, image: false };
2248
2248
  const anchors = anchorsOf(t);
2249
2249
  let end = 1, image = false;
@@ -2251,17 +2251,17 @@ function leadRows(t) {
2251
2251
  for (const a of anchors) {
2252
2252
  if (a.r !== r) continue;
2253
2253
  end = Math.max(end, r + a.rs);
2254
- if (_chunkH2VOH7X3cjs.IMAGE_CELLS.has(a.cell)) image = true;
2254
+ if (_chunkCOG4POSKcjs.IMAGE_CELLS.has(a.cell)) image = true;
2255
2255
  }
2256
2256
  }
2257
2257
  return { height: ys[0] - ys[Math.min(end, ys.length - 1)], image };
2258
2258
  }
2259
2259
  function tailOf(b) {
2260
- const t = b.table && _chunkH2VOH7X3cjs.TABLE_TAIL.get(b.table);
2260
+ const t = b.table && _chunkCOG4POSKcjs.TABLE_TAIL.get(b.table);
2261
2261
  return t && b.bbox ? { ...b, pageNumber: t.page, bbox: { ...b.bbox, page: t.page, y: t.y, height: t.height } } : b;
2262
2262
  }
2263
2263
  function firstRowSig(t) {
2264
- const x = _chunkH2VOH7X3cjs.TABLE_COLXS.get(t);
2264
+ const x = _chunkCOG4POSKcjs.TABLE_COLXS.get(t);
2265
2265
  if (!x || x.length !== t.cols + 1) return null;
2266
2266
  return anchorsOf(t).filter((a) => a.r === 0).map((a) => ({ x1: x[a.c], x2: x[a.c + a.cs], t: flowText(a.cell.text).replace(/\s+/g, "") }));
2267
2267
  }
@@ -2314,7 +2314,7 @@ function chainHead(blocks, i, pageHeights) {
2314
2314
  if (pb.pageNumber !== (_nullishCoalesce(cur.pageNumber, () => ( 0))) - 1) break;
2315
2315
  if (!blocks.slice(p + 1, k).every((b) => besideOwn(b, pb, cur) || insideTable(b, pb) || pageNumberBetween(b, pb, cur, pageHeights))) break;
2316
2316
  if (!looksContinued(pb, cur, pageHeights)) break;
2317
- const px = _chunkH2VOH7X3cjs.TABLE_COLXS.get(pb.table), cx = _chunkH2VOH7X3cjs.TABLE_COLXS.get(cur.table);
2317
+ const px = _chunkCOG4POSKcjs.TABLE_COLXS.get(pb.table), cx = _chunkCOG4POSKcjs.TABLE_COLXS.get(cur.table);
2318
2318
  if (!px || !cx) break;
2319
2319
  const dx = px[px.length - 1] - cx[cx.length - 1];
2320
2320
  if (!shiftedSame(px, cx) && !px.some((x) => Math.abs(x - (cx[0] + dx)) <= CONTINUATION_COL_TOL) && !prevLacksLeftCols(pb, px, cx, pageHeights)) break;
@@ -2385,7 +2385,7 @@ var RESTART_LOOKBACK_PAGES = 5;
2385
2385
  var COL_MATCH_TOL = 0.5;
2386
2386
  var CONTINUED_TABLE_PAGE_BAND = 0.16;
2387
2387
  function lastRowCell(t, x1, x2) {
2388
- const xs = _chunkH2VOH7X3cjs.TABLE_COLXS.get(t);
2388
+ const xs = _chunkCOG4POSKcjs.TABLE_COLXS.get(t);
2389
2389
  const covered = /* @__PURE__ */ new Set();
2390
2390
  for (let r = 0; r < t.rows; r++) {
2391
2391
  for (let c = 0; c < t.cols; c++) {
@@ -2403,7 +2403,7 @@ var cellBlocks = (cell, pageNumber) => _nullishCoalesce(cell.blocks, () => ( cel
2403
2403
  function mergeContinuedCells(blocks, pageHeights) {
2404
2404
  for (let j = blocks.length - 1; j > 0; j--) {
2405
2405
  const part = blocks[j];
2406
- const from = part.table ? _chunkH2VOH7X3cjs.CONT_PARTS.get(part.table) : void 0;
2406
+ const from = part.table ? _chunkCOG4POSKcjs.CONT_PARTS.get(part.table) : void 0;
2407
2407
  if (!from || !part.table) {
2408
2408
  unwrapContinuedTable(blocks, j, pageHeights, true);
2409
2409
  continue;
@@ -2419,12 +2419,12 @@ function mergeContinuedCells(blocks, pageHeights) {
2419
2419
  if (cell.blocks || add.blocks) cell.blocks = [...cellBlocks(cell, prev.pageNumber), ...cellBlocks(add, part.pageNumber)];
2420
2420
  else if (part.pageNumber) markContinuedText(cell, add, part.pageNumber);
2421
2421
  cell.text = [cell.text, add.text].filter((s) => s.trim()).join("\n");
2422
- if (_chunkH2VOH7X3cjs.IMAGE_CELLS.has(add)) _chunkH2VOH7X3cjs.IMAGE_CELLS.add(cell);
2423
- _chunkH2VOH7X3cjs.joinCellEdges.call(void 0, cell, add);
2424
- const lines = _chunkH2VOH7X3cjs.CELL_LINES.get(add);
2425
- if (_optionalChain([lines, 'optionalAccess', _227 => _227.length])) _chunkH2VOH7X3cjs.CELL_LINES.set(cell, [..._nullishCoalesce(_chunkH2VOH7X3cjs.CELL_LINES.get(cell), () => ( [])), ...lines]);
2426
- if (part.pageNumber && part.bbox) _chunkH2VOH7X3cjs.TABLE_TAIL.set(prev.table, _nullishCoalesce(_chunkH2VOH7X3cjs.TABLE_TAIL.get(part.table), () => ( { page: part.pageNumber, y: part.bbox.y, height: part.bbox.height })));
2427
- if (cell.text.trim() || _optionalChain([cell, 'access', _228 => _228.blocks, 'optionalAccess', _229 => _229.length]) || _chunkH2VOH7X3cjs.IMAGE_CELLS.has(cell)) _chunkH2VOH7X3cjs.EMPTY_PARTS.delete(prev.table);
2422
+ if (_chunkCOG4POSKcjs.IMAGE_CELLS.has(add)) _chunkCOG4POSKcjs.IMAGE_CELLS.add(cell);
2423
+ _chunkCOG4POSKcjs.joinCellEdges.call(void 0, cell, add);
2424
+ const lines = _chunkCOG4POSKcjs.CELL_LINES.get(add);
2425
+ if (_optionalChain([lines, 'optionalAccess', _227 => _227.length])) _chunkCOG4POSKcjs.CELL_LINES.set(cell, [..._nullishCoalesce(_chunkCOG4POSKcjs.CELL_LINES.get(cell), () => ( [])), ...lines]);
2426
+ if (part.pageNumber && part.bbox) _chunkCOG4POSKcjs.TABLE_TAIL.set(prev.table, _nullishCoalesce(_chunkCOG4POSKcjs.TABLE_TAIL.get(part.table), () => ( { page: part.pageNumber, y: part.bbox.y, height: part.bbox.height })));
2427
+ if (cell.text.trim() || _optionalChain([cell, 'access', _228 => _228.blocks, 'optionalAccess', _229 => _229.length]) || _chunkCOG4POSKcjs.IMAGE_CELLS.has(cell)) _chunkCOG4POSKcjs.EMPTY_PARTS.delete(prev.table);
2428
2428
  blocks.splice(j, 1);
2429
2429
  if (cell.blocks && at > 0) {
2430
2430
  const nextAt = cell.blocks[at];
@@ -2436,11 +2436,11 @@ function mergeContinuedCells(blocks, pageHeights) {
2436
2436
  }
2437
2437
  function unwrapContinuedTable(blocks, at, pageHeights, splitOnly = false) {
2438
2438
  const prev = blocks[at - 1], frame = blocks[at];
2439
- if (!_optionalChain([prev, 'optionalAccess', _230 => _230.table]) || !_optionalChain([frame, 'optionalAccess', _231 => _231.table]) || frame.table.rows !== 1 || frame.table.cols !== 1 || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(frame.table)) return;
2439
+ if (!_optionalChain([prev, 'optionalAccess', _230 => _230.table]) || !_optionalChain([frame, 'optionalAccess', _231 => _231.table]) || frame.table.rows !== 1 || frame.table.cols !== 1 || !_chunkCOG4POSKcjs.CLIP_TABLES.has(frame.table)) return;
2440
2440
  const inner = _optionalChain([frame, 'access', _232 => _232.table, 'access', _233 => _233.cells, 'access', _234 => _234[0], 'optionalAccess', _235 => _235[0], 'optionalAccess', _236 => _236.blocks]);
2441
2441
  const next = _optionalChain([inner, 'optionalAccess', _237 => _237[0]]);
2442
- if (!inner || !_optionalChain([next, 'optionalAccess', _238 => _238.table]) || !prev.bbox || !next.bbox || !prev.pageNumber || next.pageNumber !== prev.pageNumber + 1 || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(prev.table) || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(next.table) || prev.table.cols !== next.table.cols) return;
2443
- const px = _chunkH2VOH7X3cjs.TABLE_COLXS.get(prev.table), nx = _chunkH2VOH7X3cjs.TABLE_COLXS.get(next.table);
2442
+ if (!inner || !_optionalChain([next, 'optionalAccess', _238 => _238.table]) || !prev.bbox || !next.bbox || !prev.pageNumber || next.pageNumber !== prev.pageNumber + 1 || !_chunkCOG4POSKcjs.CLIP_TABLES.has(prev.table) || !_chunkCOG4POSKcjs.CLIP_TABLES.has(next.table) || prev.table.cols !== next.table.cols) return;
2443
+ const px = _chunkCOG4POSKcjs.TABLE_COLXS.get(prev.table), nx = _chunkCOG4POSKcjs.TABLE_COLXS.get(next.table);
2444
2444
  if (!px || !nx || px.length !== nx.length || px.some((x, i) => Math.abs(x - nx[i]) > COL_MATCH_TOL)) return;
2445
2445
  const ph = _optionalChain([pageHeights, 'optionalAccess', _239 => _239.get, 'call', _240 => _240(prev.pageNumber)]), nh = _optionalChain([pageHeights, 'optionalAccess', _241 => _241.get, 'call', _242 => _242(next.pageNumber)]);
2446
2446
  if (!ph || !nh || prev.bbox.y > ph * CONTINUED_TABLE_PAGE_BAND || next.bbox.y + next.bbox.height < nh * (1 - CONTINUED_TABLE_PAGE_BAND)) return;
@@ -2450,15 +2450,15 @@ function unwrapContinuedTable(blocks, at, pageHeights, splitOnly = false) {
2450
2450
  function fillNestedContinuation(blocks, at) {
2451
2451
  const prev = blocks[at - 1], next = blocks[at];
2452
2452
  const t = _optionalChain([prev, 'optionalAccess', _245 => _245.table]), u = _optionalChain([next, 'optionalAccess', _246 => _246.table]);
2453
- if (!t || !u || u.rows !== 1 || u.cols !== 1 || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(t) || !_chunkH2VOH7X3cjs.CLIP_TABLES.has(u) || next.pageNumber !== (_nullishCoalesce(prev.pageNumber, () => ( 0))) + 1) return;
2454
- const xs = _chunkH2VOH7X3cjs.TABLE_COLXS.get(u);
2453
+ if (!t || !u || u.rows !== 1 || u.cols !== 1 || !_chunkCOG4POSKcjs.CLIP_TABLES.has(t) || !_chunkCOG4POSKcjs.CLIP_TABLES.has(u) || next.pageNumber !== (_nullishCoalesce(prev.pageNumber, () => ( 0))) + 1) return;
2454
+ const xs = _chunkCOG4POSKcjs.TABLE_COLXS.get(u);
2455
2455
  const cell = xs ? lastRowCell(t, xs[0], xs[xs.length - 1]) : void 0;
2456
2456
  const add = _optionalChain([u, 'access', _247 => _247.cells, 'access', _248 => _248[0], 'optionalAccess', _249 => _249[0]]);
2457
- if (!cell || !add || cell.text.trim() || _optionalChain([cell, 'access', _250 => _250.blocks, 'optionalAccess', _251 => _251.length]) || _chunkH2VOH7X3cjs.IMAGE_CELLS.has(cell)) return;
2457
+ if (!cell || !add || cell.text.trim() || _optionalChain([cell, 'access', _250 => _250.blocks, 'optionalAccess', _251 => _251.length]) || _chunkCOG4POSKcjs.IMAGE_CELLS.has(cell)) return;
2458
2458
  cell.text = add.text;
2459
2459
  if (add.blocks) cell.blocks = add.blocks;
2460
- if (_chunkH2VOH7X3cjs.IMAGE_CELLS.has(add)) _chunkH2VOH7X3cjs.IMAGE_CELLS.add(cell);
2461
- _chunkH2VOH7X3cjs.joinCellEdges.call(void 0, cell, add);
2460
+ if (_chunkCOG4POSKcjs.IMAGE_CELLS.has(add)) _chunkCOG4POSKcjs.IMAGE_CELLS.add(cell);
2461
+ _chunkCOG4POSKcjs.joinCellEdges.call(void 0, cell, add);
2462
2462
  blocks.splice(at, 1);
2463
2463
  }
2464
2464
 
@@ -3058,12 +3058,12 @@ function restoreUnmappedGlyphs(items, fnArray, argsArray, fontObj) {
3058
3058
  }
3059
3059
  }
3060
3060
  for (const q of queues.values()) for (let k = 0; k < q.length; k++) {
3061
- const pair = k + 1 < q.length ? _chunkOW2XKTQAcjs.pairedNumber.call(void 0, q[k], q[k + 1]) : void 0;
3061
+ const pair = k + 1 < q.length ? _chunkL4GCUYDScjs.pairedNumber.call(void 0, q[k], q[k + 1]) : void 0;
3062
3062
  if (pair !== void 0) {
3063
3063
  q[k] = pair;
3064
3064
  q[k + 1] = "";
3065
3065
  k++;
3066
- } else q[k] = _chunkOW2XKTQAcjs.mapPuaText.call(void 0, q[k]);
3066
+ } else q[k] = _chunkL4GCUYDScjs.mapPuaText.call(void 0, q[k]);
3067
3067
  }
3068
3068
  const byFont = /* @__PURE__ */ new Map();
3069
3069
  for (const it of items) {
@@ -3153,15 +3153,15 @@ function selectionContextPages(selected, pageCount) {
3153
3153
  function marginContextBlocks(raw, page, view) {
3154
3154
  const [x1, y1, x2, y2] = view;
3155
3155
  const width = x2 - x1, height = y2 - y1;
3156
- const items = _chunkH2VOH7X3cjs.filterHiddenText.call(void 0, _chunkH2VOH7X3cjs.normalizeItems.call(void 0, raw), width, height, x1, y1).visible;
3156
+ const items = _chunkCOG4POSKcjs.filterHiddenText.call(void 0, _chunkCOG4POSKcjs.normalizeItems.call(void 0, raw), width, height, x1, y1).visible;
3157
3157
  for (const item of items) {
3158
3158
  item.x -= x1;
3159
3159
  item.y -= y1;
3160
3160
  }
3161
- return _chunkH2VOH7X3cjs.groupByY.call(void 0, items).flatMap((line) => {
3162
- const bbox = _chunkH2VOH7X3cjs.computeBBox.call(void 0, line, page);
3161
+ return _chunkCOG4POSKcjs.groupByY.call(void 0, items).flatMap((line) => {
3162
+ const bbox = _chunkCOG4POSKcjs.computeBBox.call(void 0, line, page);
3163
3163
  if (bbox.y + bbox.height < height * 0.88 && bbox.y > height * 0.12) return [];
3164
- return [{ type: "paragraph", text: _chunkH2VOH7X3cjs.mergeLineSimple.call(void 0, line), pageNumber: page, bbox, style: _chunkH2VOH7X3cjs.dominantStyle.call(void 0, line) }];
3164
+ return [{ type: "paragraph", text: _chunkCOG4POSKcjs.mergeLineSimple.call(void 0, line), pageNumber: page, bbox, style: _chunkCOG4POSKcjs.dominantStyle.call(void 0, line) }];
3165
3165
  });
3166
3166
  }
3167
3167
 
@@ -3197,7 +3197,7 @@ var WINANSI_REVERSE = {
3197
3197
  };
3198
3198
  function symbolFontTable(fontName) {
3199
3199
  if (!fontName) return void 0;
3200
- if (/wingdings(?![\s-]*[23])/i.test(fontName)) return _chunkOW2XKTQAcjs.WINGDINGS;
3200
+ if (/wingdings(?![\s-]*[23])/i.test(fontName)) return _chunkL4GCUYDScjs.WINGDINGS;
3201
3201
  return void 0;
3202
3202
  }
3203
3203
  function remapSymbolText(text, table) {
@@ -3430,7 +3430,7 @@ function wrapEquationRuns(items, faceName) {
3430
3430
  for (const i of members) drop.add(i);
3431
3431
  const toks = cur.map((it) => {
3432
3432
  const bar2 = isBarItem(it);
3433
- const text = bar2 ? "" : plain2.has(items.indexOf(it)) ? _chunkOW2XKTQAcjs.toTex.call(void 0, it.text) : FUNC_RE.test(it.text.trim()) ? it.text.trim() : [...it.text].map(decodeEq).join("");
3433
+ const text = bar2 ? "" : plain2.has(items.indexOf(it)) ? _chunkL4GCUYDScjs.toTex.call(void 0, it.text) : FUNC_RE.test(it.text.trim()) ? it.text.trim() : [...it.text].map(decodeEq).join("");
3434
3434
  return { text, x: it.x, y: it.y, w: it.w, size: sizeOf(it), bar: bar2 };
3435
3435
  });
3436
3436
  const tex = layout(toks).replace(/\}\\text\{/g, "");
@@ -4270,7 +4270,7 @@ function mergeEnclosedDigits(items) {
4270
4270
  if (!/^\d\d?$/.test(digits)) continue;
4271
4271
  const mid = (inside2[0].x + inside2[inside2.length - 1].x + inside2[inside2.length - 1].w) / 2;
4272
4272
  if (Math.abs(mid - (s.x + s.w / 2)) > s.fontSize * 0.15) continue;
4273
- s.text = _chunkOW2XKTQAcjs.enclosedNumber.call(void 0, Number(digits));
4273
+ s.text = _chunkL4GCUYDScjs.enclosedNumber.call(void 0, Number(digits));
4274
4274
  for (const d of inside2) drop.add(d);
4275
4275
  }
4276
4276
  if (!drop.size) return;
@@ -4467,7 +4467,7 @@ function demoteNonHeadingRoles(blocks, pageHeights, faceNames) {
4467
4467
  if (block.type !== "heading" || !block.text) continue;
4468
4468
  const text = block.text.replace(/<[^>]+>/g, "").trim();
4469
4469
  const fsz = _nullishCoalesce(_optionalChain([block, 'access', _333 => _333.style, 'optionalAccess', _334 => _334.fontSize]), () => ( 0));
4470
- const tocEntry = i > 0 && _chunkH2VOH7X3cjs.TOC_BLOCKS.has(blocks[i - 1]) && _chunkH2VOH7X3cjs.TOC_BLOCKS.has(blocks[i + 1]);
4470
+ const tocEntry = i > 0 && _chunkCOG4POSKcjs.TOC_BLOCKS.has(blocks[i - 1]) && _chunkCOG4POSKcjs.TOC_BLOCKS.has(blocks[i + 1]);
4471
4471
  const page = _nullishCoalesce(byPage.get(_nullishCoalesce(block.pageNumber, () => ( 0))), () => ( []));
4472
4472
  const proseStyle = _optionalChain([block, 'access', _335 => _335.style, 'optionalAccess', _336 => _336.fontName]) && bodyStyle.get(_nullishCoalesce(block.pageNumber, () => ( 0))) === `${block.style.fontName}:${block.style.fontSize}` && text.length > 60;
4473
4473
  const next = blocks[i + 1];
@@ -4565,7 +4565,7 @@ function splitSingleCellTables(blocks) {
4565
4565
  const out = [];
4566
4566
  for (const b of blocks) {
4567
4567
  const t = b.type === "table" ? b.table : void 0;
4568
- const title = t && _chunkH2VOH7X3cjs.FRAME_TITLE_BLOCKS.get(t);
4568
+ const title = t && _chunkCOG4POSKcjs.FRAME_TITLE_BLOCKS.get(t);
4569
4569
  if (title) {
4570
4570
  out.push({ ...title, text: `${t.cells[0][0].text.trim()} ${t.cells[0][2].text.trim()}` });
4571
4571
  continue;
@@ -4601,7 +4601,7 @@ function joinLatinCellWraps(blocks) {
4601
4601
  const lines = cell.text.split("\n");
4602
4602
  const out = [lines[0]];
4603
4603
  for (const line of lines.slice(1)) {
4604
- if (_chunkH2VOH7X3cjs.latinSoftWrap.call(void 0, out[out.length - 1], line)) out[out.length - 1] = out[out.length - 1].trimEnd() + " " + line.trim();
4604
+ if (_chunkCOG4POSKcjs.latinSoftWrap.call(void 0, out[out.length - 1], line)) out[out.length - 1] = out[out.length - 1].trimEnd() + " " + line.trim();
4605
4605
  else out.push(line);
4606
4606
  }
4607
4607
  cell.text = out.join("\n");
@@ -4621,10 +4621,10 @@ function cleanPdfText(text, opts) {
4621
4621
  ).replace(/^(?!\| ---).*$/gm, (line) => {
4622
4622
  if (/^\s*\${1,2}.+\${1,2}\s*$/.test(line)) return line;
4623
4623
  if (line.startsWith("|")) {
4624
- return line.replace(/(?:\\.|[^|\\])+/g, (cell) => cell.split("<br>").map((seg) => seg.replace(/\S(?:.*\S)?/, (t) => _chunkH2VOH7X3cjs.collapseEvenSpacing.call(void 0, t, false))).join("<br>"));
4624
+ return line.replace(/(?:\\.|[^|\\])+/g, (cell) => cell.split("<br>").map((seg) => seg.replace(/\S(?:.*\S)?/, (t) => _chunkCOG4POSKcjs.collapseEvenSpacing.call(void 0, t, false))).join("<br>"));
4625
4625
  }
4626
4626
  const mark = _nullishCoalesce(_optionalChain([/^(?:#{1,6}|-) /, 'access', _416 => _416.exec, 'call', _417 => _417(line), 'optionalAccess', _418 => _418[0]]), () => ( ""));
4627
- return mark + _chunkH2VOH7X3cjs.collapseEvenSpacing.call(void 0, line.slice(mark.length), false);
4627
+ return mark + _chunkCOG4POSKcjs.collapseEvenSpacing.call(void 0, line.slice(mark.length), false);
4628
4628
  }).replace(/\\~\\~/g, "~~").replace(/~~~~/g, "").replace(/<u>\s*<\/u>/g, "").replace(/<(sup|sub)>\s*<\/\1>/g, "").replace(/\n{3,}/g, "\n\n").trim();
4629
4629
  }
4630
4630
  function startsWithMarker(line) {
@@ -4656,7 +4656,7 @@ function mergeKoreanLines(text) {
4656
4656
  continue;
4657
4657
  }
4658
4658
  if (/[가-힣·,\-]$/.test(prev) && /^[가-힣(]/.test(curr) && !startsWithMarker(curr) && !isStandaloneHeader(prev) && !startsWithMarker(prev)) {
4659
- result[result.length - 1] = prev + _chunkH2VOH7X3cjs.wrapJoiner.call(void 0, prev, curr) + curr;
4659
+ result[result.length - 1] = prev + _chunkCOG4POSKcjs.wrapJoiner.call(void 0, prev, curr) + curr;
4660
4660
  } else {
4661
4661
  result.push(curr);
4662
4662
  }
@@ -4672,7 +4672,7 @@ function applyLinkAnnotations(items, annots) {
4672
4672
  const wrapped = /* @__PURE__ */ new Set();
4673
4673
  for (const a of annots) {
4674
4674
  if (a.subtype !== "Link" || !a.url || !a.rect || a.rect.length < 4) continue;
4675
- const url = _chunkLFTO5QAPcjs.sanitizeHref.call(void 0, a.url);
4675
+ const url = _chunkZTVH2HQ5cjs.sanitizeHref.call(void 0, a.url);
4676
4676
  if (!url) continue;
4677
4677
  const x1 = Math.min(a.rect[0], a.rect[2]), x2 = Math.max(a.rect[0], a.rect[2]);
4678
4678
  const y1 = Math.min(a.rect[1], a.rect[3]), y2 = Math.max(a.rect[1], a.rect[3]);
@@ -4724,7 +4724,7 @@ function mergeLinkRuns(markdown) {
4724
4724
 
4725
4725
  // src/pdf/formula-ocr.ts
4726
4726
  async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
4727
- const formulaMod = await Promise.resolve().then(() => _interopRequireWildcard(require("./formula-RTPZD2IM.cjs")));
4727
+ const formulaMod = await Promise.resolve().then(() => _interopRequireWildcard(require("./formula-BLK43PWB.cjs")));
4728
4728
  const { FormulaPipeline, ensureFormulaModels } = formulaMod;
4729
4729
  await ensureFormulaModels((p) => {
4730
4730
  if (p.phase === "download" && p.total) {
@@ -4915,13 +4915,13 @@ async function loadPdfWithTimeout(buffer, data) {
4915
4915
  try {
4916
4916
  return await Promise.race([
4917
4917
  loadingTask.promise.catch((e) => {
4918
- if (e instanceof Error && e.name === "PasswordException") throw new (0, _chunkLFTO5QAPcjs.KordocError)("\uC554\uD638\uB85C \uBCF4\uD638\uB41C PDF \uD30C\uC77C\uC785\uB2C8\uB2E4 (PDF \uC5F4\uAE30 \uC554\uD638\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)");
4918
+ if (e instanceof Error && e.name === "PasswordException") throw new (0, _chunkZTVH2HQ5cjs.KordocError)("\uC554\uD638\uB85C \uBCF4\uD638\uB41C PDF \uD30C\uC77C\uC785\uB2C8\uB2E4 (PDF \uC5F4\uAE30 \uC554\uD638\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)");
4919
4919
  throw e;
4920
4920
  }),
4921
4921
  new Promise((_, reject) => {
4922
4922
  timer = setTimeout(() => {
4923
4923
  loadingTask.destroy();
4924
- reject(new (0, _chunkLFTO5QAPcjs.KordocError)("PDF \uB85C\uB529 \uD0C0\uC784\uC544\uC6C3 (30\uCD08 \uCD08\uACFC)"));
4924
+ reject(new (0, _chunkZTVH2HQ5cjs.KordocError)("PDF \uB85C\uB529 \uD0C0\uC784\uC544\uC6C3 (30\uCD08 \uCD08\uACFC)"));
4925
4925
  }, PDF_LOAD_TIMEOUT_MS);
4926
4926
  })
4927
4927
  ]);
@@ -4932,8 +4932,8 @@ async function loadPdfWithTimeout(buffer, data) {
4932
4932
  async function parsePdfDocument(buffer, options) {
4933
4933
  const formulaBuffer = _optionalChain([options, 'optionalAccess', _419 => _419.formulaOcr]) ? buffer : null;
4934
4934
  const ocrOptionError = _chunkMMK32GPDcjs.validateOcrOptions.call(void 0, options);
4935
- if (ocrOptionError) throw new (0, _chunkLFTO5QAPcjs.KordocError)(ocrOptionError);
4936
- const autoOcr = _optionalChain([options, 'optionalAccess', _420 => _420.ocr]) === void 0 && await _chunkH2VOH7X3cjs.ocrModelsCached.call(void 0, _chunkH2VOH7X3cjs.resolveOcrModels.call(void 0, options)) && (_optionalChain([options, 'optionalAccess', _421 => _421.ocrRec]) !== "auto" || await _chunkH2VOH7X3cjs.ocrModelsCached.call(void 0, _chunkH2VOH7X3cjs.handwritingFallbackModels.call(void 0, _chunkH2VOH7X3cjs.resolveOcrModels.call(void 0, options))));
4935
+ if (ocrOptionError) throw new (0, _chunkZTVH2HQ5cjs.KordocError)(ocrOptionError);
4936
+ const autoOcr = _optionalChain([options, 'optionalAccess', _420 => _420.ocr]) === void 0 && await _chunkCOG4POSKcjs.ocrModelsCached.call(void 0, _chunkCOG4POSKcjs.resolveOcrModels.call(void 0, options)) && (_optionalChain([options, 'optionalAccess', _421 => _421.ocrRec]) !== "auto" || await _chunkCOG4POSKcjs.ocrModelsCached.call(void 0, _chunkCOG4POSKcjs.handwritingFallbackModels.call(void 0, _chunkCOG4POSKcjs.resolveOcrModels.call(void 0, options))));
4937
4937
  const ocrBuffer = _optionalChain([options, 'optionalAccess', _422 => _422.ocr]) || autoOcr ? buffer : null;
4938
4938
  const pdfjsData = new Uint8Array(buffer.slice(0));
4939
4939
  const blanked = blankLargeImageStreams(pdfjsData);
@@ -4945,7 +4945,7 @@ async function parsePdfDocument(buffer, options) {
4945
4945
  let pristine;
4946
4946
  try {
4947
4947
  const pageCount = doc.numPages;
4948
- if (pageCount === 0) throw new (0, _chunkLFTO5QAPcjs.KordocError)("PDF\uC5D0 \uD398\uC774\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.");
4948
+ if (pageCount === 0) throw new (0, _chunkZTVH2HQ5cjs.KordocError)("PDF\uC5D0 \uD398\uC774\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.");
4949
4949
  const metadata = { pageCount, pageMode: "layout" };
4950
4950
  await extractPdfMetadata(doc, metadata);
4951
4951
  const blocks = [];
@@ -4968,11 +4968,11 @@ async function parsePdfDocument(buffer, options) {
4968
4968
  const uncoveredImageRegions = /* @__PURE__ */ new Map();
4969
4969
  const largeImageRegions = /* @__PURE__ */ new Set();
4970
4970
  const wantWebp = _optionalChain([options, 'optionalAccess', _427 => _427.imageFormat]) === "webp" && options.images !== false;
4971
- const encodeWebp = wantWebp ? await _chunkBNP3WXTBcjs.loadWebpEncoder.call(void 0, ) : null;
4972
- if (wantWebp && !encodeWebp) warnings.push(_chunkBNP3WXTBcjs.WEBP_UNAVAILABLE);
4971
+ const encodeWebp = wantWebp ? await _chunkJE4NCQINcjs.loadWebpEncoder.call(void 0, ) : null;
4972
+ if (wantWebp && !encodeWebp) warnings.push(_chunkJE4NCQINcjs.WEBP_UNAVAILABLE);
4973
4973
  const imageState = createPdfImageState(pdfium ? { decoder: pdfium, sizes: blanked.sizes, pristine: () => pristine ??= loadPdfWithTimeout(buffer) } : void 0, _nullishCoalesce(encodeWebp, () => ( void 0)), _optionalChain([options, 'optionalAccess', _428 => _428.imagePlacement]) === "flow", !!_optionalChain([options, 'optionalAccess', _429 => _429.dropBlankImages]) && _optionalChain([options, 'optionalAccess', _430 => _430.images]) !== false);
4974
- const readQr = _optionalChain([options, 'optionalAccess', _431 => _431.qrCodes]) ? await _chunkBNP3WXTBcjs.loadQrReader.call(void 0, ) : null;
4975
- if (_optionalChain([options, 'optionalAccess', _432 => _432.qrCodes]) && !readQr) warnings.push(_chunkBNP3WXTBcjs.QR_UNAVAILABLE);
4974
+ const readQr = _optionalChain([options, 'optionalAccess', _431 => _431.qrCodes]) ? await _chunkJE4NCQINcjs.loadQrReader.call(void 0, ) : null;
4975
+ if (_optionalChain([options, 'optionalAccess', _432 => _432.qrCodes]) && !readQr) warnings.push(_chunkJE4NCQINcjs.QR_UNAVAILABLE);
4976
4976
  const imageBulletShapes = /* @__PURE__ */ new Map();
4977
4977
  const imageArrowDirections = /* @__PURE__ */ new Map();
4978
4978
  const extractedImages = [];
@@ -4980,7 +4980,7 @@ async function parsePdfDocument(buffer, options) {
4980
4980
  const carry = {};
4981
4981
  const preciseGaps = await isHancomPdf(doc);
4982
4982
  const vectorPageOps = /* @__PURE__ */ new Map();
4983
- const wrapLexicon = new (0, _chunkH2VOH7X3cjs.WrapLexicon)();
4983
+ const wrapLexicon = new (0, _chunkCOG4POSKcjs.WrapLexicon)();
4984
4984
  const noteMarks = /* @__PURE__ */ new Map();
4985
4985
  const headerContext = [];
4986
4986
  if (pageFilter && _optionalChain([options, 'optionalAccess', _433 => _433.removeHeaderFooter]) !== false && pageFilter.size < effectivePageCount) {
@@ -5031,12 +5031,12 @@ async function parsePdfDocument(buffer, options) {
5031
5031
  markSyntheticSpaces(rawItems, rawOps.fnArray, rawOps.argsArray);
5032
5032
  restoreSoftHyphens();
5033
5033
  rawItems.push(...spaceMappedDots(rawOps.fnArray, rawOps.argsArray, (n) => fontObj(n)));
5034
- const items = _chunkH2VOH7X3cjs.normalizeItems.call(void 0, occluded.size ? rawItems.filter((it) => !occluded.has(it)) : rawItems);
5034
+ const items = _chunkCOG4POSKcjs.normalizeItems.call(void 0, occluded.size ? rawItems.filter((it) => !occluded.has(it)) : rawItems);
5035
5035
  if (!preciseGaps) for (const it of items) {
5036
5036
  delete it.fx;
5037
5037
  delete it.fw;
5038
5038
  }
5039
- const filtered = _chunkH2VOH7X3cjs.filterHiddenText.call(void 0, items, pageW, pageH, viewX1, viewY1);
5039
+ const filtered = _chunkCOG4POSKcjs.filterHiddenText.call(void 0, items, pageW, pageH, viewX1, viewY1);
5040
5040
  const joined = joinVerticalColumns(filtered.visible);
5041
5041
  const visible = dropTabLeaderDots(joined);
5042
5042
  const hiddenCount = filtered.hiddenCount + occluded.size;
@@ -5063,7 +5063,7 @@ async function parsePdfDocument(buffer, options) {
5063
5063
  } : rawOps;
5064
5064
  remapSymbolFontItems(visible, (loadedName) => _optionalChain([fontObj, 'call', _440 => _440(loadedName), 'optionalAccess', _441 => _441.name]));
5065
5065
  remapControlGlyphs(visible, differencesOf);
5066
- await _chunkH2VOH7X3cjs.restoreImageBullets.call(void 0, visible, page, opList.fnArray, opList.argsArray, imageBulletShapes);
5066
+ await _chunkCOG4POSKcjs.restoreImageBullets.call(void 0, visible, page, opList.fnArray, opList.argsArray, imageBulletShapes);
5067
5067
  const faces = /* @__PURE__ */ new Map();
5068
5068
  for (const it of visible) {
5069
5069
  if (!it.fontName) continue;
@@ -5076,12 +5076,12 @@ async function parsePdfDocument(buffer, options) {
5076
5076
  it.fontName = face;
5077
5077
  if (!faceNames.has(face)) faceNames.set(face, (_nullishCoalesce(_optionalChain([fontObj, 'call', _443 => _443(face), 'optionalAccess', _444 => _444.name]), () => ( ""))).replace(/^[A-Z]{6}\+/, ""));
5078
5078
  }
5079
- for (const it of visible) if (it.text.includes("$")) it.text = _chunkOW2XKTQAcjs.escapeLiteralDollar.call(void 0, it.text);
5080
- for (const it of visible) if (it.text.includes("<")) it.text = _chunkOW2XKTQAcjs.escapeLiteralTags.call(void 0, it.text);
5079
+ for (const it of visible) if (it.text.includes("$")) it.text = _chunkL4GCUYDScjs.escapeLiteralDollar.call(void 0, it.text);
5080
+ for (const it of visible) if (it.text.includes("<")) it.text = _chunkL4GCUYDScjs.escapeLiteralTags.call(void 0, it.text);
5081
5081
  wrapEquationRuns(visible, (face) => faceNames.get(face));
5082
5082
  const pageArea = pageW * pageH;
5083
5083
  if (pageArea > 0) {
5084
- const imageRegions = _chunkH2VOH7X3cjs.extractImageRegions.call(void 0, opList.fnArray, opList.argsArray);
5084
+ const imageRegions = _chunkCOG4POSKcjs.extractImageRegions.call(void 0, opList.fnArray, opList.argsArray);
5085
5085
  let uncovered = 0;
5086
5086
  for (const r of imageRegions) {
5087
5087
  const area = (r.x2 - r.x1) * (r.y2 - r.y1);
@@ -5108,11 +5108,11 @@ async function parsePdfDocument(buffer, options) {
5108
5108
  if (uncovered > 0) skippedImagePages.set(i, uncovered);
5109
5109
  }
5110
5110
  const marks = superscriptNoteMarks(visible);
5111
- if (marks.length) noteMarks.set(i, { marks, seps: footnoteSeparators(_chunkH2VOH7X3cjs.extractLines.call(void 0, opList.fnArray, opList.argsArray).horizontals, pageW, pageH) });
5111
+ if (marks.length) noteMarks.set(i, { marks, seps: footnoteSeparators(_chunkCOG4POSKcjs.extractLines.call(void 0, opList.fnArray, opList.argsArray).horizontals, pageW, pageH) });
5112
5112
  const stamp = marginStamp(visible);
5113
5113
  const flow = stamp.length ? visible.filter((it) => !stamp.includes(it)) : visible;
5114
- const rightArrows = _optionalChain([options, 'optionalAccess', _445 => _445.tables]) !== false ? await _chunkH2VOH7X3cjs.detectRightArrowRegions.call(void 0, page, opList.fnArray, opList.argsArray, imageArrowDirections) : [];
5115
- const pageBlocks = orderTwoUpPage(_chunkH2VOH7X3cjs.extractPageBlocksWithLines.call(void 0, flow, i, opList, pageW, pageH, void 0, _optionalChain([options, 'optionalAccess', _446 => _446.tables]) !== false, carry, wrapLexicon, rightArrows), pageW, pageH);
5114
+ const rightArrows = _optionalChain([options, 'optionalAccess', _445 => _445.tables]) !== false ? await _chunkCOG4POSKcjs.detectRightArrowRegions.call(void 0, page, opList.fnArray, opList.argsArray, imageArrowDirections) : [];
5115
+ const pageBlocks = orderTwoUpPage(_chunkCOG4POSKcjs.extractPageBlocksWithLines.call(void 0, flow, i, opList, pageW, pageH, void 0, _optionalChain([options, 'optionalAccess', _446 => _446.tables]) !== false, carry, wrapLexicon, rightArrows), pageW, pageH);
5116
5116
  if (stamp.length) pageBlocks.unshift({ type: "paragraph", text: [...stamp].sort((a, b) => a.y - b.y).map((it) => it.text).join(" "), pageNumber: i });
5117
5117
  for (const b of pageBlocks) blocks.push(b);
5118
5118
  try {
@@ -5138,11 +5138,11 @@ async function parsePdfDocument(buffer, options) {
5138
5138
  if (_optionalChain([options, 'optionalAccess', _448 => _448.ocr]) && quality.ocrReason === "vector_text" && page.rotate % 360 === 0 && page.view[0] === 0 && page.view[1] === 0) {
5139
5139
  vectorPageOps.set(i, ocrVectorOps(opList, vector.paths));
5140
5140
  }
5141
- if (totalTextBytes > MAX_TOTAL_TEXT) throw new (0, _chunkLFTO5QAPcjs.KordocError)("\uD14D\uC2A4\uD2B8 \uCD94\uCD9C \uD06C\uAE30 \uCD08\uACFC");
5141
+ if (totalTextBytes > MAX_TOTAL_TEXT) throw new (0, _chunkZTVH2HQ5cjs.KordocError)("\uD14D\uC2A4\uD2B8 \uCD94\uCD9C \uD06C\uAE30 \uCD08\uACFC");
5142
5142
  parsedPages++;
5143
5143
  _optionalChain([options, 'optionalAccess', _449 => _449.onProgress, 'optionalCall', _450 => _450(parsedPages, totalTarget)]);
5144
5144
  } catch (pageErr) {
5145
- if (pageErr instanceof _chunkLFTO5QAPcjs.KordocError) throw pageErr;
5145
+ if (pageErr instanceof _chunkZTVH2HQ5cjs.KordocError) throw pageErr;
5146
5146
  warnings.push({ page: i, message: `\uD398\uC774\uC9C0 ${i} \uD30C\uC2F1 \uC2E4\uD328: ${pageErr instanceof Error ? pageErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "PARTIAL_PARSE" });
5147
5147
  } finally {
5148
5148
  _optionalChain([loadedPage, 'optionalAccess', _451 => _451.cleanup, 'call', _452 => _452()]);
@@ -5173,12 +5173,12 @@ async function parsePdfDocument(buffer, options) {
5173
5173
  }
5174
5174
  if (targets.size > 0) {
5175
5175
  try {
5176
- const { runPdfOcr } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-H4DKZSOB.cjs")));
5176
+ const { runPdfOcr } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-AV7FKNFZ.cjs")));
5177
5177
  const mode = typeof _optionalChain([options, 'optionalAccess', _457 => _457.ocr]) === "function" ? options.ocr : "builtin";
5178
5178
  const regionPages = new Map([...ocrRegions].filter(([p]) => _optionalChain([options, 'optionalAccess', _458 => _458.ocr]) !== "force" && !isImageBased && !_optionalChain([pageQuality, 'access', _459 => _459.find, 'call', _460 => _460((q) => q.page === p), 'optionalAccess', _461 => _461.needsOcr])));
5179
- const { builtinOcrConfig } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-H4DKZSOB.cjs")));
5179
+ const { builtinOcrConfig } = await Promise.resolve().then(() => _interopRequireWildcard(require("./pdf-ocr-AV7FKNFZ.cjs")));
5180
5180
  const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, _optionalChain([options, 'optionalAccess', _462 => _462.onProgress]), _optionalChain([options, 'optionalAccess', _463 => _463.tables]) !== false, vectorPageOps, regionPages, builtinOcrConfig(options), ocrLinesOut);
5181
- for (const obs of ocrPageBlocks.values()) _chunkOW2XKTQAcjs.stripScriptTags.call(void 0, { blocks: obs });
5181
+ for (const obs of ocrPageBlocks.values()) _chunkL4GCUYDScjs.stripScriptTags.call(void 0, { blocks: obs });
5182
5182
  if (ocrPageBlocks.size > 0) {
5183
5183
  const replacePages = /* @__PURE__ */ new Set();
5184
5184
  for (const [p, obs] of ocrPageBlocks) {
@@ -5189,7 +5189,7 @@ async function parsePdfDocument(buffer, options) {
5189
5189
  continue;
5190
5190
  }
5191
5191
  const regions = ocrRegions.get(p);
5192
- if (!regions || _chunkH2VOH7X3cjs.mergeOcrImageRegions.call(void 0, blocks, p, regions, obs) === 0) continue;
5192
+ if (!regions || _chunkCOG4POSKcjs.mergeOcrImageRegions.call(void 0, blocks, p, regions, obs) === 0) continue;
5193
5193
  ocrDone.add(p);
5194
5194
  if (_optionalChain([pageImageBlocks, 'access', _468 => _468.get, 'call', _469 => _469(p), 'optionalAccess', _470 => _470.length]) === 1) pageImageBlocks.delete(p);
5195
5195
  }
@@ -5242,17 +5242,17 @@ async function parsePdfDocument(buffer, options) {
5242
5242
  }
5243
5243
  }
5244
5244
  if (_optionalChain([options, 'optionalAccess', _471 => _471.removeHeaderFooter]) !== false && (parsedPageCount >= 3 || headerContext.length)) {
5245
- const removed = _chunkH2VOH7X3cjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, false, headerContext);
5246
- const running = _chunkH2VOH7X3cjs.runningLinePatterns.call(void 0, removed.map((ri) => blocks[ri]), pageHeights);
5245
+ const removed = _chunkCOG4POSKcjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, false, headerContext);
5246
+ const running = _chunkCOG4POSKcjs.runningLinePatterns.call(void 0, removed.map((ri) => blocks[ri]), pageHeights);
5247
5247
  for (let ri = removed.length - 1; ri >= 0; ri--) {
5248
5248
  blocks.splice(removed[ri], 1);
5249
5249
  }
5250
- const stripped = _chunkH2VOH7X3cjs.stripAbsorbedRunningLines.call(void 0, blocks, pageHeights, running);
5250
+ const stripped = _chunkCOG4POSKcjs.stripAbsorbedRunningLines.call(void 0, blocks, pageHeights, running);
5251
5251
  if (stripped !== blocks) {
5252
5252
  blocks.length = 0;
5253
5253
  blocks.push(...stripped);
5254
5254
  }
5255
- const kept = _chunkH2VOH7X3cjs.removeSideTabs.call(void 0, blocks, pageWidths);
5255
+ const kept = _chunkCOG4POSKcjs.removeSideTabs.call(void 0, blocks, pageWidths);
5256
5256
  if (kept !== blocks) {
5257
5257
  blocks.length = 0;
5258
5258
  blocks.push(...kept);
@@ -5261,12 +5261,12 @@ async function parsePdfDocument(buffer, options) {
5261
5261
  mergeContinuedCells(blocks, pageHeights);
5262
5262
  mergeCrossPageTables(blocks, pageHeights, wrapLexicon);
5263
5263
  if (_optionalChain([options, 'optionalAccess', _472 => _472.removeHeaderFooter]) !== false && parsedPageCount >= 3) {
5264
- const boxes = _chunkH2VOH7X3cjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, true);
5264
+ const boxes = _chunkCOG4POSKcjs.removeHeaderFooterBlocks.call(void 0, blocks, pageHeights, warnings, noteMarks, true);
5265
5265
  for (let ri = boxes.length - 1; ri >= 0; ri--) blocks.splice(boxes[ri], 1);
5266
5266
  }
5267
5267
  splitContactTables(blocks);
5268
- if (!_optionalChain([options, 'optionalAccess', _473 => _473.keepTrailingEmptyCols])) _chunkH2VOH7X3cjs.trimTrailingEmptyTableCols.call(void 0, blocks);
5269
- _chunkH2VOH7X3cjs.joinPageBreakWraps.call(void 0, blocks, wrapLexicon);
5268
+ if (!_optionalChain([options, 'optionalAccess', _473 => _473.keepTrailingEmptyCols])) _chunkCOG4POSKcjs.trimTrailingEmptyTableCols.call(void 0, blocks);
5269
+ _chunkCOG4POSKcjs.joinPageBreakWraps.call(void 0, blocks, wrapLexicon);
5270
5270
  await flushPdfImages(imageState, warnings, pageImageBlocks);
5271
5271
  injectPageImageBlocks(blocks, pageImageBlocks);
5272
5272
  if (_optionalChain([options, 'optionalAccess', _474 => _474.formulaOcr]) && formulaBuffer) {
@@ -5279,21 +5279,21 @@ async function parsePdfDocument(buffer, options) {
5279
5279
  });
5280
5280
  }
5281
5281
  }
5282
- const medianFontSize = _chunkH2VOH7X3cjs.computeMedianFontSizeFromFreq.call(void 0, fontSizeFreq);
5282
+ const medianFontSize = _chunkCOG4POSKcjs.computeMedianFontSizeFromFreq.call(void 0, fontSizeFreq);
5283
5283
  if (medianFontSize > 0) {
5284
- _chunkH2VOH7X3cjs.detectHeadings.call(void 0, blocks, medianFontSize);
5285
- }
5286
- _chunkH2VOH7X3cjs.detectDocumentStyleHeadings.call(void 0, blocks);
5287
- _chunkH2VOH7X3cjs.detectTypographyHeadings.call(void 0, blocks);
5288
- _chunkH2VOH7X3cjs.detectSiblingStyleHeadings.call(void 0, blocks);
5289
- _chunkH2VOH7X3cjs.detectRepeatedPageLabels.call(void 0, blocks);
5290
- _chunkH2VOH7X3cjs.detectPageLeadHeadings.call(void 0, blocks);
5291
- _chunkH2VOH7X3cjs.mergeStackedHeadingLines.call(void 0, blocks, medianFontSize);
5292
- _chunkH2VOH7X3cjs.refineDocumentStyleHeadings.call(void 0, blocks);
5293
- _chunkH2VOH7X3cjs.detectMarkerHeadings.call(void 0, blocks);
5284
+ _chunkCOG4POSKcjs.detectHeadings.call(void 0, blocks, medianFontSize);
5285
+ }
5286
+ _chunkCOG4POSKcjs.detectDocumentStyleHeadings.call(void 0, blocks);
5287
+ _chunkCOG4POSKcjs.detectTypographyHeadings.call(void 0, blocks);
5288
+ _chunkCOG4POSKcjs.detectSiblingStyleHeadings.call(void 0, blocks);
5289
+ _chunkCOG4POSKcjs.detectRepeatedPageLabels.call(void 0, blocks);
5290
+ _chunkCOG4POSKcjs.detectPageLeadHeadings.call(void 0, blocks);
5291
+ _chunkCOG4POSKcjs.mergeStackedHeadingLines.call(void 0, blocks, medianFontSize);
5292
+ _chunkCOG4POSKcjs.refineDocumentStyleHeadings.call(void 0, blocks);
5293
+ _chunkCOG4POSKcjs.detectMarkerHeadings.call(void 0, blocks);
5294
5294
  demoteNonHeadingRoles(blocks, pageHeights, faceNames);
5295
- _chunkH2VOH7X3cjs.detectTableCaptions.call(void 0, blocks);
5296
- _chunkH2VOH7X3cjs.detectKoreanListBlocks.call(void 0, blocks);
5295
+ _chunkCOG4POSKcjs.detectTableCaptions.call(void 0, blocks);
5296
+ _chunkCOG4POSKcjs.detectKoreanListBlocks.call(void 0, blocks);
5297
5297
  sanitizeBlockControlChars(blocks);
5298
5298
  if (_optionalChain([options, 'optionalAccess', _475 => _475.imagePlacement]) === "flow") moveImagesInFlow(blocks);
5299
5299
  let outBlocks = splitSingleCellTables(blocks);
@@ -5315,19 +5315,19 @@ async function parsePdfDocument(buffer, options) {
5315
5315
  const shown = /* @__PURE__ */ new Map();
5316
5316
  const markContent = (bs) => {
5317
5317
  for (const b of _nullishCoalesce(bs, () => ( []))) if (b.table) for (const row of b.table.cells) for (const c of row) {
5318
- if (_chunkH2VOH7X3cjs.IMAGE_CELLS.has(c)) _chunkOW2XKTQAcjs.CONTENT_CELLS.add(c);
5319
- const lines = _chunkH2VOH7X3cjs.CELL_LINES.get(c);
5320
- if (lines) _chunkOW2XKTQAcjs.CELL_BASELINES.set(c, lines.map((l) => l.y));
5318
+ if (_chunkCOG4POSKcjs.IMAGE_CELLS.has(c)) _chunkL4GCUYDScjs.CONTENT_CELLS.add(c);
5319
+ const lines = _chunkCOG4POSKcjs.CELL_LINES.get(c);
5320
+ if (lines) _chunkL4GCUYDScjs.CELL_BASELINES.set(c, lines.map((l) => l.y));
5321
5321
  markContent(c.blocks);
5322
5322
  }
5323
5323
  };
5324
5324
  const visual = (bs) => bs.flatMap((b) => {
5325
5325
  if (b.type !== "table") return [b];
5326
- if (!hancom && b.table && _chunkH2VOH7X3cjs.CLIP_TABLES.has(b.table)) return [b];
5326
+ if (!hancom && b.table && _chunkCOG4POSKcjs.CLIP_TABLES.has(b.table)) return [b];
5327
5327
  let v = shown.get(b);
5328
5328
  if (!v) {
5329
5329
  markContent([b]);
5330
- shown.set(b, v = _chunkOW2XKTQAcjs.unframeLayoutTables.call(void 0, [b], !!_optionalChain([options, 'optionalAccess', _479 => _479.keepTrailingEmptyCols])));
5330
+ shown.set(b, v = _chunkL4GCUYDScjs.unframeLayoutTables.call(void 0, [b], !!_optionalChain([options, 'optionalAccess', _479 => _479.keepTrailingEmptyCols])));
5331
5331
  }
5332
5332
  return v;
5333
5333
  });
@@ -5336,13 +5336,13 @@ async function parsePdfDocument(buffer, options) {
5336
5336
  blocks.length = 0;
5337
5337
  for (const b of kept) blocks.push(b);
5338
5338
  }
5339
- const finishMarkdown = (bs) => mergeLinkRuns(cleanPdfText(_chunkOW2XKTQAcjs.blocksToMarkdown.call(void 0, bs, { tableFormat: _optionalChain([options, 'optionalAccess', _480 => _480.tableFormat]) }), { keepLoneNumbers: true }));
5340
- if (_optionalChain([options, 'optionalAccess', _481 => _481.tableFormat]) === "gfm") _chunkOW2XKTQAcjs.assignTableIds.call(void 0, blocks);
5339
+ const finishMarkdown = (bs) => mergeLinkRuns(cleanPdfText(_chunkL4GCUYDScjs.blocksToMarkdown.call(void 0, bs, { tableFormat: _optionalChain([options, 'optionalAccess', _480 => _480.tableFormat]) }), { keepLoneNumbers: true }));
5340
+ if (_optionalChain([options, 'optionalAccess', _481 => _481.tableFormat]) === "gfm") _chunkL4GCUYDScjs.assignTableIds.call(void 0, blocks);
5341
5341
  let markdown = finishMarkdown(outBlocks);
5342
5342
  const outline = collectPdfOutline(outBlocks);
5343
5343
  return {
5344
5344
  markdown,
5345
- pages: _chunkBNP3WXTBcjs.blocksToPages.call(void 0, splitPageTables(_chunkH2VOH7X3cjs.splitPageBreakWraps.call(void 0, outBlocks)), finishMarkdown),
5345
+ pages: _chunkJE4NCQINcjs.blocksToPages.call(void 0, splitPageTables(_chunkCOG4POSKcjs.splitPageBreakWraps.call(void 0, outBlocks)), finishMarkdown),
5346
5346
  blocks,
5347
5347
  metadata,
5348
5348
  outline: outline.length > 0 ? outline : void 0,
@@ -5425,5 +5425,5 @@ function marginStamp(items) {
5425
5425
 
5426
5426
 
5427
5427
 
5428
- exports.PDFJS_DOCUMENT_OPTIONS = PDFJS_DOCUMENT_OPTIONS; exports.cleanPdfText = cleanPdfText; exports.detectKoreanListBlocks = _chunkH2VOH7X3cjs.detectKoreanListBlocks; exports.detectTableCaptions = _chunkH2VOH7X3cjs.detectTableCaptions; exports.extractPdfMetadataOnly = extractPdfMetadataOnly; exports.mergeCrossPageTables = mergeCrossPageTables; exports.ocrImageRegions = ocrImageRegions; exports.parsePdfDocument = parsePdfDocument; exports.removeHeaderFooterBlocks = _chunkH2VOH7X3cjs.removeHeaderFooterBlocks;
5429
- //# sourceMappingURL=parser-T4HAQ3QW.cjs.map
5428
+ exports.PDFJS_DOCUMENT_OPTIONS = PDFJS_DOCUMENT_OPTIONS; exports.cleanPdfText = cleanPdfText; exports.detectKoreanListBlocks = _chunkCOG4POSKcjs.detectKoreanListBlocks; exports.detectTableCaptions = _chunkCOG4POSKcjs.detectTableCaptions; exports.extractPdfMetadataOnly = extractPdfMetadataOnly; exports.mergeCrossPageTables = mergeCrossPageTables; exports.ocrImageRegions = ocrImageRegions; exports.parsePdfDocument = parsePdfDocument; exports.removeHeaderFooterBlocks = _chunkCOG4POSKcjs.removeHeaderFooterBlocks;
5429
+ //# sourceMappingURL=parser-JQXLIKOT.cjs.map