kordoc 4.2.3 → 4.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +1 -1
  2. package/dist/{-GJYDKVQD.js → -G2JOUAZU.js} +8 -8
  3. package/dist/{chunk-FF5QNEKZ.cjs → chunk-4VRGN6MO.cjs} +3 -3
  4. package/dist/chunk-4VRGN6MO.cjs.map +1 -0
  5. package/dist/{chunk-LPWP4FWU.js → chunk-6AJGCOCS.js} +2 -2
  6. package/dist/{chunk-DE6FORIP.js → chunk-CB3HDP4O.js} +2 -2
  7. package/dist/chunk-DCZVOIEO.cjs.map +1 -1
  8. package/dist/chunk-GS7T56RP.cjs.map +1 -1
  9. package/dist/chunk-H7OWEYH2.cjs.map +1 -1
  10. package/dist/{chunk-U6XYOV32.js → chunk-JZIPR2PJ.js} +2 -2
  11. package/dist/{chunk-WX75LYAS.js → chunk-L7KFGFDA.js} +22 -14
  12. package/dist/chunk-L7KFGFDA.js.map +1 -0
  13. package/dist/{chunk-CWP56BRC.cjs → chunk-LHH7AT6J.cjs} +2 -2
  14. package/dist/chunk-LHH7AT6J.cjs.map +1 -0
  15. package/dist/{chunk-5AXGFJQO.cjs → chunk-M4BQRAOM.cjs} +4 -4
  16. package/dist/chunk-M4BQRAOM.cjs.map +1 -0
  17. package/dist/{chunk-CGFWS3BQ.js → chunk-NTK7B6EU.js} +3 -3
  18. package/dist/{chunk-LMNSIPWZ.js → chunk-PEKWJZDQ.js} +2 -2
  19. package/dist/{chunk-RAS3HM4X.js → chunk-PPRJ3TVL.js} +2 -2
  20. package/dist/{chunk-NOMNOG74.js → chunk-R5DVJNXY.js} +2 -2
  21. package/dist/{chunk-WTJIRGPN.js → chunk-SPY7ZVBB.js} +3 -3
  22. package/dist/{chunk-QNVZAKUQ.js → chunk-TH4YAOOG.js} +2 -2
  23. package/dist/{chunk-NIPPOAT6.js → chunk-VKVFHF5E.js} +2 -2
  24. package/dist/{chunk-K5LGSH5T.js → chunk-VSTUPUNH.js} +2 -2
  25. package/dist/{chunk-AA6UPPZF.cjs → chunk-VUU26FTT.cjs} +9 -9
  26. package/dist/chunk-VUU26FTT.cjs.map +1 -0
  27. package/dist/{chunk-ELRVXOMP.js → chunk-WHCDNDDG.js} +2 -2
  28. package/dist/{chunk-X634MXVJ.js → chunk-XOOQ46DQ.js} +2 -2
  29. package/dist/chunk-XOOQ46DQ.js.map +1 -0
  30. package/dist/chunks-ASAY2R5Q.js +10 -0
  31. package/dist/cli.js +16 -16
  32. package/dist/formula-SB3NHDUM.cjs.map +1 -1
  33. package/dist/{image-ocr-O3YQ3KEN.js → image-ocr-C2VYH6L7.js} +4 -4
  34. package/dist/{image-ocr-PLTV4NOK.js → image-ocr-ILTRLOCF.js} +4 -4
  35. package/dist/{image-ocr-TCJLNMTG.cjs → image-ocr-RN77CC5P.cjs} +9 -9
  36. package/dist/image-ocr-RN77CC5P.cjs.map +1 -0
  37. package/dist/index.cjs +165 -157
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.js +18 -10
  40. package/dist/index.js.map +1 -1
  41. package/dist/mcp.js +14 -14
  42. package/dist/page-range-P7SDW6LR.cjs.map +1 -1
  43. package/dist/{parser-VQIJPCI5.cjs → parser-5TEQ6EFF.cjs} +24 -24
  44. package/dist/parser-5TEQ6EFF.cjs.map +1 -0
  45. package/dist/{parser-Y2X4JMAK.js → parser-7XDK53L6.js} +5 -5
  46. package/dist/{parser-UX5T6KTZ.js → parser-FDOR727T.js} +5 -5
  47. package/dist/{pdf-ocr-DOPZP6QS.js → pdf-ocr-4LO224RJ.js} +4 -4
  48. package/dist/pdf-ocr-5XGZH6D4.cjs +13 -0
  49. package/dist/pdf-ocr-5XGZH6D4.cjs.map +1 -0
  50. package/dist/pdf-ocr-ZEKXX54R.js +12 -0
  51. package/dist/{profile-io-EGVJAZDG.js → profile-io-6SYG2B2L.js} +3 -3
  52. package/dist/{rasterize-TH26U5E2.js → rasterize-PV7NU33W.js} +2 -2
  53. package/dist/render-ORPFUHVA.js +10 -0
  54. package/dist/seal-3AEDWS4F.js +10 -0
  55. package/dist/{watch-4SP7V6SV.js → watch-ZXCJZTSN.js} +8 -8
  56. package/package.json +1 -1
  57. package/dist/chunk-5AXGFJQO.cjs.map +0 -1
  58. package/dist/chunk-AA6UPPZF.cjs.map +0 -1
  59. package/dist/chunk-CWP56BRC.cjs.map +0 -1
  60. package/dist/chunk-FF5QNEKZ.cjs.map +0 -1
  61. package/dist/chunk-WX75LYAS.js.map +0 -1
  62. package/dist/chunk-X634MXVJ.js.map +0 -1
  63. package/dist/chunks-JOGD2KUK.js +0 -10
  64. package/dist/image-ocr-TCJLNMTG.cjs.map +0 -1
  65. package/dist/parser-VQIJPCI5.cjs.map +0 -1
  66. package/dist/pdf-ocr-I3Y6YF5K.js +0 -12
  67. package/dist/pdf-ocr-XMDJ2IF5.cjs +0 -13
  68. package/dist/pdf-ocr-XMDJ2IF5.cjs.map +0 -1
  69. package/dist/render-C4R3OJ45.js +0 -10
  70. package/dist/seal-JF2J4S52.js +0 -10
  71. /package/dist/{-GJYDKVQD.js.map → -G2JOUAZU.js.map} +0 -0
  72. /package/dist/{chunk-LPWP4FWU.js.map → chunk-6AJGCOCS.js.map} +0 -0
  73. /package/dist/{chunk-DE6FORIP.js.map → chunk-CB3HDP4O.js.map} +0 -0
  74. /package/dist/{chunk-U6XYOV32.js.map → chunk-JZIPR2PJ.js.map} +0 -0
  75. /package/dist/{chunk-CGFWS3BQ.js.map → chunk-NTK7B6EU.js.map} +0 -0
  76. /package/dist/{chunk-LMNSIPWZ.js.map → chunk-PEKWJZDQ.js.map} +0 -0
  77. /package/dist/{chunk-RAS3HM4X.js.map → chunk-PPRJ3TVL.js.map} +0 -0
  78. /package/dist/{chunk-NOMNOG74.js.map → chunk-R5DVJNXY.js.map} +0 -0
  79. /package/dist/{chunk-WTJIRGPN.js.map → chunk-SPY7ZVBB.js.map} +0 -0
  80. /package/dist/{chunk-QNVZAKUQ.js.map → chunk-TH4YAOOG.js.map} +0 -0
  81. /package/dist/{chunk-NIPPOAT6.js.map → chunk-VKVFHF5E.js.map} +0 -0
  82. /package/dist/{chunk-K5LGSH5T.js.map → chunk-VSTUPUNH.js.map} +0 -0
  83. /package/dist/{chunk-ELRVXOMP.js.map → chunk-WHCDNDDG.js.map} +0 -0
  84. /package/dist/{chunks-JOGD2KUK.js.map → chunks-ASAY2R5Q.js.map} +0 -0
  85. /package/dist/{image-ocr-O3YQ3KEN.js.map → image-ocr-C2VYH6L7.js.map} +0 -0
  86. /package/dist/{image-ocr-PLTV4NOK.js.map → image-ocr-ILTRLOCF.js.map} +0 -0
  87. /package/dist/{parser-Y2X4JMAK.js.map → parser-7XDK53L6.js.map} +0 -0
  88. /package/dist/{parser-UX5T6KTZ.js.map → parser-FDOR727T.js.map} +0 -0
  89. /package/dist/{pdf-ocr-DOPZP6QS.js.map → pdf-ocr-4LO224RJ.js.map} +0 -0
  90. /package/dist/{pdf-ocr-I3Y6YF5K.js.map → pdf-ocr-ZEKXX54R.js.map} +0 -0
  91. /package/dist/{profile-io-EGVJAZDG.js.map → profile-io-6SYG2B2L.js.map} +0 -0
  92. /package/dist/{rasterize-TH26U5E2.js.map → rasterize-PV7NU33W.js.map} +0 -0
  93. /package/dist/{render-C4R3OJ45.js.map → render-ORPFUHVA.js.map} +0 -0
  94. /package/dist/{seal-JF2J4S52.js.map → seal-3AEDWS4F.js.map} +0 -0
  95. /package/dist/{watch-4SP7V6SV.js.map → watch-ZXCJZTSN.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunk5AXGFJQOcjs = require('./chunk-5AXGFJQO.cjs');
11
+ var _chunkM4BQRAOMcjs = require('./chunk-M4BQRAOM.cjs');
12
12
 
13
13
 
14
14
  var _chunkDCZVOIEOcjs = require('./chunk-DCZVOIEO.cjs');
@@ -27,7 +27,7 @@ var _chunkDCZVOIEOcjs = require('./chunk-DCZVOIEO.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkCWP56BRCcjs = require('./chunk-CWP56BRC.cjs');
30
+ var _chunkLHH7AT6Jcjs = require('./chunk-LHH7AT6J.cjs');
31
31
 
32
32
 
33
33
  var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
@@ -413,7 +413,7 @@ function comResultToParseResult(pages, pageCount, warnings) {
413
413
  var _xmldom = require('@xmldom/xmldom');
414
414
  var MAX_DECOMPRESS_SIZE = 256 * 1024 * 1024;
415
415
  var MAX_ZIP_ENTRIES = 500;
416
- var ZipBombError = class extends _chunkCWP56BRCcjs.KordocError {
416
+ var ZipBombError = class extends _chunkLHH7AT6Jcjs.KordocError {
417
417
  constructor(message) {
418
418
  super(message);
419
419
  this.name = "ZipBombError";
@@ -429,7 +429,7 @@ function createSectionShared() {
429
429
  function createXmlParser(warnings) {
430
430
  return new (0, _xmldom.DOMParser)({
431
431
  onError(level, msg2) {
432
- if (level === "fatalError") throw new (0, _chunkCWP56BRCcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
432
+ if (level === "fatalError") throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
433
433
  _optionalChain([warnings, 'optionalAccess', _3 => _3.push, 'call', _4 => _4({ code: "MALFORMED_XML", message: `XML ${level === "warning" ? "\uACBD\uACE0" : "\uC624\uB958"}: ${msg2}` })]);
434
434
  }
435
435
  });
@@ -506,10 +506,10 @@ async function extractHwpxStyles(zip, decompressed) {
506
506
  const xml = await file.async("text");
507
507
  if (decompressed) {
508
508
  decompressed.total += xml.length * 2;
509
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
509
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
510
510
  }
511
511
  const parser = createXmlParser();
512
- const doc = parser.parseFromString(_chunkCWP56BRCcjs.stripDtd.call(void 0, xml), "text/xml");
512
+ const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
513
513
  if (!doc.documentElement) continue;
514
514
  const domDoc = doc;
515
515
  parseCharProperties(domDoc, result.charProperties);
@@ -696,9 +696,9 @@ function detectHwpxHeadings(blocks, styleMap) {
696
696
  let level = 0;
697
697
  if (baseFontSize > 0 && _optionalChain([block, 'access', _11 => _11.style, 'optionalAccess', _12 => _12.fontSize])) {
698
698
  const ratio = block.style.fontSize / baseFontSize;
699
- if (ratio >= _chunkCWP56BRCcjs.HEADING_RATIO_H1) level = 1;
700
- else if (ratio >= _chunkCWP56BRCcjs.HEADING_RATIO_H2) level = 2;
701
- else if (ratio >= _chunkCWP56BRCcjs.HEADING_RATIO_H3) level = 3;
699
+ if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H1) level = 1;
700
+ else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H2) level = 2;
701
+ else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H3) level = 3;
702
702
  }
703
703
  const compactText = text.replace(/\s+/g, "");
704
704
  if (/^제\d+[조장절편]/.test(compactText) && text.length <= 50) {
@@ -1623,7 +1623,7 @@ function needsGaejosikAssets(gongmun) {
1623
1623
  }
1624
1624
  function assertFiniteRange(name, value, min, max) {
1625
1625
  if (!Number.isFinite(value) || value < min || value > max) {
1626
- throw new (0, _chunkCWP56BRCcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
1626
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
1627
1627
  }
1628
1628
  }
1629
1629
  function validateGongmunOptions(opts) {
@@ -1638,10 +1638,10 @@ function validateGongmunOptions(opts) {
1638
1638
  assertFiniteRange(`margins.${side}`, value, 0, 200);
1639
1639
  }
1640
1640
  if (opts.margins.left + opts.margins.right >= 210) {
1641
- throw new (0, _chunkCWP56BRCcjs.KordocError)("margins.left + margins.right must be less than 210");
1641
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("margins.left + margins.right must be less than 210");
1642
1642
  }
1643
1643
  if (opts.margins.top + opts.margins.bottom >= 297) {
1644
- throw new (0, _chunkCWP56BRCcjs.KordocError)("margins.top + margins.bottom must be less than 297");
1644
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("margins.top + margins.bottom must be less than 297");
1645
1645
  }
1646
1646
  }
1647
1647
  if (opts.sizes) {
@@ -1650,7 +1650,7 @@ function validateGongmunOptions(opts) {
1650
1650
  }
1651
1651
  }
1652
1652
  if (opts.approval && opts.approval.length > 6) {
1653
- throw new (0, _chunkCWP56BRCcjs.KordocError)("approval must contain at most 6 labels");
1653
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("approval must contain at most 6 labels");
1654
1654
  }
1655
1655
  }
1656
1656
  function incompatibleGongmunWarnings(opts) {
@@ -1915,7 +1915,7 @@ function resolveParaHeading(paraEl, ctx) {
1915
1915
 
1916
1916
  // src/hwpx/table-build.ts
1917
1917
  function buildTableWithCellMeta(state, keepAnchoredEmptyCols) {
1918
- const table2 = _chunk5AXGFJQOcjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols });
1918
+ const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols });
1919
1919
  if (state.caption) table2.caption = state.caption;
1920
1920
  const anchors = [];
1921
1921
  {
@@ -1985,9 +1985,13 @@ function completeTable(newTable, tableStack, blocks, ctx) {
1985
1985
  const cell2 = parentTable.cell;
1986
1986
  (cell2.blocks ??= []).push(block);
1987
1987
  cell2.hasStructure = true;
1988
- let flat = _chunk5AXGFJQOcjs.convertTableToText.call(void 0, newTable.rows);
1988
+ let flat = _chunkM4BQRAOMcjs.convertTableToText.call(void 0, newTable.rows);
1989
1989
  if (newTable.caption) flat = newTable.caption + (flat ? "\n" + flat : "");
1990
- if (flat) cell2.text += (cell2.text ? "\n" : "") + flat;
1990
+ if (flat) {
1991
+ const inlineJoin = newTable.inline === true && cell2.lineOpen === true;
1992
+ cell2.text += (cell2.text ? inlineJoin ? " " : "\n" : "") + flat;
1993
+ cell2.lineOpen = newTable.inline === true;
1994
+ }
1991
1995
  } else {
1992
1996
  blocks.push(block);
1993
1997
  }
@@ -1997,7 +2001,7 @@ function completeTable(newTable, tableStack, blocks, ctx) {
1997
2001
  // src/hwpx/section-walker.ts
1998
2002
  function parseSectionXml(xml, styleMap, warnings, sectionNum, shared) {
1999
2003
  const parser = createXmlParser(warnings);
2000
- const doc = parser.parseFromString(_chunkCWP56BRCcjs.stripDtd.call(void 0, xml), "text/xml");
2004
+ const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
2001
2005
  if (!doc.documentElement) return [];
2002
2006
  const ctx = { styleMap, warnings, sectionNum, shared: _nullishCoalesce(shared, () => ( createSectionShared())) };
2003
2007
  ctx.shared.track.deleteDepth = 0;
@@ -2103,8 +2107,8 @@ function walkSection(node, blocks, tableCtx, tableStack, ctx, depth = 0) {
2103
2107
  const cs = isNaN(rawCs) ? 1 : rawCs;
2104
2108
  const rawRs = parseInt(el.getAttribute("rowSpan") || "1", 10);
2105
2109
  const rs = isNaN(rawRs) ? 1 : rawRs;
2106
- tableCtx.cell.colSpan = clampSpan(cs, _chunk5AXGFJQOcjs.MAX_COLS);
2107
- tableCtx.cell.rowSpan = clampSpan(rs, _chunk5AXGFJQOcjs.MAX_ROWS);
2110
+ tableCtx.cell.colSpan = clampSpan(cs, _chunkM4BQRAOMcjs.MAX_COLS);
2111
+ tableCtx.cell.rowSpan = clampSpan(rs, _chunkM4BQRAOMcjs.MAX_ROWS);
2108
2112
  }
2109
2113
  break;
2110
2114
  case "p": {
@@ -2118,7 +2122,7 @@ function walkSection(node, blocks, tableCtx, tableStack, ctx, depth = 0) {
2118
2122
  }
2119
2123
  if (segments) {
2120
2124
  const cell2 = _nullishCoalesce(_optionalChain([tableCtx, 'optionalAccess', _36 => _36.cell]), () => ( null));
2121
- if (text && cell2) cell2.text += (cell2.text ? "\n" : "") + (footnote ? `${text} (\uC8FC: ${footnote})` : text);
2125
+ if (cell2) cell2.lineOpen = false;
2122
2126
  const segs = [...segments];
2123
2127
  if (_optionalChain([ph, 'optionalAccess', _37 => _37.prefix])) {
2124
2128
  const fi = segs.findIndex((s) => s);
@@ -2136,11 +2140,15 @@ function walkSection(node, blocks, tableCtx, tableStack, ctx, depth = 0) {
2136
2140
  if (href) block.href = href;
2137
2141
  if (footnote) block.footnoteText = footnote;
2138
2142
  }
2139
- if (cell2) (cell2.blocks ??= []).push(block);
2140
- else blocks.push(block);
2143
+ if (cell2) {
2144
+ cell2.text += (cell2.text ? cell2.lineOpen ? " " : "\n" : "") + s;
2145
+ cell2.lineOpen = true;
2146
+ (cell2.blocks ??= []).push(block);
2147
+ } else blocks.push(block);
2141
2148
  };
2142
2149
  tableCtx = walkParagraphChildren(el, blocks, tableCtx, tableStack, ctx, depth + 1, flush);
2143
2150
  while (segIdx < segs.length) flush();
2151
+ if (footnote && cell2) cell2.text += (cell2.text ? "\n" : "") + `(\uC8FC: ${footnote})`;
2144
2152
  break;
2145
2153
  }
2146
2154
  if (text) {
@@ -2342,7 +2350,7 @@ function flattenSubListTable(el, ctx, depth) {
2342
2350
  const sink = [];
2343
2351
  const st = { rows: [], currentRow: [], cell: null };
2344
2352
  walkSection(el, sink, st, [], ctx, depth + 1);
2345
- let flat = _chunk5AXGFJQOcjs.convertTableToText.call(void 0, st.rows);
2353
+ let flat = _chunkM4BQRAOMcjs.convertTableToText.call(void 0, st.rows);
2346
2354
  if (st.caption) flat = st.caption + (flat ? "\n" + flat : "");
2347
2355
  return flat;
2348
2356
  }
@@ -2375,7 +2383,7 @@ function walkParagraphChildren(node, blocks, tableCtx, tableStack, ctx, depth =
2375
2383
  const tag = el.tagName || el.localName || "";
2376
2384
  const localTag = tag.replace(/^[^:]+:/, "");
2377
2385
  if (localTag === "tbl") {
2378
- if (onTbl && isInlineTbl(el)) onTbl();
2386
+ if (onTbl) onTbl();
2379
2387
  if (!tableCtx) {
2380
2388
  const chan = kordocTableChannel(el, ctx);
2381
2389
  if (chan) {
@@ -2386,7 +2394,7 @@ function walkParagraphChildren(node, blocks, tableCtx, tableStack, ctx, depth =
2386
2394
  }
2387
2395
  }
2388
2396
  if (tableCtx) tableStack.push(tableCtx);
2389
- const newTable = { rows: [], currentRow: [], cell: null };
2397
+ const newTable = { rows: [], currentRow: [], cell: null, inline: isInlineTbl(el) };
2390
2398
  walkSection(el, blocks, newTable, tableStack, ctx, d + 1);
2391
2399
  tableCtx = completeTable(newTable, tableStack, blocks, ctx);
2392
2400
  } else if (localTag === "caption" && !inShape) {
@@ -2479,7 +2487,7 @@ function extractHyperlinkHref(fieldBegin) {
2479
2487
  let url = (ch.textContent || "").trim();
2480
2488
  if (!url) continue;
2481
2489
  url = url.replace(/^https?:\/\/(?=https?:\/\/)/i, "");
2482
- const safe = _chunkCWP56BRCcjs.sanitizeHref.call(void 0, url);
2490
+ const safe = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, url);
2483
2491
  if (safe) return safe;
2484
2492
  }
2485
2493
  return void 0;
@@ -2639,7 +2647,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
2639
2647
  case "hyperlink": {
2640
2648
  const url = child.getAttribute("url") || child.getAttribute("href") || "";
2641
2649
  if (url) {
2642
- const safe = _chunkCWP56BRCcjs.sanitizeHref.call(void 0, url);
2650
+ const safe = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, url);
2643
2651
  if (safe) href = safe;
2644
2652
  }
2645
2653
  walk(child, depth + 1);
@@ -2913,7 +2921,7 @@ function decompressStream(data) {
2913
2921
  return _zlib.inflateRawSync.call(void 0, data, opts);
2914
2922
  }
2915
2923
  function parseFileHeader(data) {
2916
- if (data.length < 40) throw new (0, _chunkCWP56BRCcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
2924
+ if (data.length < 40) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
2917
2925
  const sig = data.subarray(0, 32).toString("utf8").replace(/\0+$/, "");
2918
2926
  return {
2919
2927
  signature: sig,
@@ -3362,13 +3370,13 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3362
3370
  }
3363
3371
  const allCandidates = resolvedPath ? [resolvedPath, ...candidates] : candidates;
3364
3372
  for (const path of allCandidates) {
3365
- if (_chunkCWP56BRCcjs.isPathTraversal.call(void 0, path)) continue;
3373
+ if (_chunkLHH7AT6Jcjs.isPathTraversal.call(void 0, path)) continue;
3366
3374
  const file = zip.file(path);
3367
3375
  if (!file) continue;
3368
3376
  try {
3369
3377
  const data = await file.async("uint8array");
3370
3378
  decompressed.total += data.length;
3371
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3379
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3372
3380
  const ext = path.includes(".") ? path.split(".").pop() || "png" : "png";
3373
3381
  const mimeType = imageExtToMime(ext);
3374
3382
  imageIndex++;
@@ -3378,7 +3386,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3378
3386
  usedPaths.add(path);
3379
3387
  break;
3380
3388
  } catch (err) {
3381
- if (err instanceof _chunkCWP56BRCcjs.KordocError) throw err;
3389
+ if (err instanceof _chunkLHH7AT6Jcjs.KordocError) throw err;
3382
3390
  }
3383
3391
  }
3384
3392
  if (!img) _optionalChain([warnings, 'optionalAccess', _78 => _78.push, 'call', _79 => _79({ page: block.pageNumber, message: `\uC774\uBBF8\uC9C0 \uD30C\uC77C \uC5C6\uC74C: ${ref}`, code: "SKIPPED_IMAGE" })]);
@@ -3398,11 +3406,11 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3398
3406
  if (sweepUnreferenced) {
3399
3407
  const binEntries = zip.file(/(?:^|\/)BinData\//i);
3400
3408
  for (const file of binEntries) {
3401
- if (file.dir || usedPaths.has(file.name) || _chunkCWP56BRCcjs.isPathTraversal.call(void 0, file.name)) continue;
3409
+ if (file.dir || usedPaths.has(file.name) || _chunkLHH7AT6Jcjs.isPathTraversal.call(void 0, file.name)) continue;
3402
3410
  try {
3403
3411
  const data = await file.async("uint8array");
3404
3412
  decompressed.total += data.length;
3405
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3413
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3406
3414
  const ext = file.name.includes(".") ? file.name.split(".").pop() || "" : "";
3407
3415
  let mimeType = imageExtToMime(ext);
3408
3416
  if (mimeType === "application/octet-stream") {
@@ -3416,7 +3424,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3416
3424
  images.push(img);
3417
3425
  blocks.push({ type: "image", text: filename, imageData: { data, mimeType, filename: file.name } });
3418
3426
  } catch (err) {
3419
- if (err instanceof _chunkCWP56BRCcjs.KordocError) throw err;
3427
+ if (err instanceof _chunkLHH7AT6Jcjs.KordocError) throw err;
3420
3428
  _optionalChain([warnings, 'optionalAccess', _80 => _80.push, 'call', _81 => _81({ message: `\uC774\uBBF8\uC9C0 \uCD94\uCD9C \uC2E4\uD328: ${file.name}`, code: "SKIPPED_IMAGE" })]);
3421
3429
  }
3422
3430
  }
@@ -3467,7 +3475,7 @@ function extractFromBrokenZip(buffer) {
3467
3475
  }
3468
3476
  const nameBytes = data.slice(pos + 30, pos + 30 + nameLen);
3469
3477
  const name = new TextDecoder().decode(nameBytes);
3470
- if (_chunkCWP56BRCcjs.isPathTraversal.call(void 0, name)) {
3478
+ if (_chunkLHH7AT6Jcjs.isPathTraversal.call(void 0, name)) {
3471
3479
  pos = fileStart + compSize;
3472
3480
  continue;
3473
3481
  }
@@ -3485,16 +3493,16 @@ function extractFromBrokenZip(buffer) {
3485
3493
  continue;
3486
3494
  }
3487
3495
  totalDecompressed += content.length * 2;
3488
- if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3496
+ if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3489
3497
  sectionNum++;
3490
3498
  blocks.push(...parseSectionXml(content, void 0, warnings, sectionNum, shared));
3491
3499
  } catch (e16) {
3492
3500
  continue;
3493
3501
  }
3494
3502
  }
3495
- if (blocks.length === 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3503
+ if (blocks.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3496
3504
  applyPageText(blocks, shared);
3497
- const markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks);
3505
+ const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
3498
3506
  return { markdown, blocks, warnings: warnings.length > 0 ? warnings : void 0 };
3499
3507
  }
3500
3508
  async function readKordocLayout(zip) {
@@ -3519,18 +3527,18 @@ async function resolveSectionPaths(zip) {
3519
3527
  if (paths.length > 0) return paths;
3520
3528
  }
3521
3529
  const sectionFiles = zip.file(/[Ss]ection\d+\.xml$/);
3522
- return sectionFiles.map((f) => f.name).sort(_chunkCWP56BRCcjs.compareSectionPaths);
3530
+ return sectionFiles.map((f) => f.name).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
3523
3531
  }
3524
3532
  function parseSectionPathsFromManifest(xml) {
3525
3533
  const parser = createXmlParser();
3526
- const doc = parser.parseFromString(_chunkCWP56BRCcjs.stripDtd.call(void 0, xml), "text/xml");
3534
+ const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
3527
3535
  const items = doc.getElementsByTagName("opf:item");
3528
3536
  const spine = doc.getElementsByTagName("opf:itemref");
3529
3537
  const idToHref = /* @__PURE__ */ new Map();
3530
3538
  for (let i = 0; i < items.length; i++) {
3531
3539
  const item = items[i];
3532
3540
  const id = item.getAttribute("id") || "";
3533
- const href = _chunkCWP56BRCcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3541
+ const href = _chunkLHH7AT6Jcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3534
3542
  if (id && href) idToHref.set(id, href);
3535
3543
  }
3536
3544
  if (spine.length > 0) {
@@ -3541,7 +3549,7 @@ function parseSectionPathsFromManifest(xml) {
3541
3549
  }
3542
3550
  if (ordered.length > 0) return ordered;
3543
3551
  }
3544
- return Array.from(idToHref.values()).sort(_chunkCWP56BRCcjs.compareSectionPaths);
3552
+ return Array.from(idToHref.values()).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
3545
3553
  }
3546
3554
 
3547
3555
  // src/hwpx/metadata.ts
@@ -3554,7 +3562,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3554
3562
  const xml = await file.async("text");
3555
3563
  if (decompressed) {
3556
3564
  decompressed.total += xml.length * 2;
3557
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3565
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3558
3566
  }
3559
3567
  parseDublinCoreMetadata(xml, metadata);
3560
3568
  if (metadata.title || metadata.author) return;
@@ -3564,7 +3572,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3564
3572
  }
3565
3573
  function parseDublinCoreMetadata(xml, metadata) {
3566
3574
  const parser = createXmlParser();
3567
- const doc = parser.parseFromString(_chunkCWP56BRCcjs.stripDtd.call(void 0, xml), "text/xml");
3575
+ const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
3568
3576
  if (!doc.documentElement) return;
3569
3577
  const getText = (tagNames) => {
3570
3578
  for (const tag of tagNames) {
@@ -3589,7 +3597,7 @@ function parseDublinCoreMetadata(xml, metadata) {
3589
3597
 
3590
3598
  // src/hwpx/parser.ts
3591
3599
  async function parseHwpxDocument(buffer, options) {
3592
- _chunkCWP56BRCcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3600
+ _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3593
3601
  let zip;
3594
3602
  try {
3595
3603
  zip = await _jszip2.default.loadAsync(buffer);
@@ -3598,7 +3606,7 @@ async function parseHwpxDocument(buffer, options) {
3598
3606
  }
3599
3607
  const actualEntryCount = Object.keys(zip.files).length;
3600
3608
  if (actualEntryCount > MAX_ZIP_ENTRIES) {
3601
- throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3609
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3602
3610
  }
3603
3611
  const manifestFile = zip.file("META-INF/manifest.xml");
3604
3612
  if (manifestFile) {
@@ -3610,7 +3618,7 @@ async function parseHwpxDocument(buffer, options) {
3610
3618
  return comResultToParseResult(pages, pageCount, warnings2);
3611
3619
  }
3612
3620
  }
3613
- throw new (0, _chunkCWP56BRCcjs.KordocError)("DRM \uC554\uD638\uD654\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4. Windows + \uD55C\uCEF4 \uC624\uD53C\uC2A4 \uC124\uCE58 \uC2DC \uC790\uB3D9 \uCD94\uCD9C\uB429\uB2C8\uB2E4.");
3621
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("DRM \uC554\uD638\uD654\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4. Windows + \uD55C\uCEF4 \uC624\uD53C\uC2A4 \uC124\uCE58 \uC2DC \uC790\uB3D9 \uCD94\uCD9C\uB429\uB2C8\uB2E4.");
3614
3622
  }
3615
3623
  }
3616
3624
  const decompressed = { total: 0 };
@@ -3619,7 +3627,7 @@ async function parseHwpxDocument(buffer, options) {
3619
3627
  const styleMap = await extractHwpxStyles(zip, decompressed);
3620
3628
  const warnings = [];
3621
3629
  const sectionPaths = await resolveSectionPaths(zip);
3622
- if (sectionPaths.length === 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3630
+ if (sectionPaths.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3623
3631
  metadata.pageCount = sectionPaths.length;
3624
3632
  const pageFilter = _optionalChain([options, 'optionalAccess', _90 => _90.pages]) ? _chunkDCZVOIEOcjs.parsePageRange.call(void 0, options.pages, sectionPaths.length) : null;
3625
3633
  const totalTarget = pageFilter ? pageFilter.size : sectionPaths.length;
@@ -3648,7 +3656,7 @@ async function parseHwpxDocument(buffer, options) {
3648
3656
  const images = await extractImagesFromZip(zip, blocks, decompressed, warnings, !pageFilter);
3649
3657
  detectHwpxHeadings(blocks, styleMap);
3650
3658
  const outline = blocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
3651
- const markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks);
3659
+ const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
3652
3660
  return { markdown, blocks, metadata, outline: outline.length > 0 ? outline : void 0, warnings: warnings.length > 0 ? warnings : void 0, images: images.length > 0 ? images : void 0 };
3653
3661
  }
3654
3662
 
@@ -4827,7 +4835,7 @@ function parseHwp5Document(buffer, options) {
4827
4835
  lenientCfb = parseLenientCfb(buffer);
4828
4836
  warnings.push({ message: "\uC190\uC0C1\uB41C CFB \uCEE8\uD14C\uC774\uB108 \u2014 lenient \uBAA8\uB4DC\uB85C \uBCF5\uAD6C", code: "LENIENT_CFB_RECOVERY" });
4829
4837
  } catch (e22) {
4830
- throw new (0, _chunkCWP56BRCcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
4838
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
4831
4839
  }
4832
4840
  }
4833
4841
  const findStream = (path) => {
@@ -4838,11 +4846,11 @@ function parseHwp5Document(buffer, options) {
4838
4846
  return lenientCfb.findStream(path);
4839
4847
  };
4840
4848
  const headerData = findStream("/FileHeader");
4841
- if (!headerData) throw new (0, _chunkCWP56BRCcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
4849
+ if (!headerData) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
4842
4850
  const header = parseFileHeader(headerData);
4843
- if (header.signature !== "HWP Document File") throw new (0, _chunkCWP56BRCcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
4844
- if (header.flags & FLAG_ENCRYPTED) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC554\uD638\uD654\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4845
- if (header.flags & FLAG_DRM) throw new (0, _chunkCWP56BRCcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4851
+ if (header.signature !== "HWP Document File") throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
4852
+ if (header.flags & FLAG_ENCRYPTED) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC554\uD638\uD654\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4853
+ if (header.flags & FLAG_DRM) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4846
4854
  const compressed = (header.flags & FLAG_COMPRESSED) !== 0;
4847
4855
  const distribution = (header.flags & FLAG_DISTRIBUTION) !== 0;
4848
4856
  const metadata = {
@@ -4851,7 +4859,7 @@ function parseHwp5Document(buffer, options) {
4851
4859
  if (cfb) extractHwp5Metadata(cfb, metadata);
4852
4860
  const docInfo = cfb ? parseDocInfoStream(cfb, compressed) : parseDocInfoFromStream(findStream("/DocInfo"), compressed);
4853
4861
  const sections = distribution ? cfb ? findViewTextSections(cfb, compressed) : findViewTextSectionsLenient(lenientCfb, compressed) : cfb ? findSections(cfb) : findSectionsLenient(lenientCfb, compressed);
4854
- if (sections.length === 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
4862
+ if (sections.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
4855
4863
  metadata.pageCount = sections.length;
4856
4864
  const pageFilter = _optionalChain([options, 'optionalAccess', _95 => _95.pages]) ? _chunkDCZVOIEOcjs.parsePageRange.call(void 0, options.pages, sections.length) : null;
4857
4865
  const totalTarget = pageFilter ? pageFilter.size : sections.length;
@@ -4866,22 +4874,22 @@ function parseHwp5Document(buffer, options) {
4866
4874
  const sectionData = sections[si];
4867
4875
  const data = !distribution && compressed ? decompressStream(Buffer.from(sectionData)) : Buffer.from(sectionData);
4868
4876
  totalDecompressed += data.length;
4869
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
4877
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
4870
4878
  const records = readRecords(data);
4871
4879
  const sectionBlocks = parseSection(records, docInfo, warnings, si + 1, doc);
4872
4880
  bodyBlocks.push(...sectionBlocks);
4873
4881
  parsedSections++;
4874
4882
  _optionalChain([options, 'optionalAccess', _97 => _97.onProgress, 'optionalCall', _98 => _98(parsedSections, totalTarget)]);
4875
4883
  } catch (secErr) {
4876
- if (secErr instanceof _chunkCWP56BRCcjs.KordocError) throw secErr;
4884
+ if (secErr instanceof _chunkLHH7AT6Jcjs.KordocError) throw secErr;
4877
4885
  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" });
4878
4886
  }
4879
4887
  }
4880
4888
  const blocks = [...doc.headerBlocks, ...bodyBlocks, ...doc.footerBlocks];
4881
4889
  const images = cfb ? extractHwp5Images(cfb.FileIndex, blocks, warnings, !pageFilter) : extractHwp5ImagesLenient(lenientCfb, blocks, warnings, !pageFilter);
4882
- let flatBlocks = _chunk5AXGFJQOcjs.flattenLayoutTables.call(void 0, blocks);
4890
+ let flatBlocks = _chunkM4BQRAOMcjs.flattenLayoutTables.call(void 0, blocks);
4883
4891
  if (_optionalChain([options, 'optionalAccess', _99 => _99.dedupeRunningHeaders])) {
4884
- const deduped = _chunk5AXGFJQOcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
4892
+ const deduped = _chunkM4BQRAOMcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
4885
4893
  const removed = flatBlocks.length - deduped.length;
4886
4894
  if (removed > 0) warnings.push({ message: `\uBC18\uBCF5 \uB7EC\uB2DD \uD5E4\uB354 ${removed}\uAC1C \uC81C\uAC70`, code: "HIDDEN_TEXT_FILTERED" });
4887
4895
  flatBlocks = deduped;
@@ -4890,10 +4898,10 @@ function parseHwp5Document(buffer, options) {
4890
4898
  detectHwp5Headings(flatBlocks, docInfo);
4891
4899
  }
4892
4900
  const outline = flatBlocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
4893
- let markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, flatBlocks);
4901
+ let markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, flatBlocks);
4894
4902
  if (_optionalChain([options, 'optionalAccess', _100 => _100.inlineImages]) && images.length > 0) {
4895
4903
  try {
4896
- markdown = _chunk5AXGFJQOcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
4904
+ markdown = _chunkM4BQRAOMcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
4897
4905
  } catch (inlineErr) {
4898
4906
  warnings.push({ message: `\uC774\uBBF8\uC9C0 \uC778\uB77C\uC778 \uC2E4\uD328 \u2014 \uC6D0\uBCF8 \uD30C\uC77C \uCC38\uC870\uB85C \uD3F4\uBC31: ${inlineErr instanceof Error ? inlineErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "SKIPPED_IMAGE" });
4899
4907
  }
@@ -4957,9 +4965,9 @@ function detectHwp5Headings(blocks, docInfo) {
4957
4965
  let level = 0;
4958
4966
  if (_optionalChain([block, 'access', _105 => _105.style, 'optionalAccess', _106 => _106.fontSize]) && baseFontSize > 0) {
4959
4967
  const ratio = block.style.fontSize / baseFontSize;
4960
- if (ratio >= _chunkCWP56BRCcjs.HEADING_RATIO_H1) level = 1;
4961
- else if (ratio >= _chunkCWP56BRCcjs.HEADING_RATIO_H2) level = 2;
4962
- else if (ratio >= _chunkCWP56BRCcjs.HEADING_RATIO_H3) level = 3;
4968
+ if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H1) level = 1;
4969
+ else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H2) level = 2;
4970
+ else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H3) level = 3;
4963
4971
  }
4964
4972
  if (/^제\d+[장절편]\s/.test(text) && text.length <= 50) {
4965
4973
  if (level === 0) level = 2;
@@ -5044,7 +5052,7 @@ function findSectionsLenient(lcfb, compressed) {
5044
5052
  if (!raw) break;
5045
5053
  const content = compressed ? decompressStream(raw) : raw;
5046
5054
  totalDecompressed += content.length;
5047
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5055
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5048
5056
  sections.push({ idx: i, content });
5049
5057
  }
5050
5058
  if (sections.length === 0) {
@@ -5056,7 +5064,7 @@ function findSectionsLenient(lcfb, compressed) {
5056
5064
  if (raw) {
5057
5065
  const content = compressed ? decompressStream(raw) : raw;
5058
5066
  totalDecompressed += content.length;
5059
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5067
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5060
5068
  sections.push({ idx, content });
5061
5069
  }
5062
5070
  }
@@ -5073,7 +5081,7 @@ function findViewTextSectionsLenient(lcfb, compressed) {
5073
5081
  try {
5074
5082
  const content = decryptViewText(raw, compressed);
5075
5083
  totalDecompressed += content.length;
5076
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5084
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5077
5085
  sections.push({ idx: i, content });
5078
5086
  } catch (e27) {
5079
5087
  break;
@@ -5176,7 +5184,7 @@ function parseParagraph(records, start, end, ctx) {
5176
5184
  const ctrl = ctrls[r.ctrlIdx];
5177
5185
  if (!_optionalChain([ctrl, 'optionalAccess', _113 => _113.href]) || r.end <= r.start) continue;
5178
5186
  if (applied.some(([s, e]) => r.start < e && r.end > s)) continue;
5179
- const href = _chunkCWP56BRCcjs.sanitizeHref.call(void 0, ctrl.href);
5187
+ const href = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, ctrl.href);
5180
5188
  if (!href) continue;
5181
5189
  const anchor = text.slice(r.start, r.end);
5182
5190
  if (!anchor.trim()) continue;
@@ -5412,8 +5420,8 @@ function parseTableControl(ctrl, records, ctx) {
5412
5420
  let tableIdx = -1;
5413
5421
  for (let i2 = childStart; i2 < childEnd; i2++) {
5414
5422
  if (records[i2].tagId === TAG_TABLE && records[i2].data.length >= 8) {
5415
- rows = Math.min(records[i2].data.readUInt16LE(4), _chunk5AXGFJQOcjs.MAX_ROWS);
5416
- cols = Math.min(records[i2].data.readUInt16LE(6), _chunk5AXGFJQOcjs.MAX_COLS);
5423
+ rows = Math.min(records[i2].data.readUInt16LE(4), _chunkM4BQRAOMcjs.MAX_ROWS);
5424
+ cols = Math.min(records[i2].data.readUInt16LE(6), _chunkM4BQRAOMcjs.MAX_COLS);
5417
5425
  tableIdx = i2;
5418
5426
  break;
5419
5427
  }
@@ -5462,7 +5470,7 @@ function parseTableControl(ctrl, records, ctx) {
5462
5470
  return table3;
5463
5471
  }
5464
5472
  const cellRows = arrangeCells(rows, cols, cells);
5465
- const table2 = _chunk5AXGFJQOcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5473
+ const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5466
5474
  if (caption && table2.rows > 0) table2.caption = caption;
5467
5475
  return table2.rows > 0 ? table2 : null;
5468
5476
  }
@@ -5479,8 +5487,8 @@ function parseCell(records, lhIdx, end, ctx) {
5479
5487
  rowAddr = rec.data.readUInt16LE(10);
5480
5488
  const cs = rec.data.readUInt16LE(12);
5481
5489
  const rs = rec.data.readUInt16LE(14);
5482
- if (cs > 0) colSpan = Math.min(cs, _chunk5AXGFJQOcjs.MAX_COLS);
5483
- if (rs > 0) rowSpan = Math.min(rs, _chunk5AXGFJQOcjs.MAX_ROWS);
5490
+ if (cs > 0) colSpan = Math.min(cs, _chunkM4BQRAOMcjs.MAX_COLS);
5491
+ if (rs > 0) rowSpan = Math.min(rs, _chunkM4BQRAOMcjs.MAX_ROWS);
5484
5492
  }
5485
5493
  const blocks = ctx.depth < MAX_NEST_DEPTH ? parseParagraphList(records, lhIdx + 1, end, { ...ctx, depth: ctx.depth + 1 }) : [];
5486
5494
  const parts = [];
@@ -5490,7 +5498,7 @@ function parseCell(records, lhIdx, end, ctx) {
5490
5498
  parts.push(`![image](hwp5bin:${b.text})`);
5491
5499
  hasStructure = true;
5492
5500
  } else if (b.type === "table" && b.table) {
5493
- const flat = _chunk5AXGFJQOcjs.convertTableToText.call(void 0, b.table.cells);
5501
+ const flat = _chunkM4BQRAOMcjs.convertTableToText.call(void 0, b.table.cells);
5494
5502
  if (flat) parts.push(flat);
5495
5503
  hasStructure = true;
5496
5504
  } else if (b.text) {
@@ -17985,7 +17993,7 @@ function getTextContent(el) {
17985
17993
  return _nullishCoalesce(_optionalChain([el, 'access', _129 => _129.textContent, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()]), () => ( ""));
17986
17994
  }
17987
17995
  function parseXml(text) {
17988
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkCWP56BRCcjs.stripDtd.call(void 0, text), "text/xml");
17996
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, text), "text/xml");
17989
17997
  }
17990
17998
  function collectRichText(root) {
17991
17999
  let out = "";
@@ -18220,7 +18228,7 @@ function sheetToBlocks(sheetName, grid, merges, maxRow, maxCol, sheetIndex, keep
18220
18228
  cellRows.push(row);
18221
18229
  }
18222
18230
  if (cellRows.length > 0) {
18223
- const table2 = _chunk5AXGFJQOcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18231
+ const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18224
18232
  if (table2.rows > 0) {
18225
18233
  blocks.push({ type: "table", table: table2, pageNumber: sheetIndex + 1 });
18226
18234
  }
@@ -18228,12 +18236,12 @@ function sheetToBlocks(sheetName, grid, merges, maxRow, maxCol, sheetIndex, keep
18228
18236
  return blocks;
18229
18237
  }
18230
18238
  async function parseXlsxDocument(buffer, options) {
18231
- _chunkCWP56BRCcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
18239
+ _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
18232
18240
  const zip = await _jszip2.default.loadAsync(buffer);
18233
18241
  const warnings = [];
18234
18242
  const workbookFile = zip.file("xl/workbook.xml");
18235
18243
  if (!workbookFile) {
18236
- throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18244
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18237
18245
  }
18238
18246
  let sharedStrings = [];
18239
18247
  const ssFile = zip.file("xl/sharedStrings.xml");
@@ -18242,7 +18250,7 @@ async function parseXlsxDocument(buffer, options) {
18242
18250
  }
18243
18251
  const { sheets, date1904 } = parseWorkbook(await workbookFile.async("text"));
18244
18252
  if (sheets.length === 0) {
18245
- throw new (0, _chunkCWP56BRCcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
18253
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
18246
18254
  }
18247
18255
  let dateXfs = /* @__PURE__ */ new Map();
18248
18256
  const stylesFile = zip.file("xl/styles.xml");
@@ -18322,7 +18330,7 @@ async function parseXlsxDocument(buffer, options) {
18322
18330
  } catch (e29) {
18323
18331
  }
18324
18332
  }
18325
- const markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks);
18333
+ const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
18326
18334
  return { markdown, blocks, metadata, warnings: warnings.length > 0 ? warnings : void 0 };
18327
18335
  }
18328
18336
 
@@ -18773,11 +18781,11 @@ function processGlobals(records) {
18773
18781
  const xfFmtIds = [];
18774
18782
  const firstBof = records[0];
18775
18783
  if (!firstBof || firstBof.opcode !== OP_BOF) {
18776
- throw new (0, _chunkCWP56BRCcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
18784
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
18777
18785
  }
18778
18786
  const bof = decodeBof(firstBof.data);
18779
18787
  if (!bof || bof.dt !== DT_GLOBALS) {
18780
- throw new (0, _chunkCWP56BRCcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
18788
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
18781
18789
  }
18782
18790
  let i = 1;
18783
18791
  while (i < records.length) {
@@ -18912,7 +18920,7 @@ function sheetToBlocks2(sheetName, sheet, sheetIndex, keepAnchoredEmptyCols) {
18912
18920
  cellRows.push(row);
18913
18921
  }
18914
18922
  if (cellRows.length > 0) {
18915
- const table2 = _chunk5AXGFJQOcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18923
+ const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18916
18924
  if (table2.rows > 0) {
18917
18925
  blocks.push({ type: "table", table: table2, pageNumber: sheetIndex + 1 });
18918
18926
  }
@@ -18925,21 +18933,21 @@ async function parseXlsDocument(buffer, options) {
18925
18933
  try {
18926
18934
  cfb = parseLenientCfb(buf);
18927
18935
  } catch (e) {
18928
- throw new (0, _chunkCWP56BRCcjs.KordocError)(
18936
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
18929
18937
  `XLS: OLE2 \uC2DC\uADF8\uB2C8\uCC98 \uAC80\uC99D \uC2E4\uD328 \u2014 ${e instanceof Error ? e.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`
18930
18938
  );
18931
18939
  }
18932
18940
  const wb = _nullishCoalesce(cfb.findStream("/Workbook"), () => ( cfb.findStream("/Book")));
18933
18941
  if (!wb) {
18934
- throw new (0, _chunkCWP56BRCcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
18942
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
18935
18943
  }
18936
18944
  const records = readRecords2(wb);
18937
18945
  if (records.length === 0) {
18938
- throw new (0, _chunkCWP56BRCcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
18946
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
18939
18947
  }
18940
18948
  const firstBof = decodeBof(records[0].data);
18941
18949
  if (firstBof && firstBof.vers !== 1536) {
18942
- throw new (0, _chunkCWP56BRCcjs.KordocError)(
18950
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
18943
18951
  `XLS: BIFF8(0x0600)\uB9CC \uC9C0\uC6D0 \u2014 \uBCF8 \uD30C\uC77C\uC740 0x${firstBof.vers.toString(16)}`
18944
18952
  );
18945
18953
  }
@@ -19007,7 +19015,7 @@ async function parseXlsDocument(buffer, options) {
19007
19015
  pageCount: totalSheets
19008
19016
  };
19009
19017
  return {
19010
- markdown: _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, allBlocks),
19018
+ markdown: _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, allBlocks),
19011
19019
  blocks: allBlocks,
19012
19020
  metadata,
19013
19021
  warnings: warnings.length > 0 ? warnings : void 0
@@ -19463,7 +19471,7 @@ function getAttr(el, localName2) {
19463
19471
  return null;
19464
19472
  }
19465
19473
  function parseXml2(text) {
19466
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkCWP56BRCcjs.stripDtd.call(void 0, text), "text/xml");
19474
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, text), "text/xml");
19467
19475
  }
19468
19476
  function parseStyles(xml) {
19469
19477
  const doc = parseXml2(xml);
@@ -19621,7 +19629,7 @@ function fieldUrlFromInstr(instr) {
19621
19629
  function makeLink(text, rawHref) {
19622
19630
  if (!text) return "";
19623
19631
  if (!rawHref) return text;
19624
- const href = _chunkCWP56BRCcjs.sanitizeHref.call(void 0, rawHref);
19632
+ const href = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, rawHref);
19625
19633
  return href ? `[${text}](${href})` : text;
19626
19634
  }
19627
19635
  function collectInline(p, footnotes, rels) {
@@ -19815,7 +19823,7 @@ ${cell2.text}` : cell2.text;
19815
19823
  return { text: cell2.text, colSpan: cell2.colSpan, rowSpan, colAddr: cell2.col, rowAddr: r };
19816
19824
  })
19817
19825
  );
19818
- const table2 = _chunk5AXGFJQOcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
19826
+ const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
19819
19827
  if (table2.rows === 0 || table2.cols === 0) return null;
19820
19828
  return { type: "table", table: table2 };
19821
19829
  }
@@ -19917,12 +19925,12 @@ function emitParagraphImages(p, imageMap, linked, out) {
19917
19925
  }
19918
19926
  }
19919
19927
  async function parseDocxDocument(buffer, options) {
19920
- _chunkCWP56BRCcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5);
19928
+ _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5);
19921
19929
  const zip = await _jszip2.default.loadAsync(buffer);
19922
19930
  const warnings = [];
19923
19931
  const docFile = zip.file("word/document.xml");
19924
19932
  if (!docFile) {
19925
- throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19933
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19926
19934
  }
19927
19935
  let rels = /* @__PURE__ */ new Map();
19928
19936
  const relsFile = zip.file("word/_rels/document.xml.rels");
@@ -19969,7 +19977,7 @@ async function parseDocxDocument(buffer, options) {
19969
19977
  const doc = parseXml2(docXml);
19970
19978
  const body = findElements(doc, "body");
19971
19979
  if (body.length === 0) {
19972
- throw new (0, _chunkCWP56BRCcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
19980
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
19973
19981
  }
19974
19982
  const { imageMap, images } = await buildImageMap(zip, rels, doc, warnings);
19975
19983
  const linkedImages = /* @__PURE__ */ new Set();
@@ -20020,7 +20028,7 @@ async function parseDocxDocument(buffer, options) {
20020
20028
  }
20021
20029
  }
20022
20030
  const outline = blocks.filter((b) => b.type === "heading").map((b) => ({ level: _nullishCoalesce(b.level, () => ( 2)), text: _nullishCoalesce(b.text, () => ( "")) }));
20023
- const markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks);
20031
+ const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
20024
20032
  return {
20025
20033
  markdown,
20026
20034
  blocks,
@@ -20043,7 +20051,7 @@ function parseHwpmlDocument(buffer, options) {
20043
20051
  }
20044
20052
  const text = new TextDecoder("utf-8").decode(buffer).replace(/^\uFEFF/, "");
20045
20053
  const normalized = text.replace(/&nbsp;/g, "&#160;");
20046
- const xml = _chunkCWP56BRCcjs.stripDtd.call(void 0, normalized);
20054
+ const xml = _chunkLHH7AT6Jcjs.stripDtd.call(void 0, normalized);
20047
20055
  const warnings = [];
20048
20056
  const parser = new (0, _xmldom.DOMParser)({
20049
20057
  onError: (_level, msg2) => {
@@ -20083,7 +20091,7 @@ function parseHwpmlDocument(buffer, options) {
20083
20091
  parseSection2(el, blocks, paraShapeMap, sectionIdx, warnings, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _178 => _178.keepTrailingEmptyCols]), () => ( false)));
20084
20092
  }
20085
20093
  const outline = blocks.filter((b) => b.type === "heading" && b.text).map((b) => ({ level: _nullishCoalesce(b.level, () => ( 1)), text: b.text, pageNumber: b.pageNumber }));
20086
- const markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks);
20094
+ const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
20087
20095
  return {
20088
20096
  markdown,
20089
20097
  blocks,
@@ -20228,7 +20236,7 @@ function parseTable2(el, blocks, paraShapeMap, sectionNum, warnings, keep) {
20228
20236
  const r = Math.min(Math.max(_nullishCoalesce(cell2.rowAddr, () => ( 0)), 0), rowCount - 1);
20229
20237
  cellRows[r].push(cell2);
20230
20238
  }
20231
- const table2 = _chunk5AXGFJQOcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
20239
+ const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
20232
20240
  const caption = extractShapeCaption(el);
20233
20241
  if (caption.text && caption.before) {
20234
20242
  blocks.push({ type: "paragraph", text: caption.text, pageNumber: sectionNum });
@@ -21610,19 +21618,19 @@ function parseCentralDirectory(buf) {
21610
21618
  }
21611
21619
  }
21612
21620
  }
21613
- if (eocdOffset < 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21621
+ if (eocdOffset < 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21614
21622
  const totalEntries = view.getUint16(eocdOffset + 10, true);
21615
21623
  const cdSize = view.getUint32(eocdOffset + 12, true);
21616
21624
  const cdOffset = view.getUint32(eocdOffset + 16, true);
21617
- if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21625
+ if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21618
21626
  if (eocdOffset >= 20 && view.getUint32(eocdOffset - 20, true) === ZIP64_EOCD_LOC_SIG) {
21619
- throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21627
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21620
21628
  }
21621
21629
  const decoder = new TextDecoder("utf-8");
21622
21630
  const entries = [];
21623
21631
  let pos = cdOffset;
21624
21632
  for (let i = 0; i < totalEntries; i++) {
21625
- if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
21633
+ if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
21626
21634
  const flags = view.getUint16(pos + 8, true);
21627
21635
  const method = view.getUint16(pos + 10, true);
21628
21636
  const crc = view.getUint32(pos + 16, true);
@@ -21633,7 +21641,7 @@ function parseCentralDirectory(buf) {
21633
21641
  const commentLen = view.getUint16(pos + 32, true);
21634
21642
  const localOffset = view.getUint32(pos + 42, true);
21635
21643
  if (compSize === 4294967295 || uncompSize === 4294967295 || localOffset === 4294967295) {
21636
- throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21644
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21637
21645
  }
21638
21646
  const name = decoder.decode(buf.subarray(pos + 46, pos + 46 + nameLen));
21639
21647
  const cdEnd = pos + 46 + nameLen + extraLen + commentLen;
@@ -21662,11 +21670,11 @@ function patchZipEntries(original, replacements, additions) {
21662
21670
  const { entries, cdOffset, eocdOffset } = parseCentralDirectory(original);
21663
21671
  const view = new DataView(original.buffer, original.byteOffset, original.byteLength);
21664
21672
  for (const name of replacements.keys()) {
21665
- if (!entries.some((e) => e.name === name)) throw new (0, _chunkCWP56BRCcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21673
+ if (!entries.some((e) => e.name === name)) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21666
21674
  }
21667
21675
  if (additions) {
21668
21676
  for (const name of additions.keys()) {
21669
- if (entries.some((e) => e.name === name)) throw new (0, _chunkCWP56BRCcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21677
+ if (entries.some((e) => e.name === name)) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21670
21678
  }
21671
21679
  }
21672
21680
  const byLocal = [...entries].sort((a, b) => a.localOffset - b.localOffset);
@@ -21685,7 +21693,7 @@ function patchZipEntries(original, replacements, additions) {
21685
21693
  offset += seg.length;
21686
21694
  continue;
21687
21695
  }
21688
- if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunkCWP56BRCcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
21696
+ if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
21689
21697
  const nameLen = view.getUint16(e.localOffset + 26, true);
21690
21698
  const extraLen = view.getUint16(e.localOffset + 28, true);
21691
21699
  const headerLen = 30 + nameLen + extraLen;
@@ -21693,7 +21701,7 @@ function patchZipEntries(original, replacements, additions) {
21693
21701
  const hview = new DataView(header.buffer, header.byteOffset, header.byteLength);
21694
21702
  const method = e.method;
21695
21703
  if (method !== 0 && method !== 8) {
21696
- throw new (0, _chunkCWP56BRCcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 ZIP \uC555\uCD95 \uBC29\uC2DD(method=${method}): ${e.name} \u2014 STORE(0)/DEFLATE(8)\uB9CC \uAD50\uCCB4 \uAC00\uB2A5`);
21704
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 ZIP \uC555\uCD95 \uBC29\uC2DD(method=${method}): ${e.name} \u2014 STORE(0)/DEFLATE(8)\uB9CC \uAD50\uCCB4 \uAC00\uB2A5`);
21697
21705
  }
21698
21706
  const compData = method === 0 ? newData : new Uint8Array(_zlib.deflateRawSync.call(void 0, newData));
21699
21707
  const crc = crc32(newData);
@@ -21794,7 +21802,7 @@ async function fillHwpx(hwpxBuffer, values, blockedLabels) {
21794
21802
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
21795
21803
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort();
21796
21804
  if (sectionPaths.length === 0) {
21797
- throw new (0, _chunkCWP56BRCcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21805
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21798
21806
  }
21799
21807
  const warnings = [];
21800
21808
  const normalizedValues = normalizeValues(values, warnings);
@@ -22531,7 +22539,7 @@ function assertSequentialIds(rows, label, startId) {
22531
22539
  const m = rows[i].match(/\bid="(\d+)"/);
22532
22540
  const got = m ? Number(m[1]) : NaN;
22533
22541
  if (got !== startId + i) {
22534
- throw new (0, _chunkCWP56BRCcjs.KordocError)(
22542
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
22535
22543
  `\uB0B4\uBD80 \uC624\uB958: ${label} id \uD30C\uD2F0\uC158 \uB4DC\uB9AC\uD504\uD2B8 \u2014 ${startId + i} \uC704\uCE58\uC5D0 id=${m ? m[1] : "?"} \uBC29\uCD9C. id \uC0C1\uC218(gen-ids)\uC640 \uC2E4\uC81C \uBC29\uCD9C \uC218\uAC00 \uC5B4\uAE0B\uB0AC\uB2E4 (GJ_CHAR_COUNT\uB958 \uCE74\uC6B4\uD2B8\xB7base \uC0B0\uC220 \uD655\uC778)`
22536
22544
  );
22537
22545
  }
@@ -22615,7 +22623,7 @@ function buildCharProperties(theme, gongmun, ratioVariants = [], extraCharPrXmls
22615
22623
  }
22616
22624
  const expectedBase = charVariantBase(richAssets, !!gongmun);
22617
22625
  if (rows.length !== expectedBase) {
22618
- throw new (0, _chunkCWP56BRCcjs.KordocError)(
22626
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
22619
22627
  `\uB0B4\uBD80 \uC624\uB958: charPr \uAE30\uBCF8 \uBE14\uB85D \uBC29\uCD9C \uC218(${rows.length}) \u2260 charVariantBase(${expectedBase}) \u2014 gen-header \uBC29\uCD9C \uD589\uACFC gen-ids \uCE74\uC6B4\uD2B8 \uC0C1\uC218\uAC00 \uC5B4\uAE0B\uB0AC\uB2E4`
22620
22628
  );
22621
22629
  }
@@ -23510,7 +23518,7 @@ function escapeGfm(text) {
23510
23518
  }
23511
23519
  var HWP_SHAPE_ALT_TEXT_RE = /^(?:모서리가 둥근 |둥근 )?(?:사각형|직사각형|정사각형|원|타원|삼각형|이등변 삼각형|직각 삼각형|선|직선|곡선|화살표|굵은 화살표|이중 화살표|오각형|육각형|팔각형|별|[4-8]점별|십자|십자형|구름|구름형|마름모|도넛|평행사변형|사다리꼴|부채꼴|호|반원|물결|번개|하트|빗금|블록 화살표|수식|표|그림|개체|그리기\s?개체|묶음\s?개체|글상자|수식\s?개체|OLE\s?개체)\s?입니다\.?$/gm;
23512
23520
  function sanitizeText(text) {
23513
- let result = _chunk5AXGFJQOcjs.mapPuaText.call(void 0, text).replace(/[\u{F0000}-\u{FFFFD}]/gu, "").replace(HWP_SHAPE_ALT_TEXT_RE, "").replace(/ +/g, " ").trim();
23521
+ let result = _chunkM4BQRAOMcjs.mapPuaText.call(void 0, text).replace(/[\u{F0000}-\u{FFFFD}]/gu, "").replace(HWP_SHAPE_ALT_TEXT_RE, "").replace(/ +/g, " ").trim();
23514
23522
  if (result.length <= 30 && result.includes(" ")) {
23515
23523
  const tokens = result.split(" ");
23516
23524
  const koreanSingleCharCount = tokens.filter((t) => t.length === 1 && /[가-힯ㄱ-ㆎ]/.test(t)).length;
@@ -23682,7 +23690,7 @@ function parseHtmlTable(raw) {
23682
23690
  const cs = parseInt(_optionalChain([attrs, 'access', _285 => _285.match, 'call', _286 => _286(/colspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _287 => _287[1]]) || "1", 10);
23683
23691
  const rs = parseInt(_optionalChain([attrs, 'access', _288 => _288.match, 'call', _289 => _289(/rowspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _290 => _290[1]]) || "1", 10);
23684
23692
  cellStart = m.index + m[0].length;
23685
- cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunk5AXGFJQOcjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunk5AXGFJQOcjs.MAX_ROWS) };
23693
+ cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunkM4BQRAOMcjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunkM4BQRAOMcjs.MAX_ROWS) };
23686
23694
  } else if (cellStart >= 0 && cellInfo && currentRow) {
23687
23695
  currentRow.push({ inner: raw.slice(cellStart, m.index), colSpan: cellInfo.colSpan, rowSpan: cellInfo.rowSpan });
23688
23696
  cellStart = -1;
@@ -24338,8 +24346,8 @@ function layoutHtmlRows(rows) {
24338
24346
  let c = 0;
24339
24347
  for (const cell2 of rows[r].cells) {
24340
24348
  while (occupied.has(`${r},${c}`)) c++;
24341
- const colSpan = clampSpan(cell2.colSpan, _chunk5AXGFJQOcjs.MAX_COLS);
24342
- const rowSpan = clampSpan(cell2.rowSpan, _chunk5AXGFJQOcjs.MAX_ROWS);
24349
+ const colSpan = clampSpan(cell2.colSpan, _chunkM4BQRAOMcjs.MAX_COLS);
24350
+ const rowSpan = clampSpan(cell2.rowSpan, _chunkM4BQRAOMcjs.MAX_ROWS);
24343
24351
  placed.push({ r, c, colSpan, rowSpan, inner: cell2.inner, isHeader: rows[r].tag === "th" });
24344
24352
  for (let dr = 0; dr < rowSpan; dr++) {
24345
24353
  for (let dc = 0; dc < colSpan; dc++) occupied.add(`${r + dr},${c + dc}`);
@@ -25936,11 +25944,11 @@ function buildFloatPicXml(itemId, sizeHu, posXHu, posYHu, ids) {
25936
25944
  return `<hp:pic xmlns:hc="http://www.hancom.co.kr/hwpml/2011/core" id="${ids.id}" zOrder="0" numberingType="PICTURE" textWrap="IN_FRONT_OF_TEXT" textFlow="BOTH_SIDES" lock="0" dropcapstyle="None" href="" groupLevel="0" instid="${ids.instid}" reverse="0"><hp:offset x="0" y="0"/><hp:orgSz width="${w}" height="${h}"/><hp:curSz width="${w}" height="${h}"/><hp:flip horizontal="0" vertical="0"/><hp:rotationInfo angle="0" centerX="${Math.round(w / 2)}" centerY="${Math.round(h / 2)}" rotateimage="1"/><hp:renderingInfo><hc:transMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/><hc:scaMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/><hc:rotMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/></hp:renderingInfo><hp:imgRect><hc:pt0 x="0" y="0"/><hc:pt1 x="${w}" y="0"/><hc:pt2 x="${w}" y="${h}"/><hc:pt3 x="0" y="${h}"/></hp:imgRect><hp:imgClip left="0" right="${w}" top="0" bottom="${h}"/><hp:inMargin left="0" right="0" top="0" bottom="0"/><hp:imgDim dimwidth="${w}" dimheight="${h}"/><hc:img binaryItemIDRef="${itemId}" bright="0" contrast="0" effect="REAL_PIC" alpha="0"/><hp:effects/><hp:sz width="${w}" widthRelTo="ABSOLUTE" height="${h}" heightRelTo="ABSOLUTE" protect="0"/><hp:pos treatAsChar="0" affectLSpacing="0" flowWithText="0" allowOverlap="1" holdAnchorAndSO="0" vertRelTo="PARA" horzRelTo="COLUMN" vertAlign="TOP" horzAlign="LEFT" vertOffset="${posYHu}" horzOffset="${posXHu}"/><hp:outMargin left="0" right="0" top="0" bottom="0"/><hp:shapeComment>kordoc seal</hp:shapeComment></hp:pic>`;
25937
25945
  }
25938
25946
  async function placeSealHwpx(hwpxBuffer, ops) {
25939
- if (ops.length === 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
25947
+ if (ops.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
25940
25948
  const u8 = new Uint8Array(hwpxBuffer);
25941
25949
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
25942
25950
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort((a, b) => Number(_nullishCoalesce(_optionalChain([a, 'access', _392 => _392.match, 'call', _393 => _393(/(\d+)\.xml$/i), 'optionalAccess', _394 => _394[1]]), () => ( 0))) - Number(_nullishCoalesce(_optionalChain([b, 'access', _395 => _395.match, 'call', _396 => _396(/(\d+)\.xml$/i), 'optionalAccess', _397 => _397[1]]), () => ( 0))));
25943
- if (sectionPaths.length === 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
25951
+ if (sectionPaths.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
25944
25952
  const manifestPath = Object.keys(zip.files).find((name) => /\.hpf$/i.test(name));
25945
25953
  const headerPath = Object.keys(zip.files).find((name) => /(^|\/)header\.xml$/i.test(name));
25946
25954
  const styles = headerPath ? parseRenderStyles(await zip.file(headerPath).async("text")) : null;
@@ -25981,11 +25989,11 @@ async function placeSealHwpx(hwpxBuffer, ops) {
25981
25989
  const manifestItems = [];
25982
25990
  const placed = [];
25983
25991
  for (const op of ops) {
25984
- if (!op.anchor) throw new (0, _chunkCWP56BRCcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25985
- if (!op.image || op.image.length === 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25992
+ if (!op.anchor) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25993
+ if (!op.image || op.image.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25986
25994
  const ext = (_nullishCoalesce(op.ext, () => ( "png"))).toLowerCase();
25987
- if (!MIME[ext]) throw new (0, _chunkCWP56BRCcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
25988
- if (!imageMagicMatches(op.image, ext)) throw new (0, _chunkCWP56BRCcjs.KordocError)(`place_seal: \uC774\uBBF8\uC9C0 \uB0B4\uC6A9\uC774 .${ext} \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 (\uB9E4\uC9C1\uBC14\uC774\uD2B8 \uBD88\uC77C\uCE58)`);
25995
+ if (!MIME[ext]) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
25996
+ if (!imageMagicMatches(op.image, ext)) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`place_seal: \uC774\uBBF8\uC9C0 \uB0B4\uC6A9\uC774 .${ext} \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 (\uB9E4\uC9C1\uBC14\uC774\uD2B8 \uBD88\uC77C\uCE58)`);
25989
25997
  const wantOcc = _nullishCoalesce(op.occurrence, () => ( 0));
25990
25998
  let found = null;
25991
25999
  let total = 0;
@@ -26018,7 +26026,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
26018
26026
  }
26019
26027
  }
26020
26028
  }
26021
- throw new (0, _chunkCWP56BRCcjs.KordocError)(
26029
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
26022
26030
  `place_seal: \uC575\uCEE4 "${op.anchor}" ${wantOcc}\uBC88\uC9F8 \uB4F1\uC7A5\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 (\uBCF8\uBB38 \uB0B4 ${total}\uD68C \uB4F1\uC7A5 \u2014 occurrence 0..${Math.max(0, total - 1)})`
26023
26031
  );
26024
26032
  }
@@ -26026,7 +26034,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
26026
26034
  const xml = sectionXmls[si];
26027
26035
  const run = anchorRunInfo(xml, site.para, op.anchor);
26028
26036
  if (!run) {
26029
- throw new (0, _chunkCWP56BRCcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
26037
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
26030
26038
  }
26031
26039
  const charPrHeight = _nullishCoalesce(_optionalChain([styles, 'optionalAccess', _398 => _398.charPr, 'access', _399 => _399.get, 'call', _400 => _400(run.charPr), 'optionalAccess', _401 => _401.height]), () => ( 1e3));
26032
26040
  const fontPt = charPrHeight / 100;
@@ -26304,7 +26312,7 @@ function pick(map, keys) {
26304
26312
  return out;
26305
26313
  }
26306
26314
  async function hwpxToProfile(input) {
26307
- const buf = input instanceof ArrayBuffer ? input : _chunkCWP56BRCcjs.toArrayBuffer.call(void 0, input);
26315
+ const buf = input instanceof ArrayBuffer ? input : _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, input);
26308
26316
  const zip = await _jszip2.default.loadAsync(buf);
26309
26317
  const parser = createXmlParser();
26310
26318
  const headerFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( _optionalChain([zip, 'access', _423 => _423.file, 'call', _424 => _424(/[Hh]eader\.xml$/), 'optionalAccess', _425 => _425[0]])));
@@ -27223,7 +27231,7 @@ async function resolveSectionEntryNames(zip) {
27223
27231
  const paths = sectionPathsFromManifest(xml).filter((p) => zip.file(p) !== null);
27224
27232
  if (paths.length > 0) return paths;
27225
27233
  }
27226
- return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunkCWP56BRCcjs.compareSectionPaths);
27234
+ return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
27227
27235
  }
27228
27236
  function sectionPathsFromManifest(xml) {
27229
27237
  const attr = (tag, name) => {
@@ -27233,7 +27241,7 @@ function sectionPathsFromManifest(xml) {
27233
27241
  const idToHref = /* @__PURE__ */ new Map();
27234
27242
  for (const m of xml.matchAll(/<opf:item(\s(?:"[^"]*"|'[^']*'|[^>"'])*?)\/?>/g)) {
27235
27243
  const id = attr(m[1], "id");
27236
- const href = _chunkCWP56BRCcjs.normalizeSectionHref.call(void 0, attr(m[1], "href"));
27244
+ const href = _chunkLHH7AT6Jcjs.normalizeSectionHref.call(void 0, attr(m[1], "href"));
27237
27245
  if (id && href) idToHref.set(id, href);
27238
27246
  }
27239
27247
  const ordered = [];
@@ -27242,7 +27250,7 @@ function sectionPathsFromManifest(xml) {
27242
27250
  if (href) ordered.push(href);
27243
27251
  }
27244
27252
  if (ordered.length > 0) return ordered;
27245
- return Array.from(idToHref.values()).sort(_chunkCWP56BRCcjs.compareSectionPaths);
27253
+ return Array.from(idToHref.values()).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
27246
27254
  }
27247
27255
 
27248
27256
  // src/roundtrip/patcher.ts
@@ -27353,9 +27361,9 @@ function buildOrigUnits(blocks) {
27353
27361
  if (block.type === "paragraph" && block.text && /^\[별표\s*\d+/.test(sanitizeText(block.text))) {
27354
27362
  const next = blocks[i + 1];
27355
27363
  if (_optionalChain([next, 'optionalAccess', _458 => _458.type]) === "paragraph" && next.text && /관련\)?$/.test(next.text)) consume = 2;
27356
- chunk = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
27364
+ chunk = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
27357
27365
  } else {
27358
- chunk = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, [block]);
27366
+ chunk = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, [block]);
27359
27367
  }
27360
27368
  if (chunk) {
27361
27369
  const subUnits = splitMarkdownUnits(chunk);
@@ -28958,12 +28966,12 @@ function blocksToChunks(blocks, options) {
28958
28966
  let run = null;
28959
28967
  const flushRun = () => {
28960
28968
  if (!run) return;
28961
- push("text", run.breadcrumb, _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, run.blocks), [run.start, run.end], run.page);
28969
+ push("text", run.breadcrumb, _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, run.blocks), [run.start, run.end], run.page);
28962
28970
  run = null;
28963
28971
  };
28964
28972
  for (let i = 0; i < blocks.length; i++) {
28965
28973
  const block = blocks[i];
28966
- const md2 = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, [block]);
28974
+ const md2 = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, [block]);
28967
28975
  if (!md2) continue;
28968
28976
  if (block.type === "heading") {
28969
28977
  flushRun();
@@ -29433,13 +29441,13 @@ async function htmlToPdf(html, options) {
29433
29441
  try {
29434
29442
  puppeteer = await Promise.resolve().then(() => _interopRequireWildcard(require("puppeteer-core")));
29435
29443
  } catch (e32) {
29436
- throw new (0, _chunkCWP56BRCcjs.KordocError)(
29444
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
29437
29445
  "PDF \uC0DD\uC131\uC5D0 puppeteer-core\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC124\uCE58: npm install puppeteer-core"
29438
29446
  );
29439
29447
  }
29440
29448
  const executablePath = _nullishCoalesce(process.env.PUPPETEER_EXECUTABLE_PATH, () => ( findChromiumPath()));
29441
29449
  if (!executablePath) {
29442
- throw new (0, _chunkCWP56BRCcjs.KordocError)(
29450
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
29443
29451
  "Chromium \uC2E4\uD589 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. PUPPETEER_EXECUTABLE_PATH \uD658\uACBD\uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694."
29444
29452
  );
29445
29453
  }
@@ -29498,7 +29506,7 @@ async function markdownToPdf(markdown, options) {
29498
29506
  return htmlToPdf(html, options);
29499
29507
  }
29500
29508
  async function blocksToPdf(blocks, options) {
29501
- const markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks);
29509
+ const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
29502
29510
  return markdownToPdf(markdown, options);
29503
29511
  }
29504
29512
 
@@ -30392,15 +30400,15 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode) {
30392
30400
  async function renderHwpxToSvg(input, options) {
30393
30401
  const maxImg = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _555 => _555.maxImageBytes]), () => ( 40 * 1024 * 1024));
30394
30402
  const ab = input instanceof Uint8Array ? input.buffer.slice(input.byteOffset, input.byteOffset + input.byteLength) : input;
30395
- _chunkCWP56BRCcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
30403
+ _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
30396
30404
  let zip;
30397
30405
  try {
30398
30406
  zip = await _jszip2.default.loadAsync(input);
30399
30407
  } catch (e33) {
30400
- throw new (0, _chunkCWP56BRCcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
30408
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
30401
30409
  }
30402
30410
  const secFiles = zip.file(/Contents\/section\d+\.xml$/i).sort((a, b) => a.name.localeCompare(b.name));
30403
- if (secFiles.length === 0) throw new (0, _chunkCWP56BRCcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
30411
+ if (secFiles.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
30404
30412
  const warnings = [];
30405
30413
  const headFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( zip.file("Contents/head.xml")));
30406
30414
  const styles = headFile ? parseRenderStyles(await headFile.async("string")) : { charPr: /* @__PURE__ */ new Map(), paraAlign: /* @__PURE__ */ new Map(), paraGeom: /* @__PURE__ */ new Map(), borderFill: /* @__PURE__ */ new Map() };
@@ -30408,7 +30416,7 @@ async function renderHwpxToSvg(input, options) {
30408
30416
  const secXmls = [];
30409
30417
  for (const f of secFiles) {
30410
30418
  const xml = await f.async("string");
30411
- if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
30419
+ if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
30412
30420
  secXmls.push(xml);
30413
30421
  }
30414
30422
  const binmap = /* @__PURE__ */ new Map();
@@ -30481,9 +30489,9 @@ async function renderHwpxToSvg(input, options) {
30481
30489
  }
30482
30490
  if (rendered.length === 0) {
30483
30491
  if (noCacheSkipped) {
30484
- throw new (0, _chunkCWP56BRCcjs.KordocError)("\uC870\uD310 \uCE90\uC2DC(linesegarray) \uC5C6\uC74C \u2014 \uD55C\uCEF4\uC5D0\uC11C \uC800\uC7A5\uD55C HWPX\uB9CC \uB80C\uB354 \uAC00\uB2A5 (reflow \uC635\uC158\uC73C\uB85C \uD569\uC131 \uB80C\uB354 \uAC00\uB2A5)");
30492
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC870\uD310 \uCE90\uC2DC(linesegarray) \uC5C6\uC74C \u2014 \uD55C\uCEF4\uC5D0\uC11C \uC800\uC7A5\uD55C HWPX\uB9CC \uB80C\uB354 \uAC00\uB2A5 (reflow \uC635\uC158\uC73C\uB85C \uD569\uC131 \uB80C\uB354 \uAC00\uB2A5)");
30485
30493
  }
30486
- throw new (0, _chunkCWP56BRCcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
30494
+ throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
30487
30495
  }
30488
30496
  const GAP = 2400;
30489
30497
  const clipDefs = [];
@@ -30519,13 +30527,13 @@ async function parse(input, options) {
30519
30527
  if (typeof input === "string") {
30520
30528
  try {
30521
30529
  const buf = await _promises.readFile.call(void 0, input);
30522
- buffer = _chunkCWP56BRCcjs.toArrayBuffer.call(void 0, buf);
30530
+ buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, buf);
30523
30531
  } catch (err) {
30524
30532
  const msg2 = err instanceof Error && "code" in err && err.code === "ENOENT" ? `\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${input}` : `\uD30C\uC77C \uC77D\uAE30 \uC2E4\uD328: ${input}`;
30525
30533
  return { success: false, fileType: "unknown", error: msg2, code: "PARSE_ERROR" };
30526
30534
  }
30527
30535
  } else if (Buffer.isBuffer(input)) {
30528
- buffer = _chunkCWP56BRCcjs.toArrayBuffer.call(void 0, input);
30536
+ buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, input);
30529
30537
  } else {
30530
30538
  buffer = input;
30531
30539
  }
@@ -30559,18 +30567,18 @@ async function parse(input, options) {
30559
30567
  }
30560
30568
  async function parseImage(buffer, options) {
30561
30569
  try {
30562
- const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-TCJLNMTG.cjs")));
30570
+ const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-RN77CC5P.cjs")));
30563
30571
  const { blocks, warnings } = await parseImageDocument(buffer, options);
30564
30572
  return {
30565
30573
  success: true,
30566
30574
  fileType: "image",
30567
- markdown: _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, blocks),
30575
+ markdown: _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks),
30568
30576
  blocks,
30569
30577
  warnings: warnings.length ? warnings : void 0,
30570
30578
  pageCount: 1
30571
30579
  };
30572
30580
  } catch (err) {
30573
- return { success: false, fileType: "image", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30581
+ return { success: false, fileType: "image", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30574
30582
  }
30575
30583
  }
30576
30584
  async function parseHwp3(buffer, options) {
@@ -30578,7 +30586,7 @@ async function parseHwp3(buffer, options) {
30578
30586
  const { markdown, blocks, metadata, outline, warnings } = parseHwp3Document(buffer, options);
30579
30587
  return { success: true, fileType: "hwp3", markdown, blocks, metadata, outline, warnings };
30580
30588
  } catch (err) {
30581
- return { success: false, fileType: "hwp3", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30589
+ return { success: false, fileType: "hwp3", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30582
30590
  }
30583
30591
  }
30584
30592
  async function parseHwpx(buffer, options) {
@@ -30586,7 +30594,7 @@ async function parseHwpx(buffer, options) {
30586
30594
  const { markdown, blocks, metadata, outline, warnings, images } = await parseHwpxDocument(buffer, options);
30587
30595
  return { success: true, fileType: "hwpx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _562 => _562.length]) ? images : void 0 };
30588
30596
  } catch (err) {
30589
- return { success: false, fileType: "hwpx", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30597
+ return { success: false, fileType: "hwpx", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30590
30598
  }
30591
30599
  }
30592
30600
  async function parseHwp(buffer, options) {
@@ -30611,13 +30619,13 @@ async function parseHwp(buffer, options) {
30611
30619
  }
30612
30620
  return { success: true, fileType: "hwp", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _564 => _564.length]) ? images : void 0 };
30613
30621
  } catch (err) {
30614
- return { success: false, fileType: "hwp", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30622
+ return { success: false, fileType: "hwp", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30615
30623
  }
30616
30624
  }
30617
30625
  async function parsePdf(buffer, options) {
30618
30626
  let parsePdfDocument;
30619
30627
  try {
30620
- const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-VQIJPCI5.cjs")));
30628
+ const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-5TEQ6EFF.cjs")));
30621
30629
  parsePdfDocument = mod.parsePdfDocument;
30622
30630
  } catch (e35) {
30623
30631
  return {
@@ -30632,7 +30640,7 @@ async function parsePdf(buffer, options) {
30632
30640
  return { success: true, fileType: "pdf", markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images };
30633
30641
  } catch (err) {
30634
30642
  const isImageBased = err instanceof Error && "isImageBased" in err ? true : void 0;
30635
- return { success: false, fileType: "pdf", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err), isImageBased };
30643
+ return { success: false, fileType: "pdf", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err), isImageBased };
30636
30644
  }
30637
30645
  }
30638
30646
  async function parseXlsx(buffer, options) {
@@ -30640,7 +30648,7 @@ async function parseXlsx(buffer, options) {
30640
30648
  const { markdown, blocks, metadata, warnings } = await parseXlsxDocument(buffer, options);
30641
30649
  return { success: true, fileType: "xlsx", markdown, blocks, metadata, warnings };
30642
30650
  } catch (err) {
30643
- return { success: false, fileType: "xlsx", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30651
+ return { success: false, fileType: "xlsx", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30644
30652
  }
30645
30653
  }
30646
30654
  async function parseXls(buffer, options) {
@@ -30648,7 +30656,7 @@ async function parseXls(buffer, options) {
30648
30656
  const { markdown, blocks, metadata, warnings } = await parseXlsDocument(buffer, options);
30649
30657
  return { success: true, fileType: "xls", markdown, blocks, metadata, warnings };
30650
30658
  } catch (err) {
30651
- return { success: false, fileType: "xls", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30659
+ return { success: false, fileType: "xls", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30652
30660
  }
30653
30661
  }
30654
30662
  async function parseDocx(buffer, options) {
@@ -30656,7 +30664,7 @@ async function parseDocx(buffer, options) {
30656
30664
  const { markdown, blocks, metadata, outline, warnings, images } = await parseDocxDocument(buffer, options);
30657
30665
  return { success: true, fileType: "docx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _565 => _565.length]) ? images : void 0 };
30658
30666
  } catch (err) {
30659
- return { success: false, fileType: "docx", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30667
+ return { success: false, fileType: "docx", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30660
30668
  }
30661
30669
  }
30662
30670
  async function parseHwpml(buffer, options) {
@@ -30664,16 +30672,16 @@ async function parseHwpml(buffer, options) {
30664
30672
  const { markdown, blocks, metadata, outline, warnings } = parseHwpmlDocument(buffer, options);
30665
30673
  return { success: true, fileType: "hwpml", markdown, blocks, metadata, outline, warnings };
30666
30674
  } catch (err) {
30667
- return { success: false, fileType: "hwpml", error: _chunkCWP56BRCcjs.sanitizeError.call(void 0, err), code: _chunkCWP56BRCcjs.classifyError.call(void 0, err) };
30675
+ return { success: false, fileType: "hwpml", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30668
30676
  }
30669
30677
  }
30670
30678
  async function fillForm(input, values, outputFormat = "markdown") {
30671
30679
  let buffer;
30672
30680
  if (typeof input === "string") {
30673
30681
  const buf = await _promises.readFile.call(void 0, input);
30674
- buffer = _chunkCWP56BRCcjs.toArrayBuffer.call(void 0, buf);
30682
+ buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, buf);
30675
30683
  } else if (Buffer.isBuffer(input)) {
30676
- buffer = _chunkCWP56BRCcjs.toArrayBuffer.call(void 0, input);
30684
+ buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, input);
30677
30685
  } else {
30678
30686
  buffer = input;
30679
30687
  }
@@ -30699,7 +30707,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
30699
30707
  throw new Error(`\uC11C\uC2DD \uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}`);
30700
30708
  }
30701
30709
  const fill = fillFormFields(parsed.blocks, values);
30702
- const markdown = _chunk5AXGFJQOcjs.blocksToMarkdown.call(void 0, fill.blocks);
30710
+ const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, fill.blocks);
30703
30711
  if (outputFormat === "hwpx") {
30704
30712
  const hwpxBuffer = await markdownToHwpx(markdown);
30705
30713
  return { output: hwpxBuffer, format: "hwpx", fill };
@@ -30773,5 +30781,5 @@ async function fillForm(input, values, outputFormat = "markdown") {
30773
30781
 
30774
30782
 
30775
30783
 
30776
- exports.DEFAULT_REDACT_RULES = DEFAULT_REDACT_RULES; exports.HwpxSession = HwpxSession; exports.PRESET_ALIAS = PRESET_ALIAS; exports.SPACE_EM_FIXED = SPACE_EM_FIXED; exports.SPACE_EM_FONT = SPACE_EM_FONT; exports.VERSION = _chunkCWP56BRCcjs.VERSION; exports.ValueCursor = ValueCursor; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunk5AXGFJQOcjs.blocksToMarkdown; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; exports.hwpxToProfile = hwpxToProfile; exports.incompatibleGongmunWarnings = incompatibleGongmunWarnings; exports.inferFieldType = inferFieldType; exports.isHwpxFile = isHwpxFile; exports.isKnownFont = isKnownFont; exports.isLabelCell = isLabelCell; exports.isOldHwpFile = isOldHwpFile; exports.isPdfFile = isPdfFile; exports.isZipFile = isZipFile; exports.lintGongmunText = lintGongmunText; exports.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; exports.normalizeGongmunPreset = normalizeGongmunPreset; exports.openHwpxDocument = openHwpxDocument; exports.parse = parse; exports.parseDocx = parseDocx; exports.parseHwp = parseHwp; exports.parseHwp3 = parseHwp3; exports.parseHwpml = parseHwpml; exports.parseHwpx = parseHwpx; exports.parseImage = parseImage; exports.parsePdf = parsePdf; exports.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderHtml = renderHtml; exports.renderHwpxToSvg = renderHwpxToSvg; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.validateHwpx = validateHwpx;
30784
+ exports.DEFAULT_REDACT_RULES = DEFAULT_REDACT_RULES; exports.HwpxSession = HwpxSession; exports.PRESET_ALIAS = PRESET_ALIAS; exports.SPACE_EM_FIXED = SPACE_EM_FIXED; exports.SPACE_EM_FONT = SPACE_EM_FONT; exports.VERSION = _chunkLHH7AT6Jcjs.VERSION; exports.ValueCursor = ValueCursor; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunkM4BQRAOMcjs.blocksToMarkdown; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; exports.hwpxToProfile = hwpxToProfile; exports.incompatibleGongmunWarnings = incompatibleGongmunWarnings; exports.inferFieldType = inferFieldType; exports.isHwpxFile = isHwpxFile; exports.isKnownFont = isKnownFont; exports.isLabelCell = isLabelCell; exports.isOldHwpFile = isOldHwpFile; exports.isPdfFile = isPdfFile; exports.isZipFile = isZipFile; exports.lintGongmunText = lintGongmunText; exports.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; exports.normalizeGongmunPreset = normalizeGongmunPreset; exports.openHwpxDocument = openHwpxDocument; exports.parse = parse; exports.parseDocx = parseDocx; exports.parseHwp = parseHwp; exports.parseHwp3 = parseHwp3; exports.parseHwpml = parseHwpml; exports.parseHwpx = parseHwpx; exports.parseImage = parseImage; exports.parsePdf = parsePdf; exports.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderHtml = renderHtml; exports.renderHwpxToSvg = renderHwpxToSvg; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.validateHwpx = validateHwpx;
30777
30785
  //# sourceMappingURL=index.cjs.map