kordoc 4.21.21 → 4.21.22
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 +5 -4
- package/dist/{-ZYF6HX4M.js → -PLOEMNCA.js} +11 -11
- package/dist/{chunk-RBRHO7WL.js → chunk-3BJW5KXR.js} +2 -2
- package/dist/{chunk-FBJVDBMO.js → chunk-64MCJ5GC.js} +2 -2
- package/dist/{chunk-BC54LBST.js → chunk-64V65GZM.js} +3 -3
- package/dist/{chunk-QHNVH4TC.js → chunk-6LJ22335.js} +6 -6
- package/dist/{chunk-TRO4CQHJ.js → chunk-6Z4NAN36.js} +4 -4
- package/dist/{chunk-PTF4NCFM.js → chunk-7MIA3IFO.js} +2 -2
- package/dist/{chunk-7YAJCXCD.js → chunk-7TLZ56ZK.js} +2 -2
- package/dist/{chunk-ZZIQWSGC.js → chunk-BMQATDUY.js} +2 -2
- package/dist/{chunk-YHPJTLCA.js → chunk-BZC24YXS.js} +2 -2
- package/dist/{chunk-J5PBI3ZC.js → chunk-EL7BGP7X.js} +3 -3
- package/dist/{chunk-5HTFWUJE.js → chunk-G4DVIZTZ.js} +2 -2
- package/dist/{chunk-YQZOPT3A.js → chunk-GYQGKVTQ.js} +5 -5
- package/dist/{chunk-YQZOPT3A.js.map → chunk-GYQGKVTQ.js.map} +1 -1
- package/dist/{chunk-T7PN5D4D.cjs → chunk-H5Q6J2MB.cjs} +6 -6
- package/dist/{chunk-T7PN5D4D.cjs.map → chunk-H5Q6J2MB.cjs.map} +1 -1
- package/dist/{chunk-HWIW3WK2.js → chunk-H6EXISSP.js} +3 -3
- package/dist/{chunk-H2MS4VG3.cjs → chunk-HY5O4B6O.cjs} +3 -3
- package/dist/{chunk-H2MS4VG3.cjs.map → chunk-HY5O4B6O.cjs.map} +1 -1
- package/dist/{chunk-BG6LUCQL.js → chunk-K7FP2VOU.js} +2 -2
- package/dist/{chunk-KTLHADU4.js → chunk-KFJP2HYL.js} +2 -2
- package/dist/{chunk-DTZIZ5PP.cjs → chunk-LNKHTD47.cjs} +13 -13
- package/dist/{chunk-DTZIZ5PP.cjs.map → chunk-LNKHTD47.cjs.map} +1 -1
- package/dist/{chunk-2ZGP7A5T.js → chunk-LZVOL2H2.js} +2 -2
- package/dist/{chunk-CY4QM2KQ.js → chunk-M5SPGZKY.js} +2 -2
- package/dist/{chunk-YM3K3LCD.js → chunk-NT4LPP2I.js} +10 -10
- package/dist/{chunk-T3DTTK23.js → chunk-PQW2RPZZ.js} +2 -2
- package/dist/{chunk-3TCF5HPP.js → chunk-PY72S2AG.js} +2 -2
- package/dist/{chunk-MCUX2Y2C.cjs → chunk-QSOWCFOV.cjs} +2 -2
- package/dist/{chunk-MCUX2Y2C.cjs.map → chunk-QSOWCFOV.cjs.map} +1 -1
- package/dist/{chunk-57VNFMMS.cjs → chunk-QY627PK3.cjs} +3 -3
- package/dist/{chunk-57VNFMMS.cjs.map → chunk-QY627PK3.cjs.map} +1 -1
- package/dist/{chunk-KBV4WFZ6.js → chunk-SQSGBKCL.js} +4 -4
- package/dist/{chunk-KBV4WFZ6.js.map → chunk-SQSGBKCL.js.map} +1 -1
- package/dist/{chunk-TMUUDMDH.cjs → chunk-SZM6BSK4.cjs} +23 -23
- package/dist/{chunk-TMUUDMDH.cjs.map → chunk-SZM6BSK4.cjs.map} +1 -1
- package/dist/{chunk-WGMYVRSA.js → chunk-VUSPHKQ6.js} +2 -2
- package/dist/{chunk-FZMGF6XU.js → chunk-ZQZDGIN4.js} +2 -2
- package/dist/chunks-YV22WKEN.js +10 -0
- package/dist/cli.js +30 -30
- package/dist/{formula-P7M7IH2L.js → formula-I7GNHDP4.js} +4 -4
- package/dist/{formula-6XNIXZ5L.js → formula-L4ISZCZ7.js} +3 -3
- package/dist/{formula-A3I5VAP7.cjs → formula-LDXFM42U.cjs} +9 -9
- package/dist/{formula-A3I5VAP7.cjs.map → formula-LDXFM42U.cjs.map} +1 -1
- package/dist/{image-ocr-3C6W3KZO.js → image-ocr-BSAPJIFP.js} +6 -6
- package/dist/{image-ocr-ITNY454I.js → image-ocr-I7IVLLPD.js} +9 -9
- package/dist/{image-ocr-UJRSQ2T3.cjs → image-ocr-NCKZ4EOH.cjs} +15 -15
- package/dist/{image-ocr-UJRSQ2T3.cjs.map → image-ocr-NCKZ4EOH.cjs.map} +1 -1
- package/dist/index.cjs +276 -276
- package/dist/index.js +5 -5
- package/dist/mcp.js +22 -22
- package/dist/{model-bundle-LAWQH75O.js → model-bundle-M3GRBX2A.js} +5 -5
- package/dist/{models-6QTD2CFM.js → models-5RXMJK6N.js} +5 -5
- package/dist/{parse-worker-v2-FEPJG3ER.js → parse-worker-v2-72KKZMDO.js} +12 -12
- package/dist/{parser-56I364YM.js → parser-AHSXHMAF.js} +8 -8
- package/dist/{parser-KFCY3NIN.js → parser-QLNX2EFP.js} +11 -11
- package/dist/{parser-VKWUMUML.cjs → parser-XQL37S4F.cjs} +136 -136
- package/dist/{parser-VKWUMUML.cjs.map → parser-XQL37S4F.cjs.map} +1 -1
- package/dist/pdf-ocr-CR4W75XF.js +22 -0
- package/dist/pdf-ocr-FL32Z4MB.js +18 -0
- package/dist/pdf-ocr-V42HOZKB.cjs +19 -0
- package/dist/{pdf-ocr-OKAHNEJA.cjs.map → pdf-ocr-V42HOZKB.cjs.map} +1 -1
- package/dist/{profile-io-OCITHUQF.js → profile-io-FTGHBFAH.js} +3 -3
- package/dist/{rasterize-SFCG4YOI.js → rasterize-346O4XV4.js} +3 -3
- package/dist/{redact-doc-5SMPXIGG.js → redact-doc-O6UVSWKP.js} +11 -11
- package/dist/{render-FGPG5A2N.js → render-CUR3VCK5.js} +7 -7
- package/dist/seal-QUUK6RBL.js +10 -0
- package/dist/{setup-JQVYZO7I.js → setup-6EA7CJZU.js} +3 -3
- package/dist/visual-EMOEYBC4.js +20 -0
- package/dist/{watch-C77BUSP7.js → watch-EQRSWNAQ.js} +12 -12
- package/package.json +1 -1
- package/dist/chunks-MDMJRCJ7.js +0 -10
- package/dist/pdf-ocr-MME37BL4.js +0 -18
- package/dist/pdf-ocr-OKAHNEJA.cjs +0 -19
- package/dist/pdf-ocr-ZZ6AJL6Z.js +0 -22
- package/dist/seal-GA7NZDTG.js +0 -10
- package/dist/visual-YMG644YW.js +0 -20
- /package/dist/{-ZYF6HX4M.js.map → -PLOEMNCA.js.map} +0 -0
- /package/dist/{chunk-RBRHO7WL.js.map → chunk-3BJW5KXR.js.map} +0 -0
- /package/dist/{chunk-FBJVDBMO.js.map → chunk-64MCJ5GC.js.map} +0 -0
- /package/dist/{chunk-BC54LBST.js.map → chunk-64V65GZM.js.map} +0 -0
- /package/dist/{chunk-QHNVH4TC.js.map → chunk-6LJ22335.js.map} +0 -0
- /package/dist/{chunk-TRO4CQHJ.js.map → chunk-6Z4NAN36.js.map} +0 -0
- /package/dist/{chunk-PTF4NCFM.js.map → chunk-7MIA3IFO.js.map} +0 -0
- /package/dist/{chunk-7YAJCXCD.js.map → chunk-7TLZ56ZK.js.map} +0 -0
- /package/dist/{chunk-ZZIQWSGC.js.map → chunk-BMQATDUY.js.map} +0 -0
- /package/dist/{chunk-YHPJTLCA.js.map → chunk-BZC24YXS.js.map} +0 -0
- /package/dist/{chunk-J5PBI3ZC.js.map → chunk-EL7BGP7X.js.map} +0 -0
- /package/dist/{chunk-5HTFWUJE.js.map → chunk-G4DVIZTZ.js.map} +0 -0
- /package/dist/{chunk-HWIW3WK2.js.map → chunk-H6EXISSP.js.map} +0 -0
- /package/dist/{chunk-BG6LUCQL.js.map → chunk-K7FP2VOU.js.map} +0 -0
- /package/dist/{chunk-KTLHADU4.js.map → chunk-KFJP2HYL.js.map} +0 -0
- /package/dist/{chunk-2ZGP7A5T.js.map → chunk-LZVOL2H2.js.map} +0 -0
- /package/dist/{chunk-CY4QM2KQ.js.map → chunk-M5SPGZKY.js.map} +0 -0
- /package/dist/{chunk-YM3K3LCD.js.map → chunk-NT4LPP2I.js.map} +0 -0
- /package/dist/{chunk-T3DTTK23.js.map → chunk-PQW2RPZZ.js.map} +0 -0
- /package/dist/{chunk-3TCF5HPP.js.map → chunk-PY72S2AG.js.map} +0 -0
- /package/dist/{chunk-WGMYVRSA.js.map → chunk-VUSPHKQ6.js.map} +0 -0
- /package/dist/{chunk-FZMGF6XU.js.map → chunk-ZQZDGIN4.js.map} +0 -0
- /package/dist/{chunks-MDMJRCJ7.js.map → chunks-YV22WKEN.js.map} +0 -0
- /package/dist/{formula-P7M7IH2L.js.map → formula-I7GNHDP4.js.map} +0 -0
- /package/dist/{formula-6XNIXZ5L.js.map → formula-L4ISZCZ7.js.map} +0 -0
- /package/dist/{image-ocr-3C6W3KZO.js.map → image-ocr-BSAPJIFP.js.map} +0 -0
- /package/dist/{image-ocr-ITNY454I.js.map → image-ocr-I7IVLLPD.js.map} +0 -0
- /package/dist/{model-bundle-LAWQH75O.js.map → model-bundle-M3GRBX2A.js.map} +0 -0
- /package/dist/{models-6QTD2CFM.js.map → models-5RXMJK6N.js.map} +0 -0
- /package/dist/{parse-worker-v2-FEPJG3ER.js.map → parse-worker-v2-72KKZMDO.js.map} +0 -0
- /package/dist/{parser-56I364YM.js.map → parser-AHSXHMAF.js.map} +0 -0
- /package/dist/{parser-KFCY3NIN.js.map → parser-QLNX2EFP.js.map} +0 -0
- /package/dist/{pdf-ocr-MME37BL4.js.map → pdf-ocr-CR4W75XF.js.map} +0 -0
- /package/dist/{pdf-ocr-ZZ6AJL6Z.js.map → pdf-ocr-FL32Z4MB.js.map} +0 -0
- /package/dist/{profile-io-OCITHUQF.js.map → profile-io-FTGHBFAH.js.map} +0 -0
- /package/dist/{rasterize-SFCG4YOI.js.map → rasterize-346O4XV4.js.map} +0 -0
- /package/dist/{redact-doc-5SMPXIGG.js.map → redact-doc-O6UVSWKP.js.map} +0 -0
- /package/dist/{render-FGPG5A2N.js.map → render-CUR3VCK5.js.map} +0 -0
- /package/dist/{seal-GA7NZDTG.js.map → seal-QUUK6RBL.js.map} +0 -0
- /package/dist/{setup-JQVYZO7I.js.map → setup-6EA7CJZU.js.map} +0 -0
- /package/dist/{visual-YMG644YW.js.map → visual-EMOEYBC4.js.map} +0 -0
- /package/dist/{watch-C77BUSP7.js.map → watch-EQRSWNAQ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToPages,
|
|
3
3
|
inlineImagesIntoMarkdown
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PQW2RPZZ.js";
|
|
5
5
|
import {
|
|
6
6
|
parsePageRange
|
|
7
7
|
} from "./chunk-V4BH5SRQ.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
tidyScriptTags,
|
|
33
33
|
unframeLayoutTables,
|
|
34
34
|
wrapScript
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KFJP2HYL.js";
|
|
36
36
|
import {
|
|
37
37
|
KordocError,
|
|
38
38
|
OPTIONAL_DEP_INSTALL_HINT,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
toArrayBuffer,
|
|
51
51
|
unescapeHtml,
|
|
52
52
|
unzipLimitBytes
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-BMQATDUY.js";
|
|
54
54
|
|
|
55
55
|
// src/plain-markdown.ts
|
|
56
56
|
function toPlainMarkdown(md2) {
|
|
@@ -42688,7 +42688,7 @@ function scriptsOff(r, off) {
|
|
|
42688
42688
|
}
|
|
42689
42689
|
async function parseImage(buffer, options) {
|
|
42690
42690
|
try {
|
|
42691
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
42691
|
+
const { parseImageDocument } = await import("./image-ocr-BSAPJIFP.js");
|
|
42692
42692
|
const { blocks, warnings } = await parseImageDocument(buffer, options);
|
|
42693
42693
|
stripScriptTags({ blocks });
|
|
42694
42694
|
return {
|
|
@@ -42748,7 +42748,7 @@ async function parseHwp(buffer, options) {
|
|
|
42748
42748
|
async function parsePdf(buffer, options) {
|
|
42749
42749
|
let parsePdfDocument;
|
|
42750
42750
|
try {
|
|
42751
|
-
const mod = await import("./parser-
|
|
42751
|
+
const mod = await import("./parser-AHSXHMAF.js");
|
|
42752
42752
|
parsePdfDocument = mod.parsePdfDocument;
|
|
42753
42753
|
} catch {
|
|
42754
42754
|
return {
|
package/dist/mcp.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
assertWithinRoot,
|
|
4
4
|
getAccessRoot,
|
|
5
5
|
isOfflineMode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M5SPGZKY.js";
|
|
7
7
|
import {
|
|
8
8
|
APPROVAL_MAX,
|
|
9
9
|
BODY_FONTS,
|
|
@@ -45,25 +45,25 @@ import {
|
|
|
45
45
|
resolveBuiltinTemplate,
|
|
46
46
|
unknownFontWarnings,
|
|
47
47
|
usesGaejosikMunche
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-NT4LPP2I.js";
|
|
49
|
+
import "./chunk-LZVOL2H2.js";
|
|
50
|
+
import "./chunk-H6EXISSP.js";
|
|
51
51
|
import "./chunk-3WSNLH4B.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-7TLZ56ZK.js";
|
|
53
53
|
import {
|
|
54
54
|
detectFormat,
|
|
55
55
|
detectOle2Format,
|
|
56
56
|
detectZipFormat,
|
|
57
57
|
extractHwp5MetadataOnly
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-6LJ22335.js";
|
|
59
59
|
import "./chunk-7FCNOKOR.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-7MIA3IFO.js";
|
|
61
61
|
import "./chunk-VQFA55IC.js";
|
|
62
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-K7FP2VOU.js";
|
|
63
63
|
import {
|
|
64
64
|
blocksToMarkdown
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-3BJW5KXR.js";
|
|
66
|
+
import "./chunk-BZC24YXS.js";
|
|
67
67
|
import {
|
|
68
68
|
KordocError,
|
|
69
69
|
VERSION,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
routeConsoleToStderr,
|
|
72
72
|
sanitizeError,
|
|
73
73
|
toArrayBuffer
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-ZQZDGIN4.js";
|
|
75
75
|
|
|
76
76
|
// src/mcp.ts
|
|
77
77
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -358,7 +358,7 @@ ${markdown}`);
|
|
|
358
358
|
break;
|
|
359
359
|
case "pdf":
|
|
360
360
|
try {
|
|
361
|
-
const { extractPdfMetadataOnly } = await import("./parser-
|
|
361
|
+
const { extractPdfMetadataOnly } = await import("./parser-QLNX2EFP.js");
|
|
362
362
|
metadata = await extractPdfMetadataOnly(buffer);
|
|
363
363
|
} catch {
|
|
364
364
|
metadata = void 0;
|
|
@@ -535,7 +535,7 @@ ${tableMarkdown}` }]
|
|
|
535
535
|
if (!parsed.success) {
|
|
536
536
|
return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
|
|
537
537
|
}
|
|
538
|
-
const { blocksToChunks } = await import("./chunks-
|
|
538
|
+
const { blocksToChunks } = await import("./chunks-YV22WKEN.js");
|
|
539
539
|
const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
|
|
540
540
|
return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
|
|
541
541
|
} catch (err) {
|
|
@@ -805,7 +805,7 @@ ${previewMd}` }]
|
|
|
805
805
|
}
|
|
806
806
|
const image = new Uint8Array(await readFile2(imgResolved));
|
|
807
807
|
const ext = extname2(imgResolved).slice(1).toLowerCase();
|
|
808
|
-
const { placeSealHwpx } = await import("./seal-
|
|
808
|
+
const { placeSealHwpx } = await import("./seal-QUUK6RBL.js");
|
|
809
809
|
const result = await placeSealHwpx(buffer, [{
|
|
810
810
|
anchor,
|
|
811
811
|
occurrence,
|
|
@@ -922,7 +922,7 @@ ${previewMd}` }]
|
|
|
922
922
|
if (outPath && await isSameFile(outPath, resolved)) {
|
|
923
923
|
return { content: [{ type: "text", text: "output_path\uAC00 \uC785\uB825 \uD30C\uC77C\uACFC \uAC19\uC2B5\uB2C8\uB2E4 \u2014 \uC6D0\uBCF8\uC744 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694." }], isError: true };
|
|
924
924
|
}
|
|
925
|
-
const { redactDocument } = await import("./redact-doc-
|
|
925
|
+
const { redactDocument } = await import("./redact-doc-O6UVSWKP.js");
|
|
926
926
|
const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
|
|
927
927
|
const MAX_LINES = 50;
|
|
928
928
|
const listed = r.fileHits.length > 0 ? r.fileHits.map((h) => ` - [${h.rule}] ${h.masked} (${h.where} @ ${h.part})`) : r.markdownHits.map((h) => ` - [${h.rule}] ${h.masked}`);
|
|
@@ -996,7 +996,7 @@ function registerRenderTools(server2) {
|
|
|
996
996
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
997
997
|
const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
|
|
998
998
|
if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
|
|
999
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
999
|
+
const { renderHwpxToSvg } = await import("./render-CUR3VCK5.js");
|
|
1000
1000
|
const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode });
|
|
1001
1001
|
const summary2 = [
|
|
1002
1002
|
`\uB80C\uB354 \uC644\uB8CC: ${result.pageCount}\uD398\uC774\uC9C0, ${Math.round(result.width)}x${Math.round(result.height)}pt (\uD14D\uC2A4\uD2B8 ${result.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${result.stats.images}\xB7\uD45C ${result.stats.tables})`,
|
|
@@ -1008,7 +1008,7 @@ function registerRenderTools(server2) {
|
|
|
1008
1008
|
summary2.push(`\uC800\uC7A5: ${outPath}`);
|
|
1009
1009
|
return { content: [{ type: "text", text: summary2.join("\n") }] };
|
|
1010
1010
|
}
|
|
1011
|
-
const { rasterizeSvg } = await import("./rasterize-
|
|
1011
|
+
const { rasterizeSvg } = await import("./rasterize-346O4XV4.js");
|
|
1012
1012
|
const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
|
|
1013
1013
|
if (outPath) {
|
|
1014
1014
|
await mkdir2(dirname3(outPath), { recursive: true });
|
|
@@ -1023,7 +1023,7 @@ function registerRenderTools(server2) {
|
|
|
1023
1023
|
]
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
-
const { renderDocument } = await import("./render-
|
|
1026
|
+
const { renderDocument } = await import("./render-CUR3VCK5.js");
|
|
1027
1027
|
const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px });
|
|
1028
1028
|
const summary = [
|
|
1029
1029
|
`\uB80C\uB354 \uC644\uB8CC: \uBB38\uC11C ${scene.pages.length}\uD398\uC774\uC9C0 \uC911 ${assets.filter((a) => a.page !== void 0).length || 1}\uAC74 (\uD14D\uC2A4\uD2B8 ${scene.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${scene.stats.images}\xB7\uD45C ${scene.stats.tables}\xB7\uB3C4\uD615 ${scene.stats.shapes})`,
|
|
@@ -1073,7 +1073,7 @@ function registerRenderTools(server2) {
|
|
|
1073
1073
|
try {
|
|
1074
1074
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1075
1075
|
const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
|
|
1076
|
-
const { extractRenderedRegions } = await import("./render-
|
|
1076
|
+
const { extractRenderedRegions } = await import("./render-CUR3VCK5.js");
|
|
1077
1077
|
const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
|
|
1078
1078
|
await mkdir2(dir, { recursive: true });
|
|
1079
1079
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1109,7 +1109,7 @@ function registerRenderTools(server2) {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1111
1111
|
const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
|
|
1112
|
-
const { extractTables } = await import("./visual-
|
|
1112
|
+
const { extractTables } = await import("./visual-EMOEYBC4.js");
|
|
1113
1113
|
const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
|
|
1114
1114
|
if (dir) await mkdir2(dir, { recursive: true });
|
|
1115
1115
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1166,7 +1166,7 @@ function registerGenerateTools(server2) {
|
|
|
1166
1166
|
try {
|
|
1167
1167
|
const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
|
|
1168
1168
|
const { buffer } = await readValidatedFile(hwpx_path);
|
|
1169
|
-
const { hwpxToProfile } = await import("./-
|
|
1169
|
+
const { hwpxToProfile } = await import("./-PLOEMNCA.js");
|
|
1170
1170
|
const profile = await hwpxToProfile(buffer);
|
|
1171
1171
|
await mkdir3(dirname4(out), { recursive: true });
|
|
1172
1172
|
await writeOutputFile(out, JSON.stringify(profile, null, 2));
|
|
@@ -1278,7 +1278,7 @@ function registerGenerateTools(server2) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
let profile;
|
|
1280
1280
|
if (profile_path) {
|
|
1281
|
-
const { parseFormatProfileJson } = await import("./profile-io-
|
|
1281
|
+
const { parseFormatProfileJson } = await import("./profile-io-FTGHBFAH.js");
|
|
1282
1282
|
profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
|
|
1283
1283
|
}
|
|
1284
1284
|
const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ALL_OCR_MODELS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VUSPHKQ6.js";
|
|
5
5
|
import {
|
|
6
6
|
ALL_FORMULA_MODELS,
|
|
7
7
|
getModelStatusIn,
|
|
8
8
|
getModelsDir
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-PY72S2AG.js";
|
|
10
|
+
import "./chunk-M5SPGZKY.js";
|
|
11
|
+
import "./chunk-ZQZDGIN4.js";
|
|
12
12
|
|
|
13
13
|
// src/shared/model-bundle.ts
|
|
14
14
|
import { copyFile, mkdir } from "fs/promises";
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
importModels,
|
|
102
102
|
modelCacheStatus
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=model-bundle-
|
|
104
|
+
//# sourceMappingURL=model-bundle-M3GRBX2A.js.map
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
ocrModelPath,
|
|
11
11
|
ocrModelsCached,
|
|
12
12
|
parseCharacterDict
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-VUSPHKQ6.js";
|
|
14
|
+
import "./chunk-PY72S2AG.js";
|
|
15
|
+
import "./chunk-M5SPGZKY.js";
|
|
16
|
+
import "./chunk-ZQZDGIN4.js";
|
|
17
17
|
export {
|
|
18
18
|
ALL_OCR_MODELS,
|
|
19
19
|
OCR_DET_MODEL,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
ocrModelsCached,
|
|
27
27
|
parseCharacterDict
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=models-
|
|
29
|
+
//# sourceMappingURL=models-5RXMJK6N.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
parseWorkerFile
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-64V65GZM.js";
|
|
5
|
+
import "./chunk-NT4LPP2I.js";
|
|
6
|
+
import "./chunk-LZVOL2H2.js";
|
|
7
|
+
import "./chunk-H6EXISSP.js";
|
|
8
8
|
import "./chunk-3WSNLH4B.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-7TLZ56ZK.js";
|
|
10
|
+
import "./chunk-6LJ22335.js";
|
|
11
11
|
import "./chunk-7FCNOKOR.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7MIA3IFO.js";
|
|
13
13
|
import "./chunk-VQFA55IC.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-K7FP2VOU.js";
|
|
15
|
+
import "./chunk-3BJW5KXR.js";
|
|
16
|
+
import "./chunk-BZC24YXS.js";
|
|
17
17
|
import {
|
|
18
18
|
VERSION,
|
|
19
19
|
sanitizeError
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZQZDGIN4.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/parse-worker-v2.ts
|
|
23
23
|
import { createHash } from "crypto";
|
|
@@ -299,4 +299,4 @@ export {
|
|
|
299
299
|
runParseWorkerV2,
|
|
300
300
|
toParseOptions
|
|
301
301
|
};
|
|
302
|
-
//# sourceMappingURL=parse-worker-v2-
|
|
302
|
+
//# sourceMappingURL=parse-worker-v2-72KKZMDO.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToPages,
|
|
3
3
|
encodePng
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PQW2RPZZ.js";
|
|
5
5
|
import {
|
|
6
6
|
hasRequestedPagesAfter,
|
|
7
7
|
parsePageRange
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
stripAbsorbedRunningLines,
|
|
60
60
|
trimTrailingEmptyTableCols,
|
|
61
61
|
wrapJoiner
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-GYQGKVTQ.js";
|
|
63
63
|
import {
|
|
64
64
|
CELL_BASELINES,
|
|
65
65
|
CELL_EDGES,
|
|
@@ -72,12 +72,12 @@ import {
|
|
|
72
72
|
escapeLiteralTags,
|
|
73
73
|
stripScriptTags,
|
|
74
74
|
unframeLayoutTables
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-KFJP2HYL.js";
|
|
76
|
+
import "./chunk-64MCJ5GC.js";
|
|
77
77
|
import {
|
|
78
78
|
KordocError,
|
|
79
79
|
sanitizeHref
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-BMQATDUY.js";
|
|
81
81
|
|
|
82
82
|
// src/pdf/image-extract.ts
|
|
83
83
|
import { createHash } from "crypto";
|
|
@@ -3214,7 +3214,7 @@ function mergeLinkRuns(markdown) {
|
|
|
3214
3214
|
|
|
3215
3215
|
// src/pdf/formula-ocr.ts
|
|
3216
3216
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
3217
|
-
const formulaMod = await import("./formula-
|
|
3217
|
+
const formulaMod = await import("./formula-L4ISZCZ7.js");
|
|
3218
3218
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
3219
3219
|
await ensureFormulaModels((p) => {
|
|
3220
3220
|
if (p.phase === "download" && p.total) {
|
|
@@ -3637,7 +3637,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3637
3637
|
}
|
|
3638
3638
|
if (targets.size > 0) {
|
|
3639
3639
|
try {
|
|
3640
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
3640
|
+
const { runPdfOcr } = await import("./pdf-ocr-FL32Z4MB.js");
|
|
3641
3641
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
3642
3642
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
3643
3643
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
|
|
@@ -3883,4 +3883,4 @@ export {
|
|
|
3883
3883
|
parsePdfDocument,
|
|
3884
3884
|
removeHeaderFooterBlocks
|
|
3885
3885
|
};
|
|
3886
|
-
//# sourceMappingURL=parser-
|
|
3886
|
+
//# sourceMappingURL=parser-AHSXHMAF.js.map
|
|
@@ -51,15 +51,15 @@ import {
|
|
|
51
51
|
stripAbsorbedRunningLines,
|
|
52
52
|
trimTrailingEmptyTableCols,
|
|
53
53
|
wrapJoiner
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-SQSGBKCL.js";
|
|
55
55
|
import {
|
|
56
56
|
ocrModelsCached
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-VUSPHKQ6.js";
|
|
58
|
+
import "./chunk-PY72S2AG.js";
|
|
59
|
+
import "./chunk-M5SPGZKY.js";
|
|
60
60
|
import {
|
|
61
61
|
blocksToPages
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-LZVOL2H2.js";
|
|
63
63
|
import {
|
|
64
64
|
encodePng
|
|
65
65
|
} from "./chunk-7FCNOKOR.js";
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
escapeLiteralTags,
|
|
72
72
|
stripScriptTags,
|
|
73
73
|
unframeLayoutTables
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-7MIA3IFO.js";
|
|
75
75
|
import {
|
|
76
76
|
hasRequestedPagesAfter,
|
|
77
77
|
parsePageRange
|
|
@@ -81,11 +81,11 @@ import {
|
|
|
81
81
|
assignTableIds,
|
|
82
82
|
blocksToMarkdown,
|
|
83
83
|
escapeLiteralDollar
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-3BJW5KXR.js";
|
|
85
85
|
import {
|
|
86
86
|
KordocError,
|
|
87
87
|
sanitizeHref
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-ZQZDGIN4.js";
|
|
89
89
|
|
|
90
90
|
// src/pdf/image-extract.ts
|
|
91
91
|
import { createHash } from "crypto";
|
|
@@ -3222,7 +3222,7 @@ function mergeLinkRuns(markdown) {
|
|
|
3222
3222
|
|
|
3223
3223
|
// src/pdf/formula-ocr.ts
|
|
3224
3224
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
3225
|
-
const formulaMod = await import("./formula-
|
|
3225
|
+
const formulaMod = await import("./formula-I7GNHDP4.js");
|
|
3226
3226
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
3227
3227
|
await ensureFormulaModels((p) => {
|
|
3228
3228
|
if (p.phase === "download" && p.total) {
|
|
@@ -3645,7 +3645,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3645
3645
|
}
|
|
3646
3646
|
if (targets.size > 0) {
|
|
3647
3647
|
try {
|
|
3648
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
3648
|
+
const { runPdfOcr } = await import("./pdf-ocr-CR4W75XF.js");
|
|
3649
3649
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
3650
3650
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
3651
3651
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
|
|
@@ -3891,4 +3891,4 @@ export {
|
|
|
3891
3891
|
parsePdfDocument,
|
|
3892
3892
|
removeHeaderFooterBlocks
|
|
3893
3893
|
};
|
|
3894
|
-
//# sourceMappingURL=parser-
|
|
3894
|
+
//# sourceMappingURL=parser-QLNX2EFP.js.map
|