kordoc 4.24.63 → 4.24.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{-JKJWVZ7E.js → -QAZ44KKA.js} +21 -21
- package/dist/{chunk-PEDFVAXJ.js → chunk-34OGRWYW.js} +6 -5
- package/dist/chunk-34OGRWYW.js.map +1 -0
- package/dist/{chunk-MKH2CVD2.cjs → chunk-35WLNE3R.cjs} +3 -3
- package/dist/{chunk-MKH2CVD2.cjs.map → chunk-35WLNE3R.cjs.map} +1 -1
- package/dist/{chunk-AKMBPYRU.js → chunk-36EJXOCF.js} +5 -5
- package/dist/{chunk-WB4LZYGW.cjs → chunk-3XZR5JQY.cjs} +113 -108
- package/dist/chunk-3XZR5JQY.cjs.map +1 -0
- package/dist/{chunk-JMYWAW2S.js → chunk-4R6LAJCT.js} +7 -7
- package/dist/{chunk-CB365CYO.cjs → chunk-72H52U6F.cjs} +91 -90
- package/dist/{chunk-Q2ZKAVNU.js.map → chunk-72H52U6F.cjs.map} +1 -1
- package/dist/{chunk-3R4LS2QM.js → chunk-ACDKOGKO.js} +15 -15
- package/dist/{chunk-B7JISVV7.js → chunk-AZZKSDLD.js} +2 -2
- package/dist/{chunk-KWISIIRJ.js → chunk-CKA2X7FC.js} +2 -2
- package/dist/{chunk-HG6K7PDG.js → chunk-COARY4DW.js} +2 -2
- package/dist/{chunk-Q2ZKAVNU.js → chunk-DAP3G7G3.js} +7 -6
- package/dist/chunk-DAP3G7G3.js.map +1 -0
- package/dist/{chunk-NCI5VSUC.js → chunk-DFZIE6NM.js} +2 -2
- package/dist/{chunk-X4PFJ3S3.js → chunk-EUNUDJXO.js} +2 -2
- package/dist/{chunk-SQT5Z35B.cjs → chunk-FEFKONND.cjs} +25 -25
- package/dist/{chunk-SQT5Z35B.cjs.map → chunk-FEFKONND.cjs.map} +1 -1
- package/dist/{chunk-A73BTJH5.js → chunk-FNRCQGZN.js} +4 -4
- package/dist/{chunk-PTWPZYBM.js → chunk-FPC3GEAD.js} +10 -10
- package/dist/{chunk-ZVUZZFGY.js → chunk-GDRQGXPC.js} +3 -3
- package/dist/{chunk-FIKCNQ5Q.js → chunk-GOXFAAHN.js} +2 -2
- package/dist/{chunk-YRMVLAYZ.js → chunk-HQSGKBH4.js} +2 -2
- package/dist/{chunk-SPEEZYS4.js → chunk-I4ON2NHU.js} +6 -6
- package/dist/{chunk-FZNNNXEW.js → chunk-IEOC3SKK.js} +5 -5
- package/dist/{chunk-XYMBGOXH.cjs → chunk-KVLIFFDJ.cjs} +11 -11
- package/dist/chunk-KVLIFFDJ.cjs.map +1 -0
- package/dist/{chunk-SUXFV3AL.js → chunk-LJUESQWH.js} +5 -5
- package/dist/{chunk-DQEZVDKS.js → chunk-LKCLRP4E.js} +2 -2
- package/dist/{chunk-JIH23K74.cjs → chunk-LKH3LG3N.cjs} +58 -58
- package/dist/{chunk-JIH23K74.cjs.map → chunk-LKH3LG3N.cjs.map} +1 -1
- package/dist/{chunk-UMF44YJH.js → chunk-LNAOHM6K.js} +2 -2
- package/dist/{chunk-E3IGBNLD.js → chunk-MEHJKEUZ.js} +2 -2
- package/dist/{chunk-WDFJGFAH.cjs → chunk-MMZO2B5N.cjs} +3 -3
- package/dist/{chunk-WDFJGFAH.cjs.map → chunk-MMZO2B5N.cjs.map} +1 -1
- package/dist/{chunk-CD7YHKSF.js → chunk-NVHBKHTR.js} +11 -11
- package/dist/{chunk-XIJH4QF7.js → chunk-OJKFBZPW.js} +5 -5
- package/dist/chunk-OJKFBZPW.js.map +1 -0
- package/dist/{chunk-SUMSKQ43.js → chunk-PNEMJTPG.js} +2 -2
- package/dist/{chunk-TFEQHER2.js → chunk-PO2TQW2B.js} +2 -2
- package/dist/{chunk-BW2KS7VQ.js → chunk-PTJDTKU3.js} +37 -32
- package/dist/chunk-PTJDTKU3.js.map +1 -0
- package/dist/{chunk-CL2GZ7JO.js → chunk-PZOKLEDR.js} +2 -2
- package/dist/{chunk-MQNJY7II.js → chunk-Q4AQE7TN.js} +2 -2
- package/dist/{chunk-55QH5LSM.js → chunk-R5PEYGFS.js} +5 -5
- package/dist/{chunk-55QH5LSM.js.map → chunk-R5PEYGFS.js.map} +1 -1
- package/dist/{chunk-ROHCAUUO.js → chunk-R7GE5HUE.js} +3 -3
- package/dist/{chunk-UZDSVTD4.js → chunk-S6WRR43D.js} +2 -2
- package/dist/{chunk-4J7PCDT5.cjs → chunk-T3JCWBOI.cjs} +2 -2
- package/dist/{chunk-4J7PCDT5.cjs.map → chunk-T3JCWBOI.cjs.map} +1 -1
- package/dist/{chunk-7OBVSSAQ.js → chunk-X2XUGRV3.js} +34 -29
- package/dist/chunk-X2XUGRV3.js.map +1 -0
- package/dist/{chunk-XABC4RKP.js → chunk-XCPST2YL.js} +2 -2
- package/dist/{chunk-JCNNDOOW.js → chunk-YFEV3NNV.js} +2 -2
- package/dist/{chunk-WIPBQVIK.js → chunk-ZRHMLFJB.js} +3 -3
- package/dist/chunks-OWWHWU6T.js +11 -0
- package/dist/cli.js +45 -45
- package/dist/{formula-DNS3KV3C.js → formula-AKSUUGPE.js} +8 -4
- package/dist/formula-AKSUUGPE.js.map +1 -0
- package/dist/{formula-WTTPNY2I.cjs → formula-IWBM3D27.cjs} +13 -9
- package/dist/formula-IWBM3D27.cjs.map +1 -0
- package/dist/{formula-VKUUIOIT.js → formula-TGSWQZXE.js} +7 -3
- package/dist/formula-TGSWQZXE.js.map +1 -0
- package/dist/generator-AUHRYGI3.cjs +12 -0
- package/dist/{generator-NDQUC266.cjs.map → generator-AUHRYGI3.cjs.map} +1 -1
- package/dist/generator-TGYD6N7S.js +11 -0
- package/dist/generator-UB2TEEE6.js +18 -0
- package/dist/{hancom-QGPXR2US.js → hancom-HQBZBCSR.js} +2 -2
- package/dist/{hancom-IBHKEOO5.js → hancom-PV626GYI.js} +2 -2
- package/dist/{hancom-JYQQYZPV.cjs → hancom-QSZ33R47.cjs} +5 -5
- package/dist/{hancom-JYQQYZPV.cjs.map → hancom-QSZ33R47.cjs.map} +1 -1
- package/dist/{image-ocr-TKWNXWUY.js → image-ocr-2EYCNJJU.js} +10 -10
- package/dist/{image-ocr-OHVXCHWL.cjs → image-ocr-EL2WFECB.cjs} +28 -28
- package/dist/{image-ocr-OHVXCHWL.cjs.map → image-ocr-EL2WFECB.cjs.map} +1 -1
- package/dist/{image-ocr-6O6E6XIZ.js → image-ocr-P5XZGIPX.js} +7 -7
- package/dist/index.cjs +1115 -1115
- package/dist/index.js +9 -9
- package/dist/mcp.js +36 -36
- package/dist/memo-I5S4HZBP.js +17 -0
- package/dist/{model-bundle-ICW2B75K.js → model-bundle-5ZAV3WPL.js} +5 -5
- package/dist/{models-ZIAOV7EN.js → models-KOHBYNOH.js} +5 -5
- package/dist/{parse-worker-v2-QBMUV2FV.js → parse-worker-v2-SSXAWHMP.js} +22 -22
- package/dist/{parser-7SXRUERF.js → parser-GAT6U7NK.js} +9 -9
- package/dist/{parser-FIVOMRFD.cjs → parser-JAXFIY4Z.cjs} +166 -166
- package/dist/{parser-FIVOMRFD.cjs.map → parser-JAXFIY4Z.cjs.map} +1 -1
- package/dist/{parser-IYDEYLT2.js → parser-Q2LYKLLS.js} +12 -12
- package/dist/{pdf-ocr-NJAOCNPW.js → pdf-ocr-5EHHYF3C.js} +6 -6
- package/dist/pdf-ocr-S6LZ5SDT.cjs +43 -0
- package/dist/{pdf-ocr-YVLMXFYG.cjs.map → pdf-ocr-S6LZ5SDT.cjs.map} +1 -1
- package/dist/{pdf-ocr-L2FDPW4J.js → pdf-ocr-ZK6W2KRC.js} +9 -9
- package/dist/{profile-io-ZFFUBVD7.js → profile-io-6LSVAJGK.js} +3 -3
- package/dist/{rasterize-73LPY77L.js → rasterize-JRBWIABQ.js} +3 -3
- package/dist/{redact-doc-PMLOYY4I.js → redact-doc-K6Q3J4QN.js} +21 -21
- package/dist/{render-6IUG73FB.js → render-QXCUXJBD.js} +12 -12
- package/dist/{rewrite-fallback-MLILIZUH.js → rewrite-fallback-LKK3CK7E.js} +13 -13
- package/dist/seal-GMZGRQE7.js +16 -0
- package/dist/{setup-GOFOC4YG.js → setup-NA3L7AP4.js} +3 -3
- package/dist/to-hwpx-ICWG2YYM.cjs +16 -0
- package/dist/{to-hwpx-OPZN5DZY.cjs.map → to-hwpx-ICWG2YYM.cjs.map} +1 -1
- package/dist/{to-hwpx-Y3MXBDML.js → to-hwpx-QVGHZIYD.js} +4 -4
- package/dist/{to-hwpx-3LMSUQTA.js → to-hwpx-YNCXFNZV.js} +7 -7
- package/dist/visual-5BXQ3MAX.js +38 -0
- package/dist/{watch-WHMWDPKY.js → watch-C276YW4I.js} +22 -22
- package/package.json +1 -1
- package/dist/chunk-7OBVSSAQ.js.map +0 -1
- package/dist/chunk-BW2KS7VQ.js.map +0 -1
- package/dist/chunk-CB365CYO.cjs.map +0 -1
- package/dist/chunk-PEDFVAXJ.js.map +0 -1
- package/dist/chunk-WB4LZYGW.cjs.map +0 -1
- package/dist/chunk-XIJH4QF7.js.map +0 -1
- package/dist/chunk-XYMBGOXH.cjs.map +0 -1
- package/dist/chunks-XCTKHHQF.js +0 -11
- package/dist/formula-DNS3KV3C.js.map +0 -1
- package/dist/formula-VKUUIOIT.js.map +0 -1
- package/dist/formula-WTTPNY2I.cjs.map +0 -1
- package/dist/generator-B7BQ7GSG.js +0 -11
- package/dist/generator-NDQUC266.cjs +0 -12
- package/dist/generator-SBFQTDAS.js +0 -18
- package/dist/memo-TRWRHDYB.js +0 -17
- package/dist/pdf-ocr-YVLMXFYG.cjs +0 -43
- package/dist/seal-KDPRMM4D.js +0 -16
- package/dist/to-hwpx-OPZN5DZY.cjs +0 -16
- package/dist/visual-VI4WYIWM.js +0 -38
- /package/dist/{-JKJWVZ7E.js.map → -QAZ44KKA.js.map} +0 -0
- /package/dist/{chunk-AKMBPYRU.js.map → chunk-36EJXOCF.js.map} +0 -0
- /package/dist/{chunk-JMYWAW2S.js.map → chunk-4R6LAJCT.js.map} +0 -0
- /package/dist/{chunk-3R4LS2QM.js.map → chunk-ACDKOGKO.js.map} +0 -0
- /package/dist/{chunk-B7JISVV7.js.map → chunk-AZZKSDLD.js.map} +0 -0
- /package/dist/{chunk-KWISIIRJ.js.map → chunk-CKA2X7FC.js.map} +0 -0
- /package/dist/{chunk-HG6K7PDG.js.map → chunk-COARY4DW.js.map} +0 -0
- /package/dist/{chunk-NCI5VSUC.js.map → chunk-DFZIE6NM.js.map} +0 -0
- /package/dist/{chunk-X4PFJ3S3.js.map → chunk-EUNUDJXO.js.map} +0 -0
- /package/dist/{chunk-A73BTJH5.js.map → chunk-FNRCQGZN.js.map} +0 -0
- /package/dist/{chunk-PTWPZYBM.js.map → chunk-FPC3GEAD.js.map} +0 -0
- /package/dist/{chunk-ZVUZZFGY.js.map → chunk-GDRQGXPC.js.map} +0 -0
- /package/dist/{chunk-FIKCNQ5Q.js.map → chunk-GOXFAAHN.js.map} +0 -0
- /package/dist/{chunk-YRMVLAYZ.js.map → chunk-HQSGKBH4.js.map} +0 -0
- /package/dist/{chunk-SPEEZYS4.js.map → chunk-I4ON2NHU.js.map} +0 -0
- /package/dist/{chunk-FZNNNXEW.js.map → chunk-IEOC3SKK.js.map} +0 -0
- /package/dist/{chunk-SUXFV3AL.js.map → chunk-LJUESQWH.js.map} +0 -0
- /package/dist/{chunk-DQEZVDKS.js.map → chunk-LKCLRP4E.js.map} +0 -0
- /package/dist/{chunk-UMF44YJH.js.map → chunk-LNAOHM6K.js.map} +0 -0
- /package/dist/{chunk-E3IGBNLD.js.map → chunk-MEHJKEUZ.js.map} +0 -0
- /package/dist/{chunk-CD7YHKSF.js.map → chunk-NVHBKHTR.js.map} +0 -0
- /package/dist/{chunk-SUMSKQ43.js.map → chunk-PNEMJTPG.js.map} +0 -0
- /package/dist/{chunk-TFEQHER2.js.map → chunk-PO2TQW2B.js.map} +0 -0
- /package/dist/{chunk-CL2GZ7JO.js.map → chunk-PZOKLEDR.js.map} +0 -0
- /package/dist/{chunk-MQNJY7II.js.map → chunk-Q4AQE7TN.js.map} +0 -0
- /package/dist/{chunk-ROHCAUUO.js.map → chunk-R7GE5HUE.js.map} +0 -0
- /package/dist/{chunk-UZDSVTD4.js.map → chunk-S6WRR43D.js.map} +0 -0
- /package/dist/{chunk-XABC4RKP.js.map → chunk-XCPST2YL.js.map} +0 -0
- /package/dist/{chunk-JCNNDOOW.js.map → chunk-YFEV3NNV.js.map} +0 -0
- /package/dist/{chunk-WIPBQVIK.js.map → chunk-ZRHMLFJB.js.map} +0 -0
- /package/dist/{chunks-XCTKHHQF.js.map → chunks-OWWHWU6T.js.map} +0 -0
- /package/dist/{generator-B7BQ7GSG.js.map → generator-TGYD6N7S.js.map} +0 -0
- /package/dist/{generator-SBFQTDAS.js.map → generator-UB2TEEE6.js.map} +0 -0
- /package/dist/{hancom-QGPXR2US.js.map → hancom-HQBZBCSR.js.map} +0 -0
- /package/dist/{hancom-IBHKEOO5.js.map → hancom-PV626GYI.js.map} +0 -0
- /package/dist/{image-ocr-TKWNXWUY.js.map → image-ocr-2EYCNJJU.js.map} +0 -0
- /package/dist/{image-ocr-6O6E6XIZ.js.map → image-ocr-P5XZGIPX.js.map} +0 -0
- /package/dist/{memo-TRWRHDYB.js.map → memo-I5S4HZBP.js.map} +0 -0
- /package/dist/{model-bundle-ICW2B75K.js.map → model-bundle-5ZAV3WPL.js.map} +0 -0
- /package/dist/{models-ZIAOV7EN.js.map → models-KOHBYNOH.js.map} +0 -0
- /package/dist/{parse-worker-v2-QBMUV2FV.js.map → parse-worker-v2-SSXAWHMP.js.map} +0 -0
- /package/dist/{parser-7SXRUERF.js.map → parser-GAT6U7NK.js.map} +0 -0
- /package/dist/{parser-IYDEYLT2.js.map → parser-Q2LYKLLS.js.map} +0 -0
- /package/dist/{pdf-ocr-L2FDPW4J.js.map → pdf-ocr-5EHHYF3C.js.map} +0 -0
- /package/dist/{pdf-ocr-NJAOCNPW.js.map → pdf-ocr-ZK6W2KRC.js.map} +0 -0
- /package/dist/{profile-io-ZFFUBVD7.js.map → profile-io-6LSVAJGK.js.map} +0 -0
- /package/dist/{rasterize-73LPY77L.js.map → rasterize-JRBWIABQ.js.map} +0 -0
- /package/dist/{redact-doc-PMLOYY4I.js.map → redact-doc-K6Q3J4QN.js.map} +0 -0
- /package/dist/{render-6IUG73FB.js.map → render-QXCUXJBD.js.map} +0 -0
- /package/dist/{rewrite-fallback-MLILIZUH.js.map → rewrite-fallback-LKK3CK7E.js.map} +0 -0
- /package/dist/{seal-KDPRMM4D.js.map → seal-GMZGRQE7.js.map} +0 -0
- /package/dist/{setup-GOFOC4YG.js.map → setup-NA3L7AP4.js.map} +0 -0
- /package/dist/{to-hwpx-3LMSUQTA.js.map → to-hwpx-QVGHZIYD.js.map} +0 -0
- /package/dist/{to-hwpx-Y3MXBDML.js.map → to-hwpx-YNCXFNZV.js.map} +0 -0
- /package/dist/{visual-VI4WYIWM.js.map → visual-5BXQ3MAX.js.map} +0 -0
- /package/dist/{watch-WHMWDPKY.js.map → watch-C276YW4I.js.map} +0 -0
|
@@ -39,12 +39,12 @@ var _chunkLAYKIZOXcjs = require('./chunk-LAYKIZOX.cjs');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkKVLIFFDJcjs = require('./chunk-KVLIFFDJ.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkT3JCWBOIcjs = require('./chunk-T3JCWBOI.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
|
|
@@ -122,7 +122,7 @@ function decompressStream(data2) {
|
|
|
122
122
|
return _zlib.inflateRawSync.call(void 0, data2, opts);
|
|
123
123
|
}
|
|
124
124
|
function parseFileHeader(data2) {
|
|
125
|
-
if (data2.length < 40) throw new (0,
|
|
125
|
+
if (data2.length < 40) throw new (0, _chunkT3JCWBOIcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
|
|
126
126
|
const sig = data2.subarray(0, 32).toString("utf8").replace(/\0+$/, "");
|
|
127
127
|
return {
|
|
128
128
|
signature: sig,
|
|
@@ -1351,7 +1351,7 @@ function decryptPasswordStream(raw, password) {
|
|
|
1351
1351
|
var TAG_DOCUMENT_PROPERTIES = 16;
|
|
1352
1352
|
var TAG_ID_MAPPINGS2 = 17;
|
|
1353
1353
|
function assertDecryptedDocInfo(data2, readRecords2) {
|
|
1354
|
-
const wrong = () => new (0,
|
|
1354
|
+
const wrong = () => new (0, _chunkT3JCWBOIcjs.KordocError)("\uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uAC70\uB098 \uC554\uD638\uD654 \uB370\uC774\uD130\uAC00 \uC190\uC0C1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
1355
1355
|
let records;
|
|
1356
1356
|
try {
|
|
1357
1357
|
records = readRecords2(data2);
|
|
@@ -1363,7 +1363,7 @@ function assertDecryptedDocInfo(data2, readRecords2) {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
function assertSupportedEncryptVersion(version) {
|
|
1365
1365
|
if (version !== SUPPORTED_ENCRYPT_VERSION) {
|
|
1366
|
-
throw new (0,
|
|
1366
|
+
throw new (0, _chunkT3JCWBOIcjs.KordocError)(
|
|
1367
1367
|
`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 HWP \uC554\uD638\uD654 \uBC84\uC804\uC785\uB2C8\uB2E4 (EncryptVersion=${version}, \uC9C0\uC6D0: ${SUPPORTED_ENCRYPT_VERSION})`
|
|
1368
1368
|
);
|
|
1369
1369
|
}
|
|
@@ -1597,19 +1597,19 @@ var HANJA_UNITS = ["", "\u5341", "\u767E", "\u5343", "\u842C"];
|
|
|
1597
1597
|
function formatNumber(n, fmt) {
|
|
1598
1598
|
switch (fmt) {
|
|
1599
1599
|
case "circled":
|
|
1600
|
-
return n >= 1 ?
|
|
1600
|
+
return n >= 1 ? _chunkKVLIFFDJcjs.circledNumber.call(void 0, n - 1) : String(n);
|
|
1601
1601
|
case "romanUpper":
|
|
1602
|
-
return
|
|
1602
|
+
return _chunkKVLIFFDJcjs.romanNumeral.call(void 0, n, true);
|
|
1603
1603
|
case "romanLower":
|
|
1604
|
-
return
|
|
1604
|
+
return _chunkKVLIFFDJcjs.romanNumeral.call(void 0, n, false);
|
|
1605
1605
|
case "latinUpper":
|
|
1606
1606
|
return formatLatin(n, true) || String(n);
|
|
1607
1607
|
case "latinLower":
|
|
1608
1608
|
return formatLatin(n, false) || String(n);
|
|
1609
1609
|
case "ganada":
|
|
1610
|
-
return n >= 1 ?
|
|
1610
|
+
return n >= 1 ? _chunkKVLIFFDJcjs.hangulOrdinal.call(void 0, n - 1) : String(n);
|
|
1611
1611
|
case "circledGanada":
|
|
1612
|
-
return n >= 1 ?
|
|
1612
|
+
return n >= 1 ? _chunkKVLIFFDJcjs.circledHangul.call(void 0, n - 1) : String(n);
|
|
1613
1613
|
case "jamo":
|
|
1614
1614
|
return fromTable(n, JAMO);
|
|
1615
1615
|
case "circledJamo":
|
|
@@ -1796,8 +1796,8 @@ function emitParagraphBlocks(p) {
|
|
|
1796
1796
|
return blocks;
|
|
1797
1797
|
}
|
|
1798
1798
|
function tableFlatText(table) {
|
|
1799
|
-
const flat =
|
|
1800
|
-
return table.caption ?
|
|
1799
|
+
const flat = _chunkKVLIFFDJcjs.convertTableToText.call(void 0, table.cells);
|
|
1800
|
+
return table.caption ? _chunkKVLIFFDJcjs.captionedText.call(void 0, flat, table.caption, table.captionBelow) : flat;
|
|
1801
1801
|
}
|
|
1802
1802
|
function blocksPlainText(blocks, sep) {
|
|
1803
1803
|
const parts = [];
|
|
@@ -1880,8 +1880,8 @@ ${cell.text}` : cell.text;
|
|
|
1880
1880
|
}
|
|
1881
1881
|
function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
|
|
1882
1882
|
for (const c of cells) {
|
|
1883
|
-
rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1,
|
|
1884
|
-
cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1,
|
|
1883
|
+
rows = Math.max(rows, Math.min((_nullishCoalesce(c.rowAddr, () => ( 0))) + 1, _chunkKVLIFFDJcjs.MAX_ROWS));
|
|
1884
|
+
cols = Math.max(cols, Math.min((_nullishCoalesce(c.colAddr, () => ( 0))) + 1, _chunkKVLIFFDJcjs.MAX_COLS));
|
|
1885
1885
|
}
|
|
1886
1886
|
const placed = resolveCellOverlaps(cells, rows, cols);
|
|
1887
1887
|
const byRow = Array.from({ length: rows }, () => []);
|
|
@@ -1889,12 +1889,12 @@ function buildAddressedTable(cells, rows, cols, keepAnchoredEmptyCols) {
|
|
|
1889
1889
|
const r = _nullishCoalesce(c.rowAddr, () => ( 0));
|
|
1890
1890
|
if (r < rows && (_nullishCoalesce(c.colAddr, () => ( 0))) < cols) byRow[r].push(c);
|
|
1891
1891
|
}
|
|
1892
|
-
const table =
|
|
1892
|
+
const table = _chunkKVLIFFDJcjs.buildTable.call(void 0, byRow, { keepAnchoredEmptyCols });
|
|
1893
1893
|
if (table.rows === 0) return null;
|
|
1894
1894
|
for (const c of placed) {
|
|
1895
1895
|
if (c.edges) {
|
|
1896
1896
|
const at = _optionalChain([table, 'access', _12 => _12.cells, 'access', _13 => _13[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _14 => _14[_nullishCoalesce(c.colAddr, () => ( 0))]]);
|
|
1897
|
-
if (at)
|
|
1897
|
+
if (at) _chunkKVLIFFDJcjs.CELL_EDGES.set(at, c.edges);
|
|
1898
1898
|
}
|
|
1899
1899
|
if (!_optionalChain([c, 'access', _15 => _15.blocks, 'optionalAccess', _16 => _16.length]) && !c.isHeader) continue;
|
|
1900
1900
|
const target = _optionalChain([table, 'access', _17 => _17.cells, 'access', _18 => _18[_nullishCoalesce(c.rowAddr, () => ( 0))], 'optionalAccess', _19 => _19[_nullishCoalesce(c.colAddr, () => ( 0))]]);
|
|
@@ -2132,7 +2132,7 @@ function parseParagraph(records, start, end, ctx) {
|
|
|
2132
2132
|
continue;
|
|
2133
2133
|
}
|
|
2134
2134
|
if (!ctrl2.href) continue;
|
|
2135
|
-
const href =
|
|
2135
|
+
const href = _chunkT3JCWBOIcjs.sanitizeHref.call(void 0, ctrl2.href);
|
|
2136
2136
|
if (!href) continue;
|
|
2137
2137
|
if (!anchor.trim() || anchor.includes(INLINE_TABLE_MARK)) continue;
|
|
2138
2138
|
text = text.slice(0, r.start) + `[${anchor}](${href})` + text.slice(r.end);
|
|
@@ -2142,7 +2142,7 @@ function parseParagraph(records, start, end, ctx) {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
if (text.includes(LITERAL_DOLLAR_MARK)) text = text.replaceAll(LITERAL_DOLLAR_MARK, "\\$");
|
|
2144
2144
|
text = resolveLiteralLt(text);
|
|
2145
|
-
text =
|
|
2145
|
+
text = _chunkKVLIFFDJcjs.tidyScriptTags.call(void 0, text);
|
|
2146
2146
|
const toc = _chunkLAYKIZOXcjs.takeTocLeaders.call(void 0, text);
|
|
2147
2147
|
text = toc.text;
|
|
2148
2148
|
const holdsText = (c) => {
|
|
@@ -2274,7 +2274,7 @@ function applyCtrlEffect(ctrl2, records, ctx) {
|
|
|
2274
2274
|
// 글자 겹침 — ctrl id 뒤 글자 수(WORD)·겹친 글자(WCHAR[n])·테두리 종류(BYTE, 0 = 없음). 종전엔 건너뛰어 법령 서식 원 번호(⑯·⑰)가 빠졌다
|
|
2275
2275
|
case CTRL_TCPS: {
|
|
2276
2276
|
const d = ctrl2.data, n = d.length >= 6 ? d.readUInt16LE(4) : 0;
|
|
2277
|
-
if (n > 0 && d.length >= 6 + 2 * n) ctrl2.inlineText =
|
|
2277
|
+
if (n > 0 && d.length >= 6 + 2 * n) ctrl2.inlineText = _chunkKVLIFFDJcjs.composeText.call(void 0, d.toString("utf16le", 6, 6 + 2 * n), (_nullishCoalesce(d[6 + 2 * n], () => ( 0))) !== 0);
|
|
2278
2278
|
return;
|
|
2279
2279
|
}
|
|
2280
2280
|
// 숨은 설명/단 정의/쪽번호 위치/감추기/찾아보기/책갈피/덧말 — 본문 텍스트 없음 또는 의도적 스킵
|
|
@@ -2407,7 +2407,7 @@ function hyperlinkUrlFromCommand(command) {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
var A4_HEIGHT = 84188;
|
|
2409
2409
|
function keepUnlessPageSpanning(table, cells) {
|
|
2410
|
-
if (!cells.some((c) => c.pageSpanning))
|
|
2410
|
+
if (!cells.some((c) => c.pageSpanning)) _chunkKVLIFFDJcjs.markNonLayoutTable.call(void 0, table);
|
|
2411
2411
|
}
|
|
2412
2412
|
function parseTableControl(ctrl2, records, ctx) {
|
|
2413
2413
|
if (ctx.depth >= MAX_NEST_DEPTH) return null;
|
|
@@ -2419,8 +2419,8 @@ function parseTableControl(ctrl2, records, ctx) {
|
|
|
2419
2419
|
let tableIdx = -1;
|
|
2420
2420
|
for (let i2 = childStart; i2 < childEnd; i2++) {
|
|
2421
2421
|
if (records[i2].tagId === TAG_TABLE && records[i2].level === directLevel && records[i2].data.length >= 8) {
|
|
2422
|
-
rows = Math.min(records[i2].data.readUInt16LE(4),
|
|
2423
|
-
cols = Math.min(records[i2].data.readUInt16LE(6),
|
|
2422
|
+
rows = Math.min(records[i2].data.readUInt16LE(4), _chunkKVLIFFDJcjs.MAX_ROWS);
|
|
2423
|
+
cols = Math.min(records[i2].data.readUInt16LE(6), _chunkKVLIFFDJcjs.MAX_COLS);
|
|
2424
2424
|
tableIdx = i2;
|
|
2425
2425
|
break;
|
|
2426
2426
|
}
|
|
@@ -2467,11 +2467,11 @@ function parseTableControl(ctrl2, records, ctx) {
|
|
|
2467
2467
|
return table2;
|
|
2468
2468
|
}
|
|
2469
2469
|
if (rows === 0 || cols === 0) {
|
|
2470
|
-
rows = Math.min(cells.length,
|
|
2470
|
+
rows = Math.min(cells.length, _chunkKVLIFFDJcjs.MAX_ROWS);
|
|
2471
2471
|
cols = 1;
|
|
2472
2472
|
}
|
|
2473
2473
|
const cellRows = arrangeCells(rows, cols, cells);
|
|
2474
|
-
const table =
|
|
2474
|
+
const table = _chunkKVLIFFDJcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
|
|
2475
2475
|
if (caption && table.rows > 0) table.caption = caption;
|
|
2476
2476
|
if (caption && captionBelow && table.rows > 0) table.captionBelow = true;
|
|
2477
2477
|
if (sourceId && table.rows > 0) table.sourceId = sourceId;
|
|
@@ -2491,8 +2491,8 @@ function parseCell(records, lhIdx, end, ctx) {
|
|
|
2491
2491
|
rowAddr = rec.data.readUInt16LE(10);
|
|
2492
2492
|
const cs = rec.data.readUInt16LE(12);
|
|
2493
2493
|
const rs = rec.data.readUInt16LE(14);
|
|
2494
|
-
if (cs > 0) colSpan = Math.min(cs,
|
|
2495
|
-
if (rs > 0) rowSpan = Math.min(rs,
|
|
2494
|
+
if (cs > 0) colSpan = Math.min(cs, _chunkKVLIFFDJcjs.MAX_COLS);
|
|
2495
|
+
if (rs > 0) rowSpan = Math.min(rs, _chunkKVLIFFDJcjs.MAX_ROWS);
|
|
2496
2496
|
}
|
|
2497
2497
|
const blocks = ctx.depth < MAX_NEST_DEPTH ? parseParagraphList(records, lhIdx + 1, end, { ...ctx, depth: ctx.depth + 1, plainText: false }) : [];
|
|
2498
2498
|
const { text, hasStructure } = cellTextFromBlocks(blocks);
|
|
@@ -2618,7 +2618,7 @@ function emphasisSpans(state, text) {
|
|
|
2618
2618
|
for (let r = 0; r < runs.length; r++) {
|
|
2619
2619
|
const end = r + 1 < runs.length ? runs[r + 1][0] : state.text.length;
|
|
2620
2620
|
const raw = state.text.slice(r === 0 ? 0 : runs[r][0], end);
|
|
2621
|
-
const t =
|
|
2621
|
+
const t = _chunkKVLIFFDJcjs.tidyScriptTags.call(void 0, resolveLiteralLt(raw.replaceAll(LITERAL_DOLLAR_MARK, "\\$")));
|
|
2622
2622
|
if (!t) continue;
|
|
2623
2623
|
const key = runs[r][1], last = spans[spans.length - 1];
|
|
2624
2624
|
if (last && last.key === key) {
|
|
@@ -2675,7 +2675,7 @@ function hasRealUnderline(attrFlags) {
|
|
|
2675
2675
|
|
|
2676
2676
|
|
|
2677
2677
|
// src/memo-notes.ts
|
|
2678
|
-
var squash = (s) =>
|
|
2678
|
+
var squash = (s) => _chunkKVLIFFDJcjs.sanitizeText.call(void 0, s).replace(/\s+/g, "");
|
|
2679
2679
|
function blockText(b) {
|
|
2680
2680
|
if (b.type !== "table" || !b.table) return _nullishCoalesce(b.text, () => ( ""));
|
|
2681
2681
|
return b.table.cells.flat().map((c) => _nullishCoalesce(_optionalChain([c, 'optionalAccess', _51 => _51.text]), () => ( ""))).join("\n");
|
|
@@ -2697,7 +2697,7 @@ function locateMemoBlocks(blocks, memos) {
|
|
|
2697
2697
|
});
|
|
2698
2698
|
}
|
|
2699
2699
|
function memosMarkdown(memos) {
|
|
2700
|
-
const one = (s) =>
|
|
2700
|
+
const one = (s) => _chunkKVLIFFDJcjs.escapeGfm.call(void 0, _chunkKVLIFFDJcjs.sanitizeText.call(void 0, s.replace(/\s*\n\s*/g, " / ")));
|
|
2701
2701
|
const lines = memos.map((m, i) => {
|
|
2702
2702
|
const when = _optionalChain([m, 'access', _52 => _52.createdAt, 'optionalAccess', _53 => _53.replace, 'call', _54 => _54("T", " "), 'access', _55 => _55.replace, 'call', _56 => _56(/(:\d\d)?Z?$/, "")]);
|
|
2703
2703
|
const who = [m.author, when].filter(Boolean).join(", ");
|
|
@@ -2729,7 +2729,7 @@ function openHwp5Container(buffer, options) {
|
|
|
2729
2729
|
lenientCfb = _chunkDEVQZTE7cjs.parseLenientCfb.call(void 0, buffer);
|
|
2730
2730
|
warnings.push({ message: "\uC190\uC0C1\uB41C CFB \uCEE8\uD14C\uC774\uB108 \u2014 lenient \uBAA8\uB4DC\uB85C \uBCF5\uAD6C", code: "LENIENT_CFB_RECOVERY" });
|
|
2731
2731
|
} catch (e8) {
|
|
2732
|
-
throw new (0,
|
|
2732
|
+
throw new (0, _chunkT3JCWBOIcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
|
|
2733
2733
|
}
|
|
2734
2734
|
}
|
|
2735
2735
|
const readRawStream = (path) => {
|
|
@@ -2740,14 +2740,14 @@ function openHwp5Container(buffer, options) {
|
|
|
2740
2740
|
return lenientCfb.findStream(path);
|
|
2741
2741
|
};
|
|
2742
2742
|
const headerData = readRawStream("/FileHeader");
|
|
2743
|
-
if (!headerData) throw new (0,
|
|
2743
|
+
if (!headerData) throw new (0, _chunkT3JCWBOIcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
|
|
2744
2744
|
const header = parseFileHeader(headerData);
|
|
2745
|
-
if (header.signature !== "HWP Document File") throw new (0,
|
|
2746
|
-
if (header.flags & FLAG_DRM) throw new (0,
|
|
2745
|
+
if (header.signature !== "HWP Document File") throw new (0, _chunkT3JCWBOIcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
|
|
2746
|
+
if (header.flags & FLAG_DRM) throw new (0, _chunkT3JCWBOIcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
|
|
2747
2747
|
const encrypted = (header.flags & FLAG_ENCRYPTED) !== 0;
|
|
2748
2748
|
if (encrypted) {
|
|
2749
2749
|
if (!_optionalChain([options, 'optionalAccess', _58 => _58.password])) {
|
|
2750
|
-
throw new (0,
|
|
2750
|
+
throw new (0, _chunkT3JCWBOIcjs.KordocError)("\uC554\uD638\uB85C \uBCF4\uD638\uB41C HWP \uBB38\uC11C\uC785\uB2C8\uB2E4. password \uC635\uC158\uC5D0 \uC5F4\uAE30 \uC554\uD638\uB97C \uC9C0\uC815\uD558\uC138\uC694.");
|
|
2751
2751
|
}
|
|
2752
2752
|
assertSupportedEncryptVersion(readEncryptVersion(headerData));
|
|
2753
2753
|
}
|
|
@@ -2761,12 +2761,12 @@ function openHwp5Container(buffer, options) {
|
|
|
2761
2761
|
const distribution = (header.flags & FLAG_DISTRIBUTION) !== 0;
|
|
2762
2762
|
if (encrypted) {
|
|
2763
2763
|
const rawDocInfo = findStream("/DocInfo");
|
|
2764
|
-
if (!rawDocInfo) throw new (0,
|
|
2764
|
+
if (!rawDocInfo) throw new (0, _chunkT3JCWBOIcjs.KordocError)("DocInfo \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
|
|
2765
2765
|
let docInfoData;
|
|
2766
2766
|
try {
|
|
2767
2767
|
docInfoData = compressed ? decompressStream(rawDocInfo) : rawDocInfo;
|
|
2768
2768
|
} catch (e9) {
|
|
2769
|
-
throw new (0,
|
|
2769
|
+
throw new (0, _chunkT3JCWBOIcjs.KordocError)("\uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uAC70\uB098 \uC554\uD638\uD654 \uB370\uC774\uD130\uAC00 \uC190\uC0C1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
2770
2770
|
}
|
|
2771
2771
|
assertDecryptedDocInfo(docInfoData, readRecords);
|
|
2772
2772
|
}
|
|
@@ -2791,10 +2791,10 @@ function readHwp5SectionRecords(c, sections, warnings) {
|
|
|
2791
2791
|
try {
|
|
2792
2792
|
const data2 = !c.distribution && c.compressed ? decompressStream(Buffer.from(sections[si])) : Buffer.from(sections[si]);
|
|
2793
2793
|
totalDecompressed += data2.length;
|
|
2794
|
-
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
2794
|
+
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkT3JCWBOIcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
2795
2795
|
out.push(readRecords(data2));
|
|
2796
2796
|
} catch (secErr) {
|
|
2797
|
-
if (secErr instanceof
|
|
2797
|
+
if (secErr instanceof _chunkT3JCWBOIcjs.KordocError) throw secErr;
|
|
2798
2798
|
out.push(null);
|
|
2799
2799
|
warnings.push({ page: si + 1, message: `\uC139\uC158 ${si + 1} \uD30C\uC2F1 \uC2E4\uD328: ${secErr instanceof Error ? secErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "PARTIAL_PARSE" });
|
|
2800
2800
|
}
|
|
@@ -2814,7 +2814,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2814
2814
|
if (cfb) extractHwp5Metadata(cfb, metadata);
|
|
2815
2815
|
const docInfo = cfb && !encrypted ? parseDocInfoStream(cfb, compressed) : parseDocInfoFromStream(findStream("/DocInfo"), compressed);
|
|
2816
2816
|
const sections = readHwp5SectionStreams(c);
|
|
2817
|
-
if (sections.length === 0) throw new (0,
|
|
2817
|
+
if (sections.length === 0) throw new (0, _chunkT3JCWBOIcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
2818
2818
|
const sectionRecords = readHwp5SectionRecords(c, sections, warnings);
|
|
2819
2819
|
const sectionDetects = sectionRecords.map((r) => r ? detectHwp5SectionPages(r) : null);
|
|
2820
2820
|
const sectionTableIds = [];
|
|
@@ -2858,7 +2858,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2858
2858
|
parsedSections++;
|
|
2859
2859
|
_optionalChain([options, 'optionalAccess', _63 => _63.onProgress, 'optionalCall', _64 => _64(parsedSections, sections.length)]);
|
|
2860
2860
|
} catch (secErr) {
|
|
2861
|
-
if (secErr instanceof
|
|
2861
|
+
if (secErr instanceof _chunkT3JCWBOIcjs.KordocError) throw secErr;
|
|
2862
2862
|
warnings.push({ page: si + 1, message: `\uC139\uC158 ${si + 1} \uD30C\uC2F1 \uC2E4\uD328: ${secErr instanceof Error ? secErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "PARTIAL_PARSE" });
|
|
2863
2863
|
} finally {
|
|
2864
2864
|
pageBase += detect.pages;
|
|
@@ -2869,10 +2869,10 @@ function parseHwp5Document(buffer, options) {
|
|
|
2869
2869
|
}
|
|
2870
2870
|
const blocks = [...doc.headerBlocks, ...bodyBlocks, ...doc.footerBlocks];
|
|
2871
2871
|
const images = cfb ? extractHwp5Images(cfb.FileIndex, blocks, warnings, !pageFilter, encrypted ? findStream : void 0) : extractHwp5ImagesLenient(lenientCfb, blocks, warnings, !pageFilter, encrypted ? findStream : void 0);
|
|
2872
|
-
let flatBlocks =
|
|
2873
|
-
if (_optionalChain([options, 'optionalAccess', _65 => _65.layoutTables]) !== "keep") flatBlocks =
|
|
2872
|
+
let flatBlocks = _chunkKVLIFFDJcjs.flattenLayoutTables.call(void 0, blocks);
|
|
2873
|
+
if (_optionalChain([options, 'optionalAccess', _65 => _65.layoutTables]) !== "keep") flatBlocks = _chunkKVLIFFDJcjs.unframeLayoutTables.call(void 0, flatBlocks, !!_optionalChain([options, 'optionalAccess', _66 => _66.keepTrailingEmptyCols]));
|
|
2874
2874
|
if (_optionalChain([options, 'optionalAccess', _67 => _67.dedupeRunningHeaders])) {
|
|
2875
|
-
const deduped =
|
|
2875
|
+
const deduped = _chunkKVLIFFDJcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
|
|
2876
2876
|
const removed = flatBlocks.length - deduped.length;
|
|
2877
2877
|
if (removed > 0) warnings.push({ message: `\uBC18\uBCF5 \uB7EC\uB2DD \uD5E4\uB354 ${removed}\uAC1C \uC81C\uAC70`, code: "HIDDEN_TEXT_FILTERED" });
|
|
2878
2878
|
flatBlocks = deduped;
|
|
@@ -2881,7 +2881,7 @@ function parseHwp5Document(buffer, options) {
|
|
|
2881
2881
|
detectHwp5Headings(flatBlocks, docInfo, doc.tocTexts);
|
|
2882
2882
|
}
|
|
2883
2883
|
const outline = flatBlocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
|
|
2884
|
-
let markdown =
|
|
2884
|
+
let markdown = _chunkKVLIFFDJcjs.blocksToMarkdown.call(void 0, flatBlocks, { tableFormat: _optionalChain([options, 'optionalAccess', _68 => _68.tableFormat]) });
|
|
2885
2885
|
if (_optionalChain([options, 'optionalAccess', _69 => _69.inlineImages]) && options.images !== false && images.length > 0) {
|
|
2886
2886
|
try {
|
|
2887
2887
|
markdown = _chunk6NZ32OTXcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
|
|
@@ -2949,9 +2949,9 @@ function detectHwp5Headings(blocks, docInfo, tocTexts) {
|
|
|
2949
2949
|
let level = 0;
|
|
2950
2950
|
if (_optionalChain([block, 'access', _76 => _76.style, 'optionalAccess', _77 => _77.fontSize]) && baseFontSize > 0) {
|
|
2951
2951
|
const ratio = block.style.fontSize / baseFontSize;
|
|
2952
|
-
if (ratio >=
|
|
2953
|
-
else if (ratio >=
|
|
2954
|
-
else if (ratio >=
|
|
2952
|
+
if (ratio >= _chunkKVLIFFDJcjs.HEADING_RATIO_H1) level = 1;
|
|
2953
|
+
else if (ratio >= _chunkKVLIFFDJcjs.HEADING_RATIO_H2) level = 2;
|
|
2954
|
+
else if (ratio >= _chunkKVLIFFDJcjs.HEADING_RATIO_H3) level = 3;
|
|
2955
2955
|
}
|
|
2956
2956
|
if (/^제\d+[장절편]\s/.test(text) && text.length <= 50) {
|
|
2957
2957
|
if (level === 0) level = 2;
|
|
@@ -3084,7 +3084,7 @@ function findSectionsLenient(lcfb) {
|
|
|
3084
3084
|
const raw = _nullishCoalesce(lcfb.findStream(`/BodyText/Section${i}`), () => ( lcfb.findStream(`Section${i}`)));
|
|
3085
3085
|
if (!raw) break;
|
|
3086
3086
|
totalBytes += raw.length;
|
|
3087
|
-
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3087
|
+
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkT3JCWBOIcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3088
3088
|
sections.push({ idx: i, content: raw });
|
|
3089
3089
|
}
|
|
3090
3090
|
if (sections.length === 0) {
|
|
@@ -3095,7 +3095,7 @@ function findSectionsLenient(lcfb) {
|
|
|
3095
3095
|
const raw = lcfb.findStream(e.name);
|
|
3096
3096
|
if (raw) {
|
|
3097
3097
|
totalBytes += raw.length;
|
|
3098
|
-
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3098
|
+
if (totalBytes > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkT3JCWBOIcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3099
3099
|
sections.push({ idx, content: raw });
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
@@ -3112,7 +3112,7 @@ function findViewTextSectionsLenient(lcfb, compressed) {
|
|
|
3112
3112
|
try {
|
|
3113
3113
|
const content = decryptViewText(raw, compressed);
|
|
3114
3114
|
totalDecompressed += content.length;
|
|
3115
|
-
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0,
|
|
3115
|
+
if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkT3JCWBOIcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
|
|
3116
3116
|
sections.push({ idx: i, content });
|
|
3117
3117
|
} catch (e16) {
|
|
3118
3118
|
break;
|
|
@@ -4352,7 +4352,7 @@ function otherControlXml(id, node, ctx) {
|
|
|
4352
4352
|
["charSz", size],
|
|
4353
4353
|
["composeType", expansion ? "OVERLAP" : "SPREAD"],
|
|
4354
4354
|
["charPrCnt", ids.length],
|
|
4355
|
-
["composeText", circle ?
|
|
4355
|
+
["composeText", circle ? _chunkKVLIFFDJcjs.composeDigits.call(void 0, text) : text]
|
|
4356
4356
|
],
|
|
4357
4357
|
ids.map((i) => el("hp:charPr", [["prIDRef", i]])).join("")
|
|
4358
4358
|
) };
|
|
@@ -5260,7 +5260,7 @@ async function hwpToHwpx(input, options) {
|
|
|
5260
5260
|
["os", 1],
|
|
5261
5261
|
["xmlVersion", "1.5"],
|
|
5262
5262
|
["application", "kordoc"],
|
|
5263
|
-
["appVersion",
|
|
5263
|
+
["appVersion", _chunkT3JCWBOIcjs.VERSION]
|
|
5264
5264
|
]),
|
|
5265
5265
|
{ compression: "STORE" }
|
|
5266
5266
|
);
|
|
@@ -5340,20 +5340,20 @@ async function convertToHwpx(input, options) {
|
|
|
5340
5340
|
const { detectFormat } = await Promise.resolve().then(() => _interopRequireWildcard(require("./detect-V75ERMYL.cjs")));
|
|
5341
5341
|
const format = detectFormat(ab);
|
|
5342
5342
|
if (format === "hwpx") return { data: bytes, mode: "preserve", engine: "kordoc", warnings: ["\uC774\uBBF8 HWPX \uBB38\uC11C\uC785\uB2C8\uB2E4 \u2014 \uADF8\uB300\uB85C \uB461\uB2C8\uB2E4"] };
|
|
5343
|
-
if (format !== "hwp" && format !== "hwp3" && format !== "hwpml") throw new (0,
|
|
5343
|
+
if (format !== "hwp" && format !== "hwp3" && format !== "hwpml") throw new (0, _chunkT3JCWBOIcjs.KordocError)(`HWP \uBB38\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4 (${format})`);
|
|
5344
5344
|
const engine = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _159 => _159.engine]), () => ( "kordoc"));
|
|
5345
5345
|
if (engine !== "kordoc") {
|
|
5346
|
-
const { hancomAvailable, hwpToHwpxViaHancom } = await Promise.resolve().then(() => _interopRequireWildcard(require("./hancom-
|
|
5346
|
+
const { hancomAvailable, hwpToHwpxViaHancom } = await Promise.resolve().then(() => _interopRequireWildcard(require("./hancom-QSZ33R47.cjs")));
|
|
5347
5347
|
if (engine === "hancom" || !_optionalChain([options, 'optionalAccess', _160 => _160.password]) && hancomAvailable()) {
|
|
5348
|
-
if (_optionalChain([options, 'optionalAccess', _161 => _161.password])) throw new (0,
|
|
5348
|
+
if (_optionalChain([options, 'optionalAccess', _161 => _161.password])) throw new (0, _chunkT3JCWBOIcjs.KordocError)('\uD55C/\uAE00 \uC800\uC7A5 \uBCC0\uD658\uC740 \uC5F4\uAE30 \uC554\uD638\uB97C \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 engine "kordoc" \uC73C\uB85C \uBC14\uAFB8\uC138\uC694');
|
|
5349
5349
|
return { data: hwpToHwpxViaHancom(bytes, format === "hwpml" ? "hml" : "hwp"), mode: "preserve", engine: "hancom", warnings: [] };
|
|
5350
5350
|
}
|
|
5351
5351
|
}
|
|
5352
5352
|
if (format === "hwp") return { data: await hwpToHwpx(bytes, options), mode: "preserve", engine: "kordoc", warnings: [] };
|
|
5353
5353
|
const { parse } = await Promise.resolve().then(() => _interopRequireWildcard(require("./index.cjs")));
|
|
5354
|
-
const { markdownToHwpx } = await Promise.resolve().then(() => _interopRequireWildcard(require("./generator-
|
|
5354
|
+
const { markdownToHwpx } = await Promise.resolve().then(() => _interopRequireWildcard(require("./generator-AUHRYGI3.cjs")));
|
|
5355
5355
|
const parsed = await parse(ab, { password: _optionalChain([options, 'optionalAccess', _162 => _162.password]) });
|
|
5356
|
-
if (!parsed.success) throw new (0,
|
|
5356
|
+
if (!parsed.success) throw new (0, _chunkT3JCWBOIcjs.KordocError)(_nullishCoalesce(parsed.error, () => ( "\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4")));
|
|
5357
5357
|
return {
|
|
5358
5358
|
data: new Uint8Array(await markdownToHwpx(parsed.markdown)),
|
|
5359
5359
|
mode: "content",
|
|
@@ -5414,4 +5414,4 @@ async function convertToHwpx(input, options) {
|
|
|
5414
5414
|
|
|
5415
5415
|
|
|
5416
5416
|
exports.locateMemoBlocks = locateMemoBlocks; exports.memosMarkdown = memosMarkdown; exports.TAG_PARA_HEADER = TAG_PARA_HEADER; exports.TAG_PARA_TEXT = TAG_PARA_TEXT; exports.TAG_CHAR_SHAPE = TAG_CHAR_SHAPE; exports.TAG_PARA_LINE_SEG = TAG_PARA_LINE_SEG; exports.TAG_CTRL_HEADER = TAG_CTRL_HEADER; exports.TAG_LIST_HEADER = TAG_LIST_HEADER; exports.TAG_TABLE = TAG_TABLE; exports.TAG_SHAPE_COMPONENT = TAG_SHAPE_COMPONENT; exports.TAG_SHAPE_COMPONENT_PICTURE = TAG_SHAPE_COMPONENT_PICTURE; exports.TAG_ID_MAPPINGS = TAG_ID_MAPPINGS; exports.TAG_FACE_NAME = TAG_FACE_NAME; exports.TAG_DOC_CHAR_SHAPE = TAG_DOC_CHAR_SHAPE; exports.TAG_DOC_PARA_SHAPE = TAG_DOC_PARA_SHAPE; exports.FLAG_COMPRESSED = FLAG_COMPRESSED; exports.FLAG_ENCRYPTED = FLAG_ENCRYPTED; exports.FLAG_DISTRIBUTION = FLAG_DISTRIBUTION; exports.FLAG_DRM = FLAG_DRM; exports.FLAG_TRACK_CHANGES = FLAG_TRACK_CHANGES; exports.readRecords = readRecords; exports.decompressStream = decompressStream; exports.parseFileHeader = parseFileHeader; exports.fileTimeText = fileTimeText; exports.parseDocInfo = parseDocInfo; exports.createParaTextState = createParaTextState; exports.isExtendedOnlyCtrlChar = isExtendedOnlyCtrlChar; exports.appendParaText = appendParaText; exports.detectImageMime = detectImageMime; exports.resolveImageBlocks = resolveImageBlocks; exports.indexHwp5Tables = indexHwp5Tables; exports.formatNumber = formatNumber; exports.hwpEquationToLatex = hwpEquationToLatex; exports.INLINE_TABLE_MARK = INLINE_TABLE_MARK; exports.emitParagraphBlocks = emitParagraphBlocks; exports.blocksPlainText = blocksPlainText; exports.cellTextFromBlocks = cellTextFromBlocks; exports.buildAddressedTable = buildAddressedTable; exports.unfilledClickHereGuide = unfilledClickHereGuide; exports.isClickHereGuideText = isClickHereGuideText; exports.hasRealStrike = hasRealStrike; exports.hasRealUnderline = hasRealUnderline; exports.openHwp5Container = openHwp5Container; exports.readHwp5DocInfoRecords = readHwp5DocInfoRecords; exports.readHwp5SectionStreams = readHwp5SectionStreams; exports.readHwp5SectionRecords = readHwp5SectionRecords; exports.readHwp5BinData = readHwp5BinData; exports.parseHwp5Document = parseHwp5Document; exports.hwpToHwpx = hwpToHwpx; exports.convertToHwpx = convertToHwpx;
|
|
5417
|
-
//# sourceMappingURL=chunk-
|
|
5417
|
+
//# sourceMappingURL=chunk-LKH3LG3N.cjs.map
|