kordoc 4.24.7 → 4.24.9
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 +8 -9
- package/dist/{-GQDQXRQN.js → -6LXREJIR.js} +11 -11
- package/dist/{chunk-OMJPCWKS.js → chunk-2A54AIAG.js} +2 -2
- package/dist/{chunk-AYGMF6H5.cjs → chunk-2WWQ6NU5.cjs} +3 -3
- package/dist/chunk-2WWQ6NU5.cjs.map +1 -0
- package/dist/{chunk-7BZBMXWD.cjs → chunk-4BPHV36H.cjs} +6 -6
- package/dist/chunk-4BPHV36H.cjs.map +1 -0
- package/dist/{chunk-C4AY47C5.js → chunk-7NEBICPS.js} +2 -2
- package/dist/{chunk-7ICC55XY.js → chunk-A4TUSLGL.js} +2 -2
- package/dist/{chunk-FIS3WY5Q.js → chunk-BEPBXIKP.js} +2 -2
- package/dist/{chunk-E35YPWOX.js → chunk-C6QK3PY2.js} +2 -2
- package/dist/{chunk-MLFPEETP.js → chunk-D5S5S6OP.js} +2 -2
- package/dist/{chunk-JKZY6FX5.js → chunk-DF3YCAK6.js} +2 -2
- package/dist/{chunk-DZRXJEOF.js → chunk-EF4MEYFE.js} +3 -3
- package/dist/{chunk-ZQQGV7K2.js → chunk-ESSLFMY3.js} +6 -6
- package/dist/{chunk-BLWDQEBY.js → chunk-GINSLCL7.js} +2 -2
- package/dist/chunk-GS7T56RP.cjs.map +1 -1
- package/dist/chunk-J55UQC5H.cjs.map +1 -1
- package/dist/{chunk-WVZXPEHX.js → chunk-LVEY2XHM.js} +7 -5
- package/dist/chunk-LVEY2XHM.js.map +1 -0
- package/dist/{chunk-FQVWYJNM.js → chunk-MSPBBDR5.js} +2 -2
- package/dist/{chunk-EIGCAAVM.js → chunk-NDC4AGLX.js} +61 -16
- package/dist/chunk-NDC4AGLX.js.map +1 -0
- package/dist/{chunk-YQB3LPKQ.cjs → chunk-NSCYUL4P.cjs} +2 -2
- package/dist/chunk-NSCYUL4P.cjs.map +1 -0
- package/dist/{chunk-OPNMXBUR.js → chunk-O34AXZ4G.js} +2 -2
- package/dist/{chunk-EJPPVB2Y.js → chunk-R3DNJRDD.js} +2 -2
- package/dist/{chunk-GMKFXPEI.js → chunk-SB4VN4TR.js} +7 -5
- package/dist/chunk-SB4VN4TR.js.map +1 -0
- package/dist/{chunk-O4RQCDN2.js → chunk-SQCECEOH.js} +62 -17
- package/dist/chunk-SQCECEOH.js.map +1 -0
- package/dist/chunk-TK3FDAEE.cjs.map +1 -1
- package/dist/{chunk-MNG25FK4.cjs → chunk-TMHPNZ37.cjs} +222 -177
- package/dist/chunk-TMHPNZ37.cjs.map +1 -0
- package/dist/{chunk-EIUXBJZP.js → chunk-TO4T2M7R.js} +3 -3
- package/dist/{chunk-CG2Z6NB3.js → chunk-TY4PED6S.js} +2 -2
- package/dist/{chunk-VHAOAQZZ.cjs → chunk-UVMVLE3M.cjs} +3 -3
- package/dist/chunk-UVMVLE3M.cjs.map +1 -0
- package/dist/{chunk-DEDUWANG.js → chunk-VAR3NCSE.js} +151 -20
- package/dist/chunk-VAR3NCSE.js.map +1 -0
- package/dist/{chunk-N2JZGYFK.js → chunk-W6R7HH2Q.js} +4 -4
- package/dist/chunk-W6R7HH2Q.js.map +1 -0
- package/dist/{chunk-UDUEOBS5.js → chunk-WPA45TPL.js} +2 -2
- package/dist/{chunk-BNIXSB6D.js → chunk-YAKEEIR2.js} +2 -2
- package/dist/{chunk-V4PS653P.cjs → chunk-ZFM7UP72.cjs} +59 -57
- package/dist/chunk-ZFM7UP72.cjs.map +1 -0
- package/dist/chunks-L66VMJHU.js +10 -0
- package/dist/cli.js +30 -30
- package/dist/{formula-C55TRBHH.cjs → formula-3SARACGW.cjs} +9 -9
- package/dist/formula-3SARACGW.cjs.map +1 -0
- package/dist/{formula-6XLWGUCB.js → formula-MDHYCNKI.js} +4 -4
- package/dist/{formula-DCC5EOSX.js → formula-S7CTLTGZ.js} +3 -3
- package/dist/{image-ocr-EV7GVD3W.cjs → image-ocr-2T4NBJ73.cjs} +17 -17
- package/dist/image-ocr-2T4NBJ73.cjs.map +1 -0
- package/dist/{image-ocr-K3ZXDUNU.js → image-ocr-V6AQ4IAY.js} +6 -6
- package/dist/{image-ocr-L736MGYD.js → image-ocr-VDMEI7TD.js} +9 -9
- package/dist/index.cjs +826 -695
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +146 -15
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +23 -23
- package/dist/{model-bundle-OOOJFMGR.js → model-bundle-HCTCHMA2.js} +5 -5
- package/dist/{models-ELFZII4R.js → models-NJROM7JD.js} +5 -5
- package/dist/page-range-QHHFTL7X.cjs.map +1 -1
- package/dist/{parse-worker-v2-WS35WZY5.js → parse-worker-v2-ALTGW2J3.js} +12 -12
- package/dist/{parser-K7Y44QHS.js → parser-6J5HFER5.js} +13 -12
- package/dist/parser-6J5HFER5.js.map +1 -0
- package/dist/{parser-X6P3JBT2.cjs → parser-L3G6ON4U.cjs} +160 -159
- package/dist/parser-L3G6ON4U.cjs.map +1 -0
- package/dist/{parser-CNRI55MG.js → parser-MY4WE64G.js} +10 -9
- package/dist/parser-MY4WE64G.js.map +1 -0
- package/dist/{pdf-ocr-QQPZLIHM.js → pdf-ocr-3VVSR4LN.js} +9 -9
- package/dist/{pdf-ocr-MVNHXGPS.js → pdf-ocr-HUSU2XMV.js} +6 -6
- package/dist/pdf-ocr-RF2SCGXD.cjs +31 -0
- package/dist/pdf-ocr-RF2SCGXD.cjs.map +1 -0
- package/dist/{profile-io-GSRLMU4D.js → profile-io-SQI3X7MD.js} +3 -3
- package/dist/{rasterize-3H5QKDH2.js → rasterize-BHW5UZY2.js} +3 -3
- package/dist/{redact-doc-TLBF7J7W.js → redact-doc-KJ6M63BP.js} +11 -11
- package/dist/{render-FTCOQ6WO.js → render-Z6N2GGKL.js} +7 -7
- package/dist/seal-PM4624BB.js +10 -0
- package/dist/{setup-WVZ47AKV.js → setup-MUBZ674O.js} +3 -3
- package/dist/visual-AV46N5ZN.js +21 -0
- package/dist/{watch-CA32Z7XB.js → watch-D4AUDKVN.js} +12 -12
- package/package.json +4 -4
- package/dist/chunk-7BZBMXWD.cjs.map +0 -1
- package/dist/chunk-AYGMF6H5.cjs.map +0 -1
- package/dist/chunk-DEDUWANG.js.map +0 -1
- package/dist/chunk-EIGCAAVM.js.map +0 -1
- package/dist/chunk-GMKFXPEI.js.map +0 -1
- package/dist/chunk-MNG25FK4.cjs.map +0 -1
- package/dist/chunk-N2JZGYFK.js.map +0 -1
- package/dist/chunk-O4RQCDN2.js.map +0 -1
- package/dist/chunk-V4PS653P.cjs.map +0 -1
- package/dist/chunk-VHAOAQZZ.cjs.map +0 -1
- package/dist/chunk-WVZXPEHX.js.map +0 -1
- package/dist/chunk-YQB3LPKQ.cjs.map +0 -1
- package/dist/chunks-XURCANPP.js +0 -10
- package/dist/formula-C55TRBHH.cjs.map +0 -1
- package/dist/image-ocr-EV7GVD3W.cjs.map +0 -1
- package/dist/parser-CNRI55MG.js.map +0 -1
- package/dist/parser-K7Y44QHS.js.map +0 -1
- package/dist/parser-X6P3JBT2.cjs.map +0 -1
- package/dist/pdf-ocr-S6GSKOPT.cjs +0 -31
- package/dist/pdf-ocr-S6GSKOPT.cjs.map +0 -1
- package/dist/seal-74R7KDRY.js +0 -10
- package/dist/visual-TEW6Y3NH.js +0 -21
- /package/dist/{-GQDQXRQN.js.map → -6LXREJIR.js.map} +0 -0
- /package/dist/{chunk-OMJPCWKS.js.map → chunk-2A54AIAG.js.map} +0 -0
- /package/dist/{chunk-C4AY47C5.js.map → chunk-7NEBICPS.js.map} +0 -0
- /package/dist/{chunk-7ICC55XY.js.map → chunk-A4TUSLGL.js.map} +0 -0
- /package/dist/{chunk-FIS3WY5Q.js.map → chunk-BEPBXIKP.js.map} +0 -0
- /package/dist/{chunk-E35YPWOX.js.map → chunk-C6QK3PY2.js.map} +0 -0
- /package/dist/{chunk-MLFPEETP.js.map → chunk-D5S5S6OP.js.map} +0 -0
- /package/dist/{chunk-JKZY6FX5.js.map → chunk-DF3YCAK6.js.map} +0 -0
- /package/dist/{chunk-DZRXJEOF.js.map → chunk-EF4MEYFE.js.map} +0 -0
- /package/dist/{chunk-ZQQGV7K2.js.map → chunk-ESSLFMY3.js.map} +0 -0
- /package/dist/{chunk-BLWDQEBY.js.map → chunk-GINSLCL7.js.map} +0 -0
- /package/dist/{chunk-FQVWYJNM.js.map → chunk-MSPBBDR5.js.map} +0 -0
- /package/dist/{chunk-OPNMXBUR.js.map → chunk-O34AXZ4G.js.map} +0 -0
- /package/dist/{chunk-EJPPVB2Y.js.map → chunk-R3DNJRDD.js.map} +0 -0
- /package/dist/{chunk-EIUXBJZP.js.map → chunk-TO4T2M7R.js.map} +0 -0
- /package/dist/{chunk-CG2Z6NB3.js.map → chunk-TY4PED6S.js.map} +0 -0
- /package/dist/{chunk-UDUEOBS5.js.map → chunk-WPA45TPL.js.map} +0 -0
- /package/dist/{chunk-BNIXSB6D.js.map → chunk-YAKEEIR2.js.map} +0 -0
- /package/dist/{chunks-XURCANPP.js.map → chunks-L66VMJHU.js.map} +0 -0
- /package/dist/{formula-6XLWGUCB.js.map → formula-MDHYCNKI.js.map} +0 -0
- /package/dist/{formula-DCC5EOSX.js.map → formula-S7CTLTGZ.js.map} +0 -0
- /package/dist/{image-ocr-K3ZXDUNU.js.map → image-ocr-V6AQ4IAY.js.map} +0 -0
- /package/dist/{image-ocr-L736MGYD.js.map → image-ocr-VDMEI7TD.js.map} +0 -0
- /package/dist/{model-bundle-OOOJFMGR.js.map → model-bundle-HCTCHMA2.js.map} +0 -0
- /package/dist/{models-ELFZII4R.js.map → models-NJROM7JD.js.map} +0 -0
- /package/dist/{parse-worker-v2-WS35WZY5.js.map → parse-worker-v2-ALTGW2J3.js.map} +0 -0
- /package/dist/{pdf-ocr-MVNHXGPS.js.map → pdf-ocr-3VVSR4LN.js.map} +0 -0
- /package/dist/{pdf-ocr-QQPZLIHM.js.map → pdf-ocr-HUSU2XMV.js.map} +0 -0
- /package/dist/{profile-io-GSRLMU4D.js.map → profile-io-SQI3X7MD.js.map} +0 -0
- /package/dist/{rasterize-3H5QKDH2.js.map → rasterize-BHW5UZY2.js.map} +0 -0
- /package/dist/{redact-doc-TLBF7J7W.js.map → redact-doc-KJ6M63BP.js.map} +0 -0
- /package/dist/{render-FTCOQ6WO.js.map → render-Z6N2GGKL.js.map} +0 -0
- /package/dist/{seal-74R7KDRY.js.map → seal-PM4624BB.js.map} +0 -0
- /package/dist/{setup-WVZ47AKV.js.map → setup-MUBZ674O.js.map} +0 -0
- /package/dist/{visual-TEW6Y3NH.js.map → visual-AV46N5ZN.js.map} +0 -0
- /package/dist/{watch-CA32Z7XB.js.map → watch-D4AUDKVN.js.map} +0 -0
package/dist/mcp.js
CHANGED
|
@@ -47,33 +47,33 @@ import {
|
|
|
47
47
|
unknownFontWarnings,
|
|
48
48
|
usesGaejosikMunche,
|
|
49
49
|
usesLogicStructure
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-VAR3NCSE.js";
|
|
51
|
+
import "./chunk-A4TUSLGL.js";
|
|
52
52
|
import {
|
|
53
53
|
detectFormat,
|
|
54
54
|
detectOle2Format,
|
|
55
55
|
detectZipFormat,
|
|
56
56
|
extractHwp5MetadataOnly
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-ESSLFMY3.js";
|
|
58
|
+
import "./chunk-WPA45TPL.js";
|
|
59
|
+
import "./chunk-MSPBBDR5.js";
|
|
60
60
|
import "./chunk-VKVDMH7X.js";
|
|
61
61
|
import "./chunk-VQFA55IC.js";
|
|
62
62
|
import "./chunk-BYMPPVT3.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-GINSLCL7.js";
|
|
64
64
|
import {
|
|
65
65
|
blocksToMarkdown
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-D5S5S6OP.js";
|
|
67
67
|
import {
|
|
68
68
|
assertWithinRoot,
|
|
69
69
|
getAccessRoot,
|
|
70
70
|
isOfflineMode
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-O34AXZ4G.js";
|
|
72
72
|
import {
|
|
73
73
|
extractFormFields,
|
|
74
74
|
fillWithUniqueGuard
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-TO4T2M7R.js";
|
|
76
|
+
import "./chunk-2A54AIAG.js";
|
|
77
77
|
import {
|
|
78
78
|
KordocError,
|
|
79
79
|
VERSION,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
routeConsoleToStderr,
|
|
82
82
|
sanitizeError,
|
|
83
83
|
toArrayBuffer
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-C6QK3PY2.js";
|
|
85
85
|
import "./chunk-3WSNLH4B.js";
|
|
86
86
|
|
|
87
87
|
// src/mcp.ts
|
|
@@ -396,7 +396,7 @@ ${markdown}`);
|
|
|
396
396
|
break;
|
|
397
397
|
case "pdf":
|
|
398
398
|
try {
|
|
399
|
-
const { extractPdfMetadataOnly } = await import("./parser-
|
|
399
|
+
const { extractPdfMetadataOnly } = await import("./parser-6J5HFER5.js");
|
|
400
400
|
metadata = await extractPdfMetadataOnly(buffer);
|
|
401
401
|
} catch {
|
|
402
402
|
metadata = void 0;
|
|
@@ -573,7 +573,7 @@ ${tableMarkdown}` }]
|
|
|
573
573
|
if (!parsed.success) {
|
|
574
574
|
return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
|
|
575
575
|
}
|
|
576
|
-
const { blocksToChunks } = await import("./chunks-
|
|
576
|
+
const { blocksToChunks } = await import("./chunks-L66VMJHU.js");
|
|
577
577
|
const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
|
|
578
578
|
return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
|
|
579
579
|
} catch (err) {
|
|
@@ -834,7 +834,7 @@ ${previewMd}` }]
|
|
|
834
834
|
}
|
|
835
835
|
const image = new Uint8Array(await readFile2(imgResolved));
|
|
836
836
|
const ext = extname2(imgResolved).slice(1).toLowerCase();
|
|
837
|
-
const { placeSealHwpx } = await import("./seal-
|
|
837
|
+
const { placeSealHwpx } = await import("./seal-PM4624BB.js");
|
|
838
838
|
const result = await placeSealHwpx(buffer, [{
|
|
839
839
|
anchor,
|
|
840
840
|
occurrence,
|
|
@@ -953,7 +953,7 @@ ${previewMd}` }]
|
|
|
953
953
|
if (outPath && await isSameFile(outPath, resolved)) {
|
|
954
954
|
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 };
|
|
955
955
|
}
|
|
956
|
-
const { redactDocument } = await import("./redact-doc-
|
|
956
|
+
const { redactDocument } = await import("./redact-doc-KJ6M63BP.js");
|
|
957
957
|
const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
|
|
958
958
|
const MAX_LINES = 50;
|
|
959
959
|
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}`);
|
|
@@ -1027,7 +1027,7 @@ function registerRenderTools(server2) {
|
|
|
1027
1027
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1028
1028
|
const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
|
|
1029
1029
|
if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
|
|
1030
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
1030
|
+
const { renderHwpxToSvg } = await import("./render-Z6N2GGKL.js");
|
|
1031
1031
|
const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode });
|
|
1032
1032
|
const summary2 = [
|
|
1033
1033
|
`\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})`,
|
|
@@ -1039,7 +1039,7 @@ function registerRenderTools(server2) {
|
|
|
1039
1039
|
summary2.push(`\uC800\uC7A5: ${outPath}`);
|
|
1040
1040
|
return { content: [{ type: "text", text: summary2.join("\n") }] };
|
|
1041
1041
|
}
|
|
1042
|
-
const { rasterizeSvg } = await import("./rasterize-
|
|
1042
|
+
const { rasterizeSvg } = await import("./rasterize-BHW5UZY2.js");
|
|
1043
1043
|
const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
|
|
1044
1044
|
if (outPath) {
|
|
1045
1045
|
await mkdir2(dirname3(outPath), { recursive: true });
|
|
@@ -1054,7 +1054,7 @@ function registerRenderTools(server2) {
|
|
|
1054
1054
|
]
|
|
1055
1055
|
};
|
|
1056
1056
|
}
|
|
1057
|
-
const { renderDocument } = await import("./render-
|
|
1057
|
+
const { renderDocument } = await import("./render-Z6N2GGKL.js");
|
|
1058
1058
|
const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px });
|
|
1059
1059
|
const summary = [
|
|
1060
1060
|
`\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})`,
|
|
@@ -1104,7 +1104,7 @@ function registerRenderTools(server2) {
|
|
|
1104
1104
|
try {
|
|
1105
1105
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1106
1106
|
const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
|
|
1107
|
-
const { extractRenderedRegions } = await import("./render-
|
|
1107
|
+
const { extractRenderedRegions } = await import("./render-Z6N2GGKL.js");
|
|
1108
1108
|
const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
|
|
1109
1109
|
await mkdir2(dir, { recursive: true });
|
|
1110
1110
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1140,7 +1140,7 @@ function registerRenderTools(server2) {
|
|
|
1140
1140
|
}
|
|
1141
1141
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1142
1142
|
const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
|
|
1143
|
-
const { extractTables } = await import("./visual-
|
|
1143
|
+
const { extractTables } = await import("./visual-AV46N5ZN.js");
|
|
1144
1144
|
const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
|
|
1145
1145
|
if (dir) await mkdir2(dir, { recursive: true });
|
|
1146
1146
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1197,7 +1197,7 @@ function registerGenerateTools(server2) {
|
|
|
1197
1197
|
try {
|
|
1198
1198
|
const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
|
|
1199
1199
|
const { buffer } = await readValidatedFile(hwpx_path);
|
|
1200
|
-
const { hwpxToProfile } = await import("./-
|
|
1200
|
+
const { hwpxToProfile } = await import("./-6LXREJIR.js");
|
|
1201
1201
|
const profile = await hwpxToProfile(buffer);
|
|
1202
1202
|
await mkdir3(dirname4(out), { recursive: true });
|
|
1203
1203
|
await writeOutputFile(out, JSON.stringify(profile, null, 2));
|
|
@@ -1344,7 +1344,7 @@ ${g.blocking.map((f) => `- ${formatGateFinding(f)}`).join("\n")}` }],
|
|
|
1344
1344
|
}
|
|
1345
1345
|
let profile;
|
|
1346
1346
|
if (profile_path) {
|
|
1347
|
-
const { parseFormatProfileJson } = await import("./profile-io-
|
|
1347
|
+
const { parseFormatProfileJson } = await import("./profile-io-SQI3X7MD.js");
|
|
1348
1348
|
profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
|
|
1349
1349
|
}
|
|
1350
1350
|
const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
|
|
@@ -1448,7 +1448,7 @@ function registerLintTools(server2) {
|
|
|
1448
1448
|
let irBlocks;
|
|
1449
1449
|
if (file_path !== void 0) {
|
|
1450
1450
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, ALLOWED_EXTENSIONS);
|
|
1451
|
-
const { parse: parse2 } = await import("./-
|
|
1451
|
+
const { parse: parse2 } = await import("./-6LXREJIR.js");
|
|
1452
1452
|
const parsed = await parse2(buffer, { filePath: resolved });
|
|
1453
1453
|
if (!parsed.success) throw new KordocError(`\uBB38\uC11C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 \u2014 ${parsed.error}`);
|
|
1454
1454
|
body = parsed.markdown;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ALL_OCR_MODELS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7NEBICPS.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-TY4PED6S.js";
|
|
10
|
+
import "./chunk-O34AXZ4G.js";
|
|
11
|
+
import "./chunk-C6QK3PY2.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-HCTCHMA2.js.map
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
ocrSourcePath,
|
|
18
18
|
parseCharacterDict,
|
|
19
19
|
resolveOcrModels
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-7NEBICPS.js";
|
|
21
|
+
import "./chunk-TY4PED6S.js";
|
|
22
|
+
import "./chunk-O34AXZ4G.js";
|
|
23
|
+
import "./chunk-C6QK3PY2.js";
|
|
24
24
|
export {
|
|
25
25
|
ALL_OCR_MODELS,
|
|
26
26
|
DEFAULT_OCR_MODELS,
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
parseCharacterDict,
|
|
41
41
|
resolveOcrModels
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=models-
|
|
43
|
+
//# sourceMappingURL=models-NJROM7JD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/mong-e/workspace/kordoc/dist/page-range-QHHFTL7X.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,qIAAC","file":"/Users/mong-e/workspace/kordoc/dist/page-range-QHHFTL7X.cjs"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
parseWorkerFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EF4MEYFE.js";
|
|
5
5
|
import {
|
|
6
6
|
PRESET_ALIAS,
|
|
7
7
|
lintBlocks
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-VAR3NCSE.js";
|
|
9
|
+
import "./chunk-A4TUSLGL.js";
|
|
10
|
+
import "./chunk-ESSLFMY3.js";
|
|
11
|
+
import "./chunk-WPA45TPL.js";
|
|
12
|
+
import "./chunk-MSPBBDR5.js";
|
|
13
13
|
import "./chunk-VKVDMH7X.js";
|
|
14
14
|
import "./chunk-VQFA55IC.js";
|
|
15
15
|
import {
|
|
16
16
|
validateOcrOptions
|
|
17
17
|
} from "./chunk-BYMPPVT3.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-GINSLCL7.js";
|
|
19
|
+
import "./chunk-D5S5S6OP.js";
|
|
20
|
+
import "./chunk-TO4T2M7R.js";
|
|
21
|
+
import "./chunk-2A54AIAG.js";
|
|
22
22
|
import {
|
|
23
23
|
VERSION,
|
|
24
24
|
sanitizeError
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-C6QK3PY2.js";
|
|
26
26
|
import "./chunk-3WSNLH4B.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/parse-worker-v2.ts
|
|
@@ -354,4 +354,4 @@ export {
|
|
|
354
354
|
runParseWorkerV2,
|
|
355
355
|
toParseOptions
|
|
356
356
|
};
|
|
357
|
-
//# sourceMappingURL=parse-worker-v2-
|
|
357
|
+
//# sourceMappingURL=parse-worker-v2-ALTGW2J3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
blocksToPages
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MSPBBDR5.js";
|
|
5
5
|
import {
|
|
6
6
|
encodePng
|
|
7
7
|
} from "./chunk-VKVDMH7X.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
stripAbsorbedRunningLines,
|
|
63
63
|
trimTrailingEmptyTableCols,
|
|
64
64
|
wrapJoiner
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-NDC4AGLX.js";
|
|
66
66
|
import {
|
|
67
67
|
validateOcrOptions
|
|
68
68
|
} from "./chunk-BYMPPVT3.js";
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
stripScriptTags,
|
|
76
76
|
toTex,
|
|
77
77
|
unframeLayoutTables
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-GINSLCL7.js";
|
|
79
79
|
import {
|
|
80
80
|
WINGDINGS,
|
|
81
81
|
assignTableIds,
|
|
@@ -84,17 +84,17 @@ import {
|
|
|
84
84
|
escapeLiteralDollar,
|
|
85
85
|
mapPuaText,
|
|
86
86
|
pairedNumber
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-D5S5S6OP.js";
|
|
88
88
|
import {
|
|
89
89
|
ocrModelsCached,
|
|
90
90
|
resolveOcrModels
|
|
91
|
-
} from "./chunk-
|
|
92
|
-
import "./chunk-
|
|
93
|
-
import "./chunk-
|
|
91
|
+
} from "./chunk-7NEBICPS.js";
|
|
92
|
+
import "./chunk-TY4PED6S.js";
|
|
93
|
+
import "./chunk-O34AXZ4G.js";
|
|
94
94
|
import {
|
|
95
95
|
KordocError,
|
|
96
96
|
sanitizeHref
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-C6QK3PY2.js";
|
|
98
98
|
|
|
99
99
|
// src/pdf/image-extract.ts
|
|
100
100
|
import { createHash } from "crypto";
|
|
@@ -1546,6 +1546,7 @@ function mergeSplitRow(table, owner, first, colXs, textOnly = false, cut = NO_CU
|
|
|
1546
1546
|
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;
|
|
1547
1547
|
const oneLine = (c) => CELL_LINES.get(c)?.length === 1;
|
|
1548
1548
|
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;
|
|
1549
|
+
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;
|
|
1549
1550
|
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));
|
|
1550
1551
|
if (!(cut.open && !newCell)) {
|
|
1551
1552
|
if (pairs.some((p) => p[1].rs > 1 && !flows(p))) return false;
|
|
@@ -4033,7 +4034,7 @@ function mergeLinkRuns(markdown) {
|
|
|
4033
4034
|
|
|
4034
4035
|
// src/pdf/formula-ocr.ts
|
|
4035
4036
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
4036
|
-
const formulaMod = await import("./formula-
|
|
4037
|
+
const formulaMod = await import("./formula-MDHYCNKI.js");
|
|
4037
4038
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
4038
4039
|
await ensureFormulaModels((p) => {
|
|
4039
4040
|
if (p.phase === "download" && p.total) {
|
|
@@ -4460,10 +4461,10 @@ async function parsePdfDocument(buffer, options) {
|
|
|
4460
4461
|
}
|
|
4461
4462
|
if (targets.size > 0) {
|
|
4462
4463
|
try {
|
|
4463
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
4464
|
+
const { runPdfOcr } = await import("./pdf-ocr-3VVSR4LN.js");
|
|
4464
4465
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
4465
4466
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
4466
|
-
const { builtinOcrConfig } = await import("./pdf-ocr-
|
|
4467
|
+
const { builtinOcrConfig } = await import("./pdf-ocr-3VVSR4LN.js");
|
|
4467
4468
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages, builtinOcrConfig(options), ocrLinesOut);
|
|
4468
4469
|
for (const obs of ocrPageBlocks.values()) stripScriptTags({ blocks: obs });
|
|
4469
4470
|
if (ocrPageBlocks.size > 0) {
|
|
@@ -4708,4 +4709,4 @@ export {
|
|
|
4708
4709
|
parsePdfDocument,
|
|
4709
4710
|
removeHeaderFooterBlocks
|
|
4710
4711
|
};
|
|
4711
|
-
//# sourceMappingURL=parser-
|
|
4712
|
+
//# sourceMappingURL=parser-6J5HFER5.js.map
|